mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
updated abi-spec.rst
This commit is contained in:
parent
fa4892e622
commit
4f84112650
@ -311,7 +311,7 @@ Use of Dynamic Types
|
|||||||
A call to a function with the signature ``f(uint256,uint32[],bytes10,bytes)`` with values
|
A call to a function with the signature ``f(uint256,uint32[],bytes10,bytes)`` with values
|
||||||
``(0x123, [0x456, 0x789], "1234567890", "Hello, world!")`` is encoded in the following way:
|
``(0x123, [0x456, 0x789], "1234567890", "Hello, world!")`` is encoded in the following way:
|
||||||
|
|
||||||
We take the first four bytes of ``sha3("f(uint256,uint32[],bytes10,bytes)")``, i.e. ``0x8be65246``.
|
We take the first four bytes of ``keccak("f(uint256,uint32[],bytes10,bytes)")``, i.e. ``0x8be65246``.
|
||||||
Then we encode the head parts of all four arguments. For the static types ``uint256`` and ``bytes10``,
|
Then we encode the head parts of all four arguments. For the static types ``uint256`` and ``bytes10``,
|
||||||
these are directly the values we want to pass, whereas for the dynamic types ``uint32[]`` and ``bytes``,
|
these are directly the values we want to pass, whereas for the dynamic types ``uint32[]`` and ``bytes``,
|
||||||
we use the offset in bytes to the start of their data area, measured from the start of the value
|
we use the offset in bytes to the start of their data area, measured from the start of the value
|
||||||
|
Loading…
Reference in New Issue
Block a user