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?
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?
Ethereum allows up to 1024 nested calls as specified in the Yellow Paper.
The definition of the CALL
opcode presented below, specifies this limit.
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)
.