Skip to content

Commit

Permalink
Fix test contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzejkop committed Oct 13, 2023
1 parent 121cffc commit e61298e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/test/mock/SequencerVerifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ contract SequencerVerifier is ITreeVerifier {
uint256 internal constant SNARK_SCALAR_FIELD =
21888242871839275222246405745257275088548364400416034343698204186575808495617;

function verifyProof(uint256[8] memory proof, uint256[1] memory input) external {
function verifyProof(uint256[8] calldata proof, uint256[1] calldata input) external pure {
require(proof[0] % 2 == 0 && proof[1] % SNARK_SCALAR_FIELD == input[0], "Invalid Proof");
}
}
8 changes: 1 addition & 7 deletions src/utils/UnimplementedTreeVerifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@ contract UnimplementedTreeVerifier is ITreeVerifier {
/// with PublicInputNotInField the public input is not reduced.
/// @notice There is no return value. If the function does not revert, the
/// proof was succesfully verified.
/// @param proof the points (A, B, C) in EIP-197 format matching the output
/// of compressProof.
/// @param input the public input field elements in the scalar field Fr.
/// Elements must be reduced.
/// @custom:reverts UnsupportedOperation When called.
function verifyProof(uint256[8] memory proof, uint256[1] memory input) external pure {
delete proof;
delete input;
function verifyProof(uint256[8] calldata /*proof*/, uint256[1] calldata /*input*/) external pure {
revert UnsupportedOperation();
}
}

0 comments on commit e61298e

Please sign in to comment.