AMB Implementations

Introduction

AMB (Arbitrary Messaging Bridge) implementations are the individual messaging bridges used to move messages defined in various State Registry contracts.

Core Concepts

All AMB implementations must implement IAmbImplementation , which defines a set of important characteristics to be able to dispatch messages via that particular bridge. Individual AMB Implementations all have different ways of receiving payloads, but other methods are standardized.

dispatchPayload

This function allows the state registry to send a message via the implementation. This function is overridden in individual implementations and can only be called by State Registries the PROTOCOL_ADMIN has given appropriate permissions to.

function dispatchPayload(
        address srcSender_,
        uint64 dstChainId_,
        bytes memory message_,
        bytes memory extraData_
) external payable;

retryPayload

This function specifies a method to allow for the permissionless calling of the AMB's retry mechanism if payloads aren't successfully delivered.

function retryPayload(
    bytes memory data_
) external payable

estimateFees

This function returns an estimate of gas fees in native tokens to send the message.

function estimateFees(
    uint64 dstChainId_,
    bytes memory message_,
    bytes memory extraData_
) external view returns (uint256 fees);

Last updated