From f909a475aa94da7e256d57053589956c138e2fc4 Mon Sep 17 00:00:00 2001 From: Luiz Date: Wed, 18 Feb 2026 12:22:10 -0300 Subject: [PATCH 1/6] emit event when setting implementation address --- src/contracts/StateProverPointer.sol | 11 +++++ test/Receiver.ethereum.t.sol | 4 ++ test/Receiver.t.sol | 60 ++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) diff --git a/src/contracts/StateProverPointer.sol b/src/contracts/StateProverPointer.sol index e48368c..7ad706a 100644 --- a/src/contracts/StateProverPointer.sol +++ b/src/contracts/StateProverPointer.sol @@ -16,6 +16,13 @@ bytes32 constant STATE_PROVER_POINTER_SLOT = bytes32(uint256(keccak256("eip7888. contract StateProverPointer is IStateProverPointer, Ownable { address internal _implementationAddress; + event ImplementationAddressSet( + uint256 indexed newVersion, + address newImplementationAddress, + bytes32 newCodeHash, + address oldImplementationAddress + ); + error NonIncreasingVersion(uint256 newVersion, uint256 oldVersion); error InvalidImplementationAddress(); @@ -62,6 +69,10 @@ contract StateProverPointer is IStateProverPointer, Ownable { _implementationAddress = _newImplementationAddress; _setCodeHash(_newImplementationAddress.codehash); + + emit ImplementationAddressSet( + newVersion, _newImplementationAddress, _newImplementationAddress.codehash, currentImplementationAddress + ); } function _setCodeHash(bytes32 _codeHash) internal { diff --git a/test/Receiver.ethereum.t.sol b/test/Receiver.ethereum.t.sol index 1bc5e9f..d27e631 100644 --- a/test/Receiver.ethereum.t.sol +++ b/test/Receiver.ethereum.t.sol @@ -132,6 +132,10 @@ contract ReceiverTest is Test { StateProverPointer stateProverPointer = new StateProverPointer(owner); vm.prank(owner); + vm.expectEmit(); + emit StateProverPointer.ImplementationAddressSet( + 1, address(parentToChildProver), parentToChildProver.codehash(), address(0) + ); stateProverPointer.setImplementationAddress(address(parentToChildProver)); bytes32 message = 0x0000000000000000000000000000000000000000000000000000000074657374; // "test" diff --git a/test/Receiver.t.sol b/test/Receiver.t.sol index 2def15b..f1ccf8b 100644 --- a/test/Receiver.t.sol +++ b/test/Receiver.t.sol @@ -108,6 +108,10 @@ contract ReceiverTest is Test { StateProverPointer stateProverPointer = new StateProverPointer(owner); vm.prank(owner); + vm.expectEmit(); + emit StateProverPointer.ImplementationAddressSet( + 1, address(childToParentProver), childToParentProver.codehash(), address(0) + ); stateProverPointer.setImplementationAddress(address(childToParentProver)); bytes32 message = 0x0000000000000000000000000000000000000000000000000000000074657374; // "test" @@ -184,6 +188,10 @@ contract ReceiverTest is Test { StateProverPointer stateProverPointer = new StateProverPointer(owner); vm.prank(owner); + vm.expectEmit(); + emit StateProverPointer.ImplementationAddressSet( + 1, address(parentToChildProver), parentToChildProver.codehash(), address(0) + ); stateProverPointer.setImplementationAddress(address(parentToChildProver)); bytes32 message = 0x0000000000000000000000000000000000000000000000000000000074657374; // "test" @@ -256,6 +264,10 @@ contract ReceiverTest is Test { StateProverPointer stateProverPointer = new StateProverPointer(owner); vm.prank(owner); + vm.expectEmit(); + emit StateProverPointer.ImplementationAddressSet( + 1, address(childToParentProver), childToParentProver.codehash(), address(0) + ); stateProverPointer.setImplementationAddress(address(childToParentProver)); bytes32 message = 0x0000000000000000000000000000000000000000000000000000000074657374; // "test" @@ -330,6 +342,10 @@ contract ReceiverTest is Test { StateProverPointer stateProverPointer = new StateProverPointer(owner); vm.prank(owner); + vm.expectEmit(); + emit StateProverPointer.ImplementationAddressSet( + 1, address(childToParentProver), childToParentProver.codehash(), address(0) + ); stateProverPointer.setImplementationAddress(address(childToParentProver)); uint256 expectedSlot = uint256(keccak256("eip7888.pointer.slot")) - 1; @@ -403,6 +419,10 @@ contract ReceiverTest is Test { StateProverPointer stateProverPointer = new StateProverPointer(owner); vm.prank(owner); + vm.expectEmit(); + emit StateProverPointer.ImplementationAddressSet( + 1, address(childToParentProver), childToParentProver.codehash(), address(0) + ); stateProverPointer.setImplementationAddress(address(childToParentProver)); uint256 expectedSlot = uint256(keccak256("eip7888.pointer.slot")) - 1; @@ -464,6 +484,10 @@ contract ReceiverTest is Test { address arbParentToChildProverPointerAddress; vm.prank(owner); + vm.expectEmit(); + emit StateProverPointer.ImplementationAddressSet( + 1, address(childToParentProver), childToParentProver.codehash(), address(0) + ); stateProverPointer.setImplementationAddress(address(childToParentProver)); // Update the Arbitrum Prover (ParentToChildProver) copy on OP chain { @@ -619,6 +643,10 @@ contract ReceiverTest is Test { StateProverPointer stateProverPointer = new StateProverPointer(owner); vm.prank(owner); + vm.expectEmit(); + emit StateProverPointer.ImplementationAddressSet( + 1, address(childToParentProver), childToParentProver.codehash(), address(0) + ); stateProverPointer.setImplementationAddress(address(childToParentProver)); uint256 expectedSlot = uint256(keccak256("eip7888.pointer.slot")) - 1; @@ -696,6 +724,10 @@ contract ReceiverTest is Test { address arbParentToChildProverPointerAddress; vm.prank(owner); + vm.expectEmit(); + emit StateProverPointer.ImplementationAddressSet( + 1, address(childToParentProver), childToParentProver.codehash(), address(0) + ); stateProverPointer.setImplementationAddress(address(childToParentProver)); // Update the Arbitrum Prover (ParentToChildProver) copy on ZKSync chain { @@ -847,6 +879,10 @@ contract ReceiverTest is Test { StateProverPointer stateProverPointer = new StateProverPointer(owner); vm.prank(owner); + vm.expectEmit(); + emit StateProverPointer.ImplementationAddressSet( + 1, address(childToParentProver), childToParentProver.codehash(), address(0) + ); stateProverPointer.setImplementationAddress(address(childToParentProver)); uint256 expectedSlot = uint256(keccak256("eip7888.pointer.slot")) - 1; @@ -924,6 +960,10 @@ contract ReceiverTest is Test { address arbParentToChildProverPointerAddress; vm.prank(owner); + vm.expectEmit(); + emit StateProverPointer.ImplementationAddressSet( + 1, address(childToParentProver), childToParentProver.codehash(), address(0) + ); stateProverPointer.setImplementationAddress(address(childToParentProver)); // Update the Arbitrum Prover (ParentToChildProver) copy on Linea chain { @@ -1075,6 +1115,10 @@ contract ReceiverTest is Test { StateProverPointer stateProverPointer = new StateProverPointer(owner); vm.prank(owner); + vm.expectEmit(); + emit StateProverPointer.ImplementationAddressSet( + 1, address(childToParentProver), childToParentProver.codehash(), address(0) + ); stateProverPointer.setImplementationAddress(address(childToParentProver)); uint256 expectedSlot = uint256(keccak256("eip7888.pointer.slot")) - 1; @@ -1152,6 +1196,10 @@ contract ReceiverTest is Test { address arbParentToChildProverPointerAddress; vm.prank(owner); + vm.expectEmit(); + emit StateProverPointer.ImplementationAddressSet( + 1, address(childToParentProver), childToParentProver.codehash(), address(0) + ); stateProverPointer.setImplementationAddress(address(childToParentProver)); // Update the Arbitrum Prover (ParentToChildProver) copy on Scroll chain { @@ -1309,6 +1357,10 @@ contract ReceiverTest is Test { StateProverPointer stateProverPointer = new StateProverPointer(owner); vm.prank(owner); + vm.expectEmit(); + emit StateProverPointer.ImplementationAddressSet( + 1, address(parentToChildProver), parentToChildProver.codehash(), address(0) + ); stateProverPointer.setImplementationAddress(address(parentToChildProver)); // Load the E2E proof data @@ -1365,6 +1417,10 @@ contract ReceiverTest is Test { StateProverPointer stateProverPointer = new StateProverPointer(owner); vm.prank(owner); + vm.expectEmit(); + emit StateProverPointer.ImplementationAddressSet( + 1, address(parentToChildProver), parentToChildProver.codehash(), address(0) + ); stateProverPointer.setImplementationAddress(address(parentToChildProver)); // Load the E2E proof data @@ -1443,6 +1499,10 @@ contract ReceiverTest is Test { StateProverPointer stateProverPointer = new StateProverPointer(owner); vm.prank(owner); + vm.expectEmit(); + emit StateProverPointer.ImplementationAddressSet( + 1, address(parentToChildProver), parentToChildProver.codehash(), address(0) + ); stateProverPointer.setImplementationAddress(address(parentToChildProver)); // Read the SMT proof data From 264a13097cd168f315345964cb0a891643634386 Mon Sep 17 00:00:00 2001 From: Luiz Date: Wed, 18 Feb 2026 12:50:11 -0300 Subject: [PATCH 2/6] up --- test/Receiver.ethereum.t.sol | 2 +- test/Receiver.t.sol | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/Receiver.ethereum.t.sol b/test/Receiver.ethereum.t.sol index d27e631..c9d97b8 100644 --- a/test/Receiver.ethereum.t.sol +++ b/test/Receiver.ethereum.t.sol @@ -134,7 +134,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); emit StateProverPointer.ImplementationAddressSet( - 1, address(parentToChildProver), parentToChildProver.codehash(), address(0) + 1, address(parentToChildProver), address(parentToChildProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(parentToChildProver)); diff --git a/test/Receiver.t.sol b/test/Receiver.t.sol index f1ccf8b..ec2a269 100644 --- a/test/Receiver.t.sol +++ b/test/Receiver.t.sol @@ -190,7 +190,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); emit StateProverPointer.ImplementationAddressSet( - 1, address(parentToChildProver), parentToChildProver.codehash(), address(0) + 1, address(parentToChildProver), address(parentToChildProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(parentToChildProver)); @@ -1359,7 +1359,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); emit StateProverPointer.ImplementationAddressSet( - 1, address(parentToChildProver), parentToChildProver.codehash(), address(0) + 1, address(parentToChildProver), address(parentToChildProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(parentToChildProver)); @@ -1419,7 +1419,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); emit StateProverPointer.ImplementationAddressSet( - 1, address(parentToChildProver), parentToChildProver.codehash(), address(0) + 1, address(parentToChildProver), address(parentToChildProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(parentToChildProver)); @@ -1501,7 +1501,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); emit StateProverPointer.ImplementationAddressSet( - 1, address(parentToChildProver), parentToChildProver.codehash(), address(0) + 1, address(parentToChildProver), address(parentToChildProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(parentToChildProver)); From 69325f2a6115bb311b7856bdebf1f69a2b245efa Mon Sep 17 00:00:00 2001 From: Luiz Date: Wed, 18 Feb 2026 12:56:10 -0300 Subject: [PATCH 3/6] up --- test/Receiver.t.sol | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/test/Receiver.t.sol b/test/Receiver.t.sol index ec2a269..b5066f0 100644 --- a/test/Receiver.t.sol +++ b/test/Receiver.t.sol @@ -110,7 +110,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); emit StateProverPointer.ImplementationAddressSet( - 1, address(childToParentProver), childToParentProver.codehash(), address(0) + 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -266,7 +266,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); emit StateProverPointer.ImplementationAddressSet( - 1, address(childToParentProver), childToParentProver.codehash(), address(0) + 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -344,7 +344,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); emit StateProverPointer.ImplementationAddressSet( - 1, address(childToParentProver), childToParentProver.codehash(), address(0) + 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -421,7 +421,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); emit StateProverPointer.ImplementationAddressSet( - 1, address(childToParentProver), childToParentProver.codehash(), address(0) + 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -486,7 +486,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); emit StateProverPointer.ImplementationAddressSet( - 1, address(childToParentProver), childToParentProver.codehash(), address(0) + 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); // Update the Arbitrum Prover (ParentToChildProver) copy on OP chain @@ -645,7 +645,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); emit StateProverPointer.ImplementationAddressSet( - 1, address(childToParentProver), childToParentProver.codehash(), address(0) + 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -726,7 +726,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); emit StateProverPointer.ImplementationAddressSet( - 1, address(childToParentProver), childToParentProver.codehash(), address(0) + 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); // Update the Arbitrum Prover (ParentToChildProver) copy on ZKSync chain @@ -881,7 +881,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); emit StateProverPointer.ImplementationAddressSet( - 1, address(childToParentProver), childToParentProver.codehash(), address(0) + 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -962,7 +962,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); emit StateProverPointer.ImplementationAddressSet( - 1, address(childToParentProver), childToParentProver.codehash(), address(0) + 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); // Update the Arbitrum Prover (ParentToChildProver) copy on Linea chain @@ -1117,7 +1117,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); emit StateProverPointer.ImplementationAddressSet( - 1, address(childToParentProver), childToParentProver.codehash(), address(0) + 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -1198,7 +1198,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); emit StateProverPointer.ImplementationAddressSet( - 1, address(childToParentProver), childToParentProver.codehash(), address(0) + 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); // Update the Arbitrum Prover (ParentToChildProver) copy on Scroll chain From 4126dd2e5f78a5adac8fdc91b44079e008d42a29 Mon Sep 17 00:00:00 2001 From: Luiz Date: Wed, 18 Feb 2026 13:20:00 -0300 Subject: [PATCH 4/6] up --- src/contracts/StateProverPointer.sol | 7 ------- src/contracts/interfaces/IStateProverPointer.sol | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/contracts/StateProverPointer.sol b/src/contracts/StateProverPointer.sol index 7ad706a..243a386 100644 --- a/src/contracts/StateProverPointer.sol +++ b/src/contracts/StateProverPointer.sol @@ -16,13 +16,6 @@ bytes32 constant STATE_PROVER_POINTER_SLOT = bytes32(uint256(keccak256("eip7888. contract StateProverPointer is IStateProverPointer, Ownable { address internal _implementationAddress; - event ImplementationAddressSet( - uint256 indexed newVersion, - address newImplementationAddress, - bytes32 newCodeHash, - address oldImplementationAddress - ); - error NonIncreasingVersion(uint256 newVersion, uint256 oldVersion); error InvalidImplementationAddress(); diff --git a/src/contracts/interfaces/IStateProverPointer.sol b/src/contracts/interfaces/IStateProverPointer.sol index 7e53bb1..75e1ada 100644 --- a/src/contracts/interfaces/IStateProverPointer.sol +++ b/src/contracts/interfaces/IStateProverPointer.sol @@ -8,6 +8,14 @@ pragma solidity 0.8.30; /// If the pointer's prover is updated, the new prover MUST have a higher IStateProver::version() than the old one. /// These pointers are always referred to by their address on their home chain. interface IStateProverPointer { + /// @notice Emitted when the implementation address is set. + event ImplementationAddressSet( + uint256 indexed newVersion, + address newImplementationAddress, + bytes32 newCodeHash, + address oldImplementationAddress + ); + /// @notice Return the code hash of the latest version of the prover. function implementationCodeHash() external view returns (bytes32); From bf604b5becfd1810d68bac32bfc446a4540d52fa Mon Sep 17 00:00:00 2001 From: Luiz Date: Wed, 18 Feb 2026 15:59:37 -0300 Subject: [PATCH 5/6] up --- test/Receiver.ethereum.t.sol | 2 +- test/Receiver.t.sol | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/test/Receiver.ethereum.t.sol b/test/Receiver.ethereum.t.sol index c9d97b8..ffe648a 100644 --- a/test/Receiver.ethereum.t.sol +++ b/test/Receiver.ethereum.t.sol @@ -133,7 +133,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); - emit StateProverPointer.ImplementationAddressSet( + emit IStateProverPointer.ImplementationAddressSet( 1, address(parentToChildProver), address(parentToChildProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(parentToChildProver)); diff --git a/test/Receiver.t.sol b/test/Receiver.t.sol index b5066f0..64806bd 100644 --- a/test/Receiver.t.sol +++ b/test/Receiver.t.sol @@ -109,7 +109,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); - emit StateProverPointer.ImplementationAddressSet( + emit IStateProverPointer.ImplementationAddressSet( 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -189,7 +189,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); - emit StateProverPointer.ImplementationAddressSet( + emit IStateProverPointer.ImplementationAddressSet( 1, address(parentToChildProver), address(parentToChildProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(parentToChildProver)); @@ -265,7 +265,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); - emit StateProverPointer.ImplementationAddressSet( + emit IStateProverPointer.ImplementationAddressSet( 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -343,7 +343,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); - emit StateProverPointer.ImplementationAddressSet( + emit IStateProverPointer.ImplementationAddressSet( 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -420,7 +420,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); - emit StateProverPointer.ImplementationAddressSet( + emit IStateProverPointer.ImplementationAddressSet( 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -485,7 +485,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); - emit StateProverPointer.ImplementationAddressSet( + emit IStateProverPointer.ImplementationAddressSet( 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -644,7 +644,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); - emit StateProverPointer.ImplementationAddressSet( + emit IStateProverPointer.ImplementationAddressSet( 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -725,7 +725,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); - emit StateProverPointer.ImplementationAddressSet( + emit IStateProverPointer.ImplementationAddressSet( 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -880,7 +880,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); - emit StateProverPointer.ImplementationAddressSet( + emit IStateProverPointer.ImplementationAddressSet( 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -961,7 +961,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); - emit StateProverPointer.ImplementationAddressSet( + emit IStateProverPointer.ImplementationAddressSet( 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -1116,7 +1116,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); - emit StateProverPointer.ImplementationAddressSet( + emit IStateProverPointer.ImplementationAddressSet( 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -1197,7 +1197,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); - emit StateProverPointer.ImplementationAddressSet( + emit IStateProverPointer.ImplementationAddressSet( 1, address(childToParentProver), address(childToParentProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(childToParentProver)); @@ -1358,7 +1358,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); - emit StateProverPointer.ImplementationAddressSet( + emit IStateProverPointer.ImplementationAddressSet( 1, address(parentToChildProver), address(parentToChildProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(parentToChildProver)); @@ -1418,7 +1418,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); - emit StateProverPointer.ImplementationAddressSet( + emit IStateProverPointer.ImplementationAddressSet( 1, address(parentToChildProver), address(parentToChildProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(parentToChildProver)); @@ -1500,7 +1500,7 @@ contract ReceiverTest is Test { vm.prank(owner); vm.expectEmit(); - emit StateProverPointer.ImplementationAddressSet( + emit IStateProverPointer.ImplementationAddressSet( 1, address(parentToChildProver), address(parentToChildProver).codehash, address(0) ); stateProverPointer.setImplementationAddress(address(parentToChildProver)); From c8e82b83183c879d6b60bcf616c16e2089cdb995 Mon Sep 17 00:00:00 2001 From: Luiz Date: Fri, 20 Feb 2026 14:41:04 -0300 Subject: [PATCH 6/6] update to ERC natspec --- src/contracts/interfaces/IStateProverPointer.sol | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/contracts/interfaces/IStateProverPointer.sol b/src/contracts/interfaces/IStateProverPointer.sol index 75e1ada..63db210 100644 --- a/src/contracts/interfaces/IStateProverPointer.sol +++ b/src/contracts/interfaces/IStateProverPointer.sol @@ -8,11 +8,12 @@ pragma solidity 0.8.30; /// If the pointer's prover is updated, the new prover MUST have a higher IStateProver::version() than the old one. /// These pointers are always referred to by their address on their home chain. interface IStateProverPointer { - /// @notice Emitted when the implementation address is set. + /// @notice Emitted when the pointer is set to a new implementation. + /// MUST be emitted when the pointer is set event ImplementationAddressSet( uint256 indexed newVersion, - address newImplementationAddress, - bytes32 newCodeHash, + address indexed newImplementationAddress, + bytes32 indexed newCodeHash, address oldImplementationAddress );