Across is now live on BNB Smart Chain!
Bridge Now!
Across Documentation
V3 Developer Docs
V3 Developer Docs
  • 👋Introduction
    • Welcome to Across
    • What is Across?
    • Technical FAQ
    • Migration Guides
      • Migration from V2 to V3
      • Migration to CCTP
        • Migration Guide for Relayers
        • Migration Guide for API Users
      • Migration Guide for Non-EVM and Prefills
        • Breaking Changes for Indexers
        • Breaking Changes for API Users
        • Breaking Changes for Relayers
        • Testnet Environment for Migration
      • Solana Migration Guide
      • BNB Smart Chain Migration Guide
  • 🚀DEVELOPER QUICKSTART
    • Instant Bridging in your Application
      • Bridge Integration Guide
      • Multichain Bridge UI Guide
      • Single Chain Bridge UI Guide
    • Embedded Crosschain Actions
      • Crosschain Actions Integration Guide
        • Using the Generic Multicaller Handler Contract
        • Using a Custom Handler Contract
      • Crosschain Actions UI Guide
    • Settle Crosschain Intents
    • ERC-7683 in Production
  • 🧠Concepts
    • What are Crosschain Intents?
    • Intents Architecture in Across
    • Intent Lifecycle in Across
    • Canonical Asset Maximalism
  • 🛠️Reference
    • API Reference
    • App SDK Reference
    • Contracts
      • Aleph Zero
      • Arbitrum
      • Base
      • Blast
      • BNB Smart Chain
      • Ethereum
      • Linea
      • Lens Chain
      • Ink
      • Lisk
      • Mode
      • Optimism
      • Polygon
      • Redstone
      • Scroll
      • Soneium
      • Unichain
      • World Chain
      • zkSync
      • Zora
    • Selected Contract Functions
    • Supported Chains
    • Fees in the System
    • Actors in the System
    • Security Model and Verification
      • Disputing Root Bundles
      • Validating Root Bundles
    • Tracking Events
  • 🔁Relayers
    • Running a Relayer
    • Relayer Nomination
  • 📚Resources
    • Release Notes
    • Developer Support
    • Bug Bounty
    • Audits
Powered by GitBook
On this page
  • For Relayers
  • Technical Reference
  • Support
  1. 👋Introduction
  2. Migration Guides

Solana Migration Guide

PreviousTestnet Environment for MigrationNextBNB Smart Chain Migration Guide

Last updated 2 hours ago

LogoLogo

Products

  • Across Bridge
  • Across+
  • Across Settlement

Socials

  • Discord
  • Twitter
  • Medium
  • Forum

Resources

  • Blog
  • Across Brand Assets
  • Github

Routes

  • Bridge to Unichain
  • Bridge to Arbitrum
  • Bridge to Optimism
  • Bridge to Linea
  • Bridge to Polygon
  • Bridge to Base
  • Bridge to World Chain
  • Bridge to zkSync

Across is expanding support to Solana, enabling seamless USDC bridging between Ethereum Mainnet, other supported chains and Solana. The migration is scheduled to go live soon. All integrators and relayers are encouraged to complete the necessary updates before the migration happens to prevent disruptions.


For Solana routes, check out this utility script demonstrating how to call deposit()with the integratorID for seamless transaction execution.

Building and Executing Transactions

Developers are requested to build transactions by fetching details from the API, adding integratorID and calling the deposit() function in the SVM SpokePool contract to execute deposit transactions. We will let you know as soon as Solana routes are available in the /suggested-fees API.

There are no changes in the API's response body. However please note that you will be able to see Solana addresses (in Pubkey format) in fields like recipient, inputToken, outputToken, spokePoolAddress, exclusiveRelayer and destinationSpokePoolAddress .

We do not support Solana devnet or testnet at the moment. We urge developers and integrators to test their Solana integration using the Solana mainnet with small amount of tokens. We will let you know as soon as we are live and you can begin testing.

Solana is not currently supported in the Across App-SDK. We’re actively working on expanding support and improving the developer experience for Solana. Stay tuned — we’ll share updates as soon as it becomes available.

If you need any help adding the integratorID, please reach out to us here.


For Relayers

Relayers supporting Solana will need:

  1. A valid Solana address to perform fill operations.

  2. The following package dependencies:

    1. @across-protocol/sdk

    2. @across-protocol/contracts

    3. @solana/kit (previously @solana/web3.js@^2.0.0)

While each relayer can decide how to manage their Solana addresses, the recommended approach is deriving the Solana address from the same private key used for EVM operations. This approach minimizes the need to store additional secrets.

When filling to or from Solana, relayers must always specify a valid address on the chain where they request repayment. Failing to do so may result in loss of funds.

Fill Mechanism Changes

For relayers, the most significant update for relayers is the transition from fillV3Relay to fillRelay for handling crosschain transactions:

  1. For deposits from Solana to EVM chains:

    1. Relayers monitor for deposit events on Solana

    2. Use fillRelay to complete the fill transaction on the EVM destination. You can learn more about it here.

  2. For deposits from EVM chains to Solana:

    1. Monitor for deposit events on EVM chains

    2. Use Solana-specific fill functions to complete the transaction

We use emit_cpi!() method in Anchor to emit events through a Cross Program Invocation (CPI) by including the event data in the instruction data. Here, you need to fetch all transactions involving the SVM Spokepool program and inspect the internal event data. Please checkout the helper in the SDK to implement this.


Technical Reference

Deposit Function

The deposit function is used when users want to transfer funds from Solana to an EVM chain:

// This function is called when a user wants to bridge from Solana to another chain
function deposit(
    Pubkey depositor,           // The depositor address in Pubkey format
    Pubkey recipient,           // The recipient address on the destination chain
    Pubkey input_token,          // Token being deposited (on Solana)
    Pubkey output_token,         // Token to receive on destination chain
    u64 input_amount,         // Amount of input token being deposited
    u64 output_amount,        // Amount of output token to receive
    u64 destination_chain_id,  // Destination chain ID
    Pubkey exclusive_relayer,    // Address of exclusive relayer (use Pubkey::default() if none)
    u32 quote_timestamp,       // Timestamp when quote was generated
    u32 fill_deadline,         // Deadline after which deposit can't be filled
    u32 exclusivity_parameter,  // Deadline for exclusive relayer's priority
    Vec<u8> calldata message       // Additional message data
) external payable;

FillRelay Function

Relayers use this function to complete crosschain transactions:

/// This function is called when a relayer wants to fill a crosschain bridge request by sending
/// the specified output tokens to the recipient on the destination chain.
function fillRelay(
    [u8; 32] relay_hash,             // Hash uniquely identifying the deposit to be filled. Computed as hash of relay_data & destination_chain_id.
    V3RelayData relay_data,         // Struct containing all deposit data (matches parameters from FundsDeposited event).
    Pubkey depositor,              // The account credited with the deposit on the origin chain.
    Pubkey recipient,              // The recipient account receiving the funds on this chain.
    Pubkey input_token,            // Token used for deposit on the origin chain.
    Pubkey output_token,           // Token to be received by the recipient on the destination chain.
    u64 input_amount,           // Amount deposited by the user on the origin chain.
    u64 output_amount,          // Amount sent to the recipient on the destination chain.
    u64 origin_chain_id,        // Origin chain identifier.
    Pubkey exclusive_relayer,      // The exclusive relayer allowed to fill the deposit before the exclusivity deadline.
    u32 fill_deadline,           // Deadline after which deposit cannot be filled.
    u32 exclusivity_deadline,    // Deadline for exclusive relayer to maintain priority.
    bytes calldata message,         // Message to be passed.
    u64 repayment_chain_id,     // Chain where the relayer expects repayment after the challenge period.
    Pubkey repayment_address       // Address where relayer wants to receive refund on the repayment chain.
) external;

Support

Want to learn more or need personalized help? Check out developer support and reach out to us!

/suggested-fees
/suggested-fees