Removing Smart Contracts

Learn how to remove smart contracts from an Ethereum network.

In the next lesson, we'll deploy a smart contract to an Ethereum network; but before we do that, let’s learn how to remove a smart contract after we're done with our testing.

The selfdestruct function

To remove a smart contract, we have to call the selfdestruct function that removes the contract from the network. This function accepts a single parameter, i.e., an address where we want to send the remaining Ether balance of the smart contract so it won’t get lost.

Get hands-on with 1200+ tech skills courses.