Bridge USDT0 from Solana to Plasma in a single transaction using LayerZero multihop compose. The transfer routes through Arbitrum as the hub chain.
Solana --[LayerZero]--> Arbitrum (MultiHopComposer) --[LayerZero]--> Plasma
# Install dependencies
pnpm install
# Configure your settings in index.ts (recipient, amount, private key)
# Or set SOLANA_PRIVATE_KEY in a .env file
# Run
pnpm startEdit USER_CONFIG in index.ts:
| Setting | Description |
|---|---|
privateKey |
Solana private key (base58 or JSON array). Can use SOLANA_PRIVATE_KEY env var |
recipient |
EVM destination address on Plasma (0x...) |
amount |
USDT amount to bridge (e.g., 1.5 = $1.50) |
dstEid |
LayerZero endpoint ID for final destination (default: 30383 for Plasma) |
- USDT0 tokens in your Solana wallet
- ~0.01 SOL for LayerZero fees (covers both hops) + transaction costs
- Quote hop fee - Calls
quoteSendon the Arbitrum OFT contract to get the fee for the second hop (Arbitrum → Plasma) - Build compose message - ABI-encodes the hop chain
SendParams(destination, recipient, amount, options) as the compose message - Build executor options - Creates TYPE_3 options with
addExecutorComposeOptionthat includes enough gas and native ETH to pay for the second hop on Arbitrum - Quote Solana fee - Simulates the full transaction on Solana to get the total LayerZero fee (with 3x safety margin to cover both hops)
- Send - Executes the Solana transaction, which sends to the MultiHopComposer contract on Arbitrum
- Auto-forward - The MultiHopComposer on Arbitrum receives the compose callback, decodes the
SendParams, and automatically sends the tokens to Plasma
| Contract | Address |
|---|---|
| Arbitrum OFT Proxy | 0x14e4a1b13bf7f943c8ff7c51fb60fa964a298d92 |
| Arbitrum MultiHopComposer | 0x759BA420bF1ded1765F18C2DC3Fc57A1964A2Ad1 |
| Solana OFT Program | Fuww9mfc8ntAwxPUzFia7VJFAdvLppyZwhPJoXySZXf7 |