Skip to main content

Transfer Tokens

The xyz 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:
Then transfer:

Dry Run

Output:

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

Check your current balance:
You can only transfer what you have.
Ensure the address:
  • Starts with xyz1
  • Is the correct length
  • Has valid checksum
The node may be slow. Check status:
Retry the transfer if needed.