Transfer Tokens
Thexyz token transfer command sends CW20 tokens from your account to another address.
Usage
Arguments
Flags
Examples
Basic Transfer
Transfer All Tokens
First check your balance:Dry Run
Output
Successful transfer:Verify Transfer
Check balances after transfer:Amount Calculation
Amount is in the token’s smallest unit. For 6 decimals:
Example: Send 10 tokens:
Batch Transfers
Sequential
Script
Error Handling
Check Balance Before Transfer
Under the Hood
xyz token transfer executes a MsgExecuteContract:
Transfer vs Send
CW20 has two transfer methods:
The
xyz token transfer command uses transfer. For contract interactions, use xyz program execute.
Troubleshooting
Insufficient balance
Insufficient balance
Check your current balance:You can only transfer what you have.
Invalid recipient
Invalid recipient
Ensure the address:
- Starts with
xyz1 - Is the correct length
- Has valid checksum
Transaction timeout
Transaction timeout
The node may be slow. Check status:Retry the transfer if needed.