diff options
author | chriseth <chris@ethereum.org> | 2018-09-19 20:42:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-19 20:42:39 +0800 |
commit | 125c0434d183f47ef2eff99146a021b42e39e2ef (patch) | |
tree | 55acbc5e26436fa9f29fb5626f051dad325e399a | |
parent | 785cbf40056e8d4c3c7629d37ec69b403e768aa9 (diff) | |
parent | 1770e9c02f2f80b7924920eaae44aeb7377b8ffe (diff) | |
download | dexon-solidity-125c0434d183f47ef2eff99146a021b42e39e2ef.tar dexon-solidity-125c0434d183f47ef2eff99146a021b42e39e2ef.tar.gz dexon-solidity-125c0434d183f47ef2eff99146a021b42e39e2ef.tar.bz2 dexon-solidity-125c0434d183f47ef2eff99146a021b42e39e2ef.tar.lz dexon-solidity-125c0434d183f47ef2eff99146a021b42e39e2ef.tar.xz dexon-solidity-125c0434d183f47ef2eff99146a021b42e39e2ef.tar.zst dexon-solidity-125c0434d183f47ef2eff99146a021b42e39e2ef.zip |
Merge pull request #5004 from ethereum/solidity_types_abi
Note how Solidity types map to ABI types
-rw-r--r-- | docs/abi-spec.rst | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/abi-spec.rst b/docs/abi-spec.rst index 92af8f0c..8a5e2f5c 100644 --- a/docs/abi-spec.rst +++ b/docs/abi-spec.rst @@ -81,6 +81,24 @@ It is possible to form tuples of tuples, arrays of tuples and so on. It is also .. note:: Solidity supports all the types presented above with the same names with the exception of tuples. The ABI tuple type is utilised for encoding Solidity ``structs``. +Mapping Solidity to ABI types +----------------------------- +The following table shows on the left column Solidity types that are not part of the ABI, +and on the right column the ABI type that they map to. + ++-------------------------------+-----------------------------------------------------------------------------+ +| Solidity | ABI | ++===============================+=============================================================================+ +|:ref:`address payable<address>`|``address`` | ++-------------------------------+-----------------------------------------------------------------------------+ +|:ref:`contract<contracts>` |``address`` | ++-------------------------------+-----------------------------------------------------------------------------+ +|:ref:`enum<enums>` |smallest ``uint`` type that is large enough to hold all values | +| | | +| |For example, an ``enum`` of 255 values or less is mapped to ``uint8`` and | +| |an ``enum`` of 256 values is mapped to ``uint16``. | ++-------------------------------+-----------------------------------------------------------------------------+ + Formal Specification of the Encoding ==================================== |