Skip to main content

How Do Modern Solidity Versions Recommend Handling Ether Transfers Instead of Using a Gas Stipend?

Modern Solidity practice strongly recommends avoiding transfer and send due to the fragile 2,300 gas limit. The preferred method is using the low-level call function combined with the Checks-Effects-Interactions pattern.

This allows the contract to manage its state before the external call, and the developer can explicitly set the gas limit or rely on the recipient to handle their own gas usage safely.

What Are the Gas Limitations of the Transfer Function in Solidity?
Why Is Updating State before an External Call the Critical Part of the CEI Pattern?
What Is the Difference between a Receive() and a Fallback() Function in Solidity?
Can a Contract’s Fallback Function Intentionally Consume More than 2,300 Gas?