diff --git a/src/interfaces/IWorldID.sol b/src/interfaces/IWorldID.sol index 9266d15..4008725 100644 --- a/src/interfaces/IWorldID.sol +++ b/src/interfaces/IWorldID.sol @@ -25,5 +25,5 @@ interface IWorldID is IBaseWorldID { uint256 nullifierHash, uint256 externalNullifierHash, uint256[8] calldata proof - ) external; + ) external view; } diff --git a/src/test/mock/SimpleStateBridge.sol b/src/test/mock/SimpleStateBridge.sol index f1485bc..aff6f4e 100644 --- a/src/test/mock/SimpleStateBridge.sol +++ b/src/test/mock/SimpleStateBridge.sol @@ -20,16 +20,13 @@ contract SimpleStateBridge is IBridge, IWorldID { emit SetRootHistoryExpiry(expiryTime); } - event ProofVerified(uint256 indexed root); - error ProofNotVerified(); - function verifyProof(uint256 root, uint256, uint256, uint256, uint256[8] calldata proof) + function verifyProof(uint256, uint256, uint256, uint256, uint256[8] calldata proof) external + pure { - if (proof[0] % 2 == 0) { - emit ProofVerified(root); - } else { + if (proof[0] % 2 != 0) { revert ProofNotVerified(); } } diff --git a/src/test/router/WorldIDRouterStateBridge.t.sol b/src/test/router/WorldIDRouterStateBridge.t.sol index 1c7621f..1a6a1fc 100644 --- a/src/test/router/WorldIDRouterStateBridge.t.sol +++ b/src/test/router/WorldIDRouterStateBridge.t.sol @@ -90,10 +90,7 @@ contract WorldIDRouterStateBridge is WorldIDRouterTest { bool shouldSucceed = proof[0] % 2 == 0; bytes memory errorData = new bytes(0); - if (shouldSucceed) { - vm.expectEmit(true, true, true, true); - emit ProofVerified(root); - } else { + if (!shouldSucceed) { errorData = abi.encodeWithSelector(SimpleStateBridge.ProofNotVerified.selector); }