Why is my subdomain registrar contract not working?

Hey guys,

I’m trying to register an ens subdomain using my own registrar. I’ve successfully setup the domain, however I’m not able to register a subdomain. When I try to register a subdomain, I get a cannot estimate gas notification, which I assume means there’s something wrong. If I go ahead with the transaction, it fails.

I’ve attached images of how I’ve setup the functions on etherscan. This is my contract address in case anyone wants to try it out- 0xD613De358f1b91C45f40644d088D75472A55BA03. Also, my domains have been wrapped.


Setup domain:



Your contract does not seem to be approved on the namewrapper contract for your EOA.


I approved the contract, but it’s still not working. Are there any other approvals I need to do?

No, you shouldn’t need any other approvals (unless you are paying with an erc-20).

Did you get same “execution reverted” this time or do you get a different error if you push the transaction through.

Same error as last time. Also, I tried registering the subdomain using setSubnodeOwner on the Namewrapper contract and it worked. Any idea what the issue might be?

did you push a tx through?

I don’t see any new ones on that contract address since your first failure.

I mean it’s once again saying cannot estimate gas. It’s 10ETH to push it through and can’t do that, though I’m sure it would revert.

yes, it would revert (it wouldn’t cost 10 ether though)

You can reduce your gas limit manually to 400,000 in metamask and that should let you push it through.

Done, didn’t go through.

ah… shame, i was hoping you’d get a better revert message :slight_smile:

I usually do most of my testing on a local blockchain so i can debug it easier, doing on public testnet is problematic for a number of reasons.

Maybe your issue is something to do with fuses.

Looking at the code, you set PARENT_CANNOT_CONTROL. Is your parent domain CANNOT_UNWRAP fuse burned?


It worked! Thank you so much.

Just one more question, what’s exactly the purpose of using my own registrar instead of the ens wrapper? Is it to give me more control over prices, fuses, etc?


1 Like

The ability / logic for renting, selling or distributing domains isn’t included in any of the current ENS contracts. The subdomain registrar is there to provide an example of how this functionality can be integrated by developers.

I don’t think that these contracts are production ready though. Just example code currently.

Got it. Thanks!

1 Like