This guide demonstrates how to perform a complete cross-chain swap from an EVM-compatible chain to Solana. The example shows swapping USDT on Ethereum to USDT on Solana.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/1inch/cross-chain-sdk/llms.txt
Use this file to discover all available pages before exploring further.
Overview
EVM to Solana swaps combine aspects of both EVM and Solana workflows:- Uses EVM private key and standard EVM order submission
- Destination address is in Solana base58 format
- Order is submitted to the relayer (no on-chain transaction required from user)
- Secret submission and monitoring work the same as EVM to EVM swaps
Unlike Solana to EVM swaps, you don’t need to publish the order on-chain yourself. The SDK’s
submitOrder method handles everything.Complete Example
Install and Import Dependencies
Install the required packages:
Note the import from
@1inch/cross-chain-sdk-solana which includes Solana support.Define Swap Parameters
Set up the swap parameters with Solana destination address:
The receiver address must be a valid Solana base58 address. Use
SolanaAddress.NATIVE for native SOL.Create EVM Order with Solana Receiver
Create an EVM order with Solana as the destination:
The key difference is passing a
SolanaAddress as the receiver in the createEvmOrder() method.Full Working Example
Key Differences from EVM to EVM
- Package Import
- Destination Address
- Order Submission
Use the Solana-enabled package:
Native Token Swaps
To receive native SOL on Solana:Error Handling
Add error handling for secret submission:Next Steps
- Learn about Solana to EVM swaps
- Explore order tracking for monitoring
- Understand integrator fees for monetization