What do I do if I want to switch my subdomain registrar?

Hey guys,

I registered my subdomain registrar with the goerli namewrapper by calling setApprovalForAll. Now, if I want to use another registrar for different registrar, can I just set up another one? Also, when calling set approval for all, why does the contract require access to all my NFTs?

Also, I have minted a subdomain tom.example.eth (from alpha.ens.domains), however when I use my new subdomain registrar to check whether tom.bigdog.eth has been minted, I get false. Why is this?

Thanks

1 Like

That’s just the way that the ERC-1155 batch operator approval methods work. It’s only for the Name Wrapper contract though. It’s your contract, so you’ll need to decide how much you want to trust it.

You could move that one name to a separate account, and then call setApprovalForAll from that account instead. That way it would never affect any other wrapped names.

Or, instead of simply approving your registrar as an operator, you could transfer ownership of the actual NFT to that contract. That is a bit more involved as you will probably want to build an appropriate (and secure) way to withdraw that NFT back out if you ever wanted to.

If you no longer want that registrar to be able to register/renew subnames, then you just call setApprovalForAll again and revoke your contract as an approved operator (passing in false). Then you can approve your new contract. You can also have multiple approved contracts at the same time if you wish.

2 Likes

Just to be clear, it’s asking for approval for all NFTs in the registrar contract and not the wallet right?

Thanks

1 Like

Also, tom.bigdog.eth does not return true from your subdomainMinted method because it was not registered through your contract. You created that subdomain directly against the Name Wrapper, presumably via the alpha manager app, in this transaction: https://goerli.etherscan.io/tx/0xc6cf09c5a82ba9c562329a9b35c7c11274d49cb164cdb1ae4e86b7998243b822

Yes, only the Name Wrapper contract. Not “all NFTs”.

1 Like

Thank you!

1 Like

Hey @serenae

What did you mean by the above? What exactly are the benefits to calling setApprovalForAll from a different wallet and how are the wrapped names affected?

It means that you’d only be approving your contract as an operator on that separate account. So at most it will only have control over the one wrapped name owned by that account.

This is a Metamask issue. We reached out to them about this and they said they have a team looking into it. @branzinho pointed out the issue in their code specifically for the new ENS contract. He can probably speak more about it if need be.