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 request: add --token option to cast balance #6813

Closed
fenghaojiang opened this issue Jan 16, 2024 · 3 comments · Fixed by #6828
Closed

feature request: add --token option to cast balance #6813

fenghaojiang opened this issue Jan 16, 2024 · 3 comments · Fixed by #6828
Labels
T-feature Type: feature

Comments

@fenghaojiang
Copy link
Contributor

fenghaojiang commented Jan 16, 2024

Component

Cast

Describe the feature you would like

Currently I use following ways to get erc20 / erc721 balance.

cast call [token_address] "balanceOf(address) returns uint256" --rpc-url=https://rpc.ankr.com/eth

Every time I spend some time to write the method sig params.
IMHO, as erc20 / erc721 become standard and become some common sense rules, I want to make a short cut to get erc20 / erc721 balance.

Like:

c

And I would like to implement it.

Additional context

No response

@fenghaojiang fenghaojiang added the T-feature Type: feature label Jan 16, 2024
@gakonst gakonst added this to Foundry Jan 16, 2024
@github-project-automation github-project-automation bot moved this to Todo in Foundry Jan 16, 2024
@fenghaojiang fenghaojiang changed the title feature request: add --token to cast balance feature request: add --token option to cast balance Jan 16, 2024
@Evalir
Copy link
Member

Evalir commented Jan 16, 2024

@fenghaojiang feel free to go for it! cc @mds1 for ux

@mds1
Copy link
Collaborator

mds1 commented Jan 16, 2024

The proposed UX of cast balance --token <address> lgtm!

@gakonst
Copy link
Member

gakonst commented Jan 18, 2024

supportive

@github-project-automation github-project-automation bot moved this from Todo to Done in Foundry Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-feature Type: feature
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants