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

[Feature] Make ethereum.getBalance ENS aware #5315

Open
1 of 2 tasks
alex-pakalniskis opened this issue Mar 29, 2024 · 1 comment
Open
1 of 2 tasks

[Feature] Make ethereum.getBalance ENS aware #5315

alex-pakalniskis opened this issue Mar 29, 2024 · 1 comment

Comments

@alex-pakalniskis
Copy link

Description

Developers using ethereum.getBalance() might want to reference ENS (or other) in addition to addresses

let balance = ethereum.getBalance(
    Address.fromString("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")
);

or

let balance = ethereum.getBalance(
    Address.fromString("vitalik.eth")
);

Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.

No response

Some information to help us out

  • Tick this box if you plan on implementing this feature yourself.
  • I have searched the issue tracker to make sure this issue is not a duplicate.
@nishim3
Copy link

nishim3 commented May 11, 2024

I would like to work on this change. Just for clarity, should this change the Address.fromString() method, or only in the ethereum.getBalance() function? In my opinion, I think we should go with the Address.fromString() method. Other functions like ethereum.call() or ethereum.hasCode() might also want to use ens resolvers. Also, a direct type conversion from string to H160 of "vitalik.eth" will lead to problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants