@unirep/contracts
Version:
Client library for contracts related functions which are used in UniRep protocol.
169 lines (168 loc) • 6.81 kB
JSON
{
"_format": "hh-sol-artifact-1",
"contractName": "BaseVerifierHelper",
"sourceName": "contracts/verifierHelpers/BaseVerifierHelper.sol",
"abi": [
{
"inputs": [
{
"internalType": "contract Unirep",
"name": "_unirep",
"type": "address"
},
{
"internalType": "contract IVerifier",
"name": "_verifier",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "AttesterInvalid",
"type": "error"
},
{
"inputs": [],
"name": "CallerInvalid",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint48",
"name": "chainId",
"type": "uint48"
}
],
"name": "ChainIdNotMatch",
"type": "error"
},
{
"inputs": [],
"name": "InvalidEpoch",
"type": "error"
},
{
"inputs": [],
"name": "InvalidEpochKey",
"type": "error"
},
{
"inputs": [],
"name": "InvalidProof",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "stateTreeRoot",
"type": "uint256"
}
],
"name": "InvalidStateTreeRoot",
"type": "error"
},
{
"inputs": [],
"name": "SNARK_SCALAR_FIELD",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "chainid",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "control",
"type": "uint256"
}
],
"name": "decodeEpochKeyControl",
"outputs": [
{
"internalType": "uint8",
"name": "nonce",
"type": "uint8"
},
{
"internalType": "uint48",
"name": "epoch",
"type": "uint48"
},
{
"internalType": "uint160",
"name": "attesterId",
"type": "uint160"
},
{
"internalType": "bool",
"name": "revealNonce",
"type": "bool"
},
{
"internalType": "uint48",
"name": "chainId",
"type": "uint48"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "data",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "shiftBits",
"type": "uint8"
},
{
"internalType": "uint8",
"name": "variableBits",
"type": "uint8"
}
],
"name": "shiftAndParse",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
}
],
"bytecode": "0x60a060405234801561001057600080fd5b506040516103b83803806103b883398101604081905261002f91610084565b600080546001600160a01b039384166001600160a01b0319918216179091556001805492909316911617905565ffffffffffff46166080526100be565b6001600160a01b038116811461008157600080fd5b50565b6000806040838503121561009757600080fd5b82516100a28161006c565b60208401519092506100b38161006c565b809150509250929050565b6080516102df6100d9600039600061010401526102df6000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806325c2cd121461005157806354af684e1461008b578063c60ee8a4146100ec578063cd84980e146100ff575b600080fd5b6100787f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000181565b6040519081526020015b60405180910390f35b61009e6100993660046101dd565b610126565b6040805160ff909616865265ffffffffffff948516602087015273ffffffffffffffffffffffffffffffffffffffff909316928501929092521515606084015216608082015260a001610082565b6100786100fa36600461020c565b6101b9565b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6000808080806008603060a060016024856101428c82886101b9565b9a5061014e8682610277565b905061015b8c82876101b9565b99506101678582610277565b90506101748c82866101b9565b98506101808482610277565b905061018d8c82856101b9565b1515975061019b8382610277565b90506101a88c82846101b9565b965050505050505091939590929450565b60006101cc600160ff841681901b610296565b8360ff1685901c1690509392505050565b6000602082840312156101ef57600080fd5b5035919050565b803560ff8116811461020757600080fd5b919050565b60008060006060848603121561022157600080fd5b83359250610231602085016101f6565b915061023f604085016101f6565b90509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff818116838216019081111561029057610290610248565b92915050565b818103818111156102905761029061024856fea2646970667358221220ed07de1fe7ea5fbd9ac83ac4bed2b07a692f7674842e7768af2739d55651549b64736f6c63430008130033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806325c2cd121461005157806354af684e1461008b578063c60ee8a4146100ec578063cd84980e146100ff575b600080fd5b6100787f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000181565b6040519081526020015b60405180910390f35b61009e6100993660046101dd565b610126565b6040805160ff909616865265ffffffffffff948516602087015273ffffffffffffffffffffffffffffffffffffffff909316928501929092521515606084015216608082015260a001610082565b6100786100fa36600461020c565b6101b9565b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6000808080806008603060a060016024856101428c82886101b9565b9a5061014e8682610277565b905061015b8c82876101b9565b99506101678582610277565b90506101748c82866101b9565b98506101808482610277565b905061018d8c82856101b9565b1515975061019b8382610277565b90506101a88c82846101b9565b965050505050505091939590929450565b60006101cc600160ff841681901b610296565b8360ff1685901c1690509392505050565b6000602082840312156101ef57600080fd5b5035919050565b803560ff8116811461020757600080fd5b919050565b60008060006060848603121561022157600080fd5b83359250610231602085016101f6565b915061023f604085016101f6565b90509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff818116838216019081111561029057610290610248565b92915050565b818103818111156102905761029061024856fea2646970667358221220ed07de1fe7ea5fbd9ac83ac4bed2b07a692f7674842e7768af2739d55651549b64736f6c63430008130033",
"linkReferences": {},
"deployedLinkReferences": {}
}