Relay now fully supports depositing & withdrawing to Solana from any EVM chain
we support. This is a great way to get users funds on Solana to complete
transactions. You can onboard users funds from Blast ETH to Solana USDC to make
transactions on a game. You could also swap funds from Solana SOL to Zora ETH
for users to mint. The possibilities are limitless when you use Relay embedded
in your app.
There are few things that make transacting on Solana different than another EVM
chain. The provided information below should review all the exceptions where
your input is Solana specific.
Solana wallet addresses are case sensitive.
SDK Properties
| Action | Parameter | Input | Description |
|---|
| Deposit to Solana | toChainId | 792703809 | Chain ID assigned to access Solana for Relay’s tools. |
| recipient | User’s Solana Address | Must be a valid Solana address. Do not use an Ethereum wallet address. Case Sensitive |
| toCurrency | Contract Address of Solana Token | Must be a valid Solana token address. Do not use an EVM address. We support all tokens tradeable on Jupiter. |
| Withdraw from Solana | chainId | 792703809 | Chain ID assigned to access Solana for Relay’s tools. |
| currency | Contract Address of Solana Token | Must be a valid Solana token address. Do not use an EVM address. We support all tokens tradeable on Jupiter. |
When withdrawing from Solana using the SDK, you will not need to specify the
depositing wallet address.
Solana Tokens
In the table, we have provided the most frequently used Solana tokens & their
contract addresses. We do support all tradeable tokens on
Jupiter.
Solana token addresses are case sensitive.
| Token | Token Address | Token Symbol | Decimals |
|---|
| SOL | 11111111111111111111111111111111 | SOL | 9 |
| USDC | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v | USDC | 6 |
| wSol | So11111111111111111111111111111111111111112 | wSOL | 9 |
| USDT | Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB | USDT | 6 |
Relay supports any Solana token available on Jupiter. You can visit
Jupiter to explore all the tokens available.
API
Params
| Action | Parameter | Input | Description |
|---|
| Deposit to Solana | recipient | User’s Solana Address | Must be a valid Solana address. Do not use an Ethereum wallet address. Case Sensitive |
| destinationChainId | 792703809 | Chain ID assigned to access Solana for Relay’s tools. |
| destinationCurrency | Contract Address of Solana Token | Must be a valid Solana token address. Do not use an EVM address. We support all tokens tradeable on Jupiter. |
| Withdraw from Solana | user | User’s Solana Address | Must be a valid Solana address. Do not use an Ethereum wallet address. Case Sensitive |
| originChainId | 792703809 | Chain ID assigned to access Solana for Relay’s tools. |
| originCurrency | Contract Address of Solana Token | Must be a valid Solana token address. Do not use an EVM address. We support all tokens tradeable on Jupiter. |
Execution
Once you have the necessary information, you can start utilizing our API for
full Solana withdrawal and deposit support. To get started, check out the
execution steps of our API. Then when you’re
ready to swap, head over to the Get Quote API
endpoint.
Please note that instead of the usual calldata returned with EVM transactions,
there’s different calldata that needs to be handled accordingly.
Example: Deposit to Solana from Base
curl -X POST "https://api.relay.link/quote/v2" \
-H "Content-Type: application/json" \
-d '{
"user": "0x03508bb71268bba25ecacc8f620e01866650532c",
"originChainId": 8453,
"originCurrency": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"destinationChainId": 792703809,
"destinationCurrency": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"recipient": "GTtzwxqy67xx9DVESJjx28TgXqpc8xTqtiytgNMaQBTE",
"tradeType": "EXACT_INPUT",
"amount": "10000000"
}'
SDK
To use the SDK with Solana, install and configure the
SVM wallet adapter.
The adapter handles transaction signing and broadcasting.
npm install @relayprotocol/relay-svm-wallet-adapter
For implementation details and code samples, see the
Adapters documentation.