diff --git a/.openzeppelin/unknown-80002.json b/.openzeppelin/unknown-80002.json index 54c4483c..04a87536 100644 --- a/.openzeppelin/unknown-80002.json +++ b/.openzeppelin/unknown-80002.json @@ -73,6 +73,56 @@ { "address": "0xfcc86A79fCb057A8e55C6B853dff9479C3cf607c", "kind": "transparent" + }, + { + "address": "0x8fd985a84B8A1f58Ac44F0e0097b7af2e114ED1B", + "txHash": "0xded58f636f68b6812eba01533f75a2d95769770d414484556d561b0b4a676c17", + "kind": "transparent" + }, + { + "address": "0x9912F2f93FBd3E3d9cC309485D6Eb230eE170F0d", + "txHash": "0x4de51c92c2f3c9df69621d153b1a2ff0e0bcd020f5d1f7aed66e770b1386f5a1", + "kind": "transparent" + }, + { + "address": "0xf10251F30D49C1B235bF0597d141454F885808Da", + "txHash": "0x136298ff1cdcedbfd9fd3b9a23fe4b27b16c582f641a898b978a21ced930f4c4", + "kind": "transparent" + }, + { + "address": "0x8DcD458Ba432EcA24Dd214e867932d46186CB764", + "txHash": "0x56b2158e426fa0bff6ce762cf2161cf72bc8ae3ff5fa3878af96ec7c7dc8e1a9", + "kind": "transparent" + }, + { + "address": "0x5B1b7e5a253640B42F50A1B2DE889AC21e7d6544", + "txHash": "0x239b460563bf888cfb907da7a5a486e80f320a1c4407430ce0317e83f509ebad", + "kind": "transparent" + }, + { + "address": "0x1Fe2751061012d0b8ED8FCEBA0B4dA3f3854114B", + "txHash": "0x995c13b5cc56a6be9a274674d937cc735c51b77f860c151e00de7f2d214ee8ea", + "kind": "transparent" + }, + { + "address": "0xf9DA11c04Ebe1ac53e10244e37Ba94DfDc471eF3", + "txHash": "0x7eaa65d380d36a058df282a1e531b8109585dd3842d0858ea201549f526190e5", + "kind": "transparent" + }, + { + "address": "0x8cB6da0D7567128d764CcD21bdBC8F449c81E5f4", + "txHash": "0x26c51a06e1cc52cba509e074195c412844a33611d9244d785b031f41c20c1b98", + "kind": "transparent" + }, + { + "address": "0xdE888c8b9631Ca9990e0eBd226612dF7c1A8A3fc", + "txHash": "0x277fc4f422de7cd546ee2df6c03565d8a97513a7255e9aaf80451c2a55a1e8b0", + "kind": "transparent" + }, + { + "address": "0x9b00683BF5D9cb379643fDcd547ff896e627f88C", + "txHash": "0x5d30db13331445a85697d46935c1d4f32b02dda767100621f3eb30f4a7a9b305", + "kind": "transparent" } ], "impls": { @@ -11901,6 +11951,4164 @@ "types": {}, "namespaces": {} } + }, + "b01a1107706eda6fb49f5ac0385534c04d5f460993ae5a065223f4eca3bf1cae": { + "address": "0xb202E7657F8fFa17A7D1d9E5Abe8c44220c36aeE", + "txHash": "0x2e38e7daadea103557f0c3ea8da40ee55da6c7f93780c113f6c765b6c8349029", + "layout": { + "solcVersion": "0.8.27", + "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)2566": { + "label": "contract ICircuitValidator", + "numberOfBytes": "20" + }, + "t_contract(IState)2996": { + "label": "contract IState", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))": { + "label": "mapping(address => mapping(uint64 => struct VerifierLib.Proof))", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_bytes_storage)": { + "label": "mapping(string => bytes)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_uint256)": { + "label": "mapping(string => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bool)": { + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(Proof)5068_storage)": { + "label": "mapping(uint64 => struct VerifierLib.Proof)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(ZKPRequest)3065_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(AnonAadhaarIssuerV1Storage)9004_storage": { + "label": "struct AnonAadhaarIssuerV1.AnonAadhaarIssuerV1Storage", + "members": [ + { + "label": "nullifierSeed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "publicKeysHash", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "expirationTime", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "templateRoot", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "issuerDidHash", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(InitializableStorage)159_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)80_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Proof)5068_storage": { + "label": "struct VerifierLib.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" + }, + { + "label": "metadata", + "type": "t_mapping(t_string_memory_ptr,t_bytes_storage)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(ZKPRequest)3065_storage": { + "label": "struct IZKPVerifier.ZKPRequest", + "members": [ + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "validator", + "type": "t_contract(ICircuitValidator)2566", + "offset": 0, + "slot": "1" + }, + { + "label": "data", + "type": "t_bytes_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(ZKPVerifierStorage)9805_storage": { + "label": "struct ZKPVerifierBase.ZKPVerifierStorage", + "members": [ + { + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))", + "offset": 0, + "slot": "0" + }, + { + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)3065_storage)", + "offset": 0, + "slot": "1" + }, + { + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "_state", + "type": "t_contract(IState)2996", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + } + }, + "namespaces": { + "erc7201:polygonid.storage.AnonAadhaarIssuerV1": [ + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifierSeed", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "publicKeysHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "expirationTime", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "templateRoot", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:22", + "offset": 0, + "slot": "3" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "issuerDidHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:23", + "offset": 0, + "slot": "4" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:24", + "offset": 0, + "slot": "5" + } + ], + "erc7201:iden3.storage.ZKPVerifier": [ + { + "contract": "ZKPVerifierBase", + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))", + "src": "contracts/verifiers/ZKPVerifierBase.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)3065_storage)", + "src": "contracts/verifiers/ZKPVerifierBase.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "src": "contracts/verifiers/ZKPVerifierBase.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "ZKPVerifierBase", + "label": "_state", + "type": "t_contract(IState)2996", + "src": "contracts/verifiers/ZKPVerifierBase.sol:22", + "offset": 0, + "slot": "3" + } + ], + "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" + } + ] + } + } + }, + "b171bd9725153ebd17f04c5813ae778b08724cad36df888160f05684728115d8": { + "address": "0x281BAae0F1af7F7c562b0918574b3E639126bAf5", + "txHash": "0x1d4a0e3ec1d6dbc6938d8d12ca96770e974175c6cb0d54beaaed798f77a160ad", + "layout": { + "solcVersion": "0.8.27", + "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)2566": { + "label": "contract ICircuitValidator", + "numberOfBytes": "20" + }, + "t_contract(IState)2996": { + "label": "contract IState", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))": { + "label": "mapping(address => mapping(uint64 => struct VerifierLib.Proof))", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_bytes_storage)": { + "label": "mapping(string => bytes)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_uint256)": { + "label": "mapping(string => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bool)": { + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(Proof)5068_storage)": { + "label": "mapping(uint64 => struct VerifierLib.Proof)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(ZKPRequest)3065_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(AnonAadhaarIssuerV1Storage)9004_storage": { + "label": "struct AnonAadhaarIssuerV1.AnonAadhaarIssuerV1Storage", + "members": [ + { + "label": "nullifierSeed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "publicKeysHash", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "expirationTime", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "templateRoot", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "issuerDidHash", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(InitializableStorage)159_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)80_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Proof)5068_storage": { + "label": "struct VerifierLib.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" + }, + { + "label": "metadata", + "type": "t_mapping(t_string_memory_ptr,t_bytes_storage)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(ZKPRequest)3065_storage": { + "label": "struct IZKPVerifier.ZKPRequest", + "members": [ + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "validator", + "type": "t_contract(ICircuitValidator)2566", + "offset": 0, + "slot": "1" + }, + { + "label": "data", + "type": "t_bytes_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(ZKPVerifierStorage)9805_storage": { + "label": "struct ZKPVerifierBase.ZKPVerifierStorage", + "members": [ + { + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))", + "offset": 0, + "slot": "0" + }, + { + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)3065_storage)", + "offset": 0, + "slot": "1" + }, + { + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "_state", + "type": "t_contract(IState)2996", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + } + }, + "namespaces": { + "erc7201:polygonid.storage.AnonAadhaarIssuerV1": [ + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifierSeed", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "publicKeysHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "expirationTime", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "templateRoot", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:22", + "offset": 0, + "slot": "3" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "issuerDidHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:23", + "offset": 0, + "slot": "4" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:24", + "offset": 0, + "slot": "5" + } + ], + "erc7201:iden3.storage.ZKPVerifier": [ + { + "contract": "ZKPVerifierBase", + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))", + "src": "contracts/verifiers/ZKPVerifierBase.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)3065_storage)", + "src": "contracts/verifiers/ZKPVerifierBase.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "src": "contracts/verifiers/ZKPVerifierBase.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "ZKPVerifierBase", + "label": "_state", + "type": "t_contract(IState)2996", + "src": "contracts/verifiers/ZKPVerifierBase.sol:22", + "offset": 0, + "slot": "3" + } + ], + "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" + } + ] + } + } + }, + "f164395975adbe6cbc58a4769f9c7596f49066b99ca8fed2d36f50a0eb517bb3": { + "address": "0x27c7A550e7439C9eDb060D08828A9515268E821a", + "txHash": "0xe3690977879181dd8265ee8a261db6a3f871d59fca7d7ec3eb99d11912cf9c52", + "layout": { + "solcVersion": "0.8.27", + "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)2566": { + "label": "contract ICircuitValidator", + "numberOfBytes": "20" + }, + "t_contract(IState)2996": { + "label": "contract IState", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))": { + "label": "mapping(address => mapping(uint64 => struct VerifierLib.Proof))", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_bytes_storage)": { + "label": "mapping(string => bytes)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_uint256)": { + "label": "mapping(string => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bool)": { + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(Proof)5068_storage)": { + "label": "mapping(uint64 => struct VerifierLib.Proof)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(ZKPRequest)3065_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(AnonAadhaarIssuerV1Storage)9004_storage": { + "label": "struct AnonAadhaarIssuerV1.AnonAadhaarIssuerV1Storage", + "members": [ + { + "label": "nullifierSeed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "publicKeysHash", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "expirationTime", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "templateRoot", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "issuerDidHash", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(InitializableStorage)159_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)80_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Proof)5068_storage": { + "label": "struct VerifierLib.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" + }, + { + "label": "metadata", + "type": "t_mapping(t_string_memory_ptr,t_bytes_storage)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(ZKPRequest)3065_storage": { + "label": "struct IZKPVerifier.ZKPRequest", + "members": [ + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "validator", + "type": "t_contract(ICircuitValidator)2566", + "offset": 0, + "slot": "1" + }, + { + "label": "data", + "type": "t_bytes_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(ZKPVerifierStorage)9805_storage": { + "label": "struct ZKPVerifierBase.ZKPVerifierStorage", + "members": [ + { + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))", + "offset": 0, + "slot": "0" + }, + { + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)3065_storage)", + "offset": 0, + "slot": "1" + }, + { + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "_state", + "type": "t_contract(IState)2996", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + } + }, + "namespaces": { + "erc7201:polygonid.storage.AnonAadhaarIssuerV1": [ + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifierSeed", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "publicKeysHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "expirationTime", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "templateRoot", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:22", + "offset": 0, + "slot": "3" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "issuerDidHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:23", + "offset": 0, + "slot": "4" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:24", + "offset": 0, + "slot": "5" + } + ], + "erc7201:iden3.storage.ZKPVerifier": [ + { + "contract": "ZKPVerifierBase", + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))", + "src": "contracts/verifiers/ZKPVerifierBase.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)3065_storage)", + "src": "contracts/verifiers/ZKPVerifierBase.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "src": "contracts/verifiers/ZKPVerifierBase.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "ZKPVerifierBase", + "label": "_state", + "type": "t_contract(IState)2996", + "src": "contracts/verifiers/ZKPVerifierBase.sol:22", + "offset": 0, + "slot": "3" + } + ], + "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" + } + ] + } + } + }, + "87c81f2ee79fd6c266063ce0c1d99a73c83c09dc553abb6c009b3f762731ec54": { + "address": "0x89EE2361fA3Ed56353e59aF0f70A0c9b2A27e7c3", + "txHash": "0x653b670c814533c30328f1c0c545e9465bacbe9d355a0ed0fa4c3ab6e858610b", + "layout": { + "solcVersion": "0.8.27", + "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)2566": { + "label": "contract ICircuitValidator", + "numberOfBytes": "20" + }, + "t_contract(IState)2996": { + "label": "contract IState", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))": { + "label": "mapping(address => mapping(uint64 => struct VerifierLib.Proof))", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_bytes_storage)": { + "label": "mapping(string => bytes)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_uint256)": { + "label": "mapping(string => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bool)": { + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(Proof)5068_storage)": { + "label": "mapping(uint64 => struct VerifierLib.Proof)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(ZKPRequest)3065_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(AnonAadhaarIssuerV1Storage)9004_storage": { + "label": "struct AnonAadhaarIssuerV1.AnonAadhaarIssuerV1Storage", + "members": [ + { + "label": "nullifierSeed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "publicKeysHash", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "expirationTime", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "templateRoot", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "issuerDidHash", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(InitializableStorage)159_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)80_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Proof)5068_storage": { + "label": "struct VerifierLib.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" + }, + { + "label": "metadata", + "type": "t_mapping(t_string_memory_ptr,t_bytes_storage)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(ZKPRequest)3065_storage": { + "label": "struct IZKPVerifier.ZKPRequest", + "members": [ + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "validator", + "type": "t_contract(ICircuitValidator)2566", + "offset": 0, + "slot": "1" + }, + { + "label": "data", + "type": "t_bytes_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(ZKPVerifierStorage)9805_storage": { + "label": "struct ZKPVerifierBase.ZKPVerifierStorage", + "members": [ + { + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))", + "offset": 0, + "slot": "0" + }, + { + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)3065_storage)", + "offset": 0, + "slot": "1" + }, + { + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "_state", + "type": "t_contract(IState)2996", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + } + }, + "namespaces": { + "erc7201:polygonid.storage.AnonAadhaarIssuerV1": [ + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifierSeed", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "publicKeysHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "expirationTime", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "templateRoot", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:22", + "offset": 0, + "slot": "3" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "issuerDidHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:23", + "offset": 0, + "slot": "4" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:24", + "offset": 0, + "slot": "5" + } + ], + "erc7201:iden3.storage.ZKPVerifier": [ + { + "contract": "ZKPVerifierBase", + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))", + "src": "contracts/verifiers/ZKPVerifierBase.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)3065_storage)", + "src": "contracts/verifiers/ZKPVerifierBase.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "src": "contracts/verifiers/ZKPVerifierBase.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "ZKPVerifierBase", + "label": "_state", + "type": "t_contract(IState)2996", + "src": "contracts/verifiers/ZKPVerifierBase.sol:22", + "offset": 0, + "slot": "3" + } + ], + "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" + } + ] + } + } + }, + "b7d90b8dcd4a68cd74aee6c06f99fcdbcec63ecde9895912bee34f95bb523412": { + "address": "0xeD1C7fE9541E93B04eCDF0bF8625434baAC5d777", + "txHash": "0xbb04d073b61d469d769bbdb9d5b842749c29f261a473f9035e255bae0135a9a2", + "layout": { + "solcVersion": "0.8.27", + "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)2566": { + "label": "contract ICircuitValidator", + "numberOfBytes": "20" + }, + "t_contract(IState)2996": { + "label": "contract IState", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))": { + "label": "mapping(address => mapping(uint64 => struct VerifierLib.Proof))", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_bytes_storage)": { + "label": "mapping(string => bytes)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_uint256)": { + "label": "mapping(string => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bool)": { + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(Proof)5068_storage)": { + "label": "mapping(uint64 => struct VerifierLib.Proof)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(ZKPRequest)3065_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(AnonAadhaarIssuerV1Storage)9004_storage": { + "label": "struct AnonAadhaarIssuerV1.AnonAadhaarIssuerV1Storage", + "members": [ + { + "label": "nullifierSeed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "publicKeysHash", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "expirationTime", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "templateRoot", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "issuerDidHash", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(InitializableStorage)159_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)80_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Proof)5068_storage": { + "label": "struct VerifierLib.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" + }, + { + "label": "metadata", + "type": "t_mapping(t_string_memory_ptr,t_bytes_storage)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(ZKPRequest)3065_storage": { + "label": "struct IZKPVerifier.ZKPRequest", + "members": [ + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "validator", + "type": "t_contract(ICircuitValidator)2566", + "offset": 0, + "slot": "1" + }, + { + "label": "data", + "type": "t_bytes_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(ZKPVerifierStorage)9805_storage": { + "label": "struct ZKPVerifierBase.ZKPVerifierStorage", + "members": [ + { + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))", + "offset": 0, + "slot": "0" + }, + { + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)3065_storage)", + "offset": 0, + "slot": "1" + }, + { + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "_state", + "type": "t_contract(IState)2996", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + } + }, + "namespaces": { + "erc7201:polygonid.storage.AnonAadhaarIssuerV1": [ + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifierSeed", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "publicKeysHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "expirationTime", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "templateRoot", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:22", + "offset": 0, + "slot": "3" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "issuerDidHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:23", + "offset": 0, + "slot": "4" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:24", + "offset": 0, + "slot": "5" + } + ], + "erc7201:iden3.storage.ZKPVerifier": [ + { + "contract": "ZKPVerifierBase", + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))", + "src": "contracts/verifiers/ZKPVerifierBase.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)3065_storage)", + "src": "contracts/verifiers/ZKPVerifierBase.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "src": "contracts/verifiers/ZKPVerifierBase.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "ZKPVerifierBase", + "label": "_state", + "type": "t_contract(IState)2996", + "src": "contracts/verifiers/ZKPVerifierBase.sol:22", + "offset": 0, + "slot": "3" + } + ], + "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" + } + ] + } + } + }, + "06378f157a5ac62a45abe76ce69c7d8c16862b3bc7cdc186d8d534809fb0a924": { + "address": "0xD54685c31856AE0593DD595869D4D2F33058BBD7", + "txHash": "0x23daf827eb56e21a6df9b1d45975f70d1a422c2db6980c73f78a3f1f43f87997", + "layout": { + "solcVersion": "0.8.27", + "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)2566": { + "label": "contract ICircuitValidator", + "numberOfBytes": "20" + }, + "t_contract(IState)2996": { + "label": "contract IState", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))": { + "label": "mapping(address => mapping(uint64 => struct VerifierLib.Proof))", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_bytes_storage)": { + "label": "mapping(string => bytes)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_uint256)": { + "label": "mapping(string => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bool)": { + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(Proof)5068_storage)": { + "label": "mapping(uint64 => struct VerifierLib.Proof)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(ZKPRequest)3065_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(AnonAadhaarIssuerV1Storage)9004_storage": { + "label": "struct AnonAadhaarIssuerV1.AnonAadhaarIssuerV1Storage", + "members": [ + { + "label": "nullifierSeed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "publicKeysHash", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "expirationTime", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "templateRoot", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "issuerDidHash", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(InitializableStorage)159_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)80_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Proof)5068_storage": { + "label": "struct VerifierLib.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" + }, + { + "label": "metadata", + "type": "t_mapping(t_string_memory_ptr,t_bytes_storage)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(ZKPRequest)3065_storage": { + "label": "struct IZKPVerifier.ZKPRequest", + "members": [ + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "validator", + "type": "t_contract(ICircuitValidator)2566", + "offset": 0, + "slot": "1" + }, + { + "label": "data", + "type": "t_bytes_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(ZKPVerifierStorage)9805_storage": { + "label": "struct ZKPVerifierBase.ZKPVerifierStorage", + "members": [ + { + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))", + "offset": 0, + "slot": "0" + }, + { + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)3065_storage)", + "offset": 0, + "slot": "1" + }, + { + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "_state", + "type": "t_contract(IState)2996", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + } + }, + "namespaces": { + "erc7201:polygonid.storage.AnonAadhaarIssuerV1": [ + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifierSeed", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "publicKeysHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "expirationTime", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "templateRoot", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:22", + "offset": 0, + "slot": "3" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "issuerDidHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:23", + "offset": 0, + "slot": "4" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:24", + "offset": 0, + "slot": "5" + } + ], + "erc7201:iden3.storage.ZKPVerifier": [ + { + "contract": "ZKPVerifierBase", + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))", + "src": "contracts/verifiers/ZKPVerifierBase.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)3065_storage)", + "src": "contracts/verifiers/ZKPVerifierBase.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "src": "contracts/verifiers/ZKPVerifierBase.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "ZKPVerifierBase", + "label": "_state", + "type": "t_contract(IState)2996", + "src": "contracts/verifiers/ZKPVerifierBase.sol:22", + "offset": 0, + "slot": "3" + } + ], + "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" + } + ] + } + } + }, + "aad3ad5a43e1c7e5a994e3966cbcb1a37bc7ee6de30e8f0cc1c73333b5613d40": { + "address": "0x0DC59D60Fd5C37d1bD49e7eC0ddF142709126264", + "txHash": "0x5a8fbe48631b912780cb18e2b1a6a51b56796ca57f3fe402f28d3795171a6413", + "layout": { + "solcVersion": "0.8.27", + "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)2566": { + "label": "contract ICircuitValidator", + "numberOfBytes": "20" + }, + "t_contract(IState)2996": { + "label": "contract IState", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))": { + "label": "mapping(address => mapping(uint64 => struct VerifierLib.Proof))", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_bytes_storage)": { + "label": "mapping(string => bytes)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_uint256)": { + "label": "mapping(string => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bool)": { + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(Proof)5068_storage)": { + "label": "mapping(uint64 => struct VerifierLib.Proof)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(ZKPRequest)3065_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(AnonAadhaarIssuerV1Storage)9004_storage": { + "label": "struct AnonAadhaarIssuerV1.AnonAadhaarIssuerV1Storage", + "members": [ + { + "label": "nullifierSeed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "publicKeysHash", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "expirationTime", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "templateRoot", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "issuerDidHash", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(InitializableStorage)159_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)80_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Proof)5068_storage": { + "label": "struct VerifierLib.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" + }, + { + "label": "metadata", + "type": "t_mapping(t_string_memory_ptr,t_bytes_storage)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(ZKPRequest)3065_storage": { + "label": "struct IZKPVerifier.ZKPRequest", + "members": [ + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "validator", + "type": "t_contract(ICircuitValidator)2566", + "offset": 0, + "slot": "1" + }, + { + "label": "data", + "type": "t_bytes_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(ZKPVerifierStorage)9805_storage": { + "label": "struct ZKPVerifierBase.ZKPVerifierStorage", + "members": [ + { + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))", + "offset": 0, + "slot": "0" + }, + { + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)3065_storage)", + "offset": 0, + "slot": "1" + }, + { + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "_state", + "type": "t_contract(IState)2996", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + } + }, + "namespaces": { + "erc7201:polygonid.storage.AnonAadhaarIssuerV1": [ + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifierSeed", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "publicKeysHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "expirationTime", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "templateRoot", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:22", + "offset": 0, + "slot": "3" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "issuerDidHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:23", + "offset": 0, + "slot": "4" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:24", + "offset": 0, + "slot": "5" + } + ], + "erc7201:iden3.storage.ZKPVerifier": [ + { + "contract": "ZKPVerifierBase", + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))", + "src": "contracts/verifiers/ZKPVerifierBase.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)3065_storage)", + "src": "contracts/verifiers/ZKPVerifierBase.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "src": "contracts/verifiers/ZKPVerifierBase.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "ZKPVerifierBase", + "label": "_state", + "type": "t_contract(IState)2996", + "src": "contracts/verifiers/ZKPVerifierBase.sol:22", + "offset": 0, + "slot": "3" + } + ], + "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" + } + ] + } + } + }, + "b57f9f2386a1cfec7b68af0c27073152d2835b521429c49a499f4b283f725186": { + "address": "0xf5c79970915095B2b2633fDC7b386862F43A40C2", + "txHash": "0x6a426baa4ab9c31361a2d21ee08c6b4d9887362a9dd4e99bec882262744bae34", + "layout": { + "solcVersion": "0.8.27", + "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)2566": { + "label": "contract ICircuitValidator", + "numberOfBytes": "20" + }, + "t_contract(IState)2996": { + "label": "contract IState", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))": { + "label": "mapping(address => mapping(uint64 => struct VerifierLib.Proof))", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_bytes_storage)": { + "label": "mapping(string => bytes)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_uint256)": { + "label": "mapping(string => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bool)": { + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(Proof)5068_storage)": { + "label": "mapping(uint64 => struct VerifierLib.Proof)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(ZKPRequest)3065_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(AnonAadhaarIssuerV1Storage)9004_storage": { + "label": "struct AnonAadhaarIssuerV1.AnonAadhaarIssuerV1Storage", + "members": [ + { + "label": "nullifierSeed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "publicKeysHash", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "expirationTime", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "templateRoot", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "issuerDidHash", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(InitializableStorage)159_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)80_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Proof)5068_storage": { + "label": "struct VerifierLib.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" + }, + { + "label": "metadata", + "type": "t_mapping(t_string_memory_ptr,t_bytes_storage)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(ZKPRequest)3065_storage": { + "label": "struct IZKPVerifier.ZKPRequest", + "members": [ + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "validator", + "type": "t_contract(ICircuitValidator)2566", + "offset": 0, + "slot": "1" + }, + { + "label": "data", + "type": "t_bytes_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(ZKPVerifierStorage)9805_storage": { + "label": "struct ZKPVerifierBase.ZKPVerifierStorage", + "members": [ + { + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))", + "offset": 0, + "slot": "0" + }, + { + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)3065_storage)", + "offset": 0, + "slot": "1" + }, + { + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "_state", + "type": "t_contract(IState)2996", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + } + }, + "namespaces": { + "erc7201:polygonid.storage.AnonAadhaarIssuerV1": [ + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifierSeed", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "publicKeysHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "expirationTime", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "templateRoot", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:22", + "offset": 0, + "slot": "3" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "issuerDidHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:23", + "offset": 0, + "slot": "4" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:24", + "offset": 0, + "slot": "5" + } + ], + "erc7201:iden3.storage.ZKPVerifier": [ + { + "contract": "ZKPVerifierBase", + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)5068_storage))", + "src": "contracts/verifiers/ZKPVerifierBase.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)3065_storage)", + "src": "contracts/verifiers/ZKPVerifierBase.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "src": "contracts/verifiers/ZKPVerifierBase.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "ZKPVerifierBase", + "label": "_state", + "type": "t_contract(IState)2996", + "src": "contracts/verifiers/ZKPVerifierBase.sol:22", + "offset": 0, + "slot": "3" + } + ], + "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" + } + ] + } + } + }, + "d296e0f02a988e059f5ccb53d0ba60b19b73b0ad6ebd9bccf08cb38dade1b85f": { + "address": "0x7F598a41792568059FD20031830C2E06364136F3", + "txHash": "0xb69c9deb7af865787013b67f4a4ce89f073166c6628f774695154c75ba022b5e", + "layout": { + "solcVersion": "0.8.27", + "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)358": { + "label": "contract ICircuitValidator", + "numberOfBytes": "20" + }, + "t_contract(IState)676": { + "label": "contract IState", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)2235_storage))": { + "label": "mapping(address => mapping(uint64 => struct VerifierLib.Proof))", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_bytes_storage)": { + "label": "mapping(string => bytes)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_uint256)": { + "label": "mapping(string => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bool)": { + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(Proof)2235_storage)": { + "label": "mapping(uint64 => struct VerifierLib.Proof)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(ZKPRequest)690_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(AnonAadhaarIssuerV1Storage)2306_storage": { + "label": "struct AnonAadhaarIssuerV1.AnonAadhaarIssuerV1Storage", + "members": [ + { + "label": "nullifierSeed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "publicKeysHash", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "expirationTime", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "templateRoot", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "issuerDidHash", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(InitializableStorage)159_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)80_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Proof)2235_storage": { + "label": "struct VerifierLib.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" + }, + { + "label": "metadata", + "type": "t_mapping(t_string_memory_ptr,t_bytes_storage)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(ZKPRequest)690_storage": { + "label": "struct IZKPVerifier.ZKPRequest", + "members": [ + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "validator", + "type": "t_contract(ICircuitValidator)358", + "offset": 0, + "slot": "1" + }, + { + "label": "data", + "type": "t_bytes_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(ZKPVerifierStorage)2575_storage": { + "label": "struct ZKPVerifierBase.ZKPVerifierStorage", + "members": [ + { + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)2235_storage))", + "offset": 0, + "slot": "0" + }, + { + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)690_storage)", + "offset": 0, + "slot": "1" + }, + { + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "_state", + "type": "t_contract(IState)676", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + } + }, + "namespaces": { + "erc7201:polygonid.storage.AnonAadhaarIssuerV1": [ + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifierSeed", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "publicKeysHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "expirationTime", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "templateRoot", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:22", + "offset": 0, + "slot": "3" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "issuerDidHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:23", + "offset": 0, + "slot": "4" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:24", + "offset": 0, + "slot": "5" + } + ], + "erc7201:iden3.storage.ZKPVerifier": [ + { + "contract": "ZKPVerifierBase", + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)2235_storage))", + "src": "contracts/verifiers/ZKPVerifierBase.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)690_storage)", + "src": "contracts/verifiers/ZKPVerifierBase.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "src": "contracts/verifiers/ZKPVerifierBase.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "ZKPVerifierBase", + "label": "_state", + "type": "t_contract(IState)676", + "src": "contracts/verifiers/ZKPVerifierBase.sol:22", + "offset": 0, + "slot": "3" + } + ], + "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" + } + ] + } + } + }, + "833f74b7d4d2dbbf26035c7c834efa77bd7a2e74794f1f27a29cac2c4020a921": { + "address": "0xaF62c4A8cb38927FaA42F8A9167d7A306BFe5db9", + "txHash": "0xbbf37f85deb48bfa9b72d6ac196001b6d008f3d79e52d4113a14bccbeab13d34", + "layout": { + "solcVersion": "0.8.27", + "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)358": { + "label": "contract ICircuitValidator", + "numberOfBytes": "20" + }, + "t_contract(IState)676": { + "label": "contract IState", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)2235_storage))": { + "label": "mapping(address => mapping(uint64 => struct VerifierLib.Proof))", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_bytes_storage)": { + "label": "mapping(string => bytes)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_uint256)": { + "label": "mapping(string => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bool)": { + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(Proof)2235_storage)": { + "label": "mapping(uint64 => struct VerifierLib.Proof)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(ZKPRequest)690_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(AnonAadhaarIssuerV1Storage)2306_storage": { + "label": "struct AnonAadhaarIssuerV1.AnonAadhaarIssuerV1Storage", + "members": [ + { + "label": "nullifierSeed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "publicKeysHash", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "expirationTime", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "templateRoot", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "issuerDidHash", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(InitializableStorage)159_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)80_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Proof)2235_storage": { + "label": "struct VerifierLib.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" + }, + { + "label": "metadata", + "type": "t_mapping(t_string_memory_ptr,t_bytes_storage)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(ZKPRequest)690_storage": { + "label": "struct IZKPVerifier.ZKPRequest", + "members": [ + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "validator", + "type": "t_contract(ICircuitValidator)358", + "offset": 0, + "slot": "1" + }, + { + "label": "data", + "type": "t_bytes_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(ZKPVerifierStorage)2575_storage": { + "label": "struct ZKPVerifierBase.ZKPVerifierStorage", + "members": [ + { + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)2235_storage))", + "offset": 0, + "slot": "0" + }, + { + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)690_storage)", + "offset": 0, + "slot": "1" + }, + { + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "_state", + "type": "t_contract(IState)676", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + } + }, + "namespaces": { + "erc7201:polygonid.storage.AnonAadhaarIssuerV1": [ + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifierSeed", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "publicKeysHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "expirationTime", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "templateRoot", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:22", + "offset": 0, + "slot": "3" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "issuerDidHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:23", + "offset": 0, + "slot": "4" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:24", + "offset": 0, + "slot": "5" + } + ], + "erc7201:iden3.storage.ZKPVerifier": [ + { + "contract": "ZKPVerifierBase", + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)2235_storage))", + "src": "contracts/verifiers/ZKPVerifierBase.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)690_storage)", + "src": "contracts/verifiers/ZKPVerifierBase.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "src": "contracts/verifiers/ZKPVerifierBase.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "ZKPVerifierBase", + "label": "_state", + "type": "t_contract(IState)676", + "src": "contracts/verifiers/ZKPVerifierBase.sol:22", + "offset": 0, + "slot": "3" + } + ], + "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" + } + ] + } + } + }, + "764e7c0cabdd84d495e88f29cd537722e4d9c87377f292819f4255fd54169066": { + "address": "0xf6Cd744B9D3942755e6c1E872FdDDb3444C91573", + "txHash": "0x4a0f70f6fa2b03d8d1104e9d46ffc5e81f8ba7ae04840f2defd53c67a5735328", + "layout": { + "solcVersion": "0.8.27", + "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)358": { + "label": "contract ICircuitValidator", + "numberOfBytes": "20" + }, + "t_contract(IState)676": { + "label": "contract IState", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)2235_storage))": { + "label": "mapping(address => mapping(uint64 => struct VerifierLib.Proof))", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_bytes_storage)": { + "label": "mapping(string => bytes)", + "numberOfBytes": "32" + }, + "t_mapping(t_string_memory_ptr,t_uint256)": { + "label": "mapping(string => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bool)": { + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(Proof)2235_storage)": { + "label": "mapping(uint64 => struct VerifierLib.Proof)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint64,t_struct(ZKPRequest)690_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(AnonAadhaarIssuerV1Storage)2306_storage": { + "label": "struct AnonAadhaarIssuerV1.AnonAadhaarIssuerV1Storage", + "members": [ + { + "label": "nullifierSeed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "publicKeysHash", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "expirationTime", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "templateRoot", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "issuerDidHash", + "type": "t_uint256", + "offset": 0, + "slot": "4" + }, + { + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(InitializableStorage)159_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)80_storage": { + "label": "struct OwnableUpgradeable.OwnableStorage", + "members": [ + { + "label": "_owner", + "type": "t_address", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Proof)2235_storage": { + "label": "struct VerifierLib.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" + }, + { + "label": "metadata", + "type": "t_mapping(t_string_memory_ptr,t_bytes_storage)", + "offset": 0, + "slot": "5" + } + ], + "numberOfBytes": "192" + }, + "t_struct(ZKPRequest)690_storage": { + "label": "struct IZKPVerifier.ZKPRequest", + "members": [ + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "validator", + "type": "t_contract(ICircuitValidator)358", + "offset": 0, + "slot": "1" + }, + { + "label": "data", + "type": "t_bytes_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(ZKPVerifierStorage)2581_storage": { + "label": "struct ZKPVerifierBase.ZKPVerifierStorage", + "members": [ + { + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)2235_storage))", + "offset": 0, + "slot": "0" + }, + { + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)690_storage)", + "offset": 0, + "slot": "1" + }, + { + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "_state", + "type": "t_contract(IState)676", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + } + }, + "namespaces": { + "erc7201:polygonid.storage.AnonAadhaarIssuerV1": [ + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifierSeed", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "publicKeysHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "expirationTime", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "templateRoot", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:22", + "offset": 0, + "slot": "3" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "issuerDidHash", + "type": "t_uint256", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:23", + "offset": 0, + "slot": "4" + }, + { + "contract": "AnonAadhaarIssuerV1", + "label": "nullifiers", + "type": "t_mapping(t_uint256,t_bool)", + "src": "contracts/verifiers/AnonAadhaarCredentialIssuing.sol:24", + "offset": 0, + "slot": "5" + } + ], + "erc7201:iden3.storage.ZKPVerifier": [ + { + "contract": "ZKPVerifierBase", + "label": "_proofs", + "type": "t_mapping(t_address,t_mapping(t_uint64,t_struct(Proof)2235_storage))", + "src": "contracts/verifiers/ZKPVerifierBase.sol:19", + "offset": 0, + "slot": "0" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requests", + "type": "t_mapping(t_uint64,t_struct(ZKPRequest)690_storage)", + "src": "contracts/verifiers/ZKPVerifierBase.sol:20", + "offset": 0, + "slot": "1" + }, + { + "contract": "ZKPVerifierBase", + "label": "_requestIds", + "type": "t_array(t_uint64)dyn_storage", + "src": "contracts/verifiers/ZKPVerifierBase.sol:21", + "offset": 0, + "slot": "2" + }, + { + "contract": "ZKPVerifierBase", + "label": "_state", + "type": "t_contract(IState)676", + "src": "contracts/verifiers/ZKPVerifierBase.sol:22", + "offset": 0, + "slot": "3" + } + ], + "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/contracts/lib/groth16-verifiers/Groth16VerifierAnonAadhaarV1.sol b/contracts/lib/groth16-verifiers/Groth16VerifierAnonAadhaarV1.sol new file mode 100644 index 00000000..d760d7b2 --- /dev/null +++ b/contracts/lib/groth16-verifiers/Groth16VerifierAnonAadhaarV1.sol @@ -0,0 +1,231 @@ +// SPDX-License-Identifier: GPL-3.0 +/* + Copyright 2021 0KIMS association. + + This file is generated with [snarkJS](https://github.com/iden3/snarkjs). + + snarkJS is a free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + snarkJS is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with snarkJS. If not, see . +*/ + +pragma solidity >=0.7.0 <0.9.0; + +contract Groth16VerifierAnonAadhaarV1 { + // Scalar field size + uint256 constant r = 21888242871839275222246405745257275088548364400416034343698204186575808495617; + // Base field size + uint256 constant q = 21888242871839275222246405745257275088696311157297823662689037894645226208583; + + // Verification Key data + uint256 constant alphax = 20491192805390485299153009773594534940189261866228447918068658471970481763042; + uint256 constant alphay = 9383485363053290200918347156157836566562967994039712273449902621266178545958; + uint256 constant betax1 = 4252822878758300859123897981450591353533073413197771768651442665752259397132; + uint256 constant betax2 = 6375614351688725206403948262868962793625744043794305715222011528459656738731; + uint256 constant betay1 = 21847035105528745403288232691147584728191162732299865338377159692350059136679; + uint256 constant betay2 = 10505242626370262277552901082094356697409835680220590971873171140371331206856; + uint256 constant gammax1 = 11559732032986387107991004021392285783925812861821192530917403151452391805634; + uint256 constant gammax2 = 10857046999023057135944570762232829481370756359578518086990519993285655852781; + uint256 constant gammay1 = 4082367875863433681332203403145435568316851327593401208105741076214120093531; + uint256 constant gammay2 = 8495653923123431417604973247489272438418190587263600148770280649306958101930; + uint256 constant deltax1 = 6347014025988925994678053986149694732497757469837350649831546271820917537627; + uint256 constant deltax2 = 18232962298285716492894926523104343476241612480984127619822044739898554870815; + uint256 constant deltay1 = 2817246033114852481736935358768496045738641883864650317462671662538128154270; + uint256 constant deltay2 = 13410199399297813585386856857690015228652058086982427261208562103322462741633; + + + uint256 constant IC0x = 8667429750521744939716618315654184108885649058305902482780327503515807950394; + uint256 constant IC0y = 10597879265301087551277343711584332115369055541777037588931749690542043138587; + + uint256 constant IC1x = 10680620555339128984301527568579223058855372029412557823087709322719998358399; + uint256 constant IC1y = 9966998714235832704983941181603781701800671801511580217221940477394694861035; + + uint256 constant IC2x = 20924258941231237532509435929549099405644612024302819058392935955947255346585; + uint256 constant IC2y = 784972251311610078150814237039477052786961241449116217305353604990792567263; + + uint256 constant IC3x = 2920890256797780339900787617955917461630524714785576691130687209449290842291; + uint256 constant IC3y = 15306490508091290901119256088022834643903869012014672290178553930977351438086; + + uint256 constant IC4x = 18415430505705670100739462534876923574065428449674217774778368091075707081308; + uint256 constant IC4y = 14103533233880841911436229569501835767102482096374925463163880809700368684145; + + uint256 constant IC5x = 18582372099785755877173430339508715220170318282525261472792060548719714134535; + uint256 constant IC5y = 8305843026108001432553436100846104123701290810616896109398754251251659663939; + + uint256 constant IC6x = 19194196555732825387771348296763022037471771768493671776351860752589213087058; + uint256 constant IC6y = 15373033521778344981559129572093480636823406782279199988864419624283011063023; + + uint256 constant IC7x = 780473387866968640825987031953106400791839734780377621927890459322434718908; + uint256 constant IC7y = 4009430335035997168066802309687807544066555607820258747149244234096844356812; + + uint256 constant IC8x = 1113061904010623969619044193336767266979256017085649531307436120687744728564; + uint256 constant IC8y = 6931444195434204955390872506665912192506977094018563563768350482309196181363; + + uint256 constant IC9x = 17071684704664352521612521032796252647554992424558736540440056783106777419643; + uint256 constant IC9y = 3330612753498412648907178492278098841313119786989054274650206206439131859035; + + uint256 constant IC10x = 6912323640958343786737362062595374551994250336236258908056882300550534416289; + uint256 constant IC10y = 511504161072430399083712356083469631845533760854405594063368008184342549062; + + + // Memory data + uint16 constant pVk = 0; + uint16 constant pPairing = 128; + + uint16 constant pLastMem = 896; + + function verifyProof(uint[2] calldata _pA, uint[2][2] calldata _pB, uint[2] calldata _pC, uint[10] calldata _pubSignals) public view returns (bool) { + assembly { + function checkField(v) { + if iszero(lt(v, r)) { + mstore(0, 0) + return(0, 0x20) + } + } + + // G1 function to multiply a G1 value(x,y) to value in an address + function g1_mulAccC(pR, x, y, s) { + let success + let mIn := mload(0x40) + mstore(mIn, x) + mstore(add(mIn, 32), y) + mstore(add(mIn, 64), s) + + success := staticcall(sub(gas(), 2000), 7, mIn, 96, mIn, 64) + + if iszero(success) { + mstore(0, 0) + return(0, 0x20) + } + + mstore(add(mIn, 64), mload(pR)) + mstore(add(mIn, 96), mload(add(pR, 32))) + + success := staticcall(sub(gas(), 2000), 6, mIn, 128, pR, 64) + + if iszero(success) { + mstore(0, 0) + return(0, 0x20) + } + } + + function checkPairing(pA, pB, pC, pubSignals, pMem) -> isOk { + let _pPairing := add(pMem, pPairing) + let _pVk := add(pMem, pVk) + + mstore(_pVk, IC0x) + mstore(add(_pVk, 32), IC0y) + + // Compute the linear combination vk_x + + g1_mulAccC(_pVk, IC1x, IC1y, calldataload(add(pubSignals, 0))) + + g1_mulAccC(_pVk, IC2x, IC2y, calldataload(add(pubSignals, 32))) + + g1_mulAccC(_pVk, IC3x, IC3y, calldataload(add(pubSignals, 64))) + + g1_mulAccC(_pVk, IC4x, IC4y, calldataload(add(pubSignals, 96))) + + g1_mulAccC(_pVk, IC5x, IC5y, calldataload(add(pubSignals, 128))) + + g1_mulAccC(_pVk, IC6x, IC6y, calldataload(add(pubSignals, 160))) + + g1_mulAccC(_pVk, IC7x, IC7y, calldataload(add(pubSignals, 192))) + + g1_mulAccC(_pVk, IC8x, IC8y, calldataload(add(pubSignals, 224))) + + g1_mulAccC(_pVk, IC9x, IC9y, calldataload(add(pubSignals, 256))) + + g1_mulAccC(_pVk, IC10x, IC10y, calldataload(add(pubSignals, 288))) + + + // -A + mstore(_pPairing, calldataload(pA)) + mstore(add(_pPairing, 32), mod(sub(q, calldataload(add(pA, 32))), q)) + + // B + mstore(add(_pPairing, 64), calldataload(pB)) + mstore(add(_pPairing, 96), calldataload(add(pB, 32))) + mstore(add(_pPairing, 128), calldataload(add(pB, 64))) + mstore(add(_pPairing, 160), calldataload(add(pB, 96))) + + // alpha1 + mstore(add(_pPairing, 192), alphax) + mstore(add(_pPairing, 224), alphay) + + // beta2 + mstore(add(_pPairing, 256), betax1) + mstore(add(_pPairing, 288), betax2) + mstore(add(_pPairing, 320), betay1) + mstore(add(_pPairing, 352), betay2) + + // vk_x + mstore(add(_pPairing, 384), mload(add(pMem, pVk))) + mstore(add(_pPairing, 416), mload(add(pMem, add(pVk, 32)))) + + + // gamma2 + mstore(add(_pPairing, 448), gammax1) + mstore(add(_pPairing, 480), gammax2) + mstore(add(_pPairing, 512), gammay1) + mstore(add(_pPairing, 544), gammay2) + + // C + mstore(add(_pPairing, 576), calldataload(pC)) + mstore(add(_pPairing, 608), calldataload(add(pC, 32))) + + // delta2 + mstore(add(_pPairing, 640), deltax1) + mstore(add(_pPairing, 672), deltax2) + mstore(add(_pPairing, 704), deltay1) + mstore(add(_pPairing, 736), deltay2) + + + let success := staticcall(sub(gas(), 2000), 8, _pPairing, 768, _pPairing, 0x20) + + isOk := and(success, mload(_pPairing)) + } + + let pMem := mload(0x40) + mstore(0x40, add(pMem, pLastMem)) + + // Validate that all evaluations ∈ F + + checkField(calldataload(add(_pubSignals, 0))) + + checkField(calldataload(add(_pubSignals, 32))) + + checkField(calldataload(add(_pubSignals, 64))) + + checkField(calldataload(add(_pubSignals, 96))) + + checkField(calldataload(add(_pubSignals, 128))) + + checkField(calldataload(add(_pubSignals, 160))) + + checkField(calldataload(add(_pubSignals, 192))) + + checkField(calldataload(add(_pubSignals, 224))) + + checkField(calldataload(add(_pubSignals, 256))) + + checkField(calldataload(add(_pubSignals, 288))) + + + // Validate all evaluations + let isValid := checkPairing(_pA, _pB, _pC, _pubSignals, pMem) + + mstore(0, isValid) + return(0, 0x20) + } + } + } diff --git a/contracts/lib/groth16-verifiers/Groth16VerifierAnonAadhaarV1Wrapper.sol b/contracts/lib/groth16-verifiers/Groth16VerifierAnonAadhaarV1Wrapper.sol new file mode 100644 index 00000000..1dcfe008 --- /dev/null +++ b/contracts/lib/groth16-verifiers/Groth16VerifierAnonAadhaarV1Wrapper.sol @@ -0,0 +1,59 @@ +// +// Copyright 2017 Christian Reitwiessner +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), +// to deal in the Software without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Software, and to permit persons to whom +// the Software is furnished to do so, subject to the following conditions: +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// 2019 OKIMS +// ported to solidity 0.6 +// fixed linter warnings +// added requiere error messages +// +// +// SPDX-License-Identifier: GPL-3.0 +pragma solidity >=0.8.4 <0.9.0; + +import {Groth16VerifierAnonAadhaarV1} from "./Groth16VerifierAnonAadhaarV1.sol"; +import {IVerifier} from "../../interfaces/IVerifier.sol"; + +contract Groth16VerifierAnonAadhaarV1Wrapper is Groth16VerifierAnonAadhaarV1, IVerifier { + /** + * @dev Number of public signals for atomic mtp circuit + */ + uint256 constant PUBSIGNALS_LENGTH = 10; + + /** + * @dev Verify the circuit with the groth16 proof π=([πa]1,[πb]2,[πc]1). + * @param a πa element of the groth16 proof. + * @param b πb element of the groth16 proof. + * @param c πc element of the groth16 proof. + * @param input Public inputs of the circuit. + * @return r true if the proof is valid. + */ + function verify( + uint256[2] calldata a, + uint256[2][2] calldata b, + uint256[2] calldata c, + uint256[] calldata input + ) public view returns (bool r) { + uint[PUBSIGNALS_LENGTH] memory pubSignals; + + require(input.length == PUBSIGNALS_LENGTH, "expected array length is 10"); + + for (uint256 i = 0; i < PUBSIGNALS_LENGTH; i++) { + pubSignals[i] = input[i]; + } + + return this.verifyProof(a, b, c, pubSignals); + } +} diff --git a/contracts/validators/AnonAadhaarV1Validator.sol b/contracts/validators/AnonAadhaarV1Validator.sol new file mode 100644 index 00000000..c426a29e --- /dev/null +++ b/contracts/validators/AnonAadhaarV1Validator.sol @@ -0,0 +1,161 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity 0.8.27; + +import {IVerifier} from "../interfaces/IVerifier.sol"; +import {ICircuitValidator} from "../interfaces/ICircuitValidator.sol"; +import {IState} from "../interfaces/IState.sol"; +import {CredentialAtomicQueryValidatorBase} from "./CredentialAtomicQueryValidatorBase.sol"; + +/** + * @dev AnonAadhaarV1Validator validator + */ +contract AnonAadhaarV1Validator is CredentialAtomicQueryValidatorBase { + struct PubSignals { + uint256 pubKeyHash; + uint256 nullifier; + uint256 hashIndex; + uint256 hashValue; + uint256 issuanceDate; + uint256 expirationDate; + uint256 nullifierSeed; + uint256 signalHash; + uint256 templateRoot; + uint256 issuerDidHash; + } + /** + * @dev Version of contract + */ + string public constant VERSION = "1.0.0"; + + string internal constant CIRCUIT_ID = "anonAadhaarV1"; + + /** + * @dev Initialize the contract + * @param _verifierContractAddr Address of the verifier contract + */ + function initialize( + address _verifierContractAddr, + address _stateContractAddr, + address owner + ) public initializer { + _setInputToIndex("pubKeyHash", 0); + _setInputToIndex("nullifier", 1); + _setInputToIndex("hashIndex", 2); + _setInputToIndex("hashValue", 3); + _setInputToIndex("issuanceDate", 4); + _setInputToIndex("expirationDate", 5); + _setInputToIndex("nullifierSeed", 6); + _setInputToIndex("signalHash", 7); + _setInputToIndex("templateRoot", 8); + _setInputToIndex("issuerDidHash", 9); + + _initDefaultStateVariables(_stateContractAddr, _verifierContractAddr, CIRCUIT_ID, owner); + } + + /** + * @dev Get the version of the contract + * @return Version of the contract + */ + function version() public pure override returns (string memory) { + return VERSION; + } + + /** + * @dev Parse the public signals + * @param inputs Array of public inputs + * @return Parsed public signals + */ + function parsePubSignals(uint256[] memory inputs) public pure returns (PubSignals memory) { + PubSignals memory pubSignals = PubSignals({ + pubKeyHash: inputs[0], + nullifier: inputs[1], + hashIndex: inputs[2], + hashValue: inputs[3], + issuanceDate: inputs[4], + expirationDate: inputs[5], + nullifierSeed: inputs[6], + signalHash: inputs[7], + templateRoot: inputs[8], + issuerDidHash: inputs[9] + }); + + return pubSignals; + } + + /** + * @dev Verify the groth16 proof and check the request query data + * @param inputs Public inputs of the circuit. + * @param a πa element of the groth16 proof. + * @param b πb element of the groth16 proof. + * @param c πc element of the groth16 proof. + * @param data Request query data of the credential to verify. + * @param sender Sender of the proof. + * @return Array of key to public input index as result. + */ + function verify( + // solhint-disable-next-line no-unused-vars + uint256[] memory inputs, + // solhint-disable-next-line no-unused-vars + uint256[2] memory a, + // solhint-disable-next-line no-unused-vars + uint256[2][2] memory b, + // solhint-disable-next-line no-unused-vars + uint256[2] memory c, + // solhint-disable-next-line no-unused-vars + bytes calldata data, + // solhint-disable-next-line no-unused-vars + address sender + ) public view override returns (ICircuitValidator.KeyToInputIndex[] memory) { + revert("function not supported in this contract"); + } + + /** + * @dev Verify the groth16 proof and check the request query data + * @param zkProof Proof packed as bytes to verify. + * @param data Request query data of the credential to verify. + * @param sender Sender of the proof. + * @return Array of public signals as result. + */ + function verifyV2( + bytes calldata zkProof, + // solhint-disable-next-line no-unused-vars + bytes calldata data, + address sender, + IState stateContract + ) public view override returns (ICircuitValidator.Signal[] memory) { + ( + uint256[] memory inputs, + uint256[2] memory a, + uint256[2][2] memory b, + uint256[2] memory c + ) = abi.decode(zkProof, (uint256[], uint256[2], uint256[2][2], uint256[2])); + + PubSignals memory pubSignals = parsePubSignals(inputs); + _verifyZKP(inputs, a, b, c); + ICircuitValidator.Signal[] memory signals = new ICircuitValidator.Signal[](10); + signals[0] = ICircuitValidator.Signal({name: "pubKeyHash", value: pubSignals.pubKeyHash}); + signals[1] = ICircuitValidator.Signal({name: "nullifier", value: pubSignals.nullifier}); + signals[2] = ICircuitValidator.Signal({name: "hashIndex", value: pubSignals.hashIndex}); + signals[3] = ICircuitValidator.Signal({name: "hashValue", value: pubSignals.hashValue}); + signals[4] = ICircuitValidator.Signal({name: "issuanceDate", value: pubSignals.issuanceDate}); + signals[5] = ICircuitValidator.Signal({name: "expirationDate", value: pubSignals.expirationDate}); + signals[6] = ICircuitValidator.Signal({name: "nullifierSeed", value: pubSignals.nullifierSeed}); + signals[7] = ICircuitValidator.Signal({name: "signalHash", value: pubSignals.signalHash}); + signals[8] = ICircuitValidator.Signal({name: "templateRoot", value: pubSignals.templateRoot}); + signals[9] = ICircuitValidator.Signal({name: "issuerDidHash", value: pubSignals.issuerDidHash}); + return signals; + } + + function _verifyZKP( + uint256[] memory inputs, + uint256[2] memory a, + uint256[2][2] memory b, + uint256[2] memory c + ) internal view { + IVerifier verifier = getVerifierByCircuitId(CIRCUIT_ID); + require(verifier != IVerifier(address(0)), "Verifier address should not be zero"); + + // verify that zkp is valid + require(verifier.verify(a, b, c, inputs), "Proof is not valid"); + } +} diff --git a/contracts/verifiers/AnonAadhaarCredentialIssuing.sol b/contracts/verifiers/AnonAadhaarCredentialIssuing.sol new file mode 100644 index 00000000..41ff6342 --- /dev/null +++ b/contracts/verifiers/AnonAadhaarCredentialIssuing.sol @@ -0,0 +1,136 @@ +// SPDX-License-Identifier: GPL-3.0 +pragma solidity 0.8.27; + +import {IdentityLib} from "../lib/IdentityLib.sol"; +import {IZKPVerifier} from "../interfaces/IZKPVerifier.sol"; +import {EmbeddedZKPVerifier} from "./EmbeddedZKPVerifier.sol"; +import {IState} from "../interfaces/IState.sol"; +import {IdentityBase} from "../lib/IdentityBase.sol"; + +/** + * @dev Address ownership credential issuer. + * This issuer issue non-merklized credentials decentralized. + */ +contract AnonAadhaarIssuerV1 is IdentityBase, EmbeddedZKPVerifier { + using IdentityLib for IdentityLib.Data; + + /// @custom:storage-location erc7201:polygonid.storage.AnonAadhaarIssuerV1 + struct AnonAadhaarIssuerV1Storage { + uint256 nullifierSeed; + uint256 publicKeysHash; + uint256 expirationTime; + uint256 templateRoot; + uint256 issuerDidHash; + mapping(uint256 => bool) nullifiers; + } + + // check if the hash was calculated correctly + // keccak256(abi.encode(uint256(keccak256("polygonid.storage.AnonAadhaarIssuerV1")) - 1)) & ~bytes32(uint256(0xff)) + // TODO(illia-korotia): do not forget to update the storage location + bytes32 private constant AnonAadhaarIssuerV1StorageLocation = + 0xcb4c32479afd0d9095322a3f93b16fa02cb0bf6c78456f30d0d6005caa749700; + + function _getAnonAadhaarIssuerV1Storage() + private + pure + returns (AnonAadhaarIssuerV1Storage storage store) + { + assembly { + store.slot := AnonAadhaarIssuerV1StorageLocation + } + } + + function initialize( + uint256 nullifierSeed, + uint256 publicKeyHash, + uint256 expirationTime, + uint256 templateRoot, + address _stateContractAddr, + bytes2 idType + ) public initializer{ + AnonAadhaarIssuerV1Storage storage $ = _getAnonAadhaarIssuerV1Storage(); + $.nullifierSeed = nullifierSeed; + $.publicKeysHash = publicKeyHash; + $.expirationTime = expirationTime; + $.templateRoot = templateRoot; + + super.initialize(_stateContractAddr, idType); + super.__EmbeddedZKPVerifier_init(_msgSender(), IState(_stateContractAddr)); + } + + function setIssuerDidHash(uint256 issuerDidHash) public onlyOwner { + AnonAadhaarIssuerV1Storage storage $ = _getAnonAadhaarIssuerV1Storage(); + $.issuerDidHash = issuerDidHash; + } + + function _validatePublicInputs( + uint256 hashIndex, + uint256 hashValue, + uint256 nullifier, + uint256 pubKeyHash, + uint256 nullifierSeed, + uint256 issuanceDate, + uint256 expirationDate, + uint256 templateRoot, + uint256 issuerDidHash + ) private view { + AnonAadhaarIssuerV1Storage storage $ = _getAnonAadhaarIssuerV1Storage(); + require(hashIndex != 0, "Invalid hashIndex"); + require(hashValue != 0, "Invalid hashValue"); + + require(nullifierSeed == $.nullifierSeed, "Invalid nullifierSeed"); + require(pubKeyHash == $.publicKeysHash, "Invalid pubKeyHash"); + require(templateRoot == $.templateRoot, "Invalid templateRoot"); + require(issuerDidHash == $.issuerDidHash, "Invalid issuerDidHash"); + + uint256 expectedExpiration = issuanceDate + $.expirationTime; + require(expirationDate == expectedExpiration, "Invalid expirationDate"); + require(expirationDate > block.timestamp, "Proof is expired"); + + require(!$.nullifiers[nullifier], "Nullifier already exists"); + } + + function _addHashAndTransit(uint256 hi, uint256 hv) private { + _getIdentityBaseStorage().identity.addClaimHash(hi, hv); + _getIdentityBaseStorage().identity.transitState(); + } + + function _setNullifier(uint256 nullifier) private { + AnonAadhaarIssuerV1Storage storage $ = _getAnonAadhaarIssuerV1Storage(); + $.nullifiers[nullifier] = true; + } + + function cleanNullifier(uint256 nullifier) public onlyOwner { + AnonAadhaarIssuerV1Storage storage $ = _getAnonAadhaarIssuerV1Storage(); + require($.nullifiers[nullifier], "Nullifier does not exist"); + $.nullifiers[nullifier] = false; + } + + function _afterProofSubmitV2(IZKPVerifier.ZKPResponse[] memory responses) internal override { + require(responses.length == 1, "Only one response is allowed"); + uint256 hashIndex = super.getProofStorageField(_msgSender(), responses[0].requestId, "hashIndex"); + uint256 hashValue = super.getProofStorageField(_msgSender(), responses[0].requestId, "hashValue"); + uint256 nullifier = super.getProofStorageField(_msgSender(), responses[0].requestId, "nullifier"); + uint256 pubKeyHash = super.getProofStorageField(_msgSender(), responses[0].requestId, "pubKeyHash"); + uint256 nullifierSeed = super.getProofStorageField(_msgSender(), responses[0].requestId, "nullifierSeed"); + uint256 issuanceDate = super.getProofStorageField(_msgSender(), responses[0].requestId, "issuanceDate"); + uint256 expirationDate = super.getProofStorageField(_msgSender(), responses[0].requestId, "expirationDate"); + uint256 templateRoot = super.getProofStorageField(_msgSender(), responses[0].requestId, "templateRoot"); + uint256 issuerDidHash = super.getProofStorageField(_msgSender(), responses[0].requestId, "issuerDidHash"); + + + _validatePublicInputs( + hashIndex, + hashValue, + nullifier, + pubKeyHash, + nullifierSeed, + issuanceDate, + expirationDate, + templateRoot, + issuerDidHash + ); + _setNullifier(nullifier); + _addHashAndTransit(hashIndex, hashValue); + } +} diff --git a/hardhat.config.ts b/hardhat.config.ts index 94e2ce18..6a895f38 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -39,6 +39,12 @@ const config: HardhatUserConfig = { compilers: [ { version: "0.8.27", + settings: { + optimizer: { + enabled: true, + runs: 200, + }, + }, }, ], }, diff --git a/helpers/DeployAnonAadharV1Validator.ts b/helpers/DeployAnonAadharV1Validator.ts new file mode 100644 index 00000000..9a7ce0b1 --- /dev/null +++ b/helpers/DeployAnonAadharV1Validator.ts @@ -0,0 +1,133 @@ +import { ethers, upgrades } from "hardhat"; +import { Contract } from "ethers"; +import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; + +export class AnonAadhaarDeployHelper { + constructor( + private signers: SignerWithAddress[], + private readonly enableLogging: boolean = false, + ) {} + + static async initialize( + signers: SignerWithAddress[] | null = null, + enableLogging = true, + ): Promise { + let sgrs; + if (signers === null) { + sgrs = await ethers.getSigners(); + } else { + sgrs = signers; + } + + return new AnonAadhaarDeployHelper(sgrs, enableLogging); + } + + public async deployGroth16Wrapper(): Promise { + const owner = this.signers[0]; + + const verifierAnonAadhaarWrapper = await ethers.getContractFactory( + "Groth16VerifierAnonAadhaarV1Wrapper", + ); + const deployment = await verifierAnonAadhaarWrapper.deploy(); + await deployment.waitForDeployment(); + this.log( + `Groth16Wrapper contract deployed to address ${await deployment.getAddress()} from ${await owner.getAddress()}`, + ); + return deployment; + } + + public async deployAnonAadhaarV1Validator(stateContractAddress: string): Promise { + const groth16Wrapper = await this.deployGroth16Wrapper(); + + const owner = this.signers[0]; + + const verifierAddress = await groth16Wrapper.getAddress(); + + const validator = await ethers.getContractFactory("AnonAadhaarV1Validator"); + const deployment = await validator.deploy(); + await deployment.waitForDeployment(); + const tx = await deployment.initialize( + verifierAddress, + stateContractAddress, + owner.getAddress(), + ); + await tx.wait(); + return deployment; + } + + public async deployAnonAadhaarIssuerV1( + verifierLibAddress: string, + identityLibAddress: string, + stateContractAddress: string, + defaultIdType: string, + opts: { + nullifierSeed?: number; + publicKeyHash?: bigint; + expirationTime?: number; + templateRoot?: bigint; + } = {}, + ): Promise { + const { + nullifierSeed = 12345678, + publicKeyHash = BigInt( + "15134874015316324267425466444584014077184337590635665158241104437045239495873", + ), + expirationTime = 15776640, + templateRoot = BigInt( + "14996909320457734110470232238383331296733133167570138119030792979356866472831", + ), + } = opts; + + const aadhaarIssuerFactory = await ethers.getContractFactory("AnonAadhaarIssuerV1", { + libraries: { + VerifierLib: verifierLibAddress, + IdentityLib: identityLibAddress, + }, + }); + const aadhaarIssuerDeployment = await upgrades.deployProxy( + aadhaarIssuerFactory, + [ + nullifierSeed, + publicKeyHash, + expirationTime, + templateRoot, + stateContractAddress, + defaultIdType, + ], + { + unsafeAllow: ["external-library-linking"], + initializer: "initialize(uint256,uint256,uint256,uint256,address,bytes2)", + }, + ); + + await aadhaarIssuerDeployment.waitForDeployment(); + return aadhaarIssuerDeployment; + } + + public async setIssuerDidHash(issuer: Contract, didHash: string): Promise { + const tx = await issuer.setIssuerDidHash(didHash); + await tx.wait(); + } + + public async setZKPRequest( + issuer: Contract, + requestId: number, + stateContractAddress: string, + validator?: Contract, + ): Promise { + const validatorAddress = validator + ? await validator.getAddress() + : await (await this.deployAnonAadhaarV1Validator(stateContractAddress)).getAddress(); + + const tx = await issuer.setZKPRequest(requestId, { + metadata: "0x", + validator: validatorAddress, + data: "0x", + }); + await tx.wait(); + } + + private log(...args): void { + this.enableLogging && console.log(args); + } +} diff --git a/helpers/DeployHelper.ts b/helpers/DeployHelper.ts index fa25cbe3..fcecdf61 100644 --- a/helpers/DeployHelper.ts +++ b/helpers/DeployHelper.ts @@ -844,6 +844,42 @@ export class DeployHelper { }; } + async upgradeAnonAadhaarIssuerV1( + anonAadhaarV1Address: string, + verifierLibAddress: string, + identityLibAddress: string, + ): Promise { + this.log("======== AnonAadhaarIssuerV1: upgrade started ========"); + + const owner = this.signers[0]; + + this.log("upgrading AnonAadhaarIssuerV1..."); + + const AnonAadhaarIssuerV1Factory = await ethers.getContractFactory("AnonAadhaarIssuerV1", { + signer: owner, + libraries: { + VerifierLib: verifierLibAddress, + IdentityLib: identityLibAddress, + }, + }); + + const AnonAadhaarIssuerV1 = await upgrades.upgradeProxy( + anonAadhaarV1Address, + AnonAadhaarIssuerV1Factory, + { + unsafeAllow: ["external-library-linking"], + }, + ); + await AnonAadhaarIssuerV1.waitForDeployment(); + + this.log( + `AnonAadhaarIssuerV1 upgraded at address ${await AnonAadhaarIssuerV1.getAddress()} from ${await owner.getAddress()}`, + ); + + this.log("======== AnonAadhaarIssuerV1: upgrade completed ========"); + return AnonAadhaarIssuerV1; + } + async upgradeUniversalVerifier( verifierAddress: string, verifierLibAddr: string, @@ -1277,6 +1313,26 @@ export class DeployHelper { return identityTreeStore; } + async deployIdentityLib( + smtpAddress: string, + poseidonUtil3lAddress: string, + poseidonUtil4lAddress: string, + ): Promise { + const Identity = await ethers.getContractFactory("IdentityLib", { + libraries: { + SmtLib: smtpAddress, + PoseidonUnit3L: poseidonUtil3lAddress, + PoseidonUnit4L: poseidonUtil4lAddress, + }, + }); + const il = await Identity.deploy(); + await il.waitForDeployment(); + + this.log(`IdentityLib deployed to address ${await il.getAddress()}`); + + return il; + } + private log(...args): void { this.enableLogging && console.log(args); } diff --git a/helpers/OnchainIdentityDeployHelper.ts b/helpers/OnchainIdentityDeployHelper.ts index fcd02934..decc9909 100644 --- a/helpers/OnchainIdentityDeployHelper.ts +++ b/helpers/OnchainIdentityDeployHelper.ts @@ -23,9 +23,7 @@ export class OnchainIdentityDeployHelper { async deployIdentity( stateAddr: string, - smtLibAddr: string, - poseidon3Addr: string, - poseidon4Addr: string, + identityLibAddr: string, idType: string, ): Promise<{ identity: Contract; @@ -35,13 +33,12 @@ export class OnchainIdentityDeployHelper { this.log("======== Identity: deploy started ========"); const cb = await this.deployClaimBuilder(); - const il = await this.deployIdentityLib(smtLibAddr, poseidon3Addr, poseidon4Addr); this.log("deploying Identity..."); const IdentityFactory = await ethers.getContractFactory("IdentityExample", { libraries: { ClaimBuilder: await cb.getAddress(), - IdentityLib: await il.getAddress(), + IdentityLib: await identityLibAddr, }, }); const Identity = await upgrades.deployProxy(IdentityFactory, [stateAddr, idType], { @@ -68,25 +65,6 @@ export class OnchainIdentityDeployHelper { return cb; } - async deployIdentityLib( - smtpAddress: string, - poseidonUtil3lAddress: string, - poseidonUtil4lAddress: string, - ): Promise { - const Identity = await ethers.getContractFactory("IdentityLib", { - libraries: { - SmtLib: smtpAddress, - PoseidonUnit3L: poseidonUtil3lAddress, - PoseidonUnit4L: poseidonUtil4lAddress, - }, - }); - const il = await Identity.deploy(); - await il.waitForDeployment(); - this.enableLogging && this.log(`ClaimBuilder deployed to: ${await il.getAddress()}`); - - return il; - } - async deployClaimBuilderWrapper(): Promise { const cb = await this.deployClaimBuilder(); diff --git a/helpers/constants.ts b/helpers/constants.ts index 354845dc..421ad9f4 100644 --- a/helpers/constants.ts +++ b/helpers/constants.ts @@ -338,6 +338,17 @@ export const contractsInfo = Object.freeze({ libraries: {}, }, }, + GROTH16_VERIFIER_ANON_AADHAAR_V1: { + name: "Groth16VerifierAnonAadhaarV1Wrapper", + unifiedAddress: "", + create2Calldata: "", + verificationOpts: { + contract: + "contracts/lib/groth16-verifiers/Groth16VerifierAnonAadhaarV1Wrapper.sol:Groth16VerifierAnonAadhaarV1Wrapper", + constructorArgsImplementation: [], + libraries: {}, + }, + }, STATE_LIB: { name: "StateLib", unifiedAddress: "", diff --git a/package.json b/package.json index 7b20b086..2c7fff40 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,8 @@ "lint:contracts": "npx solhint contracts/**/*.sol", "prettier:contracts": "prettier --write --plugin=prettier-plugin-solidity 'contracts/**/*.sol'", "slither": "slither .", - "postinstall": "patch-package" + "postinstall": "patch-package", + "deploy:anonaadhaar:polygon-amoy": "npx hardhat run scripts/deploy/deployAnonAadhaarIssuer.ts --network polygon-amoy" }, "overrides": { "ws": "^8.17.1", diff --git a/scripts/deploy/deployAnonAadhaarIssuer.ts b/scripts/deploy/deployAnonAadhaarIssuer.ts new file mode 100644 index 00000000..fc490320 --- /dev/null +++ b/scripts/deploy/deployAnonAadhaarIssuer.ts @@ -0,0 +1,58 @@ +import { AnonAadhaarDeployHelper } from "../../helpers/DeployAnonAadharV1Validator"; +import { DeployHelper } from "../../helpers/DeployHelper"; +import { contractsInfo } from "../../helpers/constants"; +import { getStateContractAddress } from "../../helpers/helperUtils"; +import { Id, DID } from "@iden3/js-iden3-core"; +import { Merklizer } from "@iden3/js-jsonld-merklization"; +import { ethers } from "hardhat"; + +const requestId = 23095784; + +async function main() { + const stDeployHelper = await DeployHelper.initialize(); + const { defaultIdType } = await stDeployHelper.getDefaultIdType(); + + const stateContractAddress = getStateContractAddress(); + + const verifierLib = await stDeployHelper.deployVerifierLib(); + const identityLib = await stDeployHelper.deployIdentityLib( + contractsInfo.SMT_LIB.unifiedAddress, + contractsInfo.POSEIDON_3.unifiedAddress, + contractsInfo.POSEIDON_4.unifiedAddress, + ); + + const f = await AnonAadhaarDeployHelper.initialize(); + const issuer = await f.deployAnonAadhaarIssuerV1( + await verifierLib.getAddress(), + await identityLib.getAddress(), + await stateContractAddress, + defaultIdType, + { + publicKeyHash: 18063425702624337643644061197836918910810808173893535653269228433734128853484n, + }, + ); + await f.setZKPRequest(issuer, requestId, stateContractAddress); + + const network = await ethers.provider.getNetwork(); + const chainId = network.chainId; + const contractId = await issuer.getId(); + const issuerId = Id.fromBigInt(contractId); + const issuerDid = DID.parseFromId(issuerId); + const hashv = await Merklizer.hashValue("", issuerDid.string()); + await f.setIssuerDidHash(issuer, hashv.toString()); + + console.log("AnonAadhaar deployed at: ", await issuer.getAddress()); + console.log("Issuer DID was attached to the contract: ", issuerDid.string(), hashv.toString()); + console.log( + "Revocation status info:", + `${issuerDid.string()}/credentialStatus?contractAddress=${chainId}:${await issuer.getAddress()}`, + ); + console.log("Request Id: ", requestId); +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/scripts/deploy/deployIdentityExample.ts b/scripts/deploy/deployIdentityExample.ts index c465eaa7..d7f57e80 100644 --- a/scripts/deploy/deployIdentityExample.ts +++ b/scripts/deploy/deployIdentityExample.ts @@ -12,13 +12,17 @@ async function main() { const stateContractAddress = getStateContractAddress(); + const identityLib = await stDeployHelper.deployIdentityLib( + contractsInfo.SMT_LIB.unifiedAddress, + contractsInfo.POSEIDON_3.unifiedAddress, + contractsInfo.POSEIDON_4.unifiedAddress, + ); + const identityDeployHelper = await OnchainIdentityDeployHelper.initialize(); const contracts = await identityDeployHelper.deployIdentity( stateContractAddress, - contractsInfo.SMT_LIB.unifiedAddress, - contractsInfo.POSEIDON_3.unifiedAddress, - contractsInfo.POSEIDON_4.unifiedAddress, + await identityLib.getAddress(), defaultIdType, ); diff --git a/scripts/upgrade/anonaadhaar/anonaadhaar-issuer-v1-upgrade.ts b/scripts/upgrade/anonaadhaar/anonaadhaar-issuer-v1-upgrade.ts new file mode 100644 index 00000000..86c9296f --- /dev/null +++ b/scripts/upgrade/anonaadhaar/anonaadhaar-issuer-v1-upgrade.ts @@ -0,0 +1,27 @@ +import { DeployHelper } from "../../../helpers/DeployHelper"; +import { contractsInfo } from "../../../helpers/constants"; + +async function main() { + const stDeployHelper = await DeployHelper.initialize(); + + const verifierLib = await stDeployHelper.deployVerifierLib(); + const identityLib = await stDeployHelper.deployIdentityLib( + contractsInfo.SMT_LIB.unifiedAddress, + contractsInfo.POSEIDON_3.unifiedAddress, + contractsInfo.POSEIDON_4.unifiedAddress, + ); + + const contract = await stDeployHelper.upgradeAnonAadhaarIssuerV1( + "0x9b00683BF5D9cb379643fDcd547ff896e627f88C", + await verifierLib.getAddress(), + await identityLib.getAddress(), + ); + console.log(`AnonAadhaarIssuerV1 upgraded at: ${await contract.getAddress()}`); +} + +main() // Use this to upgrade and test verification + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/test/onchain-identity/onchain-identity.test.ts b/test/onchain-identity/onchain-identity.test.ts index d9fc000e..e8437980 100644 --- a/test/onchain-identity/onchain-identity.test.ts +++ b/test/onchain-identity/onchain-identity.test.ts @@ -17,11 +17,16 @@ describe("Next tests reproduce identity life cycle", function () { const [poseidon3Elements, poseidon4Elements] = await deployPoseidons([3, 4]); const stContracts = await stDeployHelper.deployStateWithLibraries(); - const contracts = await identityDeployHelper.deployIdentity( - await stContracts.state.getAddress(), + + const identityLib = await stDeployHelper.deployIdentityLib( await stContracts.smtLib.getAddress(), await poseidon3Elements.getAddress(), await poseidon4Elements.getAddress(), + ); + + const contracts = await identityDeployHelper.deployIdentity( + await stContracts.state.getAddress(), + await identityLib.getAddress(), stContracts.defaultIdType, ); @@ -280,11 +285,16 @@ describe("Claims tree proofs", () => { const [poseidon3Elements, poseidon4Elements] = await deployPoseidons([3, 4]); const stContracts = await stDeployHelper.deployStateWithLibraries(); - const contracts = await identityDeployHelper.deployIdentity( - await stContracts.state.getAddress(), + + const identityLib = await stDeployHelper.deployIdentityLib( await stContracts.smtLib.getAddress(), await poseidon3Elements.getAddress(), await poseidon4Elements.getAddress(), + ); + + const contracts = await identityDeployHelper.deployIdentity( + await stContracts.state.getAddress(), + await identityLib.getAddress(), stContracts.defaultIdType, ); identity = contracts.identity; @@ -337,11 +347,16 @@ describe("Revocation tree proofs", () => { const [poseidon3Elements, poseidon4Elements] = await deployPoseidons([3, 4]); const stContracts = await stDeployHelper.deployStateWithLibraries(); - const contracts = await identityDeployHelper.deployIdentity( - await stContracts.state.getAddress(), + + const identityLib = await stDeployHelper.deployIdentityLib( await stContracts.smtLib.getAddress(), await poseidon3Elements.getAddress(), await poseidon4Elements.getAddress(), + ); + + const contracts = await identityDeployHelper.deployIdentity( + await stContracts.state.getAddress(), + await identityLib.getAddress(), stContracts.defaultIdType, ); identity = contracts.identity; @@ -394,11 +409,16 @@ describe("Root of roots tree proofs", () => { const [poseidon3Elements, poseidon4Elements] = await deployPoseidons([3, 4]); const stContracts = await stDeployHelper.deployStateWithLibraries(); - const contracts = await identityDeployHelper.deployIdentity( - await stContracts.state.getAddress(), + + const identityLib = await stDeployHelper.deployIdentityLib( await stContracts.smtLib.getAddress(), await poseidon3Elements.getAddress(), await poseidon4Elements.getAddress(), + ); + + const contracts = await identityDeployHelper.deployIdentity( + await stContracts.state.getAddress(), + await identityLib.getAddress(), stContracts.defaultIdType, ); identity = contracts.identity; @@ -462,11 +482,16 @@ describe("Compare historical roots with latest roots from tree", () => { const [poseidon3Elements, poseidon4Elements] = await deployPoseidons([3, 4]); const stContracts = await stDeployHelper.deployStateWithLibraries(); - const contracts = await identityDeployHelper.deployIdentity( - await stContracts.state.getAddress(), + + const identityLib = await stDeployHelper.deployIdentityLib( await stContracts.smtLib.getAddress(), await poseidon3Elements.getAddress(), await poseidon4Elements.getAddress(), + ); + + const contracts = await identityDeployHelper.deployIdentity( + await stContracts.state.getAddress(), + await identityLib.getAddress(), stContracts.defaultIdType, ); identity = contracts.identity; @@ -515,11 +540,16 @@ describe("Compare historical roots with latest roots from tree", () => { const [poseidon3Elements, poseidon4Elements] = await deployPoseidons([3, 4]); const stContracts = await stDeployHelper.deployStateWithLibraries(); - const contracts = await identityDeployHelper.deployIdentity( - await stContracts.state.getAddress(), + + const identityLib = await stDeployHelper.deployIdentityLib( await stContracts.smtLib.getAddress(), await poseidon3Elements.getAddress(), await poseidon4Elements.getAddress(), + ); + + const contracts = await identityDeployHelper.deployIdentity( + await stContracts.state.getAddress(), + await identityLib.getAddress(), stContracts.defaultIdType, ); identity = contracts.identity; @@ -599,11 +629,16 @@ describe("Genesis state doens't have history of states", () => { const [poseidon3Elements, poseidon4Elements] = await deployPoseidons([3, 4]); const stContracts = await stDeployHelper.deployStateWithLibraries(); - const contracts = await identityDeployHelper.deployIdentity( - await stContracts.state.getAddress(), + + const identityLib = await stDeployHelper.deployIdentityLib( await stContracts.smtLib.getAddress(), await poseidon3Elements.getAddress(), await poseidon4Elements.getAddress(), + ); + + const contracts = await identityDeployHelper.deployIdentity( + await stContracts.state.getAddress(), + await identityLib.getAddress(), stContracts.defaultIdType, ); identity = contracts.identity; diff --git a/test/validators/sig/data/anon_aadhaar_proof.json b/test/validators/sig/data/anon_aadhaar_proof.json new file mode 100644 index 00000000..5a1ce488 --- /dev/null +++ b/test/validators/sig/data/anon_aadhaar_proof.json @@ -0,0 +1,42 @@ +{ + "proof": { + "pi_a": [ + "1026345668562832284263086689783119928355856309234077494668322689545159127368", + "14140942335412221887547282790321954437620748507214482236180180535095755621630", + "1" + ], + "pi_b": [ + [ + "2762825127842895128478150506579041910736388515082613385802060524531890421582", + "16618790985809806197335533492844382351922654866358374730162413461953190442655" + ], + [ + "16143301825424828415580718244854357120729465260616206451427957051856784869450", + "12358786870123203862931358863496691034661912114967618208344334518207905988399" + ], + [ + "1", + "0" + ] + ], + "pi_c": [ + "3465206082372457893725573406165455692048325023983228557735508438164480165858", + "17723215772758002944935006864681532300825872674985056239554094503579048915148", + "1" + ], + "protocol": "groth16", + "curve": "bn128" + }, + "pub_signals": [ + "15134874015316324267425466444584014077184337590635665158241104437045239495873", + "20000880085251726024058348644128716510331530959818215250413630864513986092459", + "8065389019705830704364040281348019476296436195892331180017217171774098922110", + "13816786102206801095776021761618666612207449009494666450616117537958083250142", + "1737635400", + "1753412040", + "12345678", + "1001", + "14996909320457734110470232238383331296733133167570138119030792979356866472831", + "12146166192964646439780403715116050536535442384123009131510511003232108502337" + ] +} \ No newline at end of file diff --git a/test/verifier/anonAadhaarVerifier.test.ts b/test/verifier/anonAadhaarVerifier.test.ts new file mode 100644 index 00000000..f87728f1 --- /dev/null +++ b/test/verifier/anonAadhaarVerifier.test.ts @@ -0,0 +1,63 @@ +import { AnonAadhaarDeployHelper } from "../../helpers/DeployAnonAadharV1Validator"; +import { prepareInputs } from "../utils/state-utils"; +import proofJson from "../validators/sig/data/anon_aadhaar_proof.json"; +import { expect } from "chai"; +import { packZKProof } from "../utils/packData"; +import { DeployHelper } from "../../helpers/DeployHelper"; +import { deployPoseidons } from "../../helpers/PoseidonDeployHelper"; + +const emptyCrossChainProofs = new Uint8Array(); +const requestId = 940499666; + +describe("Verify anon aadhaar proof onchain", async () => { + let issuer; + + before(async function () { + const stDeployHelper = await DeployHelper.initialize(); + const basicContracts = await stDeployHelper.deployStateWithLibraries(); + const verifierLib = await stDeployHelper.deployVerifierLib(); + + const poseidons = await deployPoseidons([3, 4]); + + const identityLib = await stDeployHelper.deployIdentityLib( + await basicContracts.smtLib.getAddress(), + await poseidons[0].getAddress(), + await poseidons[1].getAddress(), + ); + + const f = await AnonAadhaarDeployHelper.initialize(); + issuer = await f.deployAnonAadhaarIssuerV1( + await verifierLib.getAddress(), + await identityLib.getAddress(), + await basicContracts.state.getAddress(), + basicContracts.defaultIdType, + ); + await f.setZKPRequest(issuer, requestId, await basicContracts.state.getAddress()); + await f.setIssuerDidHash( + issuer, + "12146166192964646439780403715116050536535442384123009131510511003232108502337", + ); + }); + + it("Issue a credential and verify proof", async () => { + const { inputs, pi_a, pi_b, pi_c } = prepareInputs(proofJson); + const inputsBytes = packZKProof(inputs, pi_a, pi_b, pi_c); + + const singleProof = [ + { + requestId: requestId, + zkProof: inputsBytes, + data: "0x", + }, + ]; + + const tx = await issuer.submitZKPResponseV2(singleProof, emptyCrossChainProofs); + await tx.wait(); + const proof = await issuer.getClaimProof(inputs[2]); + expect(proof[1]).to.be.true; + + await expect(issuer.submitZKPResponseV2(singleProof, emptyCrossChainProofs)).to.be.revertedWith( + "Nullifier already exists", + ); + }); +});