Anchor.sol
Constants
PURE_MESSAGE
VALUE_MESSAGE
BOOLNetwork ONLY supports PURE_MESSAGE
type cross-chain messages at the current Testnet stage. VALUE_MESSAGE
has not been enabled yet and hence submitting this type of message will lead to a transaction revert.
Functions
updateConsumer
Updates the consumer contract that is uniquely binding to the anchor. This method can only be called by the current owner
.
Params
newConsumer
address
The address of the new consumer to use this Anchor as the cross-chain endpoint
sendToMessenger
Calls anchor to forward the cross-chain message to the BOOLNetwork messenger on the source chain. This method can only be called by the consumer contract that is uniquely binding to the anchor.
Parameters:
refundAddress
address
The address to receive the refund 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
address
The address of the destination chain Anchor
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
receiveFromMessenger
Called by the Messenger contract on the local chain to receive the cross-chain message from the source chain and forward it to the connected consumer contract.
Params
txUniqueIdentification
bytes32
A globally unique identifier for each cross-chain message
crossType
bytes32
Indicate the type of a cross-chain message
valueFeed
bytes
Additional data that depends on the crossType
srcAnchor
bytes32
The address of the source chain Anchor in bytes32
payload
bytes
Application-level data that will be forwarded to the destination consumer contract
Last updated