Optimal route between two tokens
Calculates optimal transaction with the best route between two tokens, which may involve several actions that interact with various DeFi protocols. This single call already quotes internally and returns executable calldata along with amountOut and gas, so there is no separate quote step to call beforehand.
Body
Route a cross-chain request through an intent address on the destination chain. The bridge delivers to that address, then a keeper runs the destination route and sends tokenOut to the receiver. When omitted, intents are used if both chains support them. Set to false to use a bridge callback instead. Ignored for same-chain routes.
A list of swap aggregators to be ignored from consideration
0x, 1inch, openocean, kyberswap, native, paraswap, bebop, barter, sushiswap-router, ooga-booga, renegade, uniswap, rooster, wowmax, grapher, hyperbloom, hyperswap, hyperflow, fly, eisen, nordstern, everlong, bitget, akka Controls cross-chain route complexity. direct uses only a bridge, source allows routing before the bridge, destination allows routing after the bridge, sourceOrDestination allows routing on either chain but not both, and full allows routing on both chains
direct, source, destination, sourceOrDestination, full Latency/quality trade-off for pathfinding and aggregator querying. light returns fastest over a reduced search space (short aggregator wait with early return once two usable quotes arrive, fewer candidate paths, no destination-side bridge routing), medium waits the full short window over the full search space, high is the default balanced behavior, and max queries all aggregators in parallel with an extended wait for best execution (higher CU cost)
light, medium, high, max 