How execution works
- The solver supplies the tokens listed in
route.tokensand the required native amount. - The destination Portal transfers those tokens to its Executor.
- The Executor runs
route.callsin array order.
target address, ABI-encoded data, and a native-token value. The target sees the Executor as msg.sender, so set beneficiaries and recipients explicitly where the target contract requires them.
If a call reverts, the destination fulfillment transaction reverts. Source-chain funding remains a separate transaction; a failed destination call does not immediately refund the source vault.
Common patterns
Simulate the complete fulfillment with the required assets and estimate gas before submitting it. Ensure calls consume or transfer their intended balances; the Executor does not automatically sweep residual ERC-20 tokens.
Constraints
- Calls run sequentially within one destination-chain transaction.
- A target with no contract code rejects nonempty calldata.
- The Executor checks whether a call reverted; it does not interpret the returned bytes as a success flag or validate an arbitrary call’s business outcome.
- Available API routes and direct contract capabilities are different surfaces. Use the returned quote to determine what the API will execute.
