aboutsummaryrefslogtreecommitdiffstats
path: root/docs/contracts.rst
diff options
context:
space:
mode:
authorChristian Parpart <christian@ethereum.org>2018-07-12 20:57:42 +0800
committerChristian Parpart <christian@ethereum.org>2018-07-16 18:15:36 +0800
commit396bf118585d213a397be990b5118a47ac4753c1 (patch)
treecc2f955335203950ba019a2fd1560a5ebf53003e /docs/contracts.rst
parent31e56f9f9976cee44f000226318dca566f0f0b79 (diff)
downloaddexon-solidity-396bf118585d213a397be990b5118a47ac4753c1.tar.gz
dexon-solidity-396bf118585d213a397be990b5118a47ac4753c1.tar.zst
dexon-solidity-396bf118585d213a397be990b5118a47ac4753c1.zip
enforce interface-functions to be external-declared
- libsolidity: Enforce interface-functions must be external-declared. - Changelog adapted to reflect changes wrt. functions in interfaces. - test: Adjustments according to prior interface-function changes. - tests: Adapting SolidityEndToEndTest to interface-function change. - docs: Adapted documentation to interface-function change.
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 fa6df6bf..2f9f5869 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.