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.
Asked
Active
Viewed 1.2k times
2 Answers
25
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')
Fabian Vogelsteller
- 1,520
- 11
- 12
9
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.
Ann Kilzer
- 380
- 1
- 16
lukjel
- 91
- 1
- 1
TokensorCustomContracts– Fabian Vogelsteller Apr 05 '16 at 22:47VM1547:2 Uncaught ReferenceError: Contracts is not defined(…)in my console – Makoto Apr 09 '16 at 20:46