In this tutorial you will swap USDC on Base for ETH on Arbitrum in a single intent. Warp handles the bridge and swap automatically — one signature, one operation, one confirmation. By the end you will have a working end-to-end implementation you can adapt for any crosschain swap.Documentation Index
Fetch the complete documentation index at: https://docs.rhinestone.dev/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A Rhinestone API key (request one here)
- An EOA with USDC on Base (or another supported chain and token)
- A viem
WalletClientconfigured for signing
Setup
Steps
Get a quote
Request a quote for swapping USDC on Base into ETH on Arbitrum. Specify the destination chain, the token you want, and the amount:Because the source token (USDC on Base) differs from the destination token (ETH on Arbitrum),
accountAccessList constrains which tokens on which chains the router can spend.
Without it, the API may route through multiple chains and tokens (including wrapped ETH),
which can lead to unexpected gas requirements. Specify the exact source token(s) you want to use.cost.input and cost.output show different tokens. This is how you know Warp is routing through a swap.Approve token spending
Check
tokenRequirements for any approvals needed. For a USDC source, you will typically need a Permit2 approval:This approves to the Permit2 contract. Once approved, future intents spending the same token on the same chain will not need another approval.
Sign the intent
Forward
signData.origin[] and signData.destination directly to your wallet. One signature per source chain, plus the destination signature.Signing guide
Smart account signing and validator wrapping.
Submit the intent
Post the signed intent to If the submit returns 404, the quote TTL elapsed — re-quote and re-sign.
/intents using the intentId from the quote:Next steps
Sponsor fees
Cover bridge and swap fees for your users using
sponsorSettings.Execute crosschain calls
Add destination chain executions to your intent — deposit into a vault, buy an NFT, and more.