router_address on the quote; deposits that swap go to the router returned by GetSwapInstructions.
Choosing the call
direct_transfer: true, the depositToken row has a cheaper alternative: a plain ERC-20 transfer to the escrow with the quote hash appended to the calldata. See Direct transfer.
A quote requested with gasless: true takes none of these paths: the user signs a permit2 authorization instead of sending a transaction, and the operator relays the deposit. See SubmitGaslessOrder.
Native deposits
No approval, no allowance check. The amount rides as transaction value.Token deposits
The router pulls the tokens, so it needs an allowance first. Check before prompting: a user who already approved should not be asked twice.1
Check allowance
2
Approve if short
Approve at least
expected_amount_in. Wait for the approval to confirm before the deposit; sending both in one block fails on most RPCs.3
Deposit
Permit
Tokens supporting EIP-2612 can skip the approval transaction entirely by signing instead. The catalog marks them withpermit: true. The permit variants live on the router contract (router from GetChains), which forwards the funds into the escrow, so the permit’s spender and the transaction target are the router.
permitValue is the value the permit was signed for, passed to the token unchanged; any other number fails the signature check. Sign the permit for amount, the amount the deposit pulls, not for an unlimited allowance. The permit is attempted and its failure swallowed, so a permit that was already consumed does not break the deposit, but the transfer still needs the allowance to exist by then, from either the permit or a prior approval.
depositTokenWithPermit2 is the equivalent for wallets with a standing permit2 allowance: a SignatureTransfer signature replaces the approval, and any ERC-20 works, not just EIP-2612 tokens.
Direct transfer
When the quote carriesdirect_transfer: true, the whole deposit collapses into a single ERC-20 transfer to the vault, with the 32-byte quote hash appended after the calldata. No approval, no router call, and the cheapest gas of any path. The flag is only set on cross-chain quotes where src_token equals lock_token on a chain that supports it.
expected_amount_in, with the quote hash as the trailing 32 bytes. A transfer routed through a contract wallet or batching layer hides the calldata and the deposit will not be attributed. The SDK uses this path automatically when the quote allows it.
Deposits that swap first
When the source token is not the asset that bridges, the router swaps through an allowlisted aggregator inside the deposit transaction. The calldata comes fromGetSwapInstructions, keyed by quote hash.
depositWithSwapAndPermit takes the same arguments plus the permit parameters (permitValue, deadline, v, r, s), with the permit signed for amountIn.
With the SDK
ChainAdapter resolves all of this (entry point, allowance, swap instructions, chain switching) into an ordered list of steps.
step.kind in your UI so the user knows which prompt they are signing.
After it lands
The deposit emitsDeposit and the indexer picks it up. There is nothing else to submit: no attestation, no claim, no destination transaction from the user. Move to Track an order.
Deposit exactly
expected_amount_in. A direct deposit has no tolerance: min_lock_amount equals expected_lock_amount, so a short deposit is a mismatched deposit and is refunded. A deposit above expected_amount_in is filled at expected_amount_out. On a source swap the router enforces min_lock_amount inside the deposit transaction, and a swap output between it and expected_lock_amount is filled with the payout scaled down in proportion; see Slippage.