Overview
Solana to EVM swaps differ from EVM-to-EVM swaps:- Orders must be announced to the relayer using
announceOrder() - Orders must be published on-chain using Solana transactions
- Address formats use
SolanaAddressfor Solana andEvmAddressfor EVM chains - Native Solana tokens use
SolanaAddress.NATIVE
Prerequisites
- Solana wallet with sufficient SOL for transaction fees
- Sufficient token balance for the swap
- Dev Portal API key from portal.1inch.dev
Complete Example
This example swaps 10 USDT from Solana to USDT on Ethereum.Initialize SDK and Addresses
Configure the SDK and set up token addresses.
For native SOL, use
EvmAddress.NATIVE as the token address.Announce Order to Relayer
First, announce the order to the 1inch relayer network.This registers your order with the relayer before publishing on-chain.
Key Differences from EVM
Order Announcement
Order Announcement
Solana orders require calling
sdk.announceOrder() instead of sdk.submitOrder(). This registers the order with the relayer before on-chain publication.On-Chain Publishing
On-Chain Publishing
After announcement, Solana orders must be published on-chain using EVM orders are automatically published when submitted to the relayer.
SvmSrcEscrowFactory:Address Types
Address Types
Use proper address types for each chain:
Transaction Handling
Transaction Handling
Solana requires building and sending transactions manually:
Error Handling
Best Practices
Wait for Confirmation
Always wait for Solana transaction confirmation before sharing secrets.
Check Token Accounts
Verify token accounts exist before attempting swaps.
Use Recommended Preset
Use
quote.recommendedPreset for optimal execution.Track Shared Secrets
Maintain a set of shared secret indices to avoid duplicates.
Next Steps
EVM to Solana
Learn about swaps from EVM to Solana
Order Lifecycle
Understand order states and transitions