What happens to the eth held by a contract once it is killed? And how does it continues to receive eth after getting killed ? Where does the balance of the contract get stored in a EVM?
1 Answer
It gets sent to a specified address.
F.E. selfdestruct(addr1) will send the ETH to addr1.
-
Can a contract continue to receive ethers even after it is killed? Commented Jul 6, 2022 at 11:47
-
-
@HrishikeshSaloi When a contract is killed its bytecode is removed from the blockchain, so it can no longer process payments, but the address continues to be valid and accept payments, so any ether sent to the contract will be locked forever (or until a private key for the address is found). See for example the parity bug contract etherscan.io/address/0x863df6bfa4469f3ead0be8f9f2aae51c91a907b4, it was killed at block 4501969, but it did receive ether transfers after that block.– Ismael ♦Commented Jul 12, 2022 at 13:14