Skip to content

Commit

Permalink
Merge pull request #497 from charliex2/patch-5
Browse files Browse the repository at this point in the history
修正接口必须被实现的规则
  • Loading branch information
AmazingAng committed May 14, 2023
2 parents 1727039 + 6e1b69f commit 23a4003
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 14_Interface/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ abstract contract InsertionSort{
2. 不能包含构造函数
3. 不能继承除接口外的其他合约
4. 所有函数都必须是external且不能有函数体
5. 继承接口的合约必须实现接口定义的所有功能
5. 继承接口的非抽象合约必须实现接口定义的所有功能

虽然接口不实现任何功能,但它非常重要。接口是智能合约的骨架,定义了合约的功能以及如何触发它们:如果智能合约实现了某种接口(比如`ERC20``ERC721`),其他Dapps和智能合约就知道如何与它交互。因为接口提供了两个重要的信息:

Expand Down

0 comments on commit 23a4003

Please sign in to comment.