10. Bring users and funds from other chains
Bring users and their funds to your Rome app from other chains and from Solana, with the bridge, its API and the CLI, and keep your app's screen live.
Your app works for both wallet types. Now people need a way to arrive. Most of them hold USDC on another chain or on Solana, and they should not have to learn Rome first. This lesson uses the Rome Bridge API to bring USDC in from a supported chain, track the transfer, and let users take funds back out, while your app stays current. 2. What you can build shows where this fits.
What you'll learn
How a user on another chain reaches your Rome app without leaving home.
How a user's USDC reaches Rome from an EVM chain and from Solana.
Why a transfer lands as gas or as wUSDC, and how to choose.
The four steps of an inbound transfer.
Why leaving Rome has more steps than arriving.
How to show live state in your app and check a transfer in the explorer.
Before you start
Finish 9. Build a dual-lane app. You need the vault, or any app you want users to reach.
Have the Rome CLI installed (Rome CLI + MCP).
Have test USDC on a source chain and the source chain's native token for its fee, from Faucets.
The lesson
Step 1. Understand the two ways in
With the Rome Bridge, your users come from one of two places. An EVM chain sends USDC over Circle's CCTP. A Solana wallet sends SOL or USDC over plain SPL transfers. Either way, the bridge is on-chain and settles under the user's own signature. The off-chain Bridge API quotes the route, checks the source transaction and sponsors the settle fee. It holds no funds and no keys, so it can only trigger what the user already signed.
The supported chains and assets differ between the testnet and the mainnet, so read the lists instead of assuming. They are on Rome Bridge, and the live list is the API's /v1/routes. The pattern of reaching your app from a user's home chain is in From home.
Step 2. Decide gas or wUSDC
USDC that arrives through the bridge lands as gas by default. Gas is what a MetaMask user pays fees with. The token your vault takes is wUSDC. Those are two forms of the same USDC, and the user can convert one into the other.
Set the intent in the quote. An app that takes wUSDC, like your vault, wants users to arrive as wUSDC. A user who arrives as gas wraps some of it first, as in lesson 9. A user who plans to leave again needs wUSDC, because bridging out burns wUSDC, not gas. They can arrive as wUSDC or wrap some gas later with withdraw_to_ata.
Step 3. Run an inbound transfer
An inbound transfer takes four steps. The SDK's /bridge subpath wraps the API calls as requestQuote, registerTransfer, getTransfer and reportStep. Its registerTransfer (v0.4.0) still posts the whole quote, which the live API refuses, so register with the quoteId yourself, as the Rome CLI does.
Quote the route. Send the source chain, asset, amount, sender and recipient. Chains go in as CAIP-2 ids, and amounts are base-unit integers in strings.
The user signs the transactions of the first step, in order, exactly as returned. For a CCTP transfer that is the USDC approval and the burn. On the gas route the user also signs one EIP-712 settle authorization, after you fill in the burn hash.
Register the transfer. Send the quote's
quoteIdand the burn hash asstep1TxHashtoPOST /v1/transferswithin 15 minutes of the quote. On the gas route, add the settle signature asuserSettleSig. The API checks that the transaction matches the stored quote and returns a transfer id.Poll the transfer until
outcomeiscomplete, and handlefailedandexpired. A complete transfer can carry adegradationnote, so check it before you tell the user the gas or wUSDC arrived.
Solana arrivals follow the same shape with different steps. The user sends an SPL transfer to their Rome account. With the gas intent, USDC on a chain whose gas token is USDC needs one more transaction from the user to turn the wrapper into gas. The quote lists every signature a route needs. Request and response shapes: From home.
Step 4. Run it from the CLI first
Before you write any bridge code, run the flow with the CLI. rome fund brings USDC in as gas, rome bridge takes an intent of gas or wrapper, and rome verify --path from-home proves a full round trip: bridge in, act on Rome, bridge out. This gives you a working reference to compare your integration against. Commands and flags: Rome CLI + MCP.
Step 5. Handle the way out
Bridging out is not the inbound flow in reverse. For USDC over CCTP, the user signs two steps. Step 1 is two Rome transactions: a grant that lets the bridge contract move the exact amount of this burn, then the burn. Register the transfer with the burn hash. Step 2 is the claim. When the transfer's step 2 reads ready, it carries the message and attestation, and the user calls receiveMessage with them on the destination chain. Nothing in the claim is sponsored, so the user needs gas there. Report the claim hash to the API (reportStep in the SDK). Calls and shapes: Take assets back out.
Withdrawing to a Solana address has no claim step. For USDC it is one Rome transaction that withdraws to the user's Solana account.
The grant matters to your app. A token account has one delegate, so the bridge grant replaces the wrapper's grant until the user grants the wrapper again. Check isEnabled before the next deposit, as lesson 9 taught.
Step 6. Keep your app live
Rome endpoints support eth_subscribe for newHeads and logs, on the same host as the HTTPS RPC. With ethers, provider.on("block") and contract.on(event) work as they do anywhere. With viem, the webSocket transport drops Rome's numeric subscription ids, so pass poll: true to watchBlocks and watchEvent, or use ethers for push updates. newPendingTransactions never emits, because Rome has no public mempool. Code: WebSocket Subscriptions.
When you read history, bound every eth_getLogs call by block range. Rome's RPC rejects a range wider than about 12,000 blocks. For a transaction that touches Solana, Via's "Settled in" row links the Solana transaction that settled it, and the Solana explorer shows its instructions and compute units. That is how you answer a user who asks where their transfer is. See Via and JSON-RPC Support.
Solgate: Solana assets and AggLayer EVM chains
On testnet, Solgate connects Solana assets to AggLayer EVM chains in both directions, and carries messages between contracts. USDC uses CCTP. The steps above use the Rome Bridge API.
To move other tokens or send messages, read 13. Build on Solgate.
Check yourself
Bring one real transfer through and observe it.
Fund a fresh Hadrian wallet with some gas USDC, then bring more USDC in with
rome bridgeand the wrapper intent. Keep enough gas for approvals, vault calls and the outbound burn.Read the wallet's wUSDC balance on Hadrian, for example with
rome callon the wrapper'sbalanceOf. With the wrapper intent, the arrival is the bridge's Solana transaction (Circle's receive message), not a Rome transaction, so do not expect an arrival transaction in the Hadrian explorer.Repeat the transfer through the API: quote, sign, register, then poll
GET /v1/transfers/{id}untiloutcomereadscomplete.Run
rome verify hadrian --path from-homewith--from(your source chain) and--amount(a small amount, such as 0.2), then read the result. It takes about 20 minutes.
Then answer:
Which balance does an outbound USDC burn spend, and how can a user get it?
Who pays for the claim on the destination chain?
Next
Last updated
Was this helpful?