I have tons of experimental contracts I created as part of doing tutorials which I no longer need. I know I can kill the contract (from https://www.ethereum.org/greeter tutorial) but that still leaves the contracts grayed out.
2 Answers
Thats not so easy, if they are created on the testnet we gray them out. So you can't click on it and then on the trash can next to the name, on the contract page.
You would need to open the console (CMD/CTRL + ALT + i) and type:
CustomContracts.find().fetch()
Then look at the contract you want to remove and copy its _id
.
Then type: CustomContracts.remove('the_id_you_copied')
-
You can do the same with
Tokens
orCustomContracts
Commented Apr 5, 2016 at 22:47 -
This is also the answer for ethereum.stackexchange.com/q/2103/42 ?– eth ♦Commented Apr 6, 2016 at 2:26
-
4I get
VM1547:2 Uncaught ReferenceError: Contracts is not defined(…)
in my console– MakotoCommented Apr 9, 2016 at 20:46 -
When I click on the trash can, I have to confirm by giving the name of the contract. I do that, press Ok, the dialog goes away, but the contract remains. Trying the console commands fails as shown by @Makoto. Commented Apr 10, 2016 at 9:15
-
I fix the issue in the next version, you then just need to type "delete" Commented Apr 10, 2016 at 11:55
Or you can remove them all:
CustomContracts.find().fetch().map(
function(m) { CustomContracts.remove(m._id);}
)
If you get an error saying "CustomContracts is not defined", be sure to open developer tools from the Contracts page via right clicking and selecting "Open Developer Tools," then navigating to the console.