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

fix(ens): don't resolve addr if doesn't contain . #9635

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

9547
Copy link
Contributor

@9547 9547 commented Jan 7, 2025

Motivation

When I'm querying the balance of my account, but by mistake missing the last char, the cast return as below:

cast balance  0xFacbDEcF714f55d65ABF5be2054a8127880405c`missing one char`
Error: Failed to get resolver from the ENS registry: buffer overrun while deserializing

this error seems a little misleading, so let's check if the address contains a . or not, then to resolve the ens.

Solution

@grandizzy
Copy link
Collaborator

I think this makes sense, there's a test failing

StorageArgs::parse_from(["foundry-cli", "addr", "--etherscan-api-key", "dummykey"]);
you may want to change addr to something like addr.eth

@DaniPopes DaniPopes merged commit d2dbe3e into foundry-rs:master Jan 7, 2025
22 checks passed
@9547 9547 deleted the check-ens branch January 8, 2025 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants