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!
Taking the above, I did it a little differently step by step. Note if you have different mastersalts, trying each one after the first one is easy since there is only one field (line 2 (salt=hexsecret) that you need to change in the form:
https://etherscan.io/address/0x6090a6e47849629b7245dfa1ca21d94cd15878ef#readContract
Here are the steps the way I would do it. It worked for me! Had to try numerous mastersalts before I found the one that worked:
owner name/address here:
name you want here
put name into https://emn178.github.io/online-tools/keccak_256.html and add 0x in front and copy in line 4 below
here is the hash of the name you want. It will be used in step 14 below under hash
amount you bid in ether here and enter that amount in ether line of: https://www.myetherwallet.com/helpers.html then copy the number at the top put in 6 below
this is the value AND depositAMOUNT generally in wei. It will be used in step 14 under value
mastersalt here
mastersaltname you want here (just append the name to your mastersalt without any space and in lowercase)
https://emn178.github.io/online-tools/keccak_256.html of step 8 here and put 0x in front and paste to line 10
this is the secret
put step 10 in https://emn178.github.io/online-tools/keccak_256.html and again add 0x and paste it in line 12
this is your "hexsecret" it will be used as "salt" in line 14 below
go to: https://etherscan.io/address/0x6090a6e47849629b7245dfa1ca21d94cd15878ef#readContract
note line 2. shaBid hash (bytes32), owner (address), value (uint256), salt (bytes32) Query
put hash from line 4, owner from line 1, value from line 6, salt (hexsecret) from line 12 and push Query copy result created under modify to line 16
this is your shabid
now look at line 5. sealedBids (address), (bytes32) Query
put owner name in first input address and put shabid in second input and press Query
look at result. if an address, then you're good. If 0x00000.... try another mastersalt. leave the page as it is and only change the one thing "hexsecret"
to do another mastersalt, just do step 7-12 above then put the result of 12 in the salt, press query to get the shabid and input that again into line t and see if it's and address or 0x000.
continue until you get an address. if you get an address create a JSON bid using template below and append it to your existing JSON bid.
{
"_id":"W43yyoydBPLW7w2Lx", <random. change a character to assure unique>
"date":1497625514274,
"mastersalt":"from line 7",
"depositAmount":"from line 6",
"name":"from line 2",
"hash":"from line 4",
"value":"from line 6",
"owner":"from line 1",
"secret":"from line 10",
"hexSecret":"from line 12",
"shaBid":"from line 16"
},
The above may or may not work to give you a successful reveal in register.ens.domains. If it fails during reveal period, go over to https://www.myetherwallet.com/#ens and use the hexsecret from line 12 above as the "secret phrase" instead of the three words suggested.