aboutsummaryrefslogtreecommitdiffstats
path: root/docs/contracts.rst
diff options
context:
space:
mode:
authorChris Ward <chris.ward@ethereum.org>2019-01-08 00:49:34 +0800
committerchriseth <chris@ethereum.org>2019-01-08 07:02:32 +0800
commitcc99d636650d20a35a446d16f2b81d1fa8a2dabd (patch)
treef9b1dfc817b6d74787cf3cd8526564c3bebbeee8 /docs/contracts.rst
parentcb4e5936fdf1a7d22442c6da08b7ac3a4659f104 (diff)
downloaddexon-solidity-cc99d636650d20a35a446d16f2b81d1fa8a2dabd.tar.gz
dexon-solidity-cc99d636650d20a35a446d16f2b81d1fa8a2dabd.tar.zst
dexon-solidity-cc99d636650d20a35a446d16f2b81d1fa8a2dabd.zip
Split interfaces into new file
Diffstat (limited to 'docs/contracts.rst')
-rw-r--r--docs/contracts.rst38
1 files changed, 1 insertions, 37 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index 7f7d821a..2a397f6d 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -534,43 +534,7 @@ converted to ``uint8``.
.. include:: contracts/inheritance.rst
.. include:: contracts/abstract-contracts.rst
-
-.. index:: ! contract;interface, ! interface contract
-
-.. _interfaces:
-
-**********
-Interfaces
-**********
-
-Interfaces are similar to abstract contracts, but they cannot have any functions implemented. There are further restrictions:
-
-- They cannot inherit other contracts or interfaces.
-- All declared functions must be external.
-- They cannot declare a constructor.
-- They cannot declare state variables.
-
-Some of these restrictions might be lifted in the future.
-
-Interfaces are basically limited to what the Contract ABI can represent, and the conversion between the ABI and
-an interface should be possible without any information loss.
-
-Interfaces are denoted by their own keyword:
-
-::
-
- pragma solidity ^0.5.0;
-
- interface Token {
- enum TokenType { Fungible, NonFungible }
- struct Coin { string obverse; string reverse; }
- function transfer(address recipient, uint amount) external;
- }
-
-Contracts can inherit interfaces as they would inherit other contracts.
-
-Types defined inside interfaces and other contract-like structures
-can be accessed from other contracts: ``Token.TokenType`` or ``Token.Coin``.
+.. include:: contracts/interfaces.rst
.. index:: ! library, callcode, delegatecall