> For the complete documentation index, see [llms.txt](https://ret2basic.gitbook.io/ctfnote/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ret2basic.gitbook.io/ctfnote/web3-security-research/solidity/calldata.md).

# Calldata

{% embed url="<https://docs.soliditylang.org/en/latest/internals/layout_in_calldata.html>" %}
Layout of Call Data - Solidity doc
{% endembed %}

The input data for a function call is assumed to be in the format defined by the ABI specification. Among others, the ABI specification requires arguments to be padded to multiples of 32 bytes. The internal function calls use a different convention.

<mark style="color:red;">**Arguments for the constructor of a contract are directly appended at the end of the contract’s code**</mark>, also in ABI encoding. <mark style="color:red;">**The constructor will access them through a hard-coded offset**</mark>, and not by using the `codesize` opcode, since this of course changes when appending data to the code.
