Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 854 Bytes

File metadata and controls

25 lines (19 loc) · 854 Bytes

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.


Slide Screenshot

047.jpg


Slide Deck

  • Ether Transfer
  • transfer -> receive/fallback
  • 2300 Gas Subsidy
  • Failure -> Revert
  • Security: Reentrancy
  • Mitigation, Gas Assumption

References