47 - Transfer
The transfer
function fails if the balance of the current contract is not large enough or if the Ether transfer is rejected by the receiving account.
The transfer
function reverts on failure.
The code in receive
function or if not present then in fallback
function is executed with the transfer call.
If that execution runs out of gas or fails in any way, the Ether transfer will be reverted and the current contract will stop with an exception.
- Ether Transfer
- transfer -> receive/fallback
- 2300 Gas Subsidy
- Failure -> Revert
- Security: Reentrancy
- Mitigation, Gas Assumption