Skip to main content

Axelar

Axelar is a blockchain of blockchains that allows for universal web3 interoperability. By integrating with Axelar, your Linea-based application now has access to the 45+ chains that are also connected via Axelar. As Axelar is a blockchain of blockchains, it overcomes many of the challenges of more centralized interoperability solutions; transactions that go through the Axelar network cannot be censored by any oracle, relayer, or sequencer.

Functionality​

Axelar enables interchain features for builders on Linea:

  1. Send tokens across blockchains
  2. Send general messages across blockchains

Linea integration​

When integrating with Axelar there are two key contracts you must use:

  1. The Axelar Gateway
    • On the source chain, this contract exposes the functions which you will use to initiate an interchain transaction.
    • On the destination chain, this contract enables messages to be executed automatically to complete the interchain transaction.
  2. The Axelar Gas Service
    • This contract is the entrypoint into Axelar's gas service, which handles gas payment for your transaction on both the Axelar network and the destination chain. You, as the caller, now only need to cover gas on the source chain.

Contract addresses​

ContractNetworkAddressnetworkId
GatewayMainnet0xe432150cce91c13a887f7D836923d5597adD8E3159144
GatewayTestnet0xe432150cce91c13a887f7D836923d5597adD8E3159141
Gas ServiceMainnet0x2d5d7d31F671F86C782533cc367F14109a08271259144
Gas ServiceTestnet0xbE406F0189A0B4cf3A05C286473D23791Dd44Cc659141

Once you have submitted your transaction, you can view it on the Axelarscan block explorer. The Axelarscan explorer is specifically tailored to show your interchain transaction step-by-step as it passes from the source chain, via the Axelar network, to the destination chain.

Linea-Axelar example​

For a full end-to-end example of a Linea-Axelar integration, check out our video walkthrough of the process. The complementary code can be found here.

Axelar use cases​

For inspiration, here are some live use cases demonstrating the kind of interchain applications that can be built on top of Axelar:

  1. Interchain token swaps (e.g. Squid)

    • Squid is a new protocol built on top of Axelar that allows users to swap tokens with a Uniswap-like experience, leveraging Axelar for swaps between tokens across different blockchains. Squid reduces the need to revert to centralized exchanges or multiple different exchanges to swap tokens across chains.
  2. Interchain lending (e.g. Prime Protocol)

    • A chain-agnostic prime brokerage that allows users to deposit assets from any connected chain and use their aggregate value as collateral for loans on any other connected chain. Prime offers the ability to build interchain applications that connect from any blockchain to any other blockchain, rather than just connecting a series of blockchains to Ethereum. This interchain design allows for a variety of new DeFi use cases, including cross-chain margining.
  3. Interchain gaming (e.g. Junkyard)

    • Web3 gaming is heavily reliant on NFTs, and enabling NFTs to be passed between blockchains is a critical next step for NFT-based games. Junkyard leverages Axelar for interchain NFTs: players can deposit their NFTs to the Junkyard contract. The NFT can come from any chain connected to the Axelar ecosystem, including Linea.

Get involved​

  1. Meet the community on Discord
  2. Dive into the data on the Axelarscan block explorer
Want to be featured here?

Have you built a tool for Linea? Contribute to the docs to add it here! See our guide to contributing.