Skip to content

Instantly share code, notes, and snippets.

@kvhnuke
Created March 10, 2017 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kvhnuke/1fe377a9db5b751aace3918d5f888860 to your computer and use it in GitHub Desktop.
Save kvhnuke/1fe377a9db5b751aace3918d5f888860 to your computer and use it in GitHub Desktop.
ENS Using mew contracts
I'll show you how to start an ens auction using mew contract interface
make sure you are on ropston node
_hash is the sha3("myDomain"), oh and make sure the function is startAuction ***not Auctions :)
now wait for it to get mined, our domain name is mewtest.eth as you saw the sha3 hash is on just the mewtest sha3("mewtest")
now lets see the status of the auction
as you see status is 1, which means it is open for bidding, and deed 0x00... means no one bid on it yet
lets bid
in order to bid, you have to sha3 hash (domainNameHash,ownerAddress,Value,secretHash), lets see how to do this
select shaBid function from the contract hash is the hash of the domainName, and lets make the mew donation address the owner
value is in wei so make sure you convert your ether value to wei, im bidding 1 ether
now lets hash our secret, again it is sha3("secret") dont forget to put 0x infront :)
now when you click read it'll output the hash of the sealed bid copy this and we need it for like everything from now on
lets send our bid, the bid value should be either equal to or more than the value you specified in the shaBid process
since I bid 1 ether in the shaBid i'll do 1 ether here too
now time to wait for that tx to get mined
as you can see auction contract created a new deed contract and transferred our 1 eth there, now let check the auction status again
well it is still open :)
you can copy the registrationDate and see when the auction will expire, this auction will expire on 3/17/2017, 4:28:18 AM
technically you have to wait until 24 hrs before the expire time to reveal you bid, as no one can bid within the last 24 hours
this will eliminate the chances of someone overbidding you, but lets just reveal our bid
you have to enter all the information you entered into shaBid process here and everything should match
time to wait again :)
still waiting, and people say ethereum is fast :P
yey! it went through now lets go back and check the status of our auction
as you can see the deed address changed, and highestBid is now 1 ether, hopefully if one of you dont overbid me I'll have this domain
on march 17th just before I goto sleep!
if you really watched this thanks for watching!
still here?
bye
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment