xflows_build_transaction
Build cross-chain swap transactions using XFlows, detailing source and destination chains, tokens, amounts, and recipient addresses.
Instructions
Build cross-chain swap transaction using XFlows (section 5)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"fromChainId": "<fromChainId>",
"toChainId": "<toChainId>",
"fromTokenAddress": "<fromTokenAddress>",
"toTokenAddress": "<toTokenAddress>",
"fromAddress": "<fromAddress>",
"toAddress": "<toAddress>",
"fromAmount": "<fromAmount>"
},
"name": "xflows_build_transaction"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dex | No | DEX to use for swaps | |
| bridge | No | Bridge to use | wanbridge |
| slippage | No | Slippage tolerance (e.g., 0.01 for 1%) | |
| toAddress | Yes | Recipient wallet address | |
| toChainId | Yes | Destination chain ID | |
| fromAmount | Yes | Amount to swap/bridge | |
| fromAddress | Yes | Sender wallet address | |
| fromChainId | Yes | Source chain ID (e.g., 100010 for VeChain testnet) | |
| toTokenAddress | Yes | Destination token contract address | |
| fromTokenAddress | Yes | Source token contract address |