TestClient
Inherits: MessageRecipient
Functions
constructor
constructor(address origin_, address destination_) MessageRecipient(origin_, destination_);
sendMessage
function sendMessage(
uint32 destination_,
address recipientAddress,
uint32 optimisticPeriod,
uint64 gasLimit,
uint32 version,
bytes memory content
) external payable;
_receiveBaseMessageUnsafe
*Child contracts should implement the logic for receiving a Base Message in an "unsafe way". Following checks HAVE been performed:
- receiveBaseMessage() was called by Destination (i.e. this is a legit base message).
- Nonce is not zero.
- Message sender on origin chain is not a zero address.
- Proof maturity is not zero. Following checks HAVE NOT been performed (thus "unsafe"):
- Message sender on origin chain could be anything non-zero at this point.
- Proof maturity could be anything non-zero at this point.*
function _receiveBaseMessageUnsafe(
uint32 origin_,
uint32 nonce,
bytes32 sender,
uint256 proofMaturity,
uint32 version,
bytes memory content
) internal override;
Events
MessageReceived
event MessageReceived(
uint32 origin, uint32 nonce, bytes32 sender, uint256 proofMaturity, uint32 version, bytes content
);
MessageSent
event MessageSent(uint32 destination, uint32 nonce, bytes32 sender, bytes32 recipient, bytes content);