Skip to main content

What Happens If the Interactions Step Fails?

If the Interactions step (the external call) fails, the smart contract's execution will typically stop, and the transaction will revert. In Solidity, functions like call.value() return a boolean indicating success or failure.

If the developer does not check this return value and the external call fails, the transaction might continue, leading to an inconsistent state where the internal state was updated (Effects) but the external action (Interactions) did not occur. A best practice is to check the return value and revert if the interaction fails.

How Can an Invariant Be Checked during a Unit Test?
How Does a Non-Reverting External Call Return Value Affect Contract Security?
Why Must State Updates Occur before External Calls?
What Is the Difference between Require() and Checking the Call Return Value?