Skip to content

Commit

Permalink
interop: reorder arguments for executeMessage in predeploys
Browse files Browse the repository at this point in the history
By including `_id` first we don't have to pad calldataload when loading `_id` in assembly
  • Loading branch information
0xfuturistic authored Mar 20, 2024
1 parent 890ab87 commit f2ccc7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion specs/interop/predeploys.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ properties about the `_msg` using the information in the `Identifier`.
A simple implementation of the `executeMessage` function is included below.

```solidity
function executeMessage(address _target, bytes calldata _msg, Identifier calldata _id) public payable {
function executeMessage(Identifier calldata _id, address _target, bytes calldata _msg) public payable {
require(msg.sender == tx.origin);
require(_id.timestamp <= block.timestamp);
require(L1Block.isInDependencySet(_id.chainid));
Expand Down

0 comments on commit f2ccc7b

Please sign in to comment.