Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cast lookup-address and resolve-name fail on names with unicode characters #5386

Closed
2 tasks done
emo-eth opened this issue Jul 13, 2023 · 8 comments
Closed
2 tasks done
Assignees
Labels
C-cast Command: cast first issue A good way to start contributing T-bug Type: bug

Comments

@emo-eth
Copy link
Contributor

emo-eth commented Jul 13, 2023

Component

Cast

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (e488e2b 2023-07-10T15:17:42.605282000Z)

What command(s) is the bug in?

cast lookup-address, cast resolve-name

Operating System

macOS (Apple Silicon)

Describe the bug

ENS names without unicode characters resolve correctly in both directions

❯ cast resolve-name emo.eth
0x28679A1a632125fbBf7A68d850E50623194A709E
❯ cast lookup-address 0x28679A1a632125fbBf7A68d850E50623194A709E
emo.eth

ENS names with unicode characters result in errors – although, interestingly, lookup-address fails by saying it couldn't look up the correctly resolved name.

❯ cast lookup-address 0x00000000000061aD8EE190710508A818aE5325C3
Error:
ens name not found: ret↩️rn.eth
❯ cast resolve-name ret↩️rn.eth
Error:
ens name not found: ret↩️rn.eth
❯ cast resolve-name 🤦<200d>♀️.eth
Error:
ens name not found: 🤦‍♀️.eth

@emo-eth emo-eth added the T-bug Type: bug label Jul 13, 2023
@gakonst gakonst added this to Foundry Jul 13, 2023
@github-project-automation github-project-automation bot moved this to Todo in Foundry Jul 13, 2023
@mattsse mattsse added first issue A good way to start contributing C-cast Command: cast labels Jul 13, 2023
@mds1
Copy link
Collaborator

mds1 commented Jul 14, 2023

Ah thanks for the issue, noticed this earlier and was wondering if the contract was misconfigured or if it was an issue with the emoji

interestingly, lookup-address fails by saying it couldn't look up the correctly resolved name.

This is because you can set the reverse record to resolve to any ENS name you want. So the proper way to do reverse lookups (address -> ENS) is to first do the reverse lookup (address -> ENS), then do a forward lookup (ENS -> address) and verify you get back the original address. So you see this error on the forward lookup step

@Sabnock01
Copy link
Contributor

Can I take this one?

@mds1
Copy link
Collaborator

mds1 commented Jul 14, 2023

@Sabnock01 assigned!

@Sabnock01
Copy link
Contributor

Sabnock01 commented Jul 14, 2023

This appears to be an error in ethers_providers since the cast commands just call the respective functions from it. Will need to fix there and then reference back here.

@Sabnock01
Copy link
Contributor

@Evalir this has been merged. Do we just bump ethers here now?

@Evalir
Copy link
Member

Evalir commented Jul 15, 2023

Yep we're bumping it on #5397 already

@Sabnock01
Copy link
Contributor

This is working for me on cast 0.2.0 (d8d9aa1 2023-07-20T00:18:13.787200434Z). @jameswenzel @Evalir either of you guys want to confirm so we can close this issue as completed?

@Evalir
Copy link
Member

Evalir commented Jul 20, 2023

Can confirm it's working! Thanks for the ping @Sabnock01 — closing

@Evalir Evalir closed this as completed Jul 20, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in Foundry Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cast Command: cast first issue A good way to start contributing T-bug Type: bug
Projects
Archived in project
Development

No branches or pull requests

5 participants