6

关于合约的继承关系.

 3 years ago
source link: https://learnblockchain.cn/question/1943
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
关于合约的继承关系. | 登链社区 | 技术问答

关于合约的继承关系.



如果master合约直接继承URIStorage和Enumerable的话,需要重写很多函数.

怎样处理继承才可以避免这样的情况?

Tiny熊 - 布道者 1天前

  擅长:智能合约,以太坊

遇到了什么问题?

在最近的 Solidity 版本里, 需要显式(override)的重写函数。

如果父合约里有virtual 的函数, 必须要重写, 这是语法要求, 避免不了。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK