From d555c82db4351f6049defbe64429d5f342f44a5f Mon Sep 17 00:00:00 2001 From: Li Xuanji Date: Mon, 22 Jan 2018 17:34:58 -0500 Subject: clarify `address` in function selector I found that the canonical form for `address` in computing the function selector calldata tag is `uint160`. Update the abi specs to explicitly mention this. --- docs/abi-spec.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/abi-spec.rst b/docs/abi-spec.rst index b81e35a6..90e2825e 100644 --- a/docs/abi-spec.rst +++ b/docs/abi-spec.rst @@ -40,9 +40,9 @@ The following elementary types exist: - ``int``: two's complement signed integer type of ``M`` bits, ``0 < M <= 256``, ``M % 8 == 0``. -- ``address``: equivalent to ``uint160``, except for the assumed interpretation and language typing. +- ``address``: equivalent to ``uint160``, except for the assumed interpretation and language typing. (this is shorthand not to be used for computing the function selector) -- ``uint``, ``int``: synonyms for ``uint256``, ``int256`` respectively (this shorthand not to be used for computing the function selector). +- ``uint``, ``int``: synonyms for ``uint256``, ``int256`` respectively (this is shorthand not to be used for computing the function selector). - ``bool``: equivalent to ``uint8`` restricted to the values 0 and 1 -- cgit v1.2.3