Skip to content

Commit

Permalink
Update ERC-7786: Add messageId to IERC7786Receiver.executeMessage
Browse files Browse the repository at this point in the history
Merged by EIP-Bot.
  • Loading branch information
Amxx authored Mar 6, 2025
1 parent 892a03d commit 87b2f4c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ERCS/erc-7786.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,16 @@ A **Destination Gateway** is a contract that implements a protocol to validate m

The protocol MUST ensure delivery of a sent message to its **receiver** using the `IERC7786Receiver` interface (specified below), which the receiver MUST implement.

Once the message can be safely delivered (see Properties), the gateway MUST invoke `executeMessage` with the message contents.
Once the message can be safely delivered (see Properties), the gateway MUST invoke `executeMessage` with the message identifier and contents, unless the sender or the receiver explicitly requested otherwise.

The `messageId` MUST be either empty or unique (for the calling gateway) to the message being relayed. The format of this identifier is not specified, and the gateway can use it at its own discretion. For example it can be an identifier of the `MessagePosted` event that created the message.

The gateway MUST verify that `executeMessage` returns the correct value, and MUST revert otherwise.

```solidity
interface IERC7786Receiver {
function executeMessage(
string calldata messageId, // gateway specific, empty or unique
string calldata sourceChain, // [CAIP-2] chain identifier
string calldata sender, // [CAIP-10] account address
bytes calldata payload,
Expand Down

0 comments on commit 87b2f4c

Please sign in to comment.