ensdomains / ens-app

Legacy ENS manager app
https://legacy.ens.domains/
BSD 2-Clause "Simplified" License
224 stars 266 forks source link

Primary name cannot be set through ens-app for a sub-domain with custom resolver #1529

Closed hodlthedoor closed 2 years ago

hodlthedoor commented 2 years ago

Description No .pcc.eth sub-domains that have a custom resolver are able to be set as primary name through the ens-app.

To Reproduce Steps to reproduce the behavior:

  1. Register ENS sub-domain with a custom resolver. hodl.pcc.eth is an example
  2. Navigate to the account management page and the sub-domain does not show in the drop-down for setting primary address

Expected behavior Expect hodl.pcc.eth to show in the drop-down with other ENS that resolve to that address

Additional context I mentioned this problem to coltron.eth he asked me to raise this as an issue here. The sub-domain can still be set directly to the reverse registar contract using the setName function.

makoto commented 2 years ago

Hi, hodl.pcc.eth doesn't seem to be created. Do you have an example subdomain which has ETH record set (for example zeus.pcc.eth does not have ETH record set It also helps me if you can point me to the transaction id when you did create subdomain and set resolver.

hodlthedoor commented 2 years ago

Hi

Yes, hodl.pcc.eth resolves to my wallet.

https://etherscan.io/enslookup-search?search=hodl.pcc.eth

Sent from Mail for Windows

From: Makoto Inoue Sent: 16 June 2022 17:38 To: ensdomains/ens-app Cc: hodlthedoor; Author Subject: Re: [ensdomains/ens-app] Primary name cannot be set through ens-appfor a sub-domain with custom resolver (Issue #1529)

Hi, hodl.pcc.eth doesn't seem to be created. Do you have an example subdomain which has ETH record set (for example zeus.pcc.eth does not have ETH record set It also helps me if you can point me to the transaction id when you did create subdomain and set resolver. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

makoto commented 2 years ago

Can you also set ETH address into hodl.pcc.eth ? Currently it's empty and the primary name checks if the name points to the address you are trying to set primary name for.

Screenshot 2022-06-17 at 11 38 25
hodlthedoor commented 2 years ago

The ETH address is set. Is the issue that the event is not emitted? So ENS-app is not picking it up.

If you check using Metamask then you can see that hodl.pcc.eth correctly resolves.

Sent from Mail for Windows

From: Makoto Inoue Sent: 17 June 2022 11:40 To: ensdomains/ens-app Cc: hodlthedoor; Author Subject: Re: [ensdomains/ens-app] Primary name cannot be set through ens-appfor a sub-domain with custom resolver (Issue #1529)

Can you also set ETH address into hodl.pcc.eth ? Currently it's empty and the primary name checks if the name points to the address you are trying to set primary name for.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

makoto commented 2 years ago

oh I see. so this is the custom resolver you made by yourself. I can see text record because your resolver contract has setText that emits emit TextChanged(node, key, key);. Do you have setAddr equivalent that emit AddrChanged ?

The address page is fetching the list of available domain to set primary name from this subgraph query https://github.com/ensdomains/ens-app/blob/dev/src/graphql/queries.js#L152 and resolvedAddress is updated at registry. NewResolverEvent and resolver.AddrChangedEvent so your custom resolver has emit these event accordingly for the graph indexer to pick up

hodlthedoor commented 2 years ago

No, I was unable to add the address changed event, because this can be triggered from the NFT contract that the resolver links to and the NFT contract was written many months before.

I understand what the issue is now though so you can close this if you like. We have a workaround for setting the primary address.

Regards,

Sent from Mail for Windows

From: Makoto Inoue Sent: 17 June 2022 12:08 To: ensdomains/ens-app Cc: hodlthedoor; Author Subject: Re: [ensdomains/ens-app] Primary name cannot be set through ens-appfor a sub-domain with custom resolver (Issue #1529)

oh I see. so this is the custom resolver you made by yourself. I can see text record because your resolver contract has setText that emits emit TextChanged(node, key, key);. Do you have setAddr equivalent that emit AddrChanged ? The address page is fetching the list of available domain to set primary name from this subgraph query https://github.com/ensdomains/ens-app/blob/dev/src/graphql/queries.js#L152 and resolvedAddress is updated at registry. NewResolverEvent and resolver.AddrChangedEvent so your custom resolver has emit these event accordingly for the graph indexer to pick up — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>