๐น 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