From 7beb2a5ef259af50acdb916e9861aea23b7a4ac2 Mon Sep 17 00:00:00 2001 From: Hamdi Allam Date: Mon, 12 May 2025 10:36:20 -0400 Subject: [PATCH 1/2] sent message context sentmessage.context --- specs/interop/predeploys.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/specs/interop/predeploys.md b/specs/interop/predeploys.md index cc6aee743..7e490625a 100644 --- a/specs/interop/predeploys.md +++ b/specs/interop/predeploys.md @@ -390,7 +390,7 @@ which is used to track whether the message has successfully been relayed. It also emits a `SentMessage` event with the necessary metadata to execute when relayed on the destination chain. ```solidity -event SentMessage(uint256 indexed destination, address indexed target, uint256 indexed messageNonce, address sender, bytes message); +event SentMessage(uint256 indexed destination, address indexed target, uint256 indexed messageNonce, address sender, bytes message, bytes context); ``` An explicit `_destination` chain and `nonce` are used to ensure that the message can only be played on a single remote @@ -406,6 +406,8 @@ it will be the `L2ToL2CrossDomainMessenger` and users will need to callback to g The `_destination` MUST NOT be the chain-ID of the local chain and a locally defined `nonce` MUST increment on every call to `sendMessage`. +Messages might also contain some internal context with metadata, analogous to headers with HTTP requests. + Note that `sendMessage` is not `payable`. ### Re-sending Messages @@ -420,7 +422,8 @@ mapping prior to emitting the `SentMessage` event. uint256 _nonce, address _sender, address _target, - bytes calldata _message + bytes calldata _message, + bytes calldata _context ) external; ``` From 1bebffa5fe56c5b29a9917e931c745d9cc02080e Mon Sep 17 00:00:00 2001 From: Hex <165055168+hexshire@users.noreply.github.com> Date: Thu, 29 May 2025 13:32:11 -0300 Subject: [PATCH 2/2] chore: update spec (#710) --- specs/interop/predeploys.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/interop/predeploys.md b/specs/interop/predeploys.md index 7e490625a..8f5f5f203 100644 --- a/specs/interop/predeploys.md +++ b/specs/interop/predeploys.md @@ -390,7 +390,7 @@ which is used to track whether the message has successfully been relayed. It also emits a `SentMessage` event with the necessary metadata to execute when relayed on the destination chain. ```solidity -event SentMessage(uint256 indexed destination, address indexed target, uint256 indexed messageNonce, address sender, bytes message, bytes context); +event SentMessage(uint256 indexed destination, address indexed target, uint256 indexed messageNonce, address sender, bytes message, bytes originContext); ``` An explicit `_destination` chain and `nonce` are used to ensure that the message can only be played on a single remote @@ -423,7 +423,7 @@ mapping prior to emitting the `SentMessage` event. address _sender, address _target, bytes calldata _message, - bytes calldata _context + bytes calldata _originContext ) external; ```