#[allow(unused_attributes)]
mod honk_verifier_inner {
use alloy::sol;
sol! {
#[sol(rpc)]
interface HonkVerifier {
function verify(bytes calldata proof, bytes32[] calldata publicInputs)
external
view
returns (bool);
error ProofLengthWrongWithLogN(uint256 logN, uint256 actualLength, uint256 expectedLength);
}
}
}
pub use honk_verifier_inner::HonkVerifier;
#[cfg(test)]
mod tests {
use alloy::sol_types::SolCall;
use super::*;
use crate::{
circuits::Circuit,
Artifacts,
};
#[test]
fn every_circuit_verifier_answers_verify() {
let artifacts = Artifacts::embedded();
for circuit in Circuit::ALL {
let methods = artifacts.method_identifiers(circuit.contract()).unwrap();
let found = methods
.get(HonkVerifier::verifyCall::SIGNATURE)
.unwrap_or_else(|| panic!("{} has no verify", circuit.contract()));
assert_eq!(
*found,
alloy::hex::encode(HonkVerifier::verifyCall::SELECTOR),
"{}.verify",
circuit.contract()
);
}
}
}