diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-09-11 22:03:49 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-09-16 19:31:12 +0800 |
commit | 923373b41efed30839cfc26e903e32b0dddd9cb5 (patch) | |
tree | 3ee7ac23d7a067b3961eb3ad94089100305256d6 | |
parent | c5063d315583270e88a01a0a82a84a68190f6ba1 (diff) | |
download | dexon-solidity-923373b41efed30839cfc26e903e32b0dddd9cb5.tar.gz dexon-solidity-923373b41efed30839cfc26e903e32b0dddd9cb5.tar.zst dexon-solidity-923373b41efed30839cfc26e903e32b0dddd9cb5.zip |
Clarify ABI & Solidity types
-rw-r--r-- | docs/abi-spec.rst | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/docs/abi-spec.rst b/docs/abi-spec.rst index f4822be7..97320c7f 100644 --- a/docs/abi-spec.rst +++ b/docs/abi-spec.rst @@ -75,6 +75,9 @@ of them inside parentheses, separated by commas: It is possible to form tuples of tuples, arrays of tuples and so on. +.. 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``. + Formal Specification of the Encoding ==================================== @@ -359,8 +362,8 @@ would result in the JSON: Handling tuple types -------------------- -If tuples are part of the type, we still want to know the name of the components. Because of that, -the json structure gets arbitrarily nested in the following way: +Despite that names are intentionally not part of the ABI encoding they do make a lot of sense to be included +in the JSON to enable displaying it to the end user. The structure is nested in the following way: An object with members ``name``, ``type`` and potentially ``components`` describes a typed variable. The canonical type is determined until a tuple type is reached and the string description up |