mirror of
https://github.com/vacp2p/rln-interep-contract.git
synced 2025-02-28 14:10:35 +00:00
440 lines
46 KiB
JSON
440 lines
46 KiB
JSON
{
|
|
"address": "0xf1F12331aF91E04ea488C941BDF313d278Dc662e",
|
|
"abi": [
|
|
{
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "address",
|
|
"name": "contractAddress",
|
|
"type": "address"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "merkleTreeDepth",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"internalType": "struct IInterep.Verifier[]",
|
|
"name": "_verifiers",
|
|
"type": "tuple[]"
|
|
}
|
|
],
|
|
"stateMutability": "nonpayable",
|
|
"type": "constructor"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "groupId",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "bytes32",
|
|
"name": "provider",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "bytes32",
|
|
"name": "name",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "root",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": true,
|
|
"internalType": "uint8",
|
|
"name": "depth",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"name": "GroupUpdated",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": false,
|
|
"internalType": "uint256",
|
|
"name": "nullifierHash",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "NullifierHashAdded",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"anonymous": false,
|
|
"inputs": [
|
|
{
|
|
"indexed": true,
|
|
"internalType": "uint256",
|
|
"name": "groupId",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"indexed": false,
|
|
"internalType": "bytes32",
|
|
"name": "signal",
|
|
"type": "bytes32"
|
|
}
|
|
],
|
|
"name": "ProofVerified",
|
|
"type": "event"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "groupId",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "getDepth",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "groupId",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "getRoot",
|
|
"outputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "",
|
|
"type": "uint256"
|
|
}
|
|
],
|
|
"name": "groups",
|
|
"outputs": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "provider",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "name",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "root",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "depth",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"components": [
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "provider",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "name",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "root",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "depth",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"internalType": "struct IInterep.Group[]",
|
|
"name": "_groups",
|
|
"type": "tuple[]"
|
|
}
|
|
],
|
|
"name": "updateGroups",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint8",
|
|
"name": "",
|
|
"type": "uint8"
|
|
}
|
|
],
|
|
"name": "verifiers",
|
|
"outputs": [
|
|
{
|
|
"internalType": "contract IVerifier",
|
|
"name": "",
|
|
"type": "address"
|
|
}
|
|
],
|
|
"stateMutability": "view",
|
|
"type": "function"
|
|
},
|
|
{
|
|
"inputs": [
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "groupId",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "bytes32",
|
|
"name": "signal",
|
|
"type": "bytes32"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "nullifierHash",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256",
|
|
"name": "externalNullifier",
|
|
"type": "uint256"
|
|
},
|
|
{
|
|
"internalType": "uint256[8]",
|
|
"name": "proof",
|
|
"type": "uint256[8]"
|
|
}
|
|
],
|
|
"name": "verifyProof",
|
|
"outputs": [],
|
|
"stateMutability": "nonpayable",
|
|
"type": "function"
|
|
}
|
|
],
|
|
"transactionHash": "0x8746281d1df195ea9177b44f148e4932fe1e0341cb986d2fe0fb6defabbf2263",
|
|
"receipt": {
|
|
"to": null,
|
|
"from": "0xabD73e893D0398772f1a679B86C3148f724546ec",
|
|
"contractAddress": "0xf1F12331aF91E04ea488C941BDF313d278Dc662e",
|
|
"transactionIndex": 0,
|
|
"gasUsed": "1097158",
|
|
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
"blockHash": "0x90490daf3a37c8488696641d1258cb31dde94da32add02fe38b9303965fa3c5e",
|
|
"transactionHash": "0x8746281d1df195ea9177b44f148e4932fe1e0341cb986d2fe0fb6defabbf2263",
|
|
"logs": [],
|
|
"blockNumber": 27,
|
|
"cumulativeGasUsed": "1097158",
|
|
"status": 1,
|
|
"byzantium": true
|
|
},
|
|
"args": [
|
|
[
|
|
{
|
|
"contractAddress": "0x0d15c8DF0f8D424F014A23D5DE65Ed3015fFC8CC",
|
|
"merkleTreeDepth": 20
|
|
}
|
|
]
|
|
],
|
|
"numDeployments": 1,
|
|
"solcInputHash": "b8e33ba299e95051cdf4858cd81bbca9",
|
|
"metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"contractAddress\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"merkleTreeDepth\",\"type\":\"uint8\"}],\"internalType\":\"struct IInterep.Verifier[]\",\"name\":\"_verifiers\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"provider\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"}],\"name\":\"GroupUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nullifierHash\",\"type\":\"uint256\"}],\"name\":\"NullifierHashAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"signal\",\"type\":\"bytes32\"}],\"name\":\"ProofVerified\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"}],\"name\":\"getDepth\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"}],\"name\":\"getRoot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"groups\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"provider\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"provider\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"}],\"internalType\":\"struct IInterep.Group[]\",\"name\":\"_groups\",\"type\":\"tuple[]\"}],\"name\":\"updateGroups\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"verifiers\",\"outputs\":[{\"internalType\":\"contract IVerifier\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"signal\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"nullifierHash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"externalNullifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256[8]\",\"name\":\"proof\",\"type\":\"uint256[8]\"}],\"name\":\"verifyProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Initializes the Semaphore verifiers used to verify the user's ZK proofs.\",\"params\":{\"_verifiers\":\": List of Semaphore verifiers (address and related Merkle tree depth).\"}},\"getDepth(uint256)\":{\"details\":\"See {IInterep-getDepth}.\"},\"getRoot(uint256)\":{\"details\":\"See {IInterep-getRoot}.\"},\"updateGroups((bytes32,bytes32,uint256,uint8)[])\":{\"details\":\"See {IInterep-updateGroups}.\"},\"verifyProof(uint256,bytes32,uint256,uint256,uint256[8])\":{\"details\":\"See {IInterep-verifyProof}.\"}},\"stateVariables\":{\"verifiers\":{\"details\":\"Gets a tree depth and returns its verifier address.\"}},\"version\":1},\"userdoc\":{\"events\":{\"NullifierHashAdded(uint256)\":{\"notice\":\"Emitted when a proof is verified correctly and a new nullifier hash is added.\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/InterepTest.sol\":\"InterepTest\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@interep/contracts/IInterep.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\n/// @title Interep interface.\\n/// @dev Interface of a Interep contract.\\ninterface IInterep {\\n struct Verifier {\\n address contractAddress;\\n uint8 merkleTreeDepth;\\n }\\n\\n struct Group {\\n bytes32 provider;\\n bytes32 name;\\n uint256 root;\\n uint8 depth;\\n }\\n\\n /// @dev Emitted when a Semaphore proof is verified.\\n /// @param groupId: Id of the group.\\n /// @param signal: Semaphore signal.\\n event ProofVerified(uint256 indexed groupId, bytes32 signal);\\n\\n /// @dev Emitted when an Interep group is updated.\\n /// @param groupId: Id of the group.\\n /// @param provider: Provider of the group.\\n /// @param name: Name of the group.\\n /// @param root: Root hash of the tree.\\n /// @param depth: Depth of the tree.\\n event GroupUpdated(\\n uint256 groupId,\\n bytes32 indexed provider,\\n bytes32 indexed name,\\n uint256 root,\\n uint8 indexed depth\\n );\\n\\n /// @dev Updates the Interep groups.\\n /// @param groups: List of Interep groups.\\n function updateGroups(Group[] calldata groups) external;\\n\\n /// @dev Saves the nullifier hash to avoid double signaling and emits an event\\n /// if the zero-knowledge proof is valid.\\n /// @param groupId: Id of the group.\\n /// @param signal: Semaphore signal.\\n /// @param nullifierHash: Nullifier hash.\\n /// @param externalNullifier: External nullifier.\\n /// @param proof: Zero-knowledge proof.\\n function verifyProof(\\n uint256 groupId,\\n bytes32 signal,\\n uint256 nullifierHash,\\n uint256 externalNullifier,\\n uint256[8] calldata proof\\n ) external;\\n\\n /// @dev Returns the root hash of an Interep group.\\n /// @param groupId: Id of the group.\\n /// @return Root hash of the group.\\n function getRoot(uint256 groupId) external view returns (uint256);\\n\\n /// @dev Returns the tree depth of an Interep group.\\n /// @param groupId: Id of the group.\\n /// @return Tree depth of the group.\\n function getDepth(uint256 groupId) external view returns (uint8);\\n}\\n\",\"keccak256\":\"0xd3279ce9fbbb58b7567f66d18735f81df7e8ee61c677e9dd739d3a4823e31c5d\",\"license\":\"MIT\"},\"@semaphore-protocol/contracts/base/SemaphoreConstants.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nuint256 constant SNARK_SCALAR_FIELD = 21888242871839275222246405745257275088548364400416034343698204186575808495617;\\n\",\"keccak256\":\"0xe6b5681413ca90c626c619c996eed0aaff7f532f6217c6e594cf1ace7586e5fc\",\"license\":\"MIT\"},\"@semaphore-protocol/contracts/base/SemaphoreCore.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport \\\"../interfaces/ISemaphoreCore.sol\\\";\\nimport \\\"../interfaces/IVerifier.sol\\\";\\n\\n/// @title Semaphore core contract.\\n/// @notice Minimal code to allow users to signal their endorsement of an arbitrary string.\\n/// @dev The following code verifies that the proof is correct and saves the hash of the\\n/// nullifier to prevent double-signaling. External nullifier and Merkle trees (i.e. groups) must be\\n/// managed externally.\\ncontract SemaphoreCore is ISemaphoreCore {\\n /// @dev Gets a nullifier hash and returns true or false.\\n /// It is used to prevent double-signaling.\\n mapping(uint256 => bool) internal nullifierHashes;\\n\\n /// @dev Asserts that no nullifier already exists and if the zero-knowledge proof is valid.\\n /// Otherwise it reverts.\\n /// @param signal: Semaphore signal.\\n /// @param root: Root of the Merkle tree.\\n /// @param nullifierHash: Nullifier hash.\\n /// @param externalNullifier: External nullifier.\\n /// @param proof: Zero-knowledge proof.\\n /// @param verifier: Verifier address.\\n function _verifyProof(\\n bytes32 signal,\\n uint256 root,\\n uint256 nullifierHash,\\n uint256 externalNullifier,\\n uint256[8] calldata proof,\\n IVerifier verifier\\n ) internal view {\\n require(!nullifierHashes[nullifierHash], \\\"SemaphoreCore: you cannot use the same nullifier twice\\\");\\n\\n uint256 signalHash = _hashSignal(signal);\\n\\n verifier.verifyProof(\\n [proof[0], proof[1]],\\n [[proof[2], proof[3]], [proof[4], proof[5]]],\\n [proof[6], proof[7]],\\n [root, nullifierHash, signalHash, externalNullifier]\\n );\\n }\\n\\n /// @dev Stores the nullifier hash to prevent double-signaling.\\n /// Attention! Remember to call it when you verify a proof if you\\n /// need to prevent double-signaling.\\n /// @param nullifierHash: Semaphore nullifier hash.\\n function _saveNullifierHash(uint256 nullifierHash) internal {\\n nullifierHashes[nullifierHash] = true;\\n }\\n\\n /// @dev Creates a keccak256 hash of the signal.\\n /// @param signal: Semaphore signal.\\n /// @return Hash of the signal.\\n function _hashSignal(bytes32 signal) private pure returns (uint256) {\\n return uint256(keccak256(abi.encodePacked(signal))) >> 8;\\n }\\n}\\n\",\"keccak256\":\"0xfdbafead5b1d90b18e8922dfd32e8901bddf9c212df105b8dbc5c3d295050310\",\"license\":\"MIT\"},\"@semaphore-protocol/contracts/interfaces/ISemaphoreCore.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\n/// @title SemaphoreCore interface.\\n/// @dev Interface of SemaphoreCore contract.\\ninterface ISemaphoreCore {\\n /// @notice Emitted when a proof is verified correctly and a new nullifier hash is added.\\n /// @param nullifierHash: Hash of external and identity nullifiers.\\n event NullifierHashAdded(uint256 nullifierHash);\\n}\\n\",\"keccak256\":\"0xa24d1f4b3e7235006022eeef857ed3ff180720bf15d88fe8c503095accf6791e\",\"license\":\"MIT\"},\"@semaphore-protocol/contracts/interfaces/IVerifier.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\n/// @title Verifier interface.\\n/// @dev Interface of Verifier contract.\\ninterface IVerifier {\\n function verifyProof(\\n uint256[2] memory a,\\n uint256[2][2] memory b,\\n uint256[2] memory c,\\n uint256[4] memory input\\n ) external view;\\n}\\n\",\"keccak256\":\"0x0da7a9c98d6d8b183b9c43032e06196e4cb748b636bd3e25564c1a5f16f01455\",\"license\":\"MIT\"},\"contracts/InterepTest.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport \\\"@interep/contracts/IInterep.sol\\\";\\nimport \\\"@semaphore-protocol/contracts/interfaces/IVerifier.sol\\\";\\nimport \\\"@semaphore-protocol/contracts/base/SemaphoreCore.sol\\\";\\nimport \\\"@semaphore-protocol/contracts/base/SemaphoreConstants.sol\\\";\\n\\ncontract InterepTest is IInterep, SemaphoreCore {\\n /// @dev Gets a tree depth and returns its verifier address.\\n mapping(uint8 => IVerifier) public verifiers;\\n\\n mapping(uint256 => Group) public groups;\\n\\n /// @dev Checks if there is a verifier for the given tree depth.\\n /// @param depth: Depth of the tree.\\n modifier onlySupportedDepth(uint8 depth) {\\n require(\\n address(verifiers[depth]) != address(0),\\n \\\"Interep: tree depth is not supported\\\"\\n );\\n _;\\n }\\n\\n /// @dev Initializes the Semaphore verifiers used to verify the user's ZK proofs.\\n /// @param _verifiers: List of Semaphore verifiers (address and related Merkle tree depth).\\n constructor(Verifier[] memory _verifiers) {\\n for (uint8 i = 0; i < _verifiers.length; i++) {\\n verifiers[_verifiers[i].merkleTreeDepth] = IVerifier(\\n _verifiers[i].contractAddress\\n );\\n }\\n }\\n\\n /// @dev See {IInterep-updateGroups}.\\n function updateGroups(Group[] calldata _groups) external override {\\n for (uint8 i = 0; i < _groups.length; i++) {\\n uint256 groupId = uint256(\\n keccak256(\\n abi.encodePacked(_groups[i].provider, _groups[i].name)\\n )\\n ) % SNARK_SCALAR_FIELD;\\n\\n _updateGroup(groupId, _groups[i]);\\n }\\n }\\n\\n /// @dev See {IInterep-getRoot}.\\n function getRoot(uint256 groupId) public view override returns (uint256) {\\n return groups[groupId].root;\\n }\\n\\n /// @dev See {IInterep-getDepth}.\\n function getDepth(uint256 groupId) public view override returns (uint8) {\\n return groups[groupId].depth;\\n }\\n\\n /// @dev Updates an Interep group.\\n /// @param groupId: Id of the group.\\n /// @param group: Group data.\\n function _updateGroup(uint256 groupId, Group calldata group) private {\\n groups[groupId] = group;\\n\\n emit GroupUpdated(\\n groupId,\\n group.provider,\\n group.name,\\n group.root,\\n group.depth\\n );\\n }\\n\\n /// @dev See {IInterep-verifyProof}.\\n function verifyProof(\\n uint256 groupId,\\n bytes32 signal,\\n uint256 nullifierHash,\\n uint256 externalNullifier,\\n uint256[8] calldata proof\\n ) external override {\\n uint256 root = getRoot(groupId);\\n uint8 depth = getDepth(groupId);\\n\\n require(depth != 0, \\\"Interep: group does not exist\\\");\\n\\n IVerifier verifier = verifiers[depth];\\n\\n _verifyProof(\\n signal,\\n root,\\n nullifierHash,\\n externalNullifier,\\n proof,\\n verifier\\n );\\n\\n // NOTE: After @interep/contracts is updated to use @semaphore-protocol/contracts v2,6.1, the logic to saveNullifierHash will change\\n // ref: https://github.com/semaphore-protocol/semaphore/blob/68779e90a0db120d9c36143c5f48ca6fd1a2a159/packages/contracts/contracts/interfaces/ISemaphore.sol#L23\\n // https://github.com/semaphore-protocol/semaphore/blob/68779e90a0db120d9c36143c5f48ca6fd1a2a159/packages/contracts/contracts/Semaphore.sol#L162-L171\\n // Till then, downgrading semaphore-protocol/contracts to v2.0.0\\n _saveNullifierHash(nullifierHash);\\n\\n emit ProofVerified(groupId, signal);\\n }\\n}\\n\",\"keccak256\":\"0x3dc5e95cba1bd4812ff88ac89f5e1dd2165bff9c319bf2d530680617ac65b86b\",\"license\":\"MIT\"}},\"version\":1}",
|
|
"bytecode": "0x60806040523480156200001157600080fd5b50604051620016af380380620016af83398181016040528101906200003791906200038f565b60005b81518160ff161015620000fd57818160ff168151811062000060576200005f620003e0565b5b60200260200101516000015160016000848460ff1681518110620000895762000088620003e0565b5b60200260200101516020015160ff1660ff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080620000f4906200043e565b9150506200003a565b50506200046c565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b62000169826200011e565b810181811067ffffffffffffffff821117156200018b576200018a6200012f565b5b80604052505050565b6000620001a062000105565b9050620001ae82826200015e565b919050565b600067ffffffffffffffff821115620001d157620001d06200012f565b5b602082029050602081019050919050565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200021982620001ec565b9050919050565b6200022b816200020c565b81146200023757600080fd5b50565b6000815190506200024b8162000220565b92915050565b600060ff82169050919050565b620002698162000251565b81146200027557600080fd5b50565b60008151905062000289816200025e565b92915050565b600060408284031215620002a857620002a7620001e7565b5b620002b4604062000194565b90506000620002c6848285016200023a565b6000830152506020620002dc8482850162000278565b60208301525092915050565b6000620002ff620002f984620001b3565b62000194565b90508083825260208201905060408402830185811115620003255762000324620001e2565b5b835b818110156200035257806200033d88826200028f565b84526020840193505060408101905062000327565b5050509392505050565b600082601f83011262000374576200037362000119565b5b815162000386848260208601620002e8565b91505092915050565b600060208284031215620003a857620003a76200010f565b5b600082015167ffffffffffffffff811115620003c957620003c862000114565b5b620003d7848285016200035c565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006200044b8262000251565b915060ff82036200046157620004606200040f565b5b600182019050919050565b611233806200047c6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80632d69be981461006757806358bdf0f4146100975780636673e849146100b357806375e618c9146100cf57806396324bd4146100ff5780639b24b3b014610132575b600080fd5b610081600480360381019061007c9190610753565b610162565b60405161008e91906107ff565b60405180910390f35b6100b160048036038101906100ac919061087f565b610195565b005b6100cd60048036038101906100c8919061095a565b61027d565b005b6100e960048036038101906100e491906109d6565b610374565b6040516100f69190610a12565b60405180910390f35b610119600480360381019061011491906109d6565b6103a1565b6040516101299493929190610a4b565b60405180910390f35b61014c600480360381019061014791906109d6565b6103de565b6040516101599190610a90565b60405180910390f35b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60005b828290508160ff1610156102785760007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000184848460ff168181106101df576101de610aab565b5b9050608002016000013585858560ff168181106101ff576101fe610aab565b5b9050608002016020013560405160200161021a929190610afb565b6040516020818303038152906040528051906020012060001c61023d9190610b56565b90506102648185858560ff1681811061025957610258610aab565b5b9050608002016103fe565b50808061027090610bb6565b915050610198565b505050565b6000610288866103de565b9050600061029587610374565b905060008160ff16036102dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102d490610c3c565b60405180910390fd5b6000600160008360ff1660ff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610329878488888886610482565b610332866106ab565b877f102229041138505f4cecdadc8e3ac1cd92c55870c17371050fc00bdb08889801886040516103629190610c5c565b60405180910390a25050505050505050565b60006002600083815260200190815260200160002060030160009054906101000a900460ff169050919050565b60026020528060005260406000206000915090508060000154908060010154908060020154908060030160009054906101000a900460ff16905084565b600060026000838152602001908152602001600020600201549050919050565b8060026000848152602001908152602001600020818161041e9190610ea5565b9050508060600160208101906104349190610753565b60ff16816020013582600001357f3c0faca11540ab6635a2fc029595f2f4ffdd340883eea6c374bf74a68eef5c7d858560400135604051610476929190610eb3565b60405180910390a45050565b60008085815260200190815260200160002060009054906101000a900460ff16156104e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d990610f4e565b60405180910390fd5b60006104ed876106d9565b90508173ffffffffffffffffffffffffffffffffffffffff16635fe8c13b60405180604001604052808660006008811061052a57610529610aab565b5b602002013581526020018660016008811061054857610547610aab565b5b6020020135815250604051806040016040528060405180604001604052808960026008811061057a57610579610aab565b5b602002013581526020018960036008811061059857610597610aab565b5b602002013581525081526020016040518060400160405280896004600881106105c4576105c3610aab565b5b60200201358152602001896005600881106105e2576105e1610aab565b5b602002013581525081525060405180604001604052808860066008811061060c5761060b610aab565b5b602002013581526020018860076008811061062a57610629610aab565b5b602002013581525060405180608001604052808c81526020018b81526020018781526020018a8152506040518563ffffffff1660e01b8152600401610672949392919061119b565b60006040518083038186803b15801561068a57600080fd5b505afa15801561069e573d6000803e3d6000fd5b5050505050505050505050565b600160008083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006008826040516020016106ee91906111e2565b6040516020818303038152906040528051906020012060001c901c9050919050565b600080fd5b600080fd5b600060ff82169050919050565b6107308161071a565b811461073b57600080fd5b50565b60008135905061074d81610727565b92915050565b60006020828403121561076957610768610710565b5b60006107778482850161073e565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006107c56107c06107bb84610780565b6107a0565b610780565b9050919050565b60006107d7826107aa565b9050919050565b60006107e9826107cc565b9050919050565b6107f9816107de565b82525050565b600060208201905061081460008301846107f0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261083f5761083e61081a565b5b8235905067ffffffffffffffff81111561085c5761085b61081f565b5b60208301915083608082028301111561087857610877610824565b5b9250929050565b6000806020838503121561089657610895610710565b5b600083013567ffffffffffffffff8111156108b4576108b3610715565b5b6108c085828601610829565b92509250509250929050565b6000819050919050565b6108df816108cc565b81146108ea57600080fd5b50565b6000813590506108fc816108d6565b92915050565b6000819050919050565b61091581610902565b811461092057600080fd5b50565b6000813590506109328161090c565b92915050565b60008190508260206008028201111561095457610953610824565b5b92915050565b6000806000806000610180868803121561097757610976610710565b5b6000610985888289016108ed565b955050602061099688828901610923565b94505060406109a7888289016108ed565b93505060606109b8888289016108ed565b92505060806109c988828901610938565b9150509295509295909350565b6000602082840312156109ec576109eb610710565b5b60006109fa848285016108ed565b91505092915050565b610a0c8161071a565b82525050565b6000602082019050610a276000830184610a03565b92915050565b610a3681610902565b82525050565b610a45816108cc565b82525050565b6000608082019050610a606000830187610a2d565b610a6d6020830186610a2d565b610a7a6040830185610a3c565b610a876060830184610a03565b95945050505050565b6000602082019050610aa56000830184610a3c565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b610af5610af082610902565b610ada565b82525050565b6000610b078285610ae4565b602082019150610b178284610ae4565b6020820191508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610b61826108cc565b9150610b6c836108cc565b925082610b7c57610b7b610b27565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610bc18261071a565b915060ff8203610bd457610bd3610b87565b5b600182019050919050565b600082825260208201905092915050565b7f496e74657265703a2067726f757020646f6573206e6f74206578697374000000600082015250565b6000610c26601d83610bdf565b9150610c3182610bf0565b602082019050919050565b60006020820190508181036000830152610c5581610c19565b9050919050565b6000602082019050610c716000830184610a2d565b92915050565b60008135610c848161090c565b80915050919050565b60008160001b9050919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610cc684610c8d565b9350801983169250808416831791505092915050565b6000610ce782610902565b9050919050565b60008160001c9050919050565b6000610d0682610cee565b9050919050565b610d1682610cdc565b610d29610d2282610cfb565b8354610c9a565b8255505050565b60008135610d3d816108d6565b80915050919050565b6000610d61610d5c610d57846108cc565b6107a0565b6108cc565b9050919050565b6000819050919050565b610d7b82610d46565b610d8e610d8782610d68565b8354610c9a565b8255505050565b60008135610da281610727565b80915050919050565b600060ff610db884610c8d565b9350801983169250808416831791505092915050565b6000610de9610de4610ddf8461071a565b6107a0565b61071a565b9050919050565b6000819050919050565b610e0382610dce565b610e16610e0f82610df0565b8354610dab565b8255505050565b600081016000830180610e2f81610c77565b9050610e3b8184610d0d565b505050600181016020830180610e5081610c77565b9050610e5c8184610d0d565b505050600281016040830180610e7181610d30565b9050610e7d8184610d72565b505050600381016060830180610e9281610d95565b9050610e9e8184610dfa565b5050505050565b610eaf8282610e1d565b5050565b6000604082019050610ec86000830185610a3c565b610ed56020830184610a3c565b9392505050565b7f53656d6170686f7265436f72653a20796f752063616e6e6f742075736520746860008201527f652073616d65206e756c6c696669657220747769636500000000000000000000602082015250565b6000610f38603683610bdf565b9150610f4382610edc565b604082019050919050565b60006020820190508181036000830152610f6781610f2b565b9050919050565b600060029050919050565b600081905092915050565b6000819050919050565b610f97816108cc565b82525050565b6000610fa98383610f8e565b60208301905092915050565b6000602082019050919050565b610fcb81610f6e565b610fd58184610f79565b9250610fe082610f84565b8060005b83811015611011578151610ff88782610f9d565b965061100383610fb5565b925050600181019050610fe4565b505050505050565b600060029050919050565b600081905092915050565b6000819050919050565b600081905092915050565b61104d81610f6e565b6110578184611039565b925061106282610f84565b8060005b8381101561109357815161107a8782610f9d565b965061108583610fb5565b925050600181019050611066565b505050505050565b60006110a78383611044565b60408301905092915050565b6000602082019050919050565b6110c981611019565b6110d38184611024565b92506110de8261102f565b8060005b8381101561110f5781516110f6878261109b565b9650611101836110b3565b9250506001810190506110e2565b505050505050565b600060049050919050565b600081905092915050565b6000819050919050565b6000602082019050919050565b61114d81611117565b6111578184611122565b92506111628261112d565b8060005b8381101561119357815161117a8782610f9d565b965061118583611137565b925050600181019050611166565b505050505050565b6000610180820190506111b16000830187610fc2565b6111be60408301866110c0565b6111cb60c0830185610fc2565b6111d9610100830184611144565b95945050505050565b60006111ee8284610ae4565b6020820191508190509291505056fea26469706673582212208d1362cb13f7080492c87710946a71e4ccf4af97b151c6f3176b62dba326fca064736f6c634300080f0033",
|
|
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100625760003560e01c80632d69be981461006757806358bdf0f4146100975780636673e849146100b357806375e618c9146100cf57806396324bd4146100ff5780639b24b3b014610132575b600080fd5b610081600480360381019061007c9190610753565b610162565b60405161008e91906107ff565b60405180910390f35b6100b160048036038101906100ac919061087f565b610195565b005b6100cd60048036038101906100c8919061095a565b61027d565b005b6100e960048036038101906100e491906109d6565b610374565b6040516100f69190610a12565b60405180910390f35b610119600480360381019061011491906109d6565b6103a1565b6040516101299493929190610a4b565b60405180910390f35b61014c600480360381019061014791906109d6565b6103de565b6040516101599190610a90565b60405180910390f35b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60005b828290508160ff1610156102785760007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000184848460ff168181106101df576101de610aab565b5b9050608002016000013585858560ff168181106101ff576101fe610aab565b5b9050608002016020013560405160200161021a929190610afb565b6040516020818303038152906040528051906020012060001c61023d9190610b56565b90506102648185858560ff1681811061025957610258610aab565b5b9050608002016103fe565b50808061027090610bb6565b915050610198565b505050565b6000610288866103de565b9050600061029587610374565b905060008160ff16036102dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102d490610c3c565b60405180910390fd5b6000600160008360ff1660ff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610329878488888886610482565b610332866106ab565b877f102229041138505f4cecdadc8e3ac1cd92c55870c17371050fc00bdb08889801886040516103629190610c5c565b60405180910390a25050505050505050565b60006002600083815260200190815260200160002060030160009054906101000a900460ff169050919050565b60026020528060005260406000206000915090508060000154908060010154908060020154908060030160009054906101000a900460ff16905084565b600060026000838152602001908152602001600020600201549050919050565b8060026000848152602001908152602001600020818161041e9190610ea5565b9050508060600160208101906104349190610753565b60ff16816020013582600001357f3c0faca11540ab6635a2fc029595f2f4ffdd340883eea6c374bf74a68eef5c7d858560400135604051610476929190610eb3565b60405180910390a45050565b60008085815260200190815260200160002060009054906101000a900460ff16156104e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d990610f4e565b60405180910390fd5b60006104ed876106d9565b90508173ffffffffffffffffffffffffffffffffffffffff16635fe8c13b60405180604001604052808660006008811061052a57610529610aab565b5b602002013581526020018660016008811061054857610547610aab565b5b6020020135815250604051806040016040528060405180604001604052808960026008811061057a57610579610aab565b5b602002013581526020018960036008811061059857610597610aab565b5b602002013581525081526020016040518060400160405280896004600881106105c4576105c3610aab565b5b60200201358152602001896005600881106105e2576105e1610aab565b5b602002013581525081525060405180604001604052808860066008811061060c5761060b610aab565b5b602002013581526020018860076008811061062a57610629610aab565b5b602002013581525060405180608001604052808c81526020018b81526020018781526020018a8152506040518563ffffffff1660e01b8152600401610672949392919061119b565b60006040518083038186803b15801561068a57600080fd5b505afa15801561069e573d6000803e3d6000fd5b5050505050505050505050565b600160008083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006008826040516020016106ee91906111e2565b6040516020818303038152906040528051906020012060001c901c9050919050565b600080fd5b600080fd5b600060ff82169050919050565b6107308161071a565b811461073b57600080fd5b50565b60008135905061074d81610727565b92915050565b60006020828403121561076957610768610710565b5b60006107778482850161073e565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006107c56107c06107bb84610780565b6107a0565b610780565b9050919050565b60006107d7826107aa565b9050919050565b60006107e9826107cc565b9050919050565b6107f9816107de565b82525050565b600060208201905061081460008301846107f0565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261083f5761083e61081a565b5b8235905067ffffffffffffffff81111561085c5761085b61081f565b5b60208301915083608082028301111561087857610877610824565b5b9250929050565b6000806020838503121561089657610895610710565b5b600083013567ffffffffffffffff8111156108b4576108b3610715565b5b6108c085828601610829565b92509250509250929050565b6000819050919050565b6108df816108cc565b81146108ea57600080fd5b50565b6000813590506108fc816108d6565b92915050565b6000819050919050565b61091581610902565b811461092057600080fd5b50565b6000813590506109328161090c565b92915050565b60008190508260206008028201111561095457610953610824565b5b92915050565b6000806000806000610180868803121561097757610976610710565b5b6000610985888289016108ed565b955050602061099688828901610923565b94505060406109a7888289016108ed565b93505060606109b8888289016108ed565b92505060806109c988828901610938565b9150509295509295909350565b6000602082840312156109ec576109eb610710565b5b60006109fa848285016108ed565b91505092915050565b610a0c8161071a565b82525050565b6000602082019050610a276000830184610a03565b92915050565b610a3681610902565b82525050565b610a45816108cc565b82525050565b6000608082019050610a606000830187610a2d565b610a6d6020830186610a2d565b610a7a6040830185610a3c565b610a876060830184610a03565b95945050505050565b6000602082019050610aa56000830184610a3c565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b610af5610af082610902565b610ada565b82525050565b6000610b078285610ae4565b602082019150610b178284610ae4565b6020820191508190509392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000610b61826108cc565b9150610b6c836108cc565b925082610b7c57610b7b610b27565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610bc18261071a565b915060ff8203610bd457610bd3610b87565b5b600182019050919050565b600082825260208201905092915050565b7f496e74657265703a2067726f757020646f6573206e6f74206578697374000000600082015250565b6000610c26601d83610bdf565b9150610c3182610bf0565b602082019050919050565b60006020820190508181036000830152610c5581610c19565b9050919050565b6000602082019050610c716000830184610a2d565b92915050565b60008135610c848161090c565b80915050919050565b60008160001b9050919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610cc684610c8d565b9350801983169250808416831791505092915050565b6000610ce782610902565b9050919050565b60008160001c9050919050565b6000610d0682610cee565b9050919050565b610d1682610cdc565b610d29610d2282610cfb565b8354610c9a565b8255505050565b60008135610d3d816108d6565b80915050919050565b6000610d61610d5c610d57846108cc565b6107a0565b6108cc565b9050919050565b6000819050919050565b610d7b82610d46565b610d8e610d8782610d68565b8354610c9a565b8255505050565b60008135610da281610727565b80915050919050565b600060ff610db884610c8d565b9350801983169250808416831791505092915050565b6000610de9610de4610ddf8461071a565b6107a0565b61071a565b9050919050565b6000819050919050565b610e0382610dce565b610e16610e0f82610df0565b8354610dab565b8255505050565b600081016000830180610e2f81610c77565b9050610e3b8184610d0d565b505050600181016020830180610e5081610c77565b9050610e5c8184610d0d565b505050600281016040830180610e7181610d30565b9050610e7d8184610d72565b505050600381016060830180610e9281610d95565b9050610e9e8184610dfa565b5050505050565b610eaf8282610e1d565b5050565b6000604082019050610ec86000830185610a3c565b610ed56020830184610a3c565b9392505050565b7f53656d6170686f7265436f72653a20796f752063616e6e6f742075736520746860008201527f652073616d65206e756c6c696669657220747769636500000000000000000000602082015250565b6000610f38603683610bdf565b9150610f4382610edc565b604082019050919050565b60006020820190508181036000830152610f6781610f2b565b9050919050565b600060029050919050565b600081905092915050565b6000819050919050565b610f97816108cc565b82525050565b6000610fa98383610f8e565b60208301905092915050565b6000602082019050919050565b610fcb81610f6e565b610fd58184610f79565b9250610fe082610f84565b8060005b83811015611011578151610ff88782610f9d565b965061100383610fb5565b925050600181019050610fe4565b505050505050565b600060029050919050565b600081905092915050565b6000819050919050565b600081905092915050565b61104d81610f6e565b6110578184611039565b925061106282610f84565b8060005b8381101561109357815161107a8782610f9d565b965061108583610fb5565b925050600181019050611066565b505050505050565b60006110a78383611044565b60408301905092915050565b6000602082019050919050565b6110c981611019565b6110d38184611024565b92506110de8261102f565b8060005b8381101561110f5781516110f6878261109b565b9650611101836110b3565b9250506001810190506110e2565b505050505050565b600060049050919050565b600081905092915050565b6000819050919050565b6000602082019050919050565b61114d81611117565b6111578184611122565b92506111628261112d565b8060005b8381101561119357815161117a8782610f9d565b965061118583611137565b925050600181019050611166565b505050505050565b6000610180820190506111b16000830187610fc2565b6111be60408301866110c0565b6111cb60c0830185610fc2565b6111d9610100830184611144565b95945050505050565b60006111ee8284610ae4565b6020820191508190509291505056fea26469706673582212208d1362cb13f7080492c87710946a71e4ccf4af97b151c6f3176b62dba326fca064736f6c634300080f0033",
|
|
"devdoc": {
|
|
"kind": "dev",
|
|
"methods": {
|
|
"constructor": {
|
|
"details": "Initializes the Semaphore verifiers used to verify the user's ZK proofs.",
|
|
"params": {
|
|
"_verifiers": ": List of Semaphore verifiers (address and related Merkle tree depth)."
|
|
}
|
|
},
|
|
"getDepth(uint256)": {
|
|
"details": "See {IInterep-getDepth}."
|
|
},
|
|
"getRoot(uint256)": {
|
|
"details": "See {IInterep-getRoot}."
|
|
},
|
|
"updateGroups((bytes32,bytes32,uint256,uint8)[])": {
|
|
"details": "See {IInterep-updateGroups}."
|
|
},
|
|
"verifyProof(uint256,bytes32,uint256,uint256,uint256[8])": {
|
|
"details": "See {IInterep-verifyProof}."
|
|
}
|
|
},
|
|
"stateVariables": {
|
|
"verifiers": {
|
|
"details": "Gets a tree depth and returns its verifier address."
|
|
}
|
|
},
|
|
"version": 1
|
|
},
|
|
"userdoc": {
|
|
"events": {
|
|
"NullifierHashAdded(uint256)": {
|
|
"notice": "Emitted when a proof is verified correctly and a new nullifier hash is added."
|
|
}
|
|
},
|
|
"kind": "user",
|
|
"methods": {},
|
|
"version": 1
|
|
},
|
|
"storageLayout": {
|
|
"storage": [
|
|
{
|
|
"astId": 650,
|
|
"contract": "contracts/InterepTest.sol:InterepTest",
|
|
"label": "nullifierHashes",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_mapping(t_uint256,t_bool)"
|
|
},
|
|
{
|
|
"astId": 1626,
|
|
"contract": "contracts/InterepTest.sol:InterepTest",
|
|
"label": "verifiers",
|
|
"offset": 0,
|
|
"slot": "1",
|
|
"type": "t_mapping(t_uint8,t_contract(IVerifier)792)"
|
|
},
|
|
{
|
|
"astId": 1631,
|
|
"contract": "contracts/InterepTest.sol:InterepTest",
|
|
"label": "groups",
|
|
"offset": 0,
|
|
"slot": "2",
|
|
"type": "t_mapping(t_uint256,t_struct(Group)175_storage)"
|
|
}
|
|
],
|
|
"types": {
|
|
"t_bool": {
|
|
"encoding": "inplace",
|
|
"label": "bool",
|
|
"numberOfBytes": "1"
|
|
},
|
|
"t_bytes32": {
|
|
"encoding": "inplace",
|
|
"label": "bytes32",
|
|
"numberOfBytes": "32"
|
|
},
|
|
"t_contract(IVerifier)792": {
|
|
"encoding": "inplace",
|
|
"label": "contract IVerifier",
|
|
"numberOfBytes": "20"
|
|
},
|
|
"t_mapping(t_uint256,t_bool)": {
|
|
"encoding": "mapping",
|
|
"key": "t_uint256",
|
|
"label": "mapping(uint256 => bool)",
|
|
"numberOfBytes": "32",
|
|
"value": "t_bool"
|
|
},
|
|
"t_mapping(t_uint256,t_struct(Group)175_storage)": {
|
|
"encoding": "mapping",
|
|
"key": "t_uint256",
|
|
"label": "mapping(uint256 => struct IInterep.Group)",
|
|
"numberOfBytes": "32",
|
|
"value": "t_struct(Group)175_storage"
|
|
},
|
|
"t_mapping(t_uint8,t_contract(IVerifier)792)": {
|
|
"encoding": "mapping",
|
|
"key": "t_uint8",
|
|
"label": "mapping(uint8 => contract IVerifier)",
|
|
"numberOfBytes": "32",
|
|
"value": "t_contract(IVerifier)792"
|
|
},
|
|
"t_struct(Group)175_storage": {
|
|
"encoding": "inplace",
|
|
"label": "struct IInterep.Group",
|
|
"members": [
|
|
{
|
|
"astId": 168,
|
|
"contract": "contracts/InterepTest.sol:InterepTest",
|
|
"label": "provider",
|
|
"offset": 0,
|
|
"slot": "0",
|
|
"type": "t_bytes32"
|
|
},
|
|
{
|
|
"astId": 170,
|
|
"contract": "contracts/InterepTest.sol:InterepTest",
|
|
"label": "name",
|
|
"offset": 0,
|
|
"slot": "1",
|
|
"type": "t_bytes32"
|
|
},
|
|
{
|
|
"astId": 172,
|
|
"contract": "contracts/InterepTest.sol:InterepTest",
|
|
"label": "root",
|
|
"offset": 0,
|
|
"slot": "2",
|
|
"type": "t_uint256"
|
|
},
|
|
{
|
|
"astId": 174,
|
|
"contract": "contracts/InterepTest.sol:InterepTest",
|
|
"label": "depth",
|
|
"offset": 0,
|
|
"slot": "3",
|
|
"type": "t_uint8"
|
|
}
|
|
],
|
|
"numberOfBytes": "128"
|
|
},
|
|
"t_uint256": {
|
|
"encoding": "inplace",
|
|
"label": "uint256",
|
|
"numberOfBytes": "32"
|
|
},
|
|
"t_uint8": {
|
|
"encoding": "inplace",
|
|
"label": "uint8",
|
|
"numberOfBytes": "1"
|
|
}
|
|
}
|
|
}
|
|
}
|