Skip to content
Lattice

IAxelarGateway

Git Source

Title: IAxelarGateway

Author: Vendored minimal subset of Axelar's GMP SDK

(https://github.com/axelarnetwork/axelar-gmp-sdk-solidity/blob/main/contracts/interfaces/IAxelarGateway.sol). Upstream license: MIT. Only the two methods the AxelarGatewayAdapter calls are re-declared. Vendored subset — do not add an axelar-gmp-sdk dependency.

The Axelar gateway: callContract emits an outgoing GMP message; validateContractCall is called by the destination executable to authorize an inbound approved call.

Functions

callContract

Emit a cross-chain contract call to contractAddress on destinationChain with payload.

function callContract(string calldata destinationChain, string calldata contractAddress, bytes calldata payload)
        external;

Parameters

NameTypeDescription
destinationChainstring
contractAddressstring
payloadbytes

validateContractCall

Validate (and consume) a gateway-approved inbound contract call. Returns true on first valid use.

function validateContractCall(
        bytes32 commandId,
        string calldata sourceChain,
        string calldata sourceAddress,
        bytes32 payloadHash
    ) external returns (bool);

Parameters

NameTypeDescription
commandIdbytes32
sourceChainstring
sourceAddressstring
payloadHashbytes32

Returns

NameTypeDescription
<none>bool