execute_token_swap
Swap tokens across multiple blockchain networks using specified token addresses and amounts. Supports Ethereum, Arbitrum, Polygon and other EVM chains for cross-chain trading operations.
Instructions
Execute a token swap using the Trader contract.
Args:
chain_id: Chain ID (1, 10, 56, 100, 137, 8453, 42161)
from_token_address: Address of token to swap from
to_token_address: Address of token to swap to
amount_wei: Amount to swap in wei format
Returns:
JSON string with swap transaction details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain_id | Yes | ||
| from_token_address | Yes | ||
| to_token_address | Yes | ||
| amount_wei | Yes |
Input Schema (JSON Schema)
{
"properties": {
"amount_wei": {
"title": "Amount Wei",
"type": "string"
},
"chain_id": {
"title": "Chain Id",
"type": "string"
},
"from_token_address": {
"title": "From Token Address",
"type": "string"
},
"to_token_address": {
"title": "To Token Address",
"type": "string"
}
},
"required": [
"chain_id",
"from_token_address",
"to_token_address",
"amount_wei"
],
"type": "object"
}