Skip to main content

Documentation Index

Fetch the complete documentation index at: https://eco.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

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

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:
{
  "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:
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:
curl https://deposit-addresses.eco.com/api/v1/depositAddresses/evmAddress/0x...
See the Solana Deposit Addresses API for the full deposit-address endpoint reference. You’ve successfully created an auto-routing deposit address.