✅ How to receive your contract Ether

  1. payable functions
  2. mining reward: contract addresses can be designated as the recipients of mining block rewards.
  3. from a destroyed contract: As discussed, selfdestruct lets you designate a backup address to receive the remaining ethers from the contract you are destroying.

If you use selfdestruct

  1. authenticate that the msg.sender = owner
  2. emit an event for external dependencies on this contract and for future reference.

Ethernaut