Overview
EVM to Solana swaps combine elements of both EVM and Solana workflows:- Orders are submitted to the relayer (like EVM-to-EVM)
- No on-chain publishing required (unlike Solana-to-EVM)
- Destination uses Solana addresses
- Secret management follows the standard pattern
Prerequisites
- EVM wallet with sufficient token balance
- Token allowance approved for Limit Order Protocol
- Solana destination wallet address
- Dev Portal API key from portal.1inch.dev
Complete Example
This example swaps 10 USDT from Ethereum to USDT on Solana.Initialize SDK with Provider
Set up the ethers provider and SDK with blockchain provider.
The
blockchainProvider is required for order creation as it signs transactions.Generate Secrets and Create Order
Generate secrets and create an EVM order with Solana receiver.The key difference is using
SolanaAddress.fromString() for the receiver.Submit Order
Submit the order to the relayer (no on-chain publishing needed).Unlike Solana-to-EVM, EVM-to-Solana orders don’t require separate on-chain publishing.
Key Differences
From EVM-to-EVM
From EVM-to-EVM
The main difference is the receiver address type:Everything else follows the standard EVM flow.
From Solana-to-EVM
From Solana-to-EVM
EVM-to-Solana is simpler:No announceOrder required:No on-chain publishing:
Destination Token Format
Destination Token Format
Use Solana token addresses for the destination:
Error Handling
Implement robust error handling for production use:Secret Sharing Error Handling
Handle errors during secret submission gracefully:Best Practices
Validate Addresses
Verify Solana receiver addresses are valid before creating orders.
Handle Retries
Implement retry logic for secret submission failures.
Monitor Status
Continuously monitor order status with appropriate intervals.
Log Everything
Log all steps for debugging and tracking purposes.
Receiver Address Validation
Validate Solana addresses before using them:Next Steps
Solana to EVM
Learn about swaps from Solana to EVM
Order Lifecycle
Understand order states and monitoring