Bridge Deposits
Call the source-chain bridge contract. This is not a custody transfer to an assigned address. See Mirror Protocol Lifecycle for route selection and completion. Bridge addresses on Base and Ethereum are also listed on Contracts; still load bridge.bridgeAddress from config for the selected asset and chain.
1. Select the route
From Asset Configuration, pick a chains entry where bridge is present and bridge.allowDeposit is true. Use that exact chainName in status queries (BASE_ETH, not 8453).
Source token is
chains[].tokenAddress, notvalueChainMetadata.evmAddress.Bridge is
bridge.bridgeAddress.coinSymbolin the contract call is canonicalassetName(the same string asname=).bridge.minDepositAmountis the amount that must arrive, in human-readable asset units.RAW_AMOUNTis source-token base units. Source-chain gas is extra.receiveris the user's ValueChain EVM address, not the paying key on the source chain (unless they are the same EOA).
2. Choose toClob
toClob
Credit
true
Spot. Do not call ClobGateway depositERC20 afterward.
false
ValueChain EVM. Move into Spot or Perps later with ValueChain to Spot or Perps if needed.
If the trading account does not exist (UserNotFound), the first Spot credit must be USDC or SOSO. Do not use toClob: true with another asset as the activating deposit.
3. Submit on the source chain
ERC-20 path: approve the bridge to spend the source token, then bridge(string coinSymbol, address receiver, uint256 amount, bool toClob).
The example below is that ERC-20 path on Base (BASE_ETH, chain ID 8453). The wallet needs ETH on Base for gas. On Ethereum or Arbitrum use that chain's RPC and the same chainName in status. Set PRIVATE_KEY, COIN (assetName), TOKEN_ADDRESS, BRIDGE_ADDRESS, RECEIVER, RAW_AMOUNT, and TO_CLOB (true or false). This broadcasts an approval and a deposit.
Save as bridge-deposit.mts and run npx tsx bridge-deposit.mts.
A source-chain receipt is not ValueChain or Spot credit.
SOSO on a bridge route uses bridgeNativeToken with receiver, amount, and toClob — not the bridge ABI above. Take the source-token address from that chain's config; do not reuse another asset's call.
4. Track the deposit
Query Deposit status with the source tx hash and the same chainName:
If
chaindoes not match the record, the API returns empty, not an error.The same
txHashcan match several records with differentn. Inspect every row, includingstatus,failCode, andfailReason.Empty records or
Processingdo not confirm credit.
Reconcile the intended ledger: Spot when toClob was true, otherwise the ValueChain EVM balance (native or evmAddress). Do not send a second bridge transaction to retry a status query.
Last updated