Actions6
- Wallet Actions
- Transaction Actions
Wallet → Get Token Balance
AI-generatedSummary
Retrieve the ERC20 token balance for a specified wallet address on an Ethereum-compatible network.
Inputs
- Token Contract Address (required) — The ERC20 token contract address to query balance from.
- Wallet Address — The wallet address to check token balance. If left empty, uses the address from the node's credentials (private key).
Output shape
a JSON object containing walletAddress, tokenAddress, tokenName, tokenSymbol, tokenDecimals, balance (formatted), balanceRaw (in raw token units), and network fields.
Returns one object per input item. Throws error if token or wallet address is invalid or if contract call fails. Uses ethers.js to call standard ERC20 balanceOf, decimals, symbol, and name methods.
Examples
Example 1: Get token balance for default wallet from credentials for a known ERC20 contract address.
Set Token Contract Address to the desired token's contract address. Leave Wallet Address empty.