I have a couple of questions about on-chain contract calls:

Suppose two contracts call each other back and forth (let's say 5 times they transfer messages between them), but at on the last transfer, it fails.

Do the actions of all the previous transfers get reversed, as though nothing had happened? In other words are all the operations atomic?

Does the initiator of the first transfer pay the cost of all the operations, including from the other contract?

1 Answer 1


Yes, they are reversed in this case; operations are atomic.

It’s important when designing a contract to remember that: calling 10 contracts from a contract fails as soon as one fails.

The initiator pays gas and fees for the whole transaction including new operations created by the execution of the contract.

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.