Skip to content

Commit

Permalink
chore: add return value to sendMessage in L2ToL2CrossDomainMessenger …
Browse files Browse the repository at this point in the history
…in Predeploys.md (#430)
  • Loading branch information
0xParticle authored Oct 14, 2024
1 parent b1de5f6 commit 25adc1a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions specs/interop/predeploys.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,15 @@ chain is included instead.
The following function is used for sending messages between domains:

```solidity
function sendMessage(uint256 _destination, address _target, bytes calldata _message) external;
function sendMessage(uint256 _destination, address _target, bytes calldata _message) external returns (bytes32);
```

It returns the hash of the message being sent,
used to track whether the message has successfully been relayed.
It 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);
```

An explicit `_destination` chain and `nonce` are used to ensure that the message can only be played on a single remote
Expand Down

0 comments on commit 25adc1a

Please sign in to comment.