πΉ 2. Token Balance Queries
π¬ User Command
βWhatβs my balance of MYT tokens?β
π§ How the Bot Interprets This
Intent Detected:
check_token_balanceParameters Needed:
Token symbol or contract address
User wallet address (can be derived from wallet connection)
βοΈ Execution Flow
Token Identification
The bot uses a local or on-chain index (if available) to map token symbol (
MYT) to a known contract address.If itβs a custom token deployed via Dialect AI, the bot already knows the contract location.
Wallet Connection
If not already connected, the bot will prompt the user to connect their wallet.
Read Token Balance
The bot calls the
balanceOf(address)function using the contractβs ABI viaethers.js.
Response to User
The bot calculates the balance (converted from Wei to readable token units, e.g., 1.00 MYT) and replies:
βYour current balance of MYT is: 10,000.00 MYTβ
π§ Additional Features (Planned)
Batch balance queries
Fiat value estimates
Holdings across multiple wallets
Last updated