From a54202d010e9937825a083499f08ee0495fa8400 Mon Sep 17 00:00:00 2001 From: Filip Krawczyk Date: Mon, 3 Jun 2024 16:47:35 +0200 Subject: [PATCH] Change Mmr Id type to uint128 in L1 msg sender --- l1/src/L1MessagesSender.sol | 4 ++-- l1/test/L1MessagesSender.t.sol | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/l1/src/L1MessagesSender.sol b/l1/src/L1MessagesSender.sol index 67b6821..9ea525d 100644 --- a/l1/src/L1MessagesSender.sol +++ b/l1/src/L1MessagesSender.sol @@ -56,7 +56,7 @@ contract L1MessagesSender is Ownable { } /// @param aggregatorId The id of a tree previously created by the aggregators factory - function sendPoseidonMMRTreeToL2(uint256 aggregatorId, uint256 mmrId) external payable { + function sendPoseidonMMRTreeToL2(uint256 aggregatorId, uint128 mmrId) external payable { address existingAggregatorAddr = aggregatorsFactory.aggregatorsById( aggregatorId ); @@ -98,7 +98,7 @@ contract L1MessagesSender is Ownable { bytes32 poseidonMMRRoot, uint256 mmrSize, uint256 aggregatorId, - uint256 mmrId + uint128 mmrId ) internal { uint256[] memory message = new uint256[](4); diff --git a/l1/test/L1MessagesSender.t.sol b/l1/test/L1MessagesSender.t.sol index 5349dcd..104555b 100644 --- a/l1/test/L1MessagesSender.t.sol +++ b/l1/test/L1MessagesSender.t.sol @@ -35,7 +35,7 @@ contract L1MessagesSenderTest is Test { // This aggregator id must exist in the factory uint256 aggregatorId = 1; - uint256 mmrId = 4; + uint128 mmrId = 4; // Value must be greater than 0 sender.sendPoseidonMMRTreeToL2{value: 1}(aggregatorId, mmrId);