Add Solana Support to Your Bridge

The Core Workflow: Building a Deposit Transaction
Address of token to bridge on the origin chain. Must be used together with parameter outputToken. Here we are using USDC.
Note that the address provided must exist on the specified originChainId below.
{"value":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"}Address of token to bridge on the destination chain. Must be used together with parameter inputToken. For ETH, use the wrapped address, like WETH.
Note that the address provided must exist on the specified destinationChainId below.
{"value":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}Chain ID where the specified token or inputToken exists.
{"value":1}The desired destination chain ID of the bridge transfer.
{"value":34268394551451}Amount of the token to transfer.
Note that this amount is in the native decimals of the token. So, for WETH, this would be the amount of human-readable WETH multiplied by 1e18. For USDC, you would multiply the number of human-readable USDC by 1e6.
{"value":"50000000"}Recipient of the deposit. Can be an EOA or a contract. If this is an EOA and message is defined, then the API will throw a 4xx error.
Example: GsiZqCTNRi4T3qZrixFdmhXVeA4CSUzS7c44EQ7Rw1Tw
{"value":"GsiZqCTNRi4T3qZrixFdmhXVeA4CSUzS7c44EQ7Rw1Tw"}Calldata passed to the recipient if recipient is a contract address. This calldata is passed to the recipient via the recipient's handleAcrossMessage() public function.
Example: 0xABC123
Optionally override the relayer address used to simulate the fillRelay() call that estimates the gas costs needed to fill a deposit. This simulation result impacts the returned suggested-fees. The reason to customize the EOA would be primarily if the recipientAddress is a contract and requires a certain relayer to submit the fill, or if one specific relayer has the necessary token balance to make the fill.
Example: 0x428AB2BA90Eba0a4Be7aF34C9Ac451ab061AC010
The quote timestamp used to compute the LP fees. When bridging with across, the user only specifies the quote timestamp in their transaction. The relayer then determines the utilization at that timestamp to determine the user's fee. This timestamp must be close (within 10 minutes or so) to the current time on the chain where the user is depositing funds and it should be <= the current block timestamp on mainnet. This allows the user to know exactly what LP fee they will pay before sending the transaction.
If this value isn't provided in the request, the API will assume the latest block timestamp on mainnet.
Example: 1653547649
Suggested fees for the transaction and supporting data
Bad request due to invalid input parameter.
Unexpected error within the API
Test Your Codebase
Next Steps
Last updated