Superform v1
  • Introduction
  • Components
    • Protocol
    • Keepers
    • API
    • App
  • E2E Flows
    • Same-chain Deposit
    • Cross-chain Deposit
    • Same-chain Withdrawal
    • Cross-chain Withdrawal
  • Periphery Contracts
    • SuperformRouter
      • SuperformRouterPlus
      • SuperformRouterPlusAsync
    • PayMaster
    • PaymentHelper
    • EmergencyQueue
    • SuperformFactory
    • Forms
      • ERC4626Form
      • ERC5115Form
      • ERC7540Form
    • SuperPositions
      • ERC1155A
    • RewardsDistributor
  • Core Contracts
    • State Registries
      • CoreStateRegistry
      • AsyncStateRegistry
      • PayloadHelper
    • AMB Implementations
      • LayerzeroImplementation
      • LayerzeroV2Implementation
      • WormholeARImplementation
      • HyperlaneImplementation
      • AxelarImplementation
    • Broadcasting
      • BroadcastRegistry
      • WormholeSRImplementation
    • Bridge Validators
      • LiFiValidator
      • SocketValidator
      • SocketOneInchValidator
      • DebridgeValidator (and forwarder)
      • OneInchValidator
    • DstSwapper
    • Settings
      • SuperRBAC
      • SuperRegistry
  • SuperVaults
    • SuperVaults
  • Resources
    • Deployment Addresses
    • Subgraphs
      • Protocol Level Entities
      • Form Related Entities
      • Deposits and Withdrawals
      • SuperPosition Events
      • External Entities
    • Infrastructure Integrations
    • Security & Audits
    • Protocol License
    • Glossary
    • Protocol Multisig
    • Superform Labs Socials
Powered by GitBook
On this page
  • Introduction
  • Core Concepts
  • Receiving Payloads
  • Retrying Payloads
  • Configuration Setters

Was this helpful?

  1. Core Contracts
  2. AMB Implementations

AxelarImplementation

Last updated 9 months ago

Was this helpful?

Introduction

This contract is used to allow Superform to send messages via .

Core Concepts

Axelar builds upon AMBImplementation to formalize certain methods specific to the Axelar protocol.

Receiving Payloads

The implemented interface can be found in Axelar's IAxelarExecutable interface .

execute

This function handles an interchain message sent via Axelar. Only the Hyperlane Mailbox may call this function.

function execute(
    bytes32 commandId,
    string calldata sourceChain,
    string calldata sourceAddress,
    bytes calldata payload
)
name
description

commandId

bytes32 unique axelar id, given per message

sourceChain

string format of the source chain of the message

sourceAddress

string format of the source address sending the message. This is an AxelarImplementation contract on the source chain

payload

bytes content of the message

Retrying Payloads

(bytes32 txHash, uint256 logIndex)

Configuration Setters

There are some bridge related configurations to be made on the contract. These configuration functions can only be set by the PROTOCOL_ADMIN.

setAxelarConfig

This function allows the ProtocolAdmin to set the AxelarGateway on a given chain.

function setAxelarConfig(IAxelarGateway gateway_) external onlyProtocolAdmin
name
description

gateway_

The axelar gateway address

setAxelarGasService

This function allows the ProtocolAdmin to set gas estimation relevant addresses gas addresses, related with message execution and gas amount estimation.

function setAxelarGasService(
       IAxelarGasService gasService_,
        IInterchainGasEstimation gasEstimator_) external onlyProtocolAdmin
name
description

gasService_

Address of Axelar gas service for payments of message execution

gasEstimator_

Address of Axelar gas estimator for on chain gas estimations

As mentioned in the section, messages can be retried by calling retryPayload with a bytes relevant data. In the case of Axelar, the data is the following:

Axelar
here
AMB Implementations