How to recover a lost a ENS bid if you still have the secret
-
Download your bid backup and open it in a text editor. You can paste the code on a service like this to make it more readable: https://jsonformatter.curiousconcept.com
-
Search for the name of your bid to check it's not there. If it's not then at the top of your file you'll find something like this:
{
"About":{
"backupDate":"2017-06-17T15:34:23.014Z",
"mastersalt":"Oompa Loompa Doo"
},
"MyBids":[
{
"_id":"W43yyoydBPLW7w2Lx",
"date":1497625514274,
"mastersalt":"Oompa Loompa Doo",
"depositAmount":"1000000000000000000",
"name":"name-that-i-want",
"hash":"0xxxxxxx",
"value":"1000000000000000000",
"owner":"0xxxxxxxx",
"secret":"b6ccb98688436465ab149bcf2efa794669c81195b9eda34dcfe4447a384d06f8",
"hexSecret":"0x5b2815e400e3c8c99354cc337daf9acbc83612077fd36fbc7b1e9e5462055fc6",
"shaBid":"0x204585248a2501796682aafdaa9903b9f27b63ebd61d72002cdf7f4894eb73f1"
},
-
Search for all instances of "mastersalt" and see if they are all the same. If they are not, you need to repeat this step with all of them. If you have no "mastersalt" set, then you probably won't be able to recover
-
Duplicate the last item between the last
{
and},
and modify it to your details:
- _id can be any random string
- date and mastersalt leave it untouched
- value the amount you bid, ignoring any extra amount set, in wei.To convert ether to wei, use this handy tool. You must remember this.
- depositAmount the total amount you deposited, ignoring any extra amount set, in wei. To convert ether to wei, use this handy tool. If you don't remember this, use the same as value
- owner the public address you used to send the transaction. You must know this.
- hash use this keccak-256 tool and use the name you want (lowercase, no .eth) as input. Add 0x to the beginning of the value it outputs if it doesn't start with one.
- secret take your mastersalt, plus the name you want and put it through keccak-256 tool. In the above example it would be "Oompa Loompa Dooname-that-i-want"
- hexSecret take the secret, put it through keccak-256 again and add a "0x" at the beginning.
- shaBid open ENS registar on etherscan tab, "read contract" and find the "shaBid" function. Add the values of hash, owner, and value. Use the "hexSecret" you obtained as the salt.
-
On the same page as etherscan, use the "sealedBids" function and use the "owner" and the "shaBid" you just got from the step above. If the result is an address then bingo, you found the combination. If it's 0x000.. then you either have the wrong details, or that bid has been revealed already
-
Once you found it (use the other bids on your json file to check you did everything correctly!) then add that bid to your list, save it and import on your registrar dapp. The reveal button should appear. If that doesn't work, you can also use https://www.myetherwallet.com/ens tool and use hexSecret as the secret.
Good luck!
Thank you so mucho for your great help