aboutsummaryrefslogtreecommitdiffstats
path: root/docs/contracts.rst
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-07-16 20:43:56 +0800
committerGitHub <noreply@github.com>2018-07-16 20:43:56 +0800
commit931794001e92cbfe99c91da037cf36a1808d9df1 (patch)
tree0bfb67ef7175f9758cfef0a4ca8e290570903965 /docs/contracts.rst
parent58667db8b891a535dfc139144271c1bd8a1e067a (diff)
parent396bf118585d213a397be990b5118a47ac4753c1 (diff)
downloaddexon-solidity-931794001e92cbfe99c91da037cf36a1808d9df1.tar.gz
dexon-solidity-931794001e92cbfe99c91da037cf36a1808d9df1.tar.zst
dexon-solidity-931794001e92cbfe99c91da037cf36a1808d9df1.zip
Merge pull request #4500 from ethereum/v050-interface-functions-must-be-external
[BREAKING] interface functions must be external
Diffstat (limited to 'docs/contracts.rst')
-rw-r--r--docs/contracts.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index ea41cb54..033e9a45 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -1150,6 +1150,7 @@ Interfaces
Interfaces are similar to abstract contracts, but they cannot have any functions implemented. There are further restrictions:
- Cannot inherit other contracts or interfaces.
+- All declared functions must be external.
- Cannot define constructor.
- Cannot define variables.
- Cannot define structs.
@@ -1167,7 +1168,7 @@ Interfaces are denoted by their own keyword:
pragma solidity ^0.4.11;
interface Token {
- function transfer(address recipient, uint amount) public;
+ function transfer(address recipient, uint amount) external;
}
Contracts can inherit interfaces as they would inherit other contracts.