🔹 3. Token Transfer
💬 User Command
“Send 50 MYT to 0xabc123...”
🧠 How the Bot Interprets This
Intent Detected:
transfer_tokensParameters Parsed:
Token:
MYTAmount:
50Recipient:
0xabc123...
⚙️ Execution Flow
Token Address Resolution
As with balance queries, the bot maps
MYTto the correct ERC-20 contract address.
Wallet Connection
The user is prompted to connect a wallet if not already done.
Transaction Preparation
Bot prepares a
transfer(address recipient, uint256 amount)transaction:Amount is converted to Wei (
50 * 10^18)Gas is estimated
Nonce is calculated
Confirmation Prompt
The bot asks the user to confirm:
“You’re about to send 50 MYT to 0xabc123.... Proceed?”
Transaction Execution
Upon confirmation and wallet signature, the transaction is sent to the network.
Bot listens for the transaction hash and block confirmation.
Response to User
Bot replies with:
✅ “Transfer successful!”
Transaction Hash: 0x...Optionally: updated balance
🔒 Security and Error Handling
If the user doesn’t have sufficient balance, gas fees, or tries to transfer to an invalid address, the bot detects and prevents execution.
All signing is done client-side in the user’s wallet.
Last updated