Skip to content

Overview

Gas LayerZero is a gas refuel bridge built on the LayerZero protocol. You can instantly bridge to all supported LayerZero destination chains with a single deposit transaction.

Depositing to Gas LayerZero v2

All sendDeposits() calls into the Gas LayerZero contract and must be encoded as a uint256 where the leftmost 16 bits are the destination chain ID and the rightmost 240 bits are the amount (in wei) you'd like to recieve on the destination chain.

Example of Process

  1. Select the Deposit Chain: Start by selecting your deposit chain.

  2. Select the Destination Chains: Select your destination chains to recieve funds. In the example, these are Gnosis (v2 LZ chain ID 30145) and Fuse (v2 LZ chain ID 30138).

  3. Select the Amount: Decide the amount of native currency you want to send to each chain. In the example, 0.000002 ETH is the amount bridged to both Gnosis and Fuse. The Ether input for each chain must be converted to Wei.

  4. Estimate Fees: Call the estimateFees() function with the correct parameters. This function takes three arguments: v2LZids, messages and options. The aggregated return from estimateFees() is used as a parameter in sendDeposits().

  5. Check Wallet Balance: Ensure your wallet balance exceeds the estimated fees plus the total value in Wei, else the contract will revert due to insufficent funds.

  6. Proceed with the Transaction: After all the checks, proceed with the transaction by calling the sendDeposits() function with the correct parameters.