hyperledger-labs / blockchain-carbon-accounting

This project implements blockchain applications for climate action and accounting, including emissions calculations, carbon trading, and validation of climate claims. It is part of the Linux Foundation's Hyperledger Climate Action and Accounting SIG.
https://wiki.hyperledger.org/display/CASIG/Carbon+Accounting+and+Certification+WG
Apache License 2.0
188 stars 104 forks source link

add owner sef destruct method to contracts #107

Closed sichen1234 closed 3 years ago

sichen1234 commented 3 years ago

So we can clean up obsolete contracts.

jamesondh commented 3 years ago

Added in commit https://github.com/opentaps/blockchain-carbon-accounting/commit/e7baecfbdc8d6baa9cc25f5edde1d9c5b168c52b

Use the selfDestruct() function from the deployer account to delete the contract.

jamesondh commented 3 years ago

See the new instructions for calling it on a deployed contract: https://github.com/opentaps/blockchain-carbon-accounting/blob/main/net-emissions-token-network/docs/using-the-contracts.md#destroying-the-contract

sichen1234 commented 3 years ago

Looks good. I self-destructed https://goerli.etherscan.io/address/0x3221b36e93563f25969e336e264b60eaab6ceefc#code