2024-01-10 15:12:06 +01:00
|
|
|
// SPDX-License-Identifier: MIT
|
2024-01-23 10:24:02 +01:00
|
|
|
pragma solidity 0.8.23;
|
2024-01-10 15:12:06 +01:00
|
|
|
|
2024-01-23 13:28:53 +01:00
|
|
|
import "./Groth16.sol";
|
2024-01-10 15:12:06 +01:00
|
|
|
|
2024-01-23 13:28:53 +01:00
|
|
|
contract TestVerifier is IGroth16Verifier {
|
2024-01-15 16:28:27 +01:00
|
|
|
bool private _proofsAreValid;
|
|
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
|
_proofsAreValid = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setProofsAreValid(bool proofsAreValid) public {
|
|
|
|
|
_proofsAreValid = proofsAreValid;
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-23 13:28:53 +01:00
|
|
|
function verify(
|
|
|
|
|
Groth16Proof calldata,
|
2024-01-23 12:50:14 +01:00
|
|
|
uint[] calldata
|
2024-01-15 16:28:27 +01:00
|
|
|
) external view returns (bool) {
|
|
|
|
|
return _proofsAreValid;
|
2024-01-10 15:12:06 +01:00
|
|
|
}
|
|
|
|
|
}
|