Messenger
Variables
Message
A properly defined struct to pack essential cross-chain information.
Params
txUniqueIdentification
bytes32
A globally unique identifier for each cross-chain message
crossType
bytes32
Indicate the type of a cross-chain message
srcAnchor
bytes32
The address of the source chain Anchor in bytes32
bnExtraFeed
bytes
Additional data that depends on the crossType
dstAnchor
bytes32
The address of the destination chain Anchor in bytes32
payload
bytes
Application-level data that will be forwarded to the destination consumer contract
MessageStatus
Returns DELIVERED
when the cross-chain message has been successfully delivered to the destination. Otherwise, FAILED
is signalled, along with an event MessageCached
emitted.
Events
MessageSent
Emits on the source chain with essential cross-chain information packed in a Message
struct.
MessageReceived
Emits on the destination chain where the MessageStatus
can be either DELIVERED
or FAILED
.
MessageCached
Emits when the destination transaction reverted for some reason. A bridge builder should define the error logic in their application-level contracts.
It can be combined with the corresponding MessageReceived
event to recover the original message and identify the reverting reason.
Functions
sendToBool
Called by registered Anchors to forward cross-chain messages to BOOLNetwork.
Params
refundAddress
address payable
The address to receive the rest of the pre-paid transaction fee
crossType
bytes32
Indicate the type of a cross-chain message
valueFeed
bytes
Additional data that depends on the crossType
dstChainId
uint32
ID of the destination chain
dstAnchor
bytes32
The address of the destination chain Anchor in bytes32
payload
bytes
Application-level data that will be forwarded to the destination consumer contract
Return Values
txUniqueIdentification
bytes32
A globally unique identifier for each cross-chain message
receiveFromBool
Receives cross-chain messages from BOOLNetwork.
Params
message
Message
A Message struct consists of all the essential cross-chain information
signature
bytes
Signature from a committee which is used to verify the validity of a cross-chain message
Return Values
status
MessageStatus
An identifier to present the final status of a cross-chain message
Last updated