3

How many nested calls can an Ethereum transaction do?

Can Smart Contract A call Smart Contract B, then Smart Contract C and so on with only one call through Smart Contract A, and is there a limit to this chain of calls?

6

Ethereum allows up to 1024 nested calls as specified in the Yellow Paper.

The definition of the CALL opcode presented below, specifies this limit. enter image description here enter image description here

Some recent changes to the limit of the gas allowed to be consumed by nested calls have reduced the practical limit of call depth to around 340. See: How does EIP 150 change the call depth attack?

The change is due to the fact that the max amount of gas that may be used by a nested call is ceil(63/64 * remaining_gas).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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