# Send tokens across zones

Move tokens from one Zone to another without changing the asset. This example sends `OUSD` test tokens between **Zone A** and **Zone B**, two Zones on Tempo Testnet. The transfer settles through the public chain before Zone B credits the balance.

The flow uses `swapAndDepositRouter` on the public chain in same-token mode: withdraw from `Zone A`, skip the swap because the asset stays as `OUSD`, then deposit that `OUSD` into `Zone B`.

Zone A withdraws OUSD to a public router, which skips the swap and deposits OUSD into the Zone B portal. Zone B imports the deposit and credits its private balance later.

<a id="sending-pathusd-from-zone-a-into-zone-b" />

## Sending OUSD from Zone A into Zone B

By the end of this guide you will have sent **25 OUSD** from **Zone A** into **Zone B** and confirmed the routed deposit.

**Interactive demo: Send tokens across zones**

1. Send tokens across zones

## Code example

This snippet assumes you already have a signed-in `rootClient` on the public chain plus `zoneAClient`, and the shared token, router, and portal constants used throughout the zone guides.

The callback encoding below is specific to the legacy testnet router. Current routers require an encrypted deposit payload and a Tempo refund recipient. See the [testnet compatibility notes](https://tempo.xyz/developers/docs/guide/private-zones#testnet-compatibility) before adapting this route to another deployment.

It shows the core routed send submission path; use the demo above when you want to watch the routed deposit settle into Zone B.

```ts
import { encodeAbiParameters, parseUnits } from 'viem'
import { Actions } from 'viem/tempo'

const transferAmount = parseUnits('25', 6)

await zoneAClient.zone.signAuthorizationToken()

const callbackData = encodeAbiParameters(
  [
    { type: 'bool' },
    { type: 'address' },
    { type: 'address' },
    { type: 'address' },
    { type: 'bytes32' },
    { type: 'uint128' },
  ],
  [false, ousd, ZONE_B.portalAddress, rootClient.account.address, zeroBytes32, 0n],
)

const { receipt } = await Actions.zone.requestWithdrawalSync(zoneAClient, {
  account: rootClient.account,
  amount: transferAmount,
  data: callbackData,
  feeToken: ousd,
  fallbackRecipient: rootClient.account.address,
  gas: routerCallbackGasLimit,
  to: swapAndDepositRouter,
  token: ousd,
})

console.log(receipt.blockNumber)
```

## What this routed send does

The cross-zone transfer path looks like this: the token leaves `Zone A`, briefly lands on the public chain, and is deposited back into `Zone B` as the same asset.

1. Withdraws `OUSD` from `Zone A` through `ZoneOutbox`.
2. Routes that withdrawal to `swapAndDepositRouter` on Tempo.
3. Skips the DEX swap because the input and output token are both `OUSD`.
4. Deposits the routed `OUSD` into `Zone B` through `ZonePortal`.

The target deposit still pays the normal portal deposit fee, so the amount that arrives in `Zone B` is the routed `OUSD` minus that fee.

:::warning
If the routed withdrawal fails on Tempo—for example because the callback reverts or the target deposit cannot be completed—the amount is bounced back to the withdrawal's `fallbackRecipient` inside `Zone A`. The fee is still paid to the sequencer.
:::
