Simulate an unsigned swap transaction
simulate_swap_txDry-runs the UNSIGNED transaction returned by build_swap_tx on the MultiversX gateway (checkSignature=false). The transaction is re-verified first and refused unless it is exactly what build_swap_tx produces (receiver, function, token, amount, minOut, chainID, gas caps). Returns status, estimated gas, a failure reason, and the expected received amount. Simulation does not guarantee execution.
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": {
"transaction": "<transaction>",
"minOut": "<minOut>"
},
"name": "simulate_swap_tx"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| minOut | Yes | Required: minOut.raw from build_swap_tx (the minimum you accepted) | |
| network | No | MultiversX network (default mainnet; devnet only if configured) | mainnet |
| tokenIn | No | Optional check: data.tokenIn.id from build_swap_tx | |
| amountIn | No | Optional check: amountIn.decimal from build_swap_tx | |
| tokenOut | No | Optional check: data.tokenOut.id from build_swap_tx | |
| transaction | Yes | The `transaction` object from build_swap_tx, unchanged |