I am aware that calldata is a read-only byte-addressable space. When calling a contract from an EOA it contains the function signature of the call as well as the input args. However when a contract calls another contract's external function, is the function signature and input args of that call also stored in the calldata space? I am asking because having 0 bytes within the calldata provides some gas savings, but wonder if contract to contract calls are stored in calldata area and hence provide these savings if you have 0 bytes in your input args.

1 Answer 1


If others come across this i researched it a little and this seems to be the answer:

As long your address isnt present in the calldata of the main transaction (contract to contract calldata dont count) its useless to have zerobytes for gas savings.

Contract to contract calls have calldata too but it works different, they are stored in memory and can be retrieved with CALLDATALOAD within the the new call frame.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.