ZkVerifier
Inherits: Ownable, IZkVerifier
State Variables
verifier
IRiscZeroVerifier public verifier;
imageId
bytes32 public imageId;
Functions
constructor
constructor(address _owner, bytes32 _imageId, address _verifier) Ownable(_owner);
setVerifier
Sets the _risc0Verifier address
Admin check is needed on the external method
function setVerifier(address _risc0Verifier) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
_risc0Verifier | address | the new IRiscZeroVerifier address |
setImageId
Sets the image id
Admin check is needed on the external method
function setImageId(bytes32 _imageId) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
_imageId | bytes32 | the new image id |
verifyInput
Verifies an input
function verifyInput(bytes calldata journalEntry, bytes calldata seal) external view;
Parameters
Name | Type | Description |
---|---|---|
journalEntry | bytes | the risc0 journal entry |
seal | bytes | the risc0 seal |
_checkAddresses
function _checkAddresses() private view;
__verify
function __verify(bytes calldata journalEntry, bytes calldata seal) private view;
Events
ImageSet
event ImageSet(bytes32 _imageId);
VerifierSet
event VerifierSet(address indexed oldVerifier, address indexed newVerifier);
Errors
ZkVerifier_ImageNotValid
error ZkVerifier_ImageNotValid();
ZkVerifier_InputNotValid
error ZkVerifier_InputNotValid();
ZkVerifier_VerifierNotSet
error ZkVerifier_VerifierNotSet();