-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathIMessageRecipient.sol
28 lines (27 loc) · 1.19 KB
/
IMessageRecipient.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
interface IMessageRecipient {
/**
* @notice Message recipient needs to implement this function in order to
* receive cross-chain messages.
* @dev Message recipient needs to ensure that merkle proof for the message
* is at least as old as the optimistic period that the recipient is using.
* Note: as this point it is checked that the "message optimistic period" has passed,
* however the period value itself could be anything, and thus could differ from the one
* that the recipient would like to enforce.
* @param origin Domain where message originated
* @param nonce Message nonce on the origin domain
* @param sender Sender address on origin chain
* @param proofMaturity Message's merkle proof age in seconds
* @param version Message version specified by sender
* @param content Raw bytes content of message
*/
function receiveBaseMessage(
uint32 origin,
uint32 nonce,
bytes32 sender,
uint256 proofMaturity,
uint32 version,
bytes memory content
) external payable;
}