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:
- Send tokens across blockchains
- Send general messages across blockchains
Linea integration
When integrating with Axelar there are two key contracts you must use:
- 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.
- 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
Contract | Network | Address | networkId |
---|---|---|---|
Gateway | Mainnet | 0xe432150cce91c13a887f7D836923d5597adD8E31 | 59144 |
Gateway | Testnet | 0xe432150cce91c13a887f7D836923d5597adD8E31 | 59141 |
Gas Service | Mainnet | 0x2d5d7d31F671F86C782533cc367F14109a082712 | 59144 |
Gas Service | Testnet | 0xbE406F0189A0B4cf3A05C286473D23791Dd44Cc6 | 59141 |
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:
-
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.
-
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.
-
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
- Meet the community on Discord
- Dive into the data on the Axelarscan block explorer