IAmbImplementation

Git Source

Author: ZeroPoint Labs

interface for arbitrary message bridge implementation

Functions

dispatchPayload

allows state registry to send message via implementation.

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

Parameters

NameTypeDescription
srcSender_addressis the caller (used for gas refunds)
dstChainId_uint64is the identifier of the destination chain
message_bytesis the cross-chain message to be sent
extraData_bytesis message amb specific override information

estimateFees

not all AMBs will have on-chain estimation for which this function will return 0

returns the gas fees estimation in native tokens

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

Parameters

NameTypeDescription
dstChainId_uint64is the identifier of the destination chain
message_bytesis the cross-chain message
extraData_bytesis any amb-specific information

Returns

NameTypeDescription
feesuint256is the native_tokens to be sent along the transaction

Events

ChainAdded

event ChainAdded(uint64 superChainId);

AuthorizedImplAdded

event AuthorizedImplAdded(uint64 superChainId, address authImpl);