> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Auto-routing deposits to any chain

> Give a user a single deterministic EVM address that auto-routes any USDC sent to it to a Solana wallet (or any supported destination).

This recipe gives a user one permanent address that auto-routes any USDC sent to it to a destination on a different chain. The sender makes a normal ERC-20 transfer. No bridge UI, no signature, no contract call.

## When to use

* Exchanges adding Solana withdrawal support
* Wallets giving users a "deposit anywhere, land on Solana" address
* Any flow where the funder is not the user (sweeping, payroll, partner deposits)

## 1. Generate a deposit address

```bash theme={null}
curl -X POST https://deposit-addresses.eco.com/api/v1/depositAddresses/solana \
  -H "Content-Type: application/json" \
  -d '{
    "chainId": 8453,
    "solanaAddress": "YOUR_SOLANA_ADDRESS",
    "depositor": "YOUR_EVM_ADDRESS"
  }'
```

Response:

```json theme={null}
{
  "data": {
    "evmDepositAddress": "0x...",
    "isDeployed": false
  }
}
```

The `evmDepositAddress` is deterministic: same inputs always return the same address. You can show it to the user before any contract is deployed.

## 2. Send USDC to the address

The user (or any third party) makes a vanilla ERC-20 `transfer()` to `evmDepositAddress` on Base:

```typescript theme={null}
import { createWalletClient, http, parseUnits, erc20Abi } from 'viem';
import { base } from 'viem/chains';

const walletClient = createWalletClient({ chain: base, transport: http() });

await walletClient.writeContract({
  address: BASE_USDC,
  abi: erc20Abi,
  functionName: 'transfer',
  args: [evmDepositAddress, parseUnits('100', 6)],
});
```

## 3. The address auto-routes

On first deposit, the contract deploys (the deposit address pays gas, not the sender). The contract calls `createIntent()`, which publishes a Routes intent. Solvers compete to fulfill on Solana.

## 4. Confirm delivery

Poll the deposit address record to check `isDeployed` and `lastCheckedBalance`:

```bash theme={null}
curl https://deposit-addresses.eco.com/api/v1/depositAddresses/evmAddress/0x...
```

See the [Solana Deposit Addresses API](/api-reference/programmable-addresses/solana-overview) for the full deposit-address endpoint reference.

You've successfully created an auto-routing deposit address.
