IStateSyncer

Git Source

Author: Zeropoint Labs.

SPDX-License-Identifier: Apache-2.0

interface for State Syncer

Functions

updateTxHistory

saves the message being sent together with the associated id formulated in a router

function updateTxHistory(uint256 payloadId_, uint256 txInfo_) external;

Parameters

NameTypeDescription
payloadId_uint256is the id of the message being saved
txInfo_uint256is the relevant information of the transaction being saved

mintSingle

allows minter to mint shares on source

function mintSingle(address srcSender_, uint256 id_, uint256 amount_) external;

Parameters

NameTypeDescription
srcSender_addressis the beneficiary of shares
id_uint256is the id of the shares
amount_uint256is the amount of shares to mint

mintBatch

allows minter to mint shares on source in batch

function mintBatch(address srcSender_, uint256[] memory ids_, uint256[] memory amounts_) external;

Parameters

NameTypeDescription
srcSender_addressis the beneficiary of shares
ids_uint256[]are the ids of the shares
amounts_uint256[]are the amounts of shares to mint

burnSingle

allows burner to burn shares on source

function burnSingle(address srcSender_, uint256 id_, uint256 amount_) external;

Parameters

NameTypeDescription
srcSender_addressis the address of the sender
id_uint256is the id of the shares
amount_uint256is the amount of shares to burn

burnBatch

allows burner to burn shares on source in batch

function burnBatch(address srcSender_, uint256[] memory ids_, uint256[] memory amounts_) external;

Parameters

NameTypeDescription
srcSender_addressis the address of the sender
ids_uint256[]are the ids of the shares
amounts_uint256[]are the amounts of shares to burn

stateMultiSync

allows state registry contract to mint shares on source

function stateMultiSync(AMBMessage memory data_) external returns (uint64 srcChainId_);

Parameters

NameTypeDescription
data_AMBMessageis the received information to be processed.

Returns

NameTypeDescription
srcChainId_uint64is the decoded srcChainId.

stateSync

allows state registry contract to mint shares on source

function stateSync(AMBMessage memory data_) external returns (uint64 srcChainId_);

Parameters

NameTypeDescription
data_AMBMessageis the received information to be processed.

Returns

NameTypeDescription
srcChainId_uint64is the decoded srcChainId.

txHistory

returns the payload header for a tx id on the source chain

function txHistory(uint256 txId_) external view returns (uint256);

Parameters

NameTypeDescription
txId_uint256is the identifier of the transaction issued by super router

Events

Completed

is emitted when a cross-chain transaction is completed.

event Completed(uint256 txId);