Axelar Router

This AxRouter contract extends the Router contract functionality plugging in the Axelar network to send and receive arbitrary cross-chain payloads. It extends the router to:

  1. Map a standardised chainId to Axelar chain name as string

  2. Set the Axelar-powered peer router address on each remote chain

  3. Receive incoming messages and dispatch them to the correct smart contract.


Events

Event
Parameters
Description

PeerRouterUpdated

uint32 indexed chainId string indexed oldRouter string indexed newRouter

Emitted when the owner changes which Axelar contract your router will call on a given chain.

AxChainStrUpdated

uint32 indexed chainId string indexed axChainStr

Emitted when you set or update the Axelar‐chain name corresponding to your numeric chainId.

MessageRoutedAx

Emitted immediately after dispatching a payload via Axelar’s gateway.


Errors

Error
When It’s Thrown

UnsupportedAxChain()

The chain isn't supported by the router.

InvalidPeer()

If there is no peer router to send the message to for the specific chain OR if the incoming sourceAddress doesn’t match the owner-configured peer router.

Last updated