Operations and recovery
Check an EVM execution ticket before the wallet signs
Read the wallet’s native and ERC-20 balances, verify token allowances and simulate the exact prepared ticket before submitting a transaction.
Workflow
Read the balances and the actual spender
Use walletTokenBalances with the selected network, the signing wallet and the exact ERC-20 contracts. Check the native balance for gas. Supply the same network and wallet to walletAllowances, with the spender from the reviewed route and its input token in tokens. An unavailable amount is null. Compare integer amounts in the same token’s base units. An approval for another contract cannot fund this transfer.
Simulate the saved ticket
Use the private workspace that prepared the execution. Replace the example executionId with that ticket’s UUID, then call executionPreflight. Read simulation and estimatedGas separately. The base-fee estimate excludes priority fees and any network-specific data charge. If the call reverts, inspect the result, refresh the balance, allowance and quote expiry, and correct the cause before signing.
Check the final outcome
After a successful preflight, have the authorized wallet review and sign the exact ticket. Balance, allowance, gas and liquidity can change between simulation and inclusion. Save the transaction ID, check executionStatus and, for supported swaps, read swapReceipt for the actual output and fee evidence.
Simulate a saved EVM ticket using its execution ID
curl -fsS "https://www.bitpont.com/api/v1/agent/execution/preflight" \
-H 'Content-Type: application/json' \
-H "X-Bitpont-Workspace: ${BITPONT_WORKSPACE:?Set your original workspace}" \
-d '{"executionId":"11111111-1111-4111-8111-111111111111"}'