mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #4818 from ethereum/clarifyConstructorArgs
Clarify constructor arguments.
This commit is contained in:
commit
146e89c2ec
@ -87,11 +87,15 @@ Solidity always places new objects at the free memory pointer and memory is neve
|
|||||||
Layout of Call Data
|
Layout of Call Data
|
||||||
*******************
|
*******************
|
||||||
|
|
||||||
When a Solidity contract is deployed and when it is called from an
|
The input data for a function call is assumed to be in the format defined by the :ref:`ABI
|
||||||
account, the input data is assumed to be in the format in :ref:`the ABI
|
specification <ABI>`. Among others, the ABI specification requires arguments to be padded to multiples of 32
|
||||||
specification <ABI>`. The ABI specification requires arguments to be padded to multiples of 32
|
|
||||||
bytes. The internal function calls use a different convention.
|
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
|
.. index: variable cleanup
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user