9

As I know, in ETH, when a contract would be useless, it could be destroyed by using the "selfdestruct" action. So, is there any same method to remove a useless contract from the eos blockchain?

3

As of v1.3.0, it is now possible to delete the smart contract from an account using the --clear flag ($ cleos set contract <account> --clear)

|improve this answer|||||
  • That would be very great – Harry Ma Sep 20 '18 at 15:15
1

There isn't a selfdestruct action, but there is a setcode action. A contract can use that to destroy itself like in this example.

|improve this answer|||||
  • thanks for your help man, but this method is using dead code to cover the contract byte, right ? is it too heavy for a contract developer to do that ? – Harry Ma May 12 '18 at 3:36
  • 1
    Correct. It's hard to judge too heavy right now until the ram market is active. – Todd Fleming May 12 '18 at 12:14

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.