1

How to self-destruct a smart contract. What is the syntax of the code. Will self-destructing my smart contract will refund me any ether from the network?

2

The syntax for selfdestruct is simple: selfdestruct(addr);, where addr is the address where possible Ether balance of the contract is sent.

You will not receive a refund for the selfdestruct, since the recent London hard fork removed gas refund for selfdestruct (https://eips.ethereum.org/EIPS/eip-3529).

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.