1

I implemented selfdestruct(), also it showed succeeded on Etherscan. Afterwards, I still am able to send transactions to the contract. Can you tell me why? Doesn't selfdestruct() delete the contract code & storage from the network. Why it still accepts subsequent transaction requests? Help please... Here the function:

function kill() public {
    selfdestruct(owner); 
}
1
1

selfdestruct does remove the code and storage from the network at that address, however it is still a valid address that can receive funds. There just happens to be no code there to handle the received funds.

1
  • that makes sense but when I call some functions on the contract, shouldn't it throw an error because there is no code left? I mean the interaction should be problematic right. It should not succeed. – gomozor Feb 24 '20 at 5:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.