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

feat: example for cast balance --erc20 #1128

Merged
merged 1 commit into from
Feb 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/reference/cast/cast-balance.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ The argument *who* can be an ENS name or an address.
```sh
cast balance beer.eth
```
2. Get the ERC20 balance of any address using RPC URL
```sh
# To load the variables in the .env file
source .env

# To get the USDT balance of Binance
cast balance --erc20 0xdAC17F958D2ee523a2206206994597C13D831ec7 0xF977814e90dA44bFA03b6295A0616a897441aceC --rpc-url $MAINNET_RPC_URL
```

### SEE ALSO

Expand Down
Loading