Deleting a contract

amazonmonkeyamazonmonkey Member Posts: 1
I deployed a contract through remix but it was incorrect and it seems that I can't delete it. I tried to verify and publish the code but it didn't work. I would like to reuse the contract/token name but don't know if that is possible.

Comments

  • dra9onsdra9ons Member Posts: 7
    You can not erase a contract. The data recorded in the block chain is not inherently deleted or modified. You can simply upload a new modified contract. Same token name can be used.
  • o0ragman0oo0ragman0o Member, Moderator Posts: 1,290 mod
    The only way a contract can be deleted is by implementing the selfdestruct(<recipient address>) in the contract itself. This can't remove the initial bytecode in the deployment transaction which is chain data, but it does free up the state storage for validating and light clients.

    There is no problem simply reusing the name/symbol/etc of the un-publicised contract for the new contract, but please take more care not to pollute the chain and fully test your code on a private test chain before deployment.
Sign In or Register to comment.