IVerifier
Git Source (opens in a new tab)
Basic interface for verifier contracts to: (1) expose verification fees and Wallet
address, (2) expose function to begin proof verification journey
Functions
getWallet
Gets verifier contract's associated Wallet
address
Does not necessarily have to conform to the exact Wallet
spec. since this address does not need to authorize the coordinator for spend
function getWallet() external view returns (address);
Returns
Name | Type | Description |
---|---|---|
<none> | address | Wallet address to receive proof verification payment |
isSupportedToken
Checks if token
is accepted payment method by verifier contract
function isSupportedToken(address token) external view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
token | address | token address |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | true if token is supported, else false |
fee
Gets proving fee denominated in token
Function isSupportedToken
is called first
function fee(address token) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
token | address | token address |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | proving fee denominated in token |
requestProofVerification
Request proof verification from verification contract
Verifier contract has to call verifyProof
on coordinator after a proof verification request
By this point, verifier contract has been paid for proof verification
function requestProofVerification(uint32 subscriptionId, uint32 interval, address node, bytes calldata proof)
external;
Parameters
Name | Type | Description |
---|---|---|
subscriptionId | uint32 | subscription ID |
interval | uint32 | subscription response interval |
node | address | response submitting node |
proof | bytes | provided response proof bytes |
receive
Enforce ETH deposits to IVerifier
-implementing contract
A verifier may still choose to not support ETH by returning false
for isSupportedToken(address(0))
receive() external payable;