diff options
author | chriseth <chris@ethereum.org> | 2018-08-16 20:54:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-16 20:54:28 +0800 |
commit | 146e89c2ec795ae799a91b54a959e672a998b8f9 (patch) | |
tree | c71fdd31214340c92c2e71e3869be07b713d34b8 /docs | |
parent | c274af077040a726fd63764ef13319078b686968 (diff) | |
parent | 9a6b447843b26f5b58cdc51f6a046c1b5c5e1b7f (diff) | |
download | dexon-solidity-146e89c2ec795ae799a91b54a959e672a998b8f9.tar.gz dexon-solidity-146e89c2ec795ae799a91b54a959e672a998b8f9.tar.zst dexon-solidity-146e89c2ec795ae799a91b54a959e672a998b8f9.zip |
Merge pull request #4818 from ethereum/clarifyConstructorArgs
Clarify constructor arguments.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/miscellaneous.rst | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/docs/miscellaneous.rst b/docs/miscellaneous.rst index e8631224..87041be6 100644 --- a/docs/miscellaneous.rst +++ b/docs/miscellaneous.rst @@ -87,10 +87,14 @@ Solidity always places new objects at the free memory pointer and memory is neve Layout of Call Data ******************* -When a Solidity contract is deployed and when it is called from an -account, the input data is assumed to be in the format in :ref:`the ABI -specification <ABI>`. The ABI specification requires arguments to be padded to multiples of 32 -bytes. The internal function calls use a different convention. +The input data for a function call is assumed to be in the format defined by the :ref:`ABI +specification <ABI>`. Among others, the ABI specification requires arguments to be padded to multiples of 32 +bytes. The internal function calls use a different convention. + +Arguments for the constructor of a contract are directly appended at the end of the +contract's code, also in ABI encoding. The constructor will access them through a hard-coded offset, and +not by using the ``codesize`` opcode, since this of course changes when appending +data to the code. .. index: variable cleanup |