Call the Route API with destinationChainId and set tokenOut to the destination-chain address of the same asset the user is sending. Review the quote: a candidate that delivers tokenOut directly can stay a plain bridge transfer, without destination execution.
Definition
A same-asset bridge moves a token from one chain to the same token on another chain. It is still a cross-chain route, but tokenOut is not a different destination asset or vault. Each chain still has its own token address.
How it works
Set
tokenInto the source-chain token andtokenOutto that asset’s destination-chain address, not the source address reused.Include
receiver, slippage orminAmountOut(not both, and follow Solana rules when Solana is the destination), andrefundReceiverwhen you need it.Review the
routehops. If the path is a direct delivery oftokenOut, you should not expect a destination swap.If the user actually wants a different destination token, change
tokenOut— that becomes a bridge-and-swap.Submit
txand poll status until delivery is complete. The user still does not sign on the destination chain.
How Enso does this
POST https://api.enso.build/api/v1/shortcuts/route. Crosschain Routing notes that a candidate whose bridge delivers tokenOut directly stays a plain bridge transfer. Use Bundle only if you must specify the provider or a callback.
FAQ
Can I pass the same contract address for tokenIn and tokenOut?
Only if that address is actually valid on both chains, which is unusual. Use the destination-chain token address for tokenOut.
Will Enso still swap if I wanted a same-asset transfer?
Set tokenOut correctly and review the returned route. If the quote includes unexpected hops, do not submit it; adjust the request or use Bundle when you need a fixed path.
Related articles
How do I bridge and swap in one flow?
How do I add cross-chain swaps to my app?
How do I tell which bridge a Route response selected?
What is a destinationChainId?
Cross-chain routing vs a simple token bridge
