What Is a Common Pattern for Handling the Success of an External Call ?

A common secure pattern is to immediately check the boolean return value of the low-level call function using a require statement. The pattern is (bool success, ) = recipient.call{value: amount}(""); require(success, "External call failed");.

This ensures that if the external call fails for any reason, the entire transaction is reverted, preventing any subsequent logic from executing and maintaining the contract's state integrity.

What Mechanism Can Be Implemented to Incentivize the Timely ‘Reveal’ of a Committed Transaction?
What Is a ‘Back-Run’ and How Does It Differ from a Sandwich Attack?
What Is the Difference between Require() and Checking the Call Return Value?
How Does This Pattern Relate to the Concept of Atomic Transactions in Blockchains?
How Do Smart Contracts Manage Slippage on a Decentralized Exchange?
How Do Modern Solidity Versions Recommend Handling Ether Transfers Instead of Using a Gas Stipend?
What Is the Checks-Effects-Interactions Pattern and How Does It Prevent Reentrancy?
Why Is the Gas Fee Still Charged Even If a Transaction Reverts or Fails?

Glossar