diff --git a/.openzeppelin/polygon.json b/.openzeppelin/polygon.json index 087b5de3..a56ab1bd 100644 --- a/.openzeppelin/polygon.json +++ b/.openzeppelin/polygon.json @@ -19,6 +19,11 @@ "address": "0xbEeB6bB53504E8C872023451fd0D23BeF01d320B", "txHash": "0xcfe2d7a705bdf4edfd484bea180b51fa975ac8a56b18f3aff792fc20c7029c94", "kind": "transparent" + }, + { + "address": "0x394d1dad46907bd54d15926A1ab4535EF2BF47b1", + "txHash": "0xe424b229477957e531e4b123b2e58b3f4f90c69fff94f46bce70978b6bb95a28", + "kind": "transparent" } ], "impls": { @@ -1820,6 +1825,338 @@ ] } } + }, + "d9c70eef5343493e18fcb5a1a11134ab01ea2bcf36ceb17d2bf8eccb7f04616e": { + "address": "0x30651eb67DF0De459BcBf9DB61312d5DFfA09501", + "txHash": "0x593684f9446deaa9b3f7fb58b0ddf74931ea07e62dd05d90196470a5d88850a0", + "layout": { + "solcVersion": "0.8.20", + "storage": [], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint64)dyn_storage": { + "label": "uint64[]", + "numberOfBytes": "32" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes_storage": { + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(ICircuitValidator)273": { + "label": "contract ICircuitValidator", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)2073_storage))": { + "label": "mapping(address => mapping(uint64 => struct ZKPVerifierBase.Proof))", + "numberOfBytes": "32" + }, + "t_mapping(t_contract(ICircuitValidator)273,t_bool)": { + "label": "mapping(contract ICircuitValidator => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_uint256)": { + "label": "mapping(string => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_address)": { + "label": "mapping(uint64 => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_bool)": { + "label": "mapping(uint64 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(Proof)2073_storage)": { + "label": "mapping(uint64 => struct ZKPVerifierBase.Proof)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(ZKPRequest)486_storage)": { + "label": "mapping(uint64 => struct IZKPVerifier.ZKPRequest)", + "numberOfBytes": "32" + }, + "t_string_memory_ptr": { + "label": "string", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(InitializableStorage)105_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Ownable2StepStorage)14_storage": { + "label": "struct Ownable2StepUpgradeable.Ownable2StepStorage", + "members": [ + { + "label": "_pendingOwner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(OwnableStorage)55_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Proof)2073_storage": { + "label": "struct ZKPVerifierBase.Proof", + "members": [ + { + "label": "isVerified", + "type": "t_bool", + "offset": 0, + "slot": "0" + }, + { + "label": "storageFields", + "type": "t_mapping(t_string_memory_ptr,t_uint256)", + "offset": 0, + "slot": "1" + }, + { + "label": "validatorVersion", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "blockNumber", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "blockTimestamp", + "type": "t_uint256", + "offset": 0, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_struct(RequestDisableStorage)1864_storage": { + "label": "struct RequestDisableable.RequestDisableStorage", + "members": [ + { + "label": "_requestDisabling", + "type": "t_mapping(t_uint64,t_bool)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RequestOwnershipStorage)1902_storage": { + "label": "struct RequestOwnership.RequestOwnershipStorage", + "members": [ + { + "label": "_requestOwners", + "type": "t_mapping(t_uint64,t_address)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(ValidatorWhitelistStorage)2010_storage": { + "label": "struct ValidatorWhitelist.ValidatorWhitelistStorage", + "members": [ + { + "label": "_validatorWhitelist", + "type": "t_mapping(t_contract(ICircuitValidator)273,t_bool)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(ZKPRequest)486_storage": { + "label": "struct IZKPVerifier.ZKPRequest", + "members": [ + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "validator", + "type": "t_contract(ICircuitValidator)273", + "offset": 0, + "slot": "1" + }, + { + "label": "data", + "type": "t_bytes_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(ZKPVerifierStorage)2090_storage": { + "label": "struct ZKPVerifierBase.ZKPVerifierStorage", + "members": [ + { + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)2073_storage))", + "offset": 0, + "slot": "0" + }, + { + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)486_storage)", + "offset": 0, + "slot": "1" + }, + { + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + } + }, + "namespaces": { + "erc7201:iden3.storage.ValidatorWhitelist": [ + { + "contract": "ValidatorWhitelist", + "label": "_validatorWhitelist", + "type": "t_mapping(t_contract(ICircuitValidator)273,t_bool)", + "src": "contracts/verifiers/ValidatorWhitelist.sol:12", + "offset": 0, + "slot": "0" + } + ], + "erc7201:iden3.storage.RequestDisableable": [ + { + "contract": "RequestDisableable", + "label": "_requestDisabling", + "type": "t_mapping(t_uint64,t_bool)", + "src": "contracts/verifiers/RequestDisableable.sol:10", + "offset": 0, + "slot": "0" + } + ], + "erc7201:iden3.storage.RequestOwnership.sol": [ + { + "contract": "RequestOwnership", + "label": "_requestOwners", + "type": "t_mapping(t_uint64,t_address)", + "src": "contracts/verifiers/RequestOwnership.sol:10", + "offset": 0, + "slot": "0" + } + ], + "erc7201:iden3.storage.ZKPVerifier": [ + { + "contract": "ZKPVerifierBase", + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)2073_storage))", + "src": "contracts/verifiers/ZKPVerifierBase.sol:21", + "offset": 0, + "slot": "0" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)486_storage)", + "src": "contracts/verifiers/ZKPVerifierBase.sol:22", + "offset": 0, + "slot": "1" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "src": "contracts/verifiers/ZKPVerifierBase.sol:23", + "offset": 0, + "slot": "2" + } + ], + "erc7201:openzeppelin.storage.Ownable2Step": [ + { + "contract": "Ownable2StepUpgradeable", + "label": "_pendingOwner", + "type": "t_address", + "src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:23", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Ownable": [ + { + "contract": "OwnableUpgradeable", + "label": "_owner", + "type": "t_address", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:24", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } } } } diff --git a/.openzeppelin/unknown-80002.json b/.openzeppelin/unknown-80002.json index cd22cefd..31458ab9 100644 --- a/.openzeppelin/unknown-80002.json +++ b/.openzeppelin/unknown-80002.json @@ -24,6 +24,11 @@ "address": "0x3d3763eC0a50CE1AdF83d0b5D99FBE0e3fEB43fb", "txHash": "0x6f7ce46112bc313702670847dff265d2cd514937c5146f62af1f6a2e6c755df7", "kind": "transparent" + }, + { + "address": "0x1B20320042b29AE5c1a3ADc1674cb6bF8760530f", + "txHash": "0x4583932f1dd37d447ad846b9a1d21e7ab96360b019204629071f7bbe14c2ce90", + "kind": "transparent" } ], "impls": { @@ -467,6 +472,338 @@ ] } } + }, + "d9c70eef5343493e18fcb5a1a11134ab01ea2bcf36ceb17d2bf8eccb7f04616e": { + "address": "0x932B85726B72050561bDd083816c97A667477800", + "txHash": "0x441a235ace703f15ada1c056e6f9b6cf1c9bde8018e8efb6024cd6868cdbc7ed", + "layout": { + "solcVersion": "0.8.20", + "storage": [], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint64)dyn_storage": { + "label": "uint64[]", + "numberOfBytes": "32" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes_storage": { + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(ICircuitValidator)273": { + "label": "contract ICircuitValidator", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)2073_storage))": { + "label": "mapping(address => mapping(uint64 => struct ZKPVerifierBase.Proof))", + "numberOfBytes": "32" + }, + "t_mapping(t_contract(ICircuitValidator)273,t_bool)": { + "label": "mapping(contract ICircuitValidator => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_uint256)": { + "label": "mapping(string => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_address)": { + "label": "mapping(uint64 => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_bool)": { + "label": "mapping(uint64 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(Proof)2073_storage)": { + "label": "mapping(uint64 => struct ZKPVerifierBase.Proof)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(ZKPRequest)486_storage)": { + "label": "mapping(uint64 => struct IZKPVerifier.ZKPRequest)", + "numberOfBytes": "32" + }, + "t_string_memory_ptr": { + "label": "string", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(InitializableStorage)105_storage": { + "label": "struct Initializable.InitializableStorage", + "members": [ + { + "label": "_initialized", + "type": "t_uint64", + "offset": 0, + "slot": "0" + }, + { + "label": "_initializing", + "type": "t_bool", + "offset": 8, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Ownable2StepStorage)14_storage": { + "label": "struct Ownable2StepUpgradeable.Ownable2StepStorage", + "members": [ + { + "label": "_pendingOwner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(OwnableStorage)55_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Proof)2073_storage": { + "label": "struct ZKPVerifierBase.Proof", + "members": [ + { + "label": "isVerified", + "type": "t_bool", + "offset": 0, + "slot": "0" + }, + { + "label": "storageFields", + "type": "t_mapping(t_string_memory_ptr,t_uint256)", + "offset": 0, + "slot": "1" + }, + { + "label": "validatorVersion", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "blockNumber", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "blockTimestamp", + "type": "t_uint256", + "offset": 0, + "slot": "4" + } + ], + "numberOfBytes": "160" + }, + "t_struct(RequestDisableStorage)1864_storage": { + "label": "struct RequestDisableable.RequestDisableStorage", + "members": [ + { + "label": "_requestDisabling", + "type": "t_mapping(t_uint64,t_bool)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(RequestOwnershipStorage)1902_storage": { + "label": "struct RequestOwnership.RequestOwnershipStorage", + "members": [ + { + "label": "_requestOwners", + "type": "t_mapping(t_uint64,t_address)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(ValidatorWhitelistStorage)2010_storage": { + "label": "struct ValidatorWhitelist.ValidatorWhitelistStorage", + "members": [ + { + "label": "_validatorWhitelist", + "type": "t_mapping(t_contract(ICircuitValidator)273,t_bool)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(ZKPRequest)486_storage": { + "label": "struct IZKPVerifier.ZKPRequest", + "members": [ + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "validator", + "type": "t_contract(ICircuitValidator)273", + "offset": 0, + "slot": "1" + }, + { + "label": "data", + "type": "t_bytes_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(ZKPVerifierStorage)2090_storage": { + "label": "struct ZKPVerifierBase.ZKPVerifierStorage", + "members": [ + { + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)2073_storage))", + "offset": 0, + "slot": "0" + }, + { + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)486_storage)", + "offset": 0, + "slot": "1" + }, + { + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + } + }, + "namespaces": { + "erc7201:iden3.storage.ValidatorWhitelist": [ + { + "contract": "ValidatorWhitelist", + "label": "_validatorWhitelist", + "type": "t_mapping(t_contract(ICircuitValidator)273,t_bool)", + "src": "contracts/verifiers/ValidatorWhitelist.sol:12", + "offset": 0, + "slot": "0" + } + ], + "erc7201:iden3.storage.RequestDisableable": [ + { + "contract": "RequestDisableable", + "label": "_requestDisabling", + "type": "t_mapping(t_uint64,t_bool)", + "src": "contracts/verifiers/RequestDisableable.sol:10", + "offset": 0, + "slot": "0" + } + ], + "erc7201:iden3.storage.RequestOwnership.sol": [ + { + "contract": "RequestOwnership", + "label": "_requestOwners", + "type": "t_mapping(t_uint64,t_address)", + "src": "contracts/verifiers/RequestOwnership.sol:10", + "offset": 0, + "slot": "0" + } + ], + "erc7201:iden3.storage.ZKPVerifier": [ + { + "contract": "ZKPVerifierBase", + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)2073_storage))", + "src": "contracts/verifiers/ZKPVerifierBase.sol:21", + "offset": 0, + "slot": "0" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)486_storage)", + "src": "contracts/verifiers/ZKPVerifierBase.sol:22", + "offset": 0, + "slot": "1" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "src": "contracts/verifiers/ZKPVerifierBase.sol:23", + "offset": 0, + "slot": "2" + } + ], + "erc7201:openzeppelin.storage.Ownable2Step": [ + { + "contract": "Ownable2StepUpgradeable", + "label": "_pendingOwner", + "type": "t_address", + "src": "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol:23", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Ownable": [ + { + "contract": "OwnableUpgradeable", + "label": "_owner", + "type": "t_address", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:24", + "offset": 0, + "slot": "0" + } + ], + "erc7201:openzeppelin.storage.Initializable": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint64", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:69", + "offset": 0, + "slot": "0" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:73", + "offset": 8, + "slot": "0" + } + ] + } + } } } } diff --git a/README.md b/README.md index c10cd096..a242de9b 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,14 @@ | **Polygon Amoy testnet** | 0x3d3763eC0a50CE1AdF83d0b5D99FBE0e3fEB43fb | | Polygon Mumbai testnet | 0x16A1ae4c460C0a42f0a87e69c526c61599B28BC9 | + +## Universal Verifier contract + +| Network | Address | +|:--------------------------:|:------------------------------------------:| +| **Polygon Mainnet** | 0x394d1dad46907bd54d15926A1ab4535EF2BF47b1 | +| **Polygon Amoy testnet** | 0x1B20320042b29AE5c1a3ADc1674cb6bF8760530f | + ## Security Audits 1. [Nethermind](https://nethermind.io/smart-contracts-audits/) has performed a security audit of our core smart contracts (State & Smt) and compiled a report on Apr 18, 2023: