Any tutorials for having a contract own a name (with reverse lookup)?

I am going to be deploying a new smart contract soon and I want it to own an ENS name I purchased. I can probably figure out how to transfer the name to the contract easily enough, but I don’t know what I need to do in order to have the contract register the ENS name as its reverse lookup. A tutorial would be great, since I really only get one-shot at this (contract is a no-owner, totally decentralized, contract).

1 Like

For the reverse lookup, you need to call ReverseRegistrar.claim(msg.sender) in the contract’s constructor. This will give control of the reverse record to the contract deployer. You can get the reverse registrar address by looking up the owner of addr.reverse, or hardcoding it in your contract / supplying it as a constructor argument.

Docs for the reverse registrar can be found here.