diff --git a/deployments/mumbai/.chainId b/deployments/mumbai/.chainId new file mode 100644 index 0000000..d7e2f72 --- /dev/null +++ b/deployments/mumbai/.chainId @@ -0,0 +1 @@ +80001 \ No newline at end of file diff --git a/deployments/mumbai/AttestationsRegistry.json b/deployments/mumbai/AttestationsRegistry.json new file mode 100644 index 0000000..816e175 --- /dev/null +++ b/deployments/mumbai/AttestationsRegistry.json @@ -0,0 +1,1285 @@ +{ + "address": "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "badgesAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + } + ], + "name": "AttesterNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "rangeIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedFirstId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedLastId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "FirstId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastCollectionId", + "type": "uint256" + } + ], + "name": "IdsMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + } + ], + "name": "IssuerNotAuthorized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "expectedArrayLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rangeIndex", + "type": "uint256" + } + ], + "name": "RangeIndexOutOfBounds", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct Attestation", + "name": "attestation", + "type": "tuple" + } + ], + "name": "AttestationDeleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct Attestation", + "name": "attestation", + "type": "tuple" + } + ], + "name": "AttestationRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "firstCollectionId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lastCollectionId", + "type": "uint256" + } + ], + "name": "IssuerAuthorized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "firstCollectionId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lastCollectionId", + "type": "uint256" + } + ], + "name": "IssuerUnauthorized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "firstCollectionId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastCollectionId", + "type": "uint256" + } + ], + "name": "authorizeRange", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "internalType": "struct Range[]", + "name": "ranges", + "type": "tuple[]" + } + ], + "name": "authorizeRanges", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "attestations", + "type": "tuple[]" + } + ], + "name": "deleteAttestations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "getAttestationData", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct AttestationData", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "collectionIds", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "owners", + "type": "address[]" + } + ], + "name": "getAttestationDataBatch", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct AttestationData[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "getAttestationDataTuple", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "getAttestationExtraData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "getAttestationIssuer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "getAttestationTimestamp", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "getAttestationValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "collectionIds", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "owners", + "type": "address[]" + } + ], + "name": "getAttestationValueBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "hasAttestation", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + } + ], + "name": "isAuthorized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "attestations", + "type": "tuple[]" + } + ], + "name": "recordAttestations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "rangeIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "firstCollectionId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastCollectionId", + "type": "uint256" + } + ], + "name": "unauthorizeRange", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "internalType": "struct Range[]", + "name": "ranges", + "type": "tuple[]" + }, + { + "internalType": "uint256[]", + "name": "rangeIndexes", + "type": "uint256[]" + } + ], + "name": "unauthorizeRanges", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x02e0a88cf5bcdf37530ff84fab1c3fdfd6f9e6ee6875723b19f38b651dd232be", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0xF2cFB43D86aE0D4932888fe51ed6B430222e32e8", + "transactionIndex": 49, + "gasUsed": "2207509", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000040000000000000008000002000000000000000000000000000000000000000000000000000800801000000000000040100000000000000000000020000000000000000000800000000000000000080000000000000400000000000000000000000000000000000000010000000000000000000008000200000000000000000000000000000000000000000000000000040000000004000000000000000000001000000000000000000000000000000100000000020001000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0x1b426f0ae02e4cc34101711cfce23c9aa921c6ade3aa99b5f3e2ee8c6c354378", + "transactionHash": "0x02e0a88cf5bcdf37530ff84fab1c3fdfd6f9e6ee6875723b19f38b651dd232be", + "logs": [ + { + "transactionIndex": 49, + "blockNumber": 28599982, + "transactionHash": "0x02e0a88cf5bcdf37530ff84fab1c3fdfd6f9e6ee6875723b19f38b651dd232be", + "address": "0xF2cFB43D86aE0D4932888fe51ed6B430222e32e8", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 297, + "blockHash": "0x1b426f0ae02e4cc34101711cfce23c9aa921c6ade3aa99b5f3e2ee8c6c354378" + }, + { + "transactionIndex": 49, + "blockNumber": 28599982, + "transactionHash": "0x02e0a88cf5bcdf37530ff84fab1c3fdfd6f9e6ee6875723b19f38b651dd232be", + "address": "0xF2cFB43D86aE0D4932888fe51ed6B430222e32e8", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 298, + "blockHash": "0x1b426f0ae02e4cc34101711cfce23c9aa921c6ade3aa99b5f3e2ee8c6c354378" + }, + { + "transactionIndex": 49, + "blockNumber": 28599982, + "transactionHash": "0x02e0a88cf5bcdf37530ff84fab1c3fdfd6f9e6ee6875723b19f38b651dd232be", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000012d5afa893cedf000000000000000000000000000000000000000000000000894ad152ee570cbf000000000000000000000000000000000000000000000a08d0e2d8af28157ff80000000000000000000000000000000000000000000000008937fba345c33de0000000000000000000000000000000000000000000000a08d0f5ae5ed0a94ed7", + "logIndex": 299, + "blockHash": "0x1b426f0ae02e4cc34101711cfce23c9aa921c6ade3aa99b5f3e2ee8c6c354378" + } + ], + "blockNumber": 28599982, + "cumulativeGasUsed": "12020743", + "status": 1, + "byzantium": true + }, + "args": [ + "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "0x5722fEa81027533721BA161964622271560da1aC" + ], + "numDeployments": 2, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"badgesAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"}],\"name\":\"AttesterNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"rangeIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expectedFirstId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expectedLastId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"FirstId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastCollectionId\",\"type\":\"uint256\"}],\"name\":\"IdsMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"}],\"name\":\"IssuerNotAuthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expectedArrayLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rangeIndex\",\"type\":\"uint256\"}],\"name\":\"RangeIndexOutOfBounds\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct Attestation\",\"name\":\"attestation\",\"type\":\"tuple\"}],\"name\":\"AttestationDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct Attestation\",\"name\":\"attestation\",\"type\":\"tuple\"}],\"name\":\"AttestationRecorded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"firstCollectionId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lastCollectionId\",\"type\":\"uint256\"}],\"name\":\"IssuerAuthorized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"firstCollectionId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lastCollectionId\",\"type\":\"uint256\"}],\"name\":\"IssuerUnauthorized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"firstCollectionId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastCollectionId\",\"type\":\"uint256\"}],\"name\":\"authorizeRange\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"internalType\":\"struct Range[]\",\"name\":\"ranges\",\"type\":\"tuple[]\"}],\"name\":\"authorizeRanges\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"attestations\",\"type\":\"tuple[]\"}],\"name\":\"deleteAttestations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"getAttestationData\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct AttestationData\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"}],\"name\":\"getAttestationDataBatch\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct AttestationData[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"getAttestationDataTuple\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"getAttestationExtraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"getAttestationIssuer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"getAttestationTimestamp\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"getAttestationValue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"}],\"name\":\"getAttestationValueBatch\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"hasAttestation\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"}],\"name\":\"isAuthorized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"attestations\",\"type\":\"tuple[]\"}],\"name\":\"recordAttestations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"rangeIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"firstCollectionId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastCollectionId\",\"type\":\"uint256\"}],\"name\":\"unauthorizeRange\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"internalType\":\"struct Range[]\",\"name\":\"ranges\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256[]\",\"name\":\"rangeIndexes\",\"type\":\"uint256[]\"}],\"name\":\"unauthorizeRanges\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"authorizeRange(address,uint256,uint256)\":{\"details\":\"Authorize an issuer for a specific range\",\"params\":{\"firstCollectionId\":\"First collection Id of the range for which the issuer will be authorized\",\"issuer\":\"Issuer that will be authorized\",\"lastCollectionId\":\"Last collection Id of the range for which the issuer will be authorized\"}},\"authorizeRanges(address,(uint256,uint256)[])\":{\"details\":\"Authorize an issuer for specific ranges\",\"params\":{\"issuer\":\"Issuer that will be authorized\",\"ranges\":\"Ranges for which the issuer will be authorized\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"badgesAddress\":\"Stateless ERC1155 Badges contract\",\"owner\":\"Owner of the contract, has the right to authorize/unauthorize attestations issuers\"}},\"deleteAttestations((uint256,address,address,uint256,uint32,bytes)[])\":{\"details\":\"Delete function to be called by authorized issuers\",\"params\":{\"attestations\":\"Attestations to be deleted\"}},\"getAttestationData(uint256,address)\":{\"details\":\"Getter of the data of a specific attestation\",\"params\":{\"collectionId\":\"Collection identifier of the targeted attestation\",\"owner\":\"Owner of the targeted attestation\"}},\"getAttestationDataBatch(uint256[],address[])\":{\"details\":\"Getter of the data of specific attestations\",\"params\":{\"collectionIds\":\"Collection identifiers of the targeted attestations\",\"owners\":\"Owners of the targeted attestations\"}},\"getAttestationDataTuple(uint256,address)\":{\"details\":\"Getter of the data of a specific attestation as tuple\",\"params\":{\"collectionId\":\"Collection identifier of the targeted attestation\",\"owner\":\"Owner of the targeted attestation\"}},\"getAttestationExtraData(uint256,address)\":{\"details\":\"Getter of the extraData of a specific attestation\",\"params\":{\"collectionId\":\"Collection identifier of the targeted attestation\",\"owner\":\"Owner of the targeted attestation\"}},\"getAttestationIssuer(uint256,address)\":{\"details\":\"Getter of the issuer of a specific attestation\",\"params\":{\"collectionId\":\"Collection identifier of the targeted attestation\",\"owner\":\"Owner of the targeted attestation\"}},\"getAttestationTimestamp(uint256,address)\":{\"details\":\"Getter of the timestamp of a specific attestation\",\"params\":{\"collectionId\":\"Collection identifier of the targeted attestation\",\"owner\":\"Owner of the targeted attestation\"}},\"getAttestationValue(uint256,address)\":{\"details\":\"Getter of the value of a specific attestation\",\"params\":{\"collectionId\":\"Collection identifier of the targeted attestation\",\"owner\":\"Owner of the targeted attestation\"}},\"getAttestationValueBatch(uint256[],address[])\":{\"details\":\"Getter of the values of specific attestations\",\"params\":{\"collectionIds\":\"Collection identifiers of the targeted attestations\",\"owners\":\"Owners of the targeted attestations\"}},\"hasAttestation(uint256,address)\":{\"details\":\"Returns whether a user has an attestation from a collection\",\"params\":{\"collectionId\":\"Collection identifier of the targeted attestation\",\"owner\":\"Owner of the targeted attestation\"}},\"initialize(address)\":{\"details\":\"Initialize function, to be called by the proxy delegating calls to this implementation\",\"params\":{\"owner\":\"Owner of the contract, has the right to authorize/unauthorize attestations issuers\"}},\"isAuthorized(address,uint256)\":{\"details\":\"Returns whether a specific issuer is authorized or not to record in a specific attestations collection\",\"params\":{\"collectionId\":\"Collection Id for which the issuer will be checked\",\"issuer\":\"Issuer to be checked\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pause()\":{\"details\":\"Pauses the registry. Issuers can no longer record or delete attestations\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"recordAttestations((uint256,address,address,uint256,uint32,bytes)[])\":{\"details\":\"Main function to be called by authorized issuers\",\"params\":{\"attestations\":\"Attestations to be recorded (creates a new one or overrides an existing one)\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unauthorizeRange(address,uint256,uint256,uint256)\":{\"details\":\"Unauthorize an issuer for a specific range\",\"params\":{\"firstCollectionId\":\"First collection Id of the range for which the issuer will be unauthorized\",\"issuer\":\"Issuer that will be unauthorized\",\"lastCollectionId\":\"Last collection Id of the range for which the issuer will be unauthorized\",\"rangeIndex\":\"Index of the range to be unauthorized\"}},\"unauthorizeRanges(address,(uint256,uint256)[],uint256[])\":{\"details\":\"Unauthorize an issuer for specific ranges\",\"params\":{\"issuer\":\"Issuer that will be unauthorized\",\"ranges\":\"Ranges for which the issuer will be unauthorized\"}},\"unpause()\":{\"details\":\"Unpauses the registry\"}},\"title\":\"Attestations Registry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Main contract of Sismo, stores all recorded attestations in attestations collections Only authorized attestations issuers can record attestation in the registry Attesters that expect to record in the Attestations Registry must be authorized issuers For more information: https://attestations-registry.docs.sismo.io For each attestation recorded, a badge is received by the user The badge is the Non transferrable NFT representation of an attestation Its ERC1155 contract is stateless, balances are read directly from the registry. Badge balances <=> Attestations values After the creation or update of an attestation, the registry triggers a TransferSingle event from the ERC1155 Badges contracts It enables off-chain apps such as opensea to catch the \\\"shadow mint\\\" of the badge*\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/core/AttestationsRegistry.sol\":\"AttestationsRegistry\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/core/AttestationsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {IAttestationsRegistry} from './interfaces/IAttestationsRegistry.sol';\\nimport {AttestationsRegistryConfigLogic} from './libs/attestations-registry/AttestationsRegistryConfigLogic.sol';\\nimport {AttestationsRegistryState} from './libs/attestations-registry/AttestationsRegistryState.sol';\\nimport {Range, RangeUtils} from './libs/utils/RangeLib.sol';\\nimport {Attestation, AttestationData} from './libs/Structs.sol';\\nimport {IBadges} from './interfaces/IBadges.sol';\\n\\n/**\\n * @title Attestations Registry\\n * @author Sismo\\n * @notice Main contract of Sismo, stores all recorded attestations in attestations collections\\n * Only authorized attestations issuers can record attestation in the registry\\n * Attesters that expect to record in the Attestations Registry must be authorized issuers\\n * For more information: https://attestations-registry.docs.sismo.io\\n\\n * For each attestation recorded, a badge is received by the user\\n * The badge is the Non transferrable NFT representation of an attestation \\n * Its ERC1155 contract is stateless, balances are read directly from the registry. Badge balances <=> Attestations values\\n * After the creation or update of an attestation, the registry triggers a TransferSingle event from the ERC1155 Badges contracts\\n * It enables off-chain apps such as opensea to catch the \\\"shadow mint\\\" of the badge\\n **/\\ncontract AttestationsRegistry is\\n AttestationsRegistryState,\\n IAttestationsRegistry,\\n AttestationsRegistryConfigLogic\\n{\\n IBadges immutable BADGES;\\n\\n /**\\n * @dev Constructor.\\n * @param owner Owner of the contract, has the right to authorize/unauthorize attestations issuers\\n * @param badgesAddress Stateless ERC1155 Badges contract\\n */\\n constructor(address owner, address badgesAddress) {\\n initialize(owner);\\n BADGES = IBadges(badgesAddress);\\n }\\n\\n /**\\n * @dev Initialize function, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, has the right to authorize/unauthorize attestations issuers\\n */\\n function initialize(address owner) public initializer {\\n _transferOwnership(owner);\\n }\\n\\n /**\\n * @dev Main function to be called by authorized issuers\\n * @param attestations Attestations to be recorded (creates a new one or overrides an existing one)\\n */\\n function recordAttestations(Attestation[] calldata attestations) external override whenNotPaused {\\n address issuer = _msgSender();\\n for (uint256 i = 0; i < attestations.length; i++) {\\n if (!_isAuthorized(issuer, attestations[i].collectionId))\\n revert IssuerNotAuthorized(issuer, attestations[i].collectionId);\\n\\n uint256 previousAttestationValue = _attestationsData[attestations[i].collectionId][\\n attestations[i].owner\\n ].value;\\n\\n _attestationsData[attestations[i].collectionId][attestations[i].owner] = AttestationData(\\n attestations[i].issuer,\\n attestations[i].value,\\n attestations[i].timestamp,\\n attestations[i].extraData\\n );\\n\\n _triggerBadgeTransferEvent(\\n attestations[i].collectionId,\\n attestations[i].owner,\\n previousAttestationValue,\\n attestations[i].value\\n );\\n emit AttestationRecorded(attestations[i]);\\n }\\n }\\n\\n /**\\n * @dev Delete function to be called by authorized issuers\\n * @param attestations Attestations to be deleted\\n */\\n function deleteAttestations(Attestation[] memory attestations) external override whenNotPaused {\\n address issuer = _msgSender();\\n for (uint256 i = 0; i < attestations.length; i++) {\\n uint256 previousAttestationValue = _attestationsData[attestations[i].collectionId][\\n attestations[i].owner\\n ].value;\\n\\n if (!_isAuthorized(issuer, attestations[i].collectionId))\\n revert IssuerNotAuthorized(issuer, attestations[i].collectionId);\\n delete _attestationsData[attestations[i].collectionId][attestations[i].owner];\\n\\n _triggerBadgeTransferEvent(\\n attestations[i].collectionId,\\n attestations[i].owner,\\n previousAttestationValue,\\n 0\\n );\\n\\n emit AttestationDeleted(\\n Attestation(\\n attestations[i].collectionId,\\n attestations[i].owner,\\n attestations[i].issuer,\\n attestations[i].value,\\n attestations[i].timestamp,\\n attestations[i].extraData\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns whether a user has an attestation from a collection\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function hasAttestation(uint256 collectionId, address owner)\\n external\\n view\\n override\\n returns (bool)\\n {\\n return _getAttestationValue(collectionId, owner) != 0;\\n }\\n\\n /**\\n * @dev Getter of the data of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationData(uint256 collectionId, address owner)\\n external\\n view\\n override\\n returns (AttestationData memory)\\n {\\n return _getAttestationData(collectionId, owner);\\n }\\n\\n /**\\n * @dev Getter of the value of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationValue(uint256 collectionId, address owner)\\n external\\n view\\n override\\n returns (uint256)\\n {\\n return _getAttestationValue(collectionId, owner);\\n }\\n\\n /**\\n * @dev Getter of the data of a specific attestation as tuple\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationDataTuple(uint256 collectionId, address owner)\\n external\\n view\\n override\\n returns (\\n address,\\n uint256,\\n uint32,\\n bytes memory\\n )\\n {\\n AttestationData memory attestationData = _attestationsData[collectionId][owner];\\n return (\\n attestationData.issuer,\\n attestationData.value,\\n attestationData.timestamp,\\n attestationData.extraData\\n );\\n }\\n\\n /**\\n * @dev Getter of the extraData of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationExtraData(uint256 collectionId, address owner)\\n external\\n view\\n override\\n returns (bytes memory)\\n {\\n return _attestationsData[collectionId][owner].extraData;\\n }\\n\\n /**\\n * @dev Getter of the issuer of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationIssuer(uint256 collectionId, address owner)\\n external\\n view\\n override\\n returns (address)\\n {\\n return _attestationsData[collectionId][owner].issuer;\\n }\\n\\n /**\\n * @dev Getter of the timestamp of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationTimestamp(uint256 collectionId, address owner)\\n external\\n view\\n override\\n returns (uint32)\\n {\\n return _attestationsData[collectionId][owner].timestamp;\\n }\\n\\n /**\\n * @dev Getter of the data of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationDataBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n override\\n returns (AttestationData[] memory)\\n {\\n AttestationData[] memory attestationsDataArray = new AttestationData[](collectionIds.length);\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n attestationsDataArray[i] = _getAttestationData(collectionIds[i], owners[i]);\\n }\\n return attestationsDataArray;\\n }\\n\\n /**\\n * @dev Getter of the values of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationValueBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n override\\n returns (uint256[] memory)\\n {\\n uint256[] memory attestationsValues = new uint256[](collectionIds.length);\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n attestationsValues[i] = _getAttestationValue(collectionIds[i], owners[i]);\\n }\\n return attestationsValues;\\n }\\n\\n /**\\n * @dev Function that trigger a TransferSingle event from the stateless ERC1155 Badges contract\\n * It enables off-chain apps such as opensea to catch the \\\"shadow mints/burns\\\" of badges\\n */\\n function _triggerBadgeTransferEvent(\\n uint256 badgeTokenId,\\n address owner,\\n uint256 previousValue,\\n uint256 newValue\\n ) internal {\\n bool isGreaterValue = newValue > previousValue;\\n address operator = address(this);\\n address from = isGreaterValue ? address(0) : owner;\\n address to = isGreaterValue ? owner : address(0);\\n uint256 value = isGreaterValue ? newValue - previousValue : previousValue - newValue;\\n\\n // if isGreaterValue is true, function triggers mint event. Otherwise triggers burn event.\\n BADGES.triggerTransferEvent(operator, from, to, badgeTokenId, value);\\n }\\n\\n function _getAttestationData(uint256 collectionId, address owner)\\n internal\\n view\\n returns (AttestationData memory)\\n {\\n return (_attestationsData[collectionId][owner]);\\n }\\n\\n function _getAttestationValue(uint256 collectionId, address owner)\\n internal\\n view\\n returns (uint256)\\n {\\n return _attestationsData[collectionId][owner].value;\\n }\\n}\\n\",\"keccak256\":\"0x8c9ee3d788fb52eb9001c10e6da2f09c0b7eb0a691c31ecd4762ddf3a7fd6540\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttestationsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Attestation, AttestationData} from '../libs/Structs.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry {\\n event AttestationRecorded(Attestation attestation);\\n event AttestationDeleted(Attestation attestation);\\n\\n /**\\n * @dev Main function to be called by authorized issuers\\n * @param attestations Attestations to be recorded (creates a new one or overrides an existing one)\\n */\\n function recordAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Delete function to be called by authorized issuers\\n * @param attestations Attestations to be deleted\\n */\\n function deleteAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Returns whether a user has an attestation from a collection\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function hasAttestation(uint256 collectionId, address owner) external returns (bool);\\n\\n /**\\n * @dev Getter of the data of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationData(uint256 collectionId, address owner)\\n external\\n view\\n returns (AttestationData memory);\\n\\n /**\\n * @dev Getter of the value of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationValue(uint256 collectionId, address owner) external view returns (uint256);\\n\\n /**\\n * @dev Getter of the data of a specific attestation as tuple\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationDataTuple(uint256 collectionId, address owner)\\n external\\n view\\n returns (\\n address,\\n uint256,\\n uint32,\\n bytes memory\\n );\\n\\n /**\\n * @dev Getter of the extraData of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationExtraData(uint256 collectionId, address owner)\\n external\\n view\\n returns (bytes memory);\\n\\n /**\\n * @dev Getter of the issuer of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationIssuer(uint256 collectionId, address owner)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @dev Getter of the timestamp of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationTimestamp(uint256 collectionId, address owner)\\n external\\n view\\n returns (uint32);\\n\\n /**\\n * @dev Getter of the data of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationDataBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (AttestationData[] memory);\\n\\n /**\\n * @dev Getter of the values of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationValueBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xb5e25bd7e0372c9973e582fb7fe96318c145831a5452d8c79eb848a7464b0297\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttestationsRegistryConfigLogic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Forked from, removed storage, OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.14;\\n\\nimport {Range, RangeUtils} from '../libs/utils/RangeLib.sol';\\n\\ninterface IAttestationsRegistryConfigLogic {\\n error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error AttesterNotFound(address issuer);\\n error RangeIndexOutOfBounds(address issuer, uint256 expectedArrayLength, uint256 rangeIndex);\\n error IdsMismatch(\\n address issuer,\\n uint256 rangeIndex,\\n uint256 expectedFirstId,\\n uint256 expectedLastId,\\n uint256 FirstId,\\n uint256 lastCollectionId\\n );\\n event IssuerAuthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n event IssuerUnauthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n\\n /**\\n * @dev Authorize an issuer for a specific range\\n * @param issuer Issuer that will be authorized\\n * @param firstCollectionId First collection Id of the range for which the issuer will be authorized\\n * @param lastCollectionId Last collection Id of the range for which the issuer will be authorized\\n */\\n function authorizeRange(\\n address issuer,\\n uint256 firstCollectionId,\\n uint256 lastCollectionId\\n ) external;\\n\\n /**\\n * @dev Unauthorize an issuer for a specific range\\n * @param issuer Issuer that will be unauthorized\\n * @param rangeIndex Index of the range to be unauthorized\\n * @param firstCollectionId First collection Id of the range for which the issuer will be unauthorized\\n * @param lastCollectionId Last collection Id of the range for which the issuer will be unauthorized\\n */\\n function unauthorizeRange(\\n address issuer,\\n uint256 rangeIndex,\\n uint256 firstCollectionId,\\n uint256 lastCollectionId\\n ) external;\\n\\n /**\\n * @dev Authorize an issuer for specific ranges\\n * @param issuer Issuer that will be authorized\\n * @param ranges Ranges for which the issuer will be authorized\\n */\\n function authorizeRanges(address issuer, Range[] memory ranges) external;\\n\\n /**\\n * @dev Unauthorize an issuer for specific ranges\\n * @param issuer Issuer that will be unauthorized\\n * @param ranges Ranges for which the issuer will be unauthorized\\n */\\n function unauthorizeRanges(\\n address issuer,\\n Range[] memory ranges,\\n uint256[] memory rangeIndexes\\n ) external;\\n\\n /**\\n * @dev Returns whether a specific issuer is authorized or not to record in a specific attestations collection\\n * @param issuer Issuer to be checked\\n * @param collectionId Collection Id for which the issuer will be checked\\n */\\n function isAuthorized(address issuer, uint256 collectionId) external view returns (bool);\\n\\n /**\\n * @dev Pauses the registry. Issuers can no longer record or delete attestations\\n */\\n function pause() external;\\n\\n /**\\n * @dev Unpauses the registry\\n */\\n function unpause() external;\\n}\\n\",\"keccak256\":\"0x4d93f06dd4df1d3d071effd39c86c43154387290e2b9b7f5153e1d1ba5f131b1\",\"license\":\"MIT\"},\"contracts/core/interfaces/IBadges.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title Interface for Badges contract\\n * @author Sismo\\n * @notice Stateless ERC1155 contract. Reads balance from the values of attestations\\n * The associated attestations registry triggers TransferSingle events from this contract\\n * It allows badge \\\"shadow mints and burns\\\" to be caught by off-chain platforms\\n */\\ninterface IBadges {\\n error BadgesNonTransferrable();\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param uri Uri for the metadata of badges\\n * @param owner Owner of the contract, super admin, can setup roles and update the attestation registry\\n */\\n function initialize(string memory uri, address owner) external;\\n\\n /**\\n * @dev Main function of the ERC1155 badge\\n * The balance of a user is equal to the value of the underlying attestation.\\n * attestationCollectionId == badgeId\\n * @param account Address to check badge balance (= value of attestation)\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev Emits a TransferSingle event, so subgraphs and other off-chain apps relying on events can see badge minting/burning\\n * can only be called by address having the EVENT_TRIGGERER_ROLE (attestations registry address)\\n * @param operator who is calling the TransferEvent\\n * @param from address(0) if minting, address of the badge holder if burning\\n * @param to address of the badge holder is minting, address(0) if burning\\n * @param id badgeId for which to trigger the event\\n * @param value minted/burned balance\\n */\\n function triggerTransferEvent(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 value\\n ) external;\\n\\n /**\\n * @dev Set the attestations registry address. Can only be called by owner (default admin)\\n * @param attestationsRegistry new attestations registry address\\n */\\n function setAttestationsRegistry(address attestationsRegistry) external;\\n\\n /**\\n * @dev Set the URI. Can only be called by owner (default admin)\\n * @param uri new attestations registry address\\n */\\n function setUri(string memory uri) external;\\n\\n /**\\n * @dev Getter of the attestations registry\\n */\\n function getAttestationsRegistry() external view returns (address);\\n}\\n\",\"keccak256\":\"0xbd279560345ab0f4d4b7f689e714f907522676fe86b17341db034b5a98799019\",\"license\":\"MIT\"},\"contracts/core/libs/Structs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title Attestations Registry State\\n * @author Sismo\\n * @notice This contract holds all of the storage variables and data\\n * structures used by the AttestationsRegistry and parent\\n * contracts.\\n */\\n\\n// User Attestation Request, can be made by any user\\n// The context of an Attestation Request is a specific attester contract\\n// Each attester has groups of accounts in its available data\\n// eg: for a specific attester:\\n// group 1 <=> accounts that sent txs on mainnet\\n// group 2 <=> accounts that sent txs on polygon\\n// eg: for another attester:\\n// group 1 <=> accounts that sent eth txs in 2022\\n// group 2 <=> accounts sent eth txs in 2021\\nstruct Request {\\n // implicit address attester;\\n // implicit uint256 chainId;\\n Claim[] claims;\\n address destination; // destination that will receive the end attestation\\n}\\n\\nstruct Claim {\\n uint256 groupId; // user claims to have an account in this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n bytes extraData; // arbitrary data, may be required by the attester to verify claims or generate a specific attestation\\n}\\n\\n/**\\n * @dev Attestation Struct. This is the struct receive as argument by the Attestation Registry.\\n * @param collectionId Attestation collection\\n * @param owner Attestation collection\\n * @param issuer Attestation collection\\n * @param value Attestation collection\\n * @param timestamp Attestation collection\\n * @param extraData Attestation collection\\n */\\nstruct Attestation {\\n // implicit uint256 chainId;\\n uint256 collectionId; // Id of the attestation collection (in the registry)\\n address owner; // Owner of the attestation\\n address issuer; // Contract that created or last updated the record.\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Timestamp chosen by the attester, should correspond to the effective date of the attestation\\n // it is different from the recording timestamp (date when the attestation was recorded)\\n // e.g a proof of NFT ownership may have be recorded today which is 2 month old data.\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\\n// Attestation Data, stored in the registry\\n// The context is a specific owner of a specific collection\\nstruct AttestationData {\\n // implicit uint256 chainId\\n // implicit uint256 collectionId - from context\\n // implicit owner\\n address issuer; // Address of the contract that recorded the attestation\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Effective date of issuance of the attestation. (can be different from the recording timestamp)\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\",\"keccak256\":\"0x893d9a10429878dd4077388ff4da954c20b86a3c172a7bbdd10a01eb5d39b6a0\",\"license\":\"MIT\"},\"contracts/core/libs/attestations-registry/AttestationsRegistryConfigLogic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Forked from, removed storage, OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.14;\\n\\nimport './OwnableLogic.sol';\\nimport './PausableLogic.sol';\\nimport './InitializableLogic.sol';\\nimport './AttestationsRegistryState.sol';\\nimport {IAttestationsRegistryConfigLogic} from './../../interfaces/IAttestationsRegistryConfigLogic.sol';\\nimport {Range, RangeUtils} from '../utils/RangeLib.sol';\\n\\n/**\\n * @title Attestations Registry Config Logic contract\\n * @author Sismo\\n * @notice Holds the logic of how to authorize/ unauthorize issuers of attestations in the registry\\n **/\\ncontract AttestationsRegistryConfigLogic is\\n AttestationsRegistryState,\\n IAttestationsRegistryConfigLogic,\\n OwnableLogic,\\n PausableLogic,\\n InitializableLogic\\n{\\n using RangeUtils for Range[];\\n\\n /**\\n * @dev Authorize an issuer for a specific range\\n * @param issuer Issuer that will be authorized\\n * @param firstCollectionId First collection Id of the range for which the issuer will be authorized\\n * @param lastCollectionId Last collection Id of the range for which the issuer will be authorized\\n */\\n function authorizeRange(\\n address issuer,\\n uint256 firstCollectionId,\\n uint256 lastCollectionId\\n ) external override onlyOwner {\\n _authorizeRange(issuer, firstCollectionId, lastCollectionId);\\n }\\n\\n /**\\n * @dev Unauthorize an issuer for a specific range\\n * @param issuer Issuer that will be unauthorized\\n * @param rangeIndex Index of the range to be unauthorized\\n * @param firstCollectionId First collection Id of the range for which the issuer will be unauthorized\\n * @param lastCollectionId Last collection Id of the range for which the issuer will be unauthorized\\n */\\n function unauthorizeRange(\\n address issuer,\\n uint256 rangeIndex,\\n uint256 firstCollectionId,\\n uint256 lastCollectionId\\n ) external override onlyOwner {\\n _unauthorizeRange(issuer, rangeIndex, firstCollectionId, lastCollectionId);\\n }\\n\\n /**\\n * @dev Authorize an issuer for specific ranges\\n * @param issuer Issuer that will be authorized\\n * @param ranges Ranges for which the issuer will be authorized\\n */\\n function authorizeRanges(address issuer, Range[] memory ranges) external override onlyOwner {\\n for (uint256 i = 0; i < ranges.length; i++) {\\n _authorizeRange(issuer, ranges[i].min, ranges[i].max);\\n }\\n }\\n\\n /**\\n * @dev Unauthorize an issuer for specific ranges\\n * @param issuer Issuer that will be unauthorized\\n * @param ranges Ranges for which the issuer will be unauthorized\\n */\\n function unauthorizeRanges(\\n address issuer,\\n Range[] memory ranges,\\n uint256[] memory rangeIndexes\\n ) external override onlyOwner {\\n for (uint256 i = 0; i < rangeIndexes.length; i++) {\\n _unauthorizeRange(issuer, rangeIndexes[i] - i, ranges[i].min, ranges[i].max);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a specific issuer is authorized or not to record in a specific attestations collection\\n * @param issuer Issuer to be checked\\n * @param collectionId Collection Id for which the issuer will be checked\\n */\\n function isAuthorized(address issuer, uint256 collectionId) external view returns (bool) {\\n return _isAuthorized(issuer, collectionId);\\n }\\n\\n /**\\n * @dev Pauses the registry. Issuers can no longer record or delete attestations\\n */\\n function pause() external override onlyOwner {\\n _pause();\\n }\\n\\n /**\\n * @dev Unpauses the registry\\n */\\n function unpause() external override onlyOwner {\\n _unpause();\\n }\\n\\n function _isAuthorized(address issuer, uint256 collectionId) internal view returns (bool) {\\n return _authorizedRanges[issuer]._includes(collectionId);\\n }\\n\\n function _authorizeRange(\\n address issuer,\\n uint256 firstCollectionId,\\n uint256 lastCollectionId\\n ) internal {\\n Range memory newRange = Range(firstCollectionId, lastCollectionId);\\n _authorizedRanges[issuer].push(newRange);\\n emit IssuerAuthorized(issuer, firstCollectionId, lastCollectionId);\\n }\\n\\n function _unauthorizeRange(\\n address issuer,\\n uint256 rangeIndex,\\n uint256 firstCollectionId,\\n uint256 lastCollectionId\\n ) internal onlyOwner {\\n if (rangeIndex >= _authorizedRanges[issuer].length)\\n revert RangeIndexOutOfBounds(issuer, _authorizedRanges[issuer].length, rangeIndex);\\n\\n uint256 expectedFirstId = _authorizedRanges[issuer][rangeIndex].min;\\n uint256 expectedLastId = _authorizedRanges[issuer][rangeIndex].max;\\n if (firstCollectionId != expectedFirstId || lastCollectionId != expectedLastId)\\n revert IdsMismatch(\\n issuer,\\n rangeIndex,\\n expectedFirstId,\\n expectedLastId,\\n firstCollectionId,\\n lastCollectionId\\n );\\n\\n _authorizedRanges[issuer][rangeIndex] = _authorizedRanges[issuer][\\n _authorizedRanges[issuer].length - 1\\n ];\\n _authorizedRanges[issuer].pop();\\n emit IssuerUnauthorized(issuer, firstCollectionId, lastCollectionId);\\n }\\n}\\n\",\"keccak256\":\"0xce7d42accffd665859f61c2f3499a8de85152449659a0298653c97eb6693f4a2\",\"license\":\"MIT\"},\"contracts/core/libs/attestations-registry/AttestationsRegistryState.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Range} from '../utils/RangeLib.sol';\\nimport {Attestation, AttestationData} from '../Structs.sol';\\n\\ncontract AttestationsRegistryState {\\n // main config\\n bool internal _initialized;\\n bool internal _initializing;\\n bool internal _paused;\\n address internal _owner;\\n // keeping some space for future\\n uint256[15] private _placeHolders;\\n\\n // storing the authorized ranges for each attesters\\n mapping(address => Range[]) internal _authorizedRanges;\\n // keeping some space for future\\n uint256[15] private _placeHolders2;\\n // storing the data of attestations\\n // =collectionId=> =owner=> attestationData\\n mapping(uint256 => mapping(address => AttestationData)) internal _attestationsData;\\n}\\n\",\"keccak256\":\"0x40fd47db58c335b9741394402988f986cc1c9020d0b9846b29dffa446e364980\",\"license\":\"MIT\"},\"contracts/core/libs/attestations-registry/InitializableLogic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\\n// Forked from, removed storage, OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.14;\\n\\nimport '../utils/Address.sol';\\nimport './AttestationsRegistryState.sol';\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() initializer {}\\n * ```\\n * ====\\n */\\nabstract contract InitializableLogic is AttestationsRegistryState {\\n // only diff with oz\\n // /**\\n // * @dev Indicates that the contract has been initialized.\\n // */\\n // bool private _initialized;\\n\\n // /**\\n // * @dev Indicates that the contract is in the process of being initialized.\\n // */\\n // bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\\n // contract may have been reentered.\\n require(\\n _initializing ? _isConstructor() : !_initialized,\\n 'Initializable: contract is already initialized'\\n );\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} modifier, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, 'Initializable: contract is not initializing');\\n _;\\n }\\n\\n function _isConstructor() private view returns (bool) {\\n return !Address.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x7798d1365297205f08f0a0e5fb8bf26005bdf82b040af45bab8d168018c43ac5\",\"license\":\"MIT\"},\"contracts/core/libs/attestations-registry/OwnableLogic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Forked from, removed storage, OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.14;\\n\\nimport '../utils/Context.sol';\\nimport './AttestationsRegistryState.sol';\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableLogic is Context, AttestationsRegistryState {\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // This is the only diff with OZ contract\\n // address private _owner;\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), 'Ownable: caller is not the owner');\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), 'Ownable: new owner is the zero address');\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x74ff8ebdd6ad706a45354f1045ef623840aa1dbde37874dde2b6bfa498e0bdb3\",\"license\":\"MIT\"},\"contracts/core/libs/attestations-registry/PausableLogic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Forked from, removed storage, OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\\n\\npragma solidity ^0.8.14;\\n\\nimport '../utils/Context.sol';\\nimport './AttestationsRegistryState.sol';\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableLogic is Context, AttestationsRegistryState {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n // this is the only diff with OZ contract\\n // bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), 'Pausable: paused');\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), 'Pausable: not paused');\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x234c48f5eb48bb15b6c2535428f1e28e172bc2c6fbf58c99ba7b3ca75e884c60\",\"license\":\"MIT\"},\"contracts/core/libs/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, 'Address: insufficient balance');\\n\\n (bool success, ) = recipient.call{value: amount}('');\\n require(success, 'Address: unable to send value, recipient may have reverted');\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, 'Address: low-level call failed');\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, 'Address: low-level call with value failed');\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, 'Address: insufficient balance for call');\\n require(isContract(target), 'Address: call to non-contract');\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data)\\n internal\\n view\\n returns (bytes memory)\\n {\\n return functionStaticCall(target, data, 'Address: low-level static call failed');\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), 'Address: static call to non-contract');\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, 'Address: low-level delegate call failed');\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), 'Address: delegate call to non-contract');\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5d46e52cb7914d16d80db123b88f0f54598a959a8ca94913a9d956bf14fd7730\",\"license\":\"MIT\"},\"contracts/core/libs/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.14;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2dba7215628ceb3bb6f28422c7ca48d79615dd7aa8ba54978d4d8cad996f57e\",\"license\":\"MIT\"},\"contracts/core/libs/utils/RangeLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nstruct Range {\\n uint256 min;\\n uint256 max;\\n}\\n\\n// Range [0;3] includees 0 and 3\\nlibrary RangeUtils {\\n function _includes(Range[] storage ranges, uint256 collectionId) internal view returns (bool) {\\n for (uint256 i = 0; i < ranges.length; i++) {\\n if (collectionId >= ranges[i].min && collectionId <= ranges[i].max) {\\n return true;\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x8f04a81575ba69887b302887d4ffbd8eb6f3d9d1a7be920e5478c95b30890ce1\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b506040516200288f3803806200288f8339810160408190526200003491620001e4565b6200003f3362000069565b6000805462ff0000191690556200005682620000c6565b6001600160a01b0316608052506200021c565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054610100900460ff16620000e35760005460ff1615620000ed565b620000ed6200019a565b620001555760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801562000178576000805461ffff19166101011790555b620001838262000069565b801562000196576000805461ff00191690555b5050565b6000620001b230620001b860201b6200133c1760201c565b15905090565b6001600160a01b03163b151590565b80516001600160a01b0381168114620001df57600080fd5b919050565b60008060408385031215620001f857600080fd5b6200020383620001c7565b91506200021360208401620001c7565b90509250929050565b6080516126576200023860003960006119b801526126576000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80638456cb59116100c3578063c4d66de81161007c578063c4d66de814610326578063c7da9aa614610339578063dc873d011461036e578063e7c994361461038e578063ebc5c093146103a1578063f2fde38b146103b457600080fd5b80638456cb591461028b57806384c2ad82146102935780638c3c9e32146102b35780638da5cb5b146102d4578063b886567314610300578063c06d5db61461031357600080fd5b80633be1ced7116101155780633be1ced7146102145780633f4ba83a146102375780635c975abb1461023f5780636d7fbb6714610250578063715018a6146102705780637cde0fe21461027857600080fd5b8063011023901461015257806314067f8b1461017a57806315027bda146101cc578063181dfdff146101ec5780632972b0f014610201575b600080fd5b610165610160366004611b9e565b6103c7565b60405190151581526020015b60405180910390f35b6101b7610188366004611b9e565b6000918252602080805260408084206001600160a01b0393909316845291905290206002015463ffffffff1690565b60405163ffffffff9091168152602001610171565b6101df6101da366004611ce8565b6103de565b6040516101719190611e3f565b6101ff6101fa366004611f20565b6104cf565b005b61016561020f366004611f93565b610598565b610227610222366004611b9e565b6105ab565b6040516101719493929190611fbd565b6101ff6106c1565b60005462010000900460ff16610165565b61026361025e366004611b9e565b6106fd565b6040516101719190611ffa565b6101ff6107b5565b6101ff61028636600461200d565b6107f1565b6101ff610833565b6102a66102a1366004611b9e565b61086d565b6040516101719190612040565b6102c66102c1366004611b9e565b61089a565b604051908152602001610171565b600054630100000090046001600160a01b03165b6040516001600160a01b039091168152602001610171565b6101ff61030e366004612053565b6108a6565b6101ff6103213660046120a0565b61093b565b6101ff6103343660046120d9565b610979565b6102e8610347366004611b9e565b6000918252602080805260408084206001600160a01b039384168552909152909120541690565b61038161037c366004611ce8565b610a3c565b60405161017191906120f4565b6101ff61039c36600461214c565b610afc565b6101ff6103af3660046122d3565b610e41565b6101ff6103c23660046120d9565b611299565b60006103d3838361134b565b151590505b92915050565b6060600083516001600160401b038111156103fb576103fb611bca565b60405190808252806020026020018201604052801561044c57816020015b60408051608081018252600080825260208083018290529282015260608082015282526000199092019101816104195790505b50905060005b84518110156104c75761049785828151811061047057610470612347565b602002602001015185838151811061048a5761048a612347565b6020026020010151611374565b8282815181106104a9576104a9612347565b602002602001018190525080806104bf90612373565b915050610452565b509392505050565b6000546001600160a01b03630100000090910416331461050a5760405162461bcd60e51b81526004016105019061238c565b60405180910390fd5b60005b815181101561059257610580848284848151811061052d5761052d612347565b602002602001015161053f91906123c1565b85848151811061055157610551612347565b60200260200101516000015186858151811061056f5761056f612347565b602002602001015160200151611483565b8061058a81612373565b91505061050d565b50505050565b60006105a48383611722565b9392505050565b6000828152602080805260408083206001600160a01b038086168552908352818420825160808101845281549092168252600181015493820193909352600283015463ffffffff1691810191909152600382018054849384936060938593919291838601919061061a906123d8565b80601f0160208091040260200160405190810160405280929190818152602001828054610646906123d8565b80156106935780601f1061066857610100808354040283529160200191610693565b820191906000526020600020905b81548152906001019060200180831161067657829003601f168201915b505050919092525050815160208301516040840151606090940151919b909a50929850965090945050505050565b6000546001600160a01b0363010000009091041633146106f35760405162461bcd60e51b81526004016105019061238c565b6106fb611744565b565b6000828152602080805260408083206001600160a01b0385168452909152902060030180546060919061072f906123d8565b80601f016020809104026020016040519081016040528092919081815260200182805461075b906123d8565b80156107a85780601f1061077d576101008083540402835291602001916107a8565b820191906000526020600020905b81548152906001019060200180831161078b57829003601f168201915b5050505050905092915050565b6000546001600160a01b0363010000009091041633146107e75760405162461bcd60e51b81526004016105019061238c565b6106fb60006117df565b6000546001600160a01b0363010000009091041633146108235760405162461bcd60e51b81526004016105019061238c565b61082e83838361183c565b505050565b6000546001600160a01b0363010000009091041633146108655760405162461bcd60e51b81526004016105019061238c565b6106fb6118ce565b60408051608081018252600080825260208201819052918101919091526060808201526105a48383611374565b60006105a4838361134b565b6000546001600160a01b0363010000009091041633146108d85760405162461bcd60e51b81526004016105019061238c565b60005b815181101561082e57610929838383815181106108fa576108fa612347565b60200260200101516000015184848151811061091857610918612347565b60200260200101516020015161183c565b8061093381612373565b9150506108db565b6000546001600160a01b03630100000090910416331461096d5760405162461bcd60e51b81526004016105019061238c565b61059284848484611483565b600054610100900460ff166109945760005460ff1615610998565b303b155b6109fb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610501565b600054610100900460ff16158015610a1d576000805461ffff19166101011790555b610a26826117df565b8015610a38576000805461ff00191690555b5050565b6060600083516001600160401b03811115610a5957610a59611bca565b604051908082528060200260200182016040528015610a82578160200160208202803683370190505b50905060005b84518110156104c757610acd858281518110610aa657610aa6612347565b6020026020010151858381518110610ac057610ac0612347565b602002602001015161134b565b828281518110610adf57610adf612347565b602090810291909101015280610af481612373565b915050610a88565b60005462010000900460ff1615610b255760405162461bcd60e51b815260040161050190612412565b3360005b825181101561082e57600060206000858481518110610b4a57610b4a612347565b60200260200101516000015181526020019081526020016000206000858481518110610b7857610b78612347565b6020026020010151602001516001600160a01b03166001600160a01b03168152602001908152602001600020600101549050610bd183858481518110610bc057610bc0612347565b602002602001015160000151611722565b610c1e5782848381518110610be857610be8612347565b60209081029190910101515160405163c522f21160e01b81526001600160a01b0390921660048301526024820152604401610501565b60206000858481518110610c3457610c34612347565b60200260200101516000015181526020019081526020016000206000858481518110610c6257610c62612347565b6020908102919091018101518101516001600160a01b03168252810191909152604001600090812080546001600160a01b03191681556001810182905560028101805463ffffffff1916905590610cbc6003830182611aaf565b5050610d05848381518110610cd357610cd3612347565b602002602001015160000151858481518110610cf157610cf1612347565b602002602001015160200151836000611930565b7f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b6040518060c00160405280868581518110610d4357610d43612347565b6020026020010151600001518152602001868581518110610d6657610d66612347565b6020026020010151602001516001600160a01b03168152602001868581518110610d9257610d92612347565b6020026020010151604001516001600160a01b03168152602001868581518110610dbe57610dbe612347565b6020026020010151606001518152602001868581518110610de157610de1612347565b60200260200101516080015163ffffffff168152602001868581518110610e0a57610e0a612347565b602002602001015160a00151815250604051610e26919061243c565b60405180910390a15080610e3981612373565b915050610b29565b60005462010000900460ff1615610e6a5760405162461bcd60e51b815260040161050190612412565b3360005b8281101561059257610ea482858584818110610e8c57610e8c612347565b9050602002810190610e9e919061249d565b35611722565b610ef85781848483818110610ebb57610ebb612347565b9050602002810190610ecd919061249d565b60405163c522f21160e01b81526001600160a01b039092166004830152356024820152604401610501565b600060206000868685818110610f1057610f10612347565b9050602002810190610f22919061249d565b6000013581526020019081526020016000206000868685818110610f4857610f48612347565b9050602002810190610f5a919061249d565b610f6b9060408101906020016120d9565b6001600160a01b03166001600160a01b031681526020019081526020016000206001015490506040518060800160405280868685818110610fae57610fae612347565b9050602002810190610fc0919061249d565b610fd19060608101906040016120d9565b6001600160a01b03168152602001868685818110610ff157610ff1612347565b9050602002810190611003919061249d565b60600135815260200186868581811061101e5761101e612347565b9050602002810190611030919061249d565b6110419060a08101906080016124bd565b63ffffffff16815260200186868581811061105e5761105e612347565b9050602002810190611070919061249d565b61107e9060a08101906124d8565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093909452506020925088905087868181106110cb576110cb612347565b90506020028101906110dd919061249d565b600001358152602001908152602001600020600087878681811061110357611103612347565b9050602002810190611115919061249d565b6111269060408101906020016120d9565b6001600160a01b0390811682526020808301939093526040918201600020845181546001600160a01b03191692169190911781558383015160018201559083015160028201805463ffffffff191663ffffffff90921691909117905560608301518051919261119d92600385019290910190611ae9565b5090505061122c8585848181106111b6576111b6612347565b90506020028101906111c8919061249d565b358686858181106111db576111db612347565b90506020028101906111ed919061249d565b6111fe9060408101906020016120d9565b8388888781811061121157611211612347565b9050602002810190611223919061249d565b60600135611930565b7f8c20c3acb6b5208b7affea2fd90dabc8d47e77cee9766c855ce42730505cb20585858481811061125f5761125f612347565b9050602002810190611271919061249d565b60405161127e919061254e565b60405180910390a1508061129181612373565b915050610e6e565b6000546001600160a01b0363010000009091041633146112cb5760405162461bcd60e51b81526004016105019061238c565b6001600160a01b0381166113305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610501565b611339816117df565b50565b6001600160a01b03163b151590565b6000918252602080805260408084206001600160a01b0393909316845291905290206001015490565b60408051608081018252600080825260208201819052918101919091526060808201526000838152602080805260408083206001600160a01b03808716855290835292819020815160808101835281549094168452600181015492840192909252600282015463ffffffff16908301526003810180546060840191906113f9906123d8565b80601f0160208091040260200160405190810160405280929190818152602001828054611425906123d8565b80156114725780601f1061144757610100808354040283529160200191611472565b820191906000526020600020905b81548152906001019060200180831161145557829003601f168201915b505050505081525050905092915050565b6000546001600160a01b0363010000009091041633146114b55760405162461bcd60e51b81526004016105019061238c565b6001600160a01b0384166000908152601060205260409020548310611517576001600160a01b038416600081815260106020526040908190205490516345e388eb60e01b81526004810192909252602482015260448101849052606401610501565b6001600160a01b038416600090815260106020526040812080548590811061154157611541612347565b600091825260208083206002909202909101546001600160a01b03881683526010909152604082208054919350908690811061157f5761157f612347565b906000526020600020906002020160010154905081841415806115a25750808314155b156115ee57604051637a4dd76560e01b81526001600160a01b03871660048201526024810186905260448101839052606481018290526084810185905260a4810184905260c401610501565b6001600160a01b03861660009081526010602052604090208054611614906001906123c1565b8154811061162457611624612347565b906000526020600020906002020160106000886001600160a01b03166001600160a01b03168152602001908152602001600020868154811061166857611668612347565b60009182526020808320845460029093020191825560019384015493909101929092556001600160a01b03881681526010909152604090208054806116af576116af61260b565b6000828152602080822060026000199490940193840201828155600101919091559155604080516001600160a01b038916815291820186905281018490527f33cff58e54c3a8acae85cad63487b5dcf617521e33bb03f071299f374c29de1f9060600160405180910390a1505050505050565b6001600160a01b03821660009081526010602052604081206105a49083611a21565b60005462010000900460ff166117935760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610501565b6000805462ff0000191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60408051808201825283815260208082018481526001600160a01b03871660008181526010845285812080546001808201835591835291859020865160029093020191825592519201919091558351908152908101859052918201839052907fe7d6ac0b740347f7f96a97e6a9dc0f20f4f11eca65495315adc009a55b6762f89060600160405180910390a150505050565b60005462010000900460ff16156118f75760405162461bcd60e51b815260040161050190612412565b6000805462ff00001916620100001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586117c23390565b818111306000826119415785611944565b60005b9050600083611954576000611956565b865b905060008461196e5761196986886123c1565b611978565b61197887876123c1565b604051633885984b60e11b81526001600160a01b03868116600483015285811660248301528481166044830152606482018c9052608482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063710b30969060a401600060405180830381600087803b1580156119fe57600080fd5b505af1158015611a12573d6000803e3d6000fd5b50505050505050505050505050565b6000805b8354811015611aa557838181548110611a4057611a40612347565b9060005260206000209060020201600001548310158015611a845750838181548110611a6e57611a6e612347565b9060005260206000209060020201600101548311155b15611a935760019150506103d8565b80611a9d81612373565b915050611a25565b5060009392505050565b508054611abb906123d8565b6000825580601f10611acb575050565b601f0160209004906000526020600020908101906113399190611b6d565b828054611af5906123d8565b90600052602060002090601f016020900481019282611b175760008555611b5d565b82601f10611b3057805160ff1916838001178555611b5d565b82800160010185558215611b5d579182015b82811115611b5d578251825591602001919060010190611b42565b50611b69929150611b6d565b5090565b5b80821115611b695760008155600101611b6e565b80356001600160a01b0381168114611b9957600080fd5b919050565b60008060408385031215611bb157600080fd5b82359150611bc160208401611b82565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715611c0257611c02611bca565b60405290565b60405160c081016001600160401b0381118282101715611c0257611c02611bca565b604051601f8201601f191681016001600160401b0381118282101715611c5257611c52611bca565b604052919050565b60006001600160401b03821115611c7357611c73611bca565b5060051b60200190565b600082601f830112611c8e57600080fd5b81356020611ca3611c9e83611c5a565b611c2a565b82815260059290921b84018101918181019086841115611cc257600080fd5b8286015b84811015611cdd5780358352918301918301611cc6565b509695505050505050565b60008060408385031215611cfb57600080fd5b82356001600160401b0380821115611d1257600080fd5b611d1e86838701611c7d565b9350602091508185013581811115611d3557600080fd5b85019050601f81018613611d4857600080fd5b8035611d56611c9e82611c5a565b81815260059190911b82018301908381019088831115611d7557600080fd5b928401925b82841015611d9a57611d8b84611b82565b82529284019290840190611d7a565b80955050505050509250929050565b6000815180845260005b81811015611dcf57602081850181015186830182015201611db3565b81811115611de1576000602083870101525b50601f01601f19169290920160200192915050565b60018060a01b0381511682526020810151602083015263ffffffff60408201511660408301526000606082015160806060850152611e376080850182611da9565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611e9457603f19888603018452611e82858351611df6565b94509285019290850190600101611e66565b5092979650505050505050565b600082601f830112611eb257600080fd5b81356020611ec2611c9e83611c5a565b82815260069290921b84018101918181019086841115611ee157600080fd5b8286015b84811015611cdd5760408189031215611efe5760008081fd5b611f06611be0565b813581528482013585820152835291830191604001611ee5565b600080600060608486031215611f3557600080fd5b611f3e84611b82565b925060208401356001600160401b0380821115611f5a57600080fd5b611f6687838801611ea1565b93506040860135915080821115611f7c57600080fd5b50611f8986828701611c7d565b9150509250925092565b60008060408385031215611fa657600080fd5b611faf83611b82565b946020939093013593505050565b60018060a01b038516815283602082015263ffffffff83166040820152608060608201526000611ff06080830184611da9565b9695505050505050565b6020815260006105a46020830184611da9565b60008060006060848603121561202257600080fd5b61202b84611b82565b95602085013595506040909401359392505050565b6020815260006105a46020830184611df6565b6000806040838503121561206657600080fd5b61206f83611b82565b915060208301356001600160401b0381111561208a57600080fd5b61209685828601611ea1565b9150509250929050565b600080600080608085870312156120b657600080fd5b6120bf85611b82565b966020860135965060408601359560600135945092505050565b6000602082840312156120eb57600080fd5b6105a482611b82565b6020808252825182820181905260009190848201906040850190845b8181101561212c57835183529284019291840191600101612110565b50909695505050505050565b803563ffffffff81168114611b9957600080fd5b6000602080838503121561215f57600080fd5b82356001600160401b038082111561217657600080fd5b818501915085601f83011261218a57600080fd5b8135612198611c9e82611c5a565b81815260059190911b830184019084810190888311156121b757600080fd5b8585015b838110156122c6578035858111156121d35760008081fd5b860160c0601f19828d0381018213156121ec5760008081fd5b6121f4611c08565b8a84013581526040612207818601611b82565b8c8301526060612218818701611b82565b828401526080808701358285015260a09150612235828801612138565b9084015293850135938a85111561224c5760008081fd5b84860195508f603f87011261226357600094508485fd5b8c86013594508a85111561227957612279611bca565b6122898d85601f88011601611c2a565b93508484528f828688010111156122a05760008081fd5b848287018e86013760009484018d019490945250918201528452509186019186016121bb565b5098975050505050505050565b600080602083850312156122e657600080fd5b82356001600160401b03808211156122fd57600080fd5b818501915085601f83011261231157600080fd5b81358181111561232057600080fd5b8660208260051b850101111561233557600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016123855761238561235d565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000828210156123d3576123d361235d565b500390565b600181811c908216806123ec57607f821691505b60208210810361240c57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208152815160208201526000602083015160018060a01b03808216604085015280604086015116606085015250506060830151608083015263ffffffff60808401511660a083015260a083015160c080840152611e3760e0840182611da9565b6000823560be198336030181126124b357600080fd5b9190910192915050565b6000602082840312156124cf57600080fd5b6105a482612138565b6000808335601e198436030181126124ef57600080fd5b8301803591506001600160401b0382111561250957600080fd5b60200191503681900382131561251e57600080fd5b9250929050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815281356020820152600061256760208401611b82565b60018060a01b0380821660408501528061258360408701611b82565b16606085015250506060830135608083015263ffffffff6125a660808501612138565b1660a083015260a0830135601e198436030181126125c357600080fd5b83016020810190356001600160401b038111156125df57600080fd5b8036038213156125ee57600080fd5b60c08085015261260260e085018284612525565b95945050505050565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220c903c76a32e6925df15285171ac55d0624e9da3ca4368c9b9fa0c5e0482dd28864736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061014d5760003560e01c80638456cb59116100c3578063c4d66de81161007c578063c4d66de814610326578063c7da9aa614610339578063dc873d011461036e578063e7c994361461038e578063ebc5c093146103a1578063f2fde38b146103b457600080fd5b80638456cb591461028b57806384c2ad82146102935780638c3c9e32146102b35780638da5cb5b146102d4578063b886567314610300578063c06d5db61461031357600080fd5b80633be1ced7116101155780633be1ced7146102145780633f4ba83a146102375780635c975abb1461023f5780636d7fbb6714610250578063715018a6146102705780637cde0fe21461027857600080fd5b8063011023901461015257806314067f8b1461017a57806315027bda146101cc578063181dfdff146101ec5780632972b0f014610201575b600080fd5b610165610160366004611b9e565b6103c7565b60405190151581526020015b60405180910390f35b6101b7610188366004611b9e565b6000918252602080805260408084206001600160a01b0393909316845291905290206002015463ffffffff1690565b60405163ffffffff9091168152602001610171565b6101df6101da366004611ce8565b6103de565b6040516101719190611e3f565b6101ff6101fa366004611f20565b6104cf565b005b61016561020f366004611f93565b610598565b610227610222366004611b9e565b6105ab565b6040516101719493929190611fbd565b6101ff6106c1565b60005462010000900460ff16610165565b61026361025e366004611b9e565b6106fd565b6040516101719190611ffa565b6101ff6107b5565b6101ff61028636600461200d565b6107f1565b6101ff610833565b6102a66102a1366004611b9e565b61086d565b6040516101719190612040565b6102c66102c1366004611b9e565b61089a565b604051908152602001610171565b600054630100000090046001600160a01b03165b6040516001600160a01b039091168152602001610171565b6101ff61030e366004612053565b6108a6565b6101ff6103213660046120a0565b61093b565b6101ff6103343660046120d9565b610979565b6102e8610347366004611b9e565b6000918252602080805260408084206001600160a01b039384168552909152909120541690565b61038161037c366004611ce8565b610a3c565b60405161017191906120f4565b6101ff61039c36600461214c565b610afc565b6101ff6103af3660046122d3565b610e41565b6101ff6103c23660046120d9565b611299565b60006103d3838361134b565b151590505b92915050565b6060600083516001600160401b038111156103fb576103fb611bca565b60405190808252806020026020018201604052801561044c57816020015b60408051608081018252600080825260208083018290529282015260608082015282526000199092019101816104195790505b50905060005b84518110156104c75761049785828151811061047057610470612347565b602002602001015185838151811061048a5761048a612347565b6020026020010151611374565b8282815181106104a9576104a9612347565b602002602001018190525080806104bf90612373565b915050610452565b509392505050565b6000546001600160a01b03630100000090910416331461050a5760405162461bcd60e51b81526004016105019061238c565b60405180910390fd5b60005b815181101561059257610580848284848151811061052d5761052d612347565b602002602001015161053f91906123c1565b85848151811061055157610551612347565b60200260200101516000015186858151811061056f5761056f612347565b602002602001015160200151611483565b8061058a81612373565b91505061050d565b50505050565b60006105a48383611722565b9392505050565b6000828152602080805260408083206001600160a01b038086168552908352818420825160808101845281549092168252600181015493820193909352600283015463ffffffff1691810191909152600382018054849384936060938593919291838601919061061a906123d8565b80601f0160208091040260200160405190810160405280929190818152602001828054610646906123d8565b80156106935780601f1061066857610100808354040283529160200191610693565b820191906000526020600020905b81548152906001019060200180831161067657829003601f168201915b505050919092525050815160208301516040840151606090940151919b909a50929850965090945050505050565b6000546001600160a01b0363010000009091041633146106f35760405162461bcd60e51b81526004016105019061238c565b6106fb611744565b565b6000828152602080805260408083206001600160a01b0385168452909152902060030180546060919061072f906123d8565b80601f016020809104026020016040519081016040528092919081815260200182805461075b906123d8565b80156107a85780601f1061077d576101008083540402835291602001916107a8565b820191906000526020600020905b81548152906001019060200180831161078b57829003601f168201915b5050505050905092915050565b6000546001600160a01b0363010000009091041633146107e75760405162461bcd60e51b81526004016105019061238c565b6106fb60006117df565b6000546001600160a01b0363010000009091041633146108235760405162461bcd60e51b81526004016105019061238c565b61082e83838361183c565b505050565b6000546001600160a01b0363010000009091041633146108655760405162461bcd60e51b81526004016105019061238c565b6106fb6118ce565b60408051608081018252600080825260208201819052918101919091526060808201526105a48383611374565b60006105a4838361134b565b6000546001600160a01b0363010000009091041633146108d85760405162461bcd60e51b81526004016105019061238c565b60005b815181101561082e57610929838383815181106108fa576108fa612347565b60200260200101516000015184848151811061091857610918612347565b60200260200101516020015161183c565b8061093381612373565b9150506108db565b6000546001600160a01b03630100000090910416331461096d5760405162461bcd60e51b81526004016105019061238c565b61059284848484611483565b600054610100900460ff166109945760005460ff1615610998565b303b155b6109fb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610501565b600054610100900460ff16158015610a1d576000805461ffff19166101011790555b610a26826117df565b8015610a38576000805461ff00191690555b5050565b6060600083516001600160401b03811115610a5957610a59611bca565b604051908082528060200260200182016040528015610a82578160200160208202803683370190505b50905060005b84518110156104c757610acd858281518110610aa657610aa6612347565b6020026020010151858381518110610ac057610ac0612347565b602002602001015161134b565b828281518110610adf57610adf612347565b602090810291909101015280610af481612373565b915050610a88565b60005462010000900460ff1615610b255760405162461bcd60e51b815260040161050190612412565b3360005b825181101561082e57600060206000858481518110610b4a57610b4a612347565b60200260200101516000015181526020019081526020016000206000858481518110610b7857610b78612347565b6020026020010151602001516001600160a01b03166001600160a01b03168152602001908152602001600020600101549050610bd183858481518110610bc057610bc0612347565b602002602001015160000151611722565b610c1e5782848381518110610be857610be8612347565b60209081029190910101515160405163c522f21160e01b81526001600160a01b0390921660048301526024820152604401610501565b60206000858481518110610c3457610c34612347565b60200260200101516000015181526020019081526020016000206000858481518110610c6257610c62612347565b6020908102919091018101518101516001600160a01b03168252810191909152604001600090812080546001600160a01b03191681556001810182905560028101805463ffffffff1916905590610cbc6003830182611aaf565b5050610d05848381518110610cd357610cd3612347565b602002602001015160000151858481518110610cf157610cf1612347565b602002602001015160200151836000611930565b7f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b6040518060c00160405280868581518110610d4357610d43612347565b6020026020010151600001518152602001868581518110610d6657610d66612347565b6020026020010151602001516001600160a01b03168152602001868581518110610d9257610d92612347565b6020026020010151604001516001600160a01b03168152602001868581518110610dbe57610dbe612347565b6020026020010151606001518152602001868581518110610de157610de1612347565b60200260200101516080015163ffffffff168152602001868581518110610e0a57610e0a612347565b602002602001015160a00151815250604051610e26919061243c565b60405180910390a15080610e3981612373565b915050610b29565b60005462010000900460ff1615610e6a5760405162461bcd60e51b815260040161050190612412565b3360005b8281101561059257610ea482858584818110610e8c57610e8c612347565b9050602002810190610e9e919061249d565b35611722565b610ef85781848483818110610ebb57610ebb612347565b9050602002810190610ecd919061249d565b60405163c522f21160e01b81526001600160a01b039092166004830152356024820152604401610501565b600060206000868685818110610f1057610f10612347565b9050602002810190610f22919061249d565b6000013581526020019081526020016000206000868685818110610f4857610f48612347565b9050602002810190610f5a919061249d565b610f6b9060408101906020016120d9565b6001600160a01b03166001600160a01b031681526020019081526020016000206001015490506040518060800160405280868685818110610fae57610fae612347565b9050602002810190610fc0919061249d565b610fd19060608101906040016120d9565b6001600160a01b03168152602001868685818110610ff157610ff1612347565b9050602002810190611003919061249d565b60600135815260200186868581811061101e5761101e612347565b9050602002810190611030919061249d565b6110419060a08101906080016124bd565b63ffffffff16815260200186868581811061105e5761105e612347565b9050602002810190611070919061249d565b61107e9060a08101906124d8565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093909452506020925088905087868181106110cb576110cb612347565b90506020028101906110dd919061249d565b600001358152602001908152602001600020600087878681811061110357611103612347565b9050602002810190611115919061249d565b6111269060408101906020016120d9565b6001600160a01b0390811682526020808301939093526040918201600020845181546001600160a01b03191692169190911781558383015160018201559083015160028201805463ffffffff191663ffffffff90921691909117905560608301518051919261119d92600385019290910190611ae9565b5090505061122c8585848181106111b6576111b6612347565b90506020028101906111c8919061249d565b358686858181106111db576111db612347565b90506020028101906111ed919061249d565b6111fe9060408101906020016120d9565b8388888781811061121157611211612347565b9050602002810190611223919061249d565b60600135611930565b7f8c20c3acb6b5208b7affea2fd90dabc8d47e77cee9766c855ce42730505cb20585858481811061125f5761125f612347565b9050602002810190611271919061249d565b60405161127e919061254e565b60405180910390a1508061129181612373565b915050610e6e565b6000546001600160a01b0363010000009091041633146112cb5760405162461bcd60e51b81526004016105019061238c565b6001600160a01b0381166113305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610501565b611339816117df565b50565b6001600160a01b03163b151590565b6000918252602080805260408084206001600160a01b0393909316845291905290206001015490565b60408051608081018252600080825260208201819052918101919091526060808201526000838152602080805260408083206001600160a01b03808716855290835292819020815160808101835281549094168452600181015492840192909252600282015463ffffffff16908301526003810180546060840191906113f9906123d8565b80601f0160208091040260200160405190810160405280929190818152602001828054611425906123d8565b80156114725780601f1061144757610100808354040283529160200191611472565b820191906000526020600020905b81548152906001019060200180831161145557829003601f168201915b505050505081525050905092915050565b6000546001600160a01b0363010000009091041633146114b55760405162461bcd60e51b81526004016105019061238c565b6001600160a01b0384166000908152601060205260409020548310611517576001600160a01b038416600081815260106020526040908190205490516345e388eb60e01b81526004810192909252602482015260448101849052606401610501565b6001600160a01b038416600090815260106020526040812080548590811061154157611541612347565b600091825260208083206002909202909101546001600160a01b03881683526010909152604082208054919350908690811061157f5761157f612347565b906000526020600020906002020160010154905081841415806115a25750808314155b156115ee57604051637a4dd76560e01b81526001600160a01b03871660048201526024810186905260448101839052606481018290526084810185905260a4810184905260c401610501565b6001600160a01b03861660009081526010602052604090208054611614906001906123c1565b8154811061162457611624612347565b906000526020600020906002020160106000886001600160a01b03166001600160a01b03168152602001908152602001600020868154811061166857611668612347565b60009182526020808320845460029093020191825560019384015493909101929092556001600160a01b03881681526010909152604090208054806116af576116af61260b565b6000828152602080822060026000199490940193840201828155600101919091559155604080516001600160a01b038916815291820186905281018490527f33cff58e54c3a8acae85cad63487b5dcf617521e33bb03f071299f374c29de1f9060600160405180910390a1505050505050565b6001600160a01b03821660009081526010602052604081206105a49083611a21565b60005462010000900460ff166117935760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610501565b6000805462ff0000191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60408051808201825283815260208082018481526001600160a01b03871660008181526010845285812080546001808201835591835291859020865160029093020191825592519201919091558351908152908101859052918201839052907fe7d6ac0b740347f7f96a97e6a9dc0f20f4f11eca65495315adc009a55b6762f89060600160405180910390a150505050565b60005462010000900460ff16156118f75760405162461bcd60e51b815260040161050190612412565b6000805462ff00001916620100001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586117c23390565b818111306000826119415785611944565b60005b9050600083611954576000611956565b865b905060008461196e5761196986886123c1565b611978565b61197887876123c1565b604051633885984b60e11b81526001600160a01b03868116600483015285811660248301528481166044830152606482018c9052608482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063710b30969060a401600060405180830381600087803b1580156119fe57600080fd5b505af1158015611a12573d6000803e3d6000fd5b50505050505050505050505050565b6000805b8354811015611aa557838181548110611a4057611a40612347565b9060005260206000209060020201600001548310158015611a845750838181548110611a6e57611a6e612347565b9060005260206000209060020201600101548311155b15611a935760019150506103d8565b80611a9d81612373565b915050611a25565b5060009392505050565b508054611abb906123d8565b6000825580601f10611acb575050565b601f0160209004906000526020600020908101906113399190611b6d565b828054611af5906123d8565b90600052602060002090601f016020900481019282611b175760008555611b5d565b82601f10611b3057805160ff1916838001178555611b5d565b82800160010185558215611b5d579182015b82811115611b5d578251825591602001919060010190611b42565b50611b69929150611b6d565b5090565b5b80821115611b695760008155600101611b6e565b80356001600160a01b0381168114611b9957600080fd5b919050565b60008060408385031215611bb157600080fd5b82359150611bc160208401611b82565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715611c0257611c02611bca565b60405290565b60405160c081016001600160401b0381118282101715611c0257611c02611bca565b604051601f8201601f191681016001600160401b0381118282101715611c5257611c52611bca565b604052919050565b60006001600160401b03821115611c7357611c73611bca565b5060051b60200190565b600082601f830112611c8e57600080fd5b81356020611ca3611c9e83611c5a565b611c2a565b82815260059290921b84018101918181019086841115611cc257600080fd5b8286015b84811015611cdd5780358352918301918301611cc6565b509695505050505050565b60008060408385031215611cfb57600080fd5b82356001600160401b0380821115611d1257600080fd5b611d1e86838701611c7d565b9350602091508185013581811115611d3557600080fd5b85019050601f81018613611d4857600080fd5b8035611d56611c9e82611c5a565b81815260059190911b82018301908381019088831115611d7557600080fd5b928401925b82841015611d9a57611d8b84611b82565b82529284019290840190611d7a565b80955050505050509250929050565b6000815180845260005b81811015611dcf57602081850181015186830182015201611db3565b81811115611de1576000602083870101525b50601f01601f19169290920160200192915050565b60018060a01b0381511682526020810151602083015263ffffffff60408201511660408301526000606082015160806060850152611e376080850182611da9565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611e9457603f19888603018452611e82858351611df6565b94509285019290850190600101611e66565b5092979650505050505050565b600082601f830112611eb257600080fd5b81356020611ec2611c9e83611c5a565b82815260069290921b84018101918181019086841115611ee157600080fd5b8286015b84811015611cdd5760408189031215611efe5760008081fd5b611f06611be0565b813581528482013585820152835291830191604001611ee5565b600080600060608486031215611f3557600080fd5b611f3e84611b82565b925060208401356001600160401b0380821115611f5a57600080fd5b611f6687838801611ea1565b93506040860135915080821115611f7c57600080fd5b50611f8986828701611c7d565b9150509250925092565b60008060408385031215611fa657600080fd5b611faf83611b82565b946020939093013593505050565b60018060a01b038516815283602082015263ffffffff83166040820152608060608201526000611ff06080830184611da9565b9695505050505050565b6020815260006105a46020830184611da9565b60008060006060848603121561202257600080fd5b61202b84611b82565b95602085013595506040909401359392505050565b6020815260006105a46020830184611df6565b6000806040838503121561206657600080fd5b61206f83611b82565b915060208301356001600160401b0381111561208a57600080fd5b61209685828601611ea1565b9150509250929050565b600080600080608085870312156120b657600080fd5b6120bf85611b82565b966020860135965060408601359560600135945092505050565b6000602082840312156120eb57600080fd5b6105a482611b82565b6020808252825182820181905260009190848201906040850190845b8181101561212c57835183529284019291840191600101612110565b50909695505050505050565b803563ffffffff81168114611b9957600080fd5b6000602080838503121561215f57600080fd5b82356001600160401b038082111561217657600080fd5b818501915085601f83011261218a57600080fd5b8135612198611c9e82611c5a565b81815260059190911b830184019084810190888311156121b757600080fd5b8585015b838110156122c6578035858111156121d35760008081fd5b860160c0601f19828d0381018213156121ec5760008081fd5b6121f4611c08565b8a84013581526040612207818601611b82565b8c8301526060612218818701611b82565b828401526080808701358285015260a09150612235828801612138565b9084015293850135938a85111561224c5760008081fd5b84860195508f603f87011261226357600094508485fd5b8c86013594508a85111561227957612279611bca565b6122898d85601f88011601611c2a565b93508484528f828688010111156122a05760008081fd5b848287018e86013760009484018d019490945250918201528452509186019186016121bb565b5098975050505050505050565b600080602083850312156122e657600080fd5b82356001600160401b03808211156122fd57600080fd5b818501915085601f83011261231157600080fd5b81358181111561232057600080fd5b8660208260051b850101111561233557600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016123855761238561235d565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000828210156123d3576123d361235d565b500390565b600181811c908216806123ec57607f821691505b60208210810361240c57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208152815160208201526000602083015160018060a01b03808216604085015280604086015116606085015250506060830151608083015263ffffffff60808401511660a083015260a083015160c080840152611e3760e0840182611da9565b6000823560be198336030181126124b357600080fd5b9190910192915050565b6000602082840312156124cf57600080fd5b6105a482612138565b6000808335601e198436030181126124ef57600080fd5b8301803591506001600160401b0382111561250957600080fd5b60200191503681900382131561251e57600080fd5b9250929050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815281356020820152600061256760208401611b82565b60018060a01b0380821660408501528061258360408701611b82565b16606085015250506060830135608083015263ffffffff6125a660808501612138565b1660a083015260a0830135601e198436030181126125c357600080fd5b83016020810190356001600160401b038111156125df57600080fd5b8036038213156125ee57600080fd5b60c08085015261260260e085018284612525565b95945050505050565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220c903c76a32e6925df15285171ac55d0624e9da3ca4368c9b9fa0c5e0482dd28864736f6c634300080e0033", + "devdoc": { + "author": "Sismo", + "kind": "dev", + "methods": { + "authorizeRange(address,uint256,uint256)": { + "details": "Authorize an issuer for a specific range", + "params": { + "firstCollectionId": "First collection Id of the range for which the issuer will be authorized", + "issuer": "Issuer that will be authorized", + "lastCollectionId": "Last collection Id of the range for which the issuer will be authorized" + } + }, + "authorizeRanges(address,(uint256,uint256)[])": { + "details": "Authorize an issuer for specific ranges", + "params": { + "issuer": "Issuer that will be authorized", + "ranges": "Ranges for which the issuer will be authorized" + } + }, + "constructor": { + "details": "Constructor.", + "params": { + "badgesAddress": "Stateless ERC1155 Badges contract", + "owner": "Owner of the contract, has the right to authorize/unauthorize attestations issuers" + } + }, + "deleteAttestations((uint256,address,address,uint256,uint32,bytes)[])": { + "details": "Delete function to be called by authorized issuers", + "params": { + "attestations": "Attestations to be deleted" + } + }, + "getAttestationData(uint256,address)": { + "details": "Getter of the data of a specific attestation", + "params": { + "collectionId": "Collection identifier of the targeted attestation", + "owner": "Owner of the targeted attestation" + } + }, + "getAttestationDataBatch(uint256[],address[])": { + "details": "Getter of the data of specific attestations", + "params": { + "collectionIds": "Collection identifiers of the targeted attestations", + "owners": "Owners of the targeted attestations" + } + }, + "getAttestationDataTuple(uint256,address)": { + "details": "Getter of the data of a specific attestation as tuple", + "params": { + "collectionId": "Collection identifier of the targeted attestation", + "owner": "Owner of the targeted attestation" + } + }, + "getAttestationExtraData(uint256,address)": { + "details": "Getter of the extraData of a specific attestation", + "params": { + "collectionId": "Collection identifier of the targeted attestation", + "owner": "Owner of the targeted attestation" + } + }, + "getAttestationIssuer(uint256,address)": { + "details": "Getter of the issuer of a specific attestation", + "params": { + "collectionId": "Collection identifier of the targeted attestation", + "owner": "Owner of the targeted attestation" + } + }, + "getAttestationTimestamp(uint256,address)": { + "details": "Getter of the timestamp of a specific attestation", + "params": { + "collectionId": "Collection identifier of the targeted attestation", + "owner": "Owner of the targeted attestation" + } + }, + "getAttestationValue(uint256,address)": { + "details": "Getter of the value of a specific attestation", + "params": { + "collectionId": "Collection identifier of the targeted attestation", + "owner": "Owner of the targeted attestation" + } + }, + "getAttestationValueBatch(uint256[],address[])": { + "details": "Getter of the values of specific attestations", + "params": { + "collectionIds": "Collection identifiers of the targeted attestations", + "owners": "Owners of the targeted attestations" + } + }, + "hasAttestation(uint256,address)": { + "details": "Returns whether a user has an attestation from a collection", + "params": { + "collectionId": "Collection identifier of the targeted attestation", + "owner": "Owner of the targeted attestation" + } + }, + "initialize(address)": { + "details": "Initialize function, to be called by the proxy delegating calls to this implementation", + "params": { + "owner": "Owner of the contract, has the right to authorize/unauthorize attestations issuers" + } + }, + "isAuthorized(address,uint256)": { + "details": "Returns whether a specific issuer is authorized or not to record in a specific attestations collection", + "params": { + "collectionId": "Collection Id for which the issuer will be checked", + "issuer": "Issuer to be checked" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "pause()": { + "details": "Pauses the registry. Issuers can no longer record or delete attestations" + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "recordAttestations((uint256,address,address,uint256,uint32,bytes)[])": { + "details": "Main function to be called by authorized issuers", + "params": { + "attestations": "Attestations to be recorded (creates a new one or overrides an existing one)" + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "unauthorizeRange(address,uint256,uint256,uint256)": { + "details": "Unauthorize an issuer for a specific range", + "params": { + "firstCollectionId": "First collection Id of the range for which the issuer will be unauthorized", + "issuer": "Issuer that will be unauthorized", + "lastCollectionId": "Last collection Id of the range for which the issuer will be unauthorized", + "rangeIndex": "Index of the range to be unauthorized" + } + }, + "unauthorizeRanges(address,(uint256,uint256)[],uint256[])": { + "details": "Unauthorize an issuer for specific ranges", + "params": { + "issuer": "Issuer that will be unauthorized", + "ranges": "Ranges for which the issuer will be unauthorized" + } + }, + "unpause()": { + "details": "Unpauses the registry" + } + }, + "title": "Attestations Registry", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Main contract of Sismo, stores all recorded attestations in attestations collections Only authorized attestations issuers can record attestation in the registry Attesters that expect to record in the Attestations Registry must be authorized issuers For more information: https://attestations-registry.docs.sismo.io For each attestation recorded, a badge is received by the user The badge is the Non transferrable NFT representation of an attestation Its ERC1155 contract is stateless, balances are read directly from the registry. Badge balances <=> Attestations values After the creation or update of an attestation, the registry triggers a TransferSingle event from the ERC1155 Badges contracts It enables off-chain apps such as opensea to catch the \"shadow mint\" of the badge*", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 11858, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 11860, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 11862, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_paused", + "offset": 2, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 11864, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_owner", + "offset": 3, + "slot": "0", + "type": "t_address" + }, + { + "astId": 11868, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_placeHolders", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)15_storage" + }, + { + "astId": 11874, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_authorizedRanges", + "offset": 0, + "slot": "16", + "type": "t_mapping(t_address,t_array(t_struct(Range)12480_storage)dyn_storage)" + }, + { + "astId": 11878, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_placeHolders2", + "offset": 0, + "slot": "17", + "type": "t_array(t_uint256)15_storage" + }, + { + "astId": 11885, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_attestationsData", + "offset": 0, + "slot": "32", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(AttestationData)11512_storage))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Range)12480_storage)dyn_storage": { + "base": "t_struct(Range)12480_storage", + "encoding": "dynamic_array", + "label": "struct Range[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)15_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[15]", + "numberOfBytes": "480" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_array(t_struct(Range)12480_storage)dyn_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct Range[])", + "numberOfBytes": "32", + "value": "t_array(t_struct(Range)12480_storage)dyn_storage" + }, + "t_mapping(t_address,t_struct(AttestationData)11512_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct AttestationData)", + "numberOfBytes": "32", + "value": "t_struct(AttestationData)11512_storage" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_struct(AttestationData)11512_storage))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(address => struct AttestationData))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_struct(AttestationData)11512_storage)" + }, + "t_struct(AttestationData)11512_storage": { + "encoding": "inplace", + "label": "struct AttestationData", + "members": [ + { + "astId": 11505, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "issuer", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 11507, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "value", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 11509, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "timestamp", + "offset": 0, + "slot": "2", + "type": "t_uint32" + }, + { + "astId": 11511, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "extraData", + "offset": 0, + "slot": "3", + "type": "t_bytes_storage" + } + ], + "numberOfBytes": "128" + }, + "t_struct(Range)12480_storage": { + "encoding": "inplace", + "label": "struct Range", + "members": [ + { + "astId": 12477, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "min", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 12479, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "max", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/AttestationsRegistryImplem.json b/deployments/mumbai/AttestationsRegistryImplem.json new file mode 100644 index 0000000..c62e34b --- /dev/null +++ b/deployments/mumbai/AttestationsRegistryImplem.json @@ -0,0 +1,1285 @@ +{ + "address": "0xF2cFB43D86aE0D4932888fe51ed6B430222e32e8", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "badgesAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + } + ], + "name": "AttesterNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "rangeIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedFirstId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedLastId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "FirstId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastCollectionId", + "type": "uint256" + } + ], + "name": "IdsMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + } + ], + "name": "IssuerNotAuthorized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "expectedArrayLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rangeIndex", + "type": "uint256" + } + ], + "name": "RangeIndexOutOfBounds", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct Attestation", + "name": "attestation", + "type": "tuple" + } + ], + "name": "AttestationDeleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct Attestation", + "name": "attestation", + "type": "tuple" + } + ], + "name": "AttestationRecorded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "firstCollectionId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lastCollectionId", + "type": "uint256" + } + ], + "name": "IssuerAuthorized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "firstCollectionId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lastCollectionId", + "type": "uint256" + } + ], + "name": "IssuerUnauthorized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "firstCollectionId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastCollectionId", + "type": "uint256" + } + ], + "name": "authorizeRange", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "internalType": "struct Range[]", + "name": "ranges", + "type": "tuple[]" + } + ], + "name": "authorizeRanges", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "attestations", + "type": "tuple[]" + } + ], + "name": "deleteAttestations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "getAttestationData", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct AttestationData", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "collectionIds", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "owners", + "type": "address[]" + } + ], + "name": "getAttestationDataBatch", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct AttestationData[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "getAttestationDataTuple", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "getAttestationExtraData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "getAttestationIssuer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "getAttestationTimestamp", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "getAttestationValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "collectionIds", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "owners", + "type": "address[]" + } + ], + "name": "getAttestationValueBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "hasAttestation", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + } + ], + "name": "isAuthorized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "attestations", + "type": "tuple[]" + } + ], + "name": "recordAttestations", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "rangeIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "firstCollectionId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastCollectionId", + "type": "uint256" + } + ], + "name": "unauthorizeRange", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "internalType": "struct Range[]", + "name": "ranges", + "type": "tuple[]" + }, + { + "internalType": "uint256[]", + "name": "rangeIndexes", + "type": "uint256[]" + } + ], + "name": "unauthorizeRanges", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x02e0a88cf5bcdf37530ff84fab1c3fdfd6f9e6ee6875723b19f38b651dd232be", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0xF2cFB43D86aE0D4932888fe51ed6B430222e32e8", + "transactionIndex": 49, + "gasUsed": "2207509", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000040000000000000008000002000000000000000000000000000000000000000000000000000800801000000000000040100000000000000000000020000000000000000000800000000000000000080000000000000400000000000000000000000000000000000000010000000000000000000008000200000000000000000000000000000000000000000000000000040000000004000000000000000000001000000000000000000000000000000100000000020001000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0x1b426f0ae02e4cc34101711cfce23c9aa921c6ade3aa99b5f3e2ee8c6c354378", + "transactionHash": "0x02e0a88cf5bcdf37530ff84fab1c3fdfd6f9e6ee6875723b19f38b651dd232be", + "logs": [ + { + "transactionIndex": 49, + "blockNumber": 28599982, + "transactionHash": "0x02e0a88cf5bcdf37530ff84fab1c3fdfd6f9e6ee6875723b19f38b651dd232be", + "address": "0xF2cFB43D86aE0D4932888fe51ed6B430222e32e8", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 297, + "blockHash": "0x1b426f0ae02e4cc34101711cfce23c9aa921c6ade3aa99b5f3e2ee8c6c354378" + }, + { + "transactionIndex": 49, + "blockNumber": 28599982, + "transactionHash": "0x02e0a88cf5bcdf37530ff84fab1c3fdfd6f9e6ee6875723b19f38b651dd232be", + "address": "0xF2cFB43D86aE0D4932888fe51ed6B430222e32e8", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 298, + "blockHash": "0x1b426f0ae02e4cc34101711cfce23c9aa921c6ade3aa99b5f3e2ee8c6c354378" + }, + { + "transactionIndex": 49, + "blockNumber": 28599982, + "transactionHash": "0x02e0a88cf5bcdf37530ff84fab1c3fdfd6f9e6ee6875723b19f38b651dd232be", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000012d5afa893cedf000000000000000000000000000000000000000000000000894ad152ee570cbf000000000000000000000000000000000000000000000a08d0e2d8af28157ff80000000000000000000000000000000000000000000000008937fba345c33de0000000000000000000000000000000000000000000000a08d0f5ae5ed0a94ed7", + "logIndex": 299, + "blockHash": "0x1b426f0ae02e4cc34101711cfce23c9aa921c6ade3aa99b5f3e2ee8c6c354378" + } + ], + "blockNumber": 28599982, + "cumulativeGasUsed": "12020743", + "status": 1, + "byzantium": true + }, + "args": [ + "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "0x5722fEa81027533721BA161964622271560da1aC" + ], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"badgesAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"}],\"name\":\"AttesterNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"rangeIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expectedFirstId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expectedLastId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"FirstId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastCollectionId\",\"type\":\"uint256\"}],\"name\":\"IdsMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"}],\"name\":\"IssuerNotAuthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"expectedArrayLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rangeIndex\",\"type\":\"uint256\"}],\"name\":\"RangeIndexOutOfBounds\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct Attestation\",\"name\":\"attestation\",\"type\":\"tuple\"}],\"name\":\"AttestationDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct Attestation\",\"name\":\"attestation\",\"type\":\"tuple\"}],\"name\":\"AttestationRecorded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"firstCollectionId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lastCollectionId\",\"type\":\"uint256\"}],\"name\":\"IssuerAuthorized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"firstCollectionId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lastCollectionId\",\"type\":\"uint256\"}],\"name\":\"IssuerUnauthorized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"firstCollectionId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastCollectionId\",\"type\":\"uint256\"}],\"name\":\"authorizeRange\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"internalType\":\"struct Range[]\",\"name\":\"ranges\",\"type\":\"tuple[]\"}],\"name\":\"authorizeRanges\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"attestations\",\"type\":\"tuple[]\"}],\"name\":\"deleteAttestations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"getAttestationData\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct AttestationData\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"}],\"name\":\"getAttestationDataBatch\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct AttestationData[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"getAttestationDataTuple\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"getAttestationExtraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"getAttestationIssuer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"getAttestationTimestamp\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"getAttestationValue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"},{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"}],\"name\":\"getAttestationValueBatch\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"hasAttestation\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"}],\"name\":\"isAuthorized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"attestations\",\"type\":\"tuple[]\"}],\"name\":\"recordAttestations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"rangeIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"firstCollectionId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastCollectionId\",\"type\":\"uint256\"}],\"name\":\"unauthorizeRange\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"min\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"max\",\"type\":\"uint256\"}],\"internalType\":\"struct Range[]\",\"name\":\"ranges\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256[]\",\"name\":\"rangeIndexes\",\"type\":\"uint256[]\"}],\"name\":\"unauthorizeRanges\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"authorizeRange(address,uint256,uint256)\":{\"details\":\"Authorize an issuer for a specific range\",\"params\":{\"firstCollectionId\":\"First collection Id of the range for which the issuer will be authorized\",\"issuer\":\"Issuer that will be authorized\",\"lastCollectionId\":\"Last collection Id of the range for which the issuer will be authorized\"}},\"authorizeRanges(address,(uint256,uint256)[])\":{\"details\":\"Authorize an issuer for specific ranges\",\"params\":{\"issuer\":\"Issuer that will be authorized\",\"ranges\":\"Ranges for which the issuer will be authorized\"}},\"constructor\":{\"details\":\"Constructor.\",\"params\":{\"badgesAddress\":\"Stateless ERC1155 Badges contract\",\"owner\":\"Owner of the contract, has the right to authorize/unauthorize attestations issuers\"}},\"deleteAttestations((uint256,address,address,uint256,uint32,bytes)[])\":{\"details\":\"Delete function to be called by authorized issuers\",\"params\":{\"attestations\":\"Attestations to be deleted\"}},\"getAttestationData(uint256,address)\":{\"details\":\"Getter of the data of a specific attestation\",\"params\":{\"collectionId\":\"Collection identifier of the targeted attestation\",\"owner\":\"Owner of the targeted attestation\"}},\"getAttestationDataBatch(uint256[],address[])\":{\"details\":\"Getter of the data of specific attestations\",\"params\":{\"collectionIds\":\"Collection identifiers of the targeted attestations\",\"owners\":\"Owners of the targeted attestations\"}},\"getAttestationDataTuple(uint256,address)\":{\"details\":\"Getter of the data of a specific attestation as tuple\",\"params\":{\"collectionId\":\"Collection identifier of the targeted attestation\",\"owner\":\"Owner of the targeted attestation\"}},\"getAttestationExtraData(uint256,address)\":{\"details\":\"Getter of the extraData of a specific attestation\",\"params\":{\"collectionId\":\"Collection identifier of the targeted attestation\",\"owner\":\"Owner of the targeted attestation\"}},\"getAttestationIssuer(uint256,address)\":{\"details\":\"Getter of the issuer of a specific attestation\",\"params\":{\"collectionId\":\"Collection identifier of the targeted attestation\",\"owner\":\"Owner of the targeted attestation\"}},\"getAttestationTimestamp(uint256,address)\":{\"details\":\"Getter of the timestamp of a specific attestation\",\"params\":{\"collectionId\":\"Collection identifier of the targeted attestation\",\"owner\":\"Owner of the targeted attestation\"}},\"getAttestationValue(uint256,address)\":{\"details\":\"Getter of the value of a specific attestation\",\"params\":{\"collectionId\":\"Collection identifier of the targeted attestation\",\"owner\":\"Owner of the targeted attestation\"}},\"getAttestationValueBatch(uint256[],address[])\":{\"details\":\"Getter of the values of specific attestations\",\"params\":{\"collectionIds\":\"Collection identifiers of the targeted attestations\",\"owners\":\"Owners of the targeted attestations\"}},\"hasAttestation(uint256,address)\":{\"details\":\"Returns whether a user has an attestation from a collection\",\"params\":{\"collectionId\":\"Collection identifier of the targeted attestation\",\"owner\":\"Owner of the targeted attestation\"}},\"initialize(address)\":{\"details\":\"Initialize function, to be called by the proxy delegating calls to this implementation\",\"params\":{\"owner\":\"Owner of the contract, has the right to authorize/unauthorize attestations issuers\"}},\"isAuthorized(address,uint256)\":{\"details\":\"Returns whether a specific issuer is authorized or not to record in a specific attestations collection\",\"params\":{\"collectionId\":\"Collection Id for which the issuer will be checked\",\"issuer\":\"Issuer to be checked\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pause()\":{\"details\":\"Pauses the registry. Issuers can no longer record or delete attestations\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"recordAttestations((uint256,address,address,uint256,uint32,bytes)[])\":{\"details\":\"Main function to be called by authorized issuers\",\"params\":{\"attestations\":\"Attestations to be recorded (creates a new one or overrides an existing one)\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unauthorizeRange(address,uint256,uint256,uint256)\":{\"details\":\"Unauthorize an issuer for a specific range\",\"params\":{\"firstCollectionId\":\"First collection Id of the range for which the issuer will be unauthorized\",\"issuer\":\"Issuer that will be unauthorized\",\"lastCollectionId\":\"Last collection Id of the range for which the issuer will be unauthorized\",\"rangeIndex\":\"Index of the range to be unauthorized\"}},\"unauthorizeRanges(address,(uint256,uint256)[],uint256[])\":{\"details\":\"Unauthorize an issuer for specific ranges\",\"params\":{\"issuer\":\"Issuer that will be unauthorized\",\"ranges\":\"Ranges for which the issuer will be unauthorized\"}},\"unpause()\":{\"details\":\"Unpauses the registry\"}},\"title\":\"Attestations Registry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Main contract of Sismo, stores all recorded attestations in attestations collections Only authorized attestations issuers can record attestation in the registry Attesters that expect to record in the Attestations Registry must be authorized issuers For more information: https://attestations-registry.docs.sismo.io For each attestation recorded, a badge is received by the user The badge is the Non transferrable NFT representation of an attestation Its ERC1155 contract is stateless, balances are read directly from the registry. Badge balances <=> Attestations values After the creation or update of an attestation, the registry triggers a TransferSingle event from the ERC1155 Badges contracts It enables off-chain apps such as opensea to catch the \\\"shadow mint\\\" of the badge*\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/core/AttestationsRegistry.sol\":\"AttestationsRegistry\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/core/AttestationsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {IAttestationsRegistry} from './interfaces/IAttestationsRegistry.sol';\\nimport {AttestationsRegistryConfigLogic} from './libs/attestations-registry/AttestationsRegistryConfigLogic.sol';\\nimport {AttestationsRegistryState} from './libs/attestations-registry/AttestationsRegistryState.sol';\\nimport {Range, RangeUtils} from './libs/utils/RangeLib.sol';\\nimport {Attestation, AttestationData} from './libs/Structs.sol';\\nimport {IBadges} from './interfaces/IBadges.sol';\\n\\n/**\\n * @title Attestations Registry\\n * @author Sismo\\n * @notice Main contract of Sismo, stores all recorded attestations in attestations collections\\n * Only authorized attestations issuers can record attestation in the registry\\n * Attesters that expect to record in the Attestations Registry must be authorized issuers\\n * For more information: https://attestations-registry.docs.sismo.io\\n\\n * For each attestation recorded, a badge is received by the user\\n * The badge is the Non transferrable NFT representation of an attestation \\n * Its ERC1155 contract is stateless, balances are read directly from the registry. Badge balances <=> Attestations values\\n * After the creation or update of an attestation, the registry triggers a TransferSingle event from the ERC1155 Badges contracts\\n * It enables off-chain apps such as opensea to catch the \\\"shadow mint\\\" of the badge\\n **/\\ncontract AttestationsRegistry is\\n AttestationsRegistryState,\\n IAttestationsRegistry,\\n AttestationsRegistryConfigLogic\\n{\\n IBadges immutable BADGES;\\n\\n /**\\n * @dev Constructor.\\n * @param owner Owner of the contract, has the right to authorize/unauthorize attestations issuers\\n * @param badgesAddress Stateless ERC1155 Badges contract\\n */\\n constructor(address owner, address badgesAddress) {\\n initialize(owner);\\n BADGES = IBadges(badgesAddress);\\n }\\n\\n /**\\n * @dev Initialize function, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, has the right to authorize/unauthorize attestations issuers\\n */\\n function initialize(address owner) public initializer {\\n _transferOwnership(owner);\\n }\\n\\n /**\\n * @dev Main function to be called by authorized issuers\\n * @param attestations Attestations to be recorded (creates a new one or overrides an existing one)\\n */\\n function recordAttestations(Attestation[] calldata attestations) external override whenNotPaused {\\n address issuer = _msgSender();\\n for (uint256 i = 0; i < attestations.length; i++) {\\n if (!_isAuthorized(issuer, attestations[i].collectionId))\\n revert IssuerNotAuthorized(issuer, attestations[i].collectionId);\\n\\n uint256 previousAttestationValue = _attestationsData[attestations[i].collectionId][\\n attestations[i].owner\\n ].value;\\n\\n _attestationsData[attestations[i].collectionId][attestations[i].owner] = AttestationData(\\n attestations[i].issuer,\\n attestations[i].value,\\n attestations[i].timestamp,\\n attestations[i].extraData\\n );\\n\\n _triggerBadgeTransferEvent(\\n attestations[i].collectionId,\\n attestations[i].owner,\\n previousAttestationValue,\\n attestations[i].value\\n );\\n emit AttestationRecorded(attestations[i]);\\n }\\n }\\n\\n /**\\n * @dev Delete function to be called by authorized issuers\\n * @param attestations Attestations to be deleted\\n */\\n function deleteAttestations(Attestation[] memory attestations) external override whenNotPaused {\\n address issuer = _msgSender();\\n for (uint256 i = 0; i < attestations.length; i++) {\\n uint256 previousAttestationValue = _attestationsData[attestations[i].collectionId][\\n attestations[i].owner\\n ].value;\\n\\n if (!_isAuthorized(issuer, attestations[i].collectionId))\\n revert IssuerNotAuthorized(issuer, attestations[i].collectionId);\\n delete _attestationsData[attestations[i].collectionId][attestations[i].owner];\\n\\n _triggerBadgeTransferEvent(\\n attestations[i].collectionId,\\n attestations[i].owner,\\n previousAttestationValue,\\n 0\\n );\\n\\n emit AttestationDeleted(\\n Attestation(\\n attestations[i].collectionId,\\n attestations[i].owner,\\n attestations[i].issuer,\\n attestations[i].value,\\n attestations[i].timestamp,\\n attestations[i].extraData\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns whether a user has an attestation from a collection\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function hasAttestation(uint256 collectionId, address owner)\\n external\\n view\\n override\\n returns (bool)\\n {\\n return _getAttestationValue(collectionId, owner) != 0;\\n }\\n\\n /**\\n * @dev Getter of the data of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationData(uint256 collectionId, address owner)\\n external\\n view\\n override\\n returns (AttestationData memory)\\n {\\n return _getAttestationData(collectionId, owner);\\n }\\n\\n /**\\n * @dev Getter of the value of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationValue(uint256 collectionId, address owner)\\n external\\n view\\n override\\n returns (uint256)\\n {\\n return _getAttestationValue(collectionId, owner);\\n }\\n\\n /**\\n * @dev Getter of the data of a specific attestation as tuple\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationDataTuple(uint256 collectionId, address owner)\\n external\\n view\\n override\\n returns (\\n address,\\n uint256,\\n uint32,\\n bytes memory\\n )\\n {\\n AttestationData memory attestationData = _attestationsData[collectionId][owner];\\n return (\\n attestationData.issuer,\\n attestationData.value,\\n attestationData.timestamp,\\n attestationData.extraData\\n );\\n }\\n\\n /**\\n * @dev Getter of the extraData of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationExtraData(uint256 collectionId, address owner)\\n external\\n view\\n override\\n returns (bytes memory)\\n {\\n return _attestationsData[collectionId][owner].extraData;\\n }\\n\\n /**\\n * @dev Getter of the issuer of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationIssuer(uint256 collectionId, address owner)\\n external\\n view\\n override\\n returns (address)\\n {\\n return _attestationsData[collectionId][owner].issuer;\\n }\\n\\n /**\\n * @dev Getter of the timestamp of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationTimestamp(uint256 collectionId, address owner)\\n external\\n view\\n override\\n returns (uint32)\\n {\\n return _attestationsData[collectionId][owner].timestamp;\\n }\\n\\n /**\\n * @dev Getter of the data of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationDataBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n override\\n returns (AttestationData[] memory)\\n {\\n AttestationData[] memory attestationsDataArray = new AttestationData[](collectionIds.length);\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n attestationsDataArray[i] = _getAttestationData(collectionIds[i], owners[i]);\\n }\\n return attestationsDataArray;\\n }\\n\\n /**\\n * @dev Getter of the values of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationValueBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n override\\n returns (uint256[] memory)\\n {\\n uint256[] memory attestationsValues = new uint256[](collectionIds.length);\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n attestationsValues[i] = _getAttestationValue(collectionIds[i], owners[i]);\\n }\\n return attestationsValues;\\n }\\n\\n /**\\n * @dev Function that trigger a TransferSingle event from the stateless ERC1155 Badges contract\\n * It enables off-chain apps such as opensea to catch the \\\"shadow mints/burns\\\" of badges\\n */\\n function _triggerBadgeTransferEvent(\\n uint256 badgeTokenId,\\n address owner,\\n uint256 previousValue,\\n uint256 newValue\\n ) internal {\\n bool isGreaterValue = newValue > previousValue;\\n address operator = address(this);\\n address from = isGreaterValue ? address(0) : owner;\\n address to = isGreaterValue ? owner : address(0);\\n uint256 value = isGreaterValue ? newValue - previousValue : previousValue - newValue;\\n\\n // if isGreaterValue is true, function triggers mint event. Otherwise triggers burn event.\\n BADGES.triggerTransferEvent(operator, from, to, badgeTokenId, value);\\n }\\n\\n function _getAttestationData(uint256 collectionId, address owner)\\n internal\\n view\\n returns (AttestationData memory)\\n {\\n return (_attestationsData[collectionId][owner]);\\n }\\n\\n function _getAttestationValue(uint256 collectionId, address owner)\\n internal\\n view\\n returns (uint256)\\n {\\n return _attestationsData[collectionId][owner].value;\\n }\\n}\\n\",\"keccak256\":\"0x8c9ee3d788fb52eb9001c10e6da2f09c0b7eb0a691c31ecd4762ddf3a7fd6540\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttestationsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Attestation, AttestationData} from '../libs/Structs.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry {\\n event AttestationRecorded(Attestation attestation);\\n event AttestationDeleted(Attestation attestation);\\n\\n /**\\n * @dev Main function to be called by authorized issuers\\n * @param attestations Attestations to be recorded (creates a new one or overrides an existing one)\\n */\\n function recordAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Delete function to be called by authorized issuers\\n * @param attestations Attestations to be deleted\\n */\\n function deleteAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Returns whether a user has an attestation from a collection\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function hasAttestation(uint256 collectionId, address owner) external returns (bool);\\n\\n /**\\n * @dev Getter of the data of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationData(uint256 collectionId, address owner)\\n external\\n view\\n returns (AttestationData memory);\\n\\n /**\\n * @dev Getter of the value of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationValue(uint256 collectionId, address owner) external view returns (uint256);\\n\\n /**\\n * @dev Getter of the data of a specific attestation as tuple\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationDataTuple(uint256 collectionId, address owner)\\n external\\n view\\n returns (\\n address,\\n uint256,\\n uint32,\\n bytes memory\\n );\\n\\n /**\\n * @dev Getter of the extraData of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationExtraData(uint256 collectionId, address owner)\\n external\\n view\\n returns (bytes memory);\\n\\n /**\\n * @dev Getter of the issuer of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationIssuer(uint256 collectionId, address owner)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @dev Getter of the timestamp of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationTimestamp(uint256 collectionId, address owner)\\n external\\n view\\n returns (uint32);\\n\\n /**\\n * @dev Getter of the data of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationDataBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (AttestationData[] memory);\\n\\n /**\\n * @dev Getter of the values of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationValueBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xb5e25bd7e0372c9973e582fb7fe96318c145831a5452d8c79eb848a7464b0297\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttestationsRegistryConfigLogic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Forked from, removed storage, OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.14;\\n\\nimport {Range, RangeUtils} from '../libs/utils/RangeLib.sol';\\n\\ninterface IAttestationsRegistryConfigLogic {\\n error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error AttesterNotFound(address issuer);\\n error RangeIndexOutOfBounds(address issuer, uint256 expectedArrayLength, uint256 rangeIndex);\\n error IdsMismatch(\\n address issuer,\\n uint256 rangeIndex,\\n uint256 expectedFirstId,\\n uint256 expectedLastId,\\n uint256 FirstId,\\n uint256 lastCollectionId\\n );\\n event IssuerAuthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n event IssuerUnauthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n\\n /**\\n * @dev Authorize an issuer for a specific range\\n * @param issuer Issuer that will be authorized\\n * @param firstCollectionId First collection Id of the range for which the issuer will be authorized\\n * @param lastCollectionId Last collection Id of the range for which the issuer will be authorized\\n */\\n function authorizeRange(\\n address issuer,\\n uint256 firstCollectionId,\\n uint256 lastCollectionId\\n ) external;\\n\\n /**\\n * @dev Unauthorize an issuer for a specific range\\n * @param issuer Issuer that will be unauthorized\\n * @param rangeIndex Index of the range to be unauthorized\\n * @param firstCollectionId First collection Id of the range for which the issuer will be unauthorized\\n * @param lastCollectionId Last collection Id of the range for which the issuer will be unauthorized\\n */\\n function unauthorizeRange(\\n address issuer,\\n uint256 rangeIndex,\\n uint256 firstCollectionId,\\n uint256 lastCollectionId\\n ) external;\\n\\n /**\\n * @dev Authorize an issuer for specific ranges\\n * @param issuer Issuer that will be authorized\\n * @param ranges Ranges for which the issuer will be authorized\\n */\\n function authorizeRanges(address issuer, Range[] memory ranges) external;\\n\\n /**\\n * @dev Unauthorize an issuer for specific ranges\\n * @param issuer Issuer that will be unauthorized\\n * @param ranges Ranges for which the issuer will be unauthorized\\n */\\n function unauthorizeRanges(\\n address issuer,\\n Range[] memory ranges,\\n uint256[] memory rangeIndexes\\n ) external;\\n\\n /**\\n * @dev Returns whether a specific issuer is authorized or not to record in a specific attestations collection\\n * @param issuer Issuer to be checked\\n * @param collectionId Collection Id for which the issuer will be checked\\n */\\n function isAuthorized(address issuer, uint256 collectionId) external view returns (bool);\\n\\n /**\\n * @dev Pauses the registry. Issuers can no longer record or delete attestations\\n */\\n function pause() external;\\n\\n /**\\n * @dev Unpauses the registry\\n */\\n function unpause() external;\\n}\\n\",\"keccak256\":\"0x4d93f06dd4df1d3d071effd39c86c43154387290e2b9b7f5153e1d1ba5f131b1\",\"license\":\"MIT\"},\"contracts/core/interfaces/IBadges.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title Interface for Badges contract\\n * @author Sismo\\n * @notice Stateless ERC1155 contract. Reads balance from the values of attestations\\n * The associated attestations registry triggers TransferSingle events from this contract\\n * It allows badge \\\"shadow mints and burns\\\" to be caught by off-chain platforms\\n */\\ninterface IBadges {\\n error BadgesNonTransferrable();\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param uri Uri for the metadata of badges\\n * @param owner Owner of the contract, super admin, can setup roles and update the attestation registry\\n */\\n function initialize(string memory uri, address owner) external;\\n\\n /**\\n * @dev Main function of the ERC1155 badge\\n * The balance of a user is equal to the value of the underlying attestation.\\n * attestationCollectionId == badgeId\\n * @param account Address to check badge balance (= value of attestation)\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev Emits a TransferSingle event, so subgraphs and other off-chain apps relying on events can see badge minting/burning\\n * can only be called by address having the EVENT_TRIGGERER_ROLE (attestations registry address)\\n * @param operator who is calling the TransferEvent\\n * @param from address(0) if minting, address of the badge holder if burning\\n * @param to address of the badge holder is minting, address(0) if burning\\n * @param id badgeId for which to trigger the event\\n * @param value minted/burned balance\\n */\\n function triggerTransferEvent(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 value\\n ) external;\\n\\n /**\\n * @dev Set the attestations registry address. Can only be called by owner (default admin)\\n * @param attestationsRegistry new attestations registry address\\n */\\n function setAttestationsRegistry(address attestationsRegistry) external;\\n\\n /**\\n * @dev Set the URI. Can only be called by owner (default admin)\\n * @param uri new attestations registry address\\n */\\n function setUri(string memory uri) external;\\n\\n /**\\n * @dev Getter of the attestations registry\\n */\\n function getAttestationsRegistry() external view returns (address);\\n}\\n\",\"keccak256\":\"0xbd279560345ab0f4d4b7f689e714f907522676fe86b17341db034b5a98799019\",\"license\":\"MIT\"},\"contracts/core/libs/Structs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title Attestations Registry State\\n * @author Sismo\\n * @notice This contract holds all of the storage variables and data\\n * structures used by the AttestationsRegistry and parent\\n * contracts.\\n */\\n\\n// User Attestation Request, can be made by any user\\n// The context of an Attestation Request is a specific attester contract\\n// Each attester has groups of accounts in its available data\\n// eg: for a specific attester:\\n// group 1 <=> accounts that sent txs on mainnet\\n// group 2 <=> accounts that sent txs on polygon\\n// eg: for another attester:\\n// group 1 <=> accounts that sent eth txs in 2022\\n// group 2 <=> accounts sent eth txs in 2021\\nstruct Request {\\n // implicit address attester;\\n // implicit uint256 chainId;\\n Claim[] claims;\\n address destination; // destination that will receive the end attestation\\n}\\n\\nstruct Claim {\\n uint256 groupId; // user claims to have an account in this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n bytes extraData; // arbitrary data, may be required by the attester to verify claims or generate a specific attestation\\n}\\n\\n/**\\n * @dev Attestation Struct. This is the struct receive as argument by the Attestation Registry.\\n * @param collectionId Attestation collection\\n * @param owner Attestation collection\\n * @param issuer Attestation collection\\n * @param value Attestation collection\\n * @param timestamp Attestation collection\\n * @param extraData Attestation collection\\n */\\nstruct Attestation {\\n // implicit uint256 chainId;\\n uint256 collectionId; // Id of the attestation collection (in the registry)\\n address owner; // Owner of the attestation\\n address issuer; // Contract that created or last updated the record.\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Timestamp chosen by the attester, should correspond to the effective date of the attestation\\n // it is different from the recording timestamp (date when the attestation was recorded)\\n // e.g a proof of NFT ownership may have be recorded today which is 2 month old data.\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\\n// Attestation Data, stored in the registry\\n// The context is a specific owner of a specific collection\\nstruct AttestationData {\\n // implicit uint256 chainId\\n // implicit uint256 collectionId - from context\\n // implicit owner\\n address issuer; // Address of the contract that recorded the attestation\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Effective date of issuance of the attestation. (can be different from the recording timestamp)\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\",\"keccak256\":\"0x893d9a10429878dd4077388ff4da954c20b86a3c172a7bbdd10a01eb5d39b6a0\",\"license\":\"MIT\"},\"contracts/core/libs/attestations-registry/AttestationsRegistryConfigLogic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Forked from, removed storage, OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.14;\\n\\nimport './OwnableLogic.sol';\\nimport './PausableLogic.sol';\\nimport './InitializableLogic.sol';\\nimport './AttestationsRegistryState.sol';\\nimport {IAttestationsRegistryConfigLogic} from './../../interfaces/IAttestationsRegistryConfigLogic.sol';\\nimport {Range, RangeUtils} from '../utils/RangeLib.sol';\\n\\n/**\\n * @title Attestations Registry Config Logic contract\\n * @author Sismo\\n * @notice Holds the logic of how to authorize/ unauthorize issuers of attestations in the registry\\n **/\\ncontract AttestationsRegistryConfigLogic is\\n AttestationsRegistryState,\\n IAttestationsRegistryConfigLogic,\\n OwnableLogic,\\n PausableLogic,\\n InitializableLogic\\n{\\n using RangeUtils for Range[];\\n\\n /**\\n * @dev Authorize an issuer for a specific range\\n * @param issuer Issuer that will be authorized\\n * @param firstCollectionId First collection Id of the range for which the issuer will be authorized\\n * @param lastCollectionId Last collection Id of the range for which the issuer will be authorized\\n */\\n function authorizeRange(\\n address issuer,\\n uint256 firstCollectionId,\\n uint256 lastCollectionId\\n ) external override onlyOwner {\\n _authorizeRange(issuer, firstCollectionId, lastCollectionId);\\n }\\n\\n /**\\n * @dev Unauthorize an issuer for a specific range\\n * @param issuer Issuer that will be unauthorized\\n * @param rangeIndex Index of the range to be unauthorized\\n * @param firstCollectionId First collection Id of the range for which the issuer will be unauthorized\\n * @param lastCollectionId Last collection Id of the range for which the issuer will be unauthorized\\n */\\n function unauthorizeRange(\\n address issuer,\\n uint256 rangeIndex,\\n uint256 firstCollectionId,\\n uint256 lastCollectionId\\n ) external override onlyOwner {\\n _unauthorizeRange(issuer, rangeIndex, firstCollectionId, lastCollectionId);\\n }\\n\\n /**\\n * @dev Authorize an issuer for specific ranges\\n * @param issuer Issuer that will be authorized\\n * @param ranges Ranges for which the issuer will be authorized\\n */\\n function authorizeRanges(address issuer, Range[] memory ranges) external override onlyOwner {\\n for (uint256 i = 0; i < ranges.length; i++) {\\n _authorizeRange(issuer, ranges[i].min, ranges[i].max);\\n }\\n }\\n\\n /**\\n * @dev Unauthorize an issuer for specific ranges\\n * @param issuer Issuer that will be unauthorized\\n * @param ranges Ranges for which the issuer will be unauthorized\\n */\\n function unauthorizeRanges(\\n address issuer,\\n Range[] memory ranges,\\n uint256[] memory rangeIndexes\\n ) external override onlyOwner {\\n for (uint256 i = 0; i < rangeIndexes.length; i++) {\\n _unauthorizeRange(issuer, rangeIndexes[i] - i, ranges[i].min, ranges[i].max);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a specific issuer is authorized or not to record in a specific attestations collection\\n * @param issuer Issuer to be checked\\n * @param collectionId Collection Id for which the issuer will be checked\\n */\\n function isAuthorized(address issuer, uint256 collectionId) external view returns (bool) {\\n return _isAuthorized(issuer, collectionId);\\n }\\n\\n /**\\n * @dev Pauses the registry. Issuers can no longer record or delete attestations\\n */\\n function pause() external override onlyOwner {\\n _pause();\\n }\\n\\n /**\\n * @dev Unpauses the registry\\n */\\n function unpause() external override onlyOwner {\\n _unpause();\\n }\\n\\n function _isAuthorized(address issuer, uint256 collectionId) internal view returns (bool) {\\n return _authorizedRanges[issuer]._includes(collectionId);\\n }\\n\\n function _authorizeRange(\\n address issuer,\\n uint256 firstCollectionId,\\n uint256 lastCollectionId\\n ) internal {\\n Range memory newRange = Range(firstCollectionId, lastCollectionId);\\n _authorizedRanges[issuer].push(newRange);\\n emit IssuerAuthorized(issuer, firstCollectionId, lastCollectionId);\\n }\\n\\n function _unauthorizeRange(\\n address issuer,\\n uint256 rangeIndex,\\n uint256 firstCollectionId,\\n uint256 lastCollectionId\\n ) internal onlyOwner {\\n if (rangeIndex >= _authorizedRanges[issuer].length)\\n revert RangeIndexOutOfBounds(issuer, _authorizedRanges[issuer].length, rangeIndex);\\n\\n uint256 expectedFirstId = _authorizedRanges[issuer][rangeIndex].min;\\n uint256 expectedLastId = _authorizedRanges[issuer][rangeIndex].max;\\n if (firstCollectionId != expectedFirstId || lastCollectionId != expectedLastId)\\n revert IdsMismatch(\\n issuer,\\n rangeIndex,\\n expectedFirstId,\\n expectedLastId,\\n firstCollectionId,\\n lastCollectionId\\n );\\n\\n _authorizedRanges[issuer][rangeIndex] = _authorizedRanges[issuer][\\n _authorizedRanges[issuer].length - 1\\n ];\\n _authorizedRanges[issuer].pop();\\n emit IssuerUnauthorized(issuer, firstCollectionId, lastCollectionId);\\n }\\n}\\n\",\"keccak256\":\"0xce7d42accffd665859f61c2f3499a8de85152449659a0298653c97eb6693f4a2\",\"license\":\"MIT\"},\"contracts/core/libs/attestations-registry/AttestationsRegistryState.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Range} from '../utils/RangeLib.sol';\\nimport {Attestation, AttestationData} from '../Structs.sol';\\n\\ncontract AttestationsRegistryState {\\n // main config\\n bool internal _initialized;\\n bool internal _initializing;\\n bool internal _paused;\\n address internal _owner;\\n // keeping some space for future\\n uint256[15] private _placeHolders;\\n\\n // storing the authorized ranges for each attesters\\n mapping(address => Range[]) internal _authorizedRanges;\\n // keeping some space for future\\n uint256[15] private _placeHolders2;\\n // storing the data of attestations\\n // =collectionId=> =owner=> attestationData\\n mapping(uint256 => mapping(address => AttestationData)) internal _attestationsData;\\n}\\n\",\"keccak256\":\"0x40fd47db58c335b9741394402988f986cc1c9020d0b9846b29dffa446e364980\",\"license\":\"MIT\"},\"contracts/core/libs/attestations-registry/InitializableLogic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\\n// Forked from, removed storage, OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.14;\\n\\nimport '../utils/Address.sol';\\nimport './AttestationsRegistryState.sol';\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() initializer {}\\n * ```\\n * ====\\n */\\nabstract contract InitializableLogic is AttestationsRegistryState {\\n // only diff with oz\\n // /**\\n // * @dev Indicates that the contract has been initialized.\\n // */\\n // bool private _initialized;\\n\\n // /**\\n // * @dev Indicates that the contract is in the process of being initialized.\\n // */\\n // bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\\n // contract may have been reentered.\\n require(\\n _initializing ? _isConstructor() : !_initialized,\\n 'Initializable: contract is already initialized'\\n );\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} modifier, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, 'Initializable: contract is not initializing');\\n _;\\n }\\n\\n function _isConstructor() private view returns (bool) {\\n return !Address.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x7798d1365297205f08f0a0e5fb8bf26005bdf82b040af45bab8d168018c43ac5\",\"license\":\"MIT\"},\"contracts/core/libs/attestations-registry/OwnableLogic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Forked from, removed storage, OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.14;\\n\\nimport '../utils/Context.sol';\\nimport './AttestationsRegistryState.sol';\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableLogic is Context, AttestationsRegistryState {\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n // This is the only diff with OZ contract\\n // address private _owner;\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), 'Ownable: caller is not the owner');\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), 'Ownable: new owner is the zero address');\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x74ff8ebdd6ad706a45354f1045ef623840aa1dbde37874dde2b6bfa498e0bdb3\",\"license\":\"MIT\"},\"contracts/core/libs/attestations-registry/PausableLogic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// Forked from, removed storage, OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\\n\\npragma solidity ^0.8.14;\\n\\nimport '../utils/Context.sol';\\nimport './AttestationsRegistryState.sol';\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract PausableLogic is Context, AttestationsRegistryState {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n // this is the only diff with OZ contract\\n // bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), 'Pausable: paused');\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), 'Pausable: not paused');\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x234c48f5eb48bb15b6c2535428f1e28e172bc2c6fbf58c99ba7b3ca75e884c60\",\"license\":\"MIT\"},\"contracts/core/libs/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, 'Address: insufficient balance');\\n\\n (bool success, ) = recipient.call{value: amount}('');\\n require(success, 'Address: unable to send value, recipient may have reverted');\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, 'Address: low-level call failed');\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, 'Address: low-level call with value failed');\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, 'Address: insufficient balance for call');\\n require(isContract(target), 'Address: call to non-contract');\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data)\\n internal\\n view\\n returns (bytes memory)\\n {\\n return functionStaticCall(target, data, 'Address: low-level static call failed');\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), 'Address: static call to non-contract');\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, 'Address: low-level delegate call failed');\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), 'Address: delegate call to non-contract');\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5d46e52cb7914d16d80db123b88f0f54598a959a8ca94913a9d956bf14fd7730\",\"license\":\"MIT\"},\"contracts/core/libs/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.14;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2dba7215628ceb3bb6f28422c7ca48d79615dd7aa8ba54978d4d8cad996f57e\",\"license\":\"MIT\"},\"contracts/core/libs/utils/RangeLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nstruct Range {\\n uint256 min;\\n uint256 max;\\n}\\n\\n// Range [0;3] includees 0 and 3\\nlibrary RangeUtils {\\n function _includes(Range[] storage ranges, uint256 collectionId) internal view returns (bool) {\\n for (uint256 i = 0; i < ranges.length; i++) {\\n if (collectionId >= ranges[i].min && collectionId <= ranges[i].max) {\\n return true;\\n }\\n }\\n return false;\\n }\\n}\\n\",\"keccak256\":\"0x8f04a81575ba69887b302887d4ffbd8eb6f3d9d1a7be920e5478c95b30890ce1\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a06040523480156200001157600080fd5b506040516200288f3803806200288f8339810160408190526200003491620001e4565b6200003f3362000069565b6000805462ff0000191690556200005682620000c6565b6001600160a01b0316608052506200021c565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054610100900460ff16620000e35760005460ff1615620000ed565b620000ed6200019a565b620001555760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801562000178576000805461ffff19166101011790555b620001838262000069565b801562000196576000805461ff00191690555b5050565b6000620001b230620001b860201b6200133c1760201c565b15905090565b6001600160a01b03163b151590565b80516001600160a01b0381168114620001df57600080fd5b919050565b60008060408385031215620001f857600080fd5b6200020383620001c7565b91506200021360208401620001c7565b90509250929050565b6080516126576200023860003960006119b801526126576000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c80638456cb59116100c3578063c4d66de81161007c578063c4d66de814610326578063c7da9aa614610339578063dc873d011461036e578063e7c994361461038e578063ebc5c093146103a1578063f2fde38b146103b457600080fd5b80638456cb591461028b57806384c2ad82146102935780638c3c9e32146102b35780638da5cb5b146102d4578063b886567314610300578063c06d5db61461031357600080fd5b80633be1ced7116101155780633be1ced7146102145780633f4ba83a146102375780635c975abb1461023f5780636d7fbb6714610250578063715018a6146102705780637cde0fe21461027857600080fd5b8063011023901461015257806314067f8b1461017a57806315027bda146101cc578063181dfdff146101ec5780632972b0f014610201575b600080fd5b610165610160366004611b9e565b6103c7565b60405190151581526020015b60405180910390f35b6101b7610188366004611b9e565b6000918252602080805260408084206001600160a01b0393909316845291905290206002015463ffffffff1690565b60405163ffffffff9091168152602001610171565b6101df6101da366004611ce8565b6103de565b6040516101719190611e3f565b6101ff6101fa366004611f20565b6104cf565b005b61016561020f366004611f93565b610598565b610227610222366004611b9e565b6105ab565b6040516101719493929190611fbd565b6101ff6106c1565b60005462010000900460ff16610165565b61026361025e366004611b9e565b6106fd565b6040516101719190611ffa565b6101ff6107b5565b6101ff61028636600461200d565b6107f1565b6101ff610833565b6102a66102a1366004611b9e565b61086d565b6040516101719190612040565b6102c66102c1366004611b9e565b61089a565b604051908152602001610171565b600054630100000090046001600160a01b03165b6040516001600160a01b039091168152602001610171565b6101ff61030e366004612053565b6108a6565b6101ff6103213660046120a0565b61093b565b6101ff6103343660046120d9565b610979565b6102e8610347366004611b9e565b6000918252602080805260408084206001600160a01b039384168552909152909120541690565b61038161037c366004611ce8565b610a3c565b60405161017191906120f4565b6101ff61039c36600461214c565b610afc565b6101ff6103af3660046122d3565b610e41565b6101ff6103c23660046120d9565b611299565b60006103d3838361134b565b151590505b92915050565b6060600083516001600160401b038111156103fb576103fb611bca565b60405190808252806020026020018201604052801561044c57816020015b60408051608081018252600080825260208083018290529282015260608082015282526000199092019101816104195790505b50905060005b84518110156104c75761049785828151811061047057610470612347565b602002602001015185838151811061048a5761048a612347565b6020026020010151611374565b8282815181106104a9576104a9612347565b602002602001018190525080806104bf90612373565b915050610452565b509392505050565b6000546001600160a01b03630100000090910416331461050a5760405162461bcd60e51b81526004016105019061238c565b60405180910390fd5b60005b815181101561059257610580848284848151811061052d5761052d612347565b602002602001015161053f91906123c1565b85848151811061055157610551612347565b60200260200101516000015186858151811061056f5761056f612347565b602002602001015160200151611483565b8061058a81612373565b91505061050d565b50505050565b60006105a48383611722565b9392505050565b6000828152602080805260408083206001600160a01b038086168552908352818420825160808101845281549092168252600181015493820193909352600283015463ffffffff1691810191909152600382018054849384936060938593919291838601919061061a906123d8565b80601f0160208091040260200160405190810160405280929190818152602001828054610646906123d8565b80156106935780601f1061066857610100808354040283529160200191610693565b820191906000526020600020905b81548152906001019060200180831161067657829003601f168201915b505050919092525050815160208301516040840151606090940151919b909a50929850965090945050505050565b6000546001600160a01b0363010000009091041633146106f35760405162461bcd60e51b81526004016105019061238c565b6106fb611744565b565b6000828152602080805260408083206001600160a01b0385168452909152902060030180546060919061072f906123d8565b80601f016020809104026020016040519081016040528092919081815260200182805461075b906123d8565b80156107a85780601f1061077d576101008083540402835291602001916107a8565b820191906000526020600020905b81548152906001019060200180831161078b57829003601f168201915b5050505050905092915050565b6000546001600160a01b0363010000009091041633146107e75760405162461bcd60e51b81526004016105019061238c565b6106fb60006117df565b6000546001600160a01b0363010000009091041633146108235760405162461bcd60e51b81526004016105019061238c565b61082e83838361183c565b505050565b6000546001600160a01b0363010000009091041633146108655760405162461bcd60e51b81526004016105019061238c565b6106fb6118ce565b60408051608081018252600080825260208201819052918101919091526060808201526105a48383611374565b60006105a4838361134b565b6000546001600160a01b0363010000009091041633146108d85760405162461bcd60e51b81526004016105019061238c565b60005b815181101561082e57610929838383815181106108fa576108fa612347565b60200260200101516000015184848151811061091857610918612347565b60200260200101516020015161183c565b8061093381612373565b9150506108db565b6000546001600160a01b03630100000090910416331461096d5760405162461bcd60e51b81526004016105019061238c565b61059284848484611483565b600054610100900460ff166109945760005460ff1615610998565b303b155b6109fb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610501565b600054610100900460ff16158015610a1d576000805461ffff19166101011790555b610a26826117df565b8015610a38576000805461ff00191690555b5050565b6060600083516001600160401b03811115610a5957610a59611bca565b604051908082528060200260200182016040528015610a82578160200160208202803683370190505b50905060005b84518110156104c757610acd858281518110610aa657610aa6612347565b6020026020010151858381518110610ac057610ac0612347565b602002602001015161134b565b828281518110610adf57610adf612347565b602090810291909101015280610af481612373565b915050610a88565b60005462010000900460ff1615610b255760405162461bcd60e51b815260040161050190612412565b3360005b825181101561082e57600060206000858481518110610b4a57610b4a612347565b60200260200101516000015181526020019081526020016000206000858481518110610b7857610b78612347565b6020026020010151602001516001600160a01b03166001600160a01b03168152602001908152602001600020600101549050610bd183858481518110610bc057610bc0612347565b602002602001015160000151611722565b610c1e5782848381518110610be857610be8612347565b60209081029190910101515160405163c522f21160e01b81526001600160a01b0390921660048301526024820152604401610501565b60206000858481518110610c3457610c34612347565b60200260200101516000015181526020019081526020016000206000858481518110610c6257610c62612347565b6020908102919091018101518101516001600160a01b03168252810191909152604001600090812080546001600160a01b03191681556001810182905560028101805463ffffffff1916905590610cbc6003830182611aaf565b5050610d05848381518110610cd357610cd3612347565b602002602001015160000151858481518110610cf157610cf1612347565b602002602001015160200151836000611930565b7f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b6040518060c00160405280868581518110610d4357610d43612347565b6020026020010151600001518152602001868581518110610d6657610d66612347565b6020026020010151602001516001600160a01b03168152602001868581518110610d9257610d92612347565b6020026020010151604001516001600160a01b03168152602001868581518110610dbe57610dbe612347565b6020026020010151606001518152602001868581518110610de157610de1612347565b60200260200101516080015163ffffffff168152602001868581518110610e0a57610e0a612347565b602002602001015160a00151815250604051610e26919061243c565b60405180910390a15080610e3981612373565b915050610b29565b60005462010000900460ff1615610e6a5760405162461bcd60e51b815260040161050190612412565b3360005b8281101561059257610ea482858584818110610e8c57610e8c612347565b9050602002810190610e9e919061249d565b35611722565b610ef85781848483818110610ebb57610ebb612347565b9050602002810190610ecd919061249d565b60405163c522f21160e01b81526001600160a01b039092166004830152356024820152604401610501565b600060206000868685818110610f1057610f10612347565b9050602002810190610f22919061249d565b6000013581526020019081526020016000206000868685818110610f4857610f48612347565b9050602002810190610f5a919061249d565b610f6b9060408101906020016120d9565b6001600160a01b03166001600160a01b031681526020019081526020016000206001015490506040518060800160405280868685818110610fae57610fae612347565b9050602002810190610fc0919061249d565b610fd19060608101906040016120d9565b6001600160a01b03168152602001868685818110610ff157610ff1612347565b9050602002810190611003919061249d565b60600135815260200186868581811061101e5761101e612347565b9050602002810190611030919061249d565b6110419060a08101906080016124bd565b63ffffffff16815260200186868581811061105e5761105e612347565b9050602002810190611070919061249d565b61107e9060a08101906124d8565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093909452506020925088905087868181106110cb576110cb612347565b90506020028101906110dd919061249d565b600001358152602001908152602001600020600087878681811061110357611103612347565b9050602002810190611115919061249d565b6111269060408101906020016120d9565b6001600160a01b0390811682526020808301939093526040918201600020845181546001600160a01b03191692169190911781558383015160018201559083015160028201805463ffffffff191663ffffffff90921691909117905560608301518051919261119d92600385019290910190611ae9565b5090505061122c8585848181106111b6576111b6612347565b90506020028101906111c8919061249d565b358686858181106111db576111db612347565b90506020028101906111ed919061249d565b6111fe9060408101906020016120d9565b8388888781811061121157611211612347565b9050602002810190611223919061249d565b60600135611930565b7f8c20c3acb6b5208b7affea2fd90dabc8d47e77cee9766c855ce42730505cb20585858481811061125f5761125f612347565b9050602002810190611271919061249d565b60405161127e919061254e565b60405180910390a1508061129181612373565b915050610e6e565b6000546001600160a01b0363010000009091041633146112cb5760405162461bcd60e51b81526004016105019061238c565b6001600160a01b0381166113305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610501565b611339816117df565b50565b6001600160a01b03163b151590565b6000918252602080805260408084206001600160a01b0393909316845291905290206001015490565b60408051608081018252600080825260208201819052918101919091526060808201526000838152602080805260408083206001600160a01b03808716855290835292819020815160808101835281549094168452600181015492840192909252600282015463ffffffff16908301526003810180546060840191906113f9906123d8565b80601f0160208091040260200160405190810160405280929190818152602001828054611425906123d8565b80156114725780601f1061144757610100808354040283529160200191611472565b820191906000526020600020905b81548152906001019060200180831161145557829003601f168201915b505050505081525050905092915050565b6000546001600160a01b0363010000009091041633146114b55760405162461bcd60e51b81526004016105019061238c565b6001600160a01b0384166000908152601060205260409020548310611517576001600160a01b038416600081815260106020526040908190205490516345e388eb60e01b81526004810192909252602482015260448101849052606401610501565b6001600160a01b038416600090815260106020526040812080548590811061154157611541612347565b600091825260208083206002909202909101546001600160a01b03881683526010909152604082208054919350908690811061157f5761157f612347565b906000526020600020906002020160010154905081841415806115a25750808314155b156115ee57604051637a4dd76560e01b81526001600160a01b03871660048201526024810186905260448101839052606481018290526084810185905260a4810184905260c401610501565b6001600160a01b03861660009081526010602052604090208054611614906001906123c1565b8154811061162457611624612347565b906000526020600020906002020160106000886001600160a01b03166001600160a01b03168152602001908152602001600020868154811061166857611668612347565b60009182526020808320845460029093020191825560019384015493909101929092556001600160a01b03881681526010909152604090208054806116af576116af61260b565b6000828152602080822060026000199490940193840201828155600101919091559155604080516001600160a01b038916815291820186905281018490527f33cff58e54c3a8acae85cad63487b5dcf617521e33bb03f071299f374c29de1f9060600160405180910390a1505050505050565b6001600160a01b03821660009081526010602052604081206105a49083611a21565b60005462010000900460ff166117935760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610501565b6000805462ff0000191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60408051808201825283815260208082018481526001600160a01b03871660008181526010845285812080546001808201835591835291859020865160029093020191825592519201919091558351908152908101859052918201839052907fe7d6ac0b740347f7f96a97e6a9dc0f20f4f11eca65495315adc009a55b6762f89060600160405180910390a150505050565b60005462010000900460ff16156118f75760405162461bcd60e51b815260040161050190612412565b6000805462ff00001916620100001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586117c23390565b818111306000826119415785611944565b60005b9050600083611954576000611956565b865b905060008461196e5761196986886123c1565b611978565b61197887876123c1565b604051633885984b60e11b81526001600160a01b03868116600483015285811660248301528481166044830152606482018c9052608482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063710b30969060a401600060405180830381600087803b1580156119fe57600080fd5b505af1158015611a12573d6000803e3d6000fd5b50505050505050505050505050565b6000805b8354811015611aa557838181548110611a4057611a40612347565b9060005260206000209060020201600001548310158015611a845750838181548110611a6e57611a6e612347565b9060005260206000209060020201600101548311155b15611a935760019150506103d8565b80611a9d81612373565b915050611a25565b5060009392505050565b508054611abb906123d8565b6000825580601f10611acb575050565b601f0160209004906000526020600020908101906113399190611b6d565b828054611af5906123d8565b90600052602060002090601f016020900481019282611b175760008555611b5d565b82601f10611b3057805160ff1916838001178555611b5d565b82800160010185558215611b5d579182015b82811115611b5d578251825591602001919060010190611b42565b50611b69929150611b6d565b5090565b5b80821115611b695760008155600101611b6e565b80356001600160a01b0381168114611b9957600080fd5b919050565b60008060408385031215611bb157600080fd5b82359150611bc160208401611b82565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715611c0257611c02611bca565b60405290565b60405160c081016001600160401b0381118282101715611c0257611c02611bca565b604051601f8201601f191681016001600160401b0381118282101715611c5257611c52611bca565b604052919050565b60006001600160401b03821115611c7357611c73611bca565b5060051b60200190565b600082601f830112611c8e57600080fd5b81356020611ca3611c9e83611c5a565b611c2a565b82815260059290921b84018101918181019086841115611cc257600080fd5b8286015b84811015611cdd5780358352918301918301611cc6565b509695505050505050565b60008060408385031215611cfb57600080fd5b82356001600160401b0380821115611d1257600080fd5b611d1e86838701611c7d565b9350602091508185013581811115611d3557600080fd5b85019050601f81018613611d4857600080fd5b8035611d56611c9e82611c5a565b81815260059190911b82018301908381019088831115611d7557600080fd5b928401925b82841015611d9a57611d8b84611b82565b82529284019290840190611d7a565b80955050505050509250929050565b6000815180845260005b81811015611dcf57602081850181015186830182015201611db3565b81811115611de1576000602083870101525b50601f01601f19169290920160200192915050565b60018060a01b0381511682526020810151602083015263ffffffff60408201511660408301526000606082015160806060850152611e376080850182611da9565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611e9457603f19888603018452611e82858351611df6565b94509285019290850190600101611e66565b5092979650505050505050565b600082601f830112611eb257600080fd5b81356020611ec2611c9e83611c5a565b82815260069290921b84018101918181019086841115611ee157600080fd5b8286015b84811015611cdd5760408189031215611efe5760008081fd5b611f06611be0565b813581528482013585820152835291830191604001611ee5565b600080600060608486031215611f3557600080fd5b611f3e84611b82565b925060208401356001600160401b0380821115611f5a57600080fd5b611f6687838801611ea1565b93506040860135915080821115611f7c57600080fd5b50611f8986828701611c7d565b9150509250925092565b60008060408385031215611fa657600080fd5b611faf83611b82565b946020939093013593505050565b60018060a01b038516815283602082015263ffffffff83166040820152608060608201526000611ff06080830184611da9565b9695505050505050565b6020815260006105a46020830184611da9565b60008060006060848603121561202257600080fd5b61202b84611b82565b95602085013595506040909401359392505050565b6020815260006105a46020830184611df6565b6000806040838503121561206657600080fd5b61206f83611b82565b915060208301356001600160401b0381111561208a57600080fd5b61209685828601611ea1565b9150509250929050565b600080600080608085870312156120b657600080fd5b6120bf85611b82565b966020860135965060408601359560600135945092505050565b6000602082840312156120eb57600080fd5b6105a482611b82565b6020808252825182820181905260009190848201906040850190845b8181101561212c57835183529284019291840191600101612110565b50909695505050505050565b803563ffffffff81168114611b9957600080fd5b6000602080838503121561215f57600080fd5b82356001600160401b038082111561217657600080fd5b818501915085601f83011261218a57600080fd5b8135612198611c9e82611c5a565b81815260059190911b830184019084810190888311156121b757600080fd5b8585015b838110156122c6578035858111156121d35760008081fd5b860160c0601f19828d0381018213156121ec5760008081fd5b6121f4611c08565b8a84013581526040612207818601611b82565b8c8301526060612218818701611b82565b828401526080808701358285015260a09150612235828801612138565b9084015293850135938a85111561224c5760008081fd5b84860195508f603f87011261226357600094508485fd5b8c86013594508a85111561227957612279611bca565b6122898d85601f88011601611c2a565b93508484528f828688010111156122a05760008081fd5b848287018e86013760009484018d019490945250918201528452509186019186016121bb565b5098975050505050505050565b600080602083850312156122e657600080fd5b82356001600160401b03808211156122fd57600080fd5b818501915085601f83011261231157600080fd5b81358181111561232057600080fd5b8660208260051b850101111561233557600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016123855761238561235d565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000828210156123d3576123d361235d565b500390565b600181811c908216806123ec57607f821691505b60208210810361240c57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208152815160208201526000602083015160018060a01b03808216604085015280604086015116606085015250506060830151608083015263ffffffff60808401511660a083015260a083015160c080840152611e3760e0840182611da9565b6000823560be198336030181126124b357600080fd5b9190910192915050565b6000602082840312156124cf57600080fd5b6105a482612138565b6000808335601e198436030181126124ef57600080fd5b8301803591506001600160401b0382111561250957600080fd5b60200191503681900382131561251e57600080fd5b9250929050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815281356020820152600061256760208401611b82565b60018060a01b0380821660408501528061258360408701611b82565b16606085015250506060830135608083015263ffffffff6125a660808501612138565b1660a083015260a0830135601e198436030181126125c357600080fd5b83016020810190356001600160401b038111156125df57600080fd5b8036038213156125ee57600080fd5b60c08085015261260260e085018284612525565b95945050505050565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220c903c76a32e6925df15285171ac55d0624e9da3ca4368c9b9fa0c5e0482dd28864736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061014d5760003560e01c80638456cb59116100c3578063c4d66de81161007c578063c4d66de814610326578063c7da9aa614610339578063dc873d011461036e578063e7c994361461038e578063ebc5c093146103a1578063f2fde38b146103b457600080fd5b80638456cb591461028b57806384c2ad82146102935780638c3c9e32146102b35780638da5cb5b146102d4578063b886567314610300578063c06d5db61461031357600080fd5b80633be1ced7116101155780633be1ced7146102145780633f4ba83a146102375780635c975abb1461023f5780636d7fbb6714610250578063715018a6146102705780637cde0fe21461027857600080fd5b8063011023901461015257806314067f8b1461017a57806315027bda146101cc578063181dfdff146101ec5780632972b0f014610201575b600080fd5b610165610160366004611b9e565b6103c7565b60405190151581526020015b60405180910390f35b6101b7610188366004611b9e565b6000918252602080805260408084206001600160a01b0393909316845291905290206002015463ffffffff1690565b60405163ffffffff9091168152602001610171565b6101df6101da366004611ce8565b6103de565b6040516101719190611e3f565b6101ff6101fa366004611f20565b6104cf565b005b61016561020f366004611f93565b610598565b610227610222366004611b9e565b6105ab565b6040516101719493929190611fbd565b6101ff6106c1565b60005462010000900460ff16610165565b61026361025e366004611b9e565b6106fd565b6040516101719190611ffa565b6101ff6107b5565b6101ff61028636600461200d565b6107f1565b6101ff610833565b6102a66102a1366004611b9e565b61086d565b6040516101719190612040565b6102c66102c1366004611b9e565b61089a565b604051908152602001610171565b600054630100000090046001600160a01b03165b6040516001600160a01b039091168152602001610171565b6101ff61030e366004612053565b6108a6565b6101ff6103213660046120a0565b61093b565b6101ff6103343660046120d9565b610979565b6102e8610347366004611b9e565b6000918252602080805260408084206001600160a01b039384168552909152909120541690565b61038161037c366004611ce8565b610a3c565b60405161017191906120f4565b6101ff61039c36600461214c565b610afc565b6101ff6103af3660046122d3565b610e41565b6101ff6103c23660046120d9565b611299565b60006103d3838361134b565b151590505b92915050565b6060600083516001600160401b038111156103fb576103fb611bca565b60405190808252806020026020018201604052801561044c57816020015b60408051608081018252600080825260208083018290529282015260608082015282526000199092019101816104195790505b50905060005b84518110156104c75761049785828151811061047057610470612347565b602002602001015185838151811061048a5761048a612347565b6020026020010151611374565b8282815181106104a9576104a9612347565b602002602001018190525080806104bf90612373565b915050610452565b509392505050565b6000546001600160a01b03630100000090910416331461050a5760405162461bcd60e51b81526004016105019061238c565b60405180910390fd5b60005b815181101561059257610580848284848151811061052d5761052d612347565b602002602001015161053f91906123c1565b85848151811061055157610551612347565b60200260200101516000015186858151811061056f5761056f612347565b602002602001015160200151611483565b8061058a81612373565b91505061050d565b50505050565b60006105a48383611722565b9392505050565b6000828152602080805260408083206001600160a01b038086168552908352818420825160808101845281549092168252600181015493820193909352600283015463ffffffff1691810191909152600382018054849384936060938593919291838601919061061a906123d8565b80601f0160208091040260200160405190810160405280929190818152602001828054610646906123d8565b80156106935780601f1061066857610100808354040283529160200191610693565b820191906000526020600020905b81548152906001019060200180831161067657829003601f168201915b505050919092525050815160208301516040840151606090940151919b909a50929850965090945050505050565b6000546001600160a01b0363010000009091041633146106f35760405162461bcd60e51b81526004016105019061238c565b6106fb611744565b565b6000828152602080805260408083206001600160a01b0385168452909152902060030180546060919061072f906123d8565b80601f016020809104026020016040519081016040528092919081815260200182805461075b906123d8565b80156107a85780601f1061077d576101008083540402835291602001916107a8565b820191906000526020600020905b81548152906001019060200180831161078b57829003601f168201915b5050505050905092915050565b6000546001600160a01b0363010000009091041633146107e75760405162461bcd60e51b81526004016105019061238c565b6106fb60006117df565b6000546001600160a01b0363010000009091041633146108235760405162461bcd60e51b81526004016105019061238c565b61082e83838361183c565b505050565b6000546001600160a01b0363010000009091041633146108655760405162461bcd60e51b81526004016105019061238c565b6106fb6118ce565b60408051608081018252600080825260208201819052918101919091526060808201526105a48383611374565b60006105a4838361134b565b6000546001600160a01b0363010000009091041633146108d85760405162461bcd60e51b81526004016105019061238c565b60005b815181101561082e57610929838383815181106108fa576108fa612347565b60200260200101516000015184848151811061091857610918612347565b60200260200101516020015161183c565b8061093381612373565b9150506108db565b6000546001600160a01b03630100000090910416331461096d5760405162461bcd60e51b81526004016105019061238c565b61059284848484611483565b600054610100900460ff166109945760005460ff1615610998565b303b155b6109fb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610501565b600054610100900460ff16158015610a1d576000805461ffff19166101011790555b610a26826117df565b8015610a38576000805461ff00191690555b5050565b6060600083516001600160401b03811115610a5957610a59611bca565b604051908082528060200260200182016040528015610a82578160200160208202803683370190505b50905060005b84518110156104c757610acd858281518110610aa657610aa6612347565b6020026020010151858381518110610ac057610ac0612347565b602002602001015161134b565b828281518110610adf57610adf612347565b602090810291909101015280610af481612373565b915050610a88565b60005462010000900460ff1615610b255760405162461bcd60e51b815260040161050190612412565b3360005b825181101561082e57600060206000858481518110610b4a57610b4a612347565b60200260200101516000015181526020019081526020016000206000858481518110610b7857610b78612347565b6020026020010151602001516001600160a01b03166001600160a01b03168152602001908152602001600020600101549050610bd183858481518110610bc057610bc0612347565b602002602001015160000151611722565b610c1e5782848381518110610be857610be8612347565b60209081029190910101515160405163c522f21160e01b81526001600160a01b0390921660048301526024820152604401610501565b60206000858481518110610c3457610c34612347565b60200260200101516000015181526020019081526020016000206000858481518110610c6257610c62612347565b6020908102919091018101518101516001600160a01b03168252810191909152604001600090812080546001600160a01b03191681556001810182905560028101805463ffffffff1916905590610cbc6003830182611aaf565b5050610d05848381518110610cd357610cd3612347565b602002602001015160000151858481518110610cf157610cf1612347565b602002602001015160200151836000611930565b7f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b6040518060c00160405280868581518110610d4357610d43612347565b6020026020010151600001518152602001868581518110610d6657610d66612347565b6020026020010151602001516001600160a01b03168152602001868581518110610d9257610d92612347565b6020026020010151604001516001600160a01b03168152602001868581518110610dbe57610dbe612347565b6020026020010151606001518152602001868581518110610de157610de1612347565b60200260200101516080015163ffffffff168152602001868581518110610e0a57610e0a612347565b602002602001015160a00151815250604051610e26919061243c565b60405180910390a15080610e3981612373565b915050610b29565b60005462010000900460ff1615610e6a5760405162461bcd60e51b815260040161050190612412565b3360005b8281101561059257610ea482858584818110610e8c57610e8c612347565b9050602002810190610e9e919061249d565b35611722565b610ef85781848483818110610ebb57610ebb612347565b9050602002810190610ecd919061249d565b60405163c522f21160e01b81526001600160a01b039092166004830152356024820152604401610501565b600060206000868685818110610f1057610f10612347565b9050602002810190610f22919061249d565b6000013581526020019081526020016000206000868685818110610f4857610f48612347565b9050602002810190610f5a919061249d565b610f6b9060408101906020016120d9565b6001600160a01b03166001600160a01b031681526020019081526020016000206001015490506040518060800160405280868685818110610fae57610fae612347565b9050602002810190610fc0919061249d565b610fd19060608101906040016120d9565b6001600160a01b03168152602001868685818110610ff157610ff1612347565b9050602002810190611003919061249d565b60600135815260200186868581811061101e5761101e612347565b9050602002810190611030919061249d565b6110419060a08101906080016124bd565b63ffffffff16815260200186868581811061105e5761105e612347565b9050602002810190611070919061249d565b61107e9060a08101906124d8565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093909452506020925088905087868181106110cb576110cb612347565b90506020028101906110dd919061249d565b600001358152602001908152602001600020600087878681811061110357611103612347565b9050602002810190611115919061249d565b6111269060408101906020016120d9565b6001600160a01b0390811682526020808301939093526040918201600020845181546001600160a01b03191692169190911781558383015160018201559083015160028201805463ffffffff191663ffffffff90921691909117905560608301518051919261119d92600385019290910190611ae9565b5090505061122c8585848181106111b6576111b6612347565b90506020028101906111c8919061249d565b358686858181106111db576111db612347565b90506020028101906111ed919061249d565b6111fe9060408101906020016120d9565b8388888781811061121157611211612347565b9050602002810190611223919061249d565b60600135611930565b7f8c20c3acb6b5208b7affea2fd90dabc8d47e77cee9766c855ce42730505cb20585858481811061125f5761125f612347565b9050602002810190611271919061249d565b60405161127e919061254e565b60405180910390a1508061129181612373565b915050610e6e565b6000546001600160a01b0363010000009091041633146112cb5760405162461bcd60e51b81526004016105019061238c565b6001600160a01b0381166113305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610501565b611339816117df565b50565b6001600160a01b03163b151590565b6000918252602080805260408084206001600160a01b0393909316845291905290206001015490565b60408051608081018252600080825260208201819052918101919091526060808201526000838152602080805260408083206001600160a01b03808716855290835292819020815160808101835281549094168452600181015492840192909252600282015463ffffffff16908301526003810180546060840191906113f9906123d8565b80601f0160208091040260200160405190810160405280929190818152602001828054611425906123d8565b80156114725780601f1061144757610100808354040283529160200191611472565b820191906000526020600020905b81548152906001019060200180831161145557829003601f168201915b505050505081525050905092915050565b6000546001600160a01b0363010000009091041633146114b55760405162461bcd60e51b81526004016105019061238c565b6001600160a01b0384166000908152601060205260409020548310611517576001600160a01b038416600081815260106020526040908190205490516345e388eb60e01b81526004810192909252602482015260448101849052606401610501565b6001600160a01b038416600090815260106020526040812080548590811061154157611541612347565b600091825260208083206002909202909101546001600160a01b03881683526010909152604082208054919350908690811061157f5761157f612347565b906000526020600020906002020160010154905081841415806115a25750808314155b156115ee57604051637a4dd76560e01b81526001600160a01b03871660048201526024810186905260448101839052606481018290526084810185905260a4810184905260c401610501565b6001600160a01b03861660009081526010602052604090208054611614906001906123c1565b8154811061162457611624612347565b906000526020600020906002020160106000886001600160a01b03166001600160a01b03168152602001908152602001600020868154811061166857611668612347565b60009182526020808320845460029093020191825560019384015493909101929092556001600160a01b03881681526010909152604090208054806116af576116af61260b565b6000828152602080822060026000199490940193840201828155600101919091559155604080516001600160a01b038916815291820186905281018490527f33cff58e54c3a8acae85cad63487b5dcf617521e33bb03f071299f374c29de1f9060600160405180910390a1505050505050565b6001600160a01b03821660009081526010602052604081206105a49083611a21565b60005462010000900460ff166117935760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610501565b6000805462ff0000191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60408051808201825283815260208082018481526001600160a01b03871660008181526010845285812080546001808201835591835291859020865160029093020191825592519201919091558351908152908101859052918201839052907fe7d6ac0b740347f7f96a97e6a9dc0f20f4f11eca65495315adc009a55b6762f89060600160405180910390a150505050565b60005462010000900460ff16156118f75760405162461bcd60e51b815260040161050190612412565b6000805462ff00001916620100001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586117c23390565b818111306000826119415785611944565b60005b9050600083611954576000611956565b865b905060008461196e5761196986886123c1565b611978565b61197887876123c1565b604051633885984b60e11b81526001600160a01b03868116600483015285811660248301528481166044830152606482018c9052608482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063710b30969060a401600060405180830381600087803b1580156119fe57600080fd5b505af1158015611a12573d6000803e3d6000fd5b50505050505050505050505050565b6000805b8354811015611aa557838181548110611a4057611a40612347565b9060005260206000209060020201600001548310158015611a845750838181548110611a6e57611a6e612347565b9060005260206000209060020201600101548311155b15611a935760019150506103d8565b80611a9d81612373565b915050611a25565b5060009392505050565b508054611abb906123d8565b6000825580601f10611acb575050565b601f0160209004906000526020600020908101906113399190611b6d565b828054611af5906123d8565b90600052602060002090601f016020900481019282611b175760008555611b5d565b82601f10611b3057805160ff1916838001178555611b5d565b82800160010185558215611b5d579182015b82811115611b5d578251825591602001919060010190611b42565b50611b69929150611b6d565b5090565b5b80821115611b695760008155600101611b6e565b80356001600160a01b0381168114611b9957600080fd5b919050565b60008060408385031215611bb157600080fd5b82359150611bc160208401611b82565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715611c0257611c02611bca565b60405290565b60405160c081016001600160401b0381118282101715611c0257611c02611bca565b604051601f8201601f191681016001600160401b0381118282101715611c5257611c52611bca565b604052919050565b60006001600160401b03821115611c7357611c73611bca565b5060051b60200190565b600082601f830112611c8e57600080fd5b81356020611ca3611c9e83611c5a565b611c2a565b82815260059290921b84018101918181019086841115611cc257600080fd5b8286015b84811015611cdd5780358352918301918301611cc6565b509695505050505050565b60008060408385031215611cfb57600080fd5b82356001600160401b0380821115611d1257600080fd5b611d1e86838701611c7d565b9350602091508185013581811115611d3557600080fd5b85019050601f81018613611d4857600080fd5b8035611d56611c9e82611c5a565b81815260059190911b82018301908381019088831115611d7557600080fd5b928401925b82841015611d9a57611d8b84611b82565b82529284019290840190611d7a565b80955050505050509250929050565b6000815180845260005b81811015611dcf57602081850181015186830182015201611db3565b81811115611de1576000602083870101525b50601f01601f19169290920160200192915050565b60018060a01b0381511682526020810151602083015263ffffffff60408201511660408301526000606082015160806060850152611e376080850182611da9565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611e9457603f19888603018452611e82858351611df6565b94509285019290850190600101611e66565b5092979650505050505050565b600082601f830112611eb257600080fd5b81356020611ec2611c9e83611c5a565b82815260069290921b84018101918181019086841115611ee157600080fd5b8286015b84811015611cdd5760408189031215611efe5760008081fd5b611f06611be0565b813581528482013585820152835291830191604001611ee5565b600080600060608486031215611f3557600080fd5b611f3e84611b82565b925060208401356001600160401b0380821115611f5a57600080fd5b611f6687838801611ea1565b93506040860135915080821115611f7c57600080fd5b50611f8986828701611c7d565b9150509250925092565b60008060408385031215611fa657600080fd5b611faf83611b82565b946020939093013593505050565b60018060a01b038516815283602082015263ffffffff83166040820152608060608201526000611ff06080830184611da9565b9695505050505050565b6020815260006105a46020830184611da9565b60008060006060848603121561202257600080fd5b61202b84611b82565b95602085013595506040909401359392505050565b6020815260006105a46020830184611df6565b6000806040838503121561206657600080fd5b61206f83611b82565b915060208301356001600160401b0381111561208a57600080fd5b61209685828601611ea1565b9150509250929050565b600080600080608085870312156120b657600080fd5b6120bf85611b82565b966020860135965060408601359560600135945092505050565b6000602082840312156120eb57600080fd5b6105a482611b82565b6020808252825182820181905260009190848201906040850190845b8181101561212c57835183529284019291840191600101612110565b50909695505050505050565b803563ffffffff81168114611b9957600080fd5b6000602080838503121561215f57600080fd5b82356001600160401b038082111561217657600080fd5b818501915085601f83011261218a57600080fd5b8135612198611c9e82611c5a565b81815260059190911b830184019084810190888311156121b757600080fd5b8585015b838110156122c6578035858111156121d35760008081fd5b860160c0601f19828d0381018213156121ec5760008081fd5b6121f4611c08565b8a84013581526040612207818601611b82565b8c8301526060612218818701611b82565b828401526080808701358285015260a09150612235828801612138565b9084015293850135938a85111561224c5760008081fd5b84860195508f603f87011261226357600094508485fd5b8c86013594508a85111561227957612279611bca565b6122898d85601f88011601611c2a565b93508484528f828688010111156122a05760008081fd5b848287018e86013760009484018d019490945250918201528452509186019186016121bb565b5098975050505050505050565b600080602083850312156122e657600080fd5b82356001600160401b03808211156122fd57600080fd5b818501915085601f83011261231157600080fd5b81358181111561232057600080fd5b8660208260051b850101111561233557600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016123855761238561235d565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000828210156123d3576123d361235d565b500390565b600181811c908216806123ec57607f821691505b60208210810361240c57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208152815160208201526000602083015160018060a01b03808216604085015280604086015116606085015250506060830151608083015263ffffffff60808401511660a083015260a083015160c080840152611e3760e0840182611da9565b6000823560be198336030181126124b357600080fd5b9190910192915050565b6000602082840312156124cf57600080fd5b6105a482612138565b6000808335601e198436030181126124ef57600080fd5b8301803591506001600160401b0382111561250957600080fd5b60200191503681900382131561251e57600080fd5b9250929050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815281356020820152600061256760208401611b82565b60018060a01b0380821660408501528061258360408701611b82565b16606085015250506060830135608083015263ffffffff6125a660808501612138565b1660a083015260a0830135601e198436030181126125c357600080fd5b83016020810190356001600160401b038111156125df57600080fd5b8036038213156125ee57600080fd5b60c08085015261260260e085018284612525565b95945050505050565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220c903c76a32e6925df15285171ac55d0624e9da3ca4368c9b9fa0c5e0482dd28864736f6c634300080e0033", + "devdoc": { + "author": "Sismo", + "kind": "dev", + "methods": { + "authorizeRange(address,uint256,uint256)": { + "details": "Authorize an issuer for a specific range", + "params": { + "firstCollectionId": "First collection Id of the range for which the issuer will be authorized", + "issuer": "Issuer that will be authorized", + "lastCollectionId": "Last collection Id of the range for which the issuer will be authorized" + } + }, + "authorizeRanges(address,(uint256,uint256)[])": { + "details": "Authorize an issuer for specific ranges", + "params": { + "issuer": "Issuer that will be authorized", + "ranges": "Ranges for which the issuer will be authorized" + } + }, + "constructor": { + "details": "Constructor.", + "params": { + "badgesAddress": "Stateless ERC1155 Badges contract", + "owner": "Owner of the contract, has the right to authorize/unauthorize attestations issuers" + } + }, + "deleteAttestations((uint256,address,address,uint256,uint32,bytes)[])": { + "details": "Delete function to be called by authorized issuers", + "params": { + "attestations": "Attestations to be deleted" + } + }, + "getAttestationData(uint256,address)": { + "details": "Getter of the data of a specific attestation", + "params": { + "collectionId": "Collection identifier of the targeted attestation", + "owner": "Owner of the targeted attestation" + } + }, + "getAttestationDataBatch(uint256[],address[])": { + "details": "Getter of the data of specific attestations", + "params": { + "collectionIds": "Collection identifiers of the targeted attestations", + "owners": "Owners of the targeted attestations" + } + }, + "getAttestationDataTuple(uint256,address)": { + "details": "Getter of the data of a specific attestation as tuple", + "params": { + "collectionId": "Collection identifier of the targeted attestation", + "owner": "Owner of the targeted attestation" + } + }, + "getAttestationExtraData(uint256,address)": { + "details": "Getter of the extraData of a specific attestation", + "params": { + "collectionId": "Collection identifier of the targeted attestation", + "owner": "Owner of the targeted attestation" + } + }, + "getAttestationIssuer(uint256,address)": { + "details": "Getter of the issuer of a specific attestation", + "params": { + "collectionId": "Collection identifier of the targeted attestation", + "owner": "Owner of the targeted attestation" + } + }, + "getAttestationTimestamp(uint256,address)": { + "details": "Getter of the timestamp of a specific attestation", + "params": { + "collectionId": "Collection identifier of the targeted attestation", + "owner": "Owner of the targeted attestation" + } + }, + "getAttestationValue(uint256,address)": { + "details": "Getter of the value of a specific attestation", + "params": { + "collectionId": "Collection identifier of the targeted attestation", + "owner": "Owner of the targeted attestation" + } + }, + "getAttestationValueBatch(uint256[],address[])": { + "details": "Getter of the values of specific attestations", + "params": { + "collectionIds": "Collection identifiers of the targeted attestations", + "owners": "Owners of the targeted attestations" + } + }, + "hasAttestation(uint256,address)": { + "details": "Returns whether a user has an attestation from a collection", + "params": { + "collectionId": "Collection identifier of the targeted attestation", + "owner": "Owner of the targeted attestation" + } + }, + "initialize(address)": { + "details": "Initialize function, to be called by the proxy delegating calls to this implementation", + "params": { + "owner": "Owner of the contract, has the right to authorize/unauthorize attestations issuers" + } + }, + "isAuthorized(address,uint256)": { + "details": "Returns whether a specific issuer is authorized or not to record in a specific attestations collection", + "params": { + "collectionId": "Collection Id for which the issuer will be checked", + "issuer": "Issuer to be checked" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "pause()": { + "details": "Pauses the registry. Issuers can no longer record or delete attestations" + }, + "paused()": { + "details": "Returns true if the contract is paused, and false otherwise." + }, + "recordAttestations((uint256,address,address,uint256,uint32,bytes)[])": { + "details": "Main function to be called by authorized issuers", + "params": { + "attestations": "Attestations to be recorded (creates a new one or overrides an existing one)" + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "unauthorizeRange(address,uint256,uint256,uint256)": { + "details": "Unauthorize an issuer for a specific range", + "params": { + "firstCollectionId": "First collection Id of the range for which the issuer will be unauthorized", + "issuer": "Issuer that will be unauthorized", + "lastCollectionId": "Last collection Id of the range for which the issuer will be unauthorized", + "rangeIndex": "Index of the range to be unauthorized" + } + }, + "unauthorizeRanges(address,(uint256,uint256)[],uint256[])": { + "details": "Unauthorize an issuer for specific ranges", + "params": { + "issuer": "Issuer that will be unauthorized", + "ranges": "Ranges for which the issuer will be unauthorized" + } + }, + "unpause()": { + "details": "Unpauses the registry" + } + }, + "title": "Attestations Registry", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Main contract of Sismo, stores all recorded attestations in attestations collections Only authorized attestations issuers can record attestation in the registry Attesters that expect to record in the Attestations Registry must be authorized issuers For more information: https://attestations-registry.docs.sismo.io For each attestation recorded, a badge is received by the user The badge is the Non transferrable NFT representation of an attestation Its ERC1155 contract is stateless, balances are read directly from the registry. Badge balances <=> Attestations values After the creation or update of an attestation, the registry triggers a TransferSingle event from the ERC1155 Badges contracts It enables off-chain apps such as opensea to catch the \"shadow mint\" of the badge*", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 11858, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 11860, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 11862, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_paused", + "offset": 2, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 11864, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_owner", + "offset": 3, + "slot": "0", + "type": "t_address" + }, + { + "astId": 11868, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_placeHolders", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)15_storage" + }, + { + "astId": 11874, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_authorizedRanges", + "offset": 0, + "slot": "16", + "type": "t_mapping(t_address,t_array(t_struct(Range)12480_storage)dyn_storage)" + }, + { + "astId": 11878, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_placeHolders2", + "offset": 0, + "slot": "17", + "type": "t_array(t_uint256)15_storage" + }, + { + "astId": 11885, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_attestationsData", + "offset": 0, + "slot": "32", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(AttestationData)11512_storage))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(Range)12480_storage)dyn_storage": { + "base": "t_struct(Range)12480_storage", + "encoding": "dynamic_array", + "label": "struct Range[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)15_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[15]", + "numberOfBytes": "480" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_array(t_struct(Range)12480_storage)dyn_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct Range[])", + "numberOfBytes": "32", + "value": "t_array(t_struct(Range)12480_storage)dyn_storage" + }, + "t_mapping(t_address,t_struct(AttestationData)11512_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct AttestationData)", + "numberOfBytes": "32", + "value": "t_struct(AttestationData)11512_storage" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_struct(AttestationData)11512_storage))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(address => struct AttestationData))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_struct(AttestationData)11512_storage)" + }, + "t_struct(AttestationData)11512_storage": { + "encoding": "inplace", + "label": "struct AttestationData", + "members": [ + { + "astId": 11505, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "issuer", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 11507, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "value", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 11509, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "timestamp", + "offset": 0, + "slot": "2", + "type": "t_uint32" + }, + { + "astId": 11511, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "extraData", + "offset": 0, + "slot": "3", + "type": "t_bytes_storage" + } + ], + "numberOfBytes": "128" + }, + "t_struct(Range)12480_storage": { + "encoding": "inplace", + "label": "struct Range", + "members": [ + { + "astId": 12477, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "min", + "offset": 0, + "slot": "0", + "type": "t_uint256" + }, + { + "astId": 12479, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "max", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/AttestationsRegistryProxy.json b/deployments/mumbai/AttestationsRegistryProxy.json new file mode 100644 index 0000000..76c4bc4 --- /dev/null +++ b/deployments/mumbai/AttestationsRegistryProxy.json @@ -0,0 +1,264 @@ +{ + "address": "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xe5d46301c5952f0b32bfa41dfa0b381473ae3b333b935c3ae490a28b7d7ff8cc", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", + "transactionIndex": 3, + "gasUsed": "609955", + "logsBloom": "0x00000000000000000000000000000000400000000000000000800000000000000000000000000000000000000000000000008010002000000000000800000000000000000000000000000000000002800001000000000000040100000000000000000000020000008000000000000800000000800000000080000000000000400000000000000000000000000000000000000010000000000000000000808000200000200000000000000000000200000000000000000000000040000000004000000020000000000001000000000000080000000400000000100000000020000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0xee799f9ea78169bc31ba0fcb9d4bde2d16f82649acb27f1876466cb397239cf1", + "transactionHash": "0xe5d46301c5952f0b32bfa41dfa0b381473ae3b333b935c3ae490a28b7d7ff8cc", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 28599984, + "transactionHash": "0xe5d46301c5952f0b32bfa41dfa0b381473ae3b333b935c3ae490a28b7d7ff8cc", + "address": "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000f2cfb43d86ae0d4932888fe51ed6b430222e32e8" + ], + "data": "0x", + "logIndex": 7, + "blockHash": "0xee799f9ea78169bc31ba0fcb9d4bde2d16f82649acb27f1876466cb397239cf1" + }, + { + "transactionIndex": 3, + "blockNumber": 28599984, + "transactionHash": "0xe5d46301c5952f0b32bfa41dfa0b381473ae3b333b935c3ae490a28b7d7ff8cc", + "address": "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 8, + "blockHash": "0xee799f9ea78169bc31ba0fcb9d4bde2d16f82649acb27f1876466cb397239cf1" + }, + { + "transactionIndex": 3, + "blockNumber": 28599984, + "transactionHash": "0xe5d46301c5952f0b32bfa41dfa0b381473ae3b333b935c3ae490a28b7d7ff8cc", + "address": "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000246e71bc2a257f4be9c7fad4664e6d7444844adc", + "logIndex": 9, + "blockHash": "0xee799f9ea78169bc31ba0fcb9d4bde2d16f82649acb27f1876466cb397239cf1" + }, + { + "transactionIndex": 3, + "blockNumber": 28599984, + "transactionHash": "0xe5d46301c5952f0b32bfa41dfa0b381473ae3b333b935c3ae490a28b7d7ff8cc", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000008d21e3e9a74fa000000000000000000000000000000000000000000000000880243668d6bb1b0000000000000000000000000000000000000000000000a08d1bafbd83b045e7e00000000000000000000000000000000000000000000000087f971484ed13cb6000000000000000000000000000000000000000000000a08d1c3cdf6799ed378", + "logIndex": 10, + "blockHash": "0xee799f9ea78169bc31ba0fcb9d4bde2d16f82649acb27f1876466cb397239cf1" + } + ], + "blockNumber": 28599984, + "cumulativeGasUsed": "1109769", + "status": 1, + "byzantium": true + }, + "args": [ + "0xF2cFB43D86aE0D4932888fe51ed6B430222e32e8", + "0x246E71bC2a257f4BE9C7fAD4664E6D7444844Adc", + "0xc4d66de8000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/periphery/utils/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0x0edeb16b9821ae2b16e9d69c383b38d3ad2fbb3e0c06cf809a0786d96e602551\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"contracts/periphery/utils/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n// Note: we just copied so that we can see the contract used\\npragma solidity ^0.8.14;\\n\\nimport {ERC1967Proxy} from '@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol';\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1));\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(''), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n ifAdmin\\n {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(\\n msg.sender != _getAdmin(),\\n 'TransparentUpgradeableProxy: admin cannot fallback to proxy target'\\n );\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0x0d943fb8814617343a244f762e791c664bb647e32d484ba94fe1958bac85f6dc\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000f2a38038062000f2a833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b60008051602062000ee3833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b60008051602062000ec383398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b6200022e1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e9838360405180606001604052806027815260200162000f036027913962000381565b9392505050565b60006200021a60008051602062000ec383398151915260001b6200046760201b620001ea1760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd60008051602062000ec383398151915260001b6200046760201b620001ea1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200025a1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd60008051602062000ee383398151915260001b6200046760201b620001ea1760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b61082b80620006986000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b5565b610118565b61005b6100933660046106d0565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b5565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107cf602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6104bb565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610368836104e3565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610523565b60606001600160a01b0384163b6104465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016102f5565b600080856001600160a01b031685604051610461919061077f565b600060405180830381855af49150503d806000811461049c576040519150601f19603f3d011682016040523d82523d6000602084013e6104a1565b606091505b50915091506104b18282866105cc565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b6104ec81610605565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105885760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105db575081610253565b8251156105eb5782518084602001fd5b8160405162461bcd60e51b81526004016102f5919061079b565b6001600160a01b0381163b6106725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105ab565b80356001600160a01b03811681146106b057600080fd5b919050565b6000602082840312156106c757600080fd5b61025382610699565b6000806000604084860312156106e557600080fd5b6106ee84610699565b9250602084013567ffffffffffffffff8082111561070b57600080fd5b818601915086601f83011261071f57600080fd5b81358181111561072e57600080fd5b87602082850101111561074057600080fd5b6020830194508093505050509250925092565b60005b8381101561076e578181015183820152602001610756565b838111156103845750506000910152565b60008251610791818460208701610753565b9190910192915050565b60208152600082518060208401526107ba816040850160208701610753565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200396e81b41a53c52a5f2bff0f6a830a500e30d67dcfc4c47e029fb4021c6775064736f6c634300080e0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b5565b610118565b61005b6100933660046106d0565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b5565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107cf602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6104bb565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610368836104e3565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610523565b60606001600160a01b0384163b6104465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016102f5565b600080856001600160a01b031685604051610461919061077f565b600060405180830381855af49150503d806000811461049c576040519150601f19603f3d011682016040523d82523d6000602084013e6104a1565b606091505b50915091506104b18282866105cc565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b6104ec81610605565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105885760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105db575081610253565b8251156105eb5782518084602001fd5b8160405162461bcd60e51b81526004016102f5919061079b565b6001600160a01b0381163b6106725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105ab565b80356001600160a01b03811681146106b057600080fd5b919050565b6000602082840312156106c757600080fd5b61025382610699565b6000806000604084860312156106e557600080fd5b6106ee84610699565b9250602084013567ffffffffffffffff8082111561070b57600080fd5b818601915086601f83011261071f57600080fd5b81358181111561072e57600080fd5b87602082850101111561074057600080fd5b6020830194508093505050509250925092565b60005b8381101561076e578181015183820152602001610756565b838111156103845750506000910152565b60008251610791818460208701610753565b9190910192915050565b60208152600082518060208401526107ba816040850160208701610753565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200396e81b41a53c52a5f2bff0f6a830a500e30d67dcfc4c47e029fb4021c6775064736f6c634300080e0033", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/AvailableRootsRegistry.json b/deployments/mumbai/AvailableRootsRegistry.json new file mode 100644 index 0000000..95f4088 --- /dev/null +++ b/deployments/mumbai/AvailableRootsRegistry.json @@ -0,0 +1,493 @@ +{ + "address": "0x2c17e335d131dfd21238475Dd545B9B29Fb5A27D", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CannotRegisterForZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "CannotUnregisterForZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "RegisteredRootForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "attester", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "RegisteredRootForAttester", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "UnregisteredRootForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "attester", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "UnregisteredRootForAttester", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "_roots", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "attester", + "type": "address" + }, + { + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "isRootAvailableForAttester", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "isRootAvailableForMe", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "registerRootForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "attester", + "type": "address" + }, + { + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "registerRootForAttester", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "unregisterRootForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "attester", + "type": "address" + }, + { + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "unregisterRootForAttester", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x0D12CeBa1e25784731266625c9d5157A9c9B5934", + "transactionIndex": 1, + "gasUsed": "529059", + "logsBloom": "0x000000000000000200000000000000000000000000000000008000000000000000000000000000000000000000000000000080000000000000000000000000000000000008004000000000000000008000010000000000000001000000000000000000000200000000000000000008000000000000000000800000000000004000000000000000000000000000000000000000100000000000000000000080002000000000000000a0000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0x6d99ee69f1de7d640e0889da304d25a2564934c3aa1a59fea638b34454fe9b17", + "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 28600011, + "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", + "address": "0x0D12CeBa1e25784731266625c9d5157A9c9B5934", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 12, + "blockHash": "0x6d99ee69f1de7d640e0889da304d25a2564934c3aa1a59fea638b34454fe9b17" + }, + { + "transactionIndex": 1, + "blockNumber": 28600011, + "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", + "address": "0x0D12CeBa1e25784731266625c9d5157A9c9B5934", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 13, + "blockHash": "0x6d99ee69f1de7d640e0889da304d25a2564934c3aa1a59fea638b34454fe9b17" + }, + { + "transactionIndex": 1, + "blockNumber": 28600011, + "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x000000000000000000000000000000000000000000000000000dee53b1062d02000000000000000000000000000000000000000000000000869369f29efe28c100000000000000000000000000000000000000000000167a22046d5473d41b2700000000000000000000000000000000000000000000000086857b9eedf7fbbf00000000000000000000000000000000000000000000167a22125ba824da4829", + "logIndex": 14, + "blockHash": "0x6d99ee69f1de7d640e0889da304d25a2564934c3aa1a59fea638b34454fe9b17" + } + ], + "blockNumber": 28600011, + "cumulativeGasUsed": "944562", + "status": 1, + "byzantium": true + }, + "args": [ + "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6" + ], + "numDeployments": 2, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CannotRegisterForZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotUnregisterForZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"RegisteredRootForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"attester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"RegisteredRootForAttester\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"UnregisteredRootForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"attester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"UnregisteredRootForAttester\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"_roots\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attester\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"isRootAvailableForAttester\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"isRootAvailableForMe\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"registerRootForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attester\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"registerRootForAttester\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"unregisterRootForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attester\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"unregisterRootForAttester\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor\",\"params\":{\"owner\":\"Owner of the contract, can register/ unregister roots\"}},\"initialize(address)\":{\"details\":\"Initializes the contract, to be called by the proxy delegating calls to this implementation\",\"params\":{\"owner\":\"Owner of the contract, can update public key and address\"}},\"isRootAvailableForAttester(address,uint256)\":{\"details\":\"Initializes the contract, to be called by the proxy delegating calls to this implementation\",\"params\":{\"attester\":\"Owner of the contract, can update public key and address\",\"root\":\"Owner of the contract, can update public key and address\"}},\"isRootAvailableForMe(uint256)\":{\"details\":\"returns whether a root is available for a caller (msg.sender)\",\"params\":{\"root\":\"root to check whether it is registered for me or not\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"registerRootForAll(uint256)\":{\"details\":\"Registers a root, available for all contracts\",\"params\":{\"root\":\"Root to register\"}},\"registerRootForAttester(address,uint256)\":{\"details\":\"Register a root available for an attester\",\"params\":{\"attester\":\"Attester which will have the root available\",\"root\":\"Root to register\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unregisterRootForAll(uint256)\":{\"details\":\"Unregister a root, available for all contracts\",\"params\":{\"root\":\"Root to unregister\"}},\"unregisterRootForAttester(address,uint256)\":{\"details\":\"Unregister a root for an attester\",\"params\":{\"attester\":\"Attester which will no longer have the root available\",\"root\":\"Root to unregister\"}}},\"title\":\"Attesters Groups Registry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"This contract stores that data required by attesters to be available so they can verify user claims This contract is deployed behind a proxy and this implementation is focused on storing merkle roots For more information: https://available-roots-registry.docs.sismo.io*\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/periphery/utils/AvailableRootsRegistry.sol\":\"AvailableRootsRegistry\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() initializer {}\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\\n // contract may have been reentered.\\n require(_initializing ? _isConstructor() : !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} modifier, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n function _isConstructor() private view returns (bool) {\\n return !Address.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x4823752b07b8ea4ca971b217e39457930e7cb103c2c91e2a29729e5ca907e4f0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/periphery/utils/AvailableRootsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {IAvailableRootsRegistry} from './interfaces/IAvailableRootsRegistry.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\n\\n/**\\n * @title Attesters Groups Registry\\n * @author Sismo\\n * @notice This contract stores that data required by attesters to be available so they can verify user claims\\n * This contract is deployed behind a proxy and this implementation is focused on storing merkle roots\\n * For more information: https://available-roots-registry.docs.sismo.io\\n *\\n **/\\ncontract AvailableRootsRegistry is IAvailableRootsRegistry, Initializable, Ownable {\\n mapping(address => mapping(uint256 => bool)) public _roots;\\n\\n /**\\n * @dev Constructor\\n * @param owner Owner of the contract, can register/ unregister roots\\n */\\n constructor(address owner) {\\n initialize(owner);\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n */\\n function initialize(address owner) public initializer {\\n _transferOwnership(owner);\\n }\\n\\n /**\\n * @dev Register a root available for an attester\\n * @param attester Attester which will have the root available\\n * @param root Root to register\\n */\\n function registerRootForAttester(address attester, uint256 root) external onlyOwner {\\n if (attester == address(0)) revert CannotRegisterForZeroAddress();\\n _registerRootForAttester(attester, root);\\n }\\n\\n /**\\n * @dev Unregister a root for an attester\\n * @param attester Attester which will no longer have the root available\\n * @param root Root to unregister\\n */\\n function unregisterRootForAttester(address attester, uint256 root) external onlyOwner {\\n if (attester == address(0)) revert CannotUnregisterForZeroAddress();\\n _unregisterRootForAttester(attester, root);\\n }\\n\\n /**\\n * @dev Registers a root, available for all contracts\\n * @param root Root to register\\n */\\n function registerRootForAll(uint256 root) external onlyOwner {\\n _registerRootForAttester(address(0), root);\\n }\\n\\n /**\\n * @dev Unregister a root, available for all contracts\\n * @param root Root to unregister\\n */\\n function unregisterRootForAll(uint256 root) external onlyOwner {\\n _unregisterRootForAttester(address(0), root);\\n }\\n\\n /**\\n * @dev returns whether a root is available for a caller (msg.sender)\\n * @param root root to check whether it is registered for me or not\\n */\\n function isRootAvailableForMe(uint256 root) external view returns (bool) {\\n return _roots[_msgSender()][root] || _roots[address(0)][root];\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param attester Owner of the contract, can update public key and address\\n * @param root Owner of the contract, can update public key and address\\n */\\n function isRootAvailableForAttester(address attester, uint256 root) external view returns (bool) {\\n return _roots[attester][root] || _roots[address(0)][root];\\n }\\n\\n function _registerRootForAttester(address attester, uint256 root) internal {\\n _roots[attester][root] = true;\\n if (attester == address(0)) {\\n emit RegisteredRootForAll(root);\\n } else {\\n emit RegisteredRootForAttester(attester, root);\\n }\\n }\\n\\n function _unregisterRootForAttester(address attester, uint256 root) internal {\\n _roots[attester][root] = false;\\n if (attester == address(0)) {\\n emit UnregisteredRootForAll(root);\\n } else {\\n emit UnregisteredRootForAttester(attester, root);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9329ecaf60ffe978c8ab4360e0a8f9bd36e2549e89d672dd39ae80f9a562f9a9\",\"license\":\"MIT\"},\"contracts/periphery/utils/interfaces/IAvailableRootsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title IAvailableRootsRegistry\\n * @author Sismo\\n * @notice Interface for (Merkle) Roots Registry\\n */\\ninterface IAvailableRootsRegistry {\\n event RegisteredRootForAttester(address attester, uint256 root);\\n event RegisteredRootForAll(uint256 root);\\n event UnregisteredRootForAttester(address attester, uint256 root);\\n event UnregisteredRootForAll(uint256 root);\\n\\n error CannotRegisterForZeroAddress();\\n error CannotUnregisterForZeroAddress();\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n */\\n function initialize(address owner) external;\\n\\n /**\\n * @dev Register a root available for an attester\\n * @param attester Attester which will have the root available\\n * @param root Root to register\\n */\\n function registerRootForAttester(address attester, uint256 root) external;\\n\\n /**\\n * @dev Unregister a root for an attester\\n * @param attester Attester which will no longer have the root available\\n * @param root Root to unregister\\n */\\n function unregisterRootForAttester(address attester, uint256 root) external;\\n\\n /**\\n * @dev Registers a root, available for all contracts\\n * @param root Root to register\\n */\\n function registerRootForAll(uint256 root) external;\\n\\n /**\\n * @dev Unregister a root, available for all contracts\\n * @param root Root to unregister\\n */\\n function unregisterRootForAll(uint256 root) external;\\n\\n /**\\n * @dev returns whether a root is available for a caller (msg.sender)\\n * @param root root to check whether it is registered for me or not\\n */\\n function isRootAvailableForMe(uint256 root) external view returns (bool);\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param attester Owner of the contract, can update public key and address\\n * @param root Owner of the contract, can update public key and address\\n */\\n function isRootAvailableForAttester(address attester, uint256 root) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x87f5035b58936a8458a22f3cf1b3865bd798813310d86af41af74680978c97c8\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516109d63803806109d683398101604081905261002f91610197565b61003833610047565b610041816100a2565b506101c7565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054610100900460ff166100bd5760005460ff16156100c5565b6100c561016d565b61012c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801561014e576000805461ffff19166101011790555b61015782610047565b8015610169576000805461ff00191690555b5050565b60006101823061018860201b6105691760201c565b15905090565b6001600160a01b03163b151590565b6000602082840312156101a957600080fd5b81516001600160a01b03811681146101c057600080fd5b9392505050565b610800806101d66000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063be4a605611610071578063be4a60561461014b578063c4d66de81461015e578063e5e477a014610171578063ebea45cb14610184578063f2fde38b14610197578063fe7e7750146101aa57600080fd5b80632f56be56146100ae5780634e473f8f146100c3578063715018a6146100eb57806380b404ce146100f35780638da5cb5b14610121575b600080fd5b6100c16100bc366004610737565b6101bd565b005b6100d66100d1366004610737565b61022c565b60405190151581526020015b60405180910390f35b6100c1610292565b6100d6610101366004610737565b600160209081526000928352604080842090915290825290205460ff1681565b6000546201000090046001600160a01b03166040516001600160a01b0390911681526020016100e2565b6100c1610159366004610761565b6102cf565b6100c161016c36600461077a565b61030e565b6100d661017f366004610761565b6103d0565b6100c1610192366004610737565b61042c565b6100c16101a536600461077a565b61048e565b6100c16101b8366004610761565b61052d565b6000546001600160a01b03620100009091041633146101f75760405162461bcd60e51b81526004016101ee90610795565b60405180910390fd5b6001600160a01b03821661021e57604051639e95e88b60e01b815260040160405180910390fd5b6102288282610578565b5050565b6001600160a01b038216600090815260016020908152604080832084845290915281205460ff168061028b575060008281527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff165b9392505050565b6000546001600160a01b03620100009091041633146102c35760405162461bcd60e51b81526004016101ee90610795565b6102cd6000610622565b565b6000546001600160a01b03620100009091041633146103005760405162461bcd60e51b81526004016101ee90610795565b61030b600082610578565b50565b600054610100900460ff166103295760005460ff161561032d565b303b155b6103905760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016101ee565b600054610100900460ff161580156103b2576000805461ffff19166101011790555b6103bb82610622565b8015610228576000805461ff00191690555050565b33600090815260016020908152604080832084845290915281205460ff1680610426575060008281527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff165b92915050565b6000546001600160a01b036201000090910416331461045d5760405162461bcd60e51b81526004016101ee90610795565b6001600160a01b03821661048457604051631b25a00160e31b815260040160405180910390fd5b610228828261067d565b6000546001600160a01b03620100009091041633146104bf5760405162461bcd60e51b81526004016101ee90610795565b6001600160a01b0381166105245760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101ee565b61030b81610622565b6000546001600160a01b036201000090910416331461055e5760405162461bcd60e51b81526004016101ee90610795565b61030b60008261067d565b6001600160a01b03163b151590565b6001600160a01b0382166000818152600160208181526040808420868552909152909120805460ff191690911790556105e3576040518181527f22f0a171f00eeea3af5276d1f77587471dcc3bde32d62560046549b34bacd38a906020015b60405180910390a15050565b604080516001600160a01b0384168152602081018390527f21cdff046578afe71b78f95ac4891306af3a9b9eb71e2f0ef380b35b487d2f1291016105d7565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6001600160a01b03821660008181526001602090815260408083208584529091529020805460ff191690556106dc576040518181527f7261c2abe5e576aac50024de639315f10783f67935bf118bbb49b33c20ef70ef906020016105d7565b604080516001600160a01b0384168152602081018390527fba8195cc62a4086b7cd93d22db90e43ae42d8b5febd8c66b3453771e455b7a3391016105d7565b80356001600160a01b038116811461073257600080fd5b919050565b6000806040838503121561074a57600080fd5b6107538361071b565b946020939093013593505050565b60006020828403121561077357600080fd5b5035919050565b60006020828403121561078c57600080fd5b61028b8261071b565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea26469706673582212205a26ea118c217ce3529f4b96f78e8ef84c499fad8c74290b7dfd242f9392407c64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063be4a605611610071578063be4a60561461014b578063c4d66de81461015e578063e5e477a014610171578063ebea45cb14610184578063f2fde38b14610197578063fe7e7750146101aa57600080fd5b80632f56be56146100ae5780634e473f8f146100c3578063715018a6146100eb57806380b404ce146100f35780638da5cb5b14610121575b600080fd5b6100c16100bc366004610737565b6101bd565b005b6100d66100d1366004610737565b61022c565b60405190151581526020015b60405180910390f35b6100c1610292565b6100d6610101366004610737565b600160209081526000928352604080842090915290825290205460ff1681565b6000546201000090046001600160a01b03166040516001600160a01b0390911681526020016100e2565b6100c1610159366004610761565b6102cf565b6100c161016c36600461077a565b61030e565b6100d661017f366004610761565b6103d0565b6100c1610192366004610737565b61042c565b6100c16101a536600461077a565b61048e565b6100c16101b8366004610761565b61052d565b6000546001600160a01b03620100009091041633146101f75760405162461bcd60e51b81526004016101ee90610795565b60405180910390fd5b6001600160a01b03821661021e57604051639e95e88b60e01b815260040160405180910390fd5b6102288282610578565b5050565b6001600160a01b038216600090815260016020908152604080832084845290915281205460ff168061028b575060008281527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff165b9392505050565b6000546001600160a01b03620100009091041633146102c35760405162461bcd60e51b81526004016101ee90610795565b6102cd6000610622565b565b6000546001600160a01b03620100009091041633146103005760405162461bcd60e51b81526004016101ee90610795565b61030b600082610578565b50565b600054610100900460ff166103295760005460ff161561032d565b303b155b6103905760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016101ee565b600054610100900460ff161580156103b2576000805461ffff19166101011790555b6103bb82610622565b8015610228576000805461ff00191690555050565b33600090815260016020908152604080832084845290915281205460ff1680610426575060008281527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff165b92915050565b6000546001600160a01b036201000090910416331461045d5760405162461bcd60e51b81526004016101ee90610795565b6001600160a01b03821661048457604051631b25a00160e31b815260040160405180910390fd5b610228828261067d565b6000546001600160a01b03620100009091041633146104bf5760405162461bcd60e51b81526004016101ee90610795565b6001600160a01b0381166105245760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101ee565b61030b81610622565b6000546001600160a01b036201000090910416331461055e5760405162461bcd60e51b81526004016101ee90610795565b61030b60008261067d565b6001600160a01b03163b151590565b6001600160a01b0382166000818152600160208181526040808420868552909152909120805460ff191690911790556105e3576040518181527f22f0a171f00eeea3af5276d1f77587471dcc3bde32d62560046549b34bacd38a906020015b60405180910390a15050565b604080516001600160a01b0384168152602081018390527f21cdff046578afe71b78f95ac4891306af3a9b9eb71e2f0ef380b35b487d2f1291016105d7565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6001600160a01b03821660008181526001602090815260408083208584529091529020805460ff191690556106dc576040518181527f7261c2abe5e576aac50024de639315f10783f67935bf118bbb49b33c20ef70ef906020016105d7565b604080516001600160a01b0384168152602081018390527fba8195cc62a4086b7cd93d22db90e43ae42d8b5febd8c66b3453771e455b7a3391016105d7565b80356001600160a01b038116811461073257600080fd5b919050565b6000806040838503121561074a57600080fd5b6107538361071b565b946020939093013593505050565b60006020828403121561077357600080fd5b5035919050565b60006020828403121561078c57600080fd5b61028b8261071b565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea26469706673582212205a26ea118c217ce3529f4b96f78e8ef84c499fad8c74290b7dfd242f9392407c64736f6c634300080e0033", + "devdoc": { + "author": "Sismo", + "kind": "dev", + "methods": { + "constructor": { + "details": "Constructor", + "params": { + "owner": "Owner of the contract, can register/ unregister roots" + } + }, + "initialize(address)": { + "details": "Initializes the contract, to be called by the proxy delegating calls to this implementation", + "params": { + "owner": "Owner of the contract, can update public key and address" + } + }, + "isRootAvailableForAttester(address,uint256)": { + "details": "Initializes the contract, to be called by the proxy delegating calls to this implementation", + "params": { + "attester": "Owner of the contract, can update public key and address", + "root": "Owner of the contract, can update public key and address" + } + }, + "isRootAvailableForMe(uint256)": { + "details": "returns whether a root is available for a caller (msg.sender)", + "params": { + "root": "root to check whether it is registered for me or not" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "registerRootForAll(uint256)": { + "details": "Registers a root, available for all contracts", + "params": { + "root": "Root to register" + } + }, + "registerRootForAttester(address,uint256)": { + "details": "Register a root available for an attester", + "params": { + "attester": "Attester which will have the root available", + "root": "Root to register" + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "unregisterRootForAll(uint256)": { + "details": "Unregister a root, available for all contracts", + "params": { + "root": "Root to unregister" + } + }, + "unregisterRootForAttester(address,uint256)": { + "details": "Unregister a root for an attester", + "params": { + "attester": "Attester which will no longer have the root available", + "root": "Root to unregister" + } + } + }, + "title": "Attesters Groups Registry", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "This contract stores that data required by attesters to be available so they can verify user claims This contract is deployed behind a proxy and this implementation is focused on storing merkle roots For more information: https://available-roots-registry.docs.sismo.io*", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 936, + "contract": "contracts/periphery/utils/AvailableRootsRegistry.sol:AvailableRootsRegistry", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 939, + "contract": "contracts/periphery/utils/AvailableRootsRegistry.sol:AvailableRootsRegistry", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 389, + "contract": "contracts/periphery/utils/AvailableRootsRegistry.sol:AvailableRootsRegistry", + "label": "_owner", + "offset": 2, + "slot": "0", + "type": "t_address" + }, + { + "astId": 12620, + "contract": "contracts/periphery/utils/AvailableRootsRegistry.sol:AvailableRootsRegistry", + "label": "_roots", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_bool))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint256 => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_bool)" + }, + "t_mapping(t_uint256,t_bool)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/AvailableRootsRegistryImplem.json b/deployments/mumbai/AvailableRootsRegistryImplem.json new file mode 100644 index 0000000..342b3a9 --- /dev/null +++ b/deployments/mumbai/AvailableRootsRegistryImplem.json @@ -0,0 +1,493 @@ +{ + "address": "0x0D12CeBa1e25784731266625c9d5157A9c9B5934", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CannotRegisterForZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "CannotUnregisterForZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "RegisteredRootForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "attester", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "RegisteredRootForAttester", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "UnregisteredRootForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "attester", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "UnregisteredRootForAttester", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "_roots", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "attester", + "type": "address" + }, + { + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "isRootAvailableForAttester", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "isRootAvailableForMe", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "registerRootForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "attester", + "type": "address" + }, + { + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "registerRootForAttester", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "unregisterRootForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "attester", + "type": "address" + }, + { + "internalType": "uint256", + "name": "root", + "type": "uint256" + } + ], + "name": "unregisterRootForAttester", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x0D12CeBa1e25784731266625c9d5157A9c9B5934", + "transactionIndex": 1, + "gasUsed": "529059", + "logsBloom": "0x000000000000000200000000000000000000000000000000008000000000000000000000000000000000000000000000000080000000000000000000000000000000000008004000000000000000008000010000000000000001000000000000000000000200000000000000000008000000000000000000800000000000004000000000000000000000000000000000000000100000000000000000000080002000000000000000a0000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0x6d99ee69f1de7d640e0889da304d25a2564934c3aa1a59fea638b34454fe9b17", + "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 28600011, + "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", + "address": "0x0D12CeBa1e25784731266625c9d5157A9c9B5934", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 12, + "blockHash": "0x6d99ee69f1de7d640e0889da304d25a2564934c3aa1a59fea638b34454fe9b17" + }, + { + "transactionIndex": 1, + "blockNumber": 28600011, + "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", + "address": "0x0D12CeBa1e25784731266625c9d5157A9c9B5934", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 13, + "blockHash": "0x6d99ee69f1de7d640e0889da304d25a2564934c3aa1a59fea638b34454fe9b17" + }, + { + "transactionIndex": 1, + "blockNumber": 28600011, + "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x000000000000000000000000000000000000000000000000000dee53b1062d02000000000000000000000000000000000000000000000000869369f29efe28c100000000000000000000000000000000000000000000167a22046d5473d41b2700000000000000000000000000000000000000000000000086857b9eedf7fbbf00000000000000000000000000000000000000000000167a22125ba824da4829", + "logIndex": 14, + "blockHash": "0x6d99ee69f1de7d640e0889da304d25a2564934c3aa1a59fea638b34454fe9b17" + } + ], + "blockNumber": 28600011, + "cumulativeGasUsed": "944562", + "status": 1, + "byzantium": true + }, + "args": [ + "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6" + ], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CannotRegisterForZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotUnregisterForZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"RegisteredRootForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"attester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"RegisteredRootForAttester\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"UnregisteredRootForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"attester\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"UnregisteredRootForAttester\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"_roots\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attester\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"isRootAvailableForAttester\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"isRootAvailableForMe\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"registerRootForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attester\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"registerRootForAttester\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"unregisterRootForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attester\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"root\",\"type\":\"uint256\"}],\"name\":\"unregisterRootForAttester\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor\",\"params\":{\"owner\":\"Owner of the contract, can register/ unregister roots\"}},\"initialize(address)\":{\"details\":\"Initializes the contract, to be called by the proxy delegating calls to this implementation\",\"params\":{\"owner\":\"Owner of the contract, can update public key and address\"}},\"isRootAvailableForAttester(address,uint256)\":{\"details\":\"Initializes the contract, to be called by the proxy delegating calls to this implementation\",\"params\":{\"attester\":\"Owner of the contract, can update public key and address\",\"root\":\"Owner of the contract, can update public key and address\"}},\"isRootAvailableForMe(uint256)\":{\"details\":\"returns whether a root is available for a caller (msg.sender)\",\"params\":{\"root\":\"root to check whether it is registered for me or not\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"registerRootForAll(uint256)\":{\"details\":\"Registers a root, available for all contracts\",\"params\":{\"root\":\"Root to register\"}},\"registerRootForAttester(address,uint256)\":{\"details\":\"Register a root available for an attester\",\"params\":{\"attester\":\"Attester which will have the root available\",\"root\":\"Root to register\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unregisterRootForAll(uint256)\":{\"details\":\"Unregister a root, available for all contracts\",\"params\":{\"root\":\"Root to unregister\"}},\"unregisterRootForAttester(address,uint256)\":{\"details\":\"Unregister a root for an attester\",\"params\":{\"attester\":\"Attester which will no longer have the root available\",\"root\":\"Root to unregister\"}}},\"title\":\"Attesters Groups Registry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"This contract stores that data required by attesters to be available so they can verify user claims This contract is deployed behind a proxy and this implementation is focused on storing merkle roots For more information: https://available-roots-registry.docs.sismo.io*\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/periphery/utils/AvailableRootsRegistry.sol\":\"AvailableRootsRegistry\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() initializer {}\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\\n // contract may have been reentered.\\n require(_initializing ? _isConstructor() : !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} modifier, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n function _isConstructor() private view returns (bool) {\\n return !Address.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x4823752b07b8ea4ca971b217e39457930e7cb103c2c91e2a29729e5ca907e4f0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/periphery/utils/AvailableRootsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {IAvailableRootsRegistry} from './interfaces/IAvailableRootsRegistry.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\n\\n/**\\n * @title Attesters Groups Registry\\n * @author Sismo\\n * @notice This contract stores that data required by attesters to be available so they can verify user claims\\n * This contract is deployed behind a proxy and this implementation is focused on storing merkle roots\\n * For more information: https://available-roots-registry.docs.sismo.io\\n *\\n **/\\ncontract AvailableRootsRegistry is IAvailableRootsRegistry, Initializable, Ownable {\\n mapping(address => mapping(uint256 => bool)) public _roots;\\n\\n /**\\n * @dev Constructor\\n * @param owner Owner of the contract, can register/ unregister roots\\n */\\n constructor(address owner) {\\n initialize(owner);\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n */\\n function initialize(address owner) public initializer {\\n _transferOwnership(owner);\\n }\\n\\n /**\\n * @dev Register a root available for an attester\\n * @param attester Attester which will have the root available\\n * @param root Root to register\\n */\\n function registerRootForAttester(address attester, uint256 root) external onlyOwner {\\n if (attester == address(0)) revert CannotRegisterForZeroAddress();\\n _registerRootForAttester(attester, root);\\n }\\n\\n /**\\n * @dev Unregister a root for an attester\\n * @param attester Attester which will no longer have the root available\\n * @param root Root to unregister\\n */\\n function unregisterRootForAttester(address attester, uint256 root) external onlyOwner {\\n if (attester == address(0)) revert CannotUnregisterForZeroAddress();\\n _unregisterRootForAttester(attester, root);\\n }\\n\\n /**\\n * @dev Registers a root, available for all contracts\\n * @param root Root to register\\n */\\n function registerRootForAll(uint256 root) external onlyOwner {\\n _registerRootForAttester(address(0), root);\\n }\\n\\n /**\\n * @dev Unregister a root, available for all contracts\\n * @param root Root to unregister\\n */\\n function unregisterRootForAll(uint256 root) external onlyOwner {\\n _unregisterRootForAttester(address(0), root);\\n }\\n\\n /**\\n * @dev returns whether a root is available for a caller (msg.sender)\\n * @param root root to check whether it is registered for me or not\\n */\\n function isRootAvailableForMe(uint256 root) external view returns (bool) {\\n return _roots[_msgSender()][root] || _roots[address(0)][root];\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param attester Owner of the contract, can update public key and address\\n * @param root Owner of the contract, can update public key and address\\n */\\n function isRootAvailableForAttester(address attester, uint256 root) external view returns (bool) {\\n return _roots[attester][root] || _roots[address(0)][root];\\n }\\n\\n function _registerRootForAttester(address attester, uint256 root) internal {\\n _roots[attester][root] = true;\\n if (attester == address(0)) {\\n emit RegisteredRootForAll(root);\\n } else {\\n emit RegisteredRootForAttester(attester, root);\\n }\\n }\\n\\n function _unregisterRootForAttester(address attester, uint256 root) internal {\\n _roots[attester][root] = false;\\n if (attester == address(0)) {\\n emit UnregisteredRootForAll(root);\\n } else {\\n emit UnregisteredRootForAttester(attester, root);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9329ecaf60ffe978c8ab4360e0a8f9bd36e2549e89d672dd39ae80f9a562f9a9\",\"license\":\"MIT\"},\"contracts/periphery/utils/interfaces/IAvailableRootsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title IAvailableRootsRegistry\\n * @author Sismo\\n * @notice Interface for (Merkle) Roots Registry\\n */\\ninterface IAvailableRootsRegistry {\\n event RegisteredRootForAttester(address attester, uint256 root);\\n event RegisteredRootForAll(uint256 root);\\n event UnregisteredRootForAttester(address attester, uint256 root);\\n event UnregisteredRootForAll(uint256 root);\\n\\n error CannotRegisterForZeroAddress();\\n error CannotUnregisterForZeroAddress();\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n */\\n function initialize(address owner) external;\\n\\n /**\\n * @dev Register a root available for an attester\\n * @param attester Attester which will have the root available\\n * @param root Root to register\\n */\\n function registerRootForAttester(address attester, uint256 root) external;\\n\\n /**\\n * @dev Unregister a root for an attester\\n * @param attester Attester which will no longer have the root available\\n * @param root Root to unregister\\n */\\n function unregisterRootForAttester(address attester, uint256 root) external;\\n\\n /**\\n * @dev Registers a root, available for all contracts\\n * @param root Root to register\\n */\\n function registerRootForAll(uint256 root) external;\\n\\n /**\\n * @dev Unregister a root, available for all contracts\\n * @param root Root to unregister\\n */\\n function unregisterRootForAll(uint256 root) external;\\n\\n /**\\n * @dev returns whether a root is available for a caller (msg.sender)\\n * @param root root to check whether it is registered for me or not\\n */\\n function isRootAvailableForMe(uint256 root) external view returns (bool);\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param attester Owner of the contract, can update public key and address\\n * @param root Owner of the contract, can update public key and address\\n */\\n function isRootAvailableForAttester(address attester, uint256 root) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x87f5035b58936a8458a22f3cf1b3865bd798813310d86af41af74680978c97c8\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506040516109d63803806109d683398101604081905261002f91610197565b61003833610047565b610041816100a2565b506101c7565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054610100900460ff166100bd5760005460ff16156100c5565b6100c561016d565b61012c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801561014e576000805461ffff19166101011790555b61015782610047565b8015610169576000805461ff00191690555b5050565b60006101823061018860201b6105691760201c565b15905090565b6001600160a01b03163b151590565b6000602082840312156101a957600080fd5b81516001600160a01b03811681146101c057600080fd5b9392505050565b610800806101d66000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063be4a605611610071578063be4a60561461014b578063c4d66de81461015e578063e5e477a014610171578063ebea45cb14610184578063f2fde38b14610197578063fe7e7750146101aa57600080fd5b80632f56be56146100ae5780634e473f8f146100c3578063715018a6146100eb57806380b404ce146100f35780638da5cb5b14610121575b600080fd5b6100c16100bc366004610737565b6101bd565b005b6100d66100d1366004610737565b61022c565b60405190151581526020015b60405180910390f35b6100c1610292565b6100d6610101366004610737565b600160209081526000928352604080842090915290825290205460ff1681565b6000546201000090046001600160a01b03166040516001600160a01b0390911681526020016100e2565b6100c1610159366004610761565b6102cf565b6100c161016c36600461077a565b61030e565b6100d661017f366004610761565b6103d0565b6100c1610192366004610737565b61042c565b6100c16101a536600461077a565b61048e565b6100c16101b8366004610761565b61052d565b6000546001600160a01b03620100009091041633146101f75760405162461bcd60e51b81526004016101ee90610795565b60405180910390fd5b6001600160a01b03821661021e57604051639e95e88b60e01b815260040160405180910390fd5b6102288282610578565b5050565b6001600160a01b038216600090815260016020908152604080832084845290915281205460ff168061028b575060008281527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff165b9392505050565b6000546001600160a01b03620100009091041633146102c35760405162461bcd60e51b81526004016101ee90610795565b6102cd6000610622565b565b6000546001600160a01b03620100009091041633146103005760405162461bcd60e51b81526004016101ee90610795565b61030b600082610578565b50565b600054610100900460ff166103295760005460ff161561032d565b303b155b6103905760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016101ee565b600054610100900460ff161580156103b2576000805461ffff19166101011790555b6103bb82610622565b8015610228576000805461ff00191690555050565b33600090815260016020908152604080832084845290915281205460ff1680610426575060008281527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff165b92915050565b6000546001600160a01b036201000090910416331461045d5760405162461bcd60e51b81526004016101ee90610795565b6001600160a01b03821661048457604051631b25a00160e31b815260040160405180910390fd5b610228828261067d565b6000546001600160a01b03620100009091041633146104bf5760405162461bcd60e51b81526004016101ee90610795565b6001600160a01b0381166105245760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101ee565b61030b81610622565b6000546001600160a01b036201000090910416331461055e5760405162461bcd60e51b81526004016101ee90610795565b61030b60008261067d565b6001600160a01b03163b151590565b6001600160a01b0382166000818152600160208181526040808420868552909152909120805460ff191690911790556105e3576040518181527f22f0a171f00eeea3af5276d1f77587471dcc3bde32d62560046549b34bacd38a906020015b60405180910390a15050565b604080516001600160a01b0384168152602081018390527f21cdff046578afe71b78f95ac4891306af3a9b9eb71e2f0ef380b35b487d2f1291016105d7565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6001600160a01b03821660008181526001602090815260408083208584529091529020805460ff191690556106dc576040518181527f7261c2abe5e576aac50024de639315f10783f67935bf118bbb49b33c20ef70ef906020016105d7565b604080516001600160a01b0384168152602081018390527fba8195cc62a4086b7cd93d22db90e43ae42d8b5febd8c66b3453771e455b7a3391016105d7565b80356001600160a01b038116811461073257600080fd5b919050565b6000806040838503121561074a57600080fd5b6107538361071b565b946020939093013593505050565b60006020828403121561077357600080fd5b5035919050565b60006020828403121561078c57600080fd5b61028b8261071b565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea26469706673582212205a26ea118c217ce3529f4b96f78e8ef84c499fad8c74290b7dfd242f9392407c64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063be4a605611610071578063be4a60561461014b578063c4d66de81461015e578063e5e477a014610171578063ebea45cb14610184578063f2fde38b14610197578063fe7e7750146101aa57600080fd5b80632f56be56146100ae5780634e473f8f146100c3578063715018a6146100eb57806380b404ce146100f35780638da5cb5b14610121575b600080fd5b6100c16100bc366004610737565b6101bd565b005b6100d66100d1366004610737565b61022c565b60405190151581526020015b60405180910390f35b6100c1610292565b6100d6610101366004610737565b600160209081526000928352604080842090915290825290205460ff1681565b6000546201000090046001600160a01b03166040516001600160a01b0390911681526020016100e2565b6100c1610159366004610761565b6102cf565b6100c161016c36600461077a565b61030e565b6100d661017f366004610761565b6103d0565b6100c1610192366004610737565b61042c565b6100c16101a536600461077a565b61048e565b6100c16101b8366004610761565b61052d565b6000546001600160a01b03620100009091041633146101f75760405162461bcd60e51b81526004016101ee90610795565b60405180910390fd5b6001600160a01b03821661021e57604051639e95e88b60e01b815260040160405180910390fd5b6102288282610578565b5050565b6001600160a01b038216600090815260016020908152604080832084845290915281205460ff168061028b575060008281527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff165b9392505050565b6000546001600160a01b03620100009091041633146102c35760405162461bcd60e51b81526004016101ee90610795565b6102cd6000610622565b565b6000546001600160a01b03620100009091041633146103005760405162461bcd60e51b81526004016101ee90610795565b61030b600082610578565b50565b600054610100900460ff166103295760005460ff161561032d565b303b155b6103905760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016101ee565b600054610100900460ff161580156103b2576000805461ffff19166101011790555b6103bb82610622565b8015610228576000805461ff00191690555050565b33600090815260016020908152604080832084845290915281205460ff1680610426575060008281527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff165b92915050565b6000546001600160a01b036201000090910416331461045d5760405162461bcd60e51b81526004016101ee90610795565b6001600160a01b03821661048457604051631b25a00160e31b815260040160405180910390fd5b610228828261067d565b6000546001600160a01b03620100009091041633146104bf5760405162461bcd60e51b81526004016101ee90610795565b6001600160a01b0381166105245760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101ee565b61030b81610622565b6000546001600160a01b036201000090910416331461055e5760405162461bcd60e51b81526004016101ee90610795565b61030b60008261067d565b6001600160a01b03163b151590565b6001600160a01b0382166000818152600160208181526040808420868552909152909120805460ff191690911790556105e3576040518181527f22f0a171f00eeea3af5276d1f77587471dcc3bde32d62560046549b34bacd38a906020015b60405180910390a15050565b604080516001600160a01b0384168152602081018390527f21cdff046578afe71b78f95ac4891306af3a9b9eb71e2f0ef380b35b487d2f1291016105d7565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6001600160a01b03821660008181526001602090815260408083208584529091529020805460ff191690556106dc576040518181527f7261c2abe5e576aac50024de639315f10783f67935bf118bbb49b33c20ef70ef906020016105d7565b604080516001600160a01b0384168152602081018390527fba8195cc62a4086b7cd93d22db90e43ae42d8b5febd8c66b3453771e455b7a3391016105d7565b80356001600160a01b038116811461073257600080fd5b919050565b6000806040838503121561074a57600080fd5b6107538361071b565b946020939093013593505050565b60006020828403121561077357600080fd5b5035919050565b60006020828403121561078c57600080fd5b61028b8261071b565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea26469706673582212205a26ea118c217ce3529f4b96f78e8ef84c499fad8c74290b7dfd242f9392407c64736f6c634300080e0033", + "devdoc": { + "author": "Sismo", + "kind": "dev", + "methods": { + "constructor": { + "details": "Constructor", + "params": { + "owner": "Owner of the contract, can register/ unregister roots" + } + }, + "initialize(address)": { + "details": "Initializes the contract, to be called by the proxy delegating calls to this implementation", + "params": { + "owner": "Owner of the contract, can update public key and address" + } + }, + "isRootAvailableForAttester(address,uint256)": { + "details": "Initializes the contract, to be called by the proxy delegating calls to this implementation", + "params": { + "attester": "Owner of the contract, can update public key and address", + "root": "Owner of the contract, can update public key and address" + } + }, + "isRootAvailableForMe(uint256)": { + "details": "returns whether a root is available for a caller (msg.sender)", + "params": { + "root": "root to check whether it is registered for me or not" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "registerRootForAll(uint256)": { + "details": "Registers a root, available for all contracts", + "params": { + "root": "Root to register" + } + }, + "registerRootForAttester(address,uint256)": { + "details": "Register a root available for an attester", + "params": { + "attester": "Attester which will have the root available", + "root": "Root to register" + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "unregisterRootForAll(uint256)": { + "details": "Unregister a root, available for all contracts", + "params": { + "root": "Root to unregister" + } + }, + "unregisterRootForAttester(address,uint256)": { + "details": "Unregister a root for an attester", + "params": { + "attester": "Attester which will no longer have the root available", + "root": "Root to unregister" + } + } + }, + "title": "Attesters Groups Registry", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "This contract stores that data required by attesters to be available so they can verify user claims This contract is deployed behind a proxy and this implementation is focused on storing merkle roots For more information: https://available-roots-registry.docs.sismo.io*", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 936, + "contract": "contracts/periphery/utils/AvailableRootsRegistry.sol:AvailableRootsRegistry", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 939, + "contract": "contracts/periphery/utils/AvailableRootsRegistry.sol:AvailableRootsRegistry", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 389, + "contract": "contracts/periphery/utils/AvailableRootsRegistry.sol:AvailableRootsRegistry", + "label": "_owner", + "offset": 2, + "slot": "0", + "type": "t_address" + }, + { + "astId": 12620, + "contract": "contracts/periphery/utils/AvailableRootsRegistry.sol:AvailableRootsRegistry", + "label": "_roots", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_bool))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(uint256 => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_bool)" + }, + "t_mapping(t_uint256,t_bool)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/AvailableRootsRegistryProxy.json b/deployments/mumbai/AvailableRootsRegistryProxy.json new file mode 100644 index 0000000..844ebd4 --- /dev/null +++ b/deployments/mumbai/AvailableRootsRegistryProxy.json @@ -0,0 +1,264 @@ +{ + "address": "0x2c17e335d131dfd21238475Dd545B9B29Fb5A27D", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xbd75a6886538fc7e5f13d596ba5e843196688dfe148bddaa2cd83f45ed75a3e4", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x2c17e335d131dfd21238475Dd545B9B29Fb5A27D", + "transactionIndex": 86, + "gasUsed": "609954", + "logsBloom": "0x00000000000000020000004000000000400000000000000000800000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000002800001000000000000000100000000000000000004020000000000000000000800000000800000000080000000000000400000000000000000000000000000000000000010000000000000000000808000200000000000000020000000000000000001000000000000000000000000004000000220000000000001000000000000000000000400000000100000000020000000000000000000000000000001200400000000000000000020000000100000", + "blockHash": "0xd54ad40e9acd31c567b383cc55ee0d42882099c778bec3351db1be264cf8beec", + "transactionHash": "0xbd75a6886538fc7e5f13d596ba5e843196688dfe148bddaa2cd83f45ed75a3e4", + "logs": [ + { + "transactionIndex": 86, + "blockNumber": 28600012, + "transactionHash": "0xbd75a6886538fc7e5f13d596ba5e843196688dfe148bddaa2cd83f45ed75a3e4", + "address": "0x2c17e335d131dfd21238475Dd545B9B29Fb5A27D", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000000d12ceba1e25784731266625c9d5157a9c9b5934" + ], + "data": "0x", + "logIndex": 611, + "blockHash": "0xd54ad40e9acd31c567b383cc55ee0d42882099c778bec3351db1be264cf8beec" + }, + { + "transactionIndex": 86, + "blockNumber": 28600012, + "transactionHash": "0xbd75a6886538fc7e5f13d596ba5e843196688dfe148bddaa2cd83f45ed75a3e4", + "address": "0x2c17e335d131dfd21238475Dd545B9B29Fb5A27D", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 612, + "blockHash": "0xd54ad40e9acd31c567b383cc55ee0d42882099c778bec3351db1be264cf8beec" + }, + { + "transactionIndex": 86, + "blockNumber": 28600012, + "transactionHash": "0xbd75a6886538fc7e5f13d596ba5e843196688dfe148bddaa2cd83f45ed75a3e4", + "address": "0x2c17e335d131dfd21238475Dd545B9B29Fb5A27D", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000246e71bc2a257f4be9c7fad4664e6d7444844adc", + "logIndex": 613, + "blockHash": "0xd54ad40e9acd31c567b383cc55ee0d42882099c778bec3351db1be264cf8beec" + }, + { + "transactionIndex": 86, + "blockNumber": 28600012, + "transactionHash": "0xbd75a6886538fc7e5f13d596ba5e843196688dfe148bddaa2cd83f45ed75a3e4", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000000040c27d4399bb8000000000000000000000000000000000000000000000000863bd104985b63b100000000000000000000000000000000000000000000167a233fcec11a0769350000000000000000000000000000000000000000000000008637c4dcc421c7f900000000000000000000000000000000000000000000167a2343dae8ee4104ed", + "logIndex": 614, + "blockHash": "0xd54ad40e9acd31c567b383cc55ee0d42882099c778bec3351db1be264cf8beec" + } + ], + "blockNumber": 28600012, + "cumulativeGasUsed": "19982440", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0D12CeBa1e25784731266625c9d5157A9c9B5934", + "0x246E71bC2a257f4BE9C7fAD4664E6D7444844Adc", + "0xc4d66de8000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/periphery/utils/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0x0edeb16b9821ae2b16e9d69c383b38d3ad2fbb3e0c06cf809a0786d96e602551\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"contracts/periphery/utils/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n// Note: we just copied so that we can see the contract used\\npragma solidity ^0.8.14;\\n\\nimport {ERC1967Proxy} from '@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol';\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1));\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(''), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n ifAdmin\\n {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(\\n msg.sender != _getAdmin(),\\n 'TransparentUpgradeableProxy: admin cannot fallback to proxy target'\\n );\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0x0d943fb8814617343a244f762e791c664bb647e32d484ba94fe1958bac85f6dc\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000f2a38038062000f2a833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b60008051602062000ee3833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b60008051602062000ec383398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b6200022e1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e9838360405180606001604052806027815260200162000f036027913962000381565b9392505050565b60006200021a60008051602062000ec383398151915260001b6200046760201b620001ea1760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd60008051602062000ec383398151915260001b6200046760201b620001ea1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200025a1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd60008051602062000ee383398151915260001b6200046760201b620001ea1760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b61082b80620006986000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b5565b610118565b61005b6100933660046106d0565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b5565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107cf602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6104bb565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610368836104e3565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610523565b60606001600160a01b0384163b6104465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016102f5565b600080856001600160a01b031685604051610461919061077f565b600060405180830381855af49150503d806000811461049c576040519150601f19603f3d011682016040523d82523d6000602084013e6104a1565b606091505b50915091506104b18282866105cc565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b6104ec81610605565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105885760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105db575081610253565b8251156105eb5782518084602001fd5b8160405162461bcd60e51b81526004016102f5919061079b565b6001600160a01b0381163b6106725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105ab565b80356001600160a01b03811681146106b057600080fd5b919050565b6000602082840312156106c757600080fd5b61025382610699565b6000806000604084860312156106e557600080fd5b6106ee84610699565b9250602084013567ffffffffffffffff8082111561070b57600080fd5b818601915086601f83011261071f57600080fd5b81358181111561072e57600080fd5b87602082850101111561074057600080fd5b6020830194508093505050509250925092565b60005b8381101561076e578181015183820152602001610756565b838111156103845750506000910152565b60008251610791818460208701610753565b9190910192915050565b60208152600082518060208401526107ba816040850160208701610753565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200396e81b41a53c52a5f2bff0f6a830a500e30d67dcfc4c47e029fb4021c6775064736f6c634300080e0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b5565b610118565b61005b6100933660046106d0565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b5565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107cf602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6104bb565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610368836104e3565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610523565b60606001600160a01b0384163b6104465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016102f5565b600080856001600160a01b031685604051610461919061077f565b600060405180830381855af49150503d806000811461049c576040519150601f19603f3d011682016040523d82523d6000602084013e6104a1565b606091505b50915091506104b18282866105cc565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b6104ec81610605565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105885760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105db575081610253565b8251156105eb5782518084602001fd5b8160405162461bcd60e51b81526004016102f5919061079b565b6001600160a01b0381163b6106725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105ab565b80356001600160a01b03811681146106b057600080fd5b919050565b6000602082840312156106c757600080fd5b61025382610699565b6000806000604084860312156106e557600080fd5b6106ee84610699565b9250602084013567ffffffffffffffff8082111561070b57600080fd5b818601915086601f83011261071f57600080fd5b81358181111561072e57600080fd5b87602082850101111561074057600080fd5b6020830194508093505050509250925092565b60005b8381101561076e578181015183820152602001610756565b838111156103845750506000910152565b60008251610791818460208701610753565b9190910192915050565b60208152600082518060208401526107ba816040850160208701610753565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200396e81b41a53c52a5f2bff0f6a830a500e30d67dcfc4c47e029fb4021c6775064736f6c634300080e0033", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/Badges.json b/deployments/mumbai/Badges.json new file mode 100644 index 0000000..ab7fb5a --- /dev/null +++ b/deployments/mumbai/Badges.json @@ -0,0 +1,928 @@ +{ + "address": "0x5722fEa81027533721BA161964622271560da1aC", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "uri", + "type": "string" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BadgesNonTransferrable", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EVENT_TRIGGERER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAttestationsRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "uri", + "type": "string" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "attestationsRegistry", + "type": "address" + } + ], + "name": "setAttestationsRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "uri", + "type": "string" + } + ], + "name": "setUri", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "triggerTransferEvent", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x0d3279adfb61568ba781a5f7bccd57f2cf84159f78b3f970e75b70c7ea4b1cfa", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0xcA9EF6c891B3f045bd4a200029FCC1C38B65CCe3", + "transactionIndex": 4, + "gasUsed": "1831487", + "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000002000000000000000000000000000000000000000000000000000800000000000000000040100000000000001008000020000000000000000000800000000000000000080000000000000800000000000000000000000000000000000000010000000000000000000008000200000000000000000000000000000000000000000000000001040000000004000000000000000000001000000000000000000000000000100100000000020000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0x0af9a2dd68761829661b873d097ede6ced3d615512bdb4f50198cf22c0405cef", + "transactionHash": "0x0d3279adfb61568ba781a5f7bccd57f2cf84159f78b3f970e75b70c7ea4b1cfa", + "logs": [ + { + "transactionIndex": 4, + "blockNumber": 28599969, + "transactionHash": "0x0d3279adfb61568ba781a5f7bccd57f2cf84159f78b3f970e75b70c7ea4b1cfa", + "address": "0xcA9EF6c891B3f045bd4a200029FCC1C38B65CCe3", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 21, + "blockHash": "0x0af9a2dd68761829661b873d097ede6ced3d615512bdb4f50198cf22c0405cef" + }, + { + "transactionIndex": 4, + "blockNumber": 28599969, + "transactionHash": "0x0d3279adfb61568ba781a5f7bccd57f2cf84159f78b3f970e75b70c7ea4b1cfa", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000009c297721191000000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000000a08c4f0661f207b8ec10000000000000000000000000000000000000000000000008abd606d17d66f00000000000000000000000000000000000000000000000a08c4fa28b6928d1fc1", + "logIndex": 22, + "blockHash": "0x0af9a2dd68761829661b873d097ede6ced3d615512bdb4f50198cf22c0405cef" + } + ], + "blockNumber": 28599969, + "cumulativeGasUsed": "2577496", + "status": 1, + "byzantium": true + }, + "args": [ + "https://hub.staging.zikies.io/badges/mumbai/{id}.json", + "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6" + ], + "numDeployments": 2, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"BadgesNonTransferrable\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"name\":\"TransferBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"TransferSingle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"URI\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EVENT_TRIGGERER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"name\":\"balanceOfBatch\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAttestationsRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeBatchTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attestationsRegistry\",\"type\":\"address\"}],\"name\":\"setAttestationsRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"setUri\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"triggerTransferEvent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"uri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"balanceOf(address,uint256)\":{\"details\":\"Main function of the ERC1155 badge The balance of a user is equal to the value of the underlying attestation. attestationCollectionId == badgeId\",\"params\":{\"account\":\"Address to check badge balance (= value of attestation)\",\"id\":\"Badge Id to check (= attestationCollectionId)\"}},\"balanceOfBatch(address[],uint256[])\":{\"details\":\"See {IERC1155-balanceOfBatch}. Requirements: - `accounts` and `ids` must have the same length.\"},\"constructor\":{\"details\":\"Constructor\",\"params\":{\"owner\":\"Owner of the contract, super admin, can setup roles and update the attestation registry\",\"uri\":\"Uri for the metadata of badges\"}},\"getAttestationsRegistry()\":{\"details\":\"Getter of the attestations registry\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(string,address)\":{\"details\":\"Initializes the contract, to be called by the proxy delegating calls to this implementation\",\"params\":{\"owner\":\"Owner of the contract, super admin, can setup roles and update the attestation registry\",\"uri\":\"Uri for the metadata of badges\"}},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC1155-isApprovedForAll}.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\":{\"details\":\"See {IERC1155-safeBatchTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,uint256,bytes)\":{\"details\":\"See {IERC1155-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC1155-setApprovalForAll}.\"},\"setAttestationsRegistry(address)\":{\"details\":\"Set the attestations registry address. Can only be called by owner (default admin)\",\"params\":{\"attestationsRegistry\":\"new attestations registry address\"}},\"setUri(string)\":{\"details\":\"Set the URI. Can only be called by owner (default admin)\",\"params\":{\"uri\":\"new attestations registry address\"}},\"supportsInterface(bytes4)\":{\"details\":\"ERC165\"},\"triggerTransferEvent(address,address,address,uint256,uint256)\":{\"details\":\"Emits a TransferSingle event, so subgraphs and other off-chain apps relying on events can see badge minting/burning can only be called by address having the EVENT_TRIGGERER_ROLE (attestations registry address)\",\"params\":{\"from\":\"address(0) if minting, address of the badge holder if burning\",\"id\":\"badgeId for which to trigger the event\",\"operator\":\"who is calling the TransferEvent\",\"to\":\"address of the badge holder is minting, address(0) if burning\",\"value\":\"minted/burned balance\"}},\"uri(uint256)\":{\"details\":\"See {IERC1155MetadataURI-uri}. This implementation returns the same URI for *all* token types. It relies on the token type ID substitution mechanism https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. Clients calling this function must replace the `\\\\{id\\\\}` substring with the actual token type ID.\"}},\"title\":\"Badges contract\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Stateless, Non-transferrable ERC1155 contract. Reads balance from the values of attestations The associated attestations registry triggers TransferSingle events from this contract It allows badge \\\"shadow mints and burns\\\" to be caught by off-chain platforms For more information: https://badges.docs.sismo.io\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/core/Badges.sol\":\"Badges\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role, _msgSender());\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4a1a0ba12bf1a33f10d9fe226278cf59675c0b929d29e4da99658a079b27fb84\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() initializer {}\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\\n // contract may have been reentered.\\n require(_initializing ? _isConstructor() : !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} modifier, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n function _isConstructor() private view returns (bool) {\\n return !Address.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x4823752b07b8ea4ca971b217e39457930e7cb103c2c91e2a29729e5ca907e4f0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0xe68ed7fb8766ed1e888291f881e36b616037f852b37d96877045319ad298ba87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: balance query for the zero address\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\\n public\\n view\\n virtual\\n override\\n returns (uint256[] memory)\\n {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not owner nor approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: transfer caller is not owner nor approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(\\n address from,\\n uint256 id,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(\\n address from,\\n uint256[] memory ids,\\n uint256[] memory amounts\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits a {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(\\n address owner,\\n address operator,\\n bool approved\\n ) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x04d6d1342ece664085921a4fabc928a7bcf1cf2873fa81780f61a54dc2b9b66e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\\n external\\n view\\n returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0x8e93de94c9062ebc94fb7e2e3929b0781ac6a2b7772e2f7a59045861c93e5be9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\nimport \\\"../../../security/Pausable.sol\\\";\\n\\n/**\\n * @dev ERC1155 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Pausable is ERC1155, Pausable {\\n /**\\n * @dev See {ERC1155-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n require(!paused(), \\\"ERC1155Pausable: token transfer while paused\\\");\\n }\\n}\\n\",\"keccak256\":\"0xdad22b949de979bb2ad9001c044b2aeaacf8a25e3de09ed6f022a9469f936d5b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0x32c202bd28995dd20c4347b7c6467a6d3241c74c8ad3edcbb610cd9205916c45\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/core/Badges.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {ERC1155} from '@openzeppelin/contracts/token/ERC1155/ERC1155.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\nimport {ERC1155Pausable} from '@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol';\\nimport {AccessControl} from '@openzeppelin/contracts/access/AccessControl.sol';\\nimport {IAttestationsRegistry} from './interfaces/IAttestationsRegistry.sol';\\nimport {IBadges} from './interfaces/IBadges.sol';\\n\\n/**\\n * @title Badges contract\\n * @author Sismo\\n * @notice Stateless, Non-transferrable ERC1155 contract. Reads balance from the values of attestations\\n * The associated attestations registry triggers TransferSingle events from this contract\\n * It allows badge \\\"shadow mints and burns\\\" to be caught by off-chain platforms\\n * For more information: https://badges.docs.sismo.io\\n */\\ncontract Badges is IBadges, Initializable, AccessControl, ERC1155 {\\n IAttestationsRegistry internal _attestationsRegistry;\\n\\n bytes32 public constant EVENT_TRIGGERER_ROLE = keccak256('EVENT_TRIGGERER_ROLE');\\n\\n /**\\n * @dev Constructor\\n * @param uri Uri for the metadata of badges\\n * @param owner Owner of the contract, super admin, can setup roles and update the attestation registry\\n */\\n constructor(\\n string memory uri,\\n address owner // This is Sismo Frontend Contract\\n ) ERC1155(uri) {\\n initialize(uri, owner);\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param uri Uri for the metadata of badges\\n * @param owner Owner of the contract, super admin, can setup roles and update the attestation registry\\n */\\n function initialize(string memory uri, address owner) public initializer {\\n _setURI(uri);\\n _grantRole(DEFAULT_ADMIN_ROLE, owner);\\n }\\n\\n /**\\n * @dev Main function of the ERC1155 badge\\n * The balance of a user is equal to the value of the underlying attestation.\\n * attestationCollectionId == badgeId\\n * @param account Address to check badge balance (= value of attestation)\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function balanceOf(address account, uint256 id)\\n public\\n view\\n virtual\\n override(ERC1155, IBadges)\\n returns (uint256)\\n {\\n return _attestationsRegistry.getAttestationValue(id, account);\\n }\\n\\n /**\\n * @dev Emits a TransferSingle event, so subgraphs and other off-chain apps relying on events can see badge minting/burning\\n * can only be called by address having the EVENT_TRIGGERER_ROLE (attestations registry address)\\n * @param operator who is calling the TransferEvent\\n * @param from address(0) if minting, address of the badge holder if burning\\n * @param to address of the badge holder is minting, address(0) if burning\\n * @param id badgeId for which to trigger the event\\n * @param value minted/burned balance\\n */\\n function triggerTransferEvent(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 value\\n ) external onlyRole(EVENT_TRIGGERER_ROLE) {\\n emit TransferSingle(operator, from, to, id, value);\\n }\\n\\n /**\\n * @dev Set the attestations registry address. Can only be called by owner (default admin)\\n * @param attestationsRegistry new attestations registry address\\n */\\n function setAttestationsRegistry(address attestationsRegistry)\\n external\\n override\\n onlyRole(DEFAULT_ADMIN_ROLE)\\n {\\n _attestationsRegistry = IAttestationsRegistry(attestationsRegistry);\\n }\\n\\n /**\\n * @dev Set the URI. Can only be called by owner (default admin)\\n * @param uri new attestations registry address\\n */\\n function setUri(string memory uri) external override onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setURI(uri);\\n }\\n\\n /**\\n * @dev Getter of the attestations registry\\n */\\n function getAttestationsRegistry() external view override returns (address) {\\n return address(_attestationsRegistry);\\n }\\n\\n /**\\n * @dev ERC165\\n */\\n function supportsInterface(bytes4 interfaceId)\\n public\\n view\\n virtual\\n override(AccessControl, ERC1155)\\n returns (bool)\\n {\\n return super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Reverts, this is a non transferable ERC115 contract\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override {\\n revert BadgesNonTransferrable();\\n }\\n}\\n\",\"keccak256\":\"0xd28d7becc4275b5330249a48ecf5580b9f9f5c559e1a29a7c30be5caf23332ce\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttestationsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Attestation, AttestationData} from '../libs/Structs.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry {\\n event AttestationRecorded(Attestation attestation);\\n event AttestationDeleted(Attestation attestation);\\n\\n /**\\n * @dev Main function to be called by authorized issuers\\n * @param attestations Attestations to be recorded (creates a new one or overrides an existing one)\\n */\\n function recordAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Delete function to be called by authorized issuers\\n * @param attestations Attestations to be deleted\\n */\\n function deleteAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Returns whether a user has an attestation from a collection\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function hasAttestation(uint256 collectionId, address owner) external returns (bool);\\n\\n /**\\n * @dev Getter of the data of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationData(uint256 collectionId, address owner)\\n external\\n view\\n returns (AttestationData memory);\\n\\n /**\\n * @dev Getter of the value of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationValue(uint256 collectionId, address owner) external view returns (uint256);\\n\\n /**\\n * @dev Getter of the data of a specific attestation as tuple\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationDataTuple(uint256 collectionId, address owner)\\n external\\n view\\n returns (\\n address,\\n uint256,\\n uint32,\\n bytes memory\\n );\\n\\n /**\\n * @dev Getter of the extraData of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationExtraData(uint256 collectionId, address owner)\\n external\\n view\\n returns (bytes memory);\\n\\n /**\\n * @dev Getter of the issuer of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationIssuer(uint256 collectionId, address owner)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @dev Getter of the timestamp of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationTimestamp(uint256 collectionId, address owner)\\n external\\n view\\n returns (uint32);\\n\\n /**\\n * @dev Getter of the data of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationDataBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (AttestationData[] memory);\\n\\n /**\\n * @dev Getter of the values of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationValueBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xb5e25bd7e0372c9973e582fb7fe96318c145831a5452d8c79eb848a7464b0297\",\"license\":\"MIT\"},\"contracts/core/interfaces/IBadges.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title Interface for Badges contract\\n * @author Sismo\\n * @notice Stateless ERC1155 contract. Reads balance from the values of attestations\\n * The associated attestations registry triggers TransferSingle events from this contract\\n * It allows badge \\\"shadow mints and burns\\\" to be caught by off-chain platforms\\n */\\ninterface IBadges {\\n error BadgesNonTransferrable();\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param uri Uri for the metadata of badges\\n * @param owner Owner of the contract, super admin, can setup roles and update the attestation registry\\n */\\n function initialize(string memory uri, address owner) external;\\n\\n /**\\n * @dev Main function of the ERC1155 badge\\n * The balance of a user is equal to the value of the underlying attestation.\\n * attestationCollectionId == badgeId\\n * @param account Address to check badge balance (= value of attestation)\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev Emits a TransferSingle event, so subgraphs and other off-chain apps relying on events can see badge minting/burning\\n * can only be called by address having the EVENT_TRIGGERER_ROLE (attestations registry address)\\n * @param operator who is calling the TransferEvent\\n * @param from address(0) if minting, address of the badge holder if burning\\n * @param to address of the badge holder is minting, address(0) if burning\\n * @param id badgeId for which to trigger the event\\n * @param value minted/burned balance\\n */\\n function triggerTransferEvent(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 value\\n ) external;\\n\\n /**\\n * @dev Set the attestations registry address. Can only be called by owner (default admin)\\n * @param attestationsRegistry new attestations registry address\\n */\\n function setAttestationsRegistry(address attestationsRegistry) external;\\n\\n /**\\n * @dev Set the URI. Can only be called by owner (default admin)\\n * @param uri new attestations registry address\\n */\\n function setUri(string memory uri) external;\\n\\n /**\\n * @dev Getter of the attestations registry\\n */\\n function getAttestationsRegistry() external view returns (address);\\n}\\n\",\"keccak256\":\"0xbd279560345ab0f4d4b7f689e714f907522676fe86b17341db034b5a98799019\",\"license\":\"MIT\"},\"contracts/core/libs/Structs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title Attestations Registry State\\n * @author Sismo\\n * @notice This contract holds all of the storage variables and data\\n * structures used by the AttestationsRegistry and parent\\n * contracts.\\n */\\n\\n// User Attestation Request, can be made by any user\\n// The context of an Attestation Request is a specific attester contract\\n// Each attester has groups of accounts in its available data\\n// eg: for a specific attester:\\n// group 1 <=> accounts that sent txs on mainnet\\n// group 2 <=> accounts that sent txs on polygon\\n// eg: for another attester:\\n// group 1 <=> accounts that sent eth txs in 2022\\n// group 2 <=> accounts sent eth txs in 2021\\nstruct Request {\\n // implicit address attester;\\n // implicit uint256 chainId;\\n Claim[] claims;\\n address destination; // destination that will receive the end attestation\\n}\\n\\nstruct Claim {\\n uint256 groupId; // user claims to have an account in this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n bytes extraData; // arbitrary data, may be required by the attester to verify claims or generate a specific attestation\\n}\\n\\n/**\\n * @dev Attestation Struct. This is the struct receive as argument by the Attestation Registry.\\n * @param collectionId Attestation collection\\n * @param owner Attestation collection\\n * @param issuer Attestation collection\\n * @param value Attestation collection\\n * @param timestamp Attestation collection\\n * @param extraData Attestation collection\\n */\\nstruct Attestation {\\n // implicit uint256 chainId;\\n uint256 collectionId; // Id of the attestation collection (in the registry)\\n address owner; // Owner of the attestation\\n address issuer; // Contract that created or last updated the record.\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Timestamp chosen by the attester, should correspond to the effective date of the attestation\\n // it is different from the recording timestamp (date when the attestation was recorded)\\n // e.g a proof of NFT ownership may have be recorded today which is 2 month old data.\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\\n// Attestation Data, stored in the registry\\n// The context is a specific owner of a specific collection\\nstruct AttestationData {\\n // implicit uint256 chainId\\n // implicit uint256 collectionId - from context\\n // implicit owner\\n address issuer; // Address of the contract that recorded the attestation\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Effective date of issuance of the attestation. (can be different from the recording timestamp)\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\",\"keccak256\":\"0x893d9a10429878dd4077388ff4da954c20b86a3c172a7bbdd10a01eb5d39b6a0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620021de380380620021de8339810160408190526200003491620002de565b81620000408162000055565b506200004d82826200006e565b50506200040b565b80516200006a90600490602084019062000205565b5050565b600054610100900460ff166200008b5760005460ff161562000095565b6200009562000150565b620000fd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801562000120576000805461ffff19166101011790555b6200012b8362000055565b620001386000836200016e565b80156200014b576000805461ff00191690555b505050565b60006200016830620001f660201b620009511760201c565b15905090565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166200006a5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6001600160a01b03163b151590565b8280546200021390620003cf565b90600052602060002090601f01602090048101928262000237576000855562000282565b82601f106200025257805160ff191683800117855562000282565b8280016001018555821562000282579182015b828111156200028257825182559160200191906001019062000265565b506200029092915062000294565b5090565b5b8082111562000290576000815560010162000295565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b0381168114620002d957600080fd5b919050565b60008060408385031215620002f257600080fd5b82516001600160401b03808211156200030a57600080fd5b818501915085601f8301126200031f57600080fd5b815181811115620003345762000334620002ab565b604051601f8201601f19908116603f011681019083821181831017156200035f576200035f620002ab565b816040528281526020935088848487010111156200037c57600080fd5b600091505b82821015620003a0578482018401518183018501529083019062000381565b82821115620003b25760008484830101525b9550620003c4915050858201620002c1565b925050509250929050565b600181811c90821680620003e457607f821691505b6020821081036200040557634e487b7160e01b600052602260045260246000fd5b50919050565b611dc3806200041b6000396000f3fe608060405234801561001057600080fd5b506004361061012b5760003560e01c8063730cb7d5116100ad578063a22cb46511610071578063a22cb465146102ae578063b3c1cb21146102c1578063d547741f146102d4578063e985e9c5146102e7578063f242432a1461032357600080fd5b8063730cb7d5146102525780637ab4339d1461026d57806391d14854146102805780639b642de114610293578063a217fddf146102a657600080fd5b80632f2ff15d116100f45780632f2ff15d146101d257806336568abe146101e557806344112ed8146101f85780634e1273f41461021f578063710b30961461023f57600080fd5b8062fdd58e1461013057806301ffc9a7146101565780630e89341c14610179578063248a9ca3146101995780632eb2c2d6146101bd575b600080fd5b61014361013e3660046113e7565b610336565b6040519081526020015b60405180910390f35b61016961016436600461142a565b6103b3565b604051901515815260200161014d565b61018c610187366004611447565b6103c4565b60405161014d91906114bc565b6101436101a7366004611447565b6000908152600160208190526040909120015490565b6101d06101cb36600461161b565b610458565b005b6101d06101e03660046116c5565b6104f4565b6101d06101f33660046116c5565b610520565b6101437fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa481565b61023261022d3660046116f1565b61059e565b60405161014d91906117f7565b6101d061024d36600461180a565b6106c8565b6005546040516001600160a01b03909116815260200161014d565b6101d061027b36600461185f565b61075b565b61016961028e3660046116c5565b610829565b6101d06102a13660046118a4565b610854565b610143600081565b6101d06102bc3660046118e1565b610869565b6101d06102cf36600461191d565b610874565b6101d06102e23660046116c5565b6108a3565b6101696102f5366004611938565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b6101d0610331366004611962565b6108ca565b60055460405163461e4f1960e11b8152600481018390526001600160a01b0384811660248301526000921690638c3c9e3290604401602060405180830381865afa158015610388573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ac91906119c7565b9392505050565b60006103be82610960565b92915050565b6060600480546103d3906119e0565b80601f01602080910402602001604051908101604052809291908181526020018280546103ff906119e0565b801561044c5780601f106104215761010080835404028352916020019161044c565b820191906000526020600020905b81548152906001019060200180831161042f57829003601f168201915b50505050509050919050565b6001600160a01b038516331480610474575061047485336102f5565b6104e05760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084015b60405180910390fd5b6104ed85858585856109a0565b5050505050565b600082815260016020819052604090912001546105118133610b8e565b61051b8383610bf2565b505050565b6001600160a01b03811633146105905760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016104d7565b61059a8282610c5d565b5050565b606081518351146106035760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016104d7565b6000835167ffffffffffffffff81111561061f5761061f6114cf565b604051908082528060200260200182016040528015610648578160200160208202803683370190505b50905060005b84518110156106c05761069385828151811061066c5761066c611a1a565b602002602001015185838151811061068657610686611a1a565b6020026020010151610336565b8282815181106106a5576106a5611a1a565b60209081029190910101526106b981611a46565b905061064e565b509392505050565b7fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa46106f38133610b8e565b836001600160a01b0316856001600160a01b0316876001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62868660405161074b929190918252602082015260400190565b60405180910390a4505050505050565b600054610100900460ff166107765760005460ff161561077a565b303b155b6107dd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104d7565b600054610100900460ff161580156107ff576000805461ffff19166101011790555b61080883610cc4565b610813600083610bf2565b801561051b576000805461ff0019169055505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60006108608133610b8e565b61059a82610cc4565b61059a338383610cd7565b60006108808133610b8e565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260016020819052604090912001546108c08133610b8e565b61051b8383610c5d565b6001600160a01b0385163314806108e657506108e685336102f5565b6109445760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016104d7565b6104ed8585858585610db7565b6001600160a01b03163b151590565b60006001600160e01b03198216636cdb3d1360e11b148061099157506001600160e01b031982166303a24d0760e21b145b806103be57506103be82610ee7565b8151835114610a025760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016104d7565b6001600160a01b038416610a285760405162461bcd60e51b81526004016104d790611a5f565b33610a37818787878787610f1c565b60005b8451811015610b20576000858281518110610a5757610a57611a1a565b602002602001015190506000858381518110610a7557610a75611a1a565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610ac65760405162461bcd60e51b81526004016104d790611aa4565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610b05908490611aee565b9250508190555050505080610b1990611a46565b9050610a3a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610b70929190611b06565b60405180910390a4610b86818787878787610f35565b505050505050565b610b988282610829565b61059a57610bb0816001600160a01b03166014611090565b610bbb836020611090565b604051602001610bcc929190611b34565b60408051601f198184030181529082905262461bcd60e51b82526104d7916004016114bc565b610bfc8282610829565b61059a5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610c678282610829565b1561059a5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b805161059a906004906020840190611332565b816001600160a01b0316836001600160a01b031603610d4a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016104d7565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416610ddd5760405162461bcd60e51b81526004016104d790611a5f565b33610dfc818787610ded8861122c565b610df68861122c565b87610f1c565b60008481526002602090815260408083206001600160a01b038a16845290915290205483811015610e3f5760405162461bcd60e51b81526004016104d790611aa4565b60008581526002602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290610e7e908490611aee565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610ede828888888888611277565b50505050505050565b60006001600160e01b03198216637965db0b60e01b14806103be57506301ffc9a760e01b6001600160e01b03198316146103be565b6040516309a711b960e31b815260040160405180910390fd5b6001600160a01b0384163b15610b865760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190610f799089908990889088908890600401611ba9565b6020604051808303816000875af1925050508015610fb4575060408051601f3d908101601f19168201909252610fb191810190611c07565b60015b61106057610fc0611c24565b806308c379a003610ff95750610fd4611c40565b80610fdf5750610ffb565b8060405162461bcd60e51b81526004016104d791906114bc565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016104d7565b6001600160e01b0319811663bc197c8160e01b14610ede5760405162461bcd60e51b81526004016104d790611cca565b6060600061109f836002611d12565b6110aa906002611aee565b67ffffffffffffffff8111156110c2576110c26114cf565b6040519080825280601f01601f1916602001820160405280156110ec576020820181803683370190505b509050600360fc1b8160008151811061110757611107611a1a565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061113657611136611a1a565b60200101906001600160f81b031916908160001a905350600061115a846002611d12565b611165906001611aee565b90505b60018111156111dd576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061119957611199611a1a565b1a60f81b8282815181106111af576111af611a1a565b60200101906001600160f81b031916908160001a90535060049490941c936111d681611d31565b9050611168565b5083156103ac5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104d7565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061126657611266611a1a565b602090810291909101015292915050565b6001600160a01b0384163b15610b865760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906112bb9089908990889088908890600401611d48565b6020604051808303816000875af19250505080156112f6575060408051601f3d908101601f191682019092526112f391810190611c07565b60015b61130257610fc0611c24565b6001600160e01b0319811663f23a6e6160e01b14610ede5760405162461bcd60e51b81526004016104d790611cca565b82805461133e906119e0565b90600052602060002090601f01602090048101928261136057600085556113a6565b82601f1061137957805160ff19168380011785556113a6565b828001600101855582156113a6579182015b828111156113a657825182559160200191906001019061138b565b506113b29291506113b6565b5090565b5b808211156113b257600081556001016113b7565b80356001600160a01b03811681146113e257600080fd5b919050565b600080604083850312156113fa57600080fd5b611403836113cb565b946020939093013593505050565b6001600160e01b03198116811461142757600080fd5b50565b60006020828403121561143c57600080fd5b81356103ac81611411565b60006020828403121561145957600080fd5b5035919050565b60005b8381101561147b578181015183820152602001611463565b8381111561148a576000848401525b50505050565b600081518084526114a8816020860160208601611460565b601f01601f19169290920160200192915050565b6020815260006103ac6020830184611490565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff8111828210171561150b5761150b6114cf565b6040525050565b600067ffffffffffffffff82111561152c5761152c6114cf565b5060051b60200190565b600082601f83011261154757600080fd5b8135602061155482611512565b60405161156182826114e5565b83815260059390931b850182019282810191508684111561158157600080fd5b8286015b8481101561159c5780358352918301918301611585565b509695505050505050565b600082601f8301126115b857600080fd5b813567ffffffffffffffff8111156115d2576115d26114cf565b6040516115e9601f8301601f1916602001826114e5565b8181528460208386010111156115fe57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561163357600080fd5b61163c866113cb565b945061164a602087016113cb565b9350604086013567ffffffffffffffff8082111561166757600080fd5b61167389838a01611536565b9450606088013591508082111561168957600080fd5b61169589838a01611536565b935060808801359150808211156116ab57600080fd5b506116b8888289016115a7565b9150509295509295909350565b600080604083850312156116d857600080fd5b823591506116e8602084016113cb565b90509250929050565b6000806040838503121561170457600080fd5b823567ffffffffffffffff8082111561171c57600080fd5b818501915085601f83011261173057600080fd5b8135602061173d82611512565b60405161174a82826114e5565b83815260059390931b850182019282810191508984111561176a57600080fd5b948201945b8386101561178f57611780866113cb565b8252948201949082019061176f565b965050860135925050808211156117a557600080fd5b506117b285828601611536565b9150509250929050565b600081518084526020808501945080840160005b838110156117ec578151875295820195908201906001016117d0565b509495945050505050565b6020815260006103ac60208301846117bc565b600080600080600060a0868803121561182257600080fd5b61182b866113cb565b9450611839602087016113cb565b9350611847604087016113cb565b94979396509394606081013594506080013592915050565b6000806040838503121561187257600080fd5b823567ffffffffffffffff81111561188957600080fd5b611895858286016115a7565b9250506116e8602084016113cb565b6000602082840312156118b657600080fd5b813567ffffffffffffffff8111156118cd57600080fd5b6118d9848285016115a7565b949350505050565b600080604083850312156118f457600080fd5b6118fd836113cb565b91506020830135801515811461191257600080fd5b809150509250929050565b60006020828403121561192f57600080fd5b6103ac826113cb565b6000806040838503121561194b57600080fd5b611954836113cb565b91506116e8602084016113cb565b600080600080600060a0868803121561197a57600080fd5b611983866113cb565b9450611991602087016113cb565b93506040860135925060608601359150608086013567ffffffffffffffff8111156119bb57600080fd5b6116b8888289016115a7565b6000602082840312156119d957600080fd5b5051919050565b600181811c908216806119f457607f821691505b602082108103611a1457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611a5857611a58611a30565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115611b0157611b01611a30565b500190565b604081526000611b1960408301856117bc565b8281036020840152611b2b81856117bc565b95945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611b6c816017850160208801611460565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611b9d816028840160208801611460565b01602801949350505050565b6001600160a01b0386811682528516602082015260a060408201819052600090611bd5908301866117bc565b8281036060840152611be781866117bc565b90508281036080840152611bfb8185611490565b98975050505050505050565b600060208284031215611c1957600080fd5b81516103ac81611411565b600060033d1115611c3d5760046000803e5060005160e01c5b90565b600060443d1015611c4e5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611c7e57505050505090565b8285019150815181811115611c965750505050505090565b843d8701016020828501011115611cb05750505050505090565b611cbf602082860101876114e5565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6000816000190483118215151615611d2c57611d2c611a30565b500290565b600081611d4057611d40611a30565b506000190190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611d8290830184611490565b97965050505050505056fea2646970667358221220317dacb4b6900e7dfecfdaa97dbb0082f85182a364bff474b738708885ea258064736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061012b5760003560e01c8063730cb7d5116100ad578063a22cb46511610071578063a22cb465146102ae578063b3c1cb21146102c1578063d547741f146102d4578063e985e9c5146102e7578063f242432a1461032357600080fd5b8063730cb7d5146102525780637ab4339d1461026d57806391d14854146102805780639b642de114610293578063a217fddf146102a657600080fd5b80632f2ff15d116100f45780632f2ff15d146101d257806336568abe146101e557806344112ed8146101f85780634e1273f41461021f578063710b30961461023f57600080fd5b8062fdd58e1461013057806301ffc9a7146101565780630e89341c14610179578063248a9ca3146101995780632eb2c2d6146101bd575b600080fd5b61014361013e3660046113e7565b610336565b6040519081526020015b60405180910390f35b61016961016436600461142a565b6103b3565b604051901515815260200161014d565b61018c610187366004611447565b6103c4565b60405161014d91906114bc565b6101436101a7366004611447565b6000908152600160208190526040909120015490565b6101d06101cb36600461161b565b610458565b005b6101d06101e03660046116c5565b6104f4565b6101d06101f33660046116c5565b610520565b6101437fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa481565b61023261022d3660046116f1565b61059e565b60405161014d91906117f7565b6101d061024d36600461180a565b6106c8565b6005546040516001600160a01b03909116815260200161014d565b6101d061027b36600461185f565b61075b565b61016961028e3660046116c5565b610829565b6101d06102a13660046118a4565b610854565b610143600081565b6101d06102bc3660046118e1565b610869565b6101d06102cf36600461191d565b610874565b6101d06102e23660046116c5565b6108a3565b6101696102f5366004611938565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b6101d0610331366004611962565b6108ca565b60055460405163461e4f1960e11b8152600481018390526001600160a01b0384811660248301526000921690638c3c9e3290604401602060405180830381865afa158015610388573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ac91906119c7565b9392505050565b60006103be82610960565b92915050565b6060600480546103d3906119e0565b80601f01602080910402602001604051908101604052809291908181526020018280546103ff906119e0565b801561044c5780601f106104215761010080835404028352916020019161044c565b820191906000526020600020905b81548152906001019060200180831161042f57829003601f168201915b50505050509050919050565b6001600160a01b038516331480610474575061047485336102f5565b6104e05760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084015b60405180910390fd5b6104ed85858585856109a0565b5050505050565b600082815260016020819052604090912001546105118133610b8e565b61051b8383610bf2565b505050565b6001600160a01b03811633146105905760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016104d7565b61059a8282610c5d565b5050565b606081518351146106035760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016104d7565b6000835167ffffffffffffffff81111561061f5761061f6114cf565b604051908082528060200260200182016040528015610648578160200160208202803683370190505b50905060005b84518110156106c05761069385828151811061066c5761066c611a1a565b602002602001015185838151811061068657610686611a1a565b6020026020010151610336565b8282815181106106a5576106a5611a1a565b60209081029190910101526106b981611a46565b905061064e565b509392505050565b7fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa46106f38133610b8e565b836001600160a01b0316856001600160a01b0316876001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62868660405161074b929190918252602082015260400190565b60405180910390a4505050505050565b600054610100900460ff166107765760005460ff161561077a565b303b155b6107dd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104d7565b600054610100900460ff161580156107ff576000805461ffff19166101011790555b61080883610cc4565b610813600083610bf2565b801561051b576000805461ff0019169055505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60006108608133610b8e565b61059a82610cc4565b61059a338383610cd7565b60006108808133610b8e565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260016020819052604090912001546108c08133610b8e565b61051b8383610c5d565b6001600160a01b0385163314806108e657506108e685336102f5565b6109445760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016104d7565b6104ed8585858585610db7565b6001600160a01b03163b151590565b60006001600160e01b03198216636cdb3d1360e11b148061099157506001600160e01b031982166303a24d0760e21b145b806103be57506103be82610ee7565b8151835114610a025760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016104d7565b6001600160a01b038416610a285760405162461bcd60e51b81526004016104d790611a5f565b33610a37818787878787610f1c565b60005b8451811015610b20576000858281518110610a5757610a57611a1a565b602002602001015190506000858381518110610a7557610a75611a1a565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610ac65760405162461bcd60e51b81526004016104d790611aa4565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610b05908490611aee565b9250508190555050505080610b1990611a46565b9050610a3a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610b70929190611b06565b60405180910390a4610b86818787878787610f35565b505050505050565b610b988282610829565b61059a57610bb0816001600160a01b03166014611090565b610bbb836020611090565b604051602001610bcc929190611b34565b60408051601f198184030181529082905262461bcd60e51b82526104d7916004016114bc565b610bfc8282610829565b61059a5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610c678282610829565b1561059a5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b805161059a906004906020840190611332565b816001600160a01b0316836001600160a01b031603610d4a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016104d7565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416610ddd5760405162461bcd60e51b81526004016104d790611a5f565b33610dfc818787610ded8861122c565b610df68861122c565b87610f1c565b60008481526002602090815260408083206001600160a01b038a16845290915290205483811015610e3f5760405162461bcd60e51b81526004016104d790611aa4565b60008581526002602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290610e7e908490611aee565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610ede828888888888611277565b50505050505050565b60006001600160e01b03198216637965db0b60e01b14806103be57506301ffc9a760e01b6001600160e01b03198316146103be565b6040516309a711b960e31b815260040160405180910390fd5b6001600160a01b0384163b15610b865760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190610f799089908990889088908890600401611ba9565b6020604051808303816000875af1925050508015610fb4575060408051601f3d908101601f19168201909252610fb191810190611c07565b60015b61106057610fc0611c24565b806308c379a003610ff95750610fd4611c40565b80610fdf5750610ffb565b8060405162461bcd60e51b81526004016104d791906114bc565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016104d7565b6001600160e01b0319811663bc197c8160e01b14610ede5760405162461bcd60e51b81526004016104d790611cca565b6060600061109f836002611d12565b6110aa906002611aee565b67ffffffffffffffff8111156110c2576110c26114cf565b6040519080825280601f01601f1916602001820160405280156110ec576020820181803683370190505b509050600360fc1b8160008151811061110757611107611a1a565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061113657611136611a1a565b60200101906001600160f81b031916908160001a905350600061115a846002611d12565b611165906001611aee565b90505b60018111156111dd576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061119957611199611a1a565b1a60f81b8282815181106111af576111af611a1a565b60200101906001600160f81b031916908160001a90535060049490941c936111d681611d31565b9050611168565b5083156103ac5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104d7565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061126657611266611a1a565b602090810291909101015292915050565b6001600160a01b0384163b15610b865760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906112bb9089908990889088908890600401611d48565b6020604051808303816000875af19250505080156112f6575060408051601f3d908101601f191682019092526112f391810190611c07565b60015b61130257610fc0611c24565b6001600160e01b0319811663f23a6e6160e01b14610ede5760405162461bcd60e51b81526004016104d790611cca565b82805461133e906119e0565b90600052602060002090601f01602090048101928261136057600085556113a6565b82601f1061137957805160ff19168380011785556113a6565b828001600101855582156113a6579182015b828111156113a657825182559160200191906001019061138b565b506113b29291506113b6565b5090565b5b808211156113b257600081556001016113b7565b80356001600160a01b03811681146113e257600080fd5b919050565b600080604083850312156113fa57600080fd5b611403836113cb565b946020939093013593505050565b6001600160e01b03198116811461142757600080fd5b50565b60006020828403121561143c57600080fd5b81356103ac81611411565b60006020828403121561145957600080fd5b5035919050565b60005b8381101561147b578181015183820152602001611463565b8381111561148a576000848401525b50505050565b600081518084526114a8816020860160208601611460565b601f01601f19169290920160200192915050565b6020815260006103ac6020830184611490565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff8111828210171561150b5761150b6114cf565b6040525050565b600067ffffffffffffffff82111561152c5761152c6114cf565b5060051b60200190565b600082601f83011261154757600080fd5b8135602061155482611512565b60405161156182826114e5565b83815260059390931b850182019282810191508684111561158157600080fd5b8286015b8481101561159c5780358352918301918301611585565b509695505050505050565b600082601f8301126115b857600080fd5b813567ffffffffffffffff8111156115d2576115d26114cf565b6040516115e9601f8301601f1916602001826114e5565b8181528460208386010111156115fe57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561163357600080fd5b61163c866113cb565b945061164a602087016113cb565b9350604086013567ffffffffffffffff8082111561166757600080fd5b61167389838a01611536565b9450606088013591508082111561168957600080fd5b61169589838a01611536565b935060808801359150808211156116ab57600080fd5b506116b8888289016115a7565b9150509295509295909350565b600080604083850312156116d857600080fd5b823591506116e8602084016113cb565b90509250929050565b6000806040838503121561170457600080fd5b823567ffffffffffffffff8082111561171c57600080fd5b818501915085601f83011261173057600080fd5b8135602061173d82611512565b60405161174a82826114e5565b83815260059390931b850182019282810191508984111561176a57600080fd5b948201945b8386101561178f57611780866113cb565b8252948201949082019061176f565b965050860135925050808211156117a557600080fd5b506117b285828601611536565b9150509250929050565b600081518084526020808501945080840160005b838110156117ec578151875295820195908201906001016117d0565b509495945050505050565b6020815260006103ac60208301846117bc565b600080600080600060a0868803121561182257600080fd5b61182b866113cb565b9450611839602087016113cb565b9350611847604087016113cb565b94979396509394606081013594506080013592915050565b6000806040838503121561187257600080fd5b823567ffffffffffffffff81111561188957600080fd5b611895858286016115a7565b9250506116e8602084016113cb565b6000602082840312156118b657600080fd5b813567ffffffffffffffff8111156118cd57600080fd5b6118d9848285016115a7565b949350505050565b600080604083850312156118f457600080fd5b6118fd836113cb565b91506020830135801515811461191257600080fd5b809150509250929050565b60006020828403121561192f57600080fd5b6103ac826113cb565b6000806040838503121561194b57600080fd5b611954836113cb565b91506116e8602084016113cb565b600080600080600060a0868803121561197a57600080fd5b611983866113cb565b9450611991602087016113cb565b93506040860135925060608601359150608086013567ffffffffffffffff8111156119bb57600080fd5b6116b8888289016115a7565b6000602082840312156119d957600080fd5b5051919050565b600181811c908216806119f457607f821691505b602082108103611a1457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611a5857611a58611a30565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115611b0157611b01611a30565b500190565b604081526000611b1960408301856117bc565b8281036020840152611b2b81856117bc565b95945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611b6c816017850160208801611460565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611b9d816028840160208801611460565b01602801949350505050565b6001600160a01b0386811682528516602082015260a060408201819052600090611bd5908301866117bc565b8281036060840152611be781866117bc565b90508281036080840152611bfb8185611490565b98975050505050505050565b600060208284031215611c1957600080fd5b81516103ac81611411565b600060033d1115611c3d5760046000803e5060005160e01c5b90565b600060443d1015611c4e5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611c7e57505050505090565b8285019150815181811115611c965750505050505090565b843d8701016020828501011115611cb05750505050505090565b611cbf602082860101876114e5565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6000816000190483118215151615611d2c57611d2c611a30565b500290565b600081611d4057611d40611a30565b506000190190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611d8290830184611490565b97965050505050505056fea2646970667358221220317dacb4b6900e7dfecfdaa97dbb0082f85182a364bff474b738708885ea258064736f6c634300080e0033", + "devdoc": { + "author": "Sismo", + "kind": "dev", + "methods": { + "balanceOf(address,uint256)": { + "details": "Main function of the ERC1155 badge The balance of a user is equal to the value of the underlying attestation. attestationCollectionId == badgeId", + "params": { + "account": "Address to check badge balance (= value of attestation)", + "id": "Badge Id to check (= attestationCollectionId)" + } + }, + "balanceOfBatch(address[],uint256[])": { + "details": "See {IERC1155-balanceOfBatch}. Requirements: - `accounts` and `ids` must have the same length." + }, + "constructor": { + "details": "Constructor", + "params": { + "owner": "Owner of the contract, super admin, can setup roles and update the attestation registry", + "uri": "Uri for the metadata of badges" + } + }, + "getAttestationsRegistry()": { + "details": "Getter of the attestations registry" + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "grantRole(bytes32,address)": { + "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(string,address)": { + "details": "Initializes the contract, to be called by the proxy delegating calls to this implementation", + "params": { + "owner": "Owner of the contract, super admin, can setup roles and update the attestation registry", + "uri": "Uri for the metadata of badges" + } + }, + "isApprovedForAll(address,address)": { + "details": "See {IERC1155-isApprovedForAll}." + }, + "renounceRole(bytes32,address)": { + "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "revokeRole(bytes32,address)": { + "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." + }, + "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": { + "details": "See {IERC1155-safeBatchTransferFrom}." + }, + "safeTransferFrom(address,address,uint256,uint256,bytes)": { + "details": "See {IERC1155-safeTransferFrom}." + }, + "setApprovalForAll(address,bool)": { + "details": "See {IERC1155-setApprovalForAll}." + }, + "setAttestationsRegistry(address)": { + "details": "Set the attestations registry address. Can only be called by owner (default admin)", + "params": { + "attestationsRegistry": "new attestations registry address" + } + }, + "setUri(string)": { + "details": "Set the URI. Can only be called by owner (default admin)", + "params": { + "uri": "new attestations registry address" + } + }, + "supportsInterface(bytes4)": { + "details": "ERC165" + }, + "triggerTransferEvent(address,address,address,uint256,uint256)": { + "details": "Emits a TransferSingle event, so subgraphs and other off-chain apps relying on events can see badge minting/burning can only be called by address having the EVENT_TRIGGERER_ROLE (attestations registry address)", + "params": { + "from": "address(0) if minting, address of the badge holder if burning", + "id": "badgeId for which to trigger the event", + "operator": "who is calling the TransferEvent", + "to": "address of the badge holder is minting, address(0) if burning", + "value": "minted/burned balance" + } + }, + "uri(uint256)": { + "details": "See {IERC1155MetadataURI-uri}. This implementation returns the same URI for *all* token types. It relies on the token type ID substitution mechanism https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. Clients calling this function must replace the `\\{id\\}` substring with the actual token type ID." + } + }, + "title": "Badges contract", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Stateless, Non-transferrable ERC1155 contract. Reads balance from the values of attestations The associated attestations registry triggers TransferSingle events from this contract It allows badge \"shadow mints and burns\" to be caught by off-chain platforms For more information: https://badges.docs.sismo.io", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 936, + "contract": "contracts/core/Badges.sol:Badges", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 939, + "contract": "contracts/core/Badges.sol:Badges", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 24, + "contract": "contracts/core/Badges.sol:Badges", + "label": "_roles", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_struct(RoleData)19_storage)" + }, + { + "astId": 1121, + "contract": "contracts/core/Badges.sol:Badges", + "label": "_balances", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_uint256))" + }, + { + "astId": 1127, + "contract": "contracts/core/Badges.sol:Badges", + "label": "_operatorApprovals", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 1129, + "contract": "contracts/core/Badges.sol:Badges", + "label": "_uri", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + }, + { + "astId": 10475, + "contract": "contracts/core/Badges.sol:Badges", + "label": "_attestationsRegistry", + "offset": 0, + "slot": "5", + "type": "t_contract(IAttestationsRegistry)11151" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IAttestationsRegistry)11151": { + "encoding": "inplace", + "label": "contract IAttestationsRegistry", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)19_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControl.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)19_storage" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(RoleData)19_storage": { + "encoding": "inplace", + "label": "struct AccessControl.RoleData", + "members": [ + { + "astId": 16, + "contract": "contracts/core/Badges.sol:Badges", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 18, + "contract": "contracts/core/Badges.sol:Badges", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/BadgesImplem.json b/deployments/mumbai/BadgesImplem.json new file mode 100644 index 0000000..072a898 --- /dev/null +++ b/deployments/mumbai/BadgesImplem.json @@ -0,0 +1,928 @@ +{ + "address": "0xcA9EF6c891B3f045bd4a200029FCC1C38B65CCe3", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "uri", + "type": "string" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BadgesNonTransferrable", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EVENT_TRIGGERER_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAttestationsRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "uri", + "type": "string" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "attestationsRegistry", + "type": "address" + } + ], + "name": "setAttestationsRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "uri", + "type": "string" + } + ], + "name": "setUri", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "triggerTransferEvent", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x0d3279adfb61568ba781a5f7bccd57f2cf84159f78b3f970e75b70c7ea4b1cfa", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0xcA9EF6c891B3f045bd4a200029FCC1C38B65CCe3", + "transactionIndex": 4, + "gasUsed": "1831487", + "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000002000000000000000000000000000000000000000000000000000800000000000000000040100000000000001008000020000000000000000000800000000000000000080000000000000800000000000000000000000000000000000000010000000000000000000008000200000000000000000000000000000000000000000000000001040000000004000000000000000000001000000000000000000000000000100100000000020000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0x0af9a2dd68761829661b873d097ede6ced3d615512bdb4f50198cf22c0405cef", + "transactionHash": "0x0d3279adfb61568ba781a5f7bccd57f2cf84159f78b3f970e75b70c7ea4b1cfa", + "logs": [ + { + "transactionIndex": 4, + "blockNumber": 28599969, + "transactionHash": "0x0d3279adfb61568ba781a5f7bccd57f2cf84159f78b3f970e75b70c7ea4b1cfa", + "address": "0xcA9EF6c891B3f045bd4a200029FCC1C38B65CCe3", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 21, + "blockHash": "0x0af9a2dd68761829661b873d097ede6ced3d615512bdb4f50198cf22c0405cef" + }, + { + "transactionIndex": 4, + "blockNumber": 28599969, + "transactionHash": "0x0d3279adfb61568ba781a5f7bccd57f2cf84159f78b3f970e75b70c7ea4b1cfa", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000009c297721191000000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000000a08c4f0661f207b8ec10000000000000000000000000000000000000000000000008abd606d17d66f00000000000000000000000000000000000000000000000a08c4fa28b6928d1fc1", + "logIndex": 22, + "blockHash": "0x0af9a2dd68761829661b873d097ede6ced3d615512bdb4f50198cf22c0405cef" + } + ], + "blockNumber": 28599969, + "cumulativeGasUsed": "2577496", + "status": 1, + "byzantium": true + }, + "args": [ + "https://hub.staging.zikies.io/badges/mumbai/{id}.json", + "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6" + ], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"BadgesNonTransferrable\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"name\":\"TransferBatch\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"TransferSingle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"URI\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EVENT_TRIGGERER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"name\":\"balanceOfBatch\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAttestationsRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeBatchTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attestationsRegistry\",\"type\":\"address\"}],\"name\":\"setAttestationsRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"setUri\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"triggerTransferEvent\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"uri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"balanceOf(address,uint256)\":{\"details\":\"Main function of the ERC1155 badge The balance of a user is equal to the value of the underlying attestation. attestationCollectionId == badgeId\",\"params\":{\"account\":\"Address to check badge balance (= value of attestation)\",\"id\":\"Badge Id to check (= attestationCollectionId)\"}},\"balanceOfBatch(address[],uint256[])\":{\"details\":\"See {IERC1155-balanceOfBatch}. Requirements: - `accounts` and `ids` must have the same length.\"},\"constructor\":{\"details\":\"Constructor\",\"params\":{\"owner\":\"Owner of the contract, super admin, can setup roles and update the attestation registry\",\"uri\":\"Uri for the metadata of badges\"}},\"getAttestationsRegistry()\":{\"details\":\"Getter of the attestations registry\"},\"getRoleAdmin(bytes32)\":{\"details\":\"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.\"},\"grantRole(bytes32,address)\":{\"details\":\"Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role.\"},\"hasRole(bytes32,address)\":{\"details\":\"Returns `true` if `account` has been granted `role`.\"},\"initialize(string,address)\":{\"details\":\"Initializes the contract, to be called by the proxy delegating calls to this implementation\",\"params\":{\"owner\":\"Owner of the contract, super admin, can setup roles and update the attestation registry\",\"uri\":\"Uri for the metadata of badges\"}},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC1155-isApprovedForAll}.\"},\"renounceRole(bytes32,address)\":{\"details\":\"Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`.\"},\"revokeRole(bytes32,address)\":{\"details\":\"Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role.\"},\"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\":{\"details\":\"See {IERC1155-safeBatchTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,uint256,bytes)\":{\"details\":\"See {IERC1155-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC1155-setApprovalForAll}.\"},\"setAttestationsRegistry(address)\":{\"details\":\"Set the attestations registry address. Can only be called by owner (default admin)\",\"params\":{\"attestationsRegistry\":\"new attestations registry address\"}},\"setUri(string)\":{\"details\":\"Set the URI. Can only be called by owner (default admin)\",\"params\":{\"uri\":\"new attestations registry address\"}},\"supportsInterface(bytes4)\":{\"details\":\"ERC165\"},\"triggerTransferEvent(address,address,address,uint256,uint256)\":{\"details\":\"Emits a TransferSingle event, so subgraphs and other off-chain apps relying on events can see badge minting/burning can only be called by address having the EVENT_TRIGGERER_ROLE (attestations registry address)\",\"params\":{\"from\":\"address(0) if minting, address of the badge holder if burning\",\"id\":\"badgeId for which to trigger the event\",\"operator\":\"who is calling the TransferEvent\",\"to\":\"address of the badge holder is minting, address(0) if burning\",\"value\":\"minted/burned balance\"}},\"uri(uint256)\":{\"details\":\"See {IERC1155MetadataURI-uri}. This implementation returns the same URI for *all* token types. It relies on the token type ID substitution mechanism https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. Clients calling this function must replace the `\\\\{id\\\\}` substring with the actual token type ID.\"}},\"title\":\"Badges contract\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"Stateless, Non-transferrable ERC1155 contract. Reads balance from the values of attestations The associated attestations registry triggers TransferSingle events from this contract It allows badge \\\"shadow mints and burns\\\" to be caught by off-chain platforms For more information: https://badges.docs.sismo.io\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/core/Badges.sol\":\"Badges\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```\\n * function foo() public {\\n * require(hasRole(MY_ROLE, msg.sender));\\n * ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it.\\n */\\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\\n struct RoleData {\\n mapping(address => bool) members;\\n bytes32 adminRole;\\n }\\n\\n mapping(bytes32 => RoleData) private _roles;\\n\\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n /**\\n * @dev Modifier that checks that an account has a specific role. Reverts\\n * with a standardized message including the required role.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n *\\n * _Available since v4.1._\\n */\\n modifier onlyRole(bytes32 role) {\\n _checkRole(role, _msgSender());\\n _;\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n return _roles[role].members[account];\\n }\\n\\n /**\\n * @dev Revert with a standard message if `account` is missing `role`.\\n *\\n * The format of the revert reason is given by the following regular expression:\\n *\\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n */\\n function _checkRole(bytes32 role, address account) internal view virtual {\\n if (!hasRole(role, account)) {\\n revert(\\n string(\\n abi.encodePacked(\\n \\\"AccessControl: account \\\",\\n Strings.toHexString(uint160(account), 20),\\n \\\" is missing role \\\",\\n Strings.toHexString(uint256(role), 32)\\n )\\n )\\n );\\n }\\n }\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n return _roles[role].adminRole;\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) public virtual override {\\n require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n _revokeRole(role, account);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event. Note that unlike {grantRole}, this function doesn't perform any\\n * checks on the calling account.\\n *\\n * [WARNING]\\n * ====\\n * This function should only be called from the constructor when setting\\n * up the initial roles for the system.\\n *\\n * Using this function in any other way is effectively circumventing the admin\\n * system imposed by {AccessControl}.\\n * ====\\n *\\n * NOTE: This function is deprecated in favor of {_grantRole}.\\n */\\n function _setupRole(bytes32 role, address account) internal virtual {\\n _grantRole(role, account);\\n }\\n\\n /**\\n * @dev Sets `adminRole` as ``role``'s admin role.\\n *\\n * Emits a {RoleAdminChanged} event.\\n */\\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n bytes32 previousAdminRole = getRoleAdmin(role);\\n _roles[role].adminRole = adminRole;\\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n }\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * Internal function without access restriction.\\n */\\n function _grantRole(bytes32 role, address account) internal virtual {\\n if (!hasRole(role, account)) {\\n _roles[role].members[account] = true;\\n emit RoleGranted(role, account, _msgSender());\\n }\\n }\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * Internal function without access restriction.\\n */\\n function _revokeRole(bytes32 role, address account) internal virtual {\\n if (hasRole(role, account)) {\\n _roles[role].members[account] = false;\\n emit RoleRevoked(role, account, _msgSender());\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4a1a0ba12bf1a33f10d9fe226278cf59675c0b929d29e4da99658a079b27fb84\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n /**\\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n *\\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n * {RoleAdminChanged} not being emitted signaling this.\\n *\\n * _Available since v3.1._\\n */\\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n /**\\n * @dev Emitted when `account` is granted `role`.\\n *\\n * `sender` is the account that originated the contract call, an admin role\\n * bearer except when using {AccessControl-_setupRole}.\\n */\\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Emitted when `account` is revoked `role`.\\n *\\n * `sender` is the account that originated the contract call:\\n * - if using `revokeRole`, it is the admin role bearer\\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n */\\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n /**\\n * @dev Returns `true` if `account` has been granted `role`.\\n */\\n function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n /**\\n * @dev Returns the admin role that controls `role`. See {grantRole} and\\n * {revokeRole}.\\n *\\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n */\\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n /**\\n * @dev Grants `role` to `account`.\\n *\\n * If `account` had not been already granted `role`, emits a {RoleGranted}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function grantRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from `account`.\\n *\\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n *\\n * Requirements:\\n *\\n * - the caller must have ``role``'s admin role.\\n */\\n function revokeRole(bytes32 role, address account) external;\\n\\n /**\\n * @dev Revokes `role` from the calling account.\\n *\\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n * purpose is to provide a mechanism for accounts to lose their privileges\\n * if they are compromised (such as when a trusted device is misplaced).\\n *\\n * If the calling account had been granted `role`, emits a {RoleRevoked}\\n * event.\\n *\\n * Requirements:\\n *\\n * - the caller must be `account`.\\n */\\n function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() initializer {}\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\\n // contract may have been reentered.\\n require(_initializing ? _isConstructor() : !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} modifier, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n function _isConstructor() private view returns (bool) {\\n return !Address.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x4823752b07b8ea4ca971b217e39457930e7cb103c2c91e2a29729e5ca907e4f0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n require(!paused(), \\\"Pausable: paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n require(paused(), \\\"Pausable: not paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0xe68ed7fb8766ed1e888291f881e36b616037f852b37d96877045319ad298ba87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n using Address for address;\\n\\n // Mapping from token ID to account balances\\n mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n // Mapping from account to operator approvals\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n string private _uri;\\n\\n /**\\n * @dev See {_setURI}.\\n */\\n constructor(string memory uri_) {\\n _setURI(uri_);\\n }\\n\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n return\\n interfaceId == type(IERC1155).interfaceId ||\\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev See {IERC1155MetadataURI-uri}.\\n *\\n * This implementation returns the same URI for *all* token types. It relies\\n * on the token type ID substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n * actual token type ID.\\n */\\n function uri(uint256) public view virtual override returns (string memory) {\\n return _uri;\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n require(account != address(0), \\\"ERC1155: balance query for the zero address\\\");\\n return _balances[id][account];\\n }\\n\\n /**\\n * @dev See {IERC1155-balanceOfBatch}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\\n public\\n view\\n virtual\\n override\\n returns (uint256[] memory)\\n {\\n require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n for (uint256 i = 0; i < accounts.length; ++i) {\\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n }\\n\\n return batchBalances;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n _setApprovalForAll(_msgSender(), operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev See {IERC1155-safeTransferFrom}.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: caller is not owner nor approved\\\"\\n );\\n _safeTransferFrom(from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev See {IERC1155-safeBatchTransferFrom}.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) public virtual override {\\n require(\\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n \\\"ERC1155: transfer caller is not owner nor approved\\\"\\n );\\n _safeBatchTransferFrom(from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n\\n emit TransferSingle(operator, from, to, id, amount);\\n\\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; ++i) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n _balances[id][to] += amount;\\n }\\n\\n emit TransferBatch(operator, from, to, ids, amounts);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Sets a new URI for all token types, by relying on the token type ID\\n * substitution mechanism\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n *\\n * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n * URI or any of the amounts in the JSON file at said URI will be replaced by\\n * clients with the token type ID.\\n *\\n * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n * interpreted by clients as\\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n * for token type ID 0x4cce0.\\n *\\n * See {uri}.\\n *\\n * Because these URIs cannot be meaningfully represented by the {URI} event,\\n * this function emits no events.\\n */\\n function _setURI(string memory newuri) internal virtual {\\n _uri = newuri;\\n }\\n\\n /**\\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function _mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function _mintBatch(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n _balances[ids[i]][to] += amounts[i];\\n }\\n\\n emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens of token type `id` from `from`\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `from` must have at least `amount` tokens of token type `id`.\\n */\\n function _burn(\\n address from,\\n uint256 id,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), \\\"\\\");\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n\\n emit TransferSingle(operator, from, address(0), id, amount);\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n */\\n function _burnBatch(\\n address from,\\n uint256[] memory ids,\\n uint256[] memory amounts\\n ) internal virtual {\\n require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n address operator = _msgSender();\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint256 id = ids[i];\\n uint256 amount = amounts[i];\\n\\n uint256 fromBalance = _balances[id][from];\\n require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[id][from] = fromBalance - amount;\\n }\\n }\\n\\n emit TransferBatch(operator, from, address(0), ids, amounts);\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits a {ApprovalForAll} event.\\n */\\n function _setApprovalForAll(\\n address owner,\\n address operator,\\n bool approved\\n ) internal virtual {\\n require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n _operatorApprovals[owner][operator] = approved;\\n emit ApprovalForAll(owner, operator, approved);\\n }\\n\\n /**\\n * @dev Hook that is called before any token transfer. This includes minting\\n * and burning, as well as batched variants.\\n *\\n * The same hook is called on both single and batched variants. For single\\n * transfers, the length of the `id` and `amount` arrays will be 1.\\n *\\n * Calling conditions (for each `id` and `amount` pair):\\n *\\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * of token type `id` will be transferred to `to`.\\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n * for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n * will be burned.\\n * - `from` and `to` are never both zero.\\n * - `ids` and `amounts` have the same, non-zero length.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {}\\n\\n function _doSafeTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n if (response != IERC1155Receiver.onERC1155Received.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _doSafeBatchTransferAcceptanceCheck(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) private {\\n if (to.isContract()) {\\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n bytes4 response\\n ) {\\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n }\\n } catch Error(string memory reason) {\\n revert(reason);\\n } catch {\\n revert(\\\"ERC1155: transfer to non ERC1155Receiver implementer\\\");\\n }\\n }\\n }\\n\\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n uint256[] memory array = new uint256[](1);\\n array[0] = element;\\n\\n return array;\\n }\\n}\\n\",\"keccak256\":\"0x04d6d1342ece664085921a4fabc928a7bcf1cf2873fa81780f61a54dc2b9b66e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\\n external\\n view\\n returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0x8e93de94c9062ebc94fb7e2e3929b0781ac6a2b7772e2f7a59045861c93e5be9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n /**\\n * @dev Handles the receipt of a single ERC1155 token type. This function is\\n * called at the end of a `safeTransferFrom` after the balance has been updated.\\n *\\n * NOTE: To accept the transfer, this must return\\n * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n * (i.e. 0xf23a6e61, or its own function selector).\\n *\\n * @param operator The address which initiated the transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param id The ID of the token being transferred\\n * @param value The amount of tokens being transferred\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155Received(\\n address operator,\\n address from,\\n uint256 id,\\n uint256 value,\\n bytes calldata data\\n ) external returns (bytes4);\\n\\n /**\\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n * is called at the end of a `safeBatchTransferFrom` after the balances have\\n * been updated.\\n *\\n * NOTE: To accept the transfer(s), this must return\\n * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n * (i.e. 0xbc197c81, or its own function selector).\\n *\\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n * @param from The address which previously owned the token\\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n * @param data Additional data with no specified format\\n * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n */\\n function onERC1155BatchReceived(\\n address operator,\\n address from,\\n uint256[] calldata ids,\\n uint256[] calldata values,\\n bytes calldata data\\n ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../ERC1155.sol\\\";\\nimport \\\"../../../security/Pausable.sol\\\";\\n\\n/**\\n * @dev ERC1155 token with pausable token transfers, minting and burning.\\n *\\n * Useful for scenarios such as preventing trades until the end of an evaluation\\n * period, or having an emergency switch for freezing all token transfers in the\\n * event of a large bug.\\n *\\n * _Available since v3.1._\\n */\\nabstract contract ERC1155Pausable is ERC1155, Pausable {\\n /**\\n * @dev See {ERC1155-_beforeTokenTransfer}.\\n *\\n * Requirements:\\n *\\n * - the contract must not be paused.\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override {\\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n require(!paused(), \\\"ERC1155Pausable: token transfer while paused\\\");\\n }\\n}\\n\",\"keccak256\":\"0xdad22b949de979bb2ad9001c044b2aeaacf8a25e3de09ed6f022a9469f936d5b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n /**\\n * @dev Returns the URI for token type `id`.\\n *\\n * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n * clients with the actual token type ID.\\n */\\n function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _HEX_SYMBOLS = \\\"0123456789abcdef\\\";\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n // Inspired by OraclizeAPI's implementation - MIT licence\\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\\n\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n uint256 temp = value;\\n uint256 digits;\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n bytes memory buffer = new bytes(digits);\\n while (value != 0) {\\n digits -= 1;\\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\\n value /= 10;\\n }\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n if (value == 0) {\\n return \\\"0x00\\\";\\n }\\n uint256 temp = value;\\n uint256 length = 0;\\n while (temp != 0) {\\n length++;\\n temp >>= 8;\\n }\\n return toHexString(value, length);\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0x32c202bd28995dd20c4347b7c6467a6d3241c74c8ad3edcbb610cd9205916c45\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/core/Badges.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {ERC1155} from '@openzeppelin/contracts/token/ERC1155/ERC1155.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\nimport {ERC1155Pausable} from '@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol';\\nimport {AccessControl} from '@openzeppelin/contracts/access/AccessControl.sol';\\nimport {IAttestationsRegistry} from './interfaces/IAttestationsRegistry.sol';\\nimport {IBadges} from './interfaces/IBadges.sol';\\n\\n/**\\n * @title Badges contract\\n * @author Sismo\\n * @notice Stateless, Non-transferrable ERC1155 contract. Reads balance from the values of attestations\\n * The associated attestations registry triggers TransferSingle events from this contract\\n * It allows badge \\\"shadow mints and burns\\\" to be caught by off-chain platforms\\n * For more information: https://badges.docs.sismo.io\\n */\\ncontract Badges is IBadges, Initializable, AccessControl, ERC1155 {\\n IAttestationsRegistry internal _attestationsRegistry;\\n\\n bytes32 public constant EVENT_TRIGGERER_ROLE = keccak256('EVENT_TRIGGERER_ROLE');\\n\\n /**\\n * @dev Constructor\\n * @param uri Uri for the metadata of badges\\n * @param owner Owner of the contract, super admin, can setup roles and update the attestation registry\\n */\\n constructor(\\n string memory uri,\\n address owner // This is Sismo Frontend Contract\\n ) ERC1155(uri) {\\n initialize(uri, owner);\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param uri Uri for the metadata of badges\\n * @param owner Owner of the contract, super admin, can setup roles and update the attestation registry\\n */\\n function initialize(string memory uri, address owner) public initializer {\\n _setURI(uri);\\n _grantRole(DEFAULT_ADMIN_ROLE, owner);\\n }\\n\\n /**\\n * @dev Main function of the ERC1155 badge\\n * The balance of a user is equal to the value of the underlying attestation.\\n * attestationCollectionId == badgeId\\n * @param account Address to check badge balance (= value of attestation)\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function balanceOf(address account, uint256 id)\\n public\\n view\\n virtual\\n override(ERC1155, IBadges)\\n returns (uint256)\\n {\\n return _attestationsRegistry.getAttestationValue(id, account);\\n }\\n\\n /**\\n * @dev Emits a TransferSingle event, so subgraphs and other off-chain apps relying on events can see badge minting/burning\\n * can only be called by address having the EVENT_TRIGGERER_ROLE (attestations registry address)\\n * @param operator who is calling the TransferEvent\\n * @param from address(0) if minting, address of the badge holder if burning\\n * @param to address of the badge holder is minting, address(0) if burning\\n * @param id badgeId for which to trigger the event\\n * @param value minted/burned balance\\n */\\n function triggerTransferEvent(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 value\\n ) external onlyRole(EVENT_TRIGGERER_ROLE) {\\n emit TransferSingle(operator, from, to, id, value);\\n }\\n\\n /**\\n * @dev Set the attestations registry address. Can only be called by owner (default admin)\\n * @param attestationsRegistry new attestations registry address\\n */\\n function setAttestationsRegistry(address attestationsRegistry)\\n external\\n override\\n onlyRole(DEFAULT_ADMIN_ROLE)\\n {\\n _attestationsRegistry = IAttestationsRegistry(attestationsRegistry);\\n }\\n\\n /**\\n * @dev Set the URI. Can only be called by owner (default admin)\\n * @param uri new attestations registry address\\n */\\n function setUri(string memory uri) external override onlyRole(DEFAULT_ADMIN_ROLE) {\\n _setURI(uri);\\n }\\n\\n /**\\n * @dev Getter of the attestations registry\\n */\\n function getAttestationsRegistry() external view override returns (address) {\\n return address(_attestationsRegistry);\\n }\\n\\n /**\\n * @dev ERC165\\n */\\n function supportsInterface(bytes4 interfaceId)\\n public\\n view\\n virtual\\n override(AccessControl, ERC1155)\\n returns (bool)\\n {\\n return super.supportsInterface(interfaceId);\\n }\\n\\n /**\\n * @dev Reverts, this is a non transferable ERC115 contract\\n */\\n function _beforeTokenTransfer(\\n address operator,\\n address from,\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual override {\\n revert BadgesNonTransferrable();\\n }\\n}\\n\",\"keccak256\":\"0xd28d7becc4275b5330249a48ecf5580b9f9f5c559e1a29a7c30be5caf23332ce\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttestationsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Attestation, AttestationData} from '../libs/Structs.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry {\\n event AttestationRecorded(Attestation attestation);\\n event AttestationDeleted(Attestation attestation);\\n\\n /**\\n * @dev Main function to be called by authorized issuers\\n * @param attestations Attestations to be recorded (creates a new one or overrides an existing one)\\n */\\n function recordAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Delete function to be called by authorized issuers\\n * @param attestations Attestations to be deleted\\n */\\n function deleteAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Returns whether a user has an attestation from a collection\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function hasAttestation(uint256 collectionId, address owner) external returns (bool);\\n\\n /**\\n * @dev Getter of the data of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationData(uint256 collectionId, address owner)\\n external\\n view\\n returns (AttestationData memory);\\n\\n /**\\n * @dev Getter of the value of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationValue(uint256 collectionId, address owner) external view returns (uint256);\\n\\n /**\\n * @dev Getter of the data of a specific attestation as tuple\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationDataTuple(uint256 collectionId, address owner)\\n external\\n view\\n returns (\\n address,\\n uint256,\\n uint32,\\n bytes memory\\n );\\n\\n /**\\n * @dev Getter of the extraData of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationExtraData(uint256 collectionId, address owner)\\n external\\n view\\n returns (bytes memory);\\n\\n /**\\n * @dev Getter of the issuer of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationIssuer(uint256 collectionId, address owner)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @dev Getter of the timestamp of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationTimestamp(uint256 collectionId, address owner)\\n external\\n view\\n returns (uint32);\\n\\n /**\\n * @dev Getter of the data of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationDataBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (AttestationData[] memory);\\n\\n /**\\n * @dev Getter of the values of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationValueBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xb5e25bd7e0372c9973e582fb7fe96318c145831a5452d8c79eb848a7464b0297\",\"license\":\"MIT\"},\"contracts/core/interfaces/IBadges.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title Interface for Badges contract\\n * @author Sismo\\n * @notice Stateless ERC1155 contract. Reads balance from the values of attestations\\n * The associated attestations registry triggers TransferSingle events from this contract\\n * It allows badge \\\"shadow mints and burns\\\" to be caught by off-chain platforms\\n */\\ninterface IBadges {\\n error BadgesNonTransferrable();\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param uri Uri for the metadata of badges\\n * @param owner Owner of the contract, super admin, can setup roles and update the attestation registry\\n */\\n function initialize(string memory uri, address owner) external;\\n\\n /**\\n * @dev Main function of the ERC1155 badge\\n * The balance of a user is equal to the value of the underlying attestation.\\n * attestationCollectionId == badgeId\\n * @param account Address to check badge balance (= value of attestation)\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev Emits a TransferSingle event, so subgraphs and other off-chain apps relying on events can see badge minting/burning\\n * can only be called by address having the EVENT_TRIGGERER_ROLE (attestations registry address)\\n * @param operator who is calling the TransferEvent\\n * @param from address(0) if minting, address of the badge holder if burning\\n * @param to address of the badge holder is minting, address(0) if burning\\n * @param id badgeId for which to trigger the event\\n * @param value minted/burned balance\\n */\\n function triggerTransferEvent(\\n address operator,\\n address from,\\n address to,\\n uint256 id,\\n uint256 value\\n ) external;\\n\\n /**\\n * @dev Set the attestations registry address. Can only be called by owner (default admin)\\n * @param attestationsRegistry new attestations registry address\\n */\\n function setAttestationsRegistry(address attestationsRegistry) external;\\n\\n /**\\n * @dev Set the URI. Can only be called by owner (default admin)\\n * @param uri new attestations registry address\\n */\\n function setUri(string memory uri) external;\\n\\n /**\\n * @dev Getter of the attestations registry\\n */\\n function getAttestationsRegistry() external view returns (address);\\n}\\n\",\"keccak256\":\"0xbd279560345ab0f4d4b7f689e714f907522676fe86b17341db034b5a98799019\",\"license\":\"MIT\"},\"contracts/core/libs/Structs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title Attestations Registry State\\n * @author Sismo\\n * @notice This contract holds all of the storage variables and data\\n * structures used by the AttestationsRegistry and parent\\n * contracts.\\n */\\n\\n// User Attestation Request, can be made by any user\\n// The context of an Attestation Request is a specific attester contract\\n// Each attester has groups of accounts in its available data\\n// eg: for a specific attester:\\n// group 1 <=> accounts that sent txs on mainnet\\n// group 2 <=> accounts that sent txs on polygon\\n// eg: for another attester:\\n// group 1 <=> accounts that sent eth txs in 2022\\n// group 2 <=> accounts sent eth txs in 2021\\nstruct Request {\\n // implicit address attester;\\n // implicit uint256 chainId;\\n Claim[] claims;\\n address destination; // destination that will receive the end attestation\\n}\\n\\nstruct Claim {\\n uint256 groupId; // user claims to have an account in this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n bytes extraData; // arbitrary data, may be required by the attester to verify claims or generate a specific attestation\\n}\\n\\n/**\\n * @dev Attestation Struct. This is the struct receive as argument by the Attestation Registry.\\n * @param collectionId Attestation collection\\n * @param owner Attestation collection\\n * @param issuer Attestation collection\\n * @param value Attestation collection\\n * @param timestamp Attestation collection\\n * @param extraData Attestation collection\\n */\\nstruct Attestation {\\n // implicit uint256 chainId;\\n uint256 collectionId; // Id of the attestation collection (in the registry)\\n address owner; // Owner of the attestation\\n address issuer; // Contract that created or last updated the record.\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Timestamp chosen by the attester, should correspond to the effective date of the attestation\\n // it is different from the recording timestamp (date when the attestation was recorded)\\n // e.g a proof of NFT ownership may have be recorded today which is 2 month old data.\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\\n// Attestation Data, stored in the registry\\n// The context is a specific owner of a specific collection\\nstruct AttestationData {\\n // implicit uint256 chainId\\n // implicit uint256 collectionId - from context\\n // implicit owner\\n address issuer; // Address of the contract that recorded the attestation\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Effective date of issuance of the attestation. (can be different from the recording timestamp)\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\",\"keccak256\":\"0x893d9a10429878dd4077388ff4da954c20b86a3c172a7bbdd10a01eb5d39b6a0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50604051620021de380380620021de8339810160408190526200003491620002de565b81620000408162000055565b506200004d82826200006e565b50506200040b565b80516200006a90600490602084019062000205565b5050565b600054610100900460ff166200008b5760005460ff161562000095565b6200009562000150565b620000fd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801562000120576000805461ffff19166101011790555b6200012b8362000055565b620001386000836200016e565b80156200014b576000805461ff00191690555b505050565b60006200016830620001f660201b620009511760201c565b15905090565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166200006a5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6001600160a01b03163b151590565b8280546200021390620003cf565b90600052602060002090601f01602090048101928262000237576000855562000282565b82601f106200025257805160ff191683800117855562000282565b8280016001018555821562000282579182015b828111156200028257825182559160200191906001019062000265565b506200029092915062000294565b5090565b5b8082111562000290576000815560010162000295565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b0381168114620002d957600080fd5b919050565b60008060408385031215620002f257600080fd5b82516001600160401b03808211156200030a57600080fd5b818501915085601f8301126200031f57600080fd5b815181811115620003345762000334620002ab565b604051601f8201601f19908116603f011681019083821181831017156200035f576200035f620002ab565b816040528281526020935088848487010111156200037c57600080fd5b600091505b82821015620003a0578482018401518183018501529083019062000381565b82821115620003b25760008484830101525b9550620003c4915050858201620002c1565b925050509250929050565b600181811c90821680620003e457607f821691505b6020821081036200040557634e487b7160e01b600052602260045260246000fd5b50919050565b611dc3806200041b6000396000f3fe608060405234801561001057600080fd5b506004361061012b5760003560e01c8063730cb7d5116100ad578063a22cb46511610071578063a22cb465146102ae578063b3c1cb21146102c1578063d547741f146102d4578063e985e9c5146102e7578063f242432a1461032357600080fd5b8063730cb7d5146102525780637ab4339d1461026d57806391d14854146102805780639b642de114610293578063a217fddf146102a657600080fd5b80632f2ff15d116100f45780632f2ff15d146101d257806336568abe146101e557806344112ed8146101f85780634e1273f41461021f578063710b30961461023f57600080fd5b8062fdd58e1461013057806301ffc9a7146101565780630e89341c14610179578063248a9ca3146101995780632eb2c2d6146101bd575b600080fd5b61014361013e3660046113e7565b610336565b6040519081526020015b60405180910390f35b61016961016436600461142a565b6103b3565b604051901515815260200161014d565b61018c610187366004611447565b6103c4565b60405161014d91906114bc565b6101436101a7366004611447565b6000908152600160208190526040909120015490565b6101d06101cb36600461161b565b610458565b005b6101d06101e03660046116c5565b6104f4565b6101d06101f33660046116c5565b610520565b6101437fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa481565b61023261022d3660046116f1565b61059e565b60405161014d91906117f7565b6101d061024d36600461180a565b6106c8565b6005546040516001600160a01b03909116815260200161014d565b6101d061027b36600461185f565b61075b565b61016961028e3660046116c5565b610829565b6101d06102a13660046118a4565b610854565b610143600081565b6101d06102bc3660046118e1565b610869565b6101d06102cf36600461191d565b610874565b6101d06102e23660046116c5565b6108a3565b6101696102f5366004611938565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b6101d0610331366004611962565b6108ca565b60055460405163461e4f1960e11b8152600481018390526001600160a01b0384811660248301526000921690638c3c9e3290604401602060405180830381865afa158015610388573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ac91906119c7565b9392505050565b60006103be82610960565b92915050565b6060600480546103d3906119e0565b80601f01602080910402602001604051908101604052809291908181526020018280546103ff906119e0565b801561044c5780601f106104215761010080835404028352916020019161044c565b820191906000526020600020905b81548152906001019060200180831161042f57829003601f168201915b50505050509050919050565b6001600160a01b038516331480610474575061047485336102f5565b6104e05760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084015b60405180910390fd5b6104ed85858585856109a0565b5050505050565b600082815260016020819052604090912001546105118133610b8e565b61051b8383610bf2565b505050565b6001600160a01b03811633146105905760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016104d7565b61059a8282610c5d565b5050565b606081518351146106035760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016104d7565b6000835167ffffffffffffffff81111561061f5761061f6114cf565b604051908082528060200260200182016040528015610648578160200160208202803683370190505b50905060005b84518110156106c05761069385828151811061066c5761066c611a1a565b602002602001015185838151811061068657610686611a1a565b6020026020010151610336565b8282815181106106a5576106a5611a1a565b60209081029190910101526106b981611a46565b905061064e565b509392505050565b7fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa46106f38133610b8e565b836001600160a01b0316856001600160a01b0316876001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62868660405161074b929190918252602082015260400190565b60405180910390a4505050505050565b600054610100900460ff166107765760005460ff161561077a565b303b155b6107dd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104d7565b600054610100900460ff161580156107ff576000805461ffff19166101011790555b61080883610cc4565b610813600083610bf2565b801561051b576000805461ff0019169055505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60006108608133610b8e565b61059a82610cc4565b61059a338383610cd7565b60006108808133610b8e565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260016020819052604090912001546108c08133610b8e565b61051b8383610c5d565b6001600160a01b0385163314806108e657506108e685336102f5565b6109445760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016104d7565b6104ed8585858585610db7565b6001600160a01b03163b151590565b60006001600160e01b03198216636cdb3d1360e11b148061099157506001600160e01b031982166303a24d0760e21b145b806103be57506103be82610ee7565b8151835114610a025760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016104d7565b6001600160a01b038416610a285760405162461bcd60e51b81526004016104d790611a5f565b33610a37818787878787610f1c565b60005b8451811015610b20576000858281518110610a5757610a57611a1a565b602002602001015190506000858381518110610a7557610a75611a1a565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610ac65760405162461bcd60e51b81526004016104d790611aa4565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610b05908490611aee565b9250508190555050505080610b1990611a46565b9050610a3a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610b70929190611b06565b60405180910390a4610b86818787878787610f35565b505050505050565b610b988282610829565b61059a57610bb0816001600160a01b03166014611090565b610bbb836020611090565b604051602001610bcc929190611b34565b60408051601f198184030181529082905262461bcd60e51b82526104d7916004016114bc565b610bfc8282610829565b61059a5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610c678282610829565b1561059a5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b805161059a906004906020840190611332565b816001600160a01b0316836001600160a01b031603610d4a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016104d7565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416610ddd5760405162461bcd60e51b81526004016104d790611a5f565b33610dfc818787610ded8861122c565b610df68861122c565b87610f1c565b60008481526002602090815260408083206001600160a01b038a16845290915290205483811015610e3f5760405162461bcd60e51b81526004016104d790611aa4565b60008581526002602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290610e7e908490611aee565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610ede828888888888611277565b50505050505050565b60006001600160e01b03198216637965db0b60e01b14806103be57506301ffc9a760e01b6001600160e01b03198316146103be565b6040516309a711b960e31b815260040160405180910390fd5b6001600160a01b0384163b15610b865760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190610f799089908990889088908890600401611ba9565b6020604051808303816000875af1925050508015610fb4575060408051601f3d908101601f19168201909252610fb191810190611c07565b60015b61106057610fc0611c24565b806308c379a003610ff95750610fd4611c40565b80610fdf5750610ffb565b8060405162461bcd60e51b81526004016104d791906114bc565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016104d7565b6001600160e01b0319811663bc197c8160e01b14610ede5760405162461bcd60e51b81526004016104d790611cca565b6060600061109f836002611d12565b6110aa906002611aee565b67ffffffffffffffff8111156110c2576110c26114cf565b6040519080825280601f01601f1916602001820160405280156110ec576020820181803683370190505b509050600360fc1b8160008151811061110757611107611a1a565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061113657611136611a1a565b60200101906001600160f81b031916908160001a905350600061115a846002611d12565b611165906001611aee565b90505b60018111156111dd576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061119957611199611a1a565b1a60f81b8282815181106111af576111af611a1a565b60200101906001600160f81b031916908160001a90535060049490941c936111d681611d31565b9050611168565b5083156103ac5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104d7565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061126657611266611a1a565b602090810291909101015292915050565b6001600160a01b0384163b15610b865760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906112bb9089908990889088908890600401611d48565b6020604051808303816000875af19250505080156112f6575060408051601f3d908101601f191682019092526112f391810190611c07565b60015b61130257610fc0611c24565b6001600160e01b0319811663f23a6e6160e01b14610ede5760405162461bcd60e51b81526004016104d790611cca565b82805461133e906119e0565b90600052602060002090601f01602090048101928261136057600085556113a6565b82601f1061137957805160ff19168380011785556113a6565b828001600101855582156113a6579182015b828111156113a657825182559160200191906001019061138b565b506113b29291506113b6565b5090565b5b808211156113b257600081556001016113b7565b80356001600160a01b03811681146113e257600080fd5b919050565b600080604083850312156113fa57600080fd5b611403836113cb565b946020939093013593505050565b6001600160e01b03198116811461142757600080fd5b50565b60006020828403121561143c57600080fd5b81356103ac81611411565b60006020828403121561145957600080fd5b5035919050565b60005b8381101561147b578181015183820152602001611463565b8381111561148a576000848401525b50505050565b600081518084526114a8816020860160208601611460565b601f01601f19169290920160200192915050565b6020815260006103ac6020830184611490565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff8111828210171561150b5761150b6114cf565b6040525050565b600067ffffffffffffffff82111561152c5761152c6114cf565b5060051b60200190565b600082601f83011261154757600080fd5b8135602061155482611512565b60405161156182826114e5565b83815260059390931b850182019282810191508684111561158157600080fd5b8286015b8481101561159c5780358352918301918301611585565b509695505050505050565b600082601f8301126115b857600080fd5b813567ffffffffffffffff8111156115d2576115d26114cf565b6040516115e9601f8301601f1916602001826114e5565b8181528460208386010111156115fe57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561163357600080fd5b61163c866113cb565b945061164a602087016113cb565b9350604086013567ffffffffffffffff8082111561166757600080fd5b61167389838a01611536565b9450606088013591508082111561168957600080fd5b61169589838a01611536565b935060808801359150808211156116ab57600080fd5b506116b8888289016115a7565b9150509295509295909350565b600080604083850312156116d857600080fd5b823591506116e8602084016113cb565b90509250929050565b6000806040838503121561170457600080fd5b823567ffffffffffffffff8082111561171c57600080fd5b818501915085601f83011261173057600080fd5b8135602061173d82611512565b60405161174a82826114e5565b83815260059390931b850182019282810191508984111561176a57600080fd5b948201945b8386101561178f57611780866113cb565b8252948201949082019061176f565b965050860135925050808211156117a557600080fd5b506117b285828601611536565b9150509250929050565b600081518084526020808501945080840160005b838110156117ec578151875295820195908201906001016117d0565b509495945050505050565b6020815260006103ac60208301846117bc565b600080600080600060a0868803121561182257600080fd5b61182b866113cb565b9450611839602087016113cb565b9350611847604087016113cb565b94979396509394606081013594506080013592915050565b6000806040838503121561187257600080fd5b823567ffffffffffffffff81111561188957600080fd5b611895858286016115a7565b9250506116e8602084016113cb565b6000602082840312156118b657600080fd5b813567ffffffffffffffff8111156118cd57600080fd5b6118d9848285016115a7565b949350505050565b600080604083850312156118f457600080fd5b6118fd836113cb565b91506020830135801515811461191257600080fd5b809150509250929050565b60006020828403121561192f57600080fd5b6103ac826113cb565b6000806040838503121561194b57600080fd5b611954836113cb565b91506116e8602084016113cb565b600080600080600060a0868803121561197a57600080fd5b611983866113cb565b9450611991602087016113cb565b93506040860135925060608601359150608086013567ffffffffffffffff8111156119bb57600080fd5b6116b8888289016115a7565b6000602082840312156119d957600080fd5b5051919050565b600181811c908216806119f457607f821691505b602082108103611a1457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611a5857611a58611a30565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115611b0157611b01611a30565b500190565b604081526000611b1960408301856117bc565b8281036020840152611b2b81856117bc565b95945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611b6c816017850160208801611460565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611b9d816028840160208801611460565b01602801949350505050565b6001600160a01b0386811682528516602082015260a060408201819052600090611bd5908301866117bc565b8281036060840152611be781866117bc565b90508281036080840152611bfb8185611490565b98975050505050505050565b600060208284031215611c1957600080fd5b81516103ac81611411565b600060033d1115611c3d5760046000803e5060005160e01c5b90565b600060443d1015611c4e5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611c7e57505050505090565b8285019150815181811115611c965750505050505090565b843d8701016020828501011115611cb05750505050505090565b611cbf602082860101876114e5565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6000816000190483118215151615611d2c57611d2c611a30565b500290565b600081611d4057611d40611a30565b506000190190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611d8290830184611490565b97965050505050505056fea2646970667358221220317dacb4b6900e7dfecfdaa97dbb0082f85182a364bff474b738708885ea258064736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061012b5760003560e01c8063730cb7d5116100ad578063a22cb46511610071578063a22cb465146102ae578063b3c1cb21146102c1578063d547741f146102d4578063e985e9c5146102e7578063f242432a1461032357600080fd5b8063730cb7d5146102525780637ab4339d1461026d57806391d14854146102805780639b642de114610293578063a217fddf146102a657600080fd5b80632f2ff15d116100f45780632f2ff15d146101d257806336568abe146101e557806344112ed8146101f85780634e1273f41461021f578063710b30961461023f57600080fd5b8062fdd58e1461013057806301ffc9a7146101565780630e89341c14610179578063248a9ca3146101995780632eb2c2d6146101bd575b600080fd5b61014361013e3660046113e7565b610336565b6040519081526020015b60405180910390f35b61016961016436600461142a565b6103b3565b604051901515815260200161014d565b61018c610187366004611447565b6103c4565b60405161014d91906114bc565b6101436101a7366004611447565b6000908152600160208190526040909120015490565b6101d06101cb36600461161b565b610458565b005b6101d06101e03660046116c5565b6104f4565b6101d06101f33660046116c5565b610520565b6101437fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa481565b61023261022d3660046116f1565b61059e565b60405161014d91906117f7565b6101d061024d36600461180a565b6106c8565b6005546040516001600160a01b03909116815260200161014d565b6101d061027b36600461185f565b61075b565b61016961028e3660046116c5565b610829565b6101d06102a13660046118a4565b610854565b610143600081565b6101d06102bc3660046118e1565b610869565b6101d06102cf36600461191d565b610874565b6101d06102e23660046116c5565b6108a3565b6101696102f5366004611938565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b6101d0610331366004611962565b6108ca565b60055460405163461e4f1960e11b8152600481018390526001600160a01b0384811660248301526000921690638c3c9e3290604401602060405180830381865afa158015610388573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ac91906119c7565b9392505050565b60006103be82610960565b92915050565b6060600480546103d3906119e0565b80601f01602080910402602001604051908101604052809291908181526020018280546103ff906119e0565b801561044c5780601f106104215761010080835404028352916020019161044c565b820191906000526020600020905b81548152906001019060200180831161042f57829003601f168201915b50505050509050919050565b6001600160a01b038516331480610474575061047485336102f5565b6104e05760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084015b60405180910390fd5b6104ed85858585856109a0565b5050505050565b600082815260016020819052604090912001546105118133610b8e565b61051b8383610bf2565b505050565b6001600160a01b03811633146105905760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016104d7565b61059a8282610c5d565b5050565b606081518351146106035760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016104d7565b6000835167ffffffffffffffff81111561061f5761061f6114cf565b604051908082528060200260200182016040528015610648578160200160208202803683370190505b50905060005b84518110156106c05761069385828151811061066c5761066c611a1a565b602002602001015185838151811061068657610686611a1a565b6020026020010151610336565b8282815181106106a5576106a5611a1a565b60209081029190910101526106b981611a46565b905061064e565b509392505050565b7fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa46106f38133610b8e565b836001600160a01b0316856001600160a01b0316876001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62868660405161074b929190918252602082015260400190565b60405180910390a4505050505050565b600054610100900460ff166107765760005460ff161561077a565b303b155b6107dd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104d7565b600054610100900460ff161580156107ff576000805461ffff19166101011790555b61080883610cc4565b610813600083610bf2565b801561051b576000805461ff0019169055505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60006108608133610b8e565b61059a82610cc4565b61059a338383610cd7565b60006108808133610b8e565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260016020819052604090912001546108c08133610b8e565b61051b8383610c5d565b6001600160a01b0385163314806108e657506108e685336102f5565b6109445760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016104d7565b6104ed8585858585610db7565b6001600160a01b03163b151590565b60006001600160e01b03198216636cdb3d1360e11b148061099157506001600160e01b031982166303a24d0760e21b145b806103be57506103be82610ee7565b8151835114610a025760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016104d7565b6001600160a01b038416610a285760405162461bcd60e51b81526004016104d790611a5f565b33610a37818787878787610f1c565b60005b8451811015610b20576000858281518110610a5757610a57611a1a565b602002602001015190506000858381518110610a7557610a75611a1a565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610ac65760405162461bcd60e51b81526004016104d790611aa4565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610b05908490611aee565b9250508190555050505080610b1990611a46565b9050610a3a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610b70929190611b06565b60405180910390a4610b86818787878787610f35565b505050505050565b610b988282610829565b61059a57610bb0816001600160a01b03166014611090565b610bbb836020611090565b604051602001610bcc929190611b34565b60408051601f198184030181529082905262461bcd60e51b82526104d7916004016114bc565b610bfc8282610829565b61059a5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610c678282610829565b1561059a5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b805161059a906004906020840190611332565b816001600160a01b0316836001600160a01b031603610d4a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016104d7565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416610ddd5760405162461bcd60e51b81526004016104d790611a5f565b33610dfc818787610ded8861122c565b610df68861122c565b87610f1c565b60008481526002602090815260408083206001600160a01b038a16845290915290205483811015610e3f5760405162461bcd60e51b81526004016104d790611aa4565b60008581526002602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290610e7e908490611aee565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610ede828888888888611277565b50505050505050565b60006001600160e01b03198216637965db0b60e01b14806103be57506301ffc9a760e01b6001600160e01b03198316146103be565b6040516309a711b960e31b815260040160405180910390fd5b6001600160a01b0384163b15610b865760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190610f799089908990889088908890600401611ba9565b6020604051808303816000875af1925050508015610fb4575060408051601f3d908101601f19168201909252610fb191810190611c07565b60015b61106057610fc0611c24565b806308c379a003610ff95750610fd4611c40565b80610fdf5750610ffb565b8060405162461bcd60e51b81526004016104d791906114bc565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016104d7565b6001600160e01b0319811663bc197c8160e01b14610ede5760405162461bcd60e51b81526004016104d790611cca565b6060600061109f836002611d12565b6110aa906002611aee565b67ffffffffffffffff8111156110c2576110c26114cf565b6040519080825280601f01601f1916602001820160405280156110ec576020820181803683370190505b509050600360fc1b8160008151811061110757611107611a1a565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061113657611136611a1a565b60200101906001600160f81b031916908160001a905350600061115a846002611d12565b611165906001611aee565b90505b60018111156111dd576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061119957611199611a1a565b1a60f81b8282815181106111af576111af611a1a565b60200101906001600160f81b031916908160001a90535060049490941c936111d681611d31565b9050611168565b5083156103ac5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104d7565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061126657611266611a1a565b602090810291909101015292915050565b6001600160a01b0384163b15610b865760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906112bb9089908990889088908890600401611d48565b6020604051808303816000875af19250505080156112f6575060408051601f3d908101601f191682019092526112f391810190611c07565b60015b61130257610fc0611c24565b6001600160e01b0319811663f23a6e6160e01b14610ede5760405162461bcd60e51b81526004016104d790611cca565b82805461133e906119e0565b90600052602060002090601f01602090048101928261136057600085556113a6565b82601f1061137957805160ff19168380011785556113a6565b828001600101855582156113a6579182015b828111156113a657825182559160200191906001019061138b565b506113b29291506113b6565b5090565b5b808211156113b257600081556001016113b7565b80356001600160a01b03811681146113e257600080fd5b919050565b600080604083850312156113fa57600080fd5b611403836113cb565b946020939093013593505050565b6001600160e01b03198116811461142757600080fd5b50565b60006020828403121561143c57600080fd5b81356103ac81611411565b60006020828403121561145957600080fd5b5035919050565b60005b8381101561147b578181015183820152602001611463565b8381111561148a576000848401525b50505050565b600081518084526114a8816020860160208601611460565b601f01601f19169290920160200192915050565b6020815260006103ac6020830184611490565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff8111828210171561150b5761150b6114cf565b6040525050565b600067ffffffffffffffff82111561152c5761152c6114cf565b5060051b60200190565b600082601f83011261154757600080fd5b8135602061155482611512565b60405161156182826114e5565b83815260059390931b850182019282810191508684111561158157600080fd5b8286015b8481101561159c5780358352918301918301611585565b509695505050505050565b600082601f8301126115b857600080fd5b813567ffffffffffffffff8111156115d2576115d26114cf565b6040516115e9601f8301601f1916602001826114e5565b8181528460208386010111156115fe57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561163357600080fd5b61163c866113cb565b945061164a602087016113cb565b9350604086013567ffffffffffffffff8082111561166757600080fd5b61167389838a01611536565b9450606088013591508082111561168957600080fd5b61169589838a01611536565b935060808801359150808211156116ab57600080fd5b506116b8888289016115a7565b9150509295509295909350565b600080604083850312156116d857600080fd5b823591506116e8602084016113cb565b90509250929050565b6000806040838503121561170457600080fd5b823567ffffffffffffffff8082111561171c57600080fd5b818501915085601f83011261173057600080fd5b8135602061173d82611512565b60405161174a82826114e5565b83815260059390931b850182019282810191508984111561176a57600080fd5b948201945b8386101561178f57611780866113cb565b8252948201949082019061176f565b965050860135925050808211156117a557600080fd5b506117b285828601611536565b9150509250929050565b600081518084526020808501945080840160005b838110156117ec578151875295820195908201906001016117d0565b509495945050505050565b6020815260006103ac60208301846117bc565b600080600080600060a0868803121561182257600080fd5b61182b866113cb565b9450611839602087016113cb565b9350611847604087016113cb565b94979396509394606081013594506080013592915050565b6000806040838503121561187257600080fd5b823567ffffffffffffffff81111561188957600080fd5b611895858286016115a7565b9250506116e8602084016113cb565b6000602082840312156118b657600080fd5b813567ffffffffffffffff8111156118cd57600080fd5b6118d9848285016115a7565b949350505050565b600080604083850312156118f457600080fd5b6118fd836113cb565b91506020830135801515811461191257600080fd5b809150509250929050565b60006020828403121561192f57600080fd5b6103ac826113cb565b6000806040838503121561194b57600080fd5b611954836113cb565b91506116e8602084016113cb565b600080600080600060a0868803121561197a57600080fd5b611983866113cb565b9450611991602087016113cb565b93506040860135925060608601359150608086013567ffffffffffffffff8111156119bb57600080fd5b6116b8888289016115a7565b6000602082840312156119d957600080fd5b5051919050565b600181811c908216806119f457607f821691505b602082108103611a1457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611a5857611a58611a30565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115611b0157611b01611a30565b500190565b604081526000611b1960408301856117bc565b8281036020840152611b2b81856117bc565b95945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611b6c816017850160208801611460565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611b9d816028840160208801611460565b01602801949350505050565b6001600160a01b0386811682528516602082015260a060408201819052600090611bd5908301866117bc565b8281036060840152611be781866117bc565b90508281036080840152611bfb8185611490565b98975050505050505050565b600060208284031215611c1957600080fd5b81516103ac81611411565b600060033d1115611c3d5760046000803e5060005160e01c5b90565b600060443d1015611c4e5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611c7e57505050505090565b8285019150815181811115611c965750505050505090565b843d8701016020828501011115611cb05750505050505090565b611cbf602082860101876114e5565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6000816000190483118215151615611d2c57611d2c611a30565b500290565b600081611d4057611d40611a30565b506000190190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611d8290830184611490565b97965050505050505056fea2646970667358221220317dacb4b6900e7dfecfdaa97dbb0082f85182a364bff474b738708885ea258064736f6c634300080e0033", + "devdoc": { + "author": "Sismo", + "kind": "dev", + "methods": { + "balanceOf(address,uint256)": { + "details": "Main function of the ERC1155 badge The balance of a user is equal to the value of the underlying attestation. attestationCollectionId == badgeId", + "params": { + "account": "Address to check badge balance (= value of attestation)", + "id": "Badge Id to check (= attestationCollectionId)" + } + }, + "balanceOfBatch(address[],uint256[])": { + "details": "See {IERC1155-balanceOfBatch}. Requirements: - `accounts` and `ids` must have the same length." + }, + "constructor": { + "details": "Constructor", + "params": { + "owner": "Owner of the contract, super admin, can setup roles and update the attestation registry", + "uri": "Uri for the metadata of badges" + } + }, + "getAttestationsRegistry()": { + "details": "Getter of the attestations registry" + }, + "getRoleAdmin(bytes32)": { + "details": "Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}." + }, + "grantRole(bytes32,address)": { + "details": "Grants `role` to `account`. If `account` had not been already granted `role`, emits a {RoleGranted} event. Requirements: - the caller must have ``role``'s admin role." + }, + "hasRole(bytes32,address)": { + "details": "Returns `true` if `account` has been granted `role`." + }, + "initialize(string,address)": { + "details": "Initializes the contract, to be called by the proxy delegating calls to this implementation", + "params": { + "owner": "Owner of the contract, super admin, can setup roles and update the attestation registry", + "uri": "Uri for the metadata of badges" + } + }, + "isApprovedForAll(address,address)": { + "details": "See {IERC1155-isApprovedForAll}." + }, + "renounceRole(bytes32,address)": { + "details": "Revokes `role` from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked `role`, emits a {RoleRevoked} event. Requirements: - the caller must be `account`." + }, + "revokeRole(bytes32,address)": { + "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role." + }, + "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": { + "details": "See {IERC1155-safeBatchTransferFrom}." + }, + "safeTransferFrom(address,address,uint256,uint256,bytes)": { + "details": "See {IERC1155-safeTransferFrom}." + }, + "setApprovalForAll(address,bool)": { + "details": "See {IERC1155-setApprovalForAll}." + }, + "setAttestationsRegistry(address)": { + "details": "Set the attestations registry address. Can only be called by owner (default admin)", + "params": { + "attestationsRegistry": "new attestations registry address" + } + }, + "setUri(string)": { + "details": "Set the URI. Can only be called by owner (default admin)", + "params": { + "uri": "new attestations registry address" + } + }, + "supportsInterface(bytes4)": { + "details": "ERC165" + }, + "triggerTransferEvent(address,address,address,uint256,uint256)": { + "details": "Emits a TransferSingle event, so subgraphs and other off-chain apps relying on events can see badge minting/burning can only be called by address having the EVENT_TRIGGERER_ROLE (attestations registry address)", + "params": { + "from": "address(0) if minting, address of the badge holder if burning", + "id": "badgeId for which to trigger the event", + "operator": "who is calling the TransferEvent", + "to": "address of the badge holder is minting, address(0) if burning", + "value": "minted/burned balance" + } + }, + "uri(uint256)": { + "details": "See {IERC1155MetadataURI-uri}. This implementation returns the same URI for *all* token types. It relies on the token type ID substitution mechanism https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. Clients calling this function must replace the `\\{id\\}` substring with the actual token type ID." + } + }, + "title": "Badges contract", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "Stateless, Non-transferrable ERC1155 contract. Reads balance from the values of attestations The associated attestations registry triggers TransferSingle events from this contract It allows badge \"shadow mints and burns\" to be caught by off-chain platforms For more information: https://badges.docs.sismo.io", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 936, + "contract": "contracts/core/Badges.sol:Badges", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 939, + "contract": "contracts/core/Badges.sol:Badges", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 24, + "contract": "contracts/core/Badges.sol:Badges", + "label": "_roles", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_struct(RoleData)19_storage)" + }, + { + "astId": 1121, + "contract": "contracts/core/Badges.sol:Badges", + "label": "_balances", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_uint256))" + }, + { + "astId": 1127, + "contract": "contracts/core/Badges.sol:Badges", + "label": "_operatorApprovals", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 1129, + "contract": "contracts/core/Badges.sol:Badges", + "label": "_uri", + "offset": 0, + "slot": "4", + "type": "t_string_storage" + }, + { + "astId": 10475, + "contract": "contracts/core/Badges.sol:Badges", + "label": "_attestationsRegistry", + "offset": 0, + "slot": "5", + "type": "t_contract(IAttestationsRegistry)11151" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IAttestationsRegistry)11151": { + "encoding": "inplace", + "label": "contract IAttestationsRegistry", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(RoleData)19_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct AccessControl.RoleData)", + "numberOfBytes": "32", + "value": "t_struct(RoleData)19_storage" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_uint256))": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => mapping(address => uint256))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_uint256)" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(RoleData)19_storage": { + "encoding": "inplace", + "label": "struct AccessControl.RoleData", + "members": [ + { + "astId": 16, + "contract": "contracts/core/Badges.sol:Badges", + "label": "members", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 18, + "contract": "contracts/core/Badges.sol:Badges", + "label": "adminRole", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/BadgesProxy.json b/deployments/mumbai/BadgesProxy.json new file mode 100644 index 0000000..75e2ad0 --- /dev/null +++ b/deployments/mumbai/BadgesProxy.json @@ -0,0 +1,265 @@ +{ + "address": "0x5722fEa81027533721BA161964622271560da1aC", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x518f8960b7fce385010404e16b2ff2e955d5ed3410398ba0ae8c8f62f4294096", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x5722fEa81027533721BA161964622271560da1aC", + "transactionIndex": 32, + "gasUsed": "701703", + "logsBloom": "0x00000004000000000000000000000000400000000000000000000000000000000000000000000000200000000000000000008000002000002000000000000000000000002000000000000000000002800000000000000000040100000000000000000000020000000000000000000800000000800002000080000000000000000000000000000000000000000000000000000010000200000000000000808000200000000000000000000000000000000000000000000000001040000000004000000020000000000001000000000000000000000400000100100000000020000000000000000000000000000000004000000000000000000020000000100000", + "blockHash": "0x52748358a861e561785d396857837a92f3b3f61dd78f53fb56984db291625075", + "transactionHash": "0x518f8960b7fce385010404e16b2ff2e955d5ed3410398ba0ae8c8f62f4294096", + "logs": [ + { + "transactionIndex": 32, + "blockNumber": 28599971, + "transactionHash": "0x518f8960b7fce385010404e16b2ff2e955d5ed3410398ba0ae8c8f62f4294096", + "address": "0x5722fEa81027533721BA161964622271560da1aC", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000ca9ef6c891b3f045bd4a200029fcc1c38b65cce3" + ], + "data": "0x", + "logIndex": 154, + "blockHash": "0x52748358a861e561785d396857837a92f3b3f61dd78f53fb56984db291625075" + }, + { + "transactionIndex": 32, + "blockNumber": 28599971, + "transactionHash": "0x518f8960b7fce385010404e16b2ff2e955d5ed3410398ba0ae8c8f62f4294096", + "address": "0x5722fEa81027533721BA161964622271560da1aC", + "topics": [ + "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 155, + "blockHash": "0x52748358a861e561785d396857837a92f3b3f61dd78f53fb56984db291625075" + }, + { + "transactionIndex": 32, + "blockNumber": 28599971, + "transactionHash": "0x518f8960b7fce385010404e16b2ff2e955d5ed3410398ba0ae8c8f62f4294096", + "address": "0x5722fEa81027533721BA161964622271560da1aC", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000246e71bc2a257f4be9c7fad4664e6d7444844adc", + "logIndex": 156, + "blockHash": "0x52748358a861e561785d396857837a92f3b3f61dd78f53fb56984db291625075" + }, + { + "transactionIndex": 32, + "blockNumber": 28599971, + "transactionHash": "0x518f8960b7fce385010404e16b2ff2e955d5ed3410398ba0ae8c8f62f4294096", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x0000000000000000000000000000000000000000000000000003bd4af114490000000000000000000000000000000000000000000000000089b8ef93cc639fe9000000000000000000000000000000000000000000000a08c86a6594f368101f00000000000000000000000000000000000000000000000089b53248db4f56e9000000000000000000000000000000000000000000000a08c86e22dfe47c591f", + "logIndex": 157, + "blockHash": "0x52748358a861e561785d396857837a92f3b3f61dd78f53fb56984db291625075" + } + ], + "blockNumber": 28599971, + "cumulativeGasUsed": "10783156", + "status": 1, + "byzantium": true + }, + "args": [ + "0xcA9EF6c891B3f045bd4a200029FCC1C38B65CCe3", + "0x246E71bC2a257f4BE9C7fAD4664E6D7444844Adc", + "0x7ab4339d0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6000000000000000000000000000000000000000000000000000000000000003568747470733a2f2f6875622e73746167696e672e7a696b6965732e696f2f6261646765732f6d756d6261692f7b69647d2e6a736f6e0000000000000000000000" + ], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/periphery/utils/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0x0edeb16b9821ae2b16e9d69c383b38d3ad2fbb3e0c06cf809a0786d96e602551\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"contracts/periphery/utils/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n// Note: we just copied so that we can see the contract used\\npragma solidity ^0.8.14;\\n\\nimport {ERC1967Proxy} from '@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol';\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1));\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(''), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n ifAdmin\\n {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(\\n msg.sender != _getAdmin(),\\n 'TransparentUpgradeableProxy: admin cannot fallback to proxy target'\\n );\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0x0d943fb8814617343a244f762e791c664bb647e32d484ba94fe1958bac85f6dc\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000f2a38038062000f2a833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b60008051602062000ee3833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b60008051602062000ec383398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b6200022e1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e9838360405180606001604052806027815260200162000f036027913962000381565b9392505050565b60006200021a60008051602062000ec383398151915260001b6200046760201b620001ea1760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd60008051602062000ec383398151915260001b6200046760201b620001ea1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200025a1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd60008051602062000ee383398151915260001b6200046760201b620001ea1760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b61082b80620006986000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b5565b610118565b61005b6100933660046106d0565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b5565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107cf602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6104bb565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610368836104e3565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610523565b60606001600160a01b0384163b6104465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016102f5565b600080856001600160a01b031685604051610461919061077f565b600060405180830381855af49150503d806000811461049c576040519150601f19603f3d011682016040523d82523d6000602084013e6104a1565b606091505b50915091506104b18282866105cc565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b6104ec81610605565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105885760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105db575081610253565b8251156105eb5782518084602001fd5b8160405162461bcd60e51b81526004016102f5919061079b565b6001600160a01b0381163b6106725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105ab565b80356001600160a01b03811681146106b057600080fd5b919050565b6000602082840312156106c757600080fd5b61025382610699565b6000806000604084860312156106e557600080fd5b6106ee84610699565b9250602084013567ffffffffffffffff8082111561070b57600080fd5b818601915086601f83011261071f57600080fd5b81358181111561072e57600080fd5b87602082850101111561074057600080fd5b6020830194508093505050509250925092565b60005b8381101561076e578181015183820152602001610756565b838111156103845750506000910152565b60008251610791818460208701610753565b9190910192915050565b60208152600082518060208401526107ba816040850160208701610753565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200396e81b41a53c52a5f2bff0f6a830a500e30d67dcfc4c47e029fb4021c6775064736f6c634300080e0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b5565b610118565b61005b6100933660046106d0565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b5565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107cf602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6104bb565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610368836104e3565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610523565b60606001600160a01b0384163b6104465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016102f5565b600080856001600160a01b031685604051610461919061077f565b600060405180830381855af49150503d806000811461049c576040519150601f19603f3d011682016040523d82523d6000602084013e6104a1565b606091505b50915091506104b18282866105cc565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b6104ec81610605565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105885760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105db575081610253565b8251156105eb5782518084602001fd5b8160405162461bcd60e51b81526004016102f5919061079b565b6001600160a01b0381163b6106725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105ab565b80356001600160a01b03811681146106b057600080fd5b919050565b6000602082840312156106c757600080fd5b61025382610699565b6000806000604084860312156106e557600080fd5b6106ee84610699565b9250602084013567ffffffffffffffff8082111561070b57600080fd5b818601915086601f83011261071f57600080fd5b81358181111561072e57600080fd5b87602082850101111561074057600080fd5b6020830194508093505050509250925092565b60005b8381101561076e578181015183820152602001610756565b838111156103845750506000910152565b60008251610791818460208701610753565b9190910192915050565b60208152600082518060208401526107ba816040850160208701610753565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200396e81b41a53c52a5f2bff0f6a830a500e30d67dcfc4c47e029fb4021c6775064736f6c634300080e0033", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/CommitmentMapperRegistry.json b/deployments/mumbai/CommitmentMapperRegistry.json new file mode 100644 index 0000000..85f4eca --- /dev/null +++ b/deployments/mumbai/CommitmentMapperRegistry.json @@ -0,0 +1,411 @@ +{ + "address": "0x82B54988e4E3a2850501F91AC06CEA82bdb014D3", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256[2]", + "name": "commitmentMapperEdDSAPubKey", + "type": "uint256[2]" + }, + { + "internalType": "address", + "name": "commitmentMapperAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256[2]", + "name": "pubKey", + "type": "uint256[2]" + } + ], + "name": "PubKeyNotValid", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "UpdatedCommitmentMapperAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[2]", + "name": "newEdDSAPubKey", + "type": "uint256[2]" + } + ], + "name": "UpdatedCommitmentMapperEdDSAPubKey", + "type": "event" + }, + { + "inputs": [], + "name": "getAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEdDSAPubKey", + "outputs": [ + { + "internalType": "uint256[2]", + "name": "", + "type": "uint256[2]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256[2]", + "name": "commitmentMapperEdDSAPubKey", + "type": "uint256[2]" + }, + { + "internalType": "address", + "name": "commitmentMapperAddress", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "updateCommitmentMapperAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[2]", + "name": "newEdDSAPubKey", + "type": "uint256[2]" + } + ], + "name": "updateCommitmentMapperEdDSAPubKey", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "transactionIndex": 35, + "gasUsed": "521898", + "logsBloom": "0x00000000000000020000002000000000000000000000000000800000000000000000000000000000000000000000000000008000000000000000000004000000000000000000008000000000000400800001000000000000000100000000000000000000020000000000000000000800000000000000000084000010000000400000000000000000000000000000000000000010000000000000000000008000200000000000000020000000000000000001000000000000000000000000004000000004000000080001000000000000000000000000000000100000000020000000100000000000000000000000000000000000000000000020000000100000", + "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5", + "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "logs": [ + { + "transactionIndex": 35, + "blockNumber": 28600020, + "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 165, + "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + }, + { + "transactionIndex": 35, + "blockNumber": 28600020, + "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 166, + "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + }, + { + "transactionIndex": 35, + "blockNumber": 28600020, + "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "topics": [ + "0x9d99ec80e15298d9dae698493e9c61daaae3977b0f131ded44fc6b0f7766ab15" + ], + "data": "0x1e468ad0fcde4edec429cd41eb28a0e78d4f31fa2c25172ef677468b2b38a9dc2b6e9a8e3b8ed419cca51e2e2ee7ae07d2902454deca17d7da7b00ae4a798add", + "logIndex": 167, + "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + }, + { + "transactionIndex": 35, + "blockNumber": 28600020, + "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "topics": [ + "0xa37a473be736ea014730a555941f412164222d9d1b07f5a0a61932a1b3c3f2f4" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000", + "logIndex": 168, + "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + }, + { + "transactionIndex": 35, + "blockNumber": 28600020, + "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000000058d4aa2dbb57c00000000000000000000000000000000000000000000000085e8bdd5fc99fc5f00000000000000000000000000000000000000000000167a284071f4cc356e2700000000000000000000000000000000000000000000000085e3308b59be46e300000000000000000000000000000000000000000000167a2845ff3f6f1123a3", + "logIndex": 169, + "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + } + ], + "blockNumber": 28600020, + "cumulativeGasUsed": "6296149", + "status": 1, + "byzantium": true + }, + "args": [ + "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + [ + "0x1e468ad0fcde4edec429cd41eb28a0e78d4f31fa2c25172ef677468b2b38a9dc", + "0x2b6e9a8e3b8ed419cca51e2e2ee7ae07d2902454deca17d7da7b00ae4a798add" + ], + "0x0000000000000000000000000000000000000000" + ], + "numDeployments": 2, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256[2]\",\"name\":\"commitmentMapperEdDSAPubKey\",\"type\":\"uint256[2]\"},{\"internalType\":\"address\",\"name\":\"commitmentMapperAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"pubKey\",\"type\":\"uint256[2]\"}],\"name\":\"PubKeyNotValid\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"UpdatedCommitmentMapperAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256[2]\",\"name\":\"newEdDSAPubKey\",\"type\":\"uint256[2]\"}],\"name\":\"UpdatedCommitmentMapperEdDSAPubKey\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getEdDSAPubKey\",\"outputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"\",\"type\":\"uint256[2]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256[2]\",\"name\":\"commitmentMapperEdDSAPubKey\",\"type\":\"uint256[2]\"},{\"internalType\":\"address\",\"name\":\"commitmentMapperAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"updateCommitmentMapperAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"newEdDSAPubKey\",\"type\":\"uint256[2]\"}],\"name\":\"updateCommitmentMapperEdDSAPubKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor\",\"params\":{\"commitmentMapperAddress\":\"Address of the commitment mapper\",\"commitmentMapperEdDSAPubKey\":\"EdDSA public key of the commitment mapper\",\"owner\":\"Owner of the contract, can update public key and address\"}},\"getAddress()\":{\"details\":\"Getter of the address of the commitment mapper\"},\"getEdDSAPubKey()\":{\"details\":\"Getter of the EdDSA public key of the commitment mapper\"},\"initialize(address,uint256[2],address)\":{\"details\":\"Initializes the contract, to be called by the proxy delegating calls to this implementation\",\"params\":{\"commitmentMapperAddress\":\"Address of the commitment mapper\",\"commitmentMapperEdDSAPubKey\":\"EdDSA public key of the commitment mapper\",\"owner\":\"Owner of the contract, can update public key and address\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateCommitmentMapperAddress(address)\":{\"details\":\"Updates the address\",\"params\":{\"newAddress\":\"new address\"}},\"updateCommitmentMapperEdDSAPubKey(uint256[2])\":{\"details\":\"Updates the EdDSA public key\",\"params\":{\"newEdDSAPubKey\":\"new EdDSA pubic key\"}}},\"title\":\"Commitment Mapper Registry Contract\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"This contract stores information about the commitment mapper. Its ethereum address and its EdDSA public key For more information: https://commitment-mapper.docs.sismo.io*\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/periphery/utils/CommitmentMapperRegistry.sol\":\"CommitmentMapperRegistry\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() initializer {}\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\\n // contract may have been reentered.\\n require(_initializing ? _isConstructor() : !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} modifier, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n function _isConstructor() private view returns (bool) {\\n return !Address.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x4823752b07b8ea4ca971b217e39457930e7cb103c2c91e2a29729e5ca907e4f0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/periphery/utils/CommitmentMapperRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\nimport {ICommitmentMapperRegistry} from './interfaces/ICommitmentMapperRegistry.sol';\\n\\n/**\\n * @title Commitment Mapper Registry Contract\\n * @author Sismo\\n * @notice This contract stores information about the commitment mapper.\\n * Its ethereum address and its EdDSA public key\\n * For more information: https://commitment-mapper.docs.sismo.io\\n *\\n **/\\ncontract CommitmentMapperRegistry is ICommitmentMapperRegistry, Initializable, Ownable {\\n uint256[2] internal _commitmentMapperPubKey;\\n address _commitmentMapperAddress;\\n\\n /**\\n * @dev Constructor\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n constructor(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) {\\n initialize(owner, commitmentMapperEdDSAPubKey, commitmentMapperAddress);\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n function initialize(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) public initializer {\\n _transferOwnership(owner);\\n _updateCommitmentMapperEdDSAPubKey(commitmentMapperEdDSAPubKey);\\n _updateCommitmentMapperAddress(commitmentMapperAddress);\\n }\\n\\n /**\\n * @dev Updates the EdDSA public key\\n * @param newEdDSAPubKey new EdDSA pubic key\\n */\\n function updateCommitmentMapperEdDSAPubKey(uint256[2] memory newEdDSAPubKey) external onlyOwner {\\n _updateCommitmentMapperEdDSAPubKey(newEdDSAPubKey);\\n }\\n\\n /**\\n * @dev Updates the address\\n * @param newAddress new address\\n */\\n function updateCommitmentMapperAddress(address newAddress) external onlyOwner {\\n _updateCommitmentMapperAddress(newAddress);\\n }\\n\\n /**\\n * @dev Getter of the EdDSA public key of the commitment mapper\\n */\\n function getEdDSAPubKey() external view override returns (uint256[2] memory) {\\n return _commitmentMapperPubKey;\\n }\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getAddress() external view override returns (address) {\\n return _commitmentMapperAddress;\\n }\\n\\n function _updateCommitmentMapperAddress(address newAddress) internal {\\n _commitmentMapperAddress = newAddress;\\n emit UpdatedCommitmentMapperAddress(newAddress);\\n }\\n\\n function _updateCommitmentMapperEdDSAPubKey(uint256[2] memory pubKey) internal {\\n _commitmentMapperPubKey = pubKey;\\n emit UpdatedCommitmentMapperEdDSAPubKey(pubKey);\\n }\\n}\\n\",\"keccak256\":\"0xacb5347ee1a0e8dc25a1ce3e6fbb427db646e833ff8508909454cad7950418d4\",\"license\":\"MIT\"},\"contracts/periphery/utils/interfaces/ICommitmentMapperRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\ninterface ICommitmentMapperRegistry {\\n event UpdatedCommitmentMapperEdDSAPubKey(uint256[2] newEdDSAPubKey);\\n event UpdatedCommitmentMapperAddress(address newAddress);\\n error PubKeyNotValid(uint256[2] pubKey);\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n function initialize(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) external;\\n\\n /**\\n * @dev Updates the EdDSA public key\\n * @param newEdDSAPubKey new EdDSA pubic key\\n */\\n function updateCommitmentMapperEdDSAPubKey(uint256[2] memory newEdDSAPubKey) external;\\n\\n /**\\n * @dev Updates the address\\n * @param newAddress new address\\n */\\n function updateCommitmentMapperAddress(address newAddress) external;\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getEdDSAPubKey() external view returns (uint256[2] memory);\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getAddress() external view returns (address);\\n}\\n\",\"keccak256\":\"0x8d6298b442dde99ee5a9cc989ada6ea808383a08b1e9bb1d4c2b58adc01eec69\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000aac38038062000aac8339810160408190526200003491620002f1565b6200003f3362000055565b6200004c838383620000b0565b505050620003cd565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054610100900460ff16620000cd5760005460ff1615620000d7565b620000d76200019c565b6200013f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801562000162576000805461ffff19166101011790555b6200016d8462000055565b6200017883620001ba565b620001838262000206565b801562000196576000805461ff00191690555b50505050565b6000620001b4306200025560201b620003a61760201c565b15905090565b620001c9600182600262000264565b507f9d99ec80e15298d9dae698493e9c61daaae3977b0f131ded44fc6b0f7766ab1581604051620001fb91906200039a565b60405180910390a150565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fa37a473be736ea014730a555941f412164222d9d1b07f5a0a61932a1b3c3f2f490602001620001fb565b6001600160a01b03163b151590565b826002810192821562000295579160200282015b828111156200029557825182559160200191906001019062000278565b50620002a3929150620002a7565b5090565b5b80821115620002a35760008155600101620002a8565b80516001600160a01b0381168114620002d657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806000608084860312156200030757600080fd5b6200031284620002be565b9250602085603f8601126200032657600080fd5b604080519081016001600160401b03811182821017156200034b576200034b620002db565b6040528060608701888111156200036157600080fd5b8388015b818110156200037e578051835291840191840162000365565b508295506200038d81620002be565b9450505050509250925092565b60408101818360005b6002811015620003c4578151835260209283019290910190600101620003a3565b50505092915050565b6106cf80620003dd6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063727b2d5c1161005b578063727b2d5c146100e957806378cf75d7146100fc5780638da5cb5b1461010f578063f2fde38b1461012657600080fd5b806338cc48311461008d57806359a80d0d146100b75780637098a5f4146100cc578063715018a6146100e1575b600080fd5b6003546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b6100bf610139565b6040516100ae9190610517565b6100df6100da3660046105c6565b610173565b005b6100df6101b9565b6100df6100f7366004610605565b6101f6565b6100df61010a366004610620565b610230565b6000546201000090046001600160a01b031661009a565b6100df610134366004610605565b610307565b6101416104a6565b60408051808201918290529060019060029082845b815481526020019060010190808311610156575050505050905090565b6000546001600160a01b03620100009091041633146101ad5760405162461bcd60e51b81526004016101a490610664565b60405180910390fd5b6101b6816103b5565b50565b6000546001600160a01b03620100009091041633146101ea5760405162461bcd60e51b81526004016101a490610664565b6101f460006103fd565b565b6000546001600160a01b03620100009091041633146102275760405162461bcd60e51b81526004016101a490610664565b6101b681610458565b600054610100900460ff1661024b5760005460ff161561024f565b303b155b6102b25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016101a4565b600054610100900460ff161580156102d4576000805461ffff19166101011790555b6102dd846103fd565b6102e6836103b5565b6102ef82610458565b8015610301576000805461ff00191690555b50505050565b6000546001600160a01b03620100009091041633146103385760405162461bcd60e51b81526004016101a490610664565b6001600160a01b03811661039d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101a4565b6101b6816103fd565b6001600160a01b03163b151590565b6103c260018260026104c4565b507f9d99ec80e15298d9dae698493e9c61daaae3977b0f131ded44fc6b0f7766ab15816040516103f29190610517565b60405180910390a150565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fa37a473be736ea014730a555941f412164222d9d1b07f5a0a61932a1b3c3f2f4906020016103f2565b60405180604001604052806002906020820280368337509192915050565b82600281019282156104f2579160200282015b828111156104f25782518255916020019190600101906104d7565b506104fe929150610502565b5090565b5b808211156104fe5760008155600101610503565b60408101818360005b600281101561053f578151835260209283019290910190600101610520565b50505092915050565b600082601f83011261055957600080fd5b6040516040810181811067ffffffffffffffff8211171561058a57634e487b7160e01b600052604160045260246000fd5b80604052508060408401858111156105a157600080fd5b845b818110156105bb5780358352602092830192016105a3565b509195945050505050565b6000604082840312156105d857600080fd5b6105e28383610548565b9392505050565b80356001600160a01b038116811461060057600080fd5b919050565b60006020828403121561061757600080fd5b6105e2826105e9565b60008060006080848603121561063557600080fd5b61063e846105e9565b925061064d8560208601610548565b915061065b606085016105e9565b90509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea2646970667358221220271c8d1b92c1de0a925f374df3a4a1f3e28159bc20885014e3b7a7b839b55cf264736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063727b2d5c1161005b578063727b2d5c146100e957806378cf75d7146100fc5780638da5cb5b1461010f578063f2fde38b1461012657600080fd5b806338cc48311461008d57806359a80d0d146100b75780637098a5f4146100cc578063715018a6146100e1575b600080fd5b6003546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b6100bf610139565b6040516100ae9190610517565b6100df6100da3660046105c6565b610173565b005b6100df6101b9565b6100df6100f7366004610605565b6101f6565b6100df61010a366004610620565b610230565b6000546201000090046001600160a01b031661009a565b6100df610134366004610605565b610307565b6101416104a6565b60408051808201918290529060019060029082845b815481526020019060010190808311610156575050505050905090565b6000546001600160a01b03620100009091041633146101ad5760405162461bcd60e51b81526004016101a490610664565b60405180910390fd5b6101b6816103b5565b50565b6000546001600160a01b03620100009091041633146101ea5760405162461bcd60e51b81526004016101a490610664565b6101f460006103fd565b565b6000546001600160a01b03620100009091041633146102275760405162461bcd60e51b81526004016101a490610664565b6101b681610458565b600054610100900460ff1661024b5760005460ff161561024f565b303b155b6102b25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016101a4565b600054610100900460ff161580156102d4576000805461ffff19166101011790555b6102dd846103fd565b6102e6836103b5565b6102ef82610458565b8015610301576000805461ff00191690555b50505050565b6000546001600160a01b03620100009091041633146103385760405162461bcd60e51b81526004016101a490610664565b6001600160a01b03811661039d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101a4565b6101b6816103fd565b6001600160a01b03163b151590565b6103c260018260026104c4565b507f9d99ec80e15298d9dae698493e9c61daaae3977b0f131ded44fc6b0f7766ab15816040516103f29190610517565b60405180910390a150565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fa37a473be736ea014730a555941f412164222d9d1b07f5a0a61932a1b3c3f2f4906020016103f2565b60405180604001604052806002906020820280368337509192915050565b82600281019282156104f2579160200282015b828111156104f25782518255916020019190600101906104d7565b506104fe929150610502565b5090565b5b808211156104fe5760008155600101610503565b60408101818360005b600281101561053f578151835260209283019290910190600101610520565b50505092915050565b600082601f83011261055957600080fd5b6040516040810181811067ffffffffffffffff8211171561058a57634e487b7160e01b600052604160045260246000fd5b80604052508060408401858111156105a157600080fd5b845b818110156105bb5780358352602092830192016105a3565b509195945050505050565b6000604082840312156105d857600080fd5b6105e28383610548565b9392505050565b80356001600160a01b038116811461060057600080fd5b919050565b60006020828403121561061757600080fd5b6105e2826105e9565b60008060006080848603121561063557600080fd5b61063e846105e9565b925061064d8560208601610548565b915061065b606085016105e9565b90509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea2646970667358221220271c8d1b92c1de0a925f374df3a4a1f3e28159bc20885014e3b7a7b839b55cf264736f6c634300080e0033", + "devdoc": { + "author": "Sismo", + "kind": "dev", + "methods": { + "constructor": { + "details": "Constructor", + "params": { + "commitmentMapperAddress": "Address of the commitment mapper", + "commitmentMapperEdDSAPubKey": "EdDSA public key of the commitment mapper", + "owner": "Owner of the contract, can update public key and address" + } + }, + "getAddress()": { + "details": "Getter of the address of the commitment mapper" + }, + "getEdDSAPubKey()": { + "details": "Getter of the EdDSA public key of the commitment mapper" + }, + "initialize(address,uint256[2],address)": { + "details": "Initializes the contract, to be called by the proxy delegating calls to this implementation", + "params": { + "commitmentMapperAddress": "Address of the commitment mapper", + "commitmentMapperEdDSAPubKey": "EdDSA public key of the commitment mapper", + "owner": "Owner of the contract, can update public key and address" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateCommitmentMapperAddress(address)": { + "details": "Updates the address", + "params": { + "newAddress": "new address" + } + }, + "updateCommitmentMapperEdDSAPubKey(uint256[2])": { + "details": "Updates the EdDSA public key", + "params": { + "newEdDSAPubKey": "new EdDSA pubic key" + } + } + }, + "title": "Commitment Mapper Registry Contract", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "This contract stores information about the commitment mapper. Its ethereum address and its EdDSA public key For more information: https://commitment-mapper.docs.sismo.io*", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 936, + "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 939, + "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 389, + "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", + "label": "_owner", + "offset": 2, + "slot": "0", + "type": "t_address" + }, + { + "astId": 12869, + "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", + "label": "_commitmentMapperPubKey", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)2_storage" + }, + { + "astId": 12871, + "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", + "label": "_commitmentMapperAddress", + "offset": 0, + "slot": "3", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)2_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[2]", + "numberOfBytes": "64" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/CommitmentMapperRegistryImplem.json b/deployments/mumbai/CommitmentMapperRegistryImplem.json new file mode 100644 index 0000000..1eb43ea --- /dev/null +++ b/deployments/mumbai/CommitmentMapperRegistryImplem.json @@ -0,0 +1,411 @@ +{ + "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256[2]", + "name": "commitmentMapperEdDSAPubKey", + "type": "uint256[2]" + }, + { + "internalType": "address", + "name": "commitmentMapperAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256[2]", + "name": "pubKey", + "type": "uint256[2]" + } + ], + "name": "PubKeyNotValid", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "UpdatedCommitmentMapperAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[2]", + "name": "newEdDSAPubKey", + "type": "uint256[2]" + } + ], + "name": "UpdatedCommitmentMapperEdDSAPubKey", + "type": "event" + }, + { + "inputs": [], + "name": "getAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getEdDSAPubKey", + "outputs": [ + { + "internalType": "uint256[2]", + "name": "", + "type": "uint256[2]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256[2]", + "name": "commitmentMapperEdDSAPubKey", + "type": "uint256[2]" + }, + { + "internalType": "address", + "name": "commitmentMapperAddress", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "updateCommitmentMapperAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[2]", + "name": "newEdDSAPubKey", + "type": "uint256[2]" + } + ], + "name": "updateCommitmentMapperEdDSAPubKey", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "transactionIndex": 35, + "gasUsed": "521898", + "logsBloom": "0x00000000000000020000002000000000000000000000000000800000000000000000000000000000000000000000000000008000000000000000000004000000000000000000008000000000000400800001000000000000000100000000000000000000020000000000000000000800000000000000000084000010000000400000000000000000000000000000000000000010000000000000000000008000200000000000000020000000000000000001000000000000000000000000004000000004000000080001000000000000000000000000000000100000000020000000100000000000000000000000000000000000000000000020000000100000", + "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5", + "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "logs": [ + { + "transactionIndex": 35, + "blockNumber": 28600020, + "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 165, + "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + }, + { + "transactionIndex": 35, + "blockNumber": 28600020, + "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 166, + "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + }, + { + "transactionIndex": 35, + "blockNumber": 28600020, + "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "topics": [ + "0x9d99ec80e15298d9dae698493e9c61daaae3977b0f131ded44fc6b0f7766ab15" + ], + "data": "0x1e468ad0fcde4edec429cd41eb28a0e78d4f31fa2c25172ef677468b2b38a9dc2b6e9a8e3b8ed419cca51e2e2ee7ae07d2902454deca17d7da7b00ae4a798add", + "logIndex": 167, + "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + }, + { + "transactionIndex": 35, + "blockNumber": 28600020, + "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "topics": [ + "0xa37a473be736ea014730a555941f412164222d9d1b07f5a0a61932a1b3c3f2f4" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000", + "logIndex": 168, + "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + }, + { + "transactionIndex": 35, + "blockNumber": 28600020, + "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000000058d4aa2dbb57c00000000000000000000000000000000000000000000000085e8bdd5fc99fc5f00000000000000000000000000000000000000000000167a284071f4cc356e2700000000000000000000000000000000000000000000000085e3308b59be46e300000000000000000000000000000000000000000000167a2845ff3f6f1123a3", + "logIndex": 169, + "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + } + ], + "blockNumber": 28600020, + "cumulativeGasUsed": "6296149", + "status": 1, + "byzantium": true + }, + "args": [ + "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + [ + "0x1e468ad0fcde4edec429cd41eb28a0e78d4f31fa2c25172ef677468b2b38a9dc", + "0x2b6e9a8e3b8ed419cca51e2e2ee7ae07d2902454deca17d7da7b00ae4a798add" + ], + "0x0000000000000000000000000000000000000000" + ], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256[2]\",\"name\":\"commitmentMapperEdDSAPubKey\",\"type\":\"uint256[2]\"},{\"internalType\":\"address\",\"name\":\"commitmentMapperAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"pubKey\",\"type\":\"uint256[2]\"}],\"name\":\"PubKeyNotValid\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"UpdatedCommitmentMapperAddress\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256[2]\",\"name\":\"newEdDSAPubKey\",\"type\":\"uint256[2]\"}],\"name\":\"UpdatedCommitmentMapperEdDSAPubKey\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"getAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getEdDSAPubKey\",\"outputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"\",\"type\":\"uint256[2]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256[2]\",\"name\":\"commitmentMapperEdDSAPubKey\",\"type\":\"uint256[2]\"},{\"internalType\":\"address\",\"name\":\"commitmentMapperAddress\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"updateCommitmentMapperAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"newEdDSAPubKey\",\"type\":\"uint256[2]\"}],\"name\":\"updateCommitmentMapperEdDSAPubKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Constructor\",\"params\":{\"commitmentMapperAddress\":\"Address of the commitment mapper\",\"commitmentMapperEdDSAPubKey\":\"EdDSA public key of the commitment mapper\",\"owner\":\"Owner of the contract, can update public key and address\"}},\"getAddress()\":{\"details\":\"Getter of the address of the commitment mapper\"},\"getEdDSAPubKey()\":{\"details\":\"Getter of the EdDSA public key of the commitment mapper\"},\"initialize(address,uint256[2],address)\":{\"details\":\"Initializes the contract, to be called by the proxy delegating calls to this implementation\",\"params\":{\"commitmentMapperAddress\":\"Address of the commitment mapper\",\"commitmentMapperEdDSAPubKey\":\"EdDSA public key of the commitment mapper\",\"owner\":\"Owner of the contract, can update public key and address\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"updateCommitmentMapperAddress(address)\":{\"details\":\"Updates the address\",\"params\":{\"newAddress\":\"new address\"}},\"updateCommitmentMapperEdDSAPubKey(uint256[2])\":{\"details\":\"Updates the EdDSA public key\",\"params\":{\"newEdDSAPubKey\":\"new EdDSA pubic key\"}}},\"title\":\"Commitment Mapper Registry Contract\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"This contract stores information about the commitment mapper. Its ethereum address and its EdDSA public key For more information: https://commitment-mapper.docs.sismo.io*\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/periphery/utils/CommitmentMapperRegistry.sol\":\"CommitmentMapperRegistry\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() initializer {}\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\\n // contract may have been reentered.\\n require(_initializing ? _isConstructor() : !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} modifier, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n function _isConstructor() private view returns (bool) {\\n return !Address.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x4823752b07b8ea4ca971b217e39457930e7cb103c2c91e2a29729e5ca907e4f0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/periphery/utils/CommitmentMapperRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\nimport {ICommitmentMapperRegistry} from './interfaces/ICommitmentMapperRegistry.sol';\\n\\n/**\\n * @title Commitment Mapper Registry Contract\\n * @author Sismo\\n * @notice This contract stores information about the commitment mapper.\\n * Its ethereum address and its EdDSA public key\\n * For more information: https://commitment-mapper.docs.sismo.io\\n *\\n **/\\ncontract CommitmentMapperRegistry is ICommitmentMapperRegistry, Initializable, Ownable {\\n uint256[2] internal _commitmentMapperPubKey;\\n address _commitmentMapperAddress;\\n\\n /**\\n * @dev Constructor\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n constructor(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) {\\n initialize(owner, commitmentMapperEdDSAPubKey, commitmentMapperAddress);\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n function initialize(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) public initializer {\\n _transferOwnership(owner);\\n _updateCommitmentMapperEdDSAPubKey(commitmentMapperEdDSAPubKey);\\n _updateCommitmentMapperAddress(commitmentMapperAddress);\\n }\\n\\n /**\\n * @dev Updates the EdDSA public key\\n * @param newEdDSAPubKey new EdDSA pubic key\\n */\\n function updateCommitmentMapperEdDSAPubKey(uint256[2] memory newEdDSAPubKey) external onlyOwner {\\n _updateCommitmentMapperEdDSAPubKey(newEdDSAPubKey);\\n }\\n\\n /**\\n * @dev Updates the address\\n * @param newAddress new address\\n */\\n function updateCommitmentMapperAddress(address newAddress) external onlyOwner {\\n _updateCommitmentMapperAddress(newAddress);\\n }\\n\\n /**\\n * @dev Getter of the EdDSA public key of the commitment mapper\\n */\\n function getEdDSAPubKey() external view override returns (uint256[2] memory) {\\n return _commitmentMapperPubKey;\\n }\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getAddress() external view override returns (address) {\\n return _commitmentMapperAddress;\\n }\\n\\n function _updateCommitmentMapperAddress(address newAddress) internal {\\n _commitmentMapperAddress = newAddress;\\n emit UpdatedCommitmentMapperAddress(newAddress);\\n }\\n\\n function _updateCommitmentMapperEdDSAPubKey(uint256[2] memory pubKey) internal {\\n _commitmentMapperPubKey = pubKey;\\n emit UpdatedCommitmentMapperEdDSAPubKey(pubKey);\\n }\\n}\\n\",\"keccak256\":\"0xacb5347ee1a0e8dc25a1ce3e6fbb427db646e833ff8508909454cad7950418d4\",\"license\":\"MIT\"},\"contracts/periphery/utils/interfaces/ICommitmentMapperRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\ninterface ICommitmentMapperRegistry {\\n event UpdatedCommitmentMapperEdDSAPubKey(uint256[2] newEdDSAPubKey);\\n event UpdatedCommitmentMapperAddress(address newAddress);\\n error PubKeyNotValid(uint256[2] pubKey);\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n function initialize(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) external;\\n\\n /**\\n * @dev Updates the EdDSA public key\\n * @param newEdDSAPubKey new EdDSA pubic key\\n */\\n function updateCommitmentMapperEdDSAPubKey(uint256[2] memory newEdDSAPubKey) external;\\n\\n /**\\n * @dev Updates the address\\n * @param newAddress new address\\n */\\n function updateCommitmentMapperAddress(address newAddress) external;\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getEdDSAPubKey() external view returns (uint256[2] memory);\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getAddress() external view returns (address);\\n}\\n\",\"keccak256\":\"0x8d6298b442dde99ee5a9cc989ada6ea808383a08b1e9bb1d4c2b58adc01eec69\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000aac38038062000aac8339810160408190526200003491620002f1565b6200003f3362000055565b6200004c838383620000b0565b505050620003cd565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054610100900460ff16620000cd5760005460ff1615620000d7565b620000d76200019c565b6200013f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801562000162576000805461ffff19166101011790555b6200016d8462000055565b6200017883620001ba565b620001838262000206565b801562000196576000805461ff00191690555b50505050565b6000620001b4306200025560201b620003a61760201c565b15905090565b620001c9600182600262000264565b507f9d99ec80e15298d9dae698493e9c61daaae3977b0f131ded44fc6b0f7766ab1581604051620001fb91906200039a565b60405180910390a150565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fa37a473be736ea014730a555941f412164222d9d1b07f5a0a61932a1b3c3f2f490602001620001fb565b6001600160a01b03163b151590565b826002810192821562000295579160200282015b828111156200029557825182559160200191906001019062000278565b50620002a3929150620002a7565b5090565b5b80821115620002a35760008155600101620002a8565b80516001600160a01b0381168114620002d657600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806000608084860312156200030757600080fd5b6200031284620002be565b9250602085603f8601126200032657600080fd5b604080519081016001600160401b03811182821017156200034b576200034b620002db565b6040528060608701888111156200036157600080fd5b8388015b818110156200037e578051835291840191840162000365565b508295506200038d81620002be565b9450505050509250925092565b60408101818360005b6002811015620003c4578151835260209283019290910190600101620003a3565b50505092915050565b6106cf80620003dd6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063727b2d5c1161005b578063727b2d5c146100e957806378cf75d7146100fc5780638da5cb5b1461010f578063f2fde38b1461012657600080fd5b806338cc48311461008d57806359a80d0d146100b75780637098a5f4146100cc578063715018a6146100e1575b600080fd5b6003546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b6100bf610139565b6040516100ae9190610517565b6100df6100da3660046105c6565b610173565b005b6100df6101b9565b6100df6100f7366004610605565b6101f6565b6100df61010a366004610620565b610230565b6000546201000090046001600160a01b031661009a565b6100df610134366004610605565b610307565b6101416104a6565b60408051808201918290529060019060029082845b815481526020019060010190808311610156575050505050905090565b6000546001600160a01b03620100009091041633146101ad5760405162461bcd60e51b81526004016101a490610664565b60405180910390fd5b6101b6816103b5565b50565b6000546001600160a01b03620100009091041633146101ea5760405162461bcd60e51b81526004016101a490610664565b6101f460006103fd565b565b6000546001600160a01b03620100009091041633146102275760405162461bcd60e51b81526004016101a490610664565b6101b681610458565b600054610100900460ff1661024b5760005460ff161561024f565b303b155b6102b25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016101a4565b600054610100900460ff161580156102d4576000805461ffff19166101011790555b6102dd846103fd565b6102e6836103b5565b6102ef82610458565b8015610301576000805461ff00191690555b50505050565b6000546001600160a01b03620100009091041633146103385760405162461bcd60e51b81526004016101a490610664565b6001600160a01b03811661039d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101a4565b6101b6816103fd565b6001600160a01b03163b151590565b6103c260018260026104c4565b507f9d99ec80e15298d9dae698493e9c61daaae3977b0f131ded44fc6b0f7766ab15816040516103f29190610517565b60405180910390a150565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fa37a473be736ea014730a555941f412164222d9d1b07f5a0a61932a1b3c3f2f4906020016103f2565b60405180604001604052806002906020820280368337509192915050565b82600281019282156104f2579160200282015b828111156104f25782518255916020019190600101906104d7565b506104fe929150610502565b5090565b5b808211156104fe5760008155600101610503565b60408101818360005b600281101561053f578151835260209283019290910190600101610520565b50505092915050565b600082601f83011261055957600080fd5b6040516040810181811067ffffffffffffffff8211171561058a57634e487b7160e01b600052604160045260246000fd5b80604052508060408401858111156105a157600080fd5b845b818110156105bb5780358352602092830192016105a3565b509195945050505050565b6000604082840312156105d857600080fd5b6105e28383610548565b9392505050565b80356001600160a01b038116811461060057600080fd5b919050565b60006020828403121561061757600080fd5b6105e2826105e9565b60008060006080848603121561063557600080fd5b61063e846105e9565b925061064d8560208601610548565b915061065b606085016105e9565b90509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea2646970667358221220271c8d1b92c1de0a925f374df3a4a1f3e28159bc20885014e3b7a7b839b55cf264736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063727b2d5c1161005b578063727b2d5c146100e957806378cf75d7146100fc5780638da5cb5b1461010f578063f2fde38b1461012657600080fd5b806338cc48311461008d57806359a80d0d146100b75780637098a5f4146100cc578063715018a6146100e1575b600080fd5b6003546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b6100bf610139565b6040516100ae9190610517565b6100df6100da3660046105c6565b610173565b005b6100df6101b9565b6100df6100f7366004610605565b6101f6565b6100df61010a366004610620565b610230565b6000546201000090046001600160a01b031661009a565b6100df610134366004610605565b610307565b6101416104a6565b60408051808201918290529060019060029082845b815481526020019060010190808311610156575050505050905090565b6000546001600160a01b03620100009091041633146101ad5760405162461bcd60e51b81526004016101a490610664565b60405180910390fd5b6101b6816103b5565b50565b6000546001600160a01b03620100009091041633146101ea5760405162461bcd60e51b81526004016101a490610664565b6101f460006103fd565b565b6000546001600160a01b03620100009091041633146102275760405162461bcd60e51b81526004016101a490610664565b6101b681610458565b600054610100900460ff1661024b5760005460ff161561024f565b303b155b6102b25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016101a4565b600054610100900460ff161580156102d4576000805461ffff19166101011790555b6102dd846103fd565b6102e6836103b5565b6102ef82610458565b8015610301576000805461ff00191690555b50505050565b6000546001600160a01b03620100009091041633146103385760405162461bcd60e51b81526004016101a490610664565b6001600160a01b03811661039d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101a4565b6101b6816103fd565b6001600160a01b03163b151590565b6103c260018260026104c4565b507f9d99ec80e15298d9dae698493e9c61daaae3977b0f131ded44fc6b0f7766ab15816040516103f29190610517565b60405180910390a150565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fa37a473be736ea014730a555941f412164222d9d1b07f5a0a61932a1b3c3f2f4906020016103f2565b60405180604001604052806002906020820280368337509192915050565b82600281019282156104f2579160200282015b828111156104f25782518255916020019190600101906104d7565b506104fe929150610502565b5090565b5b808211156104fe5760008155600101610503565b60408101818360005b600281101561053f578151835260209283019290910190600101610520565b50505092915050565b600082601f83011261055957600080fd5b6040516040810181811067ffffffffffffffff8211171561058a57634e487b7160e01b600052604160045260246000fd5b80604052508060408401858111156105a157600080fd5b845b818110156105bb5780358352602092830192016105a3565b509195945050505050565b6000604082840312156105d857600080fd5b6105e28383610548565b9392505050565b80356001600160a01b038116811461060057600080fd5b919050565b60006020828403121561061757600080fd5b6105e2826105e9565b60008060006080848603121561063557600080fd5b61063e846105e9565b925061064d8560208601610548565b915061065b606085016105e9565b90509250925092565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea2646970667358221220271c8d1b92c1de0a925f374df3a4a1f3e28159bc20885014e3b7a7b839b55cf264736f6c634300080e0033", + "devdoc": { + "author": "Sismo", + "kind": "dev", + "methods": { + "constructor": { + "details": "Constructor", + "params": { + "commitmentMapperAddress": "Address of the commitment mapper", + "commitmentMapperEdDSAPubKey": "EdDSA public key of the commitment mapper", + "owner": "Owner of the contract, can update public key and address" + } + }, + "getAddress()": { + "details": "Getter of the address of the commitment mapper" + }, + "getEdDSAPubKey()": { + "details": "Getter of the EdDSA public key of the commitment mapper" + }, + "initialize(address,uint256[2],address)": { + "details": "Initializes the contract, to be called by the proxy delegating calls to this implementation", + "params": { + "commitmentMapperAddress": "Address of the commitment mapper", + "commitmentMapperEdDSAPubKey": "EdDSA public key of the commitment mapper", + "owner": "Owner of the contract, can update public key and address" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "updateCommitmentMapperAddress(address)": { + "details": "Updates the address", + "params": { + "newAddress": "new address" + } + }, + "updateCommitmentMapperEdDSAPubKey(uint256[2])": { + "details": "Updates the EdDSA public key", + "params": { + "newEdDSAPubKey": "new EdDSA pubic key" + } + } + }, + "title": "Commitment Mapper Registry Contract", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "This contract stores information about the commitment mapper. Its ethereum address and its EdDSA public key For more information: https://commitment-mapper.docs.sismo.io*", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 936, + "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 939, + "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 389, + "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", + "label": "_owner", + "offset": 2, + "slot": "0", + "type": "t_address" + }, + { + "astId": 12869, + "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", + "label": "_commitmentMapperPubKey", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)2_storage" + }, + { + "astId": 12871, + "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", + "label": "_commitmentMapperAddress", + "offset": 0, + "slot": "3", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)2_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[2]", + "numberOfBytes": "64" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/CommitmentMapperRegistryProxy.json b/deployments/mumbai/CommitmentMapperRegistryProxy.json new file mode 100644 index 0000000..d2c53ba --- /dev/null +++ b/deployments/mumbai/CommitmentMapperRegistryProxy.json @@ -0,0 +1,288 @@ +{ + "address": "0x82B54988e4E3a2850501F91AC06CEA82bdb014D3", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x50060b327d1e66c38fd95bf2aace0dabc328b236a9ae69b01a756398f037883a", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x82B54988e4E3a2850501F91AC06CEA82bdb014D3", + "transactionIndex": 56, + "gasUsed": "661445", + "logsBloom": "0x00000000000000020000000000000000400000000000000000800000000000000000000000000000000000000000080000008000000000000000000004000000000000000000008000000000000402800001000000000000000100000000000000000000020000000010000000000800000000800000000084000000000000400000000000000000000000000000000000000010000000000000000000808000200800000000000020000000000000000001000000000000000000000000204000000024000000000001000000000000000000000400000000100000000020000000100000000020000000000000000000000000000000000020000010100000", + "blockHash": "0x5da083ea34e8dd6ef8eaf224e53de00d0f5c6f1e63b2ef8346ecb0ced9b6d487", + "transactionHash": "0x50060b327d1e66c38fd95bf2aace0dabc328b236a9ae69b01a756398f037883a", + "logs": [ + { + "transactionIndex": 56, + "blockNumber": 28600021, + "transactionHash": "0x50060b327d1e66c38fd95bf2aace0dabc328b236a9ae69b01a756398f037883a", + "address": "0x82B54988e4E3a2850501F91AC06CEA82bdb014D3", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000008c1e3e8b767369cb9c173dbc66e441cfef37283c" + ], + "data": "0x", + "logIndex": 341, + "blockHash": "0x5da083ea34e8dd6ef8eaf224e53de00d0f5c6f1e63b2ef8346ecb0ced9b6d487" + }, + { + "transactionIndex": 56, + "blockNumber": 28600021, + "transactionHash": "0x50060b327d1e66c38fd95bf2aace0dabc328b236a9ae69b01a756398f037883a", + "address": "0x82B54988e4E3a2850501F91AC06CEA82bdb014D3", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 342, + "blockHash": "0x5da083ea34e8dd6ef8eaf224e53de00d0f5c6f1e63b2ef8346ecb0ced9b6d487" + }, + { + "transactionIndex": 56, + "blockNumber": 28600021, + "transactionHash": "0x50060b327d1e66c38fd95bf2aace0dabc328b236a9ae69b01a756398f037883a", + "address": "0x82B54988e4E3a2850501F91AC06CEA82bdb014D3", + "topics": [ + "0x9d99ec80e15298d9dae698493e9c61daaae3977b0f131ded44fc6b0f7766ab15" + ], + "data": "0x1e468ad0fcde4edec429cd41eb28a0e78d4f31fa2c25172ef677468b2b38a9dc2b6e9a8e3b8ed419cca51e2e2ee7ae07d2902454deca17d7da7b00ae4a798add", + "logIndex": 343, + "blockHash": "0x5da083ea34e8dd6ef8eaf224e53de00d0f5c6f1e63b2ef8346ecb0ced9b6d487" + }, + { + "transactionIndex": 56, + "blockNumber": 28600021, + "transactionHash": "0x50060b327d1e66c38fd95bf2aace0dabc328b236a9ae69b01a756398f037883a", + "address": "0x82B54988e4E3a2850501F91AC06CEA82bdb014D3", + "topics": [ + "0xa37a473be736ea014730a555941f412164222d9d1b07f5a0a61932a1b3c3f2f4" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000", + "logIndex": 344, + "blockHash": "0x5da083ea34e8dd6ef8eaf224e53de00d0f5c6f1e63b2ef8346ecb0ced9b6d487" + }, + { + "transactionIndex": 56, + "blockNumber": 28600021, + "transactionHash": "0x50060b327d1e66c38fd95bf2aace0dabc328b236a9ae69b01a756398f037883a", + "address": "0x82B54988e4E3a2850501F91AC06CEA82bdb014D3", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000246e71bc2a257f4be9c7fad4664e6d7444844adc", + "logIndex": 345, + "blockHash": "0x5da083ea34e8dd6ef8eaf224e53de00d0f5c6f1e63b2ef8346ecb0ced9b6d487" + }, + { + "transactionIndex": 56, + "blockNumber": 28600021, + "transactionHash": "0x50060b327d1e66c38fd95bf2aace0dabc328b236a9ae69b01a756398f037883a", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x000000000000000000000000000000000000000000000000000d9bc4867ad85e0000000000000000000000000000000000000000000000008598994dfa7bc66d00000000000000000000000000000000000000000000167a29a62c87757bff54000000000000000000000000000000000000000000000000858afd897400ee0f00000000000000000000000000000000000000000000167a29b3c84bfbf6d7b2", + "logIndex": 346, + "blockHash": "0x5da083ea34e8dd6ef8eaf224e53de00d0f5c6f1e63b2ef8346ecb0ced9b6d487" + } + ], + "blockNumber": 28600021, + "cumulativeGasUsed": "11390287", + "status": 1, + "byzantium": true + }, + "args": [ + "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "0x246E71bC2a257f4BE9C7fAD4664E6D7444844Adc", + "0x78cf75d7000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc61e468ad0fcde4edec429cd41eb28a0e78d4f31fa2c25172ef677468b2b38a9dc2b6e9a8e3b8ed419cca51e2e2ee7ae07d2902454deca17d7da7b00ae4a798add0000000000000000000000000000000000000000000000000000000000000000" + ], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/periphery/utils/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0x0edeb16b9821ae2b16e9d69c383b38d3ad2fbb3e0c06cf809a0786d96e602551\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"contracts/periphery/utils/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n// Note: we just copied so that we can see the contract used\\npragma solidity ^0.8.14;\\n\\nimport {ERC1967Proxy} from '@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol';\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1));\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(''), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n ifAdmin\\n {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(\\n msg.sender != _getAdmin(),\\n 'TransparentUpgradeableProxy: admin cannot fallback to proxy target'\\n );\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0x0d943fb8814617343a244f762e791c664bb647e32d484ba94fe1958bac85f6dc\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000f2a38038062000f2a833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b60008051602062000ee3833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b60008051602062000ec383398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b6200022e1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e9838360405180606001604052806027815260200162000f036027913962000381565b9392505050565b60006200021a60008051602062000ec383398151915260001b6200046760201b620001ea1760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd60008051602062000ec383398151915260001b6200046760201b620001ea1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200025a1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd60008051602062000ee383398151915260001b6200046760201b620001ea1760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b61082b80620006986000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b5565b610118565b61005b6100933660046106d0565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b5565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107cf602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6104bb565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610368836104e3565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610523565b60606001600160a01b0384163b6104465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016102f5565b600080856001600160a01b031685604051610461919061077f565b600060405180830381855af49150503d806000811461049c576040519150601f19603f3d011682016040523d82523d6000602084013e6104a1565b606091505b50915091506104b18282866105cc565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b6104ec81610605565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105885760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105db575081610253565b8251156105eb5782518084602001fd5b8160405162461bcd60e51b81526004016102f5919061079b565b6001600160a01b0381163b6106725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105ab565b80356001600160a01b03811681146106b057600080fd5b919050565b6000602082840312156106c757600080fd5b61025382610699565b6000806000604084860312156106e557600080fd5b6106ee84610699565b9250602084013567ffffffffffffffff8082111561070b57600080fd5b818601915086601f83011261071f57600080fd5b81358181111561072e57600080fd5b87602082850101111561074057600080fd5b6020830194508093505050509250925092565b60005b8381101561076e578181015183820152602001610756565b838111156103845750506000910152565b60008251610791818460208701610753565b9190910192915050565b60208152600082518060208401526107ba816040850160208701610753565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200396e81b41a53c52a5f2bff0f6a830a500e30d67dcfc4c47e029fb4021c6775064736f6c634300080e0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b5565b610118565b61005b6100933660046106d0565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b5565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107cf602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6104bb565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610368836104e3565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610523565b60606001600160a01b0384163b6104465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016102f5565b600080856001600160a01b031685604051610461919061077f565b600060405180830381855af49150503d806000811461049c576040519150601f19603f3d011682016040523d82523d6000602084013e6104a1565b606091505b50915091506104b18282866105cc565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b6104ec81610605565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105885760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105db575081610253565b8251156105eb5782518084602001fd5b8160405162461bcd60e51b81526004016102f5919061079b565b6001600160a01b0381163b6106725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105ab565b80356001600160a01b03811681146106b057600080fd5b919050565b6000602082840312156106c757600080fd5b61025382610699565b6000806000604084860312156106e557600080fd5b6106ee84610699565b9250602084013567ffffffffffffffff8082111561070b57600080fd5b818601915086601f83011261071f57600080fd5b81358181111561072e57600080fd5b87602082850101111561074057600080fd5b6020830194508093505050509250925092565b60005b8381101561076e578181015183820152602001610756565b838111156103845750506000910152565b60008251610791818460208701610753565b9190910192915050565b60208152600082518060208401526107ba816040850160208701610753565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200396e81b41a53c52a5f2bff0f6a830a500e30d67dcfc4c47e029fb4021c6775064736f6c634300080e0033", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/Front.json b/deployments/mumbai/Front.json new file mode 100644 index 0000000..eaa6c59 --- /dev/null +++ b/deployments/mumbai/Front.json @@ -0,0 +1,535 @@ +{ + "address": "0xFD0395fEb7805447e84Eb439a543413ecb22d562", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "attestationsRegistryAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "DifferentRequestsDestinations", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "name": "EarlyUserAttestationGenerated", + "type": "event" + }, + { + "inputs": [], + "name": "ATTESTATIONS_REGISTRY", + "outputs": [ + { + "internalType": "contract IAttestationsRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EARLY_USER_BADGE_END_DATE", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EARLY_USER_COLLECTION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "attesters", + "type": "address[]" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request[]", + "name": "requests", + "type": "tuple[]" + }, + { + "internalType": "bytes[]", + "name": "proofDataArray", + "type": "bytes[]" + } + ], + "name": "batchBuildAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[][]", + "name": "", + "type": "tuple[][]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "attesters", + "type": "address[]" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request[]", + "name": "requests", + "type": "tuple[]" + }, + { + "internalType": "bytes[]", + "name": "proofDataArray", + "type": "bytes[]" + } + ], + "name": "batchGenerateAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[][]", + "name": "", + "type": "tuple[][]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "attester", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "buildAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "attester", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "generateAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x28a36764730aba0ace31dbef26acc4cfa4fb64478e777c69cb83d2ad29768b62", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0xf24E30Cb970eb97b07cA1dFf1F2b61A981AaE2DE", + "transactionIndex": 3, + "gasUsed": "954922", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000002000000000000000000000000000000000000000000000000000800000000000000000040100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000010000000000000000000008000200000000000000000000000000000000000000000000000000040000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0x747303405e612fb5b760d26aa1f615aa0d3dcb5bed71854a204f6dbf78354041", + "transactionHash": "0x28a36764730aba0ace31dbef26acc4cfa4fb64478e777c69cb83d2ad29768b62", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 28599993, + "transactionHash": "0x28a36764730aba0ace31dbef26acc4cfa4fb64478e777c69cb83d2ad29768b62", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x000000000000000000000000000000000000000000000000000cb53722f5c31a000000000000000000000000000000000000000000000000879586ead26535e3000000000000000000000000000000000000000000000a08d78aeedf66d7be2a0000000000000000000000000000000000000000000000008788d1b3af6f72c9000000000000000000000000000000000000000000000a08d797a41689cd8144", + "logIndex": 23, + "blockHash": "0x747303405e612fb5b760d26aa1f615aa0d3dcb5bed71854a204f6dbf78354041" + } + ], + "blockNumber": 28599993, + "cumulativeGasUsed": "1896668", + "status": 1, + "byzantium": true + }, + "args": [ + "0xf576E42E5b2682B8f606B1840c3A982610C29a3f" + ], + "numDeployments": 2, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attestationsRegistryAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"DifferentRequestsDestinations\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"EarlyUserAttestationGenerated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ATTESTATIONS_REGISTRY\",\"outputs\":[{\"internalType\":\"contract IAttestationsRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EARLY_USER_BADGE_END_DATE\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EARLY_USER_COLLECTION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"attesters\",\"type\":\"address[]\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request[]\",\"name\":\"requests\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[]\",\"name\":\"proofDataArray\",\"type\":\"bytes[]\"}],\"name\":\"batchBuildAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[][]\",\"name\":\"\",\"type\":\"tuple[][]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"attesters\",\"type\":\"address[]\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request[]\",\"name\":\"requests\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[]\",\"name\":\"proofDataArray\",\"type\":\"bytes[]\"}],\"name\":\"batchGenerateAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[][]\",\"name\":\"\",\"type\":\"tuple[][]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attester\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"buildAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attester\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"generateAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"batchBuildAttestations(address[],((uint256,uint256,bytes)[],address)[],bytes[])\":{\"details\":\"build the attestations from multiple user requests. Forwards to the build function of targeted attester\",\"params\":{\"attesters\":\"Targeted attesters\",\"proofDataArray\":\"Data sent along the request to prove its validity\",\"requests\":\"User requests\"},\"returns\":{\"_0\":\"attestations Attestations that will be recorded\"}},\"batchGenerateAttestations(address[],((uint256,uint256,bytes)[],address)[],bytes[])\":{\"details\":\"generate multiple attestations at once, to the same destination, generates an early user attestation\",\"params\":{\"attesters\":\"Attesters targeted by the attesters\",\"proofDataArray\":\"Data sent with each request\",\"requests\":\"Requests sent to attester\"}},\"buildAttestations(address,((uint256,uint256,bytes)[],address),bytes)\":{\"details\":\"build the attestations from a user request targeting a specific attester. Forwards to the build function of targeted attester\",\"params\":{\"attester\":\"Targeted attester\",\"proofData\":\"Data sent along the request to prove its validity\",\"request\":\"User request\"},\"returns\":{\"_0\":\"attestations Attestations that will be recorded\"}},\"constructor\":{\"details\":\"Constructor\",\"params\":{\"attestationsRegistryAddress\":\"Attestations registry contract address\"}},\"generateAttestations(address,((uint256,uint256,bytes)[],address),bytes)\":{\"details\":\"Forward a request to an attester and generates an early user attestation\",\"params\":{\"attester\":\"Attester targeted by the request\",\"proofData\":\"Data provided to the attester to back the request\",\"request\":\"Request sent to the attester\"}}},\"title\":\"Front\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"This is the Front contract of the Sismo protocol Behind a proxy, it routes attestations request to the targeted attester and can perform some actions This specific implementation rewards early users with a early user attestation if they used sismo before ethcc conference For more information: https://front.docs.sismo.io\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/core/Front.sol\":\"Front\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/core/Front.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {IFront} from './interfaces/IFront.sol';\\nimport {IAttester} from './interfaces/IAttester.sol';\\nimport {IAttestationsRegistry} from './interfaces/IAttestationsRegistry.sol';\\nimport {Request, Attestation} from './libs/Structs.sol';\\n\\n/**\\n * @title Front\\n * @author Sismo\\n * @notice This is the Front contract of the Sismo protocol\\n * Behind a proxy, it routes attestations request to the targeted attester and can perform some actions\\n * This specific implementation rewards early users with a early user attestation if they used sismo before ethcc conference\\n\\n * For more information: https://front.docs.sismo.io\\n */\\ncontract Front is IFront {\\n IAttestationsRegistry public immutable ATTESTATIONS_REGISTRY;\\n uint256 public constant EARLY_USER_COLLECTION = 0;\\n uint32 public constant EARLY_USER_BADGE_END_DATE = 1663200000; // Sept 15\\n\\n /**\\n * @dev Constructor\\n * @param attestationsRegistryAddress Attestations registry contract address\\n */\\n constructor(address attestationsRegistryAddress) {\\n ATTESTATIONS_REGISTRY = IAttestationsRegistry(attestationsRegistryAddress);\\n }\\n\\n /**\\n * @dev Forward a request to an attester and generates an early user attestation\\n * @param attester Attester targeted by the request\\n * @param request Request sent to the attester\\n * @param proofData Data provided to the attester to back the request\\n */\\n function generateAttestations(\\n address attester,\\n Request calldata request,\\n bytes calldata proofData\\n ) external override returns (Attestation[] memory) {\\n Attestation[] memory attestations = _forwardAttestationsGeneration(\\n attester,\\n request,\\n proofData\\n );\\n _generateEarlyUserAttestation(request.destination);\\n return attestations;\\n }\\n\\n /**\\n * @dev generate multiple attestations at once, to the same destination, generates an early user attestation\\n * @param attesters Attesters targeted by the attesters\\n * @param requests Requests sent to attester\\n * @param proofDataArray Data sent with each request\\n */\\n function batchGenerateAttestations(\\n address[] calldata attesters,\\n Request[] calldata requests,\\n bytes[] calldata proofDataArray\\n ) external override returns (Attestation[][] memory) {\\n Attestation[][] memory attestations = new Attestation[][](attesters.length);\\n address destination = requests[0].destination;\\n for (uint256 i = 0; i < attesters.length; i++) {\\n if (requests[i].destination != destination) revert DifferentRequestsDestinations();\\n attestations[i] = _forwardAttestationsGeneration(\\n attesters[i],\\n requests[i],\\n proofDataArray[i]\\n );\\n }\\n _generateEarlyUserAttestation(destination);\\n return attestations;\\n }\\n\\n /**\\n * @dev build the attestations from a user request targeting a specific attester.\\n * Forwards to the build function of targeted attester\\n * @param attester Targeted attester\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(\\n address attester,\\n Request calldata request,\\n bytes calldata proofData\\n ) external view override returns (Attestation[] memory) {\\n return _forwardAttestationsBuild(attester, request, proofData);\\n }\\n\\n /**\\n * @dev build the attestations from multiple user requests.\\n * Forwards to the build function of targeted attester\\n * @param attesters Targeted attesters\\n * @param requests User requests\\n * @param proofDataArray Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function batchBuildAttestations(\\n address[] calldata attesters,\\n Request[] calldata requests,\\n bytes[] calldata proofDataArray\\n ) external view override returns (Attestation[][] memory) {\\n Attestation[][] memory attestations = new Attestation[][](attesters.length);\\n\\n for (uint256 i = 0; i < attesters.length; i++) {\\n attestations[i] = _forwardAttestationsBuild(attesters[i], requests[i], proofDataArray[i]);\\n }\\n return attestations;\\n }\\n\\n function _forwardAttestationsBuild(\\n address attester,\\n Request calldata request,\\n bytes calldata proofData\\n ) internal view returns (Attestation[] memory) {\\n return IAttester(attester).buildAttestations(request, proofData);\\n }\\n\\n function _forwardAttestationsGeneration(\\n address attester,\\n Request calldata request,\\n bytes calldata proofData\\n ) internal returns (Attestation[] memory) {\\n return IAttester(attester).generateAttestations(request, proofData);\\n }\\n\\n function _generateEarlyUserAttestation(address destination) internal {\\n uint32 currentTimestamp = uint32(block.timestamp);\\n if (currentTimestamp < EARLY_USER_BADGE_END_DATE) {\\n bool alreadyHasAttestation = ATTESTATIONS_REGISTRY.hasAttestation(\\n EARLY_USER_COLLECTION,\\n destination\\n );\\n\\n if (!alreadyHasAttestation) {\\n Attestation[] memory attestations = new Attestation[](1);\\n attestations[0] = Attestation(\\n EARLY_USER_COLLECTION,\\n destination,\\n address(this),\\n 1,\\n currentTimestamp,\\n 'With strong love from Sismo'\\n );\\n ATTESTATIONS_REGISTRY.recordAttestations(attestations);\\n emit EarlyUserAttestationGenerated(destination);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3ea2112c22a36ff318873f1f015fa9e3b447e93d33464ae81b9bcd7d0f917621\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttestationsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Attestation, AttestationData} from '../libs/Structs.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry {\\n event AttestationRecorded(Attestation attestation);\\n event AttestationDeleted(Attestation attestation);\\n\\n /**\\n * @dev Main function to be called by authorized issuers\\n * @param attestations Attestations to be recorded (creates a new one or overrides an existing one)\\n */\\n function recordAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Delete function to be called by authorized issuers\\n * @param attestations Attestations to be deleted\\n */\\n function deleteAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Returns whether a user has an attestation from a collection\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function hasAttestation(uint256 collectionId, address owner) external returns (bool);\\n\\n /**\\n * @dev Getter of the data of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationData(uint256 collectionId, address owner)\\n external\\n view\\n returns (AttestationData memory);\\n\\n /**\\n * @dev Getter of the value of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationValue(uint256 collectionId, address owner) external view returns (uint256);\\n\\n /**\\n * @dev Getter of the data of a specific attestation as tuple\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationDataTuple(uint256 collectionId, address owner)\\n external\\n view\\n returns (\\n address,\\n uint256,\\n uint32,\\n bytes memory\\n );\\n\\n /**\\n * @dev Getter of the extraData of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationExtraData(uint256 collectionId, address owner)\\n external\\n view\\n returns (bytes memory);\\n\\n /**\\n * @dev Getter of the issuer of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationIssuer(uint256 collectionId, address owner)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @dev Getter of the timestamp of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationTimestamp(uint256 collectionId, address owner)\\n external\\n view\\n returns (uint32);\\n\\n /**\\n * @dev Getter of the data of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationDataBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (AttestationData[] memory);\\n\\n /**\\n * @dev Getter of the values of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationValueBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xb5e25bd7e0372c9973e582fb7fe96318c145831a5452d8c79eb848a7464b0297\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Request, Attestation} from '../libs/Structs.sol';\\nimport {IAttestationsRegistry} from '../interfaces/IAttestationsRegistry.sol';\\n\\n/**\\n * @title IAttester\\n * @author Sismo\\n * @notice This is the interface for the attesters in Sismo Protocol\\n */\\ninterface IAttester {\\n event AttestationGenerated(Attestation attestation);\\n\\n event AttestationDeleted(Attestation attestation);\\n\\n error AttestationDeletionNotImplemented();\\n\\n /**\\n * @dev Main external function. Allows to generate attestations by making a request and submitting proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that has been recorded\\n */\\n function generateAttestations(Request calldata request, bytes calldata proofData)\\n external\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev External facing function. Allows to delete an attestation by submitting proof\\n * @param collectionIds Collection identifier of attestations to delete\\n * @param attestationsOwner Owner of attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n * @return attestations Attestations that was deleted\\n */\\n function deleteAttestations(\\n uint256[] calldata collectionIds,\\n address attestationsOwner,\\n bytes calldata proofData\\n ) external returns (Attestation[] memory);\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should build attestations from the user request and the proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(Request calldata request, bytes calldata proofData)\\n external\\n view\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev Attestation registry address getter\\n * @return attestationRegistry Address of the registry\\n */\\n function getAttestationRegistry() external view returns (IAttestationsRegistry);\\n}\\n\",\"keccak256\":\"0xafe9c1a742d7570033c8d74cee203e09ee9b7461eaed6d2ca77697449e2ce95d\",\"license\":\"MIT\"},\"contracts/core/interfaces/IFront.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Request, Attestation} from '../libs/Structs.sol';\\n\\n/**\\n * @title IFront\\n * @author Sismo\\n * @notice This is the interface of the Front Contract\\n */\\ninterface IFront {\\n error DifferentRequestsDestinations();\\n event EarlyUserAttestationGenerated(address destination);\\n\\n /**\\n * @dev Forward a request to an attester and generates an early user attestation\\n * @param attester Attester targeted by the request\\n * @param request Request sent to the attester\\n * @param proofData Data provided to the attester to back the request\\n */\\n function generateAttestations(\\n address attester,\\n Request calldata request,\\n bytes calldata proofData\\n ) external returns (Attestation[] memory);\\n\\n /**\\n * @dev generate multiple attestations at once, to the same destination\\n * @param attesters Attesters targeted by the attesters\\n * @param requests Requests sent to attester\\n * @param proofDataArray Data sent with each request\\n */\\n function batchGenerateAttestations(\\n address[] calldata attesters,\\n Request[] calldata requests,\\n bytes[] calldata proofDataArray\\n ) external returns (Attestation[][] memory);\\n\\n /**\\n * @dev build the attestations from a user request targeting a specific attester.\\n * Forwards to the build function of targeted attester\\n * @param attester Targeted attester\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(\\n address attester,\\n Request calldata request,\\n bytes calldata proofData\\n ) external view returns (Attestation[] memory);\\n\\n /**\\n * @dev build the attestations from multiple user requests.\\n * Forwards to the build function(s) of targeted attester(s)\\n * @param attesters Targeted attesters\\n * @param requests User requests\\n * @param proofDataArray Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function batchBuildAttestations(\\n address[] calldata attesters,\\n Request[] calldata requests,\\n bytes[] calldata proofDataArray\\n ) external view returns (Attestation[][] memory);\\n}\\n\",\"keccak256\":\"0xfeab84e36830c432f91d0cbe1beb430331529829ce667a6371fbad47baa12191\",\"license\":\"MIT\"},\"contracts/core/libs/Structs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title Attestations Registry State\\n * @author Sismo\\n * @notice This contract holds all of the storage variables and data\\n * structures used by the AttestationsRegistry and parent\\n * contracts.\\n */\\n\\n// User Attestation Request, can be made by any user\\n// The context of an Attestation Request is a specific attester contract\\n// Each attester has groups of accounts in its available data\\n// eg: for a specific attester:\\n// group 1 <=> accounts that sent txs on mainnet\\n// group 2 <=> accounts that sent txs on polygon\\n// eg: for another attester:\\n// group 1 <=> accounts that sent eth txs in 2022\\n// group 2 <=> accounts sent eth txs in 2021\\nstruct Request {\\n // implicit address attester;\\n // implicit uint256 chainId;\\n Claim[] claims;\\n address destination; // destination that will receive the end attestation\\n}\\n\\nstruct Claim {\\n uint256 groupId; // user claims to have an account in this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n bytes extraData; // arbitrary data, may be required by the attester to verify claims or generate a specific attestation\\n}\\n\\n/**\\n * @dev Attestation Struct. This is the struct receive as argument by the Attestation Registry.\\n * @param collectionId Attestation collection\\n * @param owner Attestation collection\\n * @param issuer Attestation collection\\n * @param value Attestation collection\\n * @param timestamp Attestation collection\\n * @param extraData Attestation collection\\n */\\nstruct Attestation {\\n // implicit uint256 chainId;\\n uint256 collectionId; // Id of the attestation collection (in the registry)\\n address owner; // Owner of the attestation\\n address issuer; // Contract that created or last updated the record.\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Timestamp chosen by the attester, should correspond to the effective date of the attestation\\n // it is different from the recording timestamp (date when the attestation was recorded)\\n // e.g a proof of NFT ownership may have be recorded today which is 2 month old data.\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\\n// Attestation Data, stored in the registry\\n// The context is a specific owner of a specific collection\\nstruct AttestationData {\\n // implicit uint256 chainId\\n // implicit uint256 collectionId - from context\\n // implicit owner\\n address issuer; // Address of the contract that recorded the attestation\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Effective date of issuance of the attestation. (can be different from the recording timestamp)\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\",\"keccak256\":\"0x893d9a10429878dd4077388ff4da954c20b86a3c172a7bbdd10a01eb5d39b6a0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a060405234801561001057600080fd5b506040516110e43803806110e483398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b60805161104b610099600039600081816101020152818161051901526106bd015261104b6000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806389a504771161005b57806389a50477146100e7578063ac9d6541146100fd578063aebddc691461013c578063c0a92c911461014f57600080fd5b80630a60387d14610082578063369b88be146100a75780633ee490ce146100c7575b600080fd5b61008d6363226b0081565b60405163ffffffff90911681526020015b60405180910390f35b6100ba6100b5366004610805565b610162565b60405161009e91906108cf565b6100da6100d5366004610a0d565b61031d565b60405161009e9190610ab9565b6100ef600081565b60405190815260200161009e565b6101247f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161009e565b6100da61014a366004610a0d565b610350565b6100ba61015d366004610805565b61035e565b606060008667ffffffffffffffff81111561017f5761017f610b84565b6040519080825280602002602001820160405280156101b257816020015b606081526020019060019003908161019d5790505b5090506000868660008181106101ca576101ca610b9a565b90506020028101906101dc9190610bb0565b6101ed906040810190602001610bd0565b905060005b8881101561030757816001600160a01b031688888381811061021657610216610b9a565b90506020028101906102289190610bb0565b610239906040810190602001610bd0565b6001600160a01b0316146102605760405163f1b973df60e01b815260040160405180910390fd5b6102d78a8a8381811061027557610275610b9a565b905060200201602081019061028a9190610bd0565b89898481811061029c5761029c610b9a565b90506020028101906102ae9190610bb0565b8888858181106102c0576102c0610b9a565b90506020028101906102d29190610bf4565b610463565b8382815181106102e9576102e9610b9a565b602002602001018190525080806102ff90610c3b565b9150506101f2565b50610311816104dd565b50979650505050505050565b6060600061032d86868686610463565b90506103476103426040870160208801610bd0565b6104dd565b95945050505050565b606061034785858585610769565b606060008667ffffffffffffffff81111561037b5761037b610b84565b6040519080825280602002602001820160405280156103ae57816020015b60608152602001906001900390816103995790505b50905060005b87811015610311576104338989838181106103d1576103d1610b9a565b90506020020160208101906103e69190610bd0565b8888848181106103f8576103f8610b9a565b905060200281019061040a9190610bb0565b87878581811061041c5761041c610b9a565b905060200281019061042e9190610bf4565b610769565b82828151811061044557610445610b9a565b6020026020010181905250808061045b90610c3b565b9150506103b4565b60405163e60f999f60e01b81526060906001600160a01b0386169063e60f999f9061049690879087908790600401610c8b565b6000604051808303816000875af11580156104b5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103479190810190610e9d565b426363226b0063ffffffff82161015610765576040516211023960e41b81526000600482018190526001600160a01b03848116602484015290917f0000000000000000000000000000000000000000000000000000000000000000909116906301102390906044016020604051808303816000875af1158015610564573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105889190610ff3565b90508061076357604080516001808252818301909252600091816020015b6105f76040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b8152602001906001900390816105a65790505090506040518060c0016040528060008152602001856001600160a01b03168152602001306001600160a01b03168152602001600181526020018463ffffffff1681526020016040518060400160405280601b81526020017f57697468207374726f6e67206c6f76652066726f6d205369736d6f00000000008152508152508160008151811061069b5761069b610b9a565b602090810291909101015260405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906106f2908490600401610ab9565b600060405180830381600087803b15801561070c57600080fd5b505af1158015610720573d6000803e3d6000fd5b50506040516001600160a01b03871681527f65566f56ce57729c92989973ff6ac5bdd213f57bf75d7248c4190d6d3634738e9250602001905060405180910390a1505b505b5050565b604051630af411a360e41b81526060906001600160a01b0386169063af411a309061079c90879087908790600401610c8b565b600060405180830381865afa1580156104b5573d6000803e3d6000fd5b60008083601f8401126107cb57600080fd5b50813567ffffffffffffffff8111156107e357600080fd5b6020830191508360208260051b85010111156107fe57600080fd5b9250929050565b6000806000806000806060878903121561081e57600080fd5b863567ffffffffffffffff8082111561083657600080fd5b6108428a838b016107b9565b9098509650602089013591508082111561085b57600080fd5b6108678a838b016107b9565b9096509450604089013591508082111561088057600080fd5b5061088d89828a016107b9565b979a9699509497509295939492505050565b60005b838110156108ba5781810151838201526020016108a2565b838111156108c9576000848401525b50505050565b60208152600060208201835180825260408401915060408160051b8501016020860160005b838110156109d957868303603f19018552815180518085526020918201918086019190600582901b87010160005b828110156109bf57601f1980898403018552855180518452602081015160018060a01b03808216602087015280604084015116604087015250506060810151606085015263ffffffff608082015116608085015260a0810151905060c060a085015280518060c086015261099d8160e087016020850161089f565b6020978801979690960195601f019091169290920160e0019150600101610922565b5060209889019890965094909401935050506001016108f4565b50909695505050505050565b6001600160a01b03811681146109fa57600080fd5b50565b8035610a08816109e5565b919050565b60008060008060608587031215610a2357600080fd5b8435610a2e816109e5565b9350602085013567ffffffffffffffff80821115610a4b57600080fd5b9086019060408289031215610a5f57600080fd5b90935060408601359080821115610a7557600080fd5b818701915087601f830112610a8957600080fd5b813581811115610a9857600080fd5b886020828501011115610aaa57600080fd5b95989497505060200194505050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015610b7657888303603f19018552815180518452878101516001600160a01b03908116898601528782015116878501526060808201519085015260808082015163ffffffff169085015260a09081015160c091850182905280519185018290529060e090610b5681838801858d0161089f565b96890196601f01601f191694909401909301925090860190600101610ae0565b509098975050505050505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008235603e19833603018112610bc657600080fd5b9190910192915050565b600060208284031215610be257600080fd5b8135610bed816109e5565b9392505050565b6000808335601e19843603018112610c0b57600080fd5b83018035915067ffffffffffffffff821115610c2657600080fd5b6020019150368190038213156107fe57600080fd5b600060018201610c5b57634e487b7160e01b600052601160045260246000fd5b5060010190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60006040808352608083018635601e19883603018112610caa57600080fd5b87018035602080830167ffffffffffffffff80841115610cc957600080fd5b8360051b803603831315610cdc57600080fd5b878a018890529584905260a09589018601956000908a01607e1936889003015b86831015610d96578b8903609f190182528435818112610d1b57600080fd5b8801868101358a528a8101358a88015260608082013536839003603e19018112610d4457600080fd5b9091018b8101919088013586811115610d5c57600080fd5b803603831315610d6b57600080fd5b818d8d0152610d7d828d018285610c62565b9b50505094860194506001929092019190850190610cfc565b5050505050610da6818b016109fd565b6001600160a01b0381166060890152945086840381880152505050610dcc818688610c62565b979650505050505050565b60405160c0810167ffffffffffffffff81118282101715610dfa57610dfa610b84565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610e2957610e29610b84565b604052919050565b600082601f830112610e4257600080fd5b815167ffffffffffffffff811115610e5c57610e5c610b84565b610e6f601f8201601f1916602001610e00565b818152846020838601011115610e8457600080fd5b610e9582602083016020870161089f565b949350505050565b60006020808385031215610eb057600080fd5b825167ffffffffffffffff80821115610ec857600080fd5b818501915085601f830112610edc57600080fd5b815181811115610eee57610eee610b84565b8060051b610efd858201610e00565b9182528381018501918581019089841115610f1757600080fd5b86860192505b83831015610fe657825185811115610f355760008081fd5b860160c0818c03601f1901811315610f4d5760008081fd5b610f55610dd7565b898301518152604080840151610f6a816109e5565b828c0152606084810151610f7d816109e5565b8083850152506080915081850151818401525060a08085015163ffffffff81168114610fa95760008081fd5b83830152928401519289841115610fc257600091508182fd5b610fd08f8d86880101610e31565b9083015250845250509186019190860190610f1d565b9998505050505050505050565b60006020828403121561100557600080fd5b81518015158114610bed57600080fdfea26469706673582212206eab9b350687ecccafd79868df619e95a4ffb1f38b3590296e186abb24b904f864736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c806389a504771161005b57806389a50477146100e7578063ac9d6541146100fd578063aebddc691461013c578063c0a92c911461014f57600080fd5b80630a60387d14610082578063369b88be146100a75780633ee490ce146100c7575b600080fd5b61008d6363226b0081565b60405163ffffffff90911681526020015b60405180910390f35b6100ba6100b5366004610805565b610162565b60405161009e91906108cf565b6100da6100d5366004610a0d565b61031d565b60405161009e9190610ab9565b6100ef600081565b60405190815260200161009e565b6101247f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161009e565b6100da61014a366004610a0d565b610350565b6100ba61015d366004610805565b61035e565b606060008667ffffffffffffffff81111561017f5761017f610b84565b6040519080825280602002602001820160405280156101b257816020015b606081526020019060019003908161019d5790505b5090506000868660008181106101ca576101ca610b9a565b90506020028101906101dc9190610bb0565b6101ed906040810190602001610bd0565b905060005b8881101561030757816001600160a01b031688888381811061021657610216610b9a565b90506020028101906102289190610bb0565b610239906040810190602001610bd0565b6001600160a01b0316146102605760405163f1b973df60e01b815260040160405180910390fd5b6102d78a8a8381811061027557610275610b9a565b905060200201602081019061028a9190610bd0565b89898481811061029c5761029c610b9a565b90506020028101906102ae9190610bb0565b8888858181106102c0576102c0610b9a565b90506020028101906102d29190610bf4565b610463565b8382815181106102e9576102e9610b9a565b602002602001018190525080806102ff90610c3b565b9150506101f2565b50610311816104dd565b50979650505050505050565b6060600061032d86868686610463565b90506103476103426040870160208801610bd0565b6104dd565b95945050505050565b606061034785858585610769565b606060008667ffffffffffffffff81111561037b5761037b610b84565b6040519080825280602002602001820160405280156103ae57816020015b60608152602001906001900390816103995790505b50905060005b87811015610311576104338989838181106103d1576103d1610b9a565b90506020020160208101906103e69190610bd0565b8888848181106103f8576103f8610b9a565b905060200281019061040a9190610bb0565b87878581811061041c5761041c610b9a565b905060200281019061042e9190610bf4565b610769565b82828151811061044557610445610b9a565b6020026020010181905250808061045b90610c3b565b9150506103b4565b60405163e60f999f60e01b81526060906001600160a01b0386169063e60f999f9061049690879087908790600401610c8b565b6000604051808303816000875af11580156104b5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103479190810190610e9d565b426363226b0063ffffffff82161015610765576040516211023960e41b81526000600482018190526001600160a01b03848116602484015290917f0000000000000000000000000000000000000000000000000000000000000000909116906301102390906044016020604051808303816000875af1158015610564573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105889190610ff3565b90508061076357604080516001808252818301909252600091816020015b6105f76040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b8152602001906001900390816105a65790505090506040518060c0016040528060008152602001856001600160a01b03168152602001306001600160a01b03168152602001600181526020018463ffffffff1681526020016040518060400160405280601b81526020017f57697468207374726f6e67206c6f76652066726f6d205369736d6f00000000008152508152508160008151811061069b5761069b610b9a565b602090810291909101015260405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906106f2908490600401610ab9565b600060405180830381600087803b15801561070c57600080fd5b505af1158015610720573d6000803e3d6000fd5b50506040516001600160a01b03871681527f65566f56ce57729c92989973ff6ac5bdd213f57bf75d7248c4190d6d3634738e9250602001905060405180910390a1505b505b5050565b604051630af411a360e41b81526060906001600160a01b0386169063af411a309061079c90879087908790600401610c8b565b600060405180830381865afa1580156104b5573d6000803e3d6000fd5b60008083601f8401126107cb57600080fd5b50813567ffffffffffffffff8111156107e357600080fd5b6020830191508360208260051b85010111156107fe57600080fd5b9250929050565b6000806000806000806060878903121561081e57600080fd5b863567ffffffffffffffff8082111561083657600080fd5b6108428a838b016107b9565b9098509650602089013591508082111561085b57600080fd5b6108678a838b016107b9565b9096509450604089013591508082111561088057600080fd5b5061088d89828a016107b9565b979a9699509497509295939492505050565b60005b838110156108ba5781810151838201526020016108a2565b838111156108c9576000848401525b50505050565b60208152600060208201835180825260408401915060408160051b8501016020860160005b838110156109d957868303603f19018552815180518085526020918201918086019190600582901b87010160005b828110156109bf57601f1980898403018552855180518452602081015160018060a01b03808216602087015280604084015116604087015250506060810151606085015263ffffffff608082015116608085015260a0810151905060c060a085015280518060c086015261099d8160e087016020850161089f565b6020978801979690960195601f019091169290920160e0019150600101610922565b5060209889019890965094909401935050506001016108f4565b50909695505050505050565b6001600160a01b03811681146109fa57600080fd5b50565b8035610a08816109e5565b919050565b60008060008060608587031215610a2357600080fd5b8435610a2e816109e5565b9350602085013567ffffffffffffffff80821115610a4b57600080fd5b9086019060408289031215610a5f57600080fd5b90935060408601359080821115610a7557600080fd5b818701915087601f830112610a8957600080fd5b813581811115610a9857600080fd5b886020828501011115610aaa57600080fd5b95989497505060200194505050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015610b7657888303603f19018552815180518452878101516001600160a01b03908116898601528782015116878501526060808201519085015260808082015163ffffffff169085015260a09081015160c091850182905280519185018290529060e090610b5681838801858d0161089f565b96890196601f01601f191694909401909301925090860190600101610ae0565b509098975050505050505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008235603e19833603018112610bc657600080fd5b9190910192915050565b600060208284031215610be257600080fd5b8135610bed816109e5565b9392505050565b6000808335601e19843603018112610c0b57600080fd5b83018035915067ffffffffffffffff821115610c2657600080fd5b6020019150368190038213156107fe57600080fd5b600060018201610c5b57634e487b7160e01b600052601160045260246000fd5b5060010190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60006040808352608083018635601e19883603018112610caa57600080fd5b87018035602080830167ffffffffffffffff80841115610cc957600080fd5b8360051b803603831315610cdc57600080fd5b878a018890529584905260a09589018601956000908a01607e1936889003015b86831015610d96578b8903609f190182528435818112610d1b57600080fd5b8801868101358a528a8101358a88015260608082013536839003603e19018112610d4457600080fd5b9091018b8101919088013586811115610d5c57600080fd5b803603831315610d6b57600080fd5b818d8d0152610d7d828d018285610c62565b9b50505094860194506001929092019190850190610cfc565b5050505050610da6818b016109fd565b6001600160a01b0381166060890152945086840381880152505050610dcc818688610c62565b979650505050505050565b60405160c0810167ffffffffffffffff81118282101715610dfa57610dfa610b84565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610e2957610e29610b84565b604052919050565b600082601f830112610e4257600080fd5b815167ffffffffffffffff811115610e5c57610e5c610b84565b610e6f601f8201601f1916602001610e00565b818152846020838601011115610e8457600080fd5b610e9582602083016020870161089f565b949350505050565b60006020808385031215610eb057600080fd5b825167ffffffffffffffff80821115610ec857600080fd5b818501915085601f830112610edc57600080fd5b815181811115610eee57610eee610b84565b8060051b610efd858201610e00565b9182528381018501918581019089841115610f1757600080fd5b86860192505b83831015610fe657825185811115610f355760008081fd5b860160c0818c03601f1901811315610f4d5760008081fd5b610f55610dd7565b898301518152604080840151610f6a816109e5565b828c0152606084810151610f7d816109e5565b8083850152506080915081850151818401525060a08085015163ffffffff81168114610fa95760008081fd5b83830152928401519289841115610fc257600091508182fd5b610fd08f8d86880101610e31565b9083015250845250509186019190860190610f1d565b9998505050505050505050565b60006020828403121561100557600080fd5b81518015158114610bed57600080fdfea26469706673582212206eab9b350687ecccafd79868df619e95a4ffb1f38b3590296e186abb24b904f864736f6c634300080e0033", + "devdoc": { + "author": "Sismo", + "kind": "dev", + "methods": { + "batchBuildAttestations(address[],((uint256,uint256,bytes)[],address)[],bytes[])": { + "details": "build the attestations from multiple user requests. Forwards to the build function of targeted attester", + "params": { + "attesters": "Targeted attesters", + "proofDataArray": "Data sent along the request to prove its validity", + "requests": "User requests" + }, + "returns": { + "_0": "attestations Attestations that will be recorded" + } + }, + "batchGenerateAttestations(address[],((uint256,uint256,bytes)[],address)[],bytes[])": { + "details": "generate multiple attestations at once, to the same destination, generates an early user attestation", + "params": { + "attesters": "Attesters targeted by the attesters", + "proofDataArray": "Data sent with each request", + "requests": "Requests sent to attester" + } + }, + "buildAttestations(address,((uint256,uint256,bytes)[],address),bytes)": { + "details": "build the attestations from a user request targeting a specific attester. Forwards to the build function of targeted attester", + "params": { + "attester": "Targeted attester", + "proofData": "Data sent along the request to prove its validity", + "request": "User request" + }, + "returns": { + "_0": "attestations Attestations that will be recorded" + } + }, + "constructor": { + "details": "Constructor", + "params": { + "attestationsRegistryAddress": "Attestations registry contract address" + } + }, + "generateAttestations(address,((uint256,uint256,bytes)[],address),bytes)": { + "details": "Forward a request to an attester and generates an early user attestation", + "params": { + "attester": "Attester targeted by the request", + "proofData": "Data provided to the attester to back the request", + "request": "Request sent to the attester" + } + } + }, + "title": "Front", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "This is the Front contract of the Sismo protocol Behind a proxy, it routes attestations request to the targeted attester and can perform some actions This specific implementation rewards early users with a early user attestation if they used sismo before ethcc conference For more information: https://front.docs.sismo.io", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/FrontImplem.json b/deployments/mumbai/FrontImplem.json new file mode 100644 index 0000000..3c4d799 --- /dev/null +++ b/deployments/mumbai/FrontImplem.json @@ -0,0 +1,535 @@ +{ + "address": "0xf24E30Cb970eb97b07cA1dFf1F2b61A981AaE2DE", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "attestationsRegistryAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "DifferentRequestsDestinations", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "name": "EarlyUserAttestationGenerated", + "type": "event" + }, + { + "inputs": [], + "name": "ATTESTATIONS_REGISTRY", + "outputs": [ + { + "internalType": "contract IAttestationsRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EARLY_USER_BADGE_END_DATE", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "EARLY_USER_COLLECTION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "attesters", + "type": "address[]" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request[]", + "name": "requests", + "type": "tuple[]" + }, + { + "internalType": "bytes[]", + "name": "proofDataArray", + "type": "bytes[]" + } + ], + "name": "batchBuildAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[][]", + "name": "", + "type": "tuple[][]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "attesters", + "type": "address[]" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request[]", + "name": "requests", + "type": "tuple[]" + }, + { + "internalType": "bytes[]", + "name": "proofDataArray", + "type": "bytes[]" + } + ], + "name": "batchGenerateAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[][]", + "name": "", + "type": "tuple[][]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "attester", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "buildAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "attester", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "generateAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x28a36764730aba0ace31dbef26acc4cfa4fb64478e777c69cb83d2ad29768b62", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0xf24E30Cb970eb97b07cA1dFf1F2b61A981AaE2DE", + "transactionIndex": 3, + "gasUsed": "954922", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000002000000000000000000000000000000000000000000000000000800000000000000000040100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000010000000000000000000008000200000000000000000000000000000000000000000000000000040000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0x747303405e612fb5b760d26aa1f615aa0d3dcb5bed71854a204f6dbf78354041", + "transactionHash": "0x28a36764730aba0ace31dbef26acc4cfa4fb64478e777c69cb83d2ad29768b62", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 28599993, + "transactionHash": "0x28a36764730aba0ace31dbef26acc4cfa4fb64478e777c69cb83d2ad29768b62", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x000000000000000000000000000000000000000000000000000cb53722f5c31a000000000000000000000000000000000000000000000000879586ead26535e3000000000000000000000000000000000000000000000a08d78aeedf66d7be2a0000000000000000000000000000000000000000000000008788d1b3af6f72c9000000000000000000000000000000000000000000000a08d797a41689cd8144", + "logIndex": 23, + "blockHash": "0x747303405e612fb5b760d26aa1f615aa0d3dcb5bed71854a204f6dbf78354041" + } + ], + "blockNumber": 28599993, + "cumulativeGasUsed": "1896668", + "status": 1, + "byzantium": true + }, + "args": [ + "0xf576E42E5b2682B8f606B1840c3A982610C29a3f" + ], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attestationsRegistryAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"DifferentRequestsDestinations\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"EarlyUserAttestationGenerated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ATTESTATIONS_REGISTRY\",\"outputs\":[{\"internalType\":\"contract IAttestationsRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EARLY_USER_BADGE_END_DATE\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"EARLY_USER_COLLECTION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"attesters\",\"type\":\"address[]\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request[]\",\"name\":\"requests\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[]\",\"name\":\"proofDataArray\",\"type\":\"bytes[]\"}],\"name\":\"batchBuildAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[][]\",\"name\":\"\",\"type\":\"tuple[][]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"attesters\",\"type\":\"address[]\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request[]\",\"name\":\"requests\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes[]\",\"name\":\"proofDataArray\",\"type\":\"bytes[]\"}],\"name\":\"batchGenerateAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[][]\",\"name\":\"\",\"type\":\"tuple[][]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attester\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"buildAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attester\",\"type\":\"address\"},{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"generateAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"batchBuildAttestations(address[],((uint256,uint256,bytes)[],address)[],bytes[])\":{\"details\":\"build the attestations from multiple user requests. Forwards to the build function of targeted attester\",\"params\":{\"attesters\":\"Targeted attesters\",\"proofDataArray\":\"Data sent along the request to prove its validity\",\"requests\":\"User requests\"},\"returns\":{\"_0\":\"attestations Attestations that will be recorded\"}},\"batchGenerateAttestations(address[],((uint256,uint256,bytes)[],address)[],bytes[])\":{\"details\":\"generate multiple attestations at once, to the same destination, generates an early user attestation\",\"params\":{\"attesters\":\"Attesters targeted by the attesters\",\"proofDataArray\":\"Data sent with each request\",\"requests\":\"Requests sent to attester\"}},\"buildAttestations(address,((uint256,uint256,bytes)[],address),bytes)\":{\"details\":\"build the attestations from a user request targeting a specific attester. Forwards to the build function of targeted attester\",\"params\":{\"attester\":\"Targeted attester\",\"proofData\":\"Data sent along the request to prove its validity\",\"request\":\"User request\"},\"returns\":{\"_0\":\"attestations Attestations that will be recorded\"}},\"constructor\":{\"details\":\"Constructor\",\"params\":{\"attestationsRegistryAddress\":\"Attestations registry contract address\"}},\"generateAttestations(address,((uint256,uint256,bytes)[],address),bytes)\":{\"details\":\"Forward a request to an attester and generates an early user attestation\",\"params\":{\"attester\":\"Attester targeted by the request\",\"proofData\":\"Data provided to the attester to back the request\",\"request\":\"Request sent to the attester\"}}},\"title\":\"Front\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"This is the Front contract of the Sismo protocol Behind a proxy, it routes attestations request to the targeted attester and can perform some actions This specific implementation rewards early users with a early user attestation if they used sismo before ethcc conference For more information: https://front.docs.sismo.io\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/core/Front.sol\":\"Front\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"contracts/core/Front.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {IFront} from './interfaces/IFront.sol';\\nimport {IAttester} from './interfaces/IAttester.sol';\\nimport {IAttestationsRegistry} from './interfaces/IAttestationsRegistry.sol';\\nimport {Request, Attestation} from './libs/Structs.sol';\\n\\n/**\\n * @title Front\\n * @author Sismo\\n * @notice This is the Front contract of the Sismo protocol\\n * Behind a proxy, it routes attestations request to the targeted attester and can perform some actions\\n * This specific implementation rewards early users with a early user attestation if they used sismo before ethcc conference\\n\\n * For more information: https://front.docs.sismo.io\\n */\\ncontract Front is IFront {\\n IAttestationsRegistry public immutable ATTESTATIONS_REGISTRY;\\n uint256 public constant EARLY_USER_COLLECTION = 0;\\n uint32 public constant EARLY_USER_BADGE_END_DATE = 1663200000; // Sept 15\\n\\n /**\\n * @dev Constructor\\n * @param attestationsRegistryAddress Attestations registry contract address\\n */\\n constructor(address attestationsRegistryAddress) {\\n ATTESTATIONS_REGISTRY = IAttestationsRegistry(attestationsRegistryAddress);\\n }\\n\\n /**\\n * @dev Forward a request to an attester and generates an early user attestation\\n * @param attester Attester targeted by the request\\n * @param request Request sent to the attester\\n * @param proofData Data provided to the attester to back the request\\n */\\n function generateAttestations(\\n address attester,\\n Request calldata request,\\n bytes calldata proofData\\n ) external override returns (Attestation[] memory) {\\n Attestation[] memory attestations = _forwardAttestationsGeneration(\\n attester,\\n request,\\n proofData\\n );\\n _generateEarlyUserAttestation(request.destination);\\n return attestations;\\n }\\n\\n /**\\n * @dev generate multiple attestations at once, to the same destination, generates an early user attestation\\n * @param attesters Attesters targeted by the attesters\\n * @param requests Requests sent to attester\\n * @param proofDataArray Data sent with each request\\n */\\n function batchGenerateAttestations(\\n address[] calldata attesters,\\n Request[] calldata requests,\\n bytes[] calldata proofDataArray\\n ) external override returns (Attestation[][] memory) {\\n Attestation[][] memory attestations = new Attestation[][](attesters.length);\\n address destination = requests[0].destination;\\n for (uint256 i = 0; i < attesters.length; i++) {\\n if (requests[i].destination != destination) revert DifferentRequestsDestinations();\\n attestations[i] = _forwardAttestationsGeneration(\\n attesters[i],\\n requests[i],\\n proofDataArray[i]\\n );\\n }\\n _generateEarlyUserAttestation(destination);\\n return attestations;\\n }\\n\\n /**\\n * @dev build the attestations from a user request targeting a specific attester.\\n * Forwards to the build function of targeted attester\\n * @param attester Targeted attester\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(\\n address attester,\\n Request calldata request,\\n bytes calldata proofData\\n ) external view override returns (Attestation[] memory) {\\n return _forwardAttestationsBuild(attester, request, proofData);\\n }\\n\\n /**\\n * @dev build the attestations from multiple user requests.\\n * Forwards to the build function of targeted attester\\n * @param attesters Targeted attesters\\n * @param requests User requests\\n * @param proofDataArray Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function batchBuildAttestations(\\n address[] calldata attesters,\\n Request[] calldata requests,\\n bytes[] calldata proofDataArray\\n ) external view override returns (Attestation[][] memory) {\\n Attestation[][] memory attestations = new Attestation[][](attesters.length);\\n\\n for (uint256 i = 0; i < attesters.length; i++) {\\n attestations[i] = _forwardAttestationsBuild(attesters[i], requests[i], proofDataArray[i]);\\n }\\n return attestations;\\n }\\n\\n function _forwardAttestationsBuild(\\n address attester,\\n Request calldata request,\\n bytes calldata proofData\\n ) internal view returns (Attestation[] memory) {\\n return IAttester(attester).buildAttestations(request, proofData);\\n }\\n\\n function _forwardAttestationsGeneration(\\n address attester,\\n Request calldata request,\\n bytes calldata proofData\\n ) internal returns (Attestation[] memory) {\\n return IAttester(attester).generateAttestations(request, proofData);\\n }\\n\\n function _generateEarlyUserAttestation(address destination) internal {\\n uint32 currentTimestamp = uint32(block.timestamp);\\n if (currentTimestamp < EARLY_USER_BADGE_END_DATE) {\\n bool alreadyHasAttestation = ATTESTATIONS_REGISTRY.hasAttestation(\\n EARLY_USER_COLLECTION,\\n destination\\n );\\n\\n if (!alreadyHasAttestation) {\\n Attestation[] memory attestations = new Attestation[](1);\\n attestations[0] = Attestation(\\n EARLY_USER_COLLECTION,\\n destination,\\n address(this),\\n 1,\\n currentTimestamp,\\n 'With strong love from Sismo'\\n );\\n ATTESTATIONS_REGISTRY.recordAttestations(attestations);\\n emit EarlyUserAttestationGenerated(destination);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3ea2112c22a36ff318873f1f015fa9e3b447e93d33464ae81b9bcd7d0f917621\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttestationsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Attestation, AttestationData} from '../libs/Structs.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry {\\n event AttestationRecorded(Attestation attestation);\\n event AttestationDeleted(Attestation attestation);\\n\\n /**\\n * @dev Main function to be called by authorized issuers\\n * @param attestations Attestations to be recorded (creates a new one or overrides an existing one)\\n */\\n function recordAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Delete function to be called by authorized issuers\\n * @param attestations Attestations to be deleted\\n */\\n function deleteAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Returns whether a user has an attestation from a collection\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function hasAttestation(uint256 collectionId, address owner) external returns (bool);\\n\\n /**\\n * @dev Getter of the data of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationData(uint256 collectionId, address owner)\\n external\\n view\\n returns (AttestationData memory);\\n\\n /**\\n * @dev Getter of the value of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationValue(uint256 collectionId, address owner) external view returns (uint256);\\n\\n /**\\n * @dev Getter of the data of a specific attestation as tuple\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationDataTuple(uint256 collectionId, address owner)\\n external\\n view\\n returns (\\n address,\\n uint256,\\n uint32,\\n bytes memory\\n );\\n\\n /**\\n * @dev Getter of the extraData of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationExtraData(uint256 collectionId, address owner)\\n external\\n view\\n returns (bytes memory);\\n\\n /**\\n * @dev Getter of the issuer of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationIssuer(uint256 collectionId, address owner)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @dev Getter of the timestamp of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationTimestamp(uint256 collectionId, address owner)\\n external\\n view\\n returns (uint32);\\n\\n /**\\n * @dev Getter of the data of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationDataBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (AttestationData[] memory);\\n\\n /**\\n * @dev Getter of the values of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationValueBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xb5e25bd7e0372c9973e582fb7fe96318c145831a5452d8c79eb848a7464b0297\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Request, Attestation} from '../libs/Structs.sol';\\nimport {IAttestationsRegistry} from '../interfaces/IAttestationsRegistry.sol';\\n\\n/**\\n * @title IAttester\\n * @author Sismo\\n * @notice This is the interface for the attesters in Sismo Protocol\\n */\\ninterface IAttester {\\n event AttestationGenerated(Attestation attestation);\\n\\n event AttestationDeleted(Attestation attestation);\\n\\n error AttestationDeletionNotImplemented();\\n\\n /**\\n * @dev Main external function. Allows to generate attestations by making a request and submitting proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that has been recorded\\n */\\n function generateAttestations(Request calldata request, bytes calldata proofData)\\n external\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev External facing function. Allows to delete an attestation by submitting proof\\n * @param collectionIds Collection identifier of attestations to delete\\n * @param attestationsOwner Owner of attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n * @return attestations Attestations that was deleted\\n */\\n function deleteAttestations(\\n uint256[] calldata collectionIds,\\n address attestationsOwner,\\n bytes calldata proofData\\n ) external returns (Attestation[] memory);\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should build attestations from the user request and the proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(Request calldata request, bytes calldata proofData)\\n external\\n view\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev Attestation registry address getter\\n * @return attestationRegistry Address of the registry\\n */\\n function getAttestationRegistry() external view returns (IAttestationsRegistry);\\n}\\n\",\"keccak256\":\"0xafe9c1a742d7570033c8d74cee203e09ee9b7461eaed6d2ca77697449e2ce95d\",\"license\":\"MIT\"},\"contracts/core/interfaces/IFront.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Request, Attestation} from '../libs/Structs.sol';\\n\\n/**\\n * @title IFront\\n * @author Sismo\\n * @notice This is the interface of the Front Contract\\n */\\ninterface IFront {\\n error DifferentRequestsDestinations();\\n event EarlyUserAttestationGenerated(address destination);\\n\\n /**\\n * @dev Forward a request to an attester and generates an early user attestation\\n * @param attester Attester targeted by the request\\n * @param request Request sent to the attester\\n * @param proofData Data provided to the attester to back the request\\n */\\n function generateAttestations(\\n address attester,\\n Request calldata request,\\n bytes calldata proofData\\n ) external returns (Attestation[] memory);\\n\\n /**\\n * @dev generate multiple attestations at once, to the same destination\\n * @param attesters Attesters targeted by the attesters\\n * @param requests Requests sent to attester\\n * @param proofDataArray Data sent with each request\\n */\\n function batchGenerateAttestations(\\n address[] calldata attesters,\\n Request[] calldata requests,\\n bytes[] calldata proofDataArray\\n ) external returns (Attestation[][] memory);\\n\\n /**\\n * @dev build the attestations from a user request targeting a specific attester.\\n * Forwards to the build function of targeted attester\\n * @param attester Targeted attester\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(\\n address attester,\\n Request calldata request,\\n bytes calldata proofData\\n ) external view returns (Attestation[] memory);\\n\\n /**\\n * @dev build the attestations from multiple user requests.\\n * Forwards to the build function(s) of targeted attester(s)\\n * @param attesters Targeted attesters\\n * @param requests User requests\\n * @param proofDataArray Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function batchBuildAttestations(\\n address[] calldata attesters,\\n Request[] calldata requests,\\n bytes[] calldata proofDataArray\\n ) external view returns (Attestation[][] memory);\\n}\\n\",\"keccak256\":\"0xfeab84e36830c432f91d0cbe1beb430331529829ce667a6371fbad47baa12191\",\"license\":\"MIT\"},\"contracts/core/libs/Structs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title Attestations Registry State\\n * @author Sismo\\n * @notice This contract holds all of the storage variables and data\\n * structures used by the AttestationsRegistry and parent\\n * contracts.\\n */\\n\\n// User Attestation Request, can be made by any user\\n// The context of an Attestation Request is a specific attester contract\\n// Each attester has groups of accounts in its available data\\n// eg: for a specific attester:\\n// group 1 <=> accounts that sent txs on mainnet\\n// group 2 <=> accounts that sent txs on polygon\\n// eg: for another attester:\\n// group 1 <=> accounts that sent eth txs in 2022\\n// group 2 <=> accounts sent eth txs in 2021\\nstruct Request {\\n // implicit address attester;\\n // implicit uint256 chainId;\\n Claim[] claims;\\n address destination; // destination that will receive the end attestation\\n}\\n\\nstruct Claim {\\n uint256 groupId; // user claims to have an account in this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n bytes extraData; // arbitrary data, may be required by the attester to verify claims or generate a specific attestation\\n}\\n\\n/**\\n * @dev Attestation Struct. This is the struct receive as argument by the Attestation Registry.\\n * @param collectionId Attestation collection\\n * @param owner Attestation collection\\n * @param issuer Attestation collection\\n * @param value Attestation collection\\n * @param timestamp Attestation collection\\n * @param extraData Attestation collection\\n */\\nstruct Attestation {\\n // implicit uint256 chainId;\\n uint256 collectionId; // Id of the attestation collection (in the registry)\\n address owner; // Owner of the attestation\\n address issuer; // Contract that created or last updated the record.\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Timestamp chosen by the attester, should correspond to the effective date of the attestation\\n // it is different from the recording timestamp (date when the attestation was recorded)\\n // e.g a proof of NFT ownership may have be recorded today which is 2 month old data.\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\\n// Attestation Data, stored in the registry\\n// The context is a specific owner of a specific collection\\nstruct AttestationData {\\n // implicit uint256 chainId\\n // implicit uint256 collectionId - from context\\n // implicit owner\\n address issuer; // Address of the contract that recorded the attestation\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Effective date of issuance of the attestation. (can be different from the recording timestamp)\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\",\"keccak256\":\"0x893d9a10429878dd4077388ff4da954c20b86a3c172a7bbdd10a01eb5d39b6a0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a060405234801561001057600080fd5b506040516110e43803806110e483398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b60805161104b610099600039600081816101020152818161051901526106bd015261104b6000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806389a504771161005b57806389a50477146100e7578063ac9d6541146100fd578063aebddc691461013c578063c0a92c911461014f57600080fd5b80630a60387d14610082578063369b88be146100a75780633ee490ce146100c7575b600080fd5b61008d6363226b0081565b60405163ffffffff90911681526020015b60405180910390f35b6100ba6100b5366004610805565b610162565b60405161009e91906108cf565b6100da6100d5366004610a0d565b61031d565b60405161009e9190610ab9565b6100ef600081565b60405190815260200161009e565b6101247f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161009e565b6100da61014a366004610a0d565b610350565b6100ba61015d366004610805565b61035e565b606060008667ffffffffffffffff81111561017f5761017f610b84565b6040519080825280602002602001820160405280156101b257816020015b606081526020019060019003908161019d5790505b5090506000868660008181106101ca576101ca610b9a565b90506020028101906101dc9190610bb0565b6101ed906040810190602001610bd0565b905060005b8881101561030757816001600160a01b031688888381811061021657610216610b9a565b90506020028101906102289190610bb0565b610239906040810190602001610bd0565b6001600160a01b0316146102605760405163f1b973df60e01b815260040160405180910390fd5b6102d78a8a8381811061027557610275610b9a565b905060200201602081019061028a9190610bd0565b89898481811061029c5761029c610b9a565b90506020028101906102ae9190610bb0565b8888858181106102c0576102c0610b9a565b90506020028101906102d29190610bf4565b610463565b8382815181106102e9576102e9610b9a565b602002602001018190525080806102ff90610c3b565b9150506101f2565b50610311816104dd565b50979650505050505050565b6060600061032d86868686610463565b90506103476103426040870160208801610bd0565b6104dd565b95945050505050565b606061034785858585610769565b606060008667ffffffffffffffff81111561037b5761037b610b84565b6040519080825280602002602001820160405280156103ae57816020015b60608152602001906001900390816103995790505b50905060005b87811015610311576104338989838181106103d1576103d1610b9a565b90506020020160208101906103e69190610bd0565b8888848181106103f8576103f8610b9a565b905060200281019061040a9190610bb0565b87878581811061041c5761041c610b9a565b905060200281019061042e9190610bf4565b610769565b82828151811061044557610445610b9a565b6020026020010181905250808061045b90610c3b565b9150506103b4565b60405163e60f999f60e01b81526060906001600160a01b0386169063e60f999f9061049690879087908790600401610c8b565b6000604051808303816000875af11580156104b5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103479190810190610e9d565b426363226b0063ffffffff82161015610765576040516211023960e41b81526000600482018190526001600160a01b03848116602484015290917f0000000000000000000000000000000000000000000000000000000000000000909116906301102390906044016020604051808303816000875af1158015610564573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105889190610ff3565b90508061076357604080516001808252818301909252600091816020015b6105f76040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b8152602001906001900390816105a65790505090506040518060c0016040528060008152602001856001600160a01b03168152602001306001600160a01b03168152602001600181526020018463ffffffff1681526020016040518060400160405280601b81526020017f57697468207374726f6e67206c6f76652066726f6d205369736d6f00000000008152508152508160008151811061069b5761069b610b9a565b602090810291909101015260405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906106f2908490600401610ab9565b600060405180830381600087803b15801561070c57600080fd5b505af1158015610720573d6000803e3d6000fd5b50506040516001600160a01b03871681527f65566f56ce57729c92989973ff6ac5bdd213f57bf75d7248c4190d6d3634738e9250602001905060405180910390a1505b505b5050565b604051630af411a360e41b81526060906001600160a01b0386169063af411a309061079c90879087908790600401610c8b565b600060405180830381865afa1580156104b5573d6000803e3d6000fd5b60008083601f8401126107cb57600080fd5b50813567ffffffffffffffff8111156107e357600080fd5b6020830191508360208260051b85010111156107fe57600080fd5b9250929050565b6000806000806000806060878903121561081e57600080fd5b863567ffffffffffffffff8082111561083657600080fd5b6108428a838b016107b9565b9098509650602089013591508082111561085b57600080fd5b6108678a838b016107b9565b9096509450604089013591508082111561088057600080fd5b5061088d89828a016107b9565b979a9699509497509295939492505050565b60005b838110156108ba5781810151838201526020016108a2565b838111156108c9576000848401525b50505050565b60208152600060208201835180825260408401915060408160051b8501016020860160005b838110156109d957868303603f19018552815180518085526020918201918086019190600582901b87010160005b828110156109bf57601f1980898403018552855180518452602081015160018060a01b03808216602087015280604084015116604087015250506060810151606085015263ffffffff608082015116608085015260a0810151905060c060a085015280518060c086015261099d8160e087016020850161089f565b6020978801979690960195601f019091169290920160e0019150600101610922565b5060209889019890965094909401935050506001016108f4565b50909695505050505050565b6001600160a01b03811681146109fa57600080fd5b50565b8035610a08816109e5565b919050565b60008060008060608587031215610a2357600080fd5b8435610a2e816109e5565b9350602085013567ffffffffffffffff80821115610a4b57600080fd5b9086019060408289031215610a5f57600080fd5b90935060408601359080821115610a7557600080fd5b818701915087601f830112610a8957600080fd5b813581811115610a9857600080fd5b886020828501011115610aaa57600080fd5b95989497505060200194505050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015610b7657888303603f19018552815180518452878101516001600160a01b03908116898601528782015116878501526060808201519085015260808082015163ffffffff169085015260a09081015160c091850182905280519185018290529060e090610b5681838801858d0161089f565b96890196601f01601f191694909401909301925090860190600101610ae0565b509098975050505050505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008235603e19833603018112610bc657600080fd5b9190910192915050565b600060208284031215610be257600080fd5b8135610bed816109e5565b9392505050565b6000808335601e19843603018112610c0b57600080fd5b83018035915067ffffffffffffffff821115610c2657600080fd5b6020019150368190038213156107fe57600080fd5b600060018201610c5b57634e487b7160e01b600052601160045260246000fd5b5060010190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60006040808352608083018635601e19883603018112610caa57600080fd5b87018035602080830167ffffffffffffffff80841115610cc957600080fd5b8360051b803603831315610cdc57600080fd5b878a018890529584905260a09589018601956000908a01607e1936889003015b86831015610d96578b8903609f190182528435818112610d1b57600080fd5b8801868101358a528a8101358a88015260608082013536839003603e19018112610d4457600080fd5b9091018b8101919088013586811115610d5c57600080fd5b803603831315610d6b57600080fd5b818d8d0152610d7d828d018285610c62565b9b50505094860194506001929092019190850190610cfc565b5050505050610da6818b016109fd565b6001600160a01b0381166060890152945086840381880152505050610dcc818688610c62565b979650505050505050565b60405160c0810167ffffffffffffffff81118282101715610dfa57610dfa610b84565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610e2957610e29610b84565b604052919050565b600082601f830112610e4257600080fd5b815167ffffffffffffffff811115610e5c57610e5c610b84565b610e6f601f8201601f1916602001610e00565b818152846020838601011115610e8457600080fd5b610e9582602083016020870161089f565b949350505050565b60006020808385031215610eb057600080fd5b825167ffffffffffffffff80821115610ec857600080fd5b818501915085601f830112610edc57600080fd5b815181811115610eee57610eee610b84565b8060051b610efd858201610e00565b9182528381018501918581019089841115610f1757600080fd5b86860192505b83831015610fe657825185811115610f355760008081fd5b860160c0818c03601f1901811315610f4d5760008081fd5b610f55610dd7565b898301518152604080840151610f6a816109e5565b828c0152606084810151610f7d816109e5565b8083850152506080915081850151818401525060a08085015163ffffffff81168114610fa95760008081fd5b83830152928401519289841115610fc257600091508182fd5b610fd08f8d86880101610e31565b9083015250845250509186019190860190610f1d565b9998505050505050505050565b60006020828403121561100557600080fd5b81518015158114610bed57600080fdfea26469706673582212206eab9b350687ecccafd79868df619e95a4ffb1f38b3590296e186abb24b904f864736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c806389a504771161005b57806389a50477146100e7578063ac9d6541146100fd578063aebddc691461013c578063c0a92c911461014f57600080fd5b80630a60387d14610082578063369b88be146100a75780633ee490ce146100c7575b600080fd5b61008d6363226b0081565b60405163ffffffff90911681526020015b60405180910390f35b6100ba6100b5366004610805565b610162565b60405161009e91906108cf565b6100da6100d5366004610a0d565b61031d565b60405161009e9190610ab9565b6100ef600081565b60405190815260200161009e565b6101247f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161009e565b6100da61014a366004610a0d565b610350565b6100ba61015d366004610805565b61035e565b606060008667ffffffffffffffff81111561017f5761017f610b84565b6040519080825280602002602001820160405280156101b257816020015b606081526020019060019003908161019d5790505b5090506000868660008181106101ca576101ca610b9a565b90506020028101906101dc9190610bb0565b6101ed906040810190602001610bd0565b905060005b8881101561030757816001600160a01b031688888381811061021657610216610b9a565b90506020028101906102289190610bb0565b610239906040810190602001610bd0565b6001600160a01b0316146102605760405163f1b973df60e01b815260040160405180910390fd5b6102d78a8a8381811061027557610275610b9a565b905060200201602081019061028a9190610bd0565b89898481811061029c5761029c610b9a565b90506020028101906102ae9190610bb0565b8888858181106102c0576102c0610b9a565b90506020028101906102d29190610bf4565b610463565b8382815181106102e9576102e9610b9a565b602002602001018190525080806102ff90610c3b565b9150506101f2565b50610311816104dd565b50979650505050505050565b6060600061032d86868686610463565b90506103476103426040870160208801610bd0565b6104dd565b95945050505050565b606061034785858585610769565b606060008667ffffffffffffffff81111561037b5761037b610b84565b6040519080825280602002602001820160405280156103ae57816020015b60608152602001906001900390816103995790505b50905060005b87811015610311576104338989838181106103d1576103d1610b9a565b90506020020160208101906103e69190610bd0565b8888848181106103f8576103f8610b9a565b905060200281019061040a9190610bb0565b87878581811061041c5761041c610b9a565b905060200281019061042e9190610bf4565b610769565b82828151811061044557610445610b9a565b6020026020010181905250808061045b90610c3b565b9150506103b4565b60405163e60f999f60e01b81526060906001600160a01b0386169063e60f999f9061049690879087908790600401610c8b565b6000604051808303816000875af11580156104b5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103479190810190610e9d565b426363226b0063ffffffff82161015610765576040516211023960e41b81526000600482018190526001600160a01b03848116602484015290917f0000000000000000000000000000000000000000000000000000000000000000909116906301102390906044016020604051808303816000875af1158015610564573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105889190610ff3565b90508061076357604080516001808252818301909252600091816020015b6105f76040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b8152602001906001900390816105a65790505090506040518060c0016040528060008152602001856001600160a01b03168152602001306001600160a01b03168152602001600181526020018463ffffffff1681526020016040518060400160405280601b81526020017f57697468207374726f6e67206c6f76652066726f6d205369736d6f00000000008152508152508160008151811061069b5761069b610b9a565b602090810291909101015260405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906106f2908490600401610ab9565b600060405180830381600087803b15801561070c57600080fd5b505af1158015610720573d6000803e3d6000fd5b50506040516001600160a01b03871681527f65566f56ce57729c92989973ff6ac5bdd213f57bf75d7248c4190d6d3634738e9250602001905060405180910390a1505b505b5050565b604051630af411a360e41b81526060906001600160a01b0386169063af411a309061079c90879087908790600401610c8b565b600060405180830381865afa1580156104b5573d6000803e3d6000fd5b60008083601f8401126107cb57600080fd5b50813567ffffffffffffffff8111156107e357600080fd5b6020830191508360208260051b85010111156107fe57600080fd5b9250929050565b6000806000806000806060878903121561081e57600080fd5b863567ffffffffffffffff8082111561083657600080fd5b6108428a838b016107b9565b9098509650602089013591508082111561085b57600080fd5b6108678a838b016107b9565b9096509450604089013591508082111561088057600080fd5b5061088d89828a016107b9565b979a9699509497509295939492505050565b60005b838110156108ba5781810151838201526020016108a2565b838111156108c9576000848401525b50505050565b60208152600060208201835180825260408401915060408160051b8501016020860160005b838110156109d957868303603f19018552815180518085526020918201918086019190600582901b87010160005b828110156109bf57601f1980898403018552855180518452602081015160018060a01b03808216602087015280604084015116604087015250506060810151606085015263ffffffff608082015116608085015260a0810151905060c060a085015280518060c086015261099d8160e087016020850161089f565b6020978801979690960195601f019091169290920160e0019150600101610922565b5060209889019890965094909401935050506001016108f4565b50909695505050505050565b6001600160a01b03811681146109fa57600080fd5b50565b8035610a08816109e5565b919050565b60008060008060608587031215610a2357600080fd5b8435610a2e816109e5565b9350602085013567ffffffffffffffff80821115610a4b57600080fd5b9086019060408289031215610a5f57600080fd5b90935060408601359080821115610a7557600080fd5b818701915087601f830112610a8957600080fd5b813581811115610a9857600080fd5b886020828501011115610aaa57600080fd5b95989497505060200194505050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015610b7657888303603f19018552815180518452878101516001600160a01b03908116898601528782015116878501526060808201519085015260808082015163ffffffff169085015260a09081015160c091850182905280519185018290529060e090610b5681838801858d0161089f565b96890196601f01601f191694909401909301925090860190600101610ae0565b509098975050505050505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008235603e19833603018112610bc657600080fd5b9190910192915050565b600060208284031215610be257600080fd5b8135610bed816109e5565b9392505050565b6000808335601e19843603018112610c0b57600080fd5b83018035915067ffffffffffffffff821115610c2657600080fd5b6020019150368190038213156107fe57600080fd5b600060018201610c5b57634e487b7160e01b600052601160045260246000fd5b5060010190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60006040808352608083018635601e19883603018112610caa57600080fd5b87018035602080830167ffffffffffffffff80841115610cc957600080fd5b8360051b803603831315610cdc57600080fd5b878a018890529584905260a09589018601956000908a01607e1936889003015b86831015610d96578b8903609f190182528435818112610d1b57600080fd5b8801868101358a528a8101358a88015260608082013536839003603e19018112610d4457600080fd5b9091018b8101919088013586811115610d5c57600080fd5b803603831315610d6b57600080fd5b818d8d0152610d7d828d018285610c62565b9b50505094860194506001929092019190850190610cfc565b5050505050610da6818b016109fd565b6001600160a01b0381166060890152945086840381880152505050610dcc818688610c62565b979650505050505050565b60405160c0810167ffffffffffffffff81118282101715610dfa57610dfa610b84565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610e2957610e29610b84565b604052919050565b600082601f830112610e4257600080fd5b815167ffffffffffffffff811115610e5c57610e5c610b84565b610e6f601f8201601f1916602001610e00565b818152846020838601011115610e8457600080fd5b610e9582602083016020870161089f565b949350505050565b60006020808385031215610eb057600080fd5b825167ffffffffffffffff80821115610ec857600080fd5b818501915085601f830112610edc57600080fd5b815181811115610eee57610eee610b84565b8060051b610efd858201610e00565b9182528381018501918581019089841115610f1757600080fd5b86860192505b83831015610fe657825185811115610f355760008081fd5b860160c0818c03601f1901811315610f4d5760008081fd5b610f55610dd7565b898301518152604080840151610f6a816109e5565b828c0152606084810151610f7d816109e5565b8083850152506080915081850151818401525060a08085015163ffffffff81168114610fa95760008081fd5b83830152928401519289841115610fc257600091508182fd5b610fd08f8d86880101610e31565b9083015250845250509186019190860190610f1d565b9998505050505050505050565b60006020828403121561100557600080fd5b81518015158114610bed57600080fdfea26469706673582212206eab9b350687ecccafd79868df619e95a4ffb1f38b3590296e186abb24b904f864736f6c634300080e0033", + "devdoc": { + "author": "Sismo", + "kind": "dev", + "methods": { + "batchBuildAttestations(address[],((uint256,uint256,bytes)[],address)[],bytes[])": { + "details": "build the attestations from multiple user requests. Forwards to the build function of targeted attester", + "params": { + "attesters": "Targeted attesters", + "proofDataArray": "Data sent along the request to prove its validity", + "requests": "User requests" + }, + "returns": { + "_0": "attestations Attestations that will be recorded" + } + }, + "batchGenerateAttestations(address[],((uint256,uint256,bytes)[],address)[],bytes[])": { + "details": "generate multiple attestations at once, to the same destination, generates an early user attestation", + "params": { + "attesters": "Attesters targeted by the attesters", + "proofDataArray": "Data sent with each request", + "requests": "Requests sent to attester" + } + }, + "buildAttestations(address,((uint256,uint256,bytes)[],address),bytes)": { + "details": "build the attestations from a user request targeting a specific attester. Forwards to the build function of targeted attester", + "params": { + "attester": "Targeted attester", + "proofData": "Data sent along the request to prove its validity", + "request": "User request" + }, + "returns": { + "_0": "attestations Attestations that will be recorded" + } + }, + "constructor": { + "details": "Constructor", + "params": { + "attestationsRegistryAddress": "Attestations registry contract address" + } + }, + "generateAttestations(address,((uint256,uint256,bytes)[],address),bytes)": { + "details": "Forward a request to an attester and generates an early user attestation", + "params": { + "attester": "Attester targeted by the request", + "proofData": "Data provided to the attester to back the request", + "request": "Request sent to the attester" + } + } + }, + "title": "Front", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "This is the Front contract of the Sismo protocol Behind a proxy, it routes attestations request to the targeted attester and can perform some actions This specific implementation rewards early users with a early user attestation if they used sismo before ethcc conference For more information: https://front.docs.sismo.io", + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/FrontProxy.json b/deployments/mumbai/FrontProxy.json new file mode 100644 index 0000000..7a5f41b --- /dev/null +++ b/deployments/mumbai/FrontProxy.json @@ -0,0 +1,250 @@ +{ + "address": "0xFD0395fEb7805447e84Eb439a543413ecb22d562", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x177b1d6795df3764a5a84b4137d73730ea1dd284dde6ee68064729eaa7b8caf8", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0xFD0395fEb7805447e84Eb439a543413ecb22d562", + "transactionIndex": 41, + "gasUsed": "583384", + "logsBloom": "0x00000000000000000000000000000000400000000000000008000000000000000000000000000000000000000000000000008000002800000000000000000000000000000000000000000000000002800000000000000000040100000000000000000000000000000000000000000000000000800001000080000000000000000000000000000000000000000000000000000010000000000000000000808000200000000000000000000000000000000000000000000000000040000000004000000020000000000001000000000000000000000400000000100000000008000000000000000000000000000000018000000000000000000020000000100000", + "blockHash": "0x4c0233ab176639c06a43a888b2c254c8e9fca43113b9c77a314a59a3461bed8b", + "transactionHash": "0x177b1d6795df3764a5a84b4137d73730ea1dd284dde6ee68064729eaa7b8caf8", + "logs": [ + { + "transactionIndex": 41, + "blockNumber": 28599995, + "transactionHash": "0x177b1d6795df3764a5a84b4137d73730ea1dd284dde6ee68064729eaa7b8caf8", + "address": "0xFD0395fEb7805447e84Eb439a543413ecb22d562", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000f24e30cb970eb97b07ca1dff1f2b61a981aae2de" + ], + "data": "0x", + "logIndex": 245, + "blockHash": "0x4c0233ab176639c06a43a888b2c254c8e9fca43113b9c77a314a59a3461bed8b" + }, + { + "transactionIndex": 41, + "blockNumber": 28599995, + "transactionHash": "0x177b1d6795df3764a5a84b4137d73730ea1dd284dde6ee68064729eaa7b8caf8", + "address": "0xFD0395fEb7805447e84Eb439a543413ecb22d562", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000246e71bc2a257f4be9c7fad4664e6d7444844adc", + "logIndex": 246, + "blockHash": "0x4c0233ab176639c06a43a888b2c254c8e9fca43113b9c77a314a59a3461bed8b" + }, + { + "transactionIndex": 41, + "blockNumber": 28599995, + "transactionHash": "0x177b1d6795df3764a5a84b4137d73730ea1dd284dde6ee68064729eaa7b8caf8", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x00000000000000000000000000000000000000000000000000055ca3b4bc17f800000000000000000000000000000000000000000000000086fd3ba77daaaa4b000000000000000000000000000000000000000000000a08d90cada77dcda4cf00000000000000000000000000000000000000000000000086f7df03c8ee9253000000000000000000000000000000000000000000000a08d9120a4b3289bcc7", + "logIndex": 247, + "blockHash": "0x4c0233ab176639c06a43a888b2c254c8e9fca43113b9c77a314a59a3461bed8b" + } + ], + "blockNumber": 28599995, + "cumulativeGasUsed": "8728377", + "status": 1, + "byzantium": true + }, + "args": [ + "0xf24E30Cb970eb97b07cA1dFf1F2b61A981AaE2DE", + "0x246E71bC2a257f4BE9C7fAD4664E6D7444844Adc", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/periphery/utils/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0x0edeb16b9821ae2b16e9d69c383b38d3ad2fbb3e0c06cf809a0786d96e602551\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"contracts/periphery/utils/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n// Note: we just copied so that we can see the contract used\\npragma solidity ^0.8.14;\\n\\nimport {ERC1967Proxy} from '@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol';\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1));\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(''), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n ifAdmin\\n {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(\\n msg.sender != _getAdmin(),\\n 'TransparentUpgradeableProxy: admin cannot fallback to proxy target'\\n );\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0x0d943fb8814617343a244f762e791c664bb647e32d484ba94fe1958bac85f6dc\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000f2a38038062000f2a833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b60008051602062000ee3833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b60008051602062000ec383398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b6200022e1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e9838360405180606001604052806027815260200162000f036027913962000381565b9392505050565b60006200021a60008051602062000ec383398151915260001b6200046760201b620001ea1760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd60008051602062000ec383398151915260001b6200046760201b620001ea1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200025a1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd60008051602062000ee383398151915260001b6200046760201b620001ea1760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b61082b80620006986000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b5565b610118565b61005b6100933660046106d0565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b5565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107cf602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6104bb565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610368836104e3565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610523565b60606001600160a01b0384163b6104465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016102f5565b600080856001600160a01b031685604051610461919061077f565b600060405180830381855af49150503d806000811461049c576040519150601f19603f3d011682016040523d82523d6000602084013e6104a1565b606091505b50915091506104b18282866105cc565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b6104ec81610605565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105885760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105db575081610253565b8251156105eb5782518084602001fd5b8160405162461bcd60e51b81526004016102f5919061079b565b6001600160a01b0381163b6106725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105ab565b80356001600160a01b03811681146106b057600080fd5b919050565b6000602082840312156106c757600080fd5b61025382610699565b6000806000604084860312156106e557600080fd5b6106ee84610699565b9250602084013567ffffffffffffffff8082111561070b57600080fd5b818601915086601f83011261071f57600080fd5b81358181111561072e57600080fd5b87602082850101111561074057600080fd5b6020830194508093505050509250925092565b60005b8381101561076e578181015183820152602001610756565b838111156103845750506000910152565b60008251610791818460208701610753565b9190910192915050565b60208152600082518060208401526107ba816040850160208701610753565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200396e81b41a53c52a5f2bff0f6a830a500e30d67dcfc4c47e029fb4021c6775064736f6c634300080e0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b5565b610118565b61005b6100933660046106d0565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b5565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107cf602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6104bb565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610368836104e3565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610523565b60606001600160a01b0384163b6104465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016102f5565b600080856001600160a01b031685604051610461919061077f565b600060405180830381855af49150503d806000811461049c576040519150601f19603f3d011682016040523d82523d6000602084013e6104a1565b606091505b50915091506104b18282866105cc565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b6104ec81610605565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105885760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105db575081610253565b8251156105eb5782518084602001fd5b8160405162461bcd60e51b81526004016102f5919061079b565b6001600160a01b0381163b6106725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105ab565b80356001600160a01b03811681146106b057600080fd5b919050565b6000602082840312156106c757600080fd5b61025382610699565b6000806000604084860312156106e557600080fd5b6106ee84610699565b9250602084013567ffffffffffffffff8082111561070b57600080fd5b818601915086601f83011261071f57600080fd5b81358181111561072e57600080fd5b87602082850101111561074057600080fd5b6020830194508093505050509250925092565b60005b8381101561076e578181015183820152602001610756565b838111156103845750506000910152565b60008251610791818460208701610753565b9190910192915050565b60208152600082518060208401526107ba816040850160208701610753565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200396e81b41a53c52a5f2bff0f6a830a500e30d67dcfc4c47e029fb4021c6775064736f6c634300080e0033", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/HydraS1SimpleAttester.json b/deployments/mumbai/HydraS1SimpleAttester.json new file mode 100644 index 0000000..c5e6061 --- /dev/null +++ b/deployments/mumbai/HydraS1SimpleAttester.json @@ -0,0 +1,854 @@ +{ + "address": "0x069e6B99f4DA543156f66274FC6673442803C587", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "attestationsRegistryAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "hydraS1VerifierAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "availableRootsRegistryAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "commitmentMapperAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "collectionIdFirst", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collectionIdLast", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedAccountsTreeValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputAccountsTreeValue", + "type": "uint256" + } + ], + "name": "AccountsTreeValueMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "AttestationDeletionNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "ChainIdMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "claimLength", + "type": "uint256" + } + ], + "name": "ClaimsLengthDifferentThanOne", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + } + ], + "name": "CollectionIdOutOfBound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedX", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedY", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputX", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputY", + "type": "uint256" + } + ], + "name": "CommitmentMapperPubKeyMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expectedDestination", + "type": "address" + }, + { + "internalType": "address", + "name": "inputDestination", + "type": "address" + } + ], + "name": "DestinationMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedGroupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + } + ], + "name": "GroupIdAndPropertiesMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "InvalidGroth16Proof", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "expectedStrictness", + "type": "bool" + }, + { + "internalType": "bool", + "name": "strictNess", + "type": "bool" + } + ], + "name": "IsStrictMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "inputRoot", + "type": "uint256" + } + ], + "name": "RegistryRootMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedTicketIdentifier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ticketIdentifier", + "type": "uint256" + } + ], + "name": "TicketIdentifierMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "userTicket", + "type": "uint256" + } + ], + "name": "TicketUsed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputValue", + "type": "uint256" + } + ], + "name": "ValueMismatch", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct Attestation", + "name": "attestation", + "type": "tuple" + } + ], + "name": "AttestationDeleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct Attestation", + "name": "attestation", + "type": "tuple" + } + ], + "name": "AttestationGenerated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "ticket", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "TicketDestinationUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "AUTHORIZED_COLLECTION_ID_FIRST", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "AUTHORIZED_COLLECTION_ID_LAST", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "buildAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "collectionIds", + "type": "uint256[]" + }, + { + "internalType": "address", + "name": "attestationsOwner", + "type": "address" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "deleteAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "generateAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAttestationRegistry", + "outputs": [ + { + "internalType": "contract IAttestationsRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAvailableRootsRegistry", + "outputs": [ + { + "internalType": "contract IAvailableRootsRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCommitmentMapperRegistry", + "outputs": [ + { + "internalType": "contract ICommitmentMapperRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "userTicket", + "type": "uint256" + } + ], + "name": "getDestinationOfTicket", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVerifier", + "outputs": [ + { + "internalType": "contract HydraS1Verifier", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xbd918ae00c33e642de063dde542b8c9ac0c1eb2b71b489c125396c212176556c", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x1E03E088D1AF616280bf7E34EcaEa3D85ac7Fbd7", + "transactionIndex": 1, + "gasUsed": "1609554", + "logsBloom": "0x00000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000010000000000000000000008000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0xa8b24f88275f1f71ce4a8eb3818a7a0a13e150ab543f19a5d5065b96f301bf86", + "transactionHash": "0xbd918ae00c33e642de063dde542b8c9ac0c1eb2b71b489c125396c212176556c", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 28600031, + "transactionHash": "0xbd918ae00c33e642de063dde542b8c9ac0c1eb2b71b489c125396c212176556c", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000000137aa723d2d5ce000000000000000000000000000000000000000000000000845b066efa6b6f9200000000000000000000000000000000000000000000167a2e33d6452ac16a1900000000000000000000000000000000000000000000000084478bc7d69899c400000000000000000000000000000000000000000000167a2e4750ec4e943fe7", + "logIndex": 1, + "blockHash": "0xa8b24f88275f1f71ce4a8eb3818a7a0a13e150ab543f19a5d5065b96f301bf86" + } + ], + "blockNumber": 28600031, + "cumulativeGasUsed": "1678380", + "status": 1, + "byzantium": true + }, + "args": [ + "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", + "0x34e3CcCF4fF2E297be22465b85F03E5E6D27b41B", + "0x2c17e335d131dfd21238475Dd545B9B29Fb5A27D", + "0x82B54988e4E3a2850501F91AC06CEA82bdb014D3", + "10000001", + "20000000" + ], + "numDeployments": 2, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attestationsRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"hydraS1VerifierAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"availableRootsRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"commitmentMapperAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"collectionIdFirst\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collectionIdLast\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedAccountsTreeValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputAccountsTreeValue\",\"type\":\"uint256\"}],\"name\":\"AccountsTreeValueMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AttestationDeletionNotImplemented\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"name\":\"ChainIdMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"claimLength\",\"type\":\"uint256\"}],\"name\":\"ClaimsLengthDifferentThanOne\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"}],\"name\":\"CollectionIdOutOfBound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedX\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expectedY\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputX\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputY\",\"type\":\"uint256\"}],\"name\":\"CommitmentMapperPubKeyMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"expectedDestination\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"inputDestination\",\"type\":\"address\"}],\"name\":\"DestinationMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedGroupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"}],\"name\":\"GroupIdAndPropertiesMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"InvalidGroth16Proof\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"expectedStrictness\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"strictNess\",\"type\":\"bool\"}],\"name\":\"IsStrictMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"inputRoot\",\"type\":\"uint256\"}],\"name\":\"RegistryRootMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedTicketIdentifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ticketIdentifier\",\"type\":\"uint256\"}],\"name\":\"TicketIdentifierMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"userTicket\",\"type\":\"uint256\"}],\"name\":\"TicketUsed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputValue\",\"type\":\"uint256\"}],\"name\":\"ValueMismatch\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct Attestation\",\"name\":\"attestation\",\"type\":\"tuple\"}],\"name\":\"AttestationDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct Attestation\",\"name\":\"attestation\",\"type\":\"tuple\"}],\"name\":\"AttestationGenerated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ticket\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"TicketDestinationUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"AUTHORIZED_COLLECTION_ID_FIRST\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"AUTHORIZED_COLLECTION_ID_LAST\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"buildAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"attestationsOwner\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"deleteAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"generateAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAttestationRegistry\",\"outputs\":[{\"internalType\":\"contract IAttestationsRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAvailableRootsRegistry\",\"outputs\":[{\"internalType\":\"contract IAvailableRootsRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCommitmentMapperRegistry\",\"outputs\":[{\"internalType\":\"contract ICommitmentMapperRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"userTicket\",\"type\":\"uint256\"}],\"name\":\"getDestinationOfTicket\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVerifier\",\"outputs\":[{\"internalType\":\"contract HydraS1Verifier\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"buildAttestations(((uint256,uint256,bytes)[],address),bytes)\":{\"details\":\"Returns attestations that will be recorded, constructed from the user request\",\"params\":{\"request\":\"users request. Claim of having an account part of a group of accounts\"}},\"constructor\":{\"details\":\"Constructor. Initializes the contract\",\"params\":{\"attestationsRegistryAddress\":\"Attestations Registry contract on which the attester will write attestations\",\"availableRootsRegistryAddress\":\"Registry storing the available groups for this attester (e.g roots of registry merkle trees)\",\"collectionIdFirst\":\"Id of the first collection in which the attester is supposed to record\",\"collectionIdLast\":\"Id of the last collection in which the attester is supposed to record\",\"commitmentMapperAddress\":\"commitment mapper's public key registry\",\"hydraS1VerifierAddress\":\"ZK Snark Hydra-S1 Verifier contract\"}},\"deleteAttestations(uint256[],address,bytes)\":{\"details\":\"External facing function. Allows to delete attestations by submitting proof\",\"params\":{\"attestationsOwner\":\"Owner of attestations to delete\",\"collectionIds\":\"Collection identifier of attestations to delete\",\"proofData\":\"Data sent along the deletion request to prove its validity\"},\"returns\":{\"_0\":\"attestations Attestations that were deleted\"}},\"generateAttestations(((uint256,uint256,bytes)[],address),bytes)\":{\"details\":\"Main external function. Allows to generate attestations by making a request and submitting proof\",\"params\":{\"proofData\":\"Data sent along the request to prove its validity\",\"request\":\"User request\"},\"returns\":{\"_0\":\"attestations Attestations that has been recorded\"}},\"getAttestationRegistry()\":{\"details\":\"Attestation registry getter\",\"returns\":{\"_0\":\"attestationRegistry\"}},\"getAvailableRootsRegistry()\":{\"details\":\"Getter of Roots Registry Contract\"},\"getCommitmentMapperRegistry()\":{\"details\":\"Getter of Commitment Mapper Registry contract\"},\"getDestinationOfTicket(uint256)\":{\"details\":\"Getter, returns the last attestation destination of a ticket\",\"params\":{\"userTicket\":\"ticket used*\"}},\"getVerifier()\":{\"details\":\"Getter of Hydra-S1 Verifier contract\"}},\"stateVariables\":{\"AUTHORIZED_COLLECTION_ID_FIRST\":{\"details\":\"Getter returns of the first collection in which the attester is supposed to record*\"},\"AUTHORIZED_COLLECTION_ID_LAST\":{\"details\":\"Getter returns of the last collection in which the attester is supposed to record*\"}},\"title\":\"Hydra-S1 Simple Attester\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"This attester is part of the family of the Hydra-S1 Attesters. Hydra-S1 attesters enable users to prove they have an account in a group in a privacy preserving way. The Hydra-S1 Base abstract contract is inherited and holds the complex Hydra S1 verification logic. We invite readers to refer to: - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1 This specific attester has the following characteristics: - Zero Knowledge One cannot deduct from an attestation what source account was used to generate the underlying proof - Non Strict (scores) If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100. This attester generate attestations of scores - Ticketed Each source account gets one userTicket per claim (i.e only one attestation per source account per claim) For people used to semaphore/ tornado cash people: userTicket = hash(sourceSecret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier) - Renewable A userTicket can actually be reused as long as the destination of the attestation remains the same It enables users to renew their attestations*\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/attesters/hydra-s1/HydraS1SimpleAttester.sol\":\"HydraS1SimpleAttester\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() initializer {}\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\\n // contract may have been reentered.\\n require(_initializing ? _isConstructor() : !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} modifier, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n function _isConstructor() private view returns (bool) {\\n return !Address.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x4823752b07b8ea4ca971b217e39457930e7cb103c2c91e2a29729e5ca907e4f0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@sismo-core/hydra-s1/contracts/HydraS1Verifier.sol\":{\"content\":\"//\\n// Copyright 2017 Christian Reitwiessner\\n// 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:\\n// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\\n// 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.\\n//\\n// 2019 OKIMS\\n// ported to solidity 0.6\\n// fixed linter warnings\\n// added requiere error messages\\n//\\n//\\n// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.0;\\nlibrary Pairing {\\n struct G1Point {\\n uint X;\\n uint Y;\\n }\\n // Encoding of field elements is: X[0] * z + X[1]\\n struct G2Point {\\n uint[2] X;\\n uint[2] Y;\\n }\\n /// @return the generator of G1\\n function P1() internal pure returns (G1Point memory) {\\n return G1Point(1, 2);\\n }\\n /// @return the generator of G2\\n function P2() internal pure returns (G2Point memory) {\\n // Original code point\\n return G2Point(\\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\\n );\\n\\n/*\\n // Changed by Jordi point\\n return G2Point(\\n [10857046999023057135944570762232829481370756359578518086990519993285655852781,\\n 11559732032986387107991004021392285783925812861821192530917403151452391805634],\\n [8495653923123431417604973247489272438418190587263600148770280649306958101930,\\n 4082367875863433681332203403145435568316851327593401208105741076214120093531]\\n );\\n*/\\n }\\n /// @return r the negation of p, i.e. p.addition(p.negate()) should be zero.\\n function negate(G1Point memory p) internal pure returns (G1Point memory r) {\\n // The prime q in the base field F_q for G1\\n uint q = 21888242871839275222246405745257275088696311157297823662689037894645226208583;\\n if (p.X == 0 && p.Y == 0)\\n return G1Point(0, 0);\\n return G1Point(p.X, q - (p.Y % q));\\n }\\n /// @return r the sum of two points of G1\\n function addition(G1Point memory p1, G1Point memory p2) internal view returns (G1Point memory r) {\\n uint[4] memory input;\\n input[0] = p1.X;\\n input[1] = p1.Y;\\n input[2] = p2.X;\\n input[3] = p2.Y;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require(success,\\\"pairing-add-failed\\\");\\n }\\n /// @return r the product of a point on G1 and a scalar, i.e.\\n /// p == p.scalar_mul(1) and p.addition(p) == p.scalar_mul(2) for all points p.\\n function scalar_mul(G1Point memory p, uint s) internal view returns (G1Point memory r) {\\n uint[3] memory input;\\n input[0] = p.X;\\n input[1] = p.Y;\\n input[2] = s;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require (success,\\\"pairing-mul-failed\\\");\\n }\\n /// @return the result of computing the pairing check\\n /// e(p1[0], p2[0]) * .... * e(p1[n], p2[n]) == 1\\n /// For example pairing([P1(), P1().negate()], [P2(), P2()]) should\\n /// return true.\\n function pairing(G1Point[] memory p1, G2Point[] memory p2) internal view returns (bool) {\\n require(p1.length == p2.length,\\\"pairing-lengths-failed\\\");\\n uint elements = p1.length;\\n uint inputSize = elements * 6;\\n uint[] memory input = new uint[](inputSize);\\n for (uint i = 0; i < elements; i++)\\n {\\n input[i * 6 + 0] = p1[i].X;\\n input[i * 6 + 1] = p1[i].Y;\\n input[i * 6 + 2] = p2[i].X[0];\\n input[i * 6 + 3] = p2[i].X[1];\\n input[i * 6 + 4] = p2[i].Y[0];\\n input[i * 6 + 5] = p2[i].Y[1];\\n }\\n uint[1] memory out;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 8, add(input, 0x20), mul(inputSize, 0x20), out, 0x20)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require(success,\\\"pairing-opcode-failed\\\");\\n return out[0] != 0;\\n }\\n /// Convenience method for a pairing check for two pairs.\\n function pairingProd2(G1Point memory a1, G2Point memory a2, G1Point memory b1, G2Point memory b2) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](2);\\n G2Point[] memory p2 = new G2Point[](2);\\n p1[0] = a1;\\n p1[1] = b1;\\n p2[0] = a2;\\n p2[1] = b2;\\n return pairing(p1, p2);\\n }\\n /// Convenience method for a pairing check for three pairs.\\n function pairingProd3(\\n G1Point memory a1, G2Point memory a2,\\n G1Point memory b1, G2Point memory b2,\\n G1Point memory c1, G2Point memory c2\\n ) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](3);\\n G2Point[] memory p2 = new G2Point[](3);\\n p1[0] = a1;\\n p1[1] = b1;\\n p1[2] = c1;\\n p2[0] = a2;\\n p2[1] = b2;\\n p2[2] = c2;\\n return pairing(p1, p2);\\n }\\n /// Convenience method for a pairing check for four pairs.\\n function pairingProd4(\\n G1Point memory a1, G2Point memory a2,\\n G1Point memory b1, G2Point memory b2,\\n G1Point memory c1, G2Point memory c2,\\n G1Point memory d1, G2Point memory d2\\n ) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](4);\\n G2Point[] memory p2 = new G2Point[](4);\\n p1[0] = a1;\\n p1[1] = b1;\\n p1[2] = c1;\\n p1[3] = d1;\\n p2[0] = a2;\\n p2[1] = b2;\\n p2[2] = c2;\\n p2[3] = d2;\\n return pairing(p1, p2);\\n }\\n}\\ncontract HydraS1Verifier {\\n using Pairing for *;\\n struct VerifyingKey {\\n Pairing.G1Point alfa1;\\n Pairing.G2Point beta2;\\n Pairing.G2Point gamma2;\\n Pairing.G2Point delta2;\\n Pairing.G1Point[] IC;\\n }\\n struct Proof {\\n Pairing.G1Point A;\\n Pairing.G2Point B;\\n Pairing.G1Point C;\\n }\\n function verifyingKey() internal pure returns (VerifyingKey memory vk) {\\n vk.alfa1 = Pairing.G1Point(\\n 20491192805390485299153009773594534940189261866228447918068658471970481763042,\\n 9383485363053290200918347156157836566562967994039712273449902621266178545958\\n );\\n\\n vk.beta2 = Pairing.G2Point(\\n [4252822878758300859123897981450591353533073413197771768651442665752259397132,\\n 6375614351688725206403948262868962793625744043794305715222011528459656738731],\\n [21847035105528745403288232691147584728191162732299865338377159692350059136679,\\n 10505242626370262277552901082094356697409835680220590971873171140371331206856]\\n );\\n vk.gamma2 = Pairing.G2Point(\\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\\n );\\n vk.delta2 = Pairing.G2Point(\\n [16703691932058078091905716404571265959476320760471681443119627655715361207341,\\n 14290274403144646058563103675066900294643500151498463054614740831207315388514],\\n [9120517679481713774648131333833134160499672068094273767171232839700590114148,\\n 18338638855816625080803231766917659002322979855877827709378572546717723262324]\\n );\\n vk.IC = new Pairing.G1Point[](11);\\n \\n vk.IC[0] = Pairing.G1Point( \\n 15183981365841448712456044920259850142312423574262787585047804960636415432994,\\n 7001044530623564797357151512361873851017731748844374046997463344585588795777\\n ); \\n \\n vk.IC[1] = Pairing.G1Point( \\n 3754737654948662562435613969155994959132173506784418442817218316697091994043,\\n 16520141448541154153981919757383608282199583682574061862571018786569723115048\\n ); \\n \\n vk.IC[2] = Pairing.G1Point( \\n 14734466460881491794568175288621656907425457509621292263456156896685122952305,\\n 18495564446073110430251898491840031389094613665866187171071741938161262650771\\n ); \\n \\n vk.IC[3] = Pairing.G1Point( \\n 16380352455102502109444307845900237792657209995731679788026311308996926499427,\\n 11872494853967118743957240270505831687788406895959276908447589431944985706662\\n ); \\n \\n vk.IC[4] = Pairing.G1Point( \\n 20199514202493196707492057247804402540358301491780845748325025913208809441866,\\n 12760637713678265881350279209961337475498485836996922236408521200416764617323\\n ); \\n \\n vk.IC[5] = Pairing.G1Point( \\n 19153715775490328450864792250302417403928222720390978634383848496516270422395,\\n 546002182798634190282541153661423157791776194062719045593389981526666716416\\n ); \\n \\n vk.IC[6] = Pairing.G1Point( \\n 2572546294944895555897986264162285493992700415786641015895831165477991460890,\\n 16475880996834565556958124284585338184010927435675877479782010166270319781724\\n ); \\n \\n vk.IC[7] = Pairing.G1Point( \\n 1189084334785746899933155760881982253715630415235816484826929546449434025692,\\n 4229672360641556939458327562740354930286687266228809328535679188294452033396\\n ); \\n \\n vk.IC[8] = Pairing.G1Point( \\n 19602244162575575785636531633124796303002902053486919698240132790672698216585,\\n 181057165072599074288983745076121344893296348827576905983079816835912241514\\n ); \\n \\n vk.IC[9] = Pairing.G1Point( \\n 2674333225598340315002358633842521216418358316694409406540164227900893354209,\\n 2129512057743264354864596186877181463207231175912159744730924346148245351960\\n ); \\n \\n vk.IC[10] = Pairing.G1Point( \\n 7320700433668244102684846027945878190869912696586803178638351868907615350377,\\n 2941840530209756385349015075958743796933501451265755778001586753024906675441\\n ); \\n \\n }\\n function verify(uint[] memory input, Proof memory proof) internal view returns (uint) {\\n uint256 snark_scalar_field = 21888242871839275222246405745257275088548364400416034343698204186575808495617;\\n VerifyingKey memory vk = verifyingKey();\\n require(input.length + 1 == vk.IC.length,\\\"verifier-bad-input\\\");\\n // Compute the linear combination vk_x\\n Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);\\n for (uint i = 0; i < input.length; i++) {\\n require(input[i] < snark_scalar_field,\\\"verifier-gte-snark-scalar-field\\\");\\n vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i]));\\n }\\n vk_x = Pairing.addition(vk_x, vk.IC[0]);\\n if (!Pairing.pairingProd4(\\n Pairing.negate(proof.A), proof.B,\\n vk.alfa1, vk.beta2,\\n vk_x, vk.gamma2,\\n proof.C, vk.delta2\\n )) return 1;\\n return 0;\\n }\\n /// @return r bool true if proof is valid\\n function verifyProof(\\n uint[2] memory a,\\n uint[2][2] memory b,\\n uint[2] memory c,\\n uint[10] memory input\\n ) public view returns (bool r) {\\n Proof memory proof;\\n proof.A = Pairing.G1Point(a[0], a[1]);\\n proof.B = Pairing.G2Point([b[0][0], b[0][1]], [b[1][0], b[1][1]]);\\n proof.C = Pairing.G1Point(c[0], c[1]);\\n uint[] memory inputValues = new uint[](input.length);\\n for(uint i = 0; i < input.length; i++){\\n inputValues[i] = input[i];\\n }\\n if (verify(inputValues, proof) == 0) {\\n return true;\\n } else {\\n return false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x70c0b7d96ff1b90538938a4cb2d8086b3aabb4febf1e36cb3f470bfe0b4a9e89\",\"license\":\"GPL-3.0\"},\"contracts/attesters/hydra-s1/HydraS1SimpleAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {IHydraS1SimpleAttester} from './interfaces/IHydraS1SimpleAttester.sol';\\n\\n// Core protocol Protocol imports\\nimport {Request, Attestation, Claim} from './../../core/libs/Structs.sol';\\nimport {Attester, IAttester, IAttestationsRegistry} from './../../core/Attester.sol';\\n\\n// Imports related to HydraS1 Proving Scheme\\nimport {HydraS1Base, HydraS1Lib, HydraS1ProofData, HydraS1ProofInput, HydraS1Claim} from './base/HydraS1Base.sol';\\n\\n/**\\n * @title Hydra-S1 Simple Attester\\n * @author Sismo\\n * @notice This attester is part of the family of the Hydra-S1 Attesters.\\n * Hydra-S1 attesters enable users to prove they have an account in a group in a privacy preserving way.\\n * The Hydra-S1 Base abstract contract is inherited and holds the complex Hydra S1 verification logic.\\n * We invite readers to refer to:\\n * - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations\\n * - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1\\n\\n * This specific attester has the following characteristics:\\n\\n * - Zero Knowledge\\n * One cannot deduct from an attestation what source account was used to generate the underlying proof\\n\\n * - Non Strict (scores)\\n * If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100.\\n * This attester generate attestations of scores\\n\\n * - Ticketed\\n * Each source account gets one userTicket per claim (i.e only one attestation per source account per claim)\\n * For people used to semaphore/ tornado cash people:\\n * userTicket = hash(sourceSecret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier)\\n \\n * - Renewable\\n * A userTicket can actually be reused as long as the destination of the attestation remains the same\\n * It enables users to renew their attestations\\n **/\\n\\ncontract HydraS1SimpleAttester is IHydraS1SimpleAttester, HydraS1Base, Attester {\\n using HydraS1Lib for HydraS1ProofData;\\n using HydraS1Lib for bytes;\\n using HydraS1Lib for Request;\\n\\n // The deployed contract will need to be authorized to write into the Attestation registry\\n // It should get write access on attestation collections from AUTHORIZED_COLLECTION_ID_FIRST to AUTHORIZED_COLLECTION_ID_LAST.\\n uint256 public immutable AUTHORIZED_COLLECTION_ID_FIRST;\\n uint256 public immutable AUTHORIZED_COLLECTION_ID_LAST;\\n\\n mapping(uint256 => address) internal _ticketsDestinations;\\n\\n /*******************************************************\\n INITIALIZATION FUNCTIONS \\n *******************************************************/\\n /**\\n * @dev Constructor. Initializes the contract\\n * @param attestationsRegistryAddress Attestations Registry contract on which the attester will write attestations\\n * @param hydraS1VerifierAddress ZK Snark Hydra-S1 Verifier contract\\n * @param availableRootsRegistryAddress Registry storing the available groups for this attester (e.g roots of registry merkle trees)\\n * @param commitmentMapperAddress commitment mapper's public key registry\\n * @param collectionIdFirst Id of the first collection in which the attester is supposed to record\\n * @param collectionIdLast Id of the last collection in which the attester is supposed to record\\n */\\n constructor(\\n address attestationsRegistryAddress,\\n address hydraS1VerifierAddress,\\n address availableRootsRegistryAddress,\\n address commitmentMapperAddress,\\n uint256 collectionIdFirst,\\n uint256 collectionIdLast\\n )\\n Attester(attestationsRegistryAddress)\\n HydraS1Base(hydraS1VerifierAddress, availableRootsRegistryAddress, commitmentMapperAddress)\\n {\\n AUTHORIZED_COLLECTION_ID_FIRST = collectionIdFirst;\\n AUTHORIZED_COLLECTION_ID_LAST = collectionIdLast;\\n }\\n\\n /*******************************************************\\n MANDATORY FUNCTIONS TO OVERRIDE FROM ATTESTER.SOL\\n *******************************************************/\\n\\n /**\\n * @dev Throws if user request is invalid when verified against\\n * Look into HydraS1Base for more details\\n * @param request users request. Claim of having an account part of a group of accounts\\n * @param proofData provided to back the request. snark input and snark proof\\n */\\n function _verifyRequest(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n override\\n {\\n HydraS1ProofData memory snarkProof = abi.decode(proofData, (HydraS1ProofData));\\n HydraS1ProofInput memory snarkInput = snarkProof._input();\\n HydraS1Claim memory claim = request._claim();\\n\\n // verifies that the proof corresponds to the claim\\n _validateInput(claim, snarkInput);\\n // verifies the proof validity\\n _verifyProof(snarkProof);\\n }\\n\\n /**\\n * @dev Returns attestations that will be recorded, constructed from the user request\\n * @param request users request. Claim of having an account part of a group of accounts\\n */\\n function buildAttestations(Request calldata request, bytes calldata)\\n public\\n view\\n virtual\\n override(IAttester, Attester)\\n returns (Attestation[] memory)\\n {\\n HydraS1Claim memory claim = request._claim();\\n\\n Attestation[] memory attestations = new Attestation[](1);\\n\\n uint256 attestationCollectionId = AUTHORIZED_COLLECTION_ID_FIRST +\\n claim.groupProperties.groupIndex;\\n\\n if (attestationCollectionId > AUTHORIZED_COLLECTION_ID_LAST)\\n revert CollectionIdOutOfBound(attestationCollectionId);\\n\\n address issuer = address(this);\\n\\n attestations[0] = Attestation(\\n attestationCollectionId,\\n claim.destination,\\n issuer,\\n claim.claimedValue,\\n claim.groupProperties.generationTimestamp,\\n ''\\n );\\n return (attestations);\\n }\\n\\n /*******************************************************\\n OPTIONAL HOOK VIRTUAL FUNCTIONS FROM ATTESTER.SOL\\n *******************************************************/\\n\\n /**\\n * @dev Hook run before recording the attestation.\\n * Throws if ticket already used and not a renewal (e.g destination different that last)\\n * @param request users request. Claim of having an account part of a group of accounts\\n * @param proofData provided to back the request. snark input and snark proof\\n */\\n function _beforeRecordAttestations(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n override\\n {\\n // we get the ticket used from the snark input in the data provided\\n uint256 userTicket = proofData._getTicket();\\n address currentDestination = _getDestinationOfTicket(userTicket);\\n\\n if (currentDestination != address(0) && currentDestination != request.destination) {\\n revert TicketUsed(userTicket);\\n }\\n\\n _setDestinationForTicket(userTicket, request.destination);\\n }\\n\\n /*******************************************************\\n Hydra-S1 MANDATORY FUNCTIONS FROM Hydra-S1 Base Attester\\n *******************************************************/\\n\\n /**\\n * @dev Returns the ticket identifier from a user claim\\n * @param claim user Hydra-S1 claim = have an account with a specific value in a specific group\\n * ticket = hash(sourceSecretHash, ticketIdentifier), which is verified inside the snark\\n * users bring sourceSecretHash as private input in snark which guarantees privacy\\n \\n * Here we chose ticketIdentifier = hash(attesterAddress, claim.GroupId)\\n * Creates one ticket per group, per user and makes sure no collision with other attester's tickets\\n **/\\n function _getTicketIdentifierOfClaim(HydraS1Claim memory claim)\\n internal\\n view\\n override\\n returns (uint256)\\n {\\n uint256 ticketIdentifier = _encodeInSnarkField(address(this), claim.groupProperties.groupIndex);\\n return ticketIdentifier;\\n }\\n\\n /*******************************************************\\n Hydra-S1 Attester Specific Functions\\n *******************************************************/\\n\\n /**\\n * @dev Getter, returns the last attestation destination of a ticket\\n * @param userTicket ticket used\\n **/\\n function getDestinationOfTicket(uint256 userTicket) external view override returns (address) {\\n return _getDestinationOfTicket(userTicket);\\n }\\n\\n function _setDestinationForTicket(uint256 userTicket, address destination) internal virtual {\\n _ticketsDestinations[userTicket] = destination;\\n emit TicketDestinationUpdated(userTicket, destination);\\n }\\n\\n function _getDestinationOfTicket(uint256 userTicket) internal view returns (address) {\\n return _ticketsDestinations[userTicket];\\n }\\n\\n function _encodeInSnarkField(address addr, uint256 nb) internal pure returns (uint256) {\\n return uint256(keccak256(abi.encode(addr, nb))) % HydraS1Lib.SNARK_FIELD;\\n }\\n}\\n\",\"keccak256\":\"0x4e58a7c2e28a705f0a4af77ec4145f504aa68cdbc263ac077ebc4c50b9086f11\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/base/HydraS1Base.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {IHydraS1Base} from './IHydraS1Base.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\n\\n// Protocol imports\\nimport {Request, Attestation, Claim} from '../../../core/libs/Structs.sol';\\n\\n// Imports related to Hydra S1 ZK Proving Scheme\\nimport {HydraS1Verifier, HydraS1Lib, HydraS1Claim, HydraS1ProofData, HydraS1ProofInput, HydraS1GroupProperties} from '../libs/HydraS1Lib.sol';\\nimport {ICommitmentMapperRegistry} from '../../../periphery/utils/CommitmentMapperRegistry.sol';\\nimport {IAvailableRootsRegistry} from '../../../periphery/utils/AvailableRootsRegistry.sol';\\n\\n/**\\n * @title Hydra-S1 Base Attester\\n * @author Sismo\\n * @notice Abstract contract that facilitates the use of the Hydra-S1 ZK Proving Scheme.\\n * Hydra-S1 is single source, single group: it allows users to verify they are part of one and only one group at a time\\n * It is inherited by the family of Hydra-S1 attesters.\\n * It contains the user input checking and the ZK-SNARK proof verification.\\n * We invite readers to refer to:\\n * - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations\\n * - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1\\n \\n \\n **/\\nabstract contract HydraS1Base is IHydraS1Base, Initializable {\\n using HydraS1Lib for HydraS1ProofData;\\n\\n // ZK-SNARK Verifier\\n HydraS1Verifier immutable VERIFIER;\\n // Registry storing the Commitment Mapper EdDSA Public key\\n ICommitmentMapperRegistry immutable COMMITMENT_MAPPER_REGISTRY;\\n // Registry storing the Registry Tree Roots of the Attester's available ClaimData\\n IAvailableRootsRegistry immutable AVAILABLE_ROOTS_REGISTRY;\\n\\n /*******************************************************\\n INITIALIZATION FUNCTIONS \\n *******************************************************/\\n /**\\n * @dev Constructor. Initializes the contract\\n * @param hydraS1VerifierAddress ZK Snark Verifier contract\\n * @param availableRootsRegistryAddress Registry where is the Available Data (Registry Merkle Roots)\\n * @param commitmentMapperAddress Commitment mapper's public key registry\\n */\\n constructor(\\n address hydraS1VerifierAddress,\\n address availableRootsRegistryAddress,\\n address commitmentMapperAddress\\n ) {\\n VERIFIER = HydraS1Verifier(hydraS1VerifierAddress);\\n AVAILABLE_ROOTS_REGISTRY = IAvailableRootsRegistry(availableRootsRegistryAddress);\\n COMMITMENT_MAPPER_REGISTRY = ICommitmentMapperRegistry(commitmentMapperAddress);\\n }\\n\\n /**\\n * @dev Getter of Hydra-S1 Verifier contract\\n */\\n function getVerifier() external view returns (HydraS1Verifier) {\\n return VERIFIER;\\n }\\n\\n /**\\n * @dev Getter of Commitment Mapper Registry contract\\n */\\n function getCommitmentMapperRegistry() external view returns (ICommitmentMapperRegistry) {\\n return COMMITMENT_MAPPER_REGISTRY;\\n }\\n\\n /**\\n * @dev Getter of Roots Registry Contract\\n */\\n function getAvailableRootsRegistry() external view returns (IAvailableRootsRegistry) {\\n return AVAILABLE_ROOTS_REGISTRY;\\n }\\n\\n /*******************************************************\\n Hydra-S1 SPECIFIC FUNCTIONS\\n *******************************************************/\\n\\n /**\\n * @dev MANDATORY: must be implemented to return the ticket identifier from a user request\\n * so it can be checked against snark input\\n * ticket = hash(sourceSecretHash, ticketIdentifier), which is verified inside the snark\\n * users bring sourceSecretHash as private input which guarantees privacy\\n\\n * This function MUST be implemented by Hydra-S1 attesters.\\n * This is the core function that implements the logic of tickets\\n\\n * Do they get one ticket per claim?\\n * Do they get 2 tickets per claim?\\n * Do they get 1 ticket per claim, every month?\\n * Take a look at Hydra-S1 Simple Attester for an example\\n * @param claim user claim: part of a group of accounts, with a claimedValue for their account\\n */\\n function _getTicketIdentifierOfClaim(HydraS1Claim memory claim)\\n internal\\n view\\n virtual\\n returns (uint256);\\n\\n /**\\n * @dev Checks whether the user claim and the snark public input are a match\\n * @param claim user claim\\n * @param input snark public input\\n */\\n function _validateInput(HydraS1Claim memory claim, HydraS1ProofInput memory input)\\n internal\\n view\\n virtual\\n {\\n if (input.accountsTreeValue != claim.groupId)\\n revert AccountsTreeValueMismatch(claim.groupId, input.accountsTreeValue);\\n\\n if (input.isStrict == claim.groupProperties.isScore)\\n revert IsStrictMismatch(claim.groupProperties.isScore, input.isStrict);\\n\\n if (input.destination != claim.destination)\\n revert DestinationMismatch(claim.destination, input.destination);\\n\\n if (input.chainId != block.chainid) revert ChainIdMismatch(block.chainid, input.chainId);\\n\\n if (input.value != claim.claimedValue) revert ValueMismatch(claim.claimedValue, input.value);\\n\\n if (!AVAILABLE_ROOTS_REGISTRY.isRootAvailableForMe(input.registryRoot))\\n revert RegistryRootMismatch(input.registryRoot);\\n\\n uint256[2] memory commitmentMapperPubKey = COMMITMENT_MAPPER_REGISTRY.getEdDSAPubKey();\\n if (\\n input.commitmentMapperPubKey[0] != commitmentMapperPubKey[0] ||\\n input.commitmentMapperPubKey[1] != commitmentMapperPubKey[1]\\n )\\n revert CommitmentMapperPubKeyMismatch(\\n commitmentMapperPubKey[0],\\n commitmentMapperPubKey[1],\\n input.commitmentMapperPubKey[0],\\n input.commitmentMapperPubKey[1]\\n );\\n\\n uint256 ticketIdentifier = _getTicketIdentifierOfClaim(claim);\\n\\n if (input.ticketIdentifier != ticketIdentifier)\\n revert TicketIdentifierMismatch(ticketIdentifier, input.ticketIdentifier);\\n }\\n\\n /**\\n * @dev verify the groth16 mathematical proof\\n * @param proofData snark public input\\n */\\n function _verifyProof(HydraS1ProofData memory proofData) internal view virtual {\\n try\\n VERIFIER.verifyProof(proofData.proof.a, proofData.proof.b, proofData.proof.c, proofData.input)\\n returns (bool success) {\\n if (!success) revert InvalidGroth16Proof('');\\n } catch Error(string memory reason) {\\n revert InvalidGroth16Proof(reason);\\n } catch Panic(\\n uint256 /*errorCode*/\\n ) {\\n revert InvalidGroth16Proof('');\\n } catch (\\n bytes memory /*lowLevelData*/\\n ) {\\n revert InvalidGroth16Proof('');\\n }\\n }\\n}\\n\",\"keccak256\":\"0x02708884237382835cd3d3514fdc3603409ce5ea1dc7255a7ceea07dff417c34\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/base/IHydraS1Base.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {HydraS1Verifier, HydraS1Lib, HydraS1ProofData} from '../libs/HydraS1Lib.sol';\\nimport {ICommitmentMapperRegistry} from '../../../periphery/utils/CommitmentMapperRegistry.sol';\\nimport {IAvailableRootsRegistry} from '../../../periphery/utils/AvailableRootsRegistry.sol';\\n\\n// todo: explain well what is specific to this attester\\ninterface IHydraS1Base {\\n error ClaimsLengthDifferentThanOne(uint256 claimLength);\\n error RegistryRootMismatch(uint256 inputRoot);\\n error DestinationMismatch(address expectedDestination, address inputDestination);\\n error CommitmentMapperPubKeyMismatch(\\n uint256 expectedX,\\n uint256 expectedY,\\n uint256 inputX,\\n uint256 inputY\\n );\\n error TicketIdentifierMismatch(uint256 expectedTicketIdentifier, uint256 ticketIdentifier);\\n error IsStrictMismatch(bool expectedStrictness, bool strictNess);\\n error ChainIdMismatch(uint256 expectedChainId, uint256 chainId);\\n error ValueMismatch(uint256 expectedValue, uint256 inputValue);\\n error AccountsTreeValueMismatch(\\n uint256 expectedAccountsTreeValue,\\n uint256 inputAccountsTreeValue\\n );\\n error InvalidGroth16Proof(string reason);\\n\\n /**\\n * @dev Getter of Hydra-S1 Verifier contract\\n */\\n function getVerifier() external view returns (HydraS1Verifier);\\n\\n /**\\n * @dev Getter of Commitment Mapper Registry contract\\n */\\n function getCommitmentMapperRegistry() external view returns (ICommitmentMapperRegistry);\\n\\n /**\\n * @dev Getter of Roots Registry Contract\\n */\\n function getAvailableRootsRegistry() external view returns (IAvailableRootsRegistry);\\n}\\n\",\"keccak256\":\"0x73cff4dcd9c30857859721ea2897be8bb7087c0122f4587acdaa79d8ec0a728d\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/interfaces/IHydraS1SimpleAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {Attestation} from '../../../core/libs/Structs.sol';\\nimport {IAttester} from '../../../core/interfaces/IAttester.sol';\\nimport {CommitmentMapperRegistry} from '../../../periphery/utils/CommitmentMapperRegistry.sol';\\nimport {AvailableRootsRegistry} from '../../../periphery/utils/AvailableRootsRegistry.sol';\\nimport {HydraS1Lib, HydraS1ProofData, HydraS1ProofInput} from './../libs/HydraS1Lib.sol';\\nimport {IHydraS1Base} from './../base/IHydraS1Base.sol';\\n\\n// todo: explain well what is specific to this attester\\ninterface IHydraS1SimpleAttester is IHydraS1Base, IAttester {\\n error TicketUsed(uint256 userTicket);\\n error CollectionIdOutOfBound(uint256 collectionId);\\n\\n event TicketDestinationUpdated(uint256 ticket, address newOwner);\\n\\n /**\\n * @dev Getter, returns the last attestation destination of a ticket\\n * @param userTicket ticket used\\n **/\\n function getDestinationOfTicket(uint256 userTicket) external view returns (address);\\n\\n /**\\n * @dev Getter\\n * returns of the first collection in which the attester is supposed to record\\n **/\\n function AUTHORIZED_COLLECTION_ID_FIRST() external view returns (uint256);\\n\\n /**\\n * @dev Getter\\n * returns of the last collection in which the attester is supposed to record\\n **/\\n function AUTHORIZED_COLLECTION_ID_LAST() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xa773e565f9a9ae1b6139779f80e04bf8391ee40e7f2673c785814d1317894259\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/libs/HydraS1Lib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Claim, Request} from '../../../core/libs/Structs.sol';\\nimport {HydraS1Verifier} from '@sismo-core/hydra-s1/contracts/HydraS1Verifier.sol';\\n\\n// user Hydra-S1 claim retrieved form his request\\nstruct HydraS1Claim {\\n uint256 groupId; // user claims to have an account in this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n address destination; // user claims to own this destination[]\\n HydraS1GroupProperties groupProperties; // user claims the group has the following properties\\n}\\n\\nstruct HydraS1GroupProperties {\\n uint128 groupIndex;\\n uint32 generationTimestamp;\\n bool isScore;\\n}\\n\\nstruct HydraS1CircomSnarkProof {\\n uint256[2] a;\\n uint256[2][2] b;\\n uint256[2] c;\\n}\\n\\nstruct HydraS1ProofData {\\n HydraS1CircomSnarkProof proof;\\n uint256[10] input;\\n // destination\\n // chainId\\n // commitmentMapperPubKey.x\\n // commitmentMapperPubKey.y\\n // registryTreeRoot\\n // ticketIdentifier\\n // ticket\\n // claimedValue\\n // accountsTreeValue\\n // isStrict\\n}\\n\\nstruct HydraS1ProofInput {\\n address destination;\\n uint256 chainId;\\n uint256 registryRoot;\\n uint256 ticketIdentifier;\\n uint256 ticket;\\n uint256 value;\\n uint256 accountsTreeValue;\\n bool isStrict;\\n uint256[2] commitmentMapperPubKey;\\n}\\n\\nlibrary HydraS1Lib {\\n uint256 constant SNARK_FIELD =\\n 21888242871839275222246405745257275088548364400416034343698204186575808495617;\\n\\n error GroupIdAndPropertiesMismatch(uint256 expectedGroupId, uint256 groupId);\\n\\n function _input(HydraS1ProofData memory self) internal pure returns (HydraS1ProofInput memory) {\\n return\\n HydraS1ProofInput(\\n _getDestination(self),\\n _getChainId(self),\\n _getRegistryRoot(self),\\n _getExpectedExternalNullifier(self),\\n _getTicket(self),\\n _getValue(self),\\n _getAccountsTreeValue(self),\\n _getIsStrict(self),\\n _getCommitmentMapperPubKey(self)\\n );\\n }\\n\\n function _claim(Request memory self) internal pure returns (HydraS1Claim memory) {\\n Claim memory claim = self.claims[0];\\n _validateClaim(claim);\\n\\n HydraS1GroupProperties memory groupProperties = abi.decode(\\n claim.extraData,\\n (HydraS1GroupProperties)\\n );\\n\\n return (HydraS1Claim(claim.groupId, claim.claimedValue, self.destination, groupProperties));\\n }\\n\\n function _toCircomFormat(HydraS1ProofData memory self)\\n internal\\n pure\\n returns (\\n uint256[2] memory,\\n uint256[2][2] memory,\\n uint256[2] memory,\\n uint256[10] memory\\n )\\n {\\n return (self.proof.a, self.proof.b, self.proof.c, self.input);\\n }\\n\\n function _getDestination(HydraS1ProofData memory self) internal pure returns (address) {\\n return address(uint160(self.input[0]));\\n }\\n\\n function _getChainId(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[1];\\n }\\n\\n function _getCommitmentMapperPubKey(HydraS1ProofData memory self)\\n internal\\n pure\\n returns (uint256[2] memory)\\n {\\n return [self.input[2], self.input[3]];\\n }\\n\\n function _getRegistryRoot(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[4];\\n }\\n\\n function _getExpectedExternalNullifier(HydraS1ProofData memory self)\\n internal\\n pure\\n returns (uint256)\\n {\\n return self.input[5];\\n }\\n\\n function _getTicket(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[6];\\n }\\n\\n function _getValue(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[7];\\n }\\n\\n function _getAccountsTreeValue(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[8];\\n }\\n\\n function _getIsStrict(HydraS1ProofData memory self) internal pure returns (bool) {\\n return self.input[9] == 1;\\n }\\n\\n function _getTicket(bytes calldata self) internal pure returns (uint256) {\\n HydraS1ProofData memory snarkProofData = abi.decode(self, (HydraS1ProofData));\\n uint256 userTicket = uint256(_getTicket(snarkProofData));\\n return userTicket;\\n }\\n\\n function _generateGroupIdFromProperties(\\n uint128 groupIndex,\\n uint32 generationTimestamp,\\n bool isScore\\n ) internal pure returns (uint256) {\\n return\\n _generateGroupIdFromEncodedProperties(\\n _encodeGroupProperties(groupIndex, generationTimestamp, isScore)\\n );\\n }\\n\\n function _generateGroupIdFromEncodedProperties(bytes memory encodedProperties)\\n internal\\n pure\\n returns (uint256)\\n {\\n return uint256(keccak256(encodedProperties)) % HydraS1Lib.SNARK_FIELD;\\n }\\n\\n function _encodeGroupProperties(\\n uint128 groupIndex,\\n uint32 generationTimestamp,\\n bool isScore\\n ) internal pure returns (bytes memory) {\\n return abi.encode(groupIndex, generationTimestamp, isScore);\\n }\\n\\n function _validateClaim(Claim memory claim) internal pure {\\n uint256 expectedGroupId = _generateGroupIdFromEncodedProperties(claim.extraData);\\n if (claim.groupId != expectedGroupId)\\n revert GroupIdAndPropertiesMismatch(expectedGroupId, claim.groupId);\\n }\\n}\\n\",\"keccak256\":\"0x596225970aabbc4edb989ee640867c76944e797bfafe5e06dcf37b973480b957\",\"license\":\"MIT\"},\"contracts/core/Attester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\nimport {IAttester} from './interfaces/IAttester.sol';\\nimport {IAttestationsRegistry} from './interfaces/IAttestationsRegistry.sol';\\nimport {Request, Attestation, AttestationData} from './libs/Structs.sol';\\n\\n/**\\n * @title Attester Abstract Contract\\n * @author Sismo\\n * @notice Contract to be inherited by Attesters\\n * All attesters that expect to be authorized in Sismo Protocol (i.e write access on the registry)\\n * are recommended to implemented this abstract contract\\n\\n * Take a look at the HydraS1SimpleAttester.sol for example on how to implement this abstract contract\\n *\\n * This contracts is built around two main external standard functions.\\n * They must NOT be override them, unless your really know what you are doing\\n \\n * - generateAttestations(request, proof) => will write attestations in the registry\\n * 1. (MANDATORY) Implement the buildAttestations() view function which generate attestations from user request\\n * 2. (MANDATORY) Implement teh _verifyRequest() internal function where to write checks\\n * 3. (OPTIONAL) Override _beforeRecordAttestations and _afterRecordAttestations hooks\\n\\n * - deleteAttestations(collectionId, owner, proof) => will delete attestations in the registry\\n * 1. (DEFAULT) By default this function throws (see _verifyAttestationsDeletionRequest)\\n * 2. (OPTIONAL) Override the _verifyAttestationsDeletionRequest so it no longer throws\\n * 3. (OPTIONAL) Override _beforeDeleteAttestations and _afterDeleteAttestations hooks\\n\\n * For more information: https://attesters.docs.sismo.io\\n **/\\nabstract contract Attester is IAttester {\\n // Registry where all attestations are stored\\n IAttestationsRegistry internal immutable ATTESTATIONS_REGISTRY;\\n\\n /**\\n * @dev Constructor\\n * @param attestationsRegistryAddress The address of the AttestationsRegistry contract storing attestations\\n */\\n constructor(address attestationsRegistryAddress) {\\n ATTESTATIONS_REGISTRY = IAttestationsRegistry(attestationsRegistryAddress);\\n }\\n\\n /**\\n * @dev Main external function. Allows to generate attestations by making a request and submitting proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that has been recorded\\n */\\n function generateAttestations(Request calldata request, bytes calldata proofData)\\n external\\n override\\n returns (Attestation[] memory)\\n {\\n // Verify if request is valid by verifying against proof\\n _verifyRequest(request, proofData);\\n\\n // Generate the actual attestations from user request\\n Attestation[] memory attestations = buildAttestations(request, proofData);\\n\\n _beforeRecordAttestations(request, proofData);\\n\\n ATTESTATIONS_REGISTRY.recordAttestations(attestations);\\n\\n _afterRecordAttestations(attestations);\\n\\n for (uint256 i = 0; i < attestations.length; i++) {\\n emit AttestationGenerated(attestations[i]);\\n }\\n\\n return attestations;\\n }\\n\\n /**\\n * @dev External facing function. Allows to delete attestations by submitting proof\\n * @param collectionIds Collection identifier of attestations to delete\\n * @param attestationsOwner Owner of attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n * @return attestations Attestations that were deleted\\n */\\n function deleteAttestations(\\n uint256[] calldata collectionIds,\\n address attestationsOwner,\\n bytes calldata proofData\\n ) external override returns (Attestation[] memory) {\\n // fetch attestations from the registry\\n Attestation[] memory attestationsToDelete;\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n (\\n address issuer,\\n uint256 attestationValue,\\n uint32 timestamp,\\n bytes memory extraData\\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\\n\\n attestationsToDelete[i] = (\\n Attestation(\\n collectionIds[i],\\n attestationsOwner,\\n issuer,\\n attestationValue,\\n timestamp,\\n extraData\\n )\\n );\\n }\\n\\n _verifyAttestationsDeletionRequest(attestationsToDelete, proofData);\\n\\n _beforeDeleteAttestations(attestationsToDelete, proofData);\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationsToDelete);\\n\\n _afterDeleteAttestations(attestationsToDelete, proofData);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n emit AttestationDeleted(attestationsToDelete[i]);\\n }\\n return attestationsToDelete;\\n }\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should build attestations from the user request and the proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(Request calldata request, bytes calldata proofData)\\n public\\n view\\n virtual\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev Attestation registry getter\\n * @return attestationRegistry\\n */\\n function getAttestationRegistry() external view override returns (IAttestationsRegistry) {\\n return ATTESTATIONS_REGISTRY;\\n }\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should verify the user request is valid\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _verifyRequest(Request calldata request, bytes calldata proofData) internal virtual;\\n\\n /**\\n * @dev Optional: must be overridden by attesters that want to feature attestations deletion\\n * Default behavior: throws\\n * It should verify attestations deletion request is valid\\n * @param attestations Attestations that will be deleted\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _verifyAttestationsDeletionRequest(\\n Attestation[] memory attestations,\\n bytes calldata proofData\\n ) internal virtual {\\n revert AttestationDeletionNotImplemented();\\n }\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called before recording attestations in the registry\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _beforeRecordAttestations(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n\\n /**\\n * @dev (Optional) Can be overridden in attesters inheriting this contract\\n * Will be called after recording an attestation\\n * @param attestations Recorded attestations\\n */\\n function _afterRecordAttestations(Attestation[] memory attestations) internal virtual {}\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called before deleting attestations from the registry\\n * @param attestations Attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n */\\n function _beforeDeleteAttestations(Attestation[] memory attestations, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called after deleting attestations from the registry\\n * @param attestations Attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n */\\n function _afterDeleteAttestations(Attestation[] memory attestations, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n}\\n\",\"keccak256\":\"0x37683c6752d4dc911459084eb191c1045f3bf34e2143f3db3d298a66c971a106\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttestationsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Attestation, AttestationData} from '../libs/Structs.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry {\\n event AttestationRecorded(Attestation attestation);\\n event AttestationDeleted(Attestation attestation);\\n\\n /**\\n * @dev Main function to be called by authorized issuers\\n * @param attestations Attestations to be recorded (creates a new one or overrides an existing one)\\n */\\n function recordAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Delete function to be called by authorized issuers\\n * @param attestations Attestations to be deleted\\n */\\n function deleteAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Returns whether a user has an attestation from a collection\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function hasAttestation(uint256 collectionId, address owner) external returns (bool);\\n\\n /**\\n * @dev Getter of the data of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationData(uint256 collectionId, address owner)\\n external\\n view\\n returns (AttestationData memory);\\n\\n /**\\n * @dev Getter of the value of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationValue(uint256 collectionId, address owner) external view returns (uint256);\\n\\n /**\\n * @dev Getter of the data of a specific attestation as tuple\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationDataTuple(uint256 collectionId, address owner)\\n external\\n view\\n returns (\\n address,\\n uint256,\\n uint32,\\n bytes memory\\n );\\n\\n /**\\n * @dev Getter of the extraData of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationExtraData(uint256 collectionId, address owner)\\n external\\n view\\n returns (bytes memory);\\n\\n /**\\n * @dev Getter of the issuer of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationIssuer(uint256 collectionId, address owner)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @dev Getter of the timestamp of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationTimestamp(uint256 collectionId, address owner)\\n external\\n view\\n returns (uint32);\\n\\n /**\\n * @dev Getter of the data of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationDataBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (AttestationData[] memory);\\n\\n /**\\n * @dev Getter of the values of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationValueBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xb5e25bd7e0372c9973e582fb7fe96318c145831a5452d8c79eb848a7464b0297\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Request, Attestation} from '../libs/Structs.sol';\\nimport {IAttestationsRegistry} from '../interfaces/IAttestationsRegistry.sol';\\n\\n/**\\n * @title IAttester\\n * @author Sismo\\n * @notice This is the interface for the attesters in Sismo Protocol\\n */\\ninterface IAttester {\\n event AttestationGenerated(Attestation attestation);\\n\\n event AttestationDeleted(Attestation attestation);\\n\\n error AttestationDeletionNotImplemented();\\n\\n /**\\n * @dev Main external function. Allows to generate attestations by making a request and submitting proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that has been recorded\\n */\\n function generateAttestations(Request calldata request, bytes calldata proofData)\\n external\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev External facing function. Allows to delete an attestation by submitting proof\\n * @param collectionIds Collection identifier of attestations to delete\\n * @param attestationsOwner Owner of attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n * @return attestations Attestations that was deleted\\n */\\n function deleteAttestations(\\n uint256[] calldata collectionIds,\\n address attestationsOwner,\\n bytes calldata proofData\\n ) external returns (Attestation[] memory);\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should build attestations from the user request and the proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(Request calldata request, bytes calldata proofData)\\n external\\n view\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev Attestation registry address getter\\n * @return attestationRegistry Address of the registry\\n */\\n function getAttestationRegistry() external view returns (IAttestationsRegistry);\\n}\\n\",\"keccak256\":\"0xafe9c1a742d7570033c8d74cee203e09ee9b7461eaed6d2ca77697449e2ce95d\",\"license\":\"MIT\"},\"contracts/core/libs/Structs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title Attestations Registry State\\n * @author Sismo\\n * @notice This contract holds all of the storage variables and data\\n * structures used by the AttestationsRegistry and parent\\n * contracts.\\n */\\n\\n// User Attestation Request, can be made by any user\\n// The context of an Attestation Request is a specific attester contract\\n// Each attester has groups of accounts in its available data\\n// eg: for a specific attester:\\n// group 1 <=> accounts that sent txs on mainnet\\n// group 2 <=> accounts that sent txs on polygon\\n// eg: for another attester:\\n// group 1 <=> accounts that sent eth txs in 2022\\n// group 2 <=> accounts sent eth txs in 2021\\nstruct Request {\\n // implicit address attester;\\n // implicit uint256 chainId;\\n Claim[] claims;\\n address destination; // destination that will receive the end attestation\\n}\\n\\nstruct Claim {\\n uint256 groupId; // user claims to have an account in this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n bytes extraData; // arbitrary data, may be required by the attester to verify claims or generate a specific attestation\\n}\\n\\n/**\\n * @dev Attestation Struct. This is the struct receive as argument by the Attestation Registry.\\n * @param collectionId Attestation collection\\n * @param owner Attestation collection\\n * @param issuer Attestation collection\\n * @param value Attestation collection\\n * @param timestamp Attestation collection\\n * @param extraData Attestation collection\\n */\\nstruct Attestation {\\n // implicit uint256 chainId;\\n uint256 collectionId; // Id of the attestation collection (in the registry)\\n address owner; // Owner of the attestation\\n address issuer; // Contract that created or last updated the record.\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Timestamp chosen by the attester, should correspond to the effective date of the attestation\\n // it is different from the recording timestamp (date when the attestation was recorded)\\n // e.g a proof of NFT ownership may have be recorded today which is 2 month old data.\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\\n// Attestation Data, stored in the registry\\n// The context is a specific owner of a specific collection\\nstruct AttestationData {\\n // implicit uint256 chainId\\n // implicit uint256 collectionId - from context\\n // implicit owner\\n address issuer; // Address of the contract that recorded the attestation\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Effective date of issuance of the attestation. (can be different from the recording timestamp)\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\",\"keccak256\":\"0x893d9a10429878dd4077388ff4da954c20b86a3c172a7bbdd10a01eb5d39b6a0\",\"license\":\"MIT\"},\"contracts/periphery/utils/AvailableRootsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {IAvailableRootsRegistry} from './interfaces/IAvailableRootsRegistry.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\n\\n/**\\n * @title Attesters Groups Registry\\n * @author Sismo\\n * @notice This contract stores that data required by attesters to be available so they can verify user claims\\n * This contract is deployed behind a proxy and this implementation is focused on storing merkle roots\\n * For more information: https://available-roots-registry.docs.sismo.io\\n *\\n **/\\ncontract AvailableRootsRegistry is IAvailableRootsRegistry, Initializable, Ownable {\\n mapping(address => mapping(uint256 => bool)) public _roots;\\n\\n /**\\n * @dev Constructor\\n * @param owner Owner of the contract, can register/ unregister roots\\n */\\n constructor(address owner) {\\n initialize(owner);\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n */\\n function initialize(address owner) public initializer {\\n _transferOwnership(owner);\\n }\\n\\n /**\\n * @dev Register a root available for an attester\\n * @param attester Attester which will have the root available\\n * @param root Root to register\\n */\\n function registerRootForAttester(address attester, uint256 root) external onlyOwner {\\n if (attester == address(0)) revert CannotRegisterForZeroAddress();\\n _registerRootForAttester(attester, root);\\n }\\n\\n /**\\n * @dev Unregister a root for an attester\\n * @param attester Attester which will no longer have the root available\\n * @param root Root to unregister\\n */\\n function unregisterRootForAttester(address attester, uint256 root) external onlyOwner {\\n if (attester == address(0)) revert CannotUnregisterForZeroAddress();\\n _unregisterRootForAttester(attester, root);\\n }\\n\\n /**\\n * @dev Registers a root, available for all contracts\\n * @param root Root to register\\n */\\n function registerRootForAll(uint256 root) external onlyOwner {\\n _registerRootForAttester(address(0), root);\\n }\\n\\n /**\\n * @dev Unregister a root, available for all contracts\\n * @param root Root to unregister\\n */\\n function unregisterRootForAll(uint256 root) external onlyOwner {\\n _unregisterRootForAttester(address(0), root);\\n }\\n\\n /**\\n * @dev returns whether a root is available for a caller (msg.sender)\\n * @param root root to check whether it is registered for me or not\\n */\\n function isRootAvailableForMe(uint256 root) external view returns (bool) {\\n return _roots[_msgSender()][root] || _roots[address(0)][root];\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param attester Owner of the contract, can update public key and address\\n * @param root Owner of the contract, can update public key and address\\n */\\n function isRootAvailableForAttester(address attester, uint256 root) external view returns (bool) {\\n return _roots[attester][root] || _roots[address(0)][root];\\n }\\n\\n function _registerRootForAttester(address attester, uint256 root) internal {\\n _roots[attester][root] = true;\\n if (attester == address(0)) {\\n emit RegisteredRootForAll(root);\\n } else {\\n emit RegisteredRootForAttester(attester, root);\\n }\\n }\\n\\n function _unregisterRootForAttester(address attester, uint256 root) internal {\\n _roots[attester][root] = false;\\n if (attester == address(0)) {\\n emit UnregisteredRootForAll(root);\\n } else {\\n emit UnregisteredRootForAttester(attester, root);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9329ecaf60ffe978c8ab4360e0a8f9bd36e2549e89d672dd39ae80f9a562f9a9\",\"license\":\"MIT\"},\"contracts/periphery/utils/CommitmentMapperRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\nimport {ICommitmentMapperRegistry} from './interfaces/ICommitmentMapperRegistry.sol';\\n\\n/**\\n * @title Commitment Mapper Registry Contract\\n * @author Sismo\\n * @notice This contract stores information about the commitment mapper.\\n * Its ethereum address and its EdDSA public key\\n * For more information: https://commitment-mapper.docs.sismo.io\\n *\\n **/\\ncontract CommitmentMapperRegistry is ICommitmentMapperRegistry, Initializable, Ownable {\\n uint256[2] internal _commitmentMapperPubKey;\\n address _commitmentMapperAddress;\\n\\n /**\\n * @dev Constructor\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n constructor(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) {\\n initialize(owner, commitmentMapperEdDSAPubKey, commitmentMapperAddress);\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n function initialize(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) public initializer {\\n _transferOwnership(owner);\\n _updateCommitmentMapperEdDSAPubKey(commitmentMapperEdDSAPubKey);\\n _updateCommitmentMapperAddress(commitmentMapperAddress);\\n }\\n\\n /**\\n * @dev Updates the EdDSA public key\\n * @param newEdDSAPubKey new EdDSA pubic key\\n */\\n function updateCommitmentMapperEdDSAPubKey(uint256[2] memory newEdDSAPubKey) external onlyOwner {\\n _updateCommitmentMapperEdDSAPubKey(newEdDSAPubKey);\\n }\\n\\n /**\\n * @dev Updates the address\\n * @param newAddress new address\\n */\\n function updateCommitmentMapperAddress(address newAddress) external onlyOwner {\\n _updateCommitmentMapperAddress(newAddress);\\n }\\n\\n /**\\n * @dev Getter of the EdDSA public key of the commitment mapper\\n */\\n function getEdDSAPubKey() external view override returns (uint256[2] memory) {\\n return _commitmentMapperPubKey;\\n }\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getAddress() external view override returns (address) {\\n return _commitmentMapperAddress;\\n }\\n\\n function _updateCommitmentMapperAddress(address newAddress) internal {\\n _commitmentMapperAddress = newAddress;\\n emit UpdatedCommitmentMapperAddress(newAddress);\\n }\\n\\n function _updateCommitmentMapperEdDSAPubKey(uint256[2] memory pubKey) internal {\\n _commitmentMapperPubKey = pubKey;\\n emit UpdatedCommitmentMapperEdDSAPubKey(pubKey);\\n }\\n}\\n\",\"keccak256\":\"0xacb5347ee1a0e8dc25a1ce3e6fbb427db646e833ff8508909454cad7950418d4\",\"license\":\"MIT\"},\"contracts/periphery/utils/interfaces/IAvailableRootsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title IAvailableRootsRegistry\\n * @author Sismo\\n * @notice Interface for (Merkle) Roots Registry\\n */\\ninterface IAvailableRootsRegistry {\\n event RegisteredRootForAttester(address attester, uint256 root);\\n event RegisteredRootForAll(uint256 root);\\n event UnregisteredRootForAttester(address attester, uint256 root);\\n event UnregisteredRootForAll(uint256 root);\\n\\n error CannotRegisterForZeroAddress();\\n error CannotUnregisterForZeroAddress();\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n */\\n function initialize(address owner) external;\\n\\n /**\\n * @dev Register a root available for an attester\\n * @param attester Attester which will have the root available\\n * @param root Root to register\\n */\\n function registerRootForAttester(address attester, uint256 root) external;\\n\\n /**\\n * @dev Unregister a root for an attester\\n * @param attester Attester which will no longer have the root available\\n * @param root Root to unregister\\n */\\n function unregisterRootForAttester(address attester, uint256 root) external;\\n\\n /**\\n * @dev Registers a root, available for all contracts\\n * @param root Root to register\\n */\\n function registerRootForAll(uint256 root) external;\\n\\n /**\\n * @dev Unregister a root, available for all contracts\\n * @param root Root to unregister\\n */\\n function unregisterRootForAll(uint256 root) external;\\n\\n /**\\n * @dev returns whether a root is available for a caller (msg.sender)\\n * @param root root to check whether it is registered for me or not\\n */\\n function isRootAvailableForMe(uint256 root) external view returns (bool);\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param attester Owner of the contract, can update public key and address\\n * @param root Owner of the contract, can update public key and address\\n */\\n function isRootAvailableForAttester(address attester, uint256 root) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x87f5035b58936a8458a22f3cf1b3865bd798813310d86af41af74680978c97c8\",\"license\":\"MIT\"},\"contracts/periphery/utils/interfaces/ICommitmentMapperRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\ninterface ICommitmentMapperRegistry {\\n event UpdatedCommitmentMapperEdDSAPubKey(uint256[2] newEdDSAPubKey);\\n event UpdatedCommitmentMapperAddress(address newAddress);\\n error PubKeyNotValid(uint256[2] pubKey);\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n function initialize(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) external;\\n\\n /**\\n * @dev Updates the EdDSA public key\\n * @param newEdDSAPubKey new EdDSA pubic key\\n */\\n function updateCommitmentMapperEdDSAPubKey(uint256[2] memory newEdDSAPubKey) external;\\n\\n /**\\n * @dev Updates the address\\n * @param newAddress new address\\n */\\n function updateCommitmentMapperAddress(address newAddress) external;\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getEdDSAPubKey() external view returns (uint256[2] memory);\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getAddress() external view returns (address);\\n}\\n\",\"keccak256\":\"0x8d6298b442dde99ee5a9cc989ada6ea808383a08b1e9bb1d4c2b58adc01eec69\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101406040523480156200001257600080fd5b5060405162001d9438038062001d94833981016040819052620000359162000081565b6001600160a01b0394851660805292841660c05290831660a0529190921660e0526101005261012052620000f0565b80516001600160a01b03811681146200007c57600080fd5b919050565b60008060008060008060c087890312156200009b57600080fd5b620000a68762000064565b9550620000b66020880162000064565b9450620000c66040880162000064565b9350620000d66060880162000064565b92506080870151915060a087015190509295509295509295565b60805160a05160c05160e0516101005161012051611c1e620001766000396000818161015501526102fe01526000818161010d01526102d60152600081816101bf015281816103ee0152818161056501526106820152600081816101790152610b2d01526000818160a50152610bc901526000818160e40152610d2a0152611c1e6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063918447af11610066578063918447af14610177578063af411a301461019d578063bfa66585146101bd578063c776adde146101e3578063e60f999f146101f657600080fd5b80632254f98e146100a357806346657fe9146100e257806354846d7a1461010857806363e4afc21461013d5780637000b05114610150575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b61012f7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100d9565b6100c561014b36600461117d565b610209565b61012f7f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b6101b06101ab3660046111df565b610228565b6040516100d9919061130b565b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b6101b06101f1366004611392565b6103d8565b6101b06102043660046111df565b610644565b6000818152600160205260408120546001600160a01b03165b92915050565b6060600061023d610238866114f5565b610760565b60408051600180825281830190925291925060009190816020015b6102a96040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b8152602001906001900390816102585750506060830151519091506000906102fa906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611685565b90507f000000000000000000000000000000000000000000000000000000000000000081111561034557604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b031681526020018560200151815260200185606001516020015163ffffffff16815260200160405180602001604052806000815250815250836000815181106103c1576103c161169d565b602090810291909101015250909695505050505050565b60608060005b86811015610542576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78d8d8881811061042d5761042d61169d565b905060200201358c6040518363ffffffff1660e01b81526004016104649291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610481573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104a991908101906116c7565b93509350935093506040518060c001604052808d8d888181106104ce576104ce61169d565b9050602002013581526020018b6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff168152602001828152508686815181106105205761052061169d565b602002602001018190525050505050808061053a90611777565b9150506103de565b5061054e8185856107e5565b6040516373e4ca1b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e7c994369061059a90849060040161130b565b600060405180830381600087803b1580156105b457600080fd5b505af11580156105c8573d6000803e3d6000fd5b5050505060005b86811015610639577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061060a5761060a61169d565b602002602001015160405161061f9190611790565b60405180910390a18061063181611777565b9150506105cf565b509695505050505050565b60606106518484846107fe565b600061065e858585610228565b905061066b858585610846565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906106b790849060040161130b565b600060405180830381600087803b1580156106d157600080fd5b505af11580156106e5573d6000803e3d6000fd5b5050505060005b8151811015610757577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc8282815181106107285761072861169d565b602002602001015160405161073d9190611790565b60405180910390a18061074f81611777565b9150506106ec565b50949350505050565b6107686110a9565b600082600001516000815181106107815761078161169d565b60200260200101519050610794816108e1565b600081604001518060200190518101906107ae91906117b3565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b600061080c828401846118e4565b9050600061081982610925565b90506000610829610238876114f5565b905061083581836109cf565b61083e83610d00565b505050505050565b60006108528383610e99565b6000818152600160205260409020549091506001600160a01b0316801580159061089d575061088760408601602087016119b5565b6001600160a01b0316816001600160a01b031614155b156108be57604051631f5d53e360e01b81526004810183905260240161033c565b6108d7826108d260408801602089016119b5565b610ebe565b5050505050565b50565b60006108f08260400151610f24565b825190915081146109215781516040516337e3d1ab60e01b815261033c918391600401918252602082015260400190565b5050565b61092d61110c565b60405180610120016040528061094284610f59565b6001600160a01b0316815260200161095984610f6e565b815260200161096784610f7d565b815260200161097584610f8c565b815260200161098384610f9b565b815260200161099184610faa565b815260200161099f84610fb9565b81526020016109b78460200151610120015160011490565b151581526020016109c784610fc8565b905292915050565b815160c082015114610a0457815160c082015160405163fe405c7760e01b81526004810192909252602482015260440161033c565b81606001516040015115158160e00151151503610a4f57606082015160409081015160e08301519151634629f1b560e11b81529015156004820152901515602482015260440161033c565b81604001516001600160a01b031681600001516001600160a01b031614610aa357604082810151825191516370a8d99b60e11b81526001600160a01b0391821660048201529116602482015260440161033c565b46816020015114610ad6576020810151604051630432cec160e31b8152466004820152602481019190915260440161033c565b81602001518160a0015114610b1157602082015160a0820151604051630626ade360e41b81526004810192909252602482015260440161033c565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015610b7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba091906119d2565b610bc557806040015160405163cbfe7bc360e01b815260040161033c91815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4891906119ed565b805161010084015151919250141580610c6f57506020808201516101008401519091015114155b15610cb9578051602080830151610100850151805192015160405163318d812b60e01b8152600481019490945260248401919091526044830191909152606482015260840161033c565b6000610cc484611020565b905080836060015114610cfa5760608301516040516377bb6d2760e11b815261033c918391600401918252602082015260400190565b50505050565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f694610d6394909392909190600401611a69565b602060405180830381865afa925050508015610d9c575060408051601f3d908101601f19168201909252610d99918101906119d2565b60015b610e7257610da8611aed565b806308c379a003610de15750610dbc611b09565b80610dc75750610e20565b8060405162dd577760e81b815260040161033c9190611b93565b634e487b7103610e2057610df3611ba6565b90610dfe5750610e20565b60405162dd577760e81b8152602060048201526000602482015260440161033c565b3d808015610e4a576040519150601f19603f3d011682016040523d82523d6000602084013e610e4f565b606091505b5060405162dd577760e81b8152602060048201526000602482015260440161033c565b806109215760405162dd577760e81b8152602060048201526000602482015260440161033c565b600080610ea8838501856118e4565b90506000610eb582610f9b565b95945050505050565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b80516020820120600090610222907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190611bc6565b6020810151600090815b602002015192915050565b60208101516000906001610f63565b60208101516000906004610f63565b60208101516000906005610f63565b60208101516000906006610f63565b60208101516000906007610f63565b60208101516000906008610f63565b610fd061115f565b604051806040016040528083602001516002600a8110610ff257610ff261169d565b6020020151815260200183602001516003600a81106110135761101361169d565b6020020151905292915050565b60008061103e308460600151600001516001600160801b0316611045565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c61103e9190611bc6565b6040518060800160405280600081526020016000815260200160006001600160a01b03168152602001611107604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b905290565b60405180610120016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016111075b60405180604001604052806002906020820280368337509192915050565b60006020828403121561118f57600080fd5b5035919050565b60008083601f8401126111a857600080fd5b50813567ffffffffffffffff8111156111c057600080fd5b6020830191508360208285010111156111d857600080fd5b9250929050565b6000806000604084860312156111f457600080fd5b833567ffffffffffffffff8082111561120c57600080fd5b908501906040828803121561122057600080fd5b9093506020850135908082111561123657600080fd5b5061124386828701611196565b9497909650939450505050565b60005b8381101561126b578181015183820152602001611253565b83811115610cfa5750506000910152565b60008151808452611294816020860160208601611250565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261130360c085018261127c565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561136057603f1988860301845261134e8583516112a8565b94509285019290850190600101611332565b5092979650505050505050565b6001600160a01b03811681146108de57600080fd5b803561138d8161136d565b919050565b6000806000806000606086880312156113aa57600080fd5b853567ffffffffffffffff808211156113c257600080fd5b818801915088601f8301126113d657600080fd5b8135818111156113e557600080fd5b8960208260051b85010111156113fa57600080fd5b6020830197508096505061141060208901611382565b9450604088013591508082111561142657600080fd5b5061143388828901611196565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b6040810181811067ffffffffffffffff8211171561147a5761147a611444565b60405250565b6060810181811067ffffffffffffffff8211171561147a5761147a611444565b601f8201601f1916810167ffffffffffffffff811182821017156114c6576114c6611444565b6040525050565b600067ffffffffffffffff8211156114e7576114e7611444565b50601f01601f191660200190565b6000604080833603121561150857600080fd5b80516115138161145a565b833567ffffffffffffffff8082111561152b57600080fd5b9085019036601f83011261153e57600080fd5b813560208282111561155257611552611444565b8160051b8651611564838301826114a0565b9283528481018201928281013685111561157d57600080fd5b83870192505b848310156116515782358681111561159b5760008081fd5b8701606036829003601f19018113156115b45760008081fd5b8a516115bf81611480565b8287013581528b830135818801529082013590888211156115e05760008081fd5b9181019136603f8401126115f657600091508182fd5b868301359150611605826114cd565b8c5161161182826114a0565b838152368e85870101111561162857600091508182fd5b838e86018a830137600093810189019390935250808c0191909152825250918301918301611583565b50865250611660888201611382565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b600082198211156116985761169861166f565b500190565b634e487b7160e01b600052603260045260246000fd5b805163ffffffff8116811461138d57600080fd5b600080600080608085870312156116dd57600080fd5b84516116e88161136d565b602086015190945092506116fe604086016116b3565b9150606085015167ffffffffffffffff81111561171a57600080fd5b8501601f8101871361172b57600080fd5b8051611736816114cd565b60405161174382826114a0565b82815289602084860101111561175857600080fd5b611769836020830160208701611250565b969995985093965050505050565b6000600182016117895761178961166f565b5060010190565b60208152600061103e60208301846112a8565b8051801515811461138d57600080fd5b6000606082840312156117c557600080fd5b6040516060810181811067ffffffffffffffff821117156117e8576117e8611444565b60405282516001600160801b038116811461180257600080fd5b8152611810602084016116b3565b6020820152611821604084016117a3565b60408201529392505050565b600082601f83011261183e57600080fd5b60405161184a8161145a565b80604084018581111561185c57600080fd5b845b8181101561187657803583526020928301920161185e565b509195945050505050565b600082601f83011261189257600080fd5b60405161014080820182811067ffffffffffffffff821117156118b7576118b7611444565b604052830181858211156118ca57600080fd5b845b828110156118765780358252602091820191016118cc565b60008183036102408112156118f857600080fd5b604080516119058161145a565b6101008084121561191557600080fd5b8251935061192284611480565b61192c878761182d565b845286605f87011261193d57600080fd5b82516119488161145a565b8060c088018981111561195a57600080fd5b8589015b8181101561197f576119708b8261182d565b8352602090920191860161195e565b508260208801526119908a8261182d565b868801525050508382526119a687828801611881565b60208301525095945050505050565b6000602082840312156119c757600080fd5b813561103e8161136d565b6000602082840312156119e457600080fd5b61103e826117a3565b6000604082840312156119ff57600080fd5b82601f830112611a0e57600080fd5b604051611a1a8161145a565b806040840185811115611a2c57600080fd5b845b81811015611876578051835260209283019201611a2e565b8060005b6002811015610cfa578151845260209384019390910190600101611a4a565b6102408101611a788287611a46565b60408083018660005b6002811015611aa857611a95838351611a46565b9183019160209190910190600101611a81565b50505050611ab960c0830185611a46565b61010082018360005b600a811015611ae1578151835260209283019290910190600101611ac2565b50505095945050505050565b600060033d1115611b065760046000803e5060005160e01c5b90565b600060443d1015611b175790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611b4757505050505090565b8285019150815181811115611b5f5750505050505090565b843d8701016020828501011115611b795750505050505090565b611b88602082860101876114a0565b509095945050505050565b60208152600061103e602083018461127c565b60008060233d1115611bc2576020600460003e50506000516001905b9091565b600082611be357634e487b7160e01b600052601260045260246000fd5b50069056fea26469706673582212200880771dc9a12d1ab8ee0aef209d3ee36ccccf3e7ad67d67ca8565a13c73569a64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063918447af11610066578063918447af14610177578063af411a301461019d578063bfa66585146101bd578063c776adde146101e3578063e60f999f146101f657600080fd5b80632254f98e146100a357806346657fe9146100e257806354846d7a1461010857806363e4afc21461013d5780637000b05114610150575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b61012f7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100d9565b6100c561014b36600461117d565b610209565b61012f7f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b6101b06101ab3660046111df565b610228565b6040516100d9919061130b565b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b6101b06101f1366004611392565b6103d8565b6101b06102043660046111df565b610644565b6000818152600160205260408120546001600160a01b03165b92915050565b6060600061023d610238866114f5565b610760565b60408051600180825281830190925291925060009190816020015b6102a96040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b8152602001906001900390816102585750506060830151519091506000906102fa906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611685565b90507f000000000000000000000000000000000000000000000000000000000000000081111561034557604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b031681526020018560200151815260200185606001516020015163ffffffff16815260200160405180602001604052806000815250815250836000815181106103c1576103c161169d565b602090810291909101015250909695505050505050565b60608060005b86811015610542576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78d8d8881811061042d5761042d61169d565b905060200201358c6040518363ffffffff1660e01b81526004016104649291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610481573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104a991908101906116c7565b93509350935093506040518060c001604052808d8d888181106104ce576104ce61169d565b9050602002013581526020018b6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff168152602001828152508686815181106105205761052061169d565b602002602001018190525050505050808061053a90611777565b9150506103de565b5061054e8185856107e5565b6040516373e4ca1b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e7c994369061059a90849060040161130b565b600060405180830381600087803b1580156105b457600080fd5b505af11580156105c8573d6000803e3d6000fd5b5050505060005b86811015610639577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061060a5761060a61169d565b602002602001015160405161061f9190611790565b60405180910390a18061063181611777565b9150506105cf565b509695505050505050565b60606106518484846107fe565b600061065e858585610228565b905061066b858585610846565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906106b790849060040161130b565b600060405180830381600087803b1580156106d157600080fd5b505af11580156106e5573d6000803e3d6000fd5b5050505060005b8151811015610757577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc8282815181106107285761072861169d565b602002602001015160405161073d9190611790565b60405180910390a18061074f81611777565b9150506106ec565b50949350505050565b6107686110a9565b600082600001516000815181106107815761078161169d565b60200260200101519050610794816108e1565b600081604001518060200190518101906107ae91906117b3565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b600061080c828401846118e4565b9050600061081982610925565b90506000610829610238876114f5565b905061083581836109cf565b61083e83610d00565b505050505050565b60006108528383610e99565b6000818152600160205260409020549091506001600160a01b0316801580159061089d575061088760408601602087016119b5565b6001600160a01b0316816001600160a01b031614155b156108be57604051631f5d53e360e01b81526004810183905260240161033c565b6108d7826108d260408801602089016119b5565b610ebe565b5050505050565b50565b60006108f08260400151610f24565b825190915081146109215781516040516337e3d1ab60e01b815261033c918391600401918252602082015260400190565b5050565b61092d61110c565b60405180610120016040528061094284610f59565b6001600160a01b0316815260200161095984610f6e565b815260200161096784610f7d565b815260200161097584610f8c565b815260200161098384610f9b565b815260200161099184610faa565b815260200161099f84610fb9565b81526020016109b78460200151610120015160011490565b151581526020016109c784610fc8565b905292915050565b815160c082015114610a0457815160c082015160405163fe405c7760e01b81526004810192909252602482015260440161033c565b81606001516040015115158160e00151151503610a4f57606082015160409081015160e08301519151634629f1b560e11b81529015156004820152901515602482015260440161033c565b81604001516001600160a01b031681600001516001600160a01b031614610aa357604082810151825191516370a8d99b60e11b81526001600160a01b0391821660048201529116602482015260440161033c565b46816020015114610ad6576020810151604051630432cec160e31b8152466004820152602481019190915260440161033c565b81602001518160a0015114610b1157602082015160a0820151604051630626ade360e41b81526004810192909252602482015260440161033c565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015610b7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba091906119d2565b610bc557806040015160405163cbfe7bc360e01b815260040161033c91815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4891906119ed565b805161010084015151919250141580610c6f57506020808201516101008401519091015114155b15610cb9578051602080830151610100850151805192015160405163318d812b60e01b8152600481019490945260248401919091526044830191909152606482015260840161033c565b6000610cc484611020565b905080836060015114610cfa5760608301516040516377bb6d2760e11b815261033c918391600401918252602082015260400190565b50505050565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f694610d6394909392909190600401611a69565b602060405180830381865afa925050508015610d9c575060408051601f3d908101601f19168201909252610d99918101906119d2565b60015b610e7257610da8611aed565b806308c379a003610de15750610dbc611b09565b80610dc75750610e20565b8060405162dd577760e81b815260040161033c9190611b93565b634e487b7103610e2057610df3611ba6565b90610dfe5750610e20565b60405162dd577760e81b8152602060048201526000602482015260440161033c565b3d808015610e4a576040519150601f19603f3d011682016040523d82523d6000602084013e610e4f565b606091505b5060405162dd577760e81b8152602060048201526000602482015260440161033c565b806109215760405162dd577760e81b8152602060048201526000602482015260440161033c565b600080610ea8838501856118e4565b90506000610eb582610f9b565b95945050505050565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b80516020820120600090610222907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190611bc6565b6020810151600090815b602002015192915050565b60208101516000906001610f63565b60208101516000906004610f63565b60208101516000906005610f63565b60208101516000906006610f63565b60208101516000906007610f63565b60208101516000906008610f63565b610fd061115f565b604051806040016040528083602001516002600a8110610ff257610ff261169d565b6020020151815260200183602001516003600a81106110135761101361169d565b6020020151905292915050565b60008061103e308460600151600001516001600160801b0316611045565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c61103e9190611bc6565b6040518060800160405280600081526020016000815260200160006001600160a01b03168152602001611107604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b905290565b60405180610120016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016111075b60405180604001604052806002906020820280368337509192915050565b60006020828403121561118f57600080fd5b5035919050565b60008083601f8401126111a857600080fd5b50813567ffffffffffffffff8111156111c057600080fd5b6020830191508360208285010111156111d857600080fd5b9250929050565b6000806000604084860312156111f457600080fd5b833567ffffffffffffffff8082111561120c57600080fd5b908501906040828803121561122057600080fd5b9093506020850135908082111561123657600080fd5b5061124386828701611196565b9497909650939450505050565b60005b8381101561126b578181015183820152602001611253565b83811115610cfa5750506000910152565b60008151808452611294816020860160208601611250565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261130360c085018261127c565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561136057603f1988860301845261134e8583516112a8565b94509285019290850190600101611332565b5092979650505050505050565b6001600160a01b03811681146108de57600080fd5b803561138d8161136d565b919050565b6000806000806000606086880312156113aa57600080fd5b853567ffffffffffffffff808211156113c257600080fd5b818801915088601f8301126113d657600080fd5b8135818111156113e557600080fd5b8960208260051b85010111156113fa57600080fd5b6020830197508096505061141060208901611382565b9450604088013591508082111561142657600080fd5b5061143388828901611196565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b6040810181811067ffffffffffffffff8211171561147a5761147a611444565b60405250565b6060810181811067ffffffffffffffff8211171561147a5761147a611444565b601f8201601f1916810167ffffffffffffffff811182821017156114c6576114c6611444565b6040525050565b600067ffffffffffffffff8211156114e7576114e7611444565b50601f01601f191660200190565b6000604080833603121561150857600080fd5b80516115138161145a565b833567ffffffffffffffff8082111561152b57600080fd5b9085019036601f83011261153e57600080fd5b813560208282111561155257611552611444565b8160051b8651611564838301826114a0565b9283528481018201928281013685111561157d57600080fd5b83870192505b848310156116515782358681111561159b5760008081fd5b8701606036829003601f19018113156115b45760008081fd5b8a516115bf81611480565b8287013581528b830135818801529082013590888211156115e05760008081fd5b9181019136603f8401126115f657600091508182fd5b868301359150611605826114cd565b8c5161161182826114a0565b838152368e85870101111561162857600091508182fd5b838e86018a830137600093810189019390935250808c0191909152825250918301918301611583565b50865250611660888201611382565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b600082198211156116985761169861166f565b500190565b634e487b7160e01b600052603260045260246000fd5b805163ffffffff8116811461138d57600080fd5b600080600080608085870312156116dd57600080fd5b84516116e88161136d565b602086015190945092506116fe604086016116b3565b9150606085015167ffffffffffffffff81111561171a57600080fd5b8501601f8101871361172b57600080fd5b8051611736816114cd565b60405161174382826114a0565b82815289602084860101111561175857600080fd5b611769836020830160208701611250565b969995985093965050505050565b6000600182016117895761178961166f565b5060010190565b60208152600061103e60208301846112a8565b8051801515811461138d57600080fd5b6000606082840312156117c557600080fd5b6040516060810181811067ffffffffffffffff821117156117e8576117e8611444565b60405282516001600160801b038116811461180257600080fd5b8152611810602084016116b3565b6020820152611821604084016117a3565b60408201529392505050565b600082601f83011261183e57600080fd5b60405161184a8161145a565b80604084018581111561185c57600080fd5b845b8181101561187657803583526020928301920161185e565b509195945050505050565b600082601f83011261189257600080fd5b60405161014080820182811067ffffffffffffffff821117156118b7576118b7611444565b604052830181858211156118ca57600080fd5b845b828110156118765780358252602091820191016118cc565b60008183036102408112156118f857600080fd5b604080516119058161145a565b6101008084121561191557600080fd5b8251935061192284611480565b61192c878761182d565b845286605f87011261193d57600080fd5b82516119488161145a565b8060c088018981111561195a57600080fd5b8589015b8181101561197f576119708b8261182d565b8352602090920191860161195e565b508260208801526119908a8261182d565b868801525050508382526119a687828801611881565b60208301525095945050505050565b6000602082840312156119c757600080fd5b813561103e8161136d565b6000602082840312156119e457600080fd5b61103e826117a3565b6000604082840312156119ff57600080fd5b82601f830112611a0e57600080fd5b604051611a1a8161145a565b806040840185811115611a2c57600080fd5b845b81811015611876578051835260209283019201611a2e565b8060005b6002811015610cfa578151845260209384019390910190600101611a4a565b6102408101611a788287611a46565b60408083018660005b6002811015611aa857611a95838351611a46565b9183019160209190910190600101611a81565b50505050611ab960c0830185611a46565b61010082018360005b600a811015611ae1578151835260209283019290910190600101611ac2565b50505095945050505050565b600060033d1115611b065760046000803e5060005160e01c5b90565b600060443d1015611b175790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611b4757505050505090565b8285019150815181811115611b5f5750505050505090565b843d8701016020828501011115611b795750505050505090565b611b88602082860101876114a0565b509095945050505050565b60208152600061103e602083018461127c565b60008060233d1115611bc2576020600460003e50506000516001905b9091565b600082611be357634e487b7160e01b600052601260045260246000fd5b50069056fea26469706673582212200880771dc9a12d1ab8ee0aef209d3ee36ccccf3e7ad67d67ca8565a13c73569a64736f6c634300080e0033", + "devdoc": { + "author": "Sismo", + "kind": "dev", + "methods": { + "buildAttestations(((uint256,uint256,bytes)[],address),bytes)": { + "details": "Returns attestations that will be recorded, constructed from the user request", + "params": { + "request": "users request. Claim of having an account part of a group of accounts" + } + }, + "constructor": { + "details": "Constructor. Initializes the contract", + "params": { + "attestationsRegistryAddress": "Attestations Registry contract on which the attester will write attestations", + "availableRootsRegistryAddress": "Registry storing the available groups for this attester (e.g roots of registry merkle trees)", + "collectionIdFirst": "Id of the first collection in which the attester is supposed to record", + "collectionIdLast": "Id of the last collection in which the attester is supposed to record", + "commitmentMapperAddress": "commitment mapper's public key registry", + "hydraS1VerifierAddress": "ZK Snark Hydra-S1 Verifier contract" + } + }, + "deleteAttestations(uint256[],address,bytes)": { + "details": "External facing function. Allows to delete attestations by submitting proof", + "params": { + "attestationsOwner": "Owner of attestations to delete", + "collectionIds": "Collection identifier of attestations to delete", + "proofData": "Data sent along the deletion request to prove its validity" + }, + "returns": { + "_0": "attestations Attestations that were deleted" + } + }, + "generateAttestations(((uint256,uint256,bytes)[],address),bytes)": { + "details": "Main external function. Allows to generate attestations by making a request and submitting proof", + "params": { + "proofData": "Data sent along the request to prove its validity", + "request": "User request" + }, + "returns": { + "_0": "attestations Attestations that has been recorded" + } + }, + "getAttestationRegistry()": { + "details": "Attestation registry getter", + "returns": { + "_0": "attestationRegistry" + } + }, + "getAvailableRootsRegistry()": { + "details": "Getter of Roots Registry Contract" + }, + "getCommitmentMapperRegistry()": { + "details": "Getter of Commitment Mapper Registry contract" + }, + "getDestinationOfTicket(uint256)": { + "details": "Getter, returns the last attestation destination of a ticket", + "params": { + "userTicket": "ticket used*" + } + }, + "getVerifier()": { + "details": "Getter of Hydra-S1 Verifier contract" + } + }, + "stateVariables": { + "AUTHORIZED_COLLECTION_ID_FIRST": { + "details": "Getter returns of the first collection in which the attester is supposed to record*" + }, + "AUTHORIZED_COLLECTION_ID_LAST": { + "details": "Getter returns of the last collection in which the attester is supposed to record*" + } + }, + "title": "Hydra-S1 Simple Attester", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "This attester is part of the family of the Hydra-S1 Attesters. Hydra-S1 attesters enable users to prove they have an account in a group in a privacy preserving way. The Hydra-S1 Base abstract contract is inherited and holds the complex Hydra S1 verification logic. We invite readers to refer to: - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1 This specific attester has the following characteristics: - Zero Knowledge One cannot deduct from an attestation what source account was used to generate the underlying proof - Non Strict (scores) If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100. This attester generate attestations of scores - Ticketed Each source account gets one userTicket per claim (i.e only one attestation per source account per claim) For people used to semaphore/ tornado cash people: userTicket = hash(sourceSecret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier) - Renewable A userTicket can actually be reused as long as the destination of the attestation remains the same It enables users to renew their attestations*", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 936, + "contract": "contracts/attesters/hydra-s1/HydraS1SimpleAttester.sol:HydraS1SimpleAttester", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 939, + "contract": "contracts/attesters/hydra-s1/HydraS1SimpleAttester.sol:HydraS1SimpleAttester", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6335, + "contract": "contracts/attesters/hydra-s1/HydraS1SimpleAttester.sol:HydraS1SimpleAttester", + "label": "_ticketsDestinations", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_uint256,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/HydraS1SimpleAttesterImplem.json b/deployments/mumbai/HydraS1SimpleAttesterImplem.json new file mode 100644 index 0000000..027f7be --- /dev/null +++ b/deployments/mumbai/HydraS1SimpleAttesterImplem.json @@ -0,0 +1,854 @@ +{ + "address": "0x1E03E088D1AF616280bf7E34EcaEa3D85ac7Fbd7", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "attestationsRegistryAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "hydraS1VerifierAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "availableRootsRegistryAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "commitmentMapperAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "collectionIdFirst", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collectionIdLast", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedAccountsTreeValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputAccountsTreeValue", + "type": "uint256" + } + ], + "name": "AccountsTreeValueMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "AttestationDeletionNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "ChainIdMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "claimLength", + "type": "uint256" + } + ], + "name": "ClaimsLengthDifferentThanOne", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + } + ], + "name": "CollectionIdOutOfBound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedX", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedY", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputX", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputY", + "type": "uint256" + } + ], + "name": "CommitmentMapperPubKeyMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expectedDestination", + "type": "address" + }, + { + "internalType": "address", + "name": "inputDestination", + "type": "address" + } + ], + "name": "DestinationMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedGroupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + } + ], + "name": "GroupIdAndPropertiesMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "InvalidGroth16Proof", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "expectedStrictness", + "type": "bool" + }, + { + "internalType": "bool", + "name": "strictNess", + "type": "bool" + } + ], + "name": "IsStrictMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "inputRoot", + "type": "uint256" + } + ], + "name": "RegistryRootMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedTicketIdentifier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ticketIdentifier", + "type": "uint256" + } + ], + "name": "TicketIdentifierMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "userTicket", + "type": "uint256" + } + ], + "name": "TicketUsed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputValue", + "type": "uint256" + } + ], + "name": "ValueMismatch", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct Attestation", + "name": "attestation", + "type": "tuple" + } + ], + "name": "AttestationDeleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct Attestation", + "name": "attestation", + "type": "tuple" + } + ], + "name": "AttestationGenerated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "ticket", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "TicketDestinationUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "AUTHORIZED_COLLECTION_ID_FIRST", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "AUTHORIZED_COLLECTION_ID_LAST", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "buildAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "collectionIds", + "type": "uint256[]" + }, + { + "internalType": "address", + "name": "attestationsOwner", + "type": "address" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "deleteAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "generateAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAttestationRegistry", + "outputs": [ + { + "internalType": "contract IAttestationsRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAvailableRootsRegistry", + "outputs": [ + { + "internalType": "contract IAvailableRootsRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCommitmentMapperRegistry", + "outputs": [ + { + "internalType": "contract ICommitmentMapperRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "userTicket", + "type": "uint256" + } + ], + "name": "getDestinationOfTicket", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVerifier", + "outputs": [ + { + "internalType": "contract HydraS1Verifier", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xbd918ae00c33e642de063dde542b8c9ac0c1eb2b71b489c125396c212176556c", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x1E03E088D1AF616280bf7E34EcaEa3D85ac7Fbd7", + "transactionIndex": 1, + "gasUsed": "1609554", + "logsBloom": "0x00000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000010000000000000000000008000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0xa8b24f88275f1f71ce4a8eb3818a7a0a13e150ab543f19a5d5065b96f301bf86", + "transactionHash": "0xbd918ae00c33e642de063dde542b8c9ac0c1eb2b71b489c125396c212176556c", + "logs": [ + { + "transactionIndex": 1, + "blockNumber": 28600031, + "transactionHash": "0xbd918ae00c33e642de063dde542b8c9ac0c1eb2b71b489c125396c212176556c", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000000137aa723d2d5ce000000000000000000000000000000000000000000000000845b066efa6b6f9200000000000000000000000000000000000000000000167a2e33d6452ac16a1900000000000000000000000000000000000000000000000084478bc7d69899c400000000000000000000000000000000000000000000167a2e4750ec4e943fe7", + "logIndex": 1, + "blockHash": "0xa8b24f88275f1f71ce4a8eb3818a7a0a13e150ab543f19a5d5065b96f301bf86" + } + ], + "blockNumber": 28600031, + "cumulativeGasUsed": "1678380", + "status": 1, + "byzantium": true + }, + "args": [ + "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", + "0x34e3CcCF4fF2E297be22465b85F03E5E6D27b41B", + "0x2c17e335d131dfd21238475Dd545B9B29Fb5A27D", + "0x82B54988e4E3a2850501F91AC06CEA82bdb014D3", + "10000001", + "20000000" + ], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attestationsRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"hydraS1VerifierAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"availableRootsRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"commitmentMapperAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"collectionIdFirst\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collectionIdLast\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedAccountsTreeValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputAccountsTreeValue\",\"type\":\"uint256\"}],\"name\":\"AccountsTreeValueMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AttestationDeletionNotImplemented\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"name\":\"ChainIdMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"claimLength\",\"type\":\"uint256\"}],\"name\":\"ClaimsLengthDifferentThanOne\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"}],\"name\":\"CollectionIdOutOfBound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedX\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expectedY\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputX\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputY\",\"type\":\"uint256\"}],\"name\":\"CommitmentMapperPubKeyMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"expectedDestination\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"inputDestination\",\"type\":\"address\"}],\"name\":\"DestinationMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedGroupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"}],\"name\":\"GroupIdAndPropertiesMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"InvalidGroth16Proof\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"expectedStrictness\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"strictNess\",\"type\":\"bool\"}],\"name\":\"IsStrictMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"inputRoot\",\"type\":\"uint256\"}],\"name\":\"RegistryRootMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedTicketIdentifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ticketIdentifier\",\"type\":\"uint256\"}],\"name\":\"TicketIdentifierMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"userTicket\",\"type\":\"uint256\"}],\"name\":\"TicketUsed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputValue\",\"type\":\"uint256\"}],\"name\":\"ValueMismatch\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct Attestation\",\"name\":\"attestation\",\"type\":\"tuple\"}],\"name\":\"AttestationDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct Attestation\",\"name\":\"attestation\",\"type\":\"tuple\"}],\"name\":\"AttestationGenerated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ticket\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"TicketDestinationUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"AUTHORIZED_COLLECTION_ID_FIRST\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"AUTHORIZED_COLLECTION_ID_LAST\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"buildAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"attestationsOwner\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"deleteAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"generateAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAttestationRegistry\",\"outputs\":[{\"internalType\":\"contract IAttestationsRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAvailableRootsRegistry\",\"outputs\":[{\"internalType\":\"contract IAvailableRootsRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCommitmentMapperRegistry\",\"outputs\":[{\"internalType\":\"contract ICommitmentMapperRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"userTicket\",\"type\":\"uint256\"}],\"name\":\"getDestinationOfTicket\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVerifier\",\"outputs\":[{\"internalType\":\"contract HydraS1Verifier\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"buildAttestations(((uint256,uint256,bytes)[],address),bytes)\":{\"details\":\"Returns attestations that will be recorded, constructed from the user request\",\"params\":{\"request\":\"users request. Claim of having an account part of a group of accounts\"}},\"constructor\":{\"details\":\"Constructor. Initializes the contract\",\"params\":{\"attestationsRegistryAddress\":\"Attestations Registry contract on which the attester will write attestations\",\"availableRootsRegistryAddress\":\"Registry storing the available groups for this attester (e.g roots of registry merkle trees)\",\"collectionIdFirst\":\"Id of the first collection in which the attester is supposed to record\",\"collectionIdLast\":\"Id of the last collection in which the attester is supposed to record\",\"commitmentMapperAddress\":\"commitment mapper's public key registry\",\"hydraS1VerifierAddress\":\"ZK Snark Hydra-S1 Verifier contract\"}},\"deleteAttestations(uint256[],address,bytes)\":{\"details\":\"External facing function. Allows to delete attestations by submitting proof\",\"params\":{\"attestationsOwner\":\"Owner of attestations to delete\",\"collectionIds\":\"Collection identifier of attestations to delete\",\"proofData\":\"Data sent along the deletion request to prove its validity\"},\"returns\":{\"_0\":\"attestations Attestations that were deleted\"}},\"generateAttestations(((uint256,uint256,bytes)[],address),bytes)\":{\"details\":\"Main external function. Allows to generate attestations by making a request and submitting proof\",\"params\":{\"proofData\":\"Data sent along the request to prove its validity\",\"request\":\"User request\"},\"returns\":{\"_0\":\"attestations Attestations that has been recorded\"}},\"getAttestationRegistry()\":{\"details\":\"Attestation registry getter\",\"returns\":{\"_0\":\"attestationRegistry\"}},\"getAvailableRootsRegistry()\":{\"details\":\"Getter of Roots Registry Contract\"},\"getCommitmentMapperRegistry()\":{\"details\":\"Getter of Commitment Mapper Registry contract\"},\"getDestinationOfTicket(uint256)\":{\"details\":\"Getter, returns the last attestation destination of a ticket\",\"params\":{\"userTicket\":\"ticket used*\"}},\"getVerifier()\":{\"details\":\"Getter of Hydra-S1 Verifier contract\"}},\"stateVariables\":{\"AUTHORIZED_COLLECTION_ID_FIRST\":{\"details\":\"Getter returns of the first collection in which the attester is supposed to record*\"},\"AUTHORIZED_COLLECTION_ID_LAST\":{\"details\":\"Getter returns of the last collection in which the attester is supposed to record*\"}},\"title\":\"Hydra-S1 Simple Attester\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"This attester is part of the family of the Hydra-S1 Attesters. Hydra-S1 attesters enable users to prove they have an account in a group in a privacy preserving way. The Hydra-S1 Base abstract contract is inherited and holds the complex Hydra S1 verification logic. We invite readers to refer to: - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1 This specific attester has the following characteristics: - Zero Knowledge One cannot deduct from an attestation what source account was used to generate the underlying proof - Non Strict (scores) If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100. This attester generate attestations of scores - Ticketed Each source account gets one userTicket per claim (i.e only one attestation per source account per claim) For people used to semaphore/ tornado cash people: userTicket = hash(sourceSecret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier) - Renewable A userTicket can actually be reused as long as the destination of the attestation remains the same It enables users to renew their attestations*\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/attesters/hydra-s1/HydraS1SimpleAttester.sol\":\"HydraS1SimpleAttester\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() initializer {}\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\\n // contract may have been reentered.\\n require(_initializing ? _isConstructor() : !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} modifier, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n function _isConstructor() private view returns (bool) {\\n return !Address.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x4823752b07b8ea4ca971b217e39457930e7cb103c2c91e2a29729e5ca907e4f0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@sismo-core/hydra-s1/contracts/HydraS1Verifier.sol\":{\"content\":\"//\\n// Copyright 2017 Christian Reitwiessner\\n// 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:\\n// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\\n// 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.\\n//\\n// 2019 OKIMS\\n// ported to solidity 0.6\\n// fixed linter warnings\\n// added requiere error messages\\n//\\n//\\n// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.0;\\nlibrary Pairing {\\n struct G1Point {\\n uint X;\\n uint Y;\\n }\\n // Encoding of field elements is: X[0] * z + X[1]\\n struct G2Point {\\n uint[2] X;\\n uint[2] Y;\\n }\\n /// @return the generator of G1\\n function P1() internal pure returns (G1Point memory) {\\n return G1Point(1, 2);\\n }\\n /// @return the generator of G2\\n function P2() internal pure returns (G2Point memory) {\\n // Original code point\\n return G2Point(\\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\\n );\\n\\n/*\\n // Changed by Jordi point\\n return G2Point(\\n [10857046999023057135944570762232829481370756359578518086990519993285655852781,\\n 11559732032986387107991004021392285783925812861821192530917403151452391805634],\\n [8495653923123431417604973247489272438418190587263600148770280649306958101930,\\n 4082367875863433681332203403145435568316851327593401208105741076214120093531]\\n );\\n*/\\n }\\n /// @return r the negation of p, i.e. p.addition(p.negate()) should be zero.\\n function negate(G1Point memory p) internal pure returns (G1Point memory r) {\\n // The prime q in the base field F_q for G1\\n uint q = 21888242871839275222246405745257275088696311157297823662689037894645226208583;\\n if (p.X == 0 && p.Y == 0)\\n return G1Point(0, 0);\\n return G1Point(p.X, q - (p.Y % q));\\n }\\n /// @return r the sum of two points of G1\\n function addition(G1Point memory p1, G1Point memory p2) internal view returns (G1Point memory r) {\\n uint[4] memory input;\\n input[0] = p1.X;\\n input[1] = p1.Y;\\n input[2] = p2.X;\\n input[3] = p2.Y;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require(success,\\\"pairing-add-failed\\\");\\n }\\n /// @return r the product of a point on G1 and a scalar, i.e.\\n /// p == p.scalar_mul(1) and p.addition(p) == p.scalar_mul(2) for all points p.\\n function scalar_mul(G1Point memory p, uint s) internal view returns (G1Point memory r) {\\n uint[3] memory input;\\n input[0] = p.X;\\n input[1] = p.Y;\\n input[2] = s;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require (success,\\\"pairing-mul-failed\\\");\\n }\\n /// @return the result of computing the pairing check\\n /// e(p1[0], p2[0]) * .... * e(p1[n], p2[n]) == 1\\n /// For example pairing([P1(), P1().negate()], [P2(), P2()]) should\\n /// return true.\\n function pairing(G1Point[] memory p1, G2Point[] memory p2) internal view returns (bool) {\\n require(p1.length == p2.length,\\\"pairing-lengths-failed\\\");\\n uint elements = p1.length;\\n uint inputSize = elements * 6;\\n uint[] memory input = new uint[](inputSize);\\n for (uint i = 0; i < elements; i++)\\n {\\n input[i * 6 + 0] = p1[i].X;\\n input[i * 6 + 1] = p1[i].Y;\\n input[i * 6 + 2] = p2[i].X[0];\\n input[i * 6 + 3] = p2[i].X[1];\\n input[i * 6 + 4] = p2[i].Y[0];\\n input[i * 6 + 5] = p2[i].Y[1];\\n }\\n uint[1] memory out;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 8, add(input, 0x20), mul(inputSize, 0x20), out, 0x20)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require(success,\\\"pairing-opcode-failed\\\");\\n return out[0] != 0;\\n }\\n /// Convenience method for a pairing check for two pairs.\\n function pairingProd2(G1Point memory a1, G2Point memory a2, G1Point memory b1, G2Point memory b2) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](2);\\n G2Point[] memory p2 = new G2Point[](2);\\n p1[0] = a1;\\n p1[1] = b1;\\n p2[0] = a2;\\n p2[1] = b2;\\n return pairing(p1, p2);\\n }\\n /// Convenience method for a pairing check for three pairs.\\n function pairingProd3(\\n G1Point memory a1, G2Point memory a2,\\n G1Point memory b1, G2Point memory b2,\\n G1Point memory c1, G2Point memory c2\\n ) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](3);\\n G2Point[] memory p2 = new G2Point[](3);\\n p1[0] = a1;\\n p1[1] = b1;\\n p1[2] = c1;\\n p2[0] = a2;\\n p2[1] = b2;\\n p2[2] = c2;\\n return pairing(p1, p2);\\n }\\n /// Convenience method for a pairing check for four pairs.\\n function pairingProd4(\\n G1Point memory a1, G2Point memory a2,\\n G1Point memory b1, G2Point memory b2,\\n G1Point memory c1, G2Point memory c2,\\n G1Point memory d1, G2Point memory d2\\n ) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](4);\\n G2Point[] memory p2 = new G2Point[](4);\\n p1[0] = a1;\\n p1[1] = b1;\\n p1[2] = c1;\\n p1[3] = d1;\\n p2[0] = a2;\\n p2[1] = b2;\\n p2[2] = c2;\\n p2[3] = d2;\\n return pairing(p1, p2);\\n }\\n}\\ncontract HydraS1Verifier {\\n using Pairing for *;\\n struct VerifyingKey {\\n Pairing.G1Point alfa1;\\n Pairing.G2Point beta2;\\n Pairing.G2Point gamma2;\\n Pairing.G2Point delta2;\\n Pairing.G1Point[] IC;\\n }\\n struct Proof {\\n Pairing.G1Point A;\\n Pairing.G2Point B;\\n Pairing.G1Point C;\\n }\\n function verifyingKey() internal pure returns (VerifyingKey memory vk) {\\n vk.alfa1 = Pairing.G1Point(\\n 20491192805390485299153009773594534940189261866228447918068658471970481763042,\\n 9383485363053290200918347156157836566562967994039712273449902621266178545958\\n );\\n\\n vk.beta2 = Pairing.G2Point(\\n [4252822878758300859123897981450591353533073413197771768651442665752259397132,\\n 6375614351688725206403948262868962793625744043794305715222011528459656738731],\\n [21847035105528745403288232691147584728191162732299865338377159692350059136679,\\n 10505242626370262277552901082094356697409835680220590971873171140371331206856]\\n );\\n vk.gamma2 = Pairing.G2Point(\\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\\n );\\n vk.delta2 = Pairing.G2Point(\\n [16703691932058078091905716404571265959476320760471681443119627655715361207341,\\n 14290274403144646058563103675066900294643500151498463054614740831207315388514],\\n [9120517679481713774648131333833134160499672068094273767171232839700590114148,\\n 18338638855816625080803231766917659002322979855877827709378572546717723262324]\\n );\\n vk.IC = new Pairing.G1Point[](11);\\n \\n vk.IC[0] = Pairing.G1Point( \\n 15183981365841448712456044920259850142312423574262787585047804960636415432994,\\n 7001044530623564797357151512361873851017731748844374046997463344585588795777\\n ); \\n \\n vk.IC[1] = Pairing.G1Point( \\n 3754737654948662562435613969155994959132173506784418442817218316697091994043,\\n 16520141448541154153981919757383608282199583682574061862571018786569723115048\\n ); \\n \\n vk.IC[2] = Pairing.G1Point( \\n 14734466460881491794568175288621656907425457509621292263456156896685122952305,\\n 18495564446073110430251898491840031389094613665866187171071741938161262650771\\n ); \\n \\n vk.IC[3] = Pairing.G1Point( \\n 16380352455102502109444307845900237792657209995731679788026311308996926499427,\\n 11872494853967118743957240270505831687788406895959276908447589431944985706662\\n ); \\n \\n vk.IC[4] = Pairing.G1Point( \\n 20199514202493196707492057247804402540358301491780845748325025913208809441866,\\n 12760637713678265881350279209961337475498485836996922236408521200416764617323\\n ); \\n \\n vk.IC[5] = Pairing.G1Point( \\n 19153715775490328450864792250302417403928222720390978634383848496516270422395,\\n 546002182798634190282541153661423157791776194062719045593389981526666716416\\n ); \\n \\n vk.IC[6] = Pairing.G1Point( \\n 2572546294944895555897986264162285493992700415786641015895831165477991460890,\\n 16475880996834565556958124284585338184010927435675877479782010166270319781724\\n ); \\n \\n vk.IC[7] = Pairing.G1Point( \\n 1189084334785746899933155760881982253715630415235816484826929546449434025692,\\n 4229672360641556939458327562740354930286687266228809328535679188294452033396\\n ); \\n \\n vk.IC[8] = Pairing.G1Point( \\n 19602244162575575785636531633124796303002902053486919698240132790672698216585,\\n 181057165072599074288983745076121344893296348827576905983079816835912241514\\n ); \\n \\n vk.IC[9] = Pairing.G1Point( \\n 2674333225598340315002358633842521216418358316694409406540164227900893354209,\\n 2129512057743264354864596186877181463207231175912159744730924346148245351960\\n ); \\n \\n vk.IC[10] = Pairing.G1Point( \\n 7320700433668244102684846027945878190869912696586803178638351868907615350377,\\n 2941840530209756385349015075958743796933501451265755778001586753024906675441\\n ); \\n \\n }\\n function verify(uint[] memory input, Proof memory proof) internal view returns (uint) {\\n uint256 snark_scalar_field = 21888242871839275222246405745257275088548364400416034343698204186575808495617;\\n VerifyingKey memory vk = verifyingKey();\\n require(input.length + 1 == vk.IC.length,\\\"verifier-bad-input\\\");\\n // Compute the linear combination vk_x\\n Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);\\n for (uint i = 0; i < input.length; i++) {\\n require(input[i] < snark_scalar_field,\\\"verifier-gte-snark-scalar-field\\\");\\n vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i]));\\n }\\n vk_x = Pairing.addition(vk_x, vk.IC[0]);\\n if (!Pairing.pairingProd4(\\n Pairing.negate(proof.A), proof.B,\\n vk.alfa1, vk.beta2,\\n vk_x, vk.gamma2,\\n proof.C, vk.delta2\\n )) return 1;\\n return 0;\\n }\\n /// @return r bool true if proof is valid\\n function verifyProof(\\n uint[2] memory a,\\n uint[2][2] memory b,\\n uint[2] memory c,\\n uint[10] memory input\\n ) public view returns (bool r) {\\n Proof memory proof;\\n proof.A = Pairing.G1Point(a[0], a[1]);\\n proof.B = Pairing.G2Point([b[0][0], b[0][1]], [b[1][0], b[1][1]]);\\n proof.C = Pairing.G1Point(c[0], c[1]);\\n uint[] memory inputValues = new uint[](input.length);\\n for(uint i = 0; i < input.length; i++){\\n inputValues[i] = input[i];\\n }\\n if (verify(inputValues, proof) == 0) {\\n return true;\\n } else {\\n return false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x70c0b7d96ff1b90538938a4cb2d8086b3aabb4febf1e36cb3f470bfe0b4a9e89\",\"license\":\"GPL-3.0\"},\"contracts/attesters/hydra-s1/HydraS1SimpleAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {IHydraS1SimpleAttester} from './interfaces/IHydraS1SimpleAttester.sol';\\n\\n// Core protocol Protocol imports\\nimport {Request, Attestation, Claim} from './../../core/libs/Structs.sol';\\nimport {Attester, IAttester, IAttestationsRegistry} from './../../core/Attester.sol';\\n\\n// Imports related to HydraS1 Proving Scheme\\nimport {HydraS1Base, HydraS1Lib, HydraS1ProofData, HydraS1ProofInput, HydraS1Claim} from './base/HydraS1Base.sol';\\n\\n/**\\n * @title Hydra-S1 Simple Attester\\n * @author Sismo\\n * @notice This attester is part of the family of the Hydra-S1 Attesters.\\n * Hydra-S1 attesters enable users to prove they have an account in a group in a privacy preserving way.\\n * The Hydra-S1 Base abstract contract is inherited and holds the complex Hydra S1 verification logic.\\n * We invite readers to refer to:\\n * - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations\\n * - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1\\n\\n * This specific attester has the following characteristics:\\n\\n * - Zero Knowledge\\n * One cannot deduct from an attestation what source account was used to generate the underlying proof\\n\\n * - Non Strict (scores)\\n * If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100.\\n * This attester generate attestations of scores\\n\\n * - Ticketed\\n * Each source account gets one userTicket per claim (i.e only one attestation per source account per claim)\\n * For people used to semaphore/ tornado cash people:\\n * userTicket = hash(sourceSecret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier)\\n \\n * - Renewable\\n * A userTicket can actually be reused as long as the destination of the attestation remains the same\\n * It enables users to renew their attestations\\n **/\\n\\ncontract HydraS1SimpleAttester is IHydraS1SimpleAttester, HydraS1Base, Attester {\\n using HydraS1Lib for HydraS1ProofData;\\n using HydraS1Lib for bytes;\\n using HydraS1Lib for Request;\\n\\n // The deployed contract will need to be authorized to write into the Attestation registry\\n // It should get write access on attestation collections from AUTHORIZED_COLLECTION_ID_FIRST to AUTHORIZED_COLLECTION_ID_LAST.\\n uint256 public immutable AUTHORIZED_COLLECTION_ID_FIRST;\\n uint256 public immutable AUTHORIZED_COLLECTION_ID_LAST;\\n\\n mapping(uint256 => address) internal _ticketsDestinations;\\n\\n /*******************************************************\\n INITIALIZATION FUNCTIONS \\n *******************************************************/\\n /**\\n * @dev Constructor. Initializes the contract\\n * @param attestationsRegistryAddress Attestations Registry contract on which the attester will write attestations\\n * @param hydraS1VerifierAddress ZK Snark Hydra-S1 Verifier contract\\n * @param availableRootsRegistryAddress Registry storing the available groups for this attester (e.g roots of registry merkle trees)\\n * @param commitmentMapperAddress commitment mapper's public key registry\\n * @param collectionIdFirst Id of the first collection in which the attester is supposed to record\\n * @param collectionIdLast Id of the last collection in which the attester is supposed to record\\n */\\n constructor(\\n address attestationsRegistryAddress,\\n address hydraS1VerifierAddress,\\n address availableRootsRegistryAddress,\\n address commitmentMapperAddress,\\n uint256 collectionIdFirst,\\n uint256 collectionIdLast\\n )\\n Attester(attestationsRegistryAddress)\\n HydraS1Base(hydraS1VerifierAddress, availableRootsRegistryAddress, commitmentMapperAddress)\\n {\\n AUTHORIZED_COLLECTION_ID_FIRST = collectionIdFirst;\\n AUTHORIZED_COLLECTION_ID_LAST = collectionIdLast;\\n }\\n\\n /*******************************************************\\n MANDATORY FUNCTIONS TO OVERRIDE FROM ATTESTER.SOL\\n *******************************************************/\\n\\n /**\\n * @dev Throws if user request is invalid when verified against\\n * Look into HydraS1Base for more details\\n * @param request users request. Claim of having an account part of a group of accounts\\n * @param proofData provided to back the request. snark input and snark proof\\n */\\n function _verifyRequest(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n override\\n {\\n HydraS1ProofData memory snarkProof = abi.decode(proofData, (HydraS1ProofData));\\n HydraS1ProofInput memory snarkInput = snarkProof._input();\\n HydraS1Claim memory claim = request._claim();\\n\\n // verifies that the proof corresponds to the claim\\n _validateInput(claim, snarkInput);\\n // verifies the proof validity\\n _verifyProof(snarkProof);\\n }\\n\\n /**\\n * @dev Returns attestations that will be recorded, constructed from the user request\\n * @param request users request. Claim of having an account part of a group of accounts\\n */\\n function buildAttestations(Request calldata request, bytes calldata)\\n public\\n view\\n virtual\\n override(IAttester, Attester)\\n returns (Attestation[] memory)\\n {\\n HydraS1Claim memory claim = request._claim();\\n\\n Attestation[] memory attestations = new Attestation[](1);\\n\\n uint256 attestationCollectionId = AUTHORIZED_COLLECTION_ID_FIRST +\\n claim.groupProperties.groupIndex;\\n\\n if (attestationCollectionId > AUTHORIZED_COLLECTION_ID_LAST)\\n revert CollectionIdOutOfBound(attestationCollectionId);\\n\\n address issuer = address(this);\\n\\n attestations[0] = Attestation(\\n attestationCollectionId,\\n claim.destination,\\n issuer,\\n claim.claimedValue,\\n claim.groupProperties.generationTimestamp,\\n ''\\n );\\n return (attestations);\\n }\\n\\n /*******************************************************\\n OPTIONAL HOOK VIRTUAL FUNCTIONS FROM ATTESTER.SOL\\n *******************************************************/\\n\\n /**\\n * @dev Hook run before recording the attestation.\\n * Throws if ticket already used and not a renewal (e.g destination different that last)\\n * @param request users request. Claim of having an account part of a group of accounts\\n * @param proofData provided to back the request. snark input and snark proof\\n */\\n function _beforeRecordAttestations(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n override\\n {\\n // we get the ticket used from the snark input in the data provided\\n uint256 userTicket = proofData._getTicket();\\n address currentDestination = _getDestinationOfTicket(userTicket);\\n\\n if (currentDestination != address(0) && currentDestination != request.destination) {\\n revert TicketUsed(userTicket);\\n }\\n\\n _setDestinationForTicket(userTicket, request.destination);\\n }\\n\\n /*******************************************************\\n Hydra-S1 MANDATORY FUNCTIONS FROM Hydra-S1 Base Attester\\n *******************************************************/\\n\\n /**\\n * @dev Returns the ticket identifier from a user claim\\n * @param claim user Hydra-S1 claim = have an account with a specific value in a specific group\\n * ticket = hash(sourceSecretHash, ticketIdentifier), which is verified inside the snark\\n * users bring sourceSecretHash as private input in snark which guarantees privacy\\n \\n * Here we chose ticketIdentifier = hash(attesterAddress, claim.GroupId)\\n * Creates one ticket per group, per user and makes sure no collision with other attester's tickets\\n **/\\n function _getTicketIdentifierOfClaim(HydraS1Claim memory claim)\\n internal\\n view\\n override\\n returns (uint256)\\n {\\n uint256 ticketIdentifier = _encodeInSnarkField(address(this), claim.groupProperties.groupIndex);\\n return ticketIdentifier;\\n }\\n\\n /*******************************************************\\n Hydra-S1 Attester Specific Functions\\n *******************************************************/\\n\\n /**\\n * @dev Getter, returns the last attestation destination of a ticket\\n * @param userTicket ticket used\\n **/\\n function getDestinationOfTicket(uint256 userTicket) external view override returns (address) {\\n return _getDestinationOfTicket(userTicket);\\n }\\n\\n function _setDestinationForTicket(uint256 userTicket, address destination) internal virtual {\\n _ticketsDestinations[userTicket] = destination;\\n emit TicketDestinationUpdated(userTicket, destination);\\n }\\n\\n function _getDestinationOfTicket(uint256 userTicket) internal view returns (address) {\\n return _ticketsDestinations[userTicket];\\n }\\n\\n function _encodeInSnarkField(address addr, uint256 nb) internal pure returns (uint256) {\\n return uint256(keccak256(abi.encode(addr, nb))) % HydraS1Lib.SNARK_FIELD;\\n }\\n}\\n\",\"keccak256\":\"0x4e58a7c2e28a705f0a4af77ec4145f504aa68cdbc263ac077ebc4c50b9086f11\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/base/HydraS1Base.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {IHydraS1Base} from './IHydraS1Base.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\n\\n// Protocol imports\\nimport {Request, Attestation, Claim} from '../../../core/libs/Structs.sol';\\n\\n// Imports related to Hydra S1 ZK Proving Scheme\\nimport {HydraS1Verifier, HydraS1Lib, HydraS1Claim, HydraS1ProofData, HydraS1ProofInput, HydraS1GroupProperties} from '../libs/HydraS1Lib.sol';\\nimport {ICommitmentMapperRegistry} from '../../../periphery/utils/CommitmentMapperRegistry.sol';\\nimport {IAvailableRootsRegistry} from '../../../periphery/utils/AvailableRootsRegistry.sol';\\n\\n/**\\n * @title Hydra-S1 Base Attester\\n * @author Sismo\\n * @notice Abstract contract that facilitates the use of the Hydra-S1 ZK Proving Scheme.\\n * Hydra-S1 is single source, single group: it allows users to verify they are part of one and only one group at a time\\n * It is inherited by the family of Hydra-S1 attesters.\\n * It contains the user input checking and the ZK-SNARK proof verification.\\n * We invite readers to refer to:\\n * - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations\\n * - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1\\n \\n \\n **/\\nabstract contract HydraS1Base is IHydraS1Base, Initializable {\\n using HydraS1Lib for HydraS1ProofData;\\n\\n // ZK-SNARK Verifier\\n HydraS1Verifier immutable VERIFIER;\\n // Registry storing the Commitment Mapper EdDSA Public key\\n ICommitmentMapperRegistry immutable COMMITMENT_MAPPER_REGISTRY;\\n // Registry storing the Registry Tree Roots of the Attester's available ClaimData\\n IAvailableRootsRegistry immutable AVAILABLE_ROOTS_REGISTRY;\\n\\n /*******************************************************\\n INITIALIZATION FUNCTIONS \\n *******************************************************/\\n /**\\n * @dev Constructor. Initializes the contract\\n * @param hydraS1VerifierAddress ZK Snark Verifier contract\\n * @param availableRootsRegistryAddress Registry where is the Available Data (Registry Merkle Roots)\\n * @param commitmentMapperAddress Commitment mapper's public key registry\\n */\\n constructor(\\n address hydraS1VerifierAddress,\\n address availableRootsRegistryAddress,\\n address commitmentMapperAddress\\n ) {\\n VERIFIER = HydraS1Verifier(hydraS1VerifierAddress);\\n AVAILABLE_ROOTS_REGISTRY = IAvailableRootsRegistry(availableRootsRegistryAddress);\\n COMMITMENT_MAPPER_REGISTRY = ICommitmentMapperRegistry(commitmentMapperAddress);\\n }\\n\\n /**\\n * @dev Getter of Hydra-S1 Verifier contract\\n */\\n function getVerifier() external view returns (HydraS1Verifier) {\\n return VERIFIER;\\n }\\n\\n /**\\n * @dev Getter of Commitment Mapper Registry contract\\n */\\n function getCommitmentMapperRegistry() external view returns (ICommitmentMapperRegistry) {\\n return COMMITMENT_MAPPER_REGISTRY;\\n }\\n\\n /**\\n * @dev Getter of Roots Registry Contract\\n */\\n function getAvailableRootsRegistry() external view returns (IAvailableRootsRegistry) {\\n return AVAILABLE_ROOTS_REGISTRY;\\n }\\n\\n /*******************************************************\\n Hydra-S1 SPECIFIC FUNCTIONS\\n *******************************************************/\\n\\n /**\\n * @dev MANDATORY: must be implemented to return the ticket identifier from a user request\\n * so it can be checked against snark input\\n * ticket = hash(sourceSecretHash, ticketIdentifier), which is verified inside the snark\\n * users bring sourceSecretHash as private input which guarantees privacy\\n\\n * This function MUST be implemented by Hydra-S1 attesters.\\n * This is the core function that implements the logic of tickets\\n\\n * Do they get one ticket per claim?\\n * Do they get 2 tickets per claim?\\n * Do they get 1 ticket per claim, every month?\\n * Take a look at Hydra-S1 Simple Attester for an example\\n * @param claim user claim: part of a group of accounts, with a claimedValue for their account\\n */\\n function _getTicketIdentifierOfClaim(HydraS1Claim memory claim)\\n internal\\n view\\n virtual\\n returns (uint256);\\n\\n /**\\n * @dev Checks whether the user claim and the snark public input are a match\\n * @param claim user claim\\n * @param input snark public input\\n */\\n function _validateInput(HydraS1Claim memory claim, HydraS1ProofInput memory input)\\n internal\\n view\\n virtual\\n {\\n if (input.accountsTreeValue != claim.groupId)\\n revert AccountsTreeValueMismatch(claim.groupId, input.accountsTreeValue);\\n\\n if (input.isStrict == claim.groupProperties.isScore)\\n revert IsStrictMismatch(claim.groupProperties.isScore, input.isStrict);\\n\\n if (input.destination != claim.destination)\\n revert DestinationMismatch(claim.destination, input.destination);\\n\\n if (input.chainId != block.chainid) revert ChainIdMismatch(block.chainid, input.chainId);\\n\\n if (input.value != claim.claimedValue) revert ValueMismatch(claim.claimedValue, input.value);\\n\\n if (!AVAILABLE_ROOTS_REGISTRY.isRootAvailableForMe(input.registryRoot))\\n revert RegistryRootMismatch(input.registryRoot);\\n\\n uint256[2] memory commitmentMapperPubKey = COMMITMENT_MAPPER_REGISTRY.getEdDSAPubKey();\\n if (\\n input.commitmentMapperPubKey[0] != commitmentMapperPubKey[0] ||\\n input.commitmentMapperPubKey[1] != commitmentMapperPubKey[1]\\n )\\n revert CommitmentMapperPubKeyMismatch(\\n commitmentMapperPubKey[0],\\n commitmentMapperPubKey[1],\\n input.commitmentMapperPubKey[0],\\n input.commitmentMapperPubKey[1]\\n );\\n\\n uint256 ticketIdentifier = _getTicketIdentifierOfClaim(claim);\\n\\n if (input.ticketIdentifier != ticketIdentifier)\\n revert TicketIdentifierMismatch(ticketIdentifier, input.ticketIdentifier);\\n }\\n\\n /**\\n * @dev verify the groth16 mathematical proof\\n * @param proofData snark public input\\n */\\n function _verifyProof(HydraS1ProofData memory proofData) internal view virtual {\\n try\\n VERIFIER.verifyProof(proofData.proof.a, proofData.proof.b, proofData.proof.c, proofData.input)\\n returns (bool success) {\\n if (!success) revert InvalidGroth16Proof('');\\n } catch Error(string memory reason) {\\n revert InvalidGroth16Proof(reason);\\n } catch Panic(\\n uint256 /*errorCode*/\\n ) {\\n revert InvalidGroth16Proof('');\\n } catch (\\n bytes memory /*lowLevelData*/\\n ) {\\n revert InvalidGroth16Proof('');\\n }\\n }\\n}\\n\",\"keccak256\":\"0x02708884237382835cd3d3514fdc3603409ce5ea1dc7255a7ceea07dff417c34\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/base/IHydraS1Base.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {HydraS1Verifier, HydraS1Lib, HydraS1ProofData} from '../libs/HydraS1Lib.sol';\\nimport {ICommitmentMapperRegistry} from '../../../periphery/utils/CommitmentMapperRegistry.sol';\\nimport {IAvailableRootsRegistry} from '../../../periphery/utils/AvailableRootsRegistry.sol';\\n\\n// todo: explain well what is specific to this attester\\ninterface IHydraS1Base {\\n error ClaimsLengthDifferentThanOne(uint256 claimLength);\\n error RegistryRootMismatch(uint256 inputRoot);\\n error DestinationMismatch(address expectedDestination, address inputDestination);\\n error CommitmentMapperPubKeyMismatch(\\n uint256 expectedX,\\n uint256 expectedY,\\n uint256 inputX,\\n uint256 inputY\\n );\\n error TicketIdentifierMismatch(uint256 expectedTicketIdentifier, uint256 ticketIdentifier);\\n error IsStrictMismatch(bool expectedStrictness, bool strictNess);\\n error ChainIdMismatch(uint256 expectedChainId, uint256 chainId);\\n error ValueMismatch(uint256 expectedValue, uint256 inputValue);\\n error AccountsTreeValueMismatch(\\n uint256 expectedAccountsTreeValue,\\n uint256 inputAccountsTreeValue\\n );\\n error InvalidGroth16Proof(string reason);\\n\\n /**\\n * @dev Getter of Hydra-S1 Verifier contract\\n */\\n function getVerifier() external view returns (HydraS1Verifier);\\n\\n /**\\n * @dev Getter of Commitment Mapper Registry contract\\n */\\n function getCommitmentMapperRegistry() external view returns (ICommitmentMapperRegistry);\\n\\n /**\\n * @dev Getter of Roots Registry Contract\\n */\\n function getAvailableRootsRegistry() external view returns (IAvailableRootsRegistry);\\n}\\n\",\"keccak256\":\"0x73cff4dcd9c30857859721ea2897be8bb7087c0122f4587acdaa79d8ec0a728d\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/interfaces/IHydraS1SimpleAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {Attestation} from '../../../core/libs/Structs.sol';\\nimport {IAttester} from '../../../core/interfaces/IAttester.sol';\\nimport {CommitmentMapperRegistry} from '../../../periphery/utils/CommitmentMapperRegistry.sol';\\nimport {AvailableRootsRegistry} from '../../../periphery/utils/AvailableRootsRegistry.sol';\\nimport {HydraS1Lib, HydraS1ProofData, HydraS1ProofInput} from './../libs/HydraS1Lib.sol';\\nimport {IHydraS1Base} from './../base/IHydraS1Base.sol';\\n\\n// todo: explain well what is specific to this attester\\ninterface IHydraS1SimpleAttester is IHydraS1Base, IAttester {\\n error TicketUsed(uint256 userTicket);\\n error CollectionIdOutOfBound(uint256 collectionId);\\n\\n event TicketDestinationUpdated(uint256 ticket, address newOwner);\\n\\n /**\\n * @dev Getter, returns the last attestation destination of a ticket\\n * @param userTicket ticket used\\n **/\\n function getDestinationOfTicket(uint256 userTicket) external view returns (address);\\n\\n /**\\n * @dev Getter\\n * returns of the first collection in which the attester is supposed to record\\n **/\\n function AUTHORIZED_COLLECTION_ID_FIRST() external view returns (uint256);\\n\\n /**\\n * @dev Getter\\n * returns of the last collection in which the attester is supposed to record\\n **/\\n function AUTHORIZED_COLLECTION_ID_LAST() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xa773e565f9a9ae1b6139779f80e04bf8391ee40e7f2673c785814d1317894259\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/libs/HydraS1Lib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Claim, Request} from '../../../core/libs/Structs.sol';\\nimport {HydraS1Verifier} from '@sismo-core/hydra-s1/contracts/HydraS1Verifier.sol';\\n\\n// user Hydra-S1 claim retrieved form his request\\nstruct HydraS1Claim {\\n uint256 groupId; // user claims to have an account in this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n address destination; // user claims to own this destination[]\\n HydraS1GroupProperties groupProperties; // user claims the group has the following properties\\n}\\n\\nstruct HydraS1GroupProperties {\\n uint128 groupIndex;\\n uint32 generationTimestamp;\\n bool isScore;\\n}\\n\\nstruct HydraS1CircomSnarkProof {\\n uint256[2] a;\\n uint256[2][2] b;\\n uint256[2] c;\\n}\\n\\nstruct HydraS1ProofData {\\n HydraS1CircomSnarkProof proof;\\n uint256[10] input;\\n // destination\\n // chainId\\n // commitmentMapperPubKey.x\\n // commitmentMapperPubKey.y\\n // registryTreeRoot\\n // ticketIdentifier\\n // ticket\\n // claimedValue\\n // accountsTreeValue\\n // isStrict\\n}\\n\\nstruct HydraS1ProofInput {\\n address destination;\\n uint256 chainId;\\n uint256 registryRoot;\\n uint256 ticketIdentifier;\\n uint256 ticket;\\n uint256 value;\\n uint256 accountsTreeValue;\\n bool isStrict;\\n uint256[2] commitmentMapperPubKey;\\n}\\n\\nlibrary HydraS1Lib {\\n uint256 constant SNARK_FIELD =\\n 21888242871839275222246405745257275088548364400416034343698204186575808495617;\\n\\n error GroupIdAndPropertiesMismatch(uint256 expectedGroupId, uint256 groupId);\\n\\n function _input(HydraS1ProofData memory self) internal pure returns (HydraS1ProofInput memory) {\\n return\\n HydraS1ProofInput(\\n _getDestination(self),\\n _getChainId(self),\\n _getRegistryRoot(self),\\n _getExpectedExternalNullifier(self),\\n _getTicket(self),\\n _getValue(self),\\n _getAccountsTreeValue(self),\\n _getIsStrict(self),\\n _getCommitmentMapperPubKey(self)\\n );\\n }\\n\\n function _claim(Request memory self) internal pure returns (HydraS1Claim memory) {\\n Claim memory claim = self.claims[0];\\n _validateClaim(claim);\\n\\n HydraS1GroupProperties memory groupProperties = abi.decode(\\n claim.extraData,\\n (HydraS1GroupProperties)\\n );\\n\\n return (HydraS1Claim(claim.groupId, claim.claimedValue, self.destination, groupProperties));\\n }\\n\\n function _toCircomFormat(HydraS1ProofData memory self)\\n internal\\n pure\\n returns (\\n uint256[2] memory,\\n uint256[2][2] memory,\\n uint256[2] memory,\\n uint256[10] memory\\n )\\n {\\n return (self.proof.a, self.proof.b, self.proof.c, self.input);\\n }\\n\\n function _getDestination(HydraS1ProofData memory self) internal pure returns (address) {\\n return address(uint160(self.input[0]));\\n }\\n\\n function _getChainId(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[1];\\n }\\n\\n function _getCommitmentMapperPubKey(HydraS1ProofData memory self)\\n internal\\n pure\\n returns (uint256[2] memory)\\n {\\n return [self.input[2], self.input[3]];\\n }\\n\\n function _getRegistryRoot(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[4];\\n }\\n\\n function _getExpectedExternalNullifier(HydraS1ProofData memory self)\\n internal\\n pure\\n returns (uint256)\\n {\\n return self.input[5];\\n }\\n\\n function _getTicket(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[6];\\n }\\n\\n function _getValue(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[7];\\n }\\n\\n function _getAccountsTreeValue(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[8];\\n }\\n\\n function _getIsStrict(HydraS1ProofData memory self) internal pure returns (bool) {\\n return self.input[9] == 1;\\n }\\n\\n function _getTicket(bytes calldata self) internal pure returns (uint256) {\\n HydraS1ProofData memory snarkProofData = abi.decode(self, (HydraS1ProofData));\\n uint256 userTicket = uint256(_getTicket(snarkProofData));\\n return userTicket;\\n }\\n\\n function _generateGroupIdFromProperties(\\n uint128 groupIndex,\\n uint32 generationTimestamp,\\n bool isScore\\n ) internal pure returns (uint256) {\\n return\\n _generateGroupIdFromEncodedProperties(\\n _encodeGroupProperties(groupIndex, generationTimestamp, isScore)\\n );\\n }\\n\\n function _generateGroupIdFromEncodedProperties(bytes memory encodedProperties)\\n internal\\n pure\\n returns (uint256)\\n {\\n return uint256(keccak256(encodedProperties)) % HydraS1Lib.SNARK_FIELD;\\n }\\n\\n function _encodeGroupProperties(\\n uint128 groupIndex,\\n uint32 generationTimestamp,\\n bool isScore\\n ) internal pure returns (bytes memory) {\\n return abi.encode(groupIndex, generationTimestamp, isScore);\\n }\\n\\n function _validateClaim(Claim memory claim) internal pure {\\n uint256 expectedGroupId = _generateGroupIdFromEncodedProperties(claim.extraData);\\n if (claim.groupId != expectedGroupId)\\n revert GroupIdAndPropertiesMismatch(expectedGroupId, claim.groupId);\\n }\\n}\\n\",\"keccak256\":\"0x596225970aabbc4edb989ee640867c76944e797bfafe5e06dcf37b973480b957\",\"license\":\"MIT\"},\"contracts/core/Attester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\nimport {IAttester} from './interfaces/IAttester.sol';\\nimport {IAttestationsRegistry} from './interfaces/IAttestationsRegistry.sol';\\nimport {Request, Attestation, AttestationData} from './libs/Structs.sol';\\n\\n/**\\n * @title Attester Abstract Contract\\n * @author Sismo\\n * @notice Contract to be inherited by Attesters\\n * All attesters that expect to be authorized in Sismo Protocol (i.e write access on the registry)\\n * are recommended to implemented this abstract contract\\n\\n * Take a look at the HydraS1SimpleAttester.sol for example on how to implement this abstract contract\\n *\\n * This contracts is built around two main external standard functions.\\n * They must NOT be override them, unless your really know what you are doing\\n \\n * - generateAttestations(request, proof) => will write attestations in the registry\\n * 1. (MANDATORY) Implement the buildAttestations() view function which generate attestations from user request\\n * 2. (MANDATORY) Implement teh _verifyRequest() internal function where to write checks\\n * 3. (OPTIONAL) Override _beforeRecordAttestations and _afterRecordAttestations hooks\\n\\n * - deleteAttestations(collectionId, owner, proof) => will delete attestations in the registry\\n * 1. (DEFAULT) By default this function throws (see _verifyAttestationsDeletionRequest)\\n * 2. (OPTIONAL) Override the _verifyAttestationsDeletionRequest so it no longer throws\\n * 3. (OPTIONAL) Override _beforeDeleteAttestations and _afterDeleteAttestations hooks\\n\\n * For more information: https://attesters.docs.sismo.io\\n **/\\nabstract contract Attester is IAttester {\\n // Registry where all attestations are stored\\n IAttestationsRegistry internal immutable ATTESTATIONS_REGISTRY;\\n\\n /**\\n * @dev Constructor\\n * @param attestationsRegistryAddress The address of the AttestationsRegistry contract storing attestations\\n */\\n constructor(address attestationsRegistryAddress) {\\n ATTESTATIONS_REGISTRY = IAttestationsRegistry(attestationsRegistryAddress);\\n }\\n\\n /**\\n * @dev Main external function. Allows to generate attestations by making a request and submitting proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that has been recorded\\n */\\n function generateAttestations(Request calldata request, bytes calldata proofData)\\n external\\n override\\n returns (Attestation[] memory)\\n {\\n // Verify if request is valid by verifying against proof\\n _verifyRequest(request, proofData);\\n\\n // Generate the actual attestations from user request\\n Attestation[] memory attestations = buildAttestations(request, proofData);\\n\\n _beforeRecordAttestations(request, proofData);\\n\\n ATTESTATIONS_REGISTRY.recordAttestations(attestations);\\n\\n _afterRecordAttestations(attestations);\\n\\n for (uint256 i = 0; i < attestations.length; i++) {\\n emit AttestationGenerated(attestations[i]);\\n }\\n\\n return attestations;\\n }\\n\\n /**\\n * @dev External facing function. Allows to delete attestations by submitting proof\\n * @param collectionIds Collection identifier of attestations to delete\\n * @param attestationsOwner Owner of attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n * @return attestations Attestations that were deleted\\n */\\n function deleteAttestations(\\n uint256[] calldata collectionIds,\\n address attestationsOwner,\\n bytes calldata proofData\\n ) external override returns (Attestation[] memory) {\\n // fetch attestations from the registry\\n Attestation[] memory attestationsToDelete;\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n (\\n address issuer,\\n uint256 attestationValue,\\n uint32 timestamp,\\n bytes memory extraData\\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\\n\\n attestationsToDelete[i] = (\\n Attestation(\\n collectionIds[i],\\n attestationsOwner,\\n issuer,\\n attestationValue,\\n timestamp,\\n extraData\\n )\\n );\\n }\\n\\n _verifyAttestationsDeletionRequest(attestationsToDelete, proofData);\\n\\n _beforeDeleteAttestations(attestationsToDelete, proofData);\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationsToDelete);\\n\\n _afterDeleteAttestations(attestationsToDelete, proofData);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n emit AttestationDeleted(attestationsToDelete[i]);\\n }\\n return attestationsToDelete;\\n }\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should build attestations from the user request and the proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(Request calldata request, bytes calldata proofData)\\n public\\n view\\n virtual\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev Attestation registry getter\\n * @return attestationRegistry\\n */\\n function getAttestationRegistry() external view override returns (IAttestationsRegistry) {\\n return ATTESTATIONS_REGISTRY;\\n }\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should verify the user request is valid\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _verifyRequest(Request calldata request, bytes calldata proofData) internal virtual;\\n\\n /**\\n * @dev Optional: must be overridden by attesters that want to feature attestations deletion\\n * Default behavior: throws\\n * It should verify attestations deletion request is valid\\n * @param attestations Attestations that will be deleted\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _verifyAttestationsDeletionRequest(\\n Attestation[] memory attestations,\\n bytes calldata proofData\\n ) internal virtual {\\n revert AttestationDeletionNotImplemented();\\n }\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called before recording attestations in the registry\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _beforeRecordAttestations(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n\\n /**\\n * @dev (Optional) Can be overridden in attesters inheriting this contract\\n * Will be called after recording an attestation\\n * @param attestations Recorded attestations\\n */\\n function _afterRecordAttestations(Attestation[] memory attestations) internal virtual {}\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called before deleting attestations from the registry\\n * @param attestations Attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n */\\n function _beforeDeleteAttestations(Attestation[] memory attestations, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called after deleting attestations from the registry\\n * @param attestations Attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n */\\n function _afterDeleteAttestations(Attestation[] memory attestations, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n}\\n\",\"keccak256\":\"0x37683c6752d4dc911459084eb191c1045f3bf34e2143f3db3d298a66c971a106\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttestationsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Attestation, AttestationData} from '../libs/Structs.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry {\\n event AttestationRecorded(Attestation attestation);\\n event AttestationDeleted(Attestation attestation);\\n\\n /**\\n * @dev Main function to be called by authorized issuers\\n * @param attestations Attestations to be recorded (creates a new one or overrides an existing one)\\n */\\n function recordAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Delete function to be called by authorized issuers\\n * @param attestations Attestations to be deleted\\n */\\n function deleteAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Returns whether a user has an attestation from a collection\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function hasAttestation(uint256 collectionId, address owner) external returns (bool);\\n\\n /**\\n * @dev Getter of the data of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationData(uint256 collectionId, address owner)\\n external\\n view\\n returns (AttestationData memory);\\n\\n /**\\n * @dev Getter of the value of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationValue(uint256 collectionId, address owner) external view returns (uint256);\\n\\n /**\\n * @dev Getter of the data of a specific attestation as tuple\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationDataTuple(uint256 collectionId, address owner)\\n external\\n view\\n returns (\\n address,\\n uint256,\\n uint32,\\n bytes memory\\n );\\n\\n /**\\n * @dev Getter of the extraData of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationExtraData(uint256 collectionId, address owner)\\n external\\n view\\n returns (bytes memory);\\n\\n /**\\n * @dev Getter of the issuer of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationIssuer(uint256 collectionId, address owner)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @dev Getter of the timestamp of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationTimestamp(uint256 collectionId, address owner)\\n external\\n view\\n returns (uint32);\\n\\n /**\\n * @dev Getter of the data of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationDataBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (AttestationData[] memory);\\n\\n /**\\n * @dev Getter of the values of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationValueBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xb5e25bd7e0372c9973e582fb7fe96318c145831a5452d8c79eb848a7464b0297\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Request, Attestation} from '../libs/Structs.sol';\\nimport {IAttestationsRegistry} from '../interfaces/IAttestationsRegistry.sol';\\n\\n/**\\n * @title IAttester\\n * @author Sismo\\n * @notice This is the interface for the attesters in Sismo Protocol\\n */\\ninterface IAttester {\\n event AttestationGenerated(Attestation attestation);\\n\\n event AttestationDeleted(Attestation attestation);\\n\\n error AttestationDeletionNotImplemented();\\n\\n /**\\n * @dev Main external function. Allows to generate attestations by making a request and submitting proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that has been recorded\\n */\\n function generateAttestations(Request calldata request, bytes calldata proofData)\\n external\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev External facing function. Allows to delete an attestation by submitting proof\\n * @param collectionIds Collection identifier of attestations to delete\\n * @param attestationsOwner Owner of attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n * @return attestations Attestations that was deleted\\n */\\n function deleteAttestations(\\n uint256[] calldata collectionIds,\\n address attestationsOwner,\\n bytes calldata proofData\\n ) external returns (Attestation[] memory);\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should build attestations from the user request and the proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(Request calldata request, bytes calldata proofData)\\n external\\n view\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev Attestation registry address getter\\n * @return attestationRegistry Address of the registry\\n */\\n function getAttestationRegistry() external view returns (IAttestationsRegistry);\\n}\\n\",\"keccak256\":\"0xafe9c1a742d7570033c8d74cee203e09ee9b7461eaed6d2ca77697449e2ce95d\",\"license\":\"MIT\"},\"contracts/core/libs/Structs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title Attestations Registry State\\n * @author Sismo\\n * @notice This contract holds all of the storage variables and data\\n * structures used by the AttestationsRegistry and parent\\n * contracts.\\n */\\n\\n// User Attestation Request, can be made by any user\\n// The context of an Attestation Request is a specific attester contract\\n// Each attester has groups of accounts in its available data\\n// eg: for a specific attester:\\n// group 1 <=> accounts that sent txs on mainnet\\n// group 2 <=> accounts that sent txs on polygon\\n// eg: for another attester:\\n// group 1 <=> accounts that sent eth txs in 2022\\n// group 2 <=> accounts sent eth txs in 2021\\nstruct Request {\\n // implicit address attester;\\n // implicit uint256 chainId;\\n Claim[] claims;\\n address destination; // destination that will receive the end attestation\\n}\\n\\nstruct Claim {\\n uint256 groupId; // user claims to have an account in this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n bytes extraData; // arbitrary data, may be required by the attester to verify claims or generate a specific attestation\\n}\\n\\n/**\\n * @dev Attestation Struct. This is the struct receive as argument by the Attestation Registry.\\n * @param collectionId Attestation collection\\n * @param owner Attestation collection\\n * @param issuer Attestation collection\\n * @param value Attestation collection\\n * @param timestamp Attestation collection\\n * @param extraData Attestation collection\\n */\\nstruct Attestation {\\n // implicit uint256 chainId;\\n uint256 collectionId; // Id of the attestation collection (in the registry)\\n address owner; // Owner of the attestation\\n address issuer; // Contract that created or last updated the record.\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Timestamp chosen by the attester, should correspond to the effective date of the attestation\\n // it is different from the recording timestamp (date when the attestation was recorded)\\n // e.g a proof of NFT ownership may have be recorded today which is 2 month old data.\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\\n// Attestation Data, stored in the registry\\n// The context is a specific owner of a specific collection\\nstruct AttestationData {\\n // implicit uint256 chainId\\n // implicit uint256 collectionId - from context\\n // implicit owner\\n address issuer; // Address of the contract that recorded the attestation\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Effective date of issuance of the attestation. (can be different from the recording timestamp)\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\",\"keccak256\":\"0x893d9a10429878dd4077388ff4da954c20b86a3c172a7bbdd10a01eb5d39b6a0\",\"license\":\"MIT\"},\"contracts/periphery/utils/AvailableRootsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {IAvailableRootsRegistry} from './interfaces/IAvailableRootsRegistry.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\n\\n/**\\n * @title Attesters Groups Registry\\n * @author Sismo\\n * @notice This contract stores that data required by attesters to be available so they can verify user claims\\n * This contract is deployed behind a proxy and this implementation is focused on storing merkle roots\\n * For more information: https://available-roots-registry.docs.sismo.io\\n *\\n **/\\ncontract AvailableRootsRegistry is IAvailableRootsRegistry, Initializable, Ownable {\\n mapping(address => mapping(uint256 => bool)) public _roots;\\n\\n /**\\n * @dev Constructor\\n * @param owner Owner of the contract, can register/ unregister roots\\n */\\n constructor(address owner) {\\n initialize(owner);\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n */\\n function initialize(address owner) public initializer {\\n _transferOwnership(owner);\\n }\\n\\n /**\\n * @dev Register a root available for an attester\\n * @param attester Attester which will have the root available\\n * @param root Root to register\\n */\\n function registerRootForAttester(address attester, uint256 root) external onlyOwner {\\n if (attester == address(0)) revert CannotRegisterForZeroAddress();\\n _registerRootForAttester(attester, root);\\n }\\n\\n /**\\n * @dev Unregister a root for an attester\\n * @param attester Attester which will no longer have the root available\\n * @param root Root to unregister\\n */\\n function unregisterRootForAttester(address attester, uint256 root) external onlyOwner {\\n if (attester == address(0)) revert CannotUnregisterForZeroAddress();\\n _unregisterRootForAttester(attester, root);\\n }\\n\\n /**\\n * @dev Registers a root, available for all contracts\\n * @param root Root to register\\n */\\n function registerRootForAll(uint256 root) external onlyOwner {\\n _registerRootForAttester(address(0), root);\\n }\\n\\n /**\\n * @dev Unregister a root, available for all contracts\\n * @param root Root to unregister\\n */\\n function unregisterRootForAll(uint256 root) external onlyOwner {\\n _unregisterRootForAttester(address(0), root);\\n }\\n\\n /**\\n * @dev returns whether a root is available for a caller (msg.sender)\\n * @param root root to check whether it is registered for me or not\\n */\\n function isRootAvailableForMe(uint256 root) external view returns (bool) {\\n return _roots[_msgSender()][root] || _roots[address(0)][root];\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param attester Owner of the contract, can update public key and address\\n * @param root Owner of the contract, can update public key and address\\n */\\n function isRootAvailableForAttester(address attester, uint256 root) external view returns (bool) {\\n return _roots[attester][root] || _roots[address(0)][root];\\n }\\n\\n function _registerRootForAttester(address attester, uint256 root) internal {\\n _roots[attester][root] = true;\\n if (attester == address(0)) {\\n emit RegisteredRootForAll(root);\\n } else {\\n emit RegisteredRootForAttester(attester, root);\\n }\\n }\\n\\n function _unregisterRootForAttester(address attester, uint256 root) internal {\\n _roots[attester][root] = false;\\n if (attester == address(0)) {\\n emit UnregisteredRootForAll(root);\\n } else {\\n emit UnregisteredRootForAttester(attester, root);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9329ecaf60ffe978c8ab4360e0a8f9bd36e2549e89d672dd39ae80f9a562f9a9\",\"license\":\"MIT\"},\"contracts/periphery/utils/CommitmentMapperRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\nimport {ICommitmentMapperRegistry} from './interfaces/ICommitmentMapperRegistry.sol';\\n\\n/**\\n * @title Commitment Mapper Registry Contract\\n * @author Sismo\\n * @notice This contract stores information about the commitment mapper.\\n * Its ethereum address and its EdDSA public key\\n * For more information: https://commitment-mapper.docs.sismo.io\\n *\\n **/\\ncontract CommitmentMapperRegistry is ICommitmentMapperRegistry, Initializable, Ownable {\\n uint256[2] internal _commitmentMapperPubKey;\\n address _commitmentMapperAddress;\\n\\n /**\\n * @dev Constructor\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n constructor(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) {\\n initialize(owner, commitmentMapperEdDSAPubKey, commitmentMapperAddress);\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n function initialize(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) public initializer {\\n _transferOwnership(owner);\\n _updateCommitmentMapperEdDSAPubKey(commitmentMapperEdDSAPubKey);\\n _updateCommitmentMapperAddress(commitmentMapperAddress);\\n }\\n\\n /**\\n * @dev Updates the EdDSA public key\\n * @param newEdDSAPubKey new EdDSA pubic key\\n */\\n function updateCommitmentMapperEdDSAPubKey(uint256[2] memory newEdDSAPubKey) external onlyOwner {\\n _updateCommitmentMapperEdDSAPubKey(newEdDSAPubKey);\\n }\\n\\n /**\\n * @dev Updates the address\\n * @param newAddress new address\\n */\\n function updateCommitmentMapperAddress(address newAddress) external onlyOwner {\\n _updateCommitmentMapperAddress(newAddress);\\n }\\n\\n /**\\n * @dev Getter of the EdDSA public key of the commitment mapper\\n */\\n function getEdDSAPubKey() external view override returns (uint256[2] memory) {\\n return _commitmentMapperPubKey;\\n }\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getAddress() external view override returns (address) {\\n return _commitmentMapperAddress;\\n }\\n\\n function _updateCommitmentMapperAddress(address newAddress) internal {\\n _commitmentMapperAddress = newAddress;\\n emit UpdatedCommitmentMapperAddress(newAddress);\\n }\\n\\n function _updateCommitmentMapperEdDSAPubKey(uint256[2] memory pubKey) internal {\\n _commitmentMapperPubKey = pubKey;\\n emit UpdatedCommitmentMapperEdDSAPubKey(pubKey);\\n }\\n}\\n\",\"keccak256\":\"0xacb5347ee1a0e8dc25a1ce3e6fbb427db646e833ff8508909454cad7950418d4\",\"license\":\"MIT\"},\"contracts/periphery/utils/interfaces/IAvailableRootsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title IAvailableRootsRegistry\\n * @author Sismo\\n * @notice Interface for (Merkle) Roots Registry\\n */\\ninterface IAvailableRootsRegistry {\\n event RegisteredRootForAttester(address attester, uint256 root);\\n event RegisteredRootForAll(uint256 root);\\n event UnregisteredRootForAttester(address attester, uint256 root);\\n event UnregisteredRootForAll(uint256 root);\\n\\n error CannotRegisterForZeroAddress();\\n error CannotUnregisterForZeroAddress();\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n */\\n function initialize(address owner) external;\\n\\n /**\\n * @dev Register a root available for an attester\\n * @param attester Attester which will have the root available\\n * @param root Root to register\\n */\\n function registerRootForAttester(address attester, uint256 root) external;\\n\\n /**\\n * @dev Unregister a root for an attester\\n * @param attester Attester which will no longer have the root available\\n * @param root Root to unregister\\n */\\n function unregisterRootForAttester(address attester, uint256 root) external;\\n\\n /**\\n * @dev Registers a root, available for all contracts\\n * @param root Root to register\\n */\\n function registerRootForAll(uint256 root) external;\\n\\n /**\\n * @dev Unregister a root, available for all contracts\\n * @param root Root to unregister\\n */\\n function unregisterRootForAll(uint256 root) external;\\n\\n /**\\n * @dev returns whether a root is available for a caller (msg.sender)\\n * @param root root to check whether it is registered for me or not\\n */\\n function isRootAvailableForMe(uint256 root) external view returns (bool);\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param attester Owner of the contract, can update public key and address\\n * @param root Owner of the contract, can update public key and address\\n */\\n function isRootAvailableForAttester(address attester, uint256 root) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x87f5035b58936a8458a22f3cf1b3865bd798813310d86af41af74680978c97c8\",\"license\":\"MIT\"},\"contracts/periphery/utils/interfaces/ICommitmentMapperRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\ninterface ICommitmentMapperRegistry {\\n event UpdatedCommitmentMapperEdDSAPubKey(uint256[2] newEdDSAPubKey);\\n event UpdatedCommitmentMapperAddress(address newAddress);\\n error PubKeyNotValid(uint256[2] pubKey);\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n function initialize(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) external;\\n\\n /**\\n * @dev Updates the EdDSA public key\\n * @param newEdDSAPubKey new EdDSA pubic key\\n */\\n function updateCommitmentMapperEdDSAPubKey(uint256[2] memory newEdDSAPubKey) external;\\n\\n /**\\n * @dev Updates the address\\n * @param newAddress new address\\n */\\n function updateCommitmentMapperAddress(address newAddress) external;\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getEdDSAPubKey() external view returns (uint256[2] memory);\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getAddress() external view returns (address);\\n}\\n\",\"keccak256\":\"0x8d6298b442dde99ee5a9cc989ada6ea808383a08b1e9bb1d4c2b58adc01eec69\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101406040523480156200001257600080fd5b5060405162001d9438038062001d94833981016040819052620000359162000081565b6001600160a01b0394851660805292841660c05290831660a0529190921660e0526101005261012052620000f0565b80516001600160a01b03811681146200007c57600080fd5b919050565b60008060008060008060c087890312156200009b57600080fd5b620000a68762000064565b9550620000b66020880162000064565b9450620000c66040880162000064565b9350620000d66060880162000064565b92506080870151915060a087015190509295509295509295565b60805160a05160c05160e0516101005161012051611c1e620001766000396000818161015501526102fe01526000818161010d01526102d60152600081816101bf015281816103ee0152818161056501526106820152600081816101790152610b2d01526000818160a50152610bc901526000818160e40152610d2a0152611c1e6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063918447af11610066578063918447af14610177578063af411a301461019d578063bfa66585146101bd578063c776adde146101e3578063e60f999f146101f657600080fd5b80632254f98e146100a357806346657fe9146100e257806354846d7a1461010857806363e4afc21461013d5780637000b05114610150575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b61012f7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100d9565b6100c561014b36600461117d565b610209565b61012f7f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b6101b06101ab3660046111df565b610228565b6040516100d9919061130b565b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b6101b06101f1366004611392565b6103d8565b6101b06102043660046111df565b610644565b6000818152600160205260408120546001600160a01b03165b92915050565b6060600061023d610238866114f5565b610760565b60408051600180825281830190925291925060009190816020015b6102a96040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b8152602001906001900390816102585750506060830151519091506000906102fa906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611685565b90507f000000000000000000000000000000000000000000000000000000000000000081111561034557604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b031681526020018560200151815260200185606001516020015163ffffffff16815260200160405180602001604052806000815250815250836000815181106103c1576103c161169d565b602090810291909101015250909695505050505050565b60608060005b86811015610542576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78d8d8881811061042d5761042d61169d565b905060200201358c6040518363ffffffff1660e01b81526004016104649291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610481573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104a991908101906116c7565b93509350935093506040518060c001604052808d8d888181106104ce576104ce61169d565b9050602002013581526020018b6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff168152602001828152508686815181106105205761052061169d565b602002602001018190525050505050808061053a90611777565b9150506103de565b5061054e8185856107e5565b6040516373e4ca1b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e7c994369061059a90849060040161130b565b600060405180830381600087803b1580156105b457600080fd5b505af11580156105c8573d6000803e3d6000fd5b5050505060005b86811015610639577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061060a5761060a61169d565b602002602001015160405161061f9190611790565b60405180910390a18061063181611777565b9150506105cf565b509695505050505050565b60606106518484846107fe565b600061065e858585610228565b905061066b858585610846565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906106b790849060040161130b565b600060405180830381600087803b1580156106d157600080fd5b505af11580156106e5573d6000803e3d6000fd5b5050505060005b8151811015610757577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc8282815181106107285761072861169d565b602002602001015160405161073d9190611790565b60405180910390a18061074f81611777565b9150506106ec565b50949350505050565b6107686110a9565b600082600001516000815181106107815761078161169d565b60200260200101519050610794816108e1565b600081604001518060200190518101906107ae91906117b3565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b600061080c828401846118e4565b9050600061081982610925565b90506000610829610238876114f5565b905061083581836109cf565b61083e83610d00565b505050505050565b60006108528383610e99565b6000818152600160205260409020549091506001600160a01b0316801580159061089d575061088760408601602087016119b5565b6001600160a01b0316816001600160a01b031614155b156108be57604051631f5d53e360e01b81526004810183905260240161033c565b6108d7826108d260408801602089016119b5565b610ebe565b5050505050565b50565b60006108f08260400151610f24565b825190915081146109215781516040516337e3d1ab60e01b815261033c918391600401918252602082015260400190565b5050565b61092d61110c565b60405180610120016040528061094284610f59565b6001600160a01b0316815260200161095984610f6e565b815260200161096784610f7d565b815260200161097584610f8c565b815260200161098384610f9b565b815260200161099184610faa565b815260200161099f84610fb9565b81526020016109b78460200151610120015160011490565b151581526020016109c784610fc8565b905292915050565b815160c082015114610a0457815160c082015160405163fe405c7760e01b81526004810192909252602482015260440161033c565b81606001516040015115158160e00151151503610a4f57606082015160409081015160e08301519151634629f1b560e11b81529015156004820152901515602482015260440161033c565b81604001516001600160a01b031681600001516001600160a01b031614610aa357604082810151825191516370a8d99b60e11b81526001600160a01b0391821660048201529116602482015260440161033c565b46816020015114610ad6576020810151604051630432cec160e31b8152466004820152602481019190915260440161033c565b81602001518160a0015114610b1157602082015160a0820151604051630626ade360e41b81526004810192909252602482015260440161033c565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015610b7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba091906119d2565b610bc557806040015160405163cbfe7bc360e01b815260040161033c91815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4891906119ed565b805161010084015151919250141580610c6f57506020808201516101008401519091015114155b15610cb9578051602080830151610100850151805192015160405163318d812b60e01b8152600481019490945260248401919091526044830191909152606482015260840161033c565b6000610cc484611020565b905080836060015114610cfa5760608301516040516377bb6d2760e11b815261033c918391600401918252602082015260400190565b50505050565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f694610d6394909392909190600401611a69565b602060405180830381865afa925050508015610d9c575060408051601f3d908101601f19168201909252610d99918101906119d2565b60015b610e7257610da8611aed565b806308c379a003610de15750610dbc611b09565b80610dc75750610e20565b8060405162dd577760e81b815260040161033c9190611b93565b634e487b7103610e2057610df3611ba6565b90610dfe5750610e20565b60405162dd577760e81b8152602060048201526000602482015260440161033c565b3d808015610e4a576040519150601f19603f3d011682016040523d82523d6000602084013e610e4f565b606091505b5060405162dd577760e81b8152602060048201526000602482015260440161033c565b806109215760405162dd577760e81b8152602060048201526000602482015260440161033c565b600080610ea8838501856118e4565b90506000610eb582610f9b565b95945050505050565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b80516020820120600090610222907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190611bc6565b6020810151600090815b602002015192915050565b60208101516000906001610f63565b60208101516000906004610f63565b60208101516000906005610f63565b60208101516000906006610f63565b60208101516000906007610f63565b60208101516000906008610f63565b610fd061115f565b604051806040016040528083602001516002600a8110610ff257610ff261169d565b6020020151815260200183602001516003600a81106110135761101361169d565b6020020151905292915050565b60008061103e308460600151600001516001600160801b0316611045565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c61103e9190611bc6565b6040518060800160405280600081526020016000815260200160006001600160a01b03168152602001611107604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b905290565b60405180610120016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016111075b60405180604001604052806002906020820280368337509192915050565b60006020828403121561118f57600080fd5b5035919050565b60008083601f8401126111a857600080fd5b50813567ffffffffffffffff8111156111c057600080fd5b6020830191508360208285010111156111d857600080fd5b9250929050565b6000806000604084860312156111f457600080fd5b833567ffffffffffffffff8082111561120c57600080fd5b908501906040828803121561122057600080fd5b9093506020850135908082111561123657600080fd5b5061124386828701611196565b9497909650939450505050565b60005b8381101561126b578181015183820152602001611253565b83811115610cfa5750506000910152565b60008151808452611294816020860160208601611250565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261130360c085018261127c565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561136057603f1988860301845261134e8583516112a8565b94509285019290850190600101611332565b5092979650505050505050565b6001600160a01b03811681146108de57600080fd5b803561138d8161136d565b919050565b6000806000806000606086880312156113aa57600080fd5b853567ffffffffffffffff808211156113c257600080fd5b818801915088601f8301126113d657600080fd5b8135818111156113e557600080fd5b8960208260051b85010111156113fa57600080fd5b6020830197508096505061141060208901611382565b9450604088013591508082111561142657600080fd5b5061143388828901611196565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b6040810181811067ffffffffffffffff8211171561147a5761147a611444565b60405250565b6060810181811067ffffffffffffffff8211171561147a5761147a611444565b601f8201601f1916810167ffffffffffffffff811182821017156114c6576114c6611444565b6040525050565b600067ffffffffffffffff8211156114e7576114e7611444565b50601f01601f191660200190565b6000604080833603121561150857600080fd5b80516115138161145a565b833567ffffffffffffffff8082111561152b57600080fd5b9085019036601f83011261153e57600080fd5b813560208282111561155257611552611444565b8160051b8651611564838301826114a0565b9283528481018201928281013685111561157d57600080fd5b83870192505b848310156116515782358681111561159b5760008081fd5b8701606036829003601f19018113156115b45760008081fd5b8a516115bf81611480565b8287013581528b830135818801529082013590888211156115e05760008081fd5b9181019136603f8401126115f657600091508182fd5b868301359150611605826114cd565b8c5161161182826114a0565b838152368e85870101111561162857600091508182fd5b838e86018a830137600093810189019390935250808c0191909152825250918301918301611583565b50865250611660888201611382565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b600082198211156116985761169861166f565b500190565b634e487b7160e01b600052603260045260246000fd5b805163ffffffff8116811461138d57600080fd5b600080600080608085870312156116dd57600080fd5b84516116e88161136d565b602086015190945092506116fe604086016116b3565b9150606085015167ffffffffffffffff81111561171a57600080fd5b8501601f8101871361172b57600080fd5b8051611736816114cd565b60405161174382826114a0565b82815289602084860101111561175857600080fd5b611769836020830160208701611250565b969995985093965050505050565b6000600182016117895761178961166f565b5060010190565b60208152600061103e60208301846112a8565b8051801515811461138d57600080fd5b6000606082840312156117c557600080fd5b6040516060810181811067ffffffffffffffff821117156117e8576117e8611444565b60405282516001600160801b038116811461180257600080fd5b8152611810602084016116b3565b6020820152611821604084016117a3565b60408201529392505050565b600082601f83011261183e57600080fd5b60405161184a8161145a565b80604084018581111561185c57600080fd5b845b8181101561187657803583526020928301920161185e565b509195945050505050565b600082601f83011261189257600080fd5b60405161014080820182811067ffffffffffffffff821117156118b7576118b7611444565b604052830181858211156118ca57600080fd5b845b828110156118765780358252602091820191016118cc565b60008183036102408112156118f857600080fd5b604080516119058161145a565b6101008084121561191557600080fd5b8251935061192284611480565b61192c878761182d565b845286605f87011261193d57600080fd5b82516119488161145a565b8060c088018981111561195a57600080fd5b8589015b8181101561197f576119708b8261182d565b8352602090920191860161195e565b508260208801526119908a8261182d565b868801525050508382526119a687828801611881565b60208301525095945050505050565b6000602082840312156119c757600080fd5b813561103e8161136d565b6000602082840312156119e457600080fd5b61103e826117a3565b6000604082840312156119ff57600080fd5b82601f830112611a0e57600080fd5b604051611a1a8161145a565b806040840185811115611a2c57600080fd5b845b81811015611876578051835260209283019201611a2e565b8060005b6002811015610cfa578151845260209384019390910190600101611a4a565b6102408101611a788287611a46565b60408083018660005b6002811015611aa857611a95838351611a46565b9183019160209190910190600101611a81565b50505050611ab960c0830185611a46565b61010082018360005b600a811015611ae1578151835260209283019290910190600101611ac2565b50505095945050505050565b600060033d1115611b065760046000803e5060005160e01c5b90565b600060443d1015611b175790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611b4757505050505090565b8285019150815181811115611b5f5750505050505090565b843d8701016020828501011115611b795750505050505090565b611b88602082860101876114a0565b509095945050505050565b60208152600061103e602083018461127c565b60008060233d1115611bc2576020600460003e50506000516001905b9091565b600082611be357634e487b7160e01b600052601260045260246000fd5b50069056fea26469706673582212200880771dc9a12d1ab8ee0aef209d3ee36ccccf3e7ad67d67ca8565a13c73569a64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063918447af11610066578063918447af14610177578063af411a301461019d578063bfa66585146101bd578063c776adde146101e3578063e60f999f146101f657600080fd5b80632254f98e146100a357806346657fe9146100e257806354846d7a1461010857806363e4afc21461013d5780637000b05114610150575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b61012f7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100d9565b6100c561014b36600461117d565b610209565b61012f7f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b6101b06101ab3660046111df565b610228565b6040516100d9919061130b565b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b6101b06101f1366004611392565b6103d8565b6101b06102043660046111df565b610644565b6000818152600160205260408120546001600160a01b03165b92915050565b6060600061023d610238866114f5565b610760565b60408051600180825281830190925291925060009190816020015b6102a96040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b8152602001906001900390816102585750506060830151519091506000906102fa906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611685565b90507f000000000000000000000000000000000000000000000000000000000000000081111561034557604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b031681526020018560200151815260200185606001516020015163ffffffff16815260200160405180602001604052806000815250815250836000815181106103c1576103c161169d565b602090810291909101015250909695505050505050565b60608060005b86811015610542576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78d8d8881811061042d5761042d61169d565b905060200201358c6040518363ffffffff1660e01b81526004016104649291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610481573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104a991908101906116c7565b93509350935093506040518060c001604052808d8d888181106104ce576104ce61169d565b9050602002013581526020018b6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff168152602001828152508686815181106105205761052061169d565b602002602001018190525050505050808061053a90611777565b9150506103de565b5061054e8185856107e5565b6040516373e4ca1b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e7c994369061059a90849060040161130b565b600060405180830381600087803b1580156105b457600080fd5b505af11580156105c8573d6000803e3d6000fd5b5050505060005b86811015610639577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061060a5761060a61169d565b602002602001015160405161061f9190611790565b60405180910390a18061063181611777565b9150506105cf565b509695505050505050565b60606106518484846107fe565b600061065e858585610228565b905061066b858585610846565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906106b790849060040161130b565b600060405180830381600087803b1580156106d157600080fd5b505af11580156106e5573d6000803e3d6000fd5b5050505060005b8151811015610757577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc8282815181106107285761072861169d565b602002602001015160405161073d9190611790565b60405180910390a18061074f81611777565b9150506106ec565b50949350505050565b6107686110a9565b600082600001516000815181106107815761078161169d565b60200260200101519050610794816108e1565b600081604001518060200190518101906107ae91906117b3565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b600061080c828401846118e4565b9050600061081982610925565b90506000610829610238876114f5565b905061083581836109cf565b61083e83610d00565b505050505050565b60006108528383610e99565b6000818152600160205260409020549091506001600160a01b0316801580159061089d575061088760408601602087016119b5565b6001600160a01b0316816001600160a01b031614155b156108be57604051631f5d53e360e01b81526004810183905260240161033c565b6108d7826108d260408801602089016119b5565b610ebe565b5050505050565b50565b60006108f08260400151610f24565b825190915081146109215781516040516337e3d1ab60e01b815261033c918391600401918252602082015260400190565b5050565b61092d61110c565b60405180610120016040528061094284610f59565b6001600160a01b0316815260200161095984610f6e565b815260200161096784610f7d565b815260200161097584610f8c565b815260200161098384610f9b565b815260200161099184610faa565b815260200161099f84610fb9565b81526020016109b78460200151610120015160011490565b151581526020016109c784610fc8565b905292915050565b815160c082015114610a0457815160c082015160405163fe405c7760e01b81526004810192909252602482015260440161033c565b81606001516040015115158160e00151151503610a4f57606082015160409081015160e08301519151634629f1b560e11b81529015156004820152901515602482015260440161033c565b81604001516001600160a01b031681600001516001600160a01b031614610aa357604082810151825191516370a8d99b60e11b81526001600160a01b0391821660048201529116602482015260440161033c565b46816020015114610ad6576020810151604051630432cec160e31b8152466004820152602481019190915260440161033c565b81602001518160a0015114610b1157602082015160a0820151604051630626ade360e41b81526004810192909252602482015260440161033c565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015610b7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba091906119d2565b610bc557806040015160405163cbfe7bc360e01b815260040161033c91815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa158015610c24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4891906119ed565b805161010084015151919250141580610c6f57506020808201516101008401519091015114155b15610cb9578051602080830151610100850151805192015160405163318d812b60e01b8152600481019490945260248401919091526044830191909152606482015260840161033c565b6000610cc484611020565b905080836060015114610cfa5760608301516040516377bb6d2760e11b815261033c918391600401918252602082015260400190565b50505050565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f694610d6394909392909190600401611a69565b602060405180830381865afa925050508015610d9c575060408051601f3d908101601f19168201909252610d99918101906119d2565b60015b610e7257610da8611aed565b806308c379a003610de15750610dbc611b09565b80610dc75750610e20565b8060405162dd577760e81b815260040161033c9190611b93565b634e487b7103610e2057610df3611ba6565b90610dfe5750610e20565b60405162dd577760e81b8152602060048201526000602482015260440161033c565b3d808015610e4a576040519150601f19603f3d011682016040523d82523d6000602084013e610e4f565b606091505b5060405162dd577760e81b8152602060048201526000602482015260440161033c565b806109215760405162dd577760e81b8152602060048201526000602482015260440161033c565b600080610ea8838501856118e4565b90506000610eb582610f9b565b95945050505050565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b80516020820120600090610222907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190611bc6565b6020810151600090815b602002015192915050565b60208101516000906001610f63565b60208101516000906004610f63565b60208101516000906005610f63565b60208101516000906006610f63565b60208101516000906007610f63565b60208101516000906008610f63565b610fd061115f565b604051806040016040528083602001516002600a8110610ff257610ff261169d565b6020020151815260200183602001516003600a81106110135761101361169d565b6020020151905292915050565b60008061103e308460600151600001516001600160801b0316611045565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c61103e9190611bc6565b6040518060800160405280600081526020016000815260200160006001600160a01b03168152602001611107604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b905290565b60405180610120016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016111075b60405180604001604052806002906020820280368337509192915050565b60006020828403121561118f57600080fd5b5035919050565b60008083601f8401126111a857600080fd5b50813567ffffffffffffffff8111156111c057600080fd5b6020830191508360208285010111156111d857600080fd5b9250929050565b6000806000604084860312156111f457600080fd5b833567ffffffffffffffff8082111561120c57600080fd5b908501906040828803121561122057600080fd5b9093506020850135908082111561123657600080fd5b5061124386828701611196565b9497909650939450505050565b60005b8381101561126b578181015183820152602001611253565b83811115610cfa5750506000910152565b60008151808452611294816020860160208601611250565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261130360c085018261127c565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561136057603f1988860301845261134e8583516112a8565b94509285019290850190600101611332565b5092979650505050505050565b6001600160a01b03811681146108de57600080fd5b803561138d8161136d565b919050565b6000806000806000606086880312156113aa57600080fd5b853567ffffffffffffffff808211156113c257600080fd5b818801915088601f8301126113d657600080fd5b8135818111156113e557600080fd5b8960208260051b85010111156113fa57600080fd5b6020830197508096505061141060208901611382565b9450604088013591508082111561142657600080fd5b5061143388828901611196565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b6040810181811067ffffffffffffffff8211171561147a5761147a611444565b60405250565b6060810181811067ffffffffffffffff8211171561147a5761147a611444565b601f8201601f1916810167ffffffffffffffff811182821017156114c6576114c6611444565b6040525050565b600067ffffffffffffffff8211156114e7576114e7611444565b50601f01601f191660200190565b6000604080833603121561150857600080fd5b80516115138161145a565b833567ffffffffffffffff8082111561152b57600080fd5b9085019036601f83011261153e57600080fd5b813560208282111561155257611552611444565b8160051b8651611564838301826114a0565b9283528481018201928281013685111561157d57600080fd5b83870192505b848310156116515782358681111561159b5760008081fd5b8701606036829003601f19018113156115b45760008081fd5b8a516115bf81611480565b8287013581528b830135818801529082013590888211156115e05760008081fd5b9181019136603f8401126115f657600091508182fd5b868301359150611605826114cd565b8c5161161182826114a0565b838152368e85870101111561162857600091508182fd5b838e86018a830137600093810189019390935250808c0191909152825250918301918301611583565b50865250611660888201611382565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b600082198211156116985761169861166f565b500190565b634e487b7160e01b600052603260045260246000fd5b805163ffffffff8116811461138d57600080fd5b600080600080608085870312156116dd57600080fd5b84516116e88161136d565b602086015190945092506116fe604086016116b3565b9150606085015167ffffffffffffffff81111561171a57600080fd5b8501601f8101871361172b57600080fd5b8051611736816114cd565b60405161174382826114a0565b82815289602084860101111561175857600080fd5b611769836020830160208701611250565b969995985093965050505050565b6000600182016117895761178961166f565b5060010190565b60208152600061103e60208301846112a8565b8051801515811461138d57600080fd5b6000606082840312156117c557600080fd5b6040516060810181811067ffffffffffffffff821117156117e8576117e8611444565b60405282516001600160801b038116811461180257600080fd5b8152611810602084016116b3565b6020820152611821604084016117a3565b60408201529392505050565b600082601f83011261183e57600080fd5b60405161184a8161145a565b80604084018581111561185c57600080fd5b845b8181101561187657803583526020928301920161185e565b509195945050505050565b600082601f83011261189257600080fd5b60405161014080820182811067ffffffffffffffff821117156118b7576118b7611444565b604052830181858211156118ca57600080fd5b845b828110156118765780358252602091820191016118cc565b60008183036102408112156118f857600080fd5b604080516119058161145a565b6101008084121561191557600080fd5b8251935061192284611480565b61192c878761182d565b845286605f87011261193d57600080fd5b82516119488161145a565b8060c088018981111561195a57600080fd5b8589015b8181101561197f576119708b8261182d565b8352602090920191860161195e565b508260208801526119908a8261182d565b868801525050508382526119a687828801611881565b60208301525095945050505050565b6000602082840312156119c757600080fd5b813561103e8161136d565b6000602082840312156119e457600080fd5b61103e826117a3565b6000604082840312156119ff57600080fd5b82601f830112611a0e57600080fd5b604051611a1a8161145a565b806040840185811115611a2c57600080fd5b845b81811015611876578051835260209283019201611a2e565b8060005b6002811015610cfa578151845260209384019390910190600101611a4a565b6102408101611a788287611a46565b60408083018660005b6002811015611aa857611a95838351611a46565b9183019160209190910190600101611a81565b50505050611ab960c0830185611a46565b61010082018360005b600a811015611ae1578151835260209283019290910190600101611ac2565b50505095945050505050565b600060033d1115611b065760046000803e5060005160e01c5b90565b600060443d1015611b175790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611b4757505050505090565b8285019150815181811115611b5f5750505050505090565b843d8701016020828501011115611b795750505050505090565b611b88602082860101876114a0565b509095945050505050565b60208152600061103e602083018461127c565b60008060233d1115611bc2576020600460003e50506000516001905b9091565b600082611be357634e487b7160e01b600052601260045260246000fd5b50069056fea26469706673582212200880771dc9a12d1ab8ee0aef209d3ee36ccccf3e7ad67d67ca8565a13c73569a64736f6c634300080e0033", + "devdoc": { + "author": "Sismo", + "kind": "dev", + "methods": { + "buildAttestations(((uint256,uint256,bytes)[],address),bytes)": { + "details": "Returns attestations that will be recorded, constructed from the user request", + "params": { + "request": "users request. Claim of having an account part of a group of accounts" + } + }, + "constructor": { + "details": "Constructor. Initializes the contract", + "params": { + "attestationsRegistryAddress": "Attestations Registry contract on which the attester will write attestations", + "availableRootsRegistryAddress": "Registry storing the available groups for this attester (e.g roots of registry merkle trees)", + "collectionIdFirst": "Id of the first collection in which the attester is supposed to record", + "collectionIdLast": "Id of the last collection in which the attester is supposed to record", + "commitmentMapperAddress": "commitment mapper's public key registry", + "hydraS1VerifierAddress": "ZK Snark Hydra-S1 Verifier contract" + } + }, + "deleteAttestations(uint256[],address,bytes)": { + "details": "External facing function. Allows to delete attestations by submitting proof", + "params": { + "attestationsOwner": "Owner of attestations to delete", + "collectionIds": "Collection identifier of attestations to delete", + "proofData": "Data sent along the deletion request to prove its validity" + }, + "returns": { + "_0": "attestations Attestations that were deleted" + } + }, + "generateAttestations(((uint256,uint256,bytes)[],address),bytes)": { + "details": "Main external function. Allows to generate attestations by making a request and submitting proof", + "params": { + "proofData": "Data sent along the request to prove its validity", + "request": "User request" + }, + "returns": { + "_0": "attestations Attestations that has been recorded" + } + }, + "getAttestationRegistry()": { + "details": "Attestation registry getter", + "returns": { + "_0": "attestationRegistry" + } + }, + "getAvailableRootsRegistry()": { + "details": "Getter of Roots Registry Contract" + }, + "getCommitmentMapperRegistry()": { + "details": "Getter of Commitment Mapper Registry contract" + }, + "getDestinationOfTicket(uint256)": { + "details": "Getter, returns the last attestation destination of a ticket", + "params": { + "userTicket": "ticket used*" + } + }, + "getVerifier()": { + "details": "Getter of Hydra-S1 Verifier contract" + } + }, + "stateVariables": { + "AUTHORIZED_COLLECTION_ID_FIRST": { + "details": "Getter returns of the first collection in which the attester is supposed to record*" + }, + "AUTHORIZED_COLLECTION_ID_LAST": { + "details": "Getter returns of the last collection in which the attester is supposed to record*" + } + }, + "title": "Hydra-S1 Simple Attester", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "This attester is part of the family of the Hydra-S1 Attesters. Hydra-S1 attesters enable users to prove they have an account in a group in a privacy preserving way. The Hydra-S1 Base abstract contract is inherited and holds the complex Hydra S1 verification logic. We invite readers to refer to: - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1 This specific attester has the following characteristics: - Zero Knowledge One cannot deduct from an attestation what source account was used to generate the underlying proof - Non Strict (scores) If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100. This attester generate attestations of scores - Ticketed Each source account gets one userTicket per claim (i.e only one attestation per source account per claim) For people used to semaphore/ tornado cash people: userTicket = hash(sourceSecret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier) - Renewable A userTicket can actually be reused as long as the destination of the attestation remains the same It enables users to renew their attestations*", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 936, + "contract": "contracts/attesters/hydra-s1/HydraS1SimpleAttester.sol:HydraS1SimpleAttester", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 939, + "contract": "contracts/attesters/hydra-s1/HydraS1SimpleAttester.sol:HydraS1SimpleAttester", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6335, + "contract": "contracts/attesters/hydra-s1/HydraS1SimpleAttester.sol:HydraS1SimpleAttester", + "label": "_ticketsDestinations", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_uint256,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/HydraS1SimpleAttesterProxy.json b/deployments/mumbai/HydraS1SimpleAttesterProxy.json new file mode 100644 index 0000000..317b0ff --- /dev/null +++ b/deployments/mumbai/HydraS1SimpleAttesterProxy.json @@ -0,0 +1,250 @@ +{ + "address": "0x069e6B99f4DA543156f66274FC6673442803C587", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x8361e4b28ebf0181523dd5bcdfed2dd5fbc9aaddc9763d0065836eaee5ee1ab4", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x069e6B99f4DA543156f66274FC6673442803C587", + "transactionIndex": 22, + "gasUsed": "583384", + "logsBloom": "0x00000000800000020000000000000000400000000000000000000000000000000000000000000000000000000000000000008000000000001000000000008000000000200000000000000000000002800000000000000000000100000000000000000000000000000000000000000000000000800000000080000000000000000000000000000000000000000000000000000010000000000000000000808000200000000000000020000000000000100001000000000000000000000000004000000020000000000001000000000000800000000400000000100000000000000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0x3ef78fff68557ef1e1dc4e5bd7a782bca77d5adc0d648b97c4a46c05b4cd899e", + "transactionHash": "0x8361e4b28ebf0181523dd5bcdfed2dd5fbc9aaddc9763d0065836eaee5ee1ab4", + "logs": [ + { + "transactionIndex": 22, + "blockNumber": 28600032, + "transactionHash": "0x8361e4b28ebf0181523dd5bcdfed2dd5fbc9aaddc9763d0065836eaee5ee1ab4", + "address": "0x069e6B99f4DA543156f66274FC6673442803C587", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000001e03e088d1af616280bf7e34ecaea3d85ac7fbd7" + ], + "data": "0x", + "logIndex": 118, + "blockHash": "0x3ef78fff68557ef1e1dc4e5bd7a782bca77d5adc0d648b97c4a46c05b4cd899e" + }, + { + "transactionIndex": 22, + "blockNumber": 28600032, + "transactionHash": "0x8361e4b28ebf0181523dd5bcdfed2dd5fbc9aaddc9763d0065836eaee5ee1ab4", + "address": "0x069e6B99f4DA543156f66274FC6673442803C587", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000246e71bc2a257f4be9c7fad4664e6d7444844adc", + "logIndex": 119, + "blockHash": "0x3ef78fff68557ef1e1dc4e5bd7a782bca77d5adc0d648b97c4a46c05b4cd899e" + }, + { + "transactionIndex": 22, + "blockNumber": 28600032, + "transactionHash": "0x8361e4b28ebf0181523dd5bcdfed2dd5fbc9aaddc9763d0065836eaee5ee1ab4", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000000070f6a792ac6a80000000000000000000000000000000000000000000000008318046d6c8fc7ac00000000000000000000000000000000000000000000167a2eca6bf47bd1f4e10000000000000000000000000000000000000000000000008310f502f365010400000000000000000000000000000000000000000000167a2ed17b5ef4fcbb89", + "logIndex": 120, + "blockHash": "0x3ef78fff68557ef1e1dc4e5bd7a782bca77d5adc0d648b97c4a46c05b4cd899e" + } + ], + "blockNumber": 28600032, + "cumulativeGasUsed": "4574926", + "status": 1, + "byzantium": true + }, + "args": [ + "0x1E03E088D1AF616280bf7E34EcaEa3D85ac7Fbd7", + "0x246E71bC2a257f4BE9C7fAD4664E6D7444844Adc", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/periphery/utils/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0x0edeb16b9821ae2b16e9d69c383b38d3ad2fbb3e0c06cf809a0786d96e602551\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"contracts/periphery/utils/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n// Note: we just copied so that we can see the contract used\\npragma solidity ^0.8.14;\\n\\nimport {ERC1967Proxy} from '@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol';\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1));\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(''), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n ifAdmin\\n {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(\\n msg.sender != _getAdmin(),\\n 'TransparentUpgradeableProxy: admin cannot fallback to proxy target'\\n );\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0x0d943fb8814617343a244f762e791c664bb647e32d484ba94fe1958bac85f6dc\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000f2a38038062000f2a833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b60008051602062000ee3833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b60008051602062000ec383398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b6200022e1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e9838360405180606001604052806027815260200162000f036027913962000381565b9392505050565b60006200021a60008051602062000ec383398151915260001b6200046760201b620001ea1760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd60008051602062000ec383398151915260001b6200046760201b620001ea1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200025a1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd60008051602062000ee383398151915260001b6200046760201b620001ea1760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b61082b80620006986000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b5565b610118565b61005b6100933660046106d0565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b5565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107cf602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6104bb565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610368836104e3565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610523565b60606001600160a01b0384163b6104465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016102f5565b600080856001600160a01b031685604051610461919061077f565b600060405180830381855af49150503d806000811461049c576040519150601f19603f3d011682016040523d82523d6000602084013e6104a1565b606091505b50915091506104b18282866105cc565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b6104ec81610605565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105885760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105db575081610253565b8251156105eb5782518084602001fd5b8160405162461bcd60e51b81526004016102f5919061079b565b6001600160a01b0381163b6106725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105ab565b80356001600160a01b03811681146106b057600080fd5b919050565b6000602082840312156106c757600080fd5b61025382610699565b6000806000604084860312156106e557600080fd5b6106ee84610699565b9250602084013567ffffffffffffffff8082111561070b57600080fd5b818601915086601f83011261071f57600080fd5b81358181111561072e57600080fd5b87602082850101111561074057600080fd5b6020830194508093505050509250925092565b60005b8381101561076e578181015183820152602001610756565b838111156103845750506000910152565b60008251610791818460208701610753565b9190910192915050565b60208152600082518060208401526107ba816040850160208701610753565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200396e81b41a53c52a5f2bff0f6a830a500e30d67dcfc4c47e029fb4021c6775064736f6c634300080e0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b5565b610118565b61005b6100933660046106d0565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b5565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107cf602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6104bb565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610368836104e3565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610523565b60606001600160a01b0384163b6104465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016102f5565b600080856001600160a01b031685604051610461919061077f565b600060405180830381855af49150503d806000811461049c576040519150601f19603f3d011682016040523d82523d6000602084013e6104a1565b606091505b50915091506104b18282866105cc565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b6104ec81610605565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105885760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105db575081610253565b8251156105eb5782518084602001fd5b8160405162461bcd60e51b81526004016102f5919061079b565b6001600160a01b0381163b6106725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105ab565b80356001600160a01b03811681146106b057600080fd5b919050565b6000602082840312156106c757600080fd5b61025382610699565b6000806000604084860312156106e557600080fd5b6106ee84610699565b9250602084013567ffffffffffffffff8082111561070b57600080fd5b818601915086601f83011261071f57600080fd5b81358181111561072e57600080fd5b87602082850101111561074057600080fd5b6020830194508093505050509250925092565b60005b8381101561076e578181015183820152602001610756565b838111156103845750506000910152565b60008251610791818460208701610753565b9190910192915050565b60208152600082518060208401526107ba816040850160208701610753565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200396e81b41a53c52a5f2bff0f6a830a500e30d67dcfc4c47e029fb4021c6775064736f6c634300080e0033", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/HydraS1SoulboundAttester.json b/deployments/mumbai/HydraS1SoulboundAttester.json new file mode 100644 index 0000000..aede697 --- /dev/null +++ b/deployments/mumbai/HydraS1SoulboundAttester.json @@ -0,0 +1,1019 @@ +{ + "address": "0x76D8Ed0e34555dEF84c2bfff9be85446e8E9fa2A", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "attestationsRegistryAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "hydraS1VerifierAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "availableRootsRegistryAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "commitmentMapperAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "collectionIdFirst", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collectionIdLast", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "soulboundCooldownDuration", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedAccountsTreeValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputAccountsTreeValue", + "type": "uint256" + } + ], + "name": "AccountsTreeValueMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "AttestationDeletionNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "ChainIdMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "claimLength", + "type": "uint256" + } + ], + "name": "ClaimsLengthDifferentThanOne", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + } + ], + "name": "CollectionIdOutOfBound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedX", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedY", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputX", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputY", + "type": "uint256" + } + ], + "name": "CommitmentMapperPubKeyMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expectedDestination", + "type": "address" + }, + { + "internalType": "address", + "name": "inputDestination", + "type": "address" + } + ], + "name": "DestinationMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedGroupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + } + ], + "name": "GroupIdAndPropertiesMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "InvalidGroth16Proof", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "expectedStrictness", + "type": "bool" + }, + { + "internalType": "bool", + "name": "strictNess", + "type": "bool" + } + ], + "name": "IsStrictMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "ticket", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "NotAttestationOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "inputRoot", + "type": "uint256" + } + ], + "name": "RegistryRootMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "ticketData", + "type": "uint256" + } + ], + "name": "TicketFrozen", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedTicketIdentifier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ticketIdentifier", + "type": "uint256" + } + ], + "name": "TicketIdentifierMismatch", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "internalType": "uint32", + "name": "cooldownStart", + "type": "uint32" + } + ], + "internalType": "struct IHydraS1SoulboundAttester.TicketData", + "name": "ticketData", + "type": "tuple" + } + ], + "name": "TicketUsedAndOnCooldown", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputValue", + "type": "uint256" + } + ], + "name": "ValueMismatch", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct Attestation", + "name": "attestation", + "type": "tuple" + } + ], + "name": "AttestationDeleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct Attestation", + "name": "attestation", + "type": "tuple" + } + ], + "name": "AttestationGenerated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "ticket", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "TicketDestinationUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "ticket", + "type": "uint256" + } + ], + "name": "TicketSetOnCooldown", + "type": "event" + }, + { + "inputs": [], + "name": "AUTHORIZED_COLLECTION_ID_FIRST", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "AUTHORIZED_COLLECTION_ID_LAST", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SOULBOUND_COOLDOWN_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "buildAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "collectionIds", + "type": "uint256[]" + }, + { + "internalType": "address", + "name": "attestationsOwner", + "type": "address" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "deleteAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "generateAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAttestationRegistry", + "outputs": [ + { + "internalType": "contract IAttestationsRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAvailableRootsRegistry", + "outputs": [ + { + "internalType": "contract IAvailableRootsRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCommitmentMapperRegistry", + "outputs": [ + { + "internalType": "contract ICommitmentMapperRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "userTicket", + "type": "uint256" + } + ], + "name": "getDestinationOfTicket", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "userTicket", + "type": "uint256" + } + ], + "name": "getTicketData", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "internalType": "uint32", + "name": "cooldownStart", + "type": "uint32" + } + ], + "internalType": "struct IHydraS1SoulboundAttester.TicketData", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVerifier", + "outputs": [ + { + "internalType": "contract HydraS1Verifier", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "userTicket", + "type": "uint256" + } + ], + "name": "isTicketOnCooldown", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x7f977d111604fac7d95c4998e96790f6bdefc834edb860dba96112b86e22f892", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x1F38a480d04348708F4b2413fb9AB1F975C176b6", + "transactionIndex": 42, + "gasUsed": "1821131", + "logsBloom": "0x00000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000010000000000000000000008000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0xf02d122fdcb54cfbd733e9ab75450089d94b6287c89947756c1cb33c040d4a4e", + "transactionHash": "0x7f977d111604fac7d95c4998e96790f6bdefc834edb860dba96112b86e22f892", + "logs": [ + { + "transactionIndex": 42, + "blockNumber": 28600035, + "transactionHash": "0x7f977d111604fac7d95c4998e96790f6bdefc834edb860dba96112b86e22f892", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000000125f7c53b1970e00000000000000000000000000000000000000000000000082adc81c0122e43400000000000000000000000000000000000000000000167a30e33576abc94b08000000000000000000000000000000000000000000000000829b689fad714d2600000000000000000000000000000000000000000000167a30f594f2ff7ae216", + "logIndex": 250, + "blockHash": "0xf02d122fdcb54cfbd733e9ab75450089d94b6287c89947756c1cb33c040d4a4e" + } + ], + "blockNumber": 28600035, + "cumulativeGasUsed": "10654068", + "status": 1, + "byzantium": true + }, + "args": [ + "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", + "0x34e3CcCF4fF2E297be22465b85F03E5E6D27b41B", + "0x2c17e335d131dfd21238475Dd545B9B29Fb5A27D", + "0x82B54988e4E3a2850501F91AC06CEA82bdb014D3", + "20000001", + "30000000", + "295200" + ], + "numDeployments": 2, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attestationsRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"hydraS1VerifierAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"availableRootsRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"commitmentMapperAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"collectionIdFirst\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collectionIdLast\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"soulboundCooldownDuration\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedAccountsTreeValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputAccountsTreeValue\",\"type\":\"uint256\"}],\"name\":\"AccountsTreeValueMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AttestationDeletionNotImplemented\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"name\":\"ChainIdMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"claimLength\",\"type\":\"uint256\"}],\"name\":\"ClaimsLengthDifferentThanOne\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"}],\"name\":\"CollectionIdOutOfBound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedX\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expectedY\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputX\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputY\",\"type\":\"uint256\"}],\"name\":\"CommitmentMapperPubKeyMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"expectedDestination\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"inputDestination\",\"type\":\"address\"}],\"name\":\"DestinationMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedGroupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"}],\"name\":\"GroupIdAndPropertiesMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"InvalidGroth16Proof\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"expectedStrictness\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"strictNess\",\"type\":\"bool\"}],\"name\":\"IsStrictMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ticket\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"NotAttestationOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"inputRoot\",\"type\":\"uint256\"}],\"name\":\"RegistryRootMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ticketData\",\"type\":\"uint256\"}],\"name\":\"TicketFrozen\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedTicketIdentifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ticketIdentifier\",\"type\":\"uint256\"}],\"name\":\"TicketIdentifierMismatch\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"cooldownStart\",\"type\":\"uint32\"}],\"internalType\":\"struct IHydraS1SoulboundAttester.TicketData\",\"name\":\"ticketData\",\"type\":\"tuple\"}],\"name\":\"TicketUsedAndOnCooldown\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputValue\",\"type\":\"uint256\"}],\"name\":\"ValueMismatch\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct Attestation\",\"name\":\"attestation\",\"type\":\"tuple\"}],\"name\":\"AttestationDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct Attestation\",\"name\":\"attestation\",\"type\":\"tuple\"}],\"name\":\"AttestationGenerated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ticket\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"TicketDestinationUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ticket\",\"type\":\"uint256\"}],\"name\":\"TicketSetOnCooldown\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"AUTHORIZED_COLLECTION_ID_FIRST\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"AUTHORIZED_COLLECTION_ID_LAST\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SOULBOUND_COOLDOWN_DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"buildAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"attestationsOwner\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"deleteAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"generateAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAttestationRegistry\",\"outputs\":[{\"internalType\":\"contract IAttestationsRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAvailableRootsRegistry\",\"outputs\":[{\"internalType\":\"contract IAvailableRootsRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCommitmentMapperRegistry\",\"outputs\":[{\"internalType\":\"contract ICommitmentMapperRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"userTicket\",\"type\":\"uint256\"}],\"name\":\"getDestinationOfTicket\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"userTicket\",\"type\":\"uint256\"}],\"name\":\"getTicketData\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"cooldownStart\",\"type\":\"uint32\"}],\"internalType\":\"struct IHydraS1SoulboundAttester.TicketData\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVerifier\",\"outputs\":[{\"internalType\":\"contract HydraS1Verifier\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"userTicket\",\"type\":\"uint256\"}],\"name\":\"isTicketOnCooldown\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"buildAttestations(((uint256,uint256,bytes)[],address),bytes)\":{\"details\":\"Returns the actual attestations constructed from the user request\",\"params\":{\"proofData\":\"snark public input as well as snark proof\",\"request\":\"users request. Claim of having an account part of a group of accounts\"}},\"constructor\":{\"details\":\"Constructor. Initializes the contract\",\"params\":{\"attestationsRegistryAddress\":\"Attestations Registry contract on which the attester will write attestations\",\"availableRootsRegistryAddress\":\"Registry storing the available groups for this attester (e.g roots of registry merkle trees)\",\"collectionIdFirst\":\"Id of the first collection in which the attester is supposed to record\",\"collectionIdLast\":\"Id of the last collection in which the attester is supposed to record\",\"commitmentMapperAddress\":\"commitment mapper's public key registry\",\"hydraS1VerifierAddress\":\"ZK Snark Hydra-S1 Verifier contract\"}},\"deleteAttestations(uint256[],address,bytes)\":{\"details\":\"External facing function. Allows to delete attestations by submitting proof\",\"params\":{\"attestationsOwner\":\"Owner of attestations to delete\",\"collectionIds\":\"Collection identifier of attestations to delete\",\"proofData\":\"Data sent along the deletion request to prove its validity\"},\"returns\":{\"_0\":\"attestations Attestations that were deleted\"}},\"generateAttestations(((uint256,uint256,bytes)[],address),bytes)\":{\"details\":\"Main external function. Allows to generate attestations by making a request and submitting proof\",\"params\":{\"proofData\":\"Data sent along the request to prove its validity\",\"request\":\"User request\"},\"returns\":{\"_0\":\"attestations Attestations that has been recorded\"}},\"getAttestationRegistry()\":{\"details\":\"Attestation registry getter\",\"returns\":{\"_0\":\"attestationRegistry\"}},\"getAvailableRootsRegistry()\":{\"details\":\"Getter of Roots Registry Contract\"},\"getCommitmentMapperRegistry()\":{\"details\":\"Getter of Commitment Mapper Registry contract\"},\"getDestinationOfTicket(uint256)\":{\"details\":\"Getter, returns the last attestation destination of a ticket\",\"params\":{\"userTicket\":\"ticket used*\"}},\"getTicketData(uint256)\":{\"details\":\"Getter, returns the data linked to a ticket\",\"params\":{\"userTicket\":\"ticket used*\"}},\"getVerifier()\":{\"details\":\"Getter of Hydra-S1 Verifier contract\"},\"isTicketOnCooldown(uint256)\":{\"details\":\"returns whether a ticket is on cooldown or not\",\"params\":{\"userTicket\":\"ticket used*\"}}},\"stateVariables\":{\"AUTHORIZED_COLLECTION_ID_FIRST\":{\"details\":\"Getter returns of the first collection in which the attester is supposed to record*\"},\"AUTHORIZED_COLLECTION_ID_LAST\":{\"details\":\"Getter returns of the last collection in which the attester is supposed to record*\"},\"SOULBOUND_COOLDOWN_DURATION\":{\"details\":\"Getter returns of the duration of the cooldown period after having used a ticket*\"}},\"title\":\"Hydra-S1 Soulbound Attester\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"This attester is part of the family of the Hydra-S1 Attesters. Hydra-S1 attesters enable users to prove they have an account in a group in a privacy preserving way. The Hydra-S1 Base abstract contract is inherited and holds the complex Hydra S1 verification logic. We invite readers to refer to: - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1 This specific attester has the following characteristics: - Zero Knowledge One cannot deduct from an attestation what source account was used to generate the underlying proof - Non Strict (scores) If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100. This attester generate attestations of scores - Ticketed Each source account gets one userTicket per claim (i.e only one attestation per source account per claim) For people used to semaphore/ tornado cash people: userTicket = hash(sourceSecret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier) - SoulBound (with cooldown period) A user can chose to delete attestations or generate attestation to a new destination. When deleting/ sending to a new destination, the ticket will enter a cooldown period, so it remains occasional User will need to wait until the end of the cooldown period before being able to delete or switch destination again One can however know that the former and the new destinations were created using the same userTicket - Renewable A userTicket can actually be reused as long as the destination of the attestation remains the same It enables users to renew or update their attestations*\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/attesters/hydra-s1/variants/HydraS1SoulboundAttester.sol\":\"HydraS1SoulboundAttester\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() initializer {}\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\\n // contract may have been reentered.\\n require(_initializing ? _isConstructor() : !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} modifier, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n function _isConstructor() private view returns (bool) {\\n return !Address.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x4823752b07b8ea4ca971b217e39457930e7cb103c2c91e2a29729e5ca907e4f0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@sismo-core/hydra-s1/contracts/HydraS1Verifier.sol\":{\"content\":\"//\\n// Copyright 2017 Christian Reitwiessner\\n// 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:\\n// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\\n// 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.\\n//\\n// 2019 OKIMS\\n// ported to solidity 0.6\\n// fixed linter warnings\\n// added requiere error messages\\n//\\n//\\n// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.0;\\nlibrary Pairing {\\n struct G1Point {\\n uint X;\\n uint Y;\\n }\\n // Encoding of field elements is: X[0] * z + X[1]\\n struct G2Point {\\n uint[2] X;\\n uint[2] Y;\\n }\\n /// @return the generator of G1\\n function P1() internal pure returns (G1Point memory) {\\n return G1Point(1, 2);\\n }\\n /// @return the generator of G2\\n function P2() internal pure returns (G2Point memory) {\\n // Original code point\\n return G2Point(\\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\\n );\\n\\n/*\\n // Changed by Jordi point\\n return G2Point(\\n [10857046999023057135944570762232829481370756359578518086990519993285655852781,\\n 11559732032986387107991004021392285783925812861821192530917403151452391805634],\\n [8495653923123431417604973247489272438418190587263600148770280649306958101930,\\n 4082367875863433681332203403145435568316851327593401208105741076214120093531]\\n );\\n*/\\n }\\n /// @return r the negation of p, i.e. p.addition(p.negate()) should be zero.\\n function negate(G1Point memory p) internal pure returns (G1Point memory r) {\\n // The prime q in the base field F_q for G1\\n uint q = 21888242871839275222246405745257275088696311157297823662689037894645226208583;\\n if (p.X == 0 && p.Y == 0)\\n return G1Point(0, 0);\\n return G1Point(p.X, q - (p.Y % q));\\n }\\n /// @return r the sum of two points of G1\\n function addition(G1Point memory p1, G1Point memory p2) internal view returns (G1Point memory r) {\\n uint[4] memory input;\\n input[0] = p1.X;\\n input[1] = p1.Y;\\n input[2] = p2.X;\\n input[3] = p2.Y;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require(success,\\\"pairing-add-failed\\\");\\n }\\n /// @return r the product of a point on G1 and a scalar, i.e.\\n /// p == p.scalar_mul(1) and p.addition(p) == p.scalar_mul(2) for all points p.\\n function scalar_mul(G1Point memory p, uint s) internal view returns (G1Point memory r) {\\n uint[3] memory input;\\n input[0] = p.X;\\n input[1] = p.Y;\\n input[2] = s;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require (success,\\\"pairing-mul-failed\\\");\\n }\\n /// @return the result of computing the pairing check\\n /// e(p1[0], p2[0]) * .... * e(p1[n], p2[n]) == 1\\n /// For example pairing([P1(), P1().negate()], [P2(), P2()]) should\\n /// return true.\\n function pairing(G1Point[] memory p1, G2Point[] memory p2) internal view returns (bool) {\\n require(p1.length == p2.length,\\\"pairing-lengths-failed\\\");\\n uint elements = p1.length;\\n uint inputSize = elements * 6;\\n uint[] memory input = new uint[](inputSize);\\n for (uint i = 0; i < elements; i++)\\n {\\n input[i * 6 + 0] = p1[i].X;\\n input[i * 6 + 1] = p1[i].Y;\\n input[i * 6 + 2] = p2[i].X[0];\\n input[i * 6 + 3] = p2[i].X[1];\\n input[i * 6 + 4] = p2[i].Y[0];\\n input[i * 6 + 5] = p2[i].Y[1];\\n }\\n uint[1] memory out;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 8, add(input, 0x20), mul(inputSize, 0x20), out, 0x20)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require(success,\\\"pairing-opcode-failed\\\");\\n return out[0] != 0;\\n }\\n /// Convenience method for a pairing check for two pairs.\\n function pairingProd2(G1Point memory a1, G2Point memory a2, G1Point memory b1, G2Point memory b2) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](2);\\n G2Point[] memory p2 = new G2Point[](2);\\n p1[0] = a1;\\n p1[1] = b1;\\n p2[0] = a2;\\n p2[1] = b2;\\n return pairing(p1, p2);\\n }\\n /// Convenience method for a pairing check for three pairs.\\n function pairingProd3(\\n G1Point memory a1, G2Point memory a2,\\n G1Point memory b1, G2Point memory b2,\\n G1Point memory c1, G2Point memory c2\\n ) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](3);\\n G2Point[] memory p2 = new G2Point[](3);\\n p1[0] = a1;\\n p1[1] = b1;\\n p1[2] = c1;\\n p2[0] = a2;\\n p2[1] = b2;\\n p2[2] = c2;\\n return pairing(p1, p2);\\n }\\n /// Convenience method for a pairing check for four pairs.\\n function pairingProd4(\\n G1Point memory a1, G2Point memory a2,\\n G1Point memory b1, G2Point memory b2,\\n G1Point memory c1, G2Point memory c2,\\n G1Point memory d1, G2Point memory d2\\n ) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](4);\\n G2Point[] memory p2 = new G2Point[](4);\\n p1[0] = a1;\\n p1[1] = b1;\\n p1[2] = c1;\\n p1[3] = d1;\\n p2[0] = a2;\\n p2[1] = b2;\\n p2[2] = c2;\\n p2[3] = d2;\\n return pairing(p1, p2);\\n }\\n}\\ncontract HydraS1Verifier {\\n using Pairing for *;\\n struct VerifyingKey {\\n Pairing.G1Point alfa1;\\n Pairing.G2Point beta2;\\n Pairing.G2Point gamma2;\\n Pairing.G2Point delta2;\\n Pairing.G1Point[] IC;\\n }\\n struct Proof {\\n Pairing.G1Point A;\\n Pairing.G2Point B;\\n Pairing.G1Point C;\\n }\\n function verifyingKey() internal pure returns (VerifyingKey memory vk) {\\n vk.alfa1 = Pairing.G1Point(\\n 20491192805390485299153009773594534940189261866228447918068658471970481763042,\\n 9383485363053290200918347156157836566562967994039712273449902621266178545958\\n );\\n\\n vk.beta2 = Pairing.G2Point(\\n [4252822878758300859123897981450591353533073413197771768651442665752259397132,\\n 6375614351688725206403948262868962793625744043794305715222011528459656738731],\\n [21847035105528745403288232691147584728191162732299865338377159692350059136679,\\n 10505242626370262277552901082094356697409835680220590971873171140371331206856]\\n );\\n vk.gamma2 = Pairing.G2Point(\\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\\n );\\n vk.delta2 = Pairing.G2Point(\\n [16703691932058078091905716404571265959476320760471681443119627655715361207341,\\n 14290274403144646058563103675066900294643500151498463054614740831207315388514],\\n [9120517679481713774648131333833134160499672068094273767171232839700590114148,\\n 18338638855816625080803231766917659002322979855877827709378572546717723262324]\\n );\\n vk.IC = new Pairing.G1Point[](11);\\n \\n vk.IC[0] = Pairing.G1Point( \\n 15183981365841448712456044920259850142312423574262787585047804960636415432994,\\n 7001044530623564797357151512361873851017731748844374046997463344585588795777\\n ); \\n \\n vk.IC[1] = Pairing.G1Point( \\n 3754737654948662562435613969155994959132173506784418442817218316697091994043,\\n 16520141448541154153981919757383608282199583682574061862571018786569723115048\\n ); \\n \\n vk.IC[2] = Pairing.G1Point( \\n 14734466460881491794568175288621656907425457509621292263456156896685122952305,\\n 18495564446073110430251898491840031389094613665866187171071741938161262650771\\n ); \\n \\n vk.IC[3] = Pairing.G1Point( \\n 16380352455102502109444307845900237792657209995731679788026311308996926499427,\\n 11872494853967118743957240270505831687788406895959276908447589431944985706662\\n ); \\n \\n vk.IC[4] = Pairing.G1Point( \\n 20199514202493196707492057247804402540358301491780845748325025913208809441866,\\n 12760637713678265881350279209961337475498485836996922236408521200416764617323\\n ); \\n \\n vk.IC[5] = Pairing.G1Point( \\n 19153715775490328450864792250302417403928222720390978634383848496516270422395,\\n 546002182798634190282541153661423157791776194062719045593389981526666716416\\n ); \\n \\n vk.IC[6] = Pairing.G1Point( \\n 2572546294944895555897986264162285493992700415786641015895831165477991460890,\\n 16475880996834565556958124284585338184010927435675877479782010166270319781724\\n ); \\n \\n vk.IC[7] = Pairing.G1Point( \\n 1189084334785746899933155760881982253715630415235816484826929546449434025692,\\n 4229672360641556939458327562740354930286687266228809328535679188294452033396\\n ); \\n \\n vk.IC[8] = Pairing.G1Point( \\n 19602244162575575785636531633124796303002902053486919698240132790672698216585,\\n 181057165072599074288983745076121344893296348827576905983079816835912241514\\n ); \\n \\n vk.IC[9] = Pairing.G1Point( \\n 2674333225598340315002358633842521216418358316694409406540164227900893354209,\\n 2129512057743264354864596186877181463207231175912159744730924346148245351960\\n ); \\n \\n vk.IC[10] = Pairing.G1Point( \\n 7320700433668244102684846027945878190869912696586803178638351868907615350377,\\n 2941840530209756385349015075958743796933501451265755778001586753024906675441\\n ); \\n \\n }\\n function verify(uint[] memory input, Proof memory proof) internal view returns (uint) {\\n uint256 snark_scalar_field = 21888242871839275222246405745257275088548364400416034343698204186575808495617;\\n VerifyingKey memory vk = verifyingKey();\\n require(input.length + 1 == vk.IC.length,\\\"verifier-bad-input\\\");\\n // Compute the linear combination vk_x\\n Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);\\n for (uint i = 0; i < input.length; i++) {\\n require(input[i] < snark_scalar_field,\\\"verifier-gte-snark-scalar-field\\\");\\n vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i]));\\n }\\n vk_x = Pairing.addition(vk_x, vk.IC[0]);\\n if (!Pairing.pairingProd4(\\n Pairing.negate(proof.A), proof.B,\\n vk.alfa1, vk.beta2,\\n vk_x, vk.gamma2,\\n proof.C, vk.delta2\\n )) return 1;\\n return 0;\\n }\\n /// @return r bool true if proof is valid\\n function verifyProof(\\n uint[2] memory a,\\n uint[2][2] memory b,\\n uint[2] memory c,\\n uint[10] memory input\\n ) public view returns (bool r) {\\n Proof memory proof;\\n proof.A = Pairing.G1Point(a[0], a[1]);\\n proof.B = Pairing.G2Point([b[0][0], b[0][1]], [b[1][0], b[1][1]]);\\n proof.C = Pairing.G1Point(c[0], c[1]);\\n uint[] memory inputValues = new uint[](input.length);\\n for(uint i = 0; i < input.length; i++){\\n inputValues[i] = input[i];\\n }\\n if (verify(inputValues, proof) == 0) {\\n return true;\\n } else {\\n return false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x70c0b7d96ff1b90538938a4cb2d8086b3aabb4febf1e36cb3f470bfe0b4a9e89\",\"license\":\"GPL-3.0\"},\"contracts/attesters/hydra-s1/base/HydraS1Base.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {IHydraS1Base} from './IHydraS1Base.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\n\\n// Protocol imports\\nimport {Request, Attestation, Claim} from '../../../core/libs/Structs.sol';\\n\\n// Imports related to Hydra S1 ZK Proving Scheme\\nimport {HydraS1Verifier, HydraS1Lib, HydraS1Claim, HydraS1ProofData, HydraS1ProofInput, HydraS1GroupProperties} from '../libs/HydraS1Lib.sol';\\nimport {ICommitmentMapperRegistry} from '../../../periphery/utils/CommitmentMapperRegistry.sol';\\nimport {IAvailableRootsRegistry} from '../../../periphery/utils/AvailableRootsRegistry.sol';\\n\\n/**\\n * @title Hydra-S1 Base Attester\\n * @author Sismo\\n * @notice Abstract contract that facilitates the use of the Hydra-S1 ZK Proving Scheme.\\n * Hydra-S1 is single source, single group: it allows users to verify they are part of one and only one group at a time\\n * It is inherited by the family of Hydra-S1 attesters.\\n * It contains the user input checking and the ZK-SNARK proof verification.\\n * We invite readers to refer to:\\n * - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations\\n * - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1\\n \\n \\n **/\\nabstract contract HydraS1Base is IHydraS1Base, Initializable {\\n using HydraS1Lib for HydraS1ProofData;\\n\\n // ZK-SNARK Verifier\\n HydraS1Verifier immutable VERIFIER;\\n // Registry storing the Commitment Mapper EdDSA Public key\\n ICommitmentMapperRegistry immutable COMMITMENT_MAPPER_REGISTRY;\\n // Registry storing the Registry Tree Roots of the Attester's available ClaimData\\n IAvailableRootsRegistry immutable AVAILABLE_ROOTS_REGISTRY;\\n\\n /*******************************************************\\n INITIALIZATION FUNCTIONS \\n *******************************************************/\\n /**\\n * @dev Constructor. Initializes the contract\\n * @param hydraS1VerifierAddress ZK Snark Verifier contract\\n * @param availableRootsRegistryAddress Registry where is the Available Data (Registry Merkle Roots)\\n * @param commitmentMapperAddress Commitment mapper's public key registry\\n */\\n constructor(\\n address hydraS1VerifierAddress,\\n address availableRootsRegistryAddress,\\n address commitmentMapperAddress\\n ) {\\n VERIFIER = HydraS1Verifier(hydraS1VerifierAddress);\\n AVAILABLE_ROOTS_REGISTRY = IAvailableRootsRegistry(availableRootsRegistryAddress);\\n COMMITMENT_MAPPER_REGISTRY = ICommitmentMapperRegistry(commitmentMapperAddress);\\n }\\n\\n /**\\n * @dev Getter of Hydra-S1 Verifier contract\\n */\\n function getVerifier() external view returns (HydraS1Verifier) {\\n return VERIFIER;\\n }\\n\\n /**\\n * @dev Getter of Commitment Mapper Registry contract\\n */\\n function getCommitmentMapperRegistry() external view returns (ICommitmentMapperRegistry) {\\n return COMMITMENT_MAPPER_REGISTRY;\\n }\\n\\n /**\\n * @dev Getter of Roots Registry Contract\\n */\\n function getAvailableRootsRegistry() external view returns (IAvailableRootsRegistry) {\\n return AVAILABLE_ROOTS_REGISTRY;\\n }\\n\\n /*******************************************************\\n Hydra-S1 SPECIFIC FUNCTIONS\\n *******************************************************/\\n\\n /**\\n * @dev MANDATORY: must be implemented to return the ticket identifier from a user request\\n * so it can be checked against snark input\\n * ticket = hash(sourceSecretHash, ticketIdentifier), which is verified inside the snark\\n * users bring sourceSecretHash as private input which guarantees privacy\\n\\n * This function MUST be implemented by Hydra-S1 attesters.\\n * This is the core function that implements the logic of tickets\\n\\n * Do they get one ticket per claim?\\n * Do they get 2 tickets per claim?\\n * Do they get 1 ticket per claim, every month?\\n * Take a look at Hydra-S1 Simple Attester for an example\\n * @param claim user claim: part of a group of accounts, with a claimedValue for their account\\n */\\n function _getTicketIdentifierOfClaim(HydraS1Claim memory claim)\\n internal\\n view\\n virtual\\n returns (uint256);\\n\\n /**\\n * @dev Checks whether the user claim and the snark public input are a match\\n * @param claim user claim\\n * @param input snark public input\\n */\\n function _validateInput(HydraS1Claim memory claim, HydraS1ProofInput memory input)\\n internal\\n view\\n virtual\\n {\\n if (input.accountsTreeValue != claim.groupId)\\n revert AccountsTreeValueMismatch(claim.groupId, input.accountsTreeValue);\\n\\n if (input.isStrict == claim.groupProperties.isScore)\\n revert IsStrictMismatch(claim.groupProperties.isScore, input.isStrict);\\n\\n if (input.destination != claim.destination)\\n revert DestinationMismatch(claim.destination, input.destination);\\n\\n if (input.chainId != block.chainid) revert ChainIdMismatch(block.chainid, input.chainId);\\n\\n if (input.value != claim.claimedValue) revert ValueMismatch(claim.claimedValue, input.value);\\n\\n if (!AVAILABLE_ROOTS_REGISTRY.isRootAvailableForMe(input.registryRoot))\\n revert RegistryRootMismatch(input.registryRoot);\\n\\n uint256[2] memory commitmentMapperPubKey = COMMITMENT_MAPPER_REGISTRY.getEdDSAPubKey();\\n if (\\n input.commitmentMapperPubKey[0] != commitmentMapperPubKey[0] ||\\n input.commitmentMapperPubKey[1] != commitmentMapperPubKey[1]\\n )\\n revert CommitmentMapperPubKeyMismatch(\\n commitmentMapperPubKey[0],\\n commitmentMapperPubKey[1],\\n input.commitmentMapperPubKey[0],\\n input.commitmentMapperPubKey[1]\\n );\\n\\n uint256 ticketIdentifier = _getTicketIdentifierOfClaim(claim);\\n\\n if (input.ticketIdentifier != ticketIdentifier)\\n revert TicketIdentifierMismatch(ticketIdentifier, input.ticketIdentifier);\\n }\\n\\n /**\\n * @dev verify the groth16 mathematical proof\\n * @param proofData snark public input\\n */\\n function _verifyProof(HydraS1ProofData memory proofData) internal view virtual {\\n try\\n VERIFIER.verifyProof(proofData.proof.a, proofData.proof.b, proofData.proof.c, proofData.input)\\n returns (bool success) {\\n if (!success) revert InvalidGroth16Proof('');\\n } catch Error(string memory reason) {\\n revert InvalidGroth16Proof(reason);\\n } catch Panic(\\n uint256 /*errorCode*/\\n ) {\\n revert InvalidGroth16Proof('');\\n } catch (\\n bytes memory /*lowLevelData*/\\n ) {\\n revert InvalidGroth16Proof('');\\n }\\n }\\n}\\n\",\"keccak256\":\"0x02708884237382835cd3d3514fdc3603409ce5ea1dc7255a7ceea07dff417c34\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/base/IHydraS1Base.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {HydraS1Verifier, HydraS1Lib, HydraS1ProofData} from '../libs/HydraS1Lib.sol';\\nimport {ICommitmentMapperRegistry} from '../../../periphery/utils/CommitmentMapperRegistry.sol';\\nimport {IAvailableRootsRegistry} from '../../../periphery/utils/AvailableRootsRegistry.sol';\\n\\n// todo: explain well what is specific to this attester\\ninterface IHydraS1Base {\\n error ClaimsLengthDifferentThanOne(uint256 claimLength);\\n error RegistryRootMismatch(uint256 inputRoot);\\n error DestinationMismatch(address expectedDestination, address inputDestination);\\n error CommitmentMapperPubKeyMismatch(\\n uint256 expectedX,\\n uint256 expectedY,\\n uint256 inputX,\\n uint256 inputY\\n );\\n error TicketIdentifierMismatch(uint256 expectedTicketIdentifier, uint256 ticketIdentifier);\\n error IsStrictMismatch(bool expectedStrictness, bool strictNess);\\n error ChainIdMismatch(uint256 expectedChainId, uint256 chainId);\\n error ValueMismatch(uint256 expectedValue, uint256 inputValue);\\n error AccountsTreeValueMismatch(\\n uint256 expectedAccountsTreeValue,\\n uint256 inputAccountsTreeValue\\n );\\n error InvalidGroth16Proof(string reason);\\n\\n /**\\n * @dev Getter of Hydra-S1 Verifier contract\\n */\\n function getVerifier() external view returns (HydraS1Verifier);\\n\\n /**\\n * @dev Getter of Commitment Mapper Registry contract\\n */\\n function getCommitmentMapperRegistry() external view returns (ICommitmentMapperRegistry);\\n\\n /**\\n * @dev Getter of Roots Registry Contract\\n */\\n function getAvailableRootsRegistry() external view returns (IAvailableRootsRegistry);\\n}\\n\",\"keccak256\":\"0x73cff4dcd9c30857859721ea2897be8bb7087c0122f4587acdaa79d8ec0a728d\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/interfaces/IHydraS1SoulboundAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {Attestation} from '../../../core/libs/Structs.sol';\\nimport {IAttester} from '../../../core/interfaces/IAttester.sol';\\nimport {CommitmentMapperRegistry} from '../../../periphery/utils/CommitmentMapperRegistry.sol';\\nimport {AvailableRootsRegistry} from '../../../periphery/utils/AvailableRootsRegistry.sol';\\nimport {HydraS1Lib, HydraS1ProofData, HydraS1ProofInput} from './../libs/HydraS1Lib.sol';\\nimport {IHydraS1Base} from './../base/IHydraS1Base.sol';\\n\\n// todo: explain well what is specific to this attester\\ninterface IHydraS1SoulboundAttester is IHydraS1Base, IAttester {\\n struct TicketData {\\n address destination;\\n uint32 cooldownStart;\\n }\\n error NotAttestationOwner(uint256 ticket, address sender);\\n error TicketFrozen(uint256 ticketData);\\n error TicketUsedAndOnCooldown(TicketData ticketData);\\n error CollectionIdOutOfBound(uint256 collectionId);\\n\\n event TicketDestinationUpdated(uint256 ticket, address newOwner);\\n event TicketSetOnCooldown(uint256 ticket);\\n\\n /**\\n * @dev returns whether a ticket is on cooldown or not\\n * @param userTicket ticket used\\n **/\\n function isTicketOnCooldown(uint256 userTicket) external view returns (bool);\\n\\n /**\\n * @dev Getter, returns the data linked to a ticket\\n * @param userTicket ticket used\\n **/\\n function getTicketData(uint256 userTicket) external view returns (TicketData memory);\\n\\n /**\\n * @dev Getter, returns the last attestation destination of a ticket\\n * @param userTicket ticket used\\n **/\\n function getDestinationOfTicket(uint256 userTicket) external view returns (address);\\n\\n /**\\n * @dev Getter\\n * returns of the first collection in which the attester is supposed to record\\n **/\\n function AUTHORIZED_COLLECTION_ID_FIRST() external view returns (uint256);\\n\\n /**\\n * @dev Getter\\n * returns of the last collection in which the attester is supposed to record\\n **/\\n function AUTHORIZED_COLLECTION_ID_LAST() external view returns (uint256);\\n\\n /**\\n * @dev Getter\\n * returns of the duration of the cooldown period after having used a ticket\\n **/\\n function SOULBOUND_COOLDOWN_DURATION() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x253a424fda33fca3de3fabd731e4a4f5d48af14bcd9d7c66302113268fd3a9f5\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/libs/HydraS1Lib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Claim, Request} from '../../../core/libs/Structs.sol';\\nimport {HydraS1Verifier} from '@sismo-core/hydra-s1/contracts/HydraS1Verifier.sol';\\n\\n// user Hydra-S1 claim retrieved form his request\\nstruct HydraS1Claim {\\n uint256 groupId; // user claims to have an account in this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n address destination; // user claims to own this destination[]\\n HydraS1GroupProperties groupProperties; // user claims the group has the following properties\\n}\\n\\nstruct HydraS1GroupProperties {\\n uint128 groupIndex;\\n uint32 generationTimestamp;\\n bool isScore;\\n}\\n\\nstruct HydraS1CircomSnarkProof {\\n uint256[2] a;\\n uint256[2][2] b;\\n uint256[2] c;\\n}\\n\\nstruct HydraS1ProofData {\\n HydraS1CircomSnarkProof proof;\\n uint256[10] input;\\n // destination\\n // chainId\\n // commitmentMapperPubKey.x\\n // commitmentMapperPubKey.y\\n // registryTreeRoot\\n // ticketIdentifier\\n // ticket\\n // claimedValue\\n // accountsTreeValue\\n // isStrict\\n}\\n\\nstruct HydraS1ProofInput {\\n address destination;\\n uint256 chainId;\\n uint256 registryRoot;\\n uint256 ticketIdentifier;\\n uint256 ticket;\\n uint256 value;\\n uint256 accountsTreeValue;\\n bool isStrict;\\n uint256[2] commitmentMapperPubKey;\\n}\\n\\nlibrary HydraS1Lib {\\n uint256 constant SNARK_FIELD =\\n 21888242871839275222246405745257275088548364400416034343698204186575808495617;\\n\\n error GroupIdAndPropertiesMismatch(uint256 expectedGroupId, uint256 groupId);\\n\\n function _input(HydraS1ProofData memory self) internal pure returns (HydraS1ProofInput memory) {\\n return\\n HydraS1ProofInput(\\n _getDestination(self),\\n _getChainId(self),\\n _getRegistryRoot(self),\\n _getExpectedExternalNullifier(self),\\n _getTicket(self),\\n _getValue(self),\\n _getAccountsTreeValue(self),\\n _getIsStrict(self),\\n _getCommitmentMapperPubKey(self)\\n );\\n }\\n\\n function _claim(Request memory self) internal pure returns (HydraS1Claim memory) {\\n Claim memory claim = self.claims[0];\\n _validateClaim(claim);\\n\\n HydraS1GroupProperties memory groupProperties = abi.decode(\\n claim.extraData,\\n (HydraS1GroupProperties)\\n );\\n\\n return (HydraS1Claim(claim.groupId, claim.claimedValue, self.destination, groupProperties));\\n }\\n\\n function _toCircomFormat(HydraS1ProofData memory self)\\n internal\\n pure\\n returns (\\n uint256[2] memory,\\n uint256[2][2] memory,\\n uint256[2] memory,\\n uint256[10] memory\\n )\\n {\\n return (self.proof.a, self.proof.b, self.proof.c, self.input);\\n }\\n\\n function _getDestination(HydraS1ProofData memory self) internal pure returns (address) {\\n return address(uint160(self.input[0]));\\n }\\n\\n function _getChainId(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[1];\\n }\\n\\n function _getCommitmentMapperPubKey(HydraS1ProofData memory self)\\n internal\\n pure\\n returns (uint256[2] memory)\\n {\\n return [self.input[2], self.input[3]];\\n }\\n\\n function _getRegistryRoot(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[4];\\n }\\n\\n function _getExpectedExternalNullifier(HydraS1ProofData memory self)\\n internal\\n pure\\n returns (uint256)\\n {\\n return self.input[5];\\n }\\n\\n function _getTicket(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[6];\\n }\\n\\n function _getValue(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[7];\\n }\\n\\n function _getAccountsTreeValue(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[8];\\n }\\n\\n function _getIsStrict(HydraS1ProofData memory self) internal pure returns (bool) {\\n return self.input[9] == 1;\\n }\\n\\n function _getTicket(bytes calldata self) internal pure returns (uint256) {\\n HydraS1ProofData memory snarkProofData = abi.decode(self, (HydraS1ProofData));\\n uint256 userTicket = uint256(_getTicket(snarkProofData));\\n return userTicket;\\n }\\n\\n function _generateGroupIdFromProperties(\\n uint128 groupIndex,\\n uint32 generationTimestamp,\\n bool isScore\\n ) internal pure returns (uint256) {\\n return\\n _generateGroupIdFromEncodedProperties(\\n _encodeGroupProperties(groupIndex, generationTimestamp, isScore)\\n );\\n }\\n\\n function _generateGroupIdFromEncodedProperties(bytes memory encodedProperties)\\n internal\\n pure\\n returns (uint256)\\n {\\n return uint256(keccak256(encodedProperties)) % HydraS1Lib.SNARK_FIELD;\\n }\\n\\n function _encodeGroupProperties(\\n uint128 groupIndex,\\n uint32 generationTimestamp,\\n bool isScore\\n ) internal pure returns (bytes memory) {\\n return abi.encode(groupIndex, generationTimestamp, isScore);\\n }\\n\\n function _validateClaim(Claim memory claim) internal pure {\\n uint256 expectedGroupId = _generateGroupIdFromEncodedProperties(claim.extraData);\\n if (claim.groupId != expectedGroupId)\\n revert GroupIdAndPropertiesMismatch(expectedGroupId, claim.groupId);\\n }\\n}\\n\",\"keccak256\":\"0x596225970aabbc4edb989ee640867c76944e797bfafe5e06dcf37b973480b957\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/variants/HydraS1SoulboundAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {IHydraS1SoulboundAttester} from '../interfaces/IHydraS1SoulboundAttester.sol';\\n\\n// Core protocol Protocol imports\\nimport {Request, Attestation, Claim} from '../../../core/libs/Structs.sol';\\nimport {Attester, IAttester, IAttestationsRegistry} from '../../../core/Attester.sol';\\n\\n// Imports related to HydraS1 Proving Scheme\\nimport {HydraS1Base, HydraS1Lib, HydraS1ProofData, HydraS1ProofInput, HydraS1Claim} from '../base/HydraS1Base.sol';\\n\\n/**\\n * @title Hydra-S1 Soulbound Attester\\n * @author Sismo\\n * @notice This attester is part of the family of the Hydra-S1 Attesters.\\n * Hydra-S1 attesters enable users to prove they have an account in a group in a privacy preserving way.\\n * The Hydra-S1 Base abstract contract is inherited and holds the complex Hydra S1 verification logic.\\n * We invite readers to refer to:\\n * - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations\\n * - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1\\n\\n * This specific attester has the following characteristics:\\n\\n * - Zero Knowledge\\n * One cannot deduct from an attestation what source account was used to generate the underlying proof\\n\\n * - Non Strict (scores)\\n * If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100.\\n * This attester generate attestations of scores\\n\\n * - Ticketed\\n * Each source account gets one userTicket per claim (i.e only one attestation per source account per claim)\\n * For people used to semaphore/ tornado cash people:\\n * userTicket = hash(sourceSecret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier)\\n \\n * - SoulBound (with cooldown period)\\n * A user can chose to delete attestations or generate attestation to a new destination.\\n * When deleting/ sending to a new destination, the ticket will enter a cooldown period, so it remains occasional\\n * User will need to wait until the end of the cooldown period before being able to delete or switch destination again\\n * One can however know that the former and the new destinations were created using the same userTicket\\n \\n * - Renewable\\n * A userTicket can actually be reused as long as the destination of the attestation remains the same\\n * It enables users to renew or update their attestations\\n **/\\ncontract HydraS1SoulboundAttester is IHydraS1SoulboundAttester, HydraS1Base, Attester {\\n using HydraS1Lib for HydraS1ProofData;\\n using HydraS1Lib for bytes;\\n using HydraS1Lib for Request;\\n\\n // The deployed contract will need to be authorized to write into the Attestation registry\\n // It should get write access on collections from AUTHORIZED_COLLECTION_ID_FIRST to AUTHORIZED_COLLECTION_ID_LAST.\\n uint256 public immutable AUTHORIZED_COLLECTION_ID_FIRST;\\n uint256 public immutable AUTHORIZED_COLLECTION_ID_LAST;\\n uint256 public immutable SOULBOUND_COOLDOWN_DURATION;\\n\\n mapping(uint256 => TicketData) internal _userTicketsData;\\n\\n /*******************************************************\\n INITIALIZATION FUNCTIONS \\n *******************************************************/\\n /**\\n * @dev Constructor. Initializes the contract\\n * @param attestationsRegistryAddress Attestations Registry contract on which the attester will write attestations\\n * @param hydraS1VerifierAddress ZK Snark Hydra-S1 Verifier contract\\n * @param availableRootsRegistryAddress Registry storing the available groups for this attester (e.g roots of registry merkle trees)\\n * @param commitmentMapperAddress commitment mapper's public key registry\\n * @param collectionIdFirst Id of the first collection in which the attester is supposed to record\\n * @param collectionIdLast Id of the last collection in which the attester is supposed to record\\n */\\n constructor(\\n address attestationsRegistryAddress,\\n address hydraS1VerifierAddress,\\n address availableRootsRegistryAddress,\\n address commitmentMapperAddress,\\n uint256 collectionIdFirst,\\n uint256 collectionIdLast,\\n uint256 soulboundCooldownDuration\\n )\\n Attester(attestationsRegistryAddress)\\n HydraS1Base(hydraS1VerifierAddress, availableRootsRegistryAddress, commitmentMapperAddress)\\n {\\n AUTHORIZED_COLLECTION_ID_FIRST = collectionIdFirst;\\n AUTHORIZED_COLLECTION_ID_LAST = collectionIdLast;\\n SOULBOUND_COOLDOWN_DURATION = soulboundCooldownDuration;\\n }\\n\\n /*******************************************************\\n MANDATORY FUNCTIONS TO OVERRIDE FROM ATTESTER.SOL\\n *******************************************************/\\n\\n /**\\n * @dev Throws if user attestations request is invalid\\n * Look into HydraS1Base for more details\\n * @param request users request. Claim of having an account part of a group of accounts\\n * @param proofData snark proof backing the claim\\n */\\n function _verifyRequest(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n override\\n {\\n HydraS1ProofData memory snarkProof = abi.decode(proofData, (HydraS1ProofData));\\n HydraS1ProofInput memory snarkInput = snarkProof._input();\\n HydraS1Claim memory claim = request._claim();\\n\\n // verifies that the proof corresponds to the claim\\n _validateInput(claim, snarkInput);\\n // verifies the proof validity\\n _verifyProof(snarkProof);\\n }\\n\\n /**\\n * @dev Throws if user attestations deletion request is not made by its owner\\n * @param attestations attestations to delete\\n */\\n function _verifyAttestationsDeletionRequest(Attestation[] memory attestations, bytes calldata)\\n internal\\n view\\n override\\n {\\n for (uint256 i = 0; i < attestations.length; i++) {\\n uint256 userTicket = abi.decode(attestations[0].extraData, (uint256));\\n if (_userTicketsData[userTicket].destination != msg.sender)\\n revert NotAttestationOwner(userTicket, msg.sender);\\n }\\n }\\n\\n /**\\n * @dev Returns the actual attestations constructed from the user request\\n * @param request users request. Claim of having an account part of a group of accounts\\n * @param proofData snark public input as well as snark proof\\n */\\n function buildAttestations(Request calldata request, bytes calldata proofData)\\n public\\n view\\n virtual\\n override(IAttester, Attester)\\n returns (Attestation[] memory)\\n {\\n HydraS1Claim memory claim = request._claim();\\n\\n Attestation[] memory attestations = new Attestation[](1);\\n\\n uint256 attestationCollectionId = AUTHORIZED_COLLECTION_ID_FIRST +\\n claim.groupProperties.groupIndex;\\n if (attestationCollectionId > AUTHORIZED_COLLECTION_ID_LAST)\\n revert CollectionIdOutOfBound(attestationCollectionId);\\n\\n // The issuer of attestations is the attester\\n address issuer = address(this);\\n // user sends the ticket as input in the data\\n uint256 userTicket = proofData._getTicket();\\n\\n attestations[0] = Attestation(\\n attestationCollectionId,\\n request.destination,\\n issuer,\\n claim.claimedValue,\\n claim.groupProperties.generationTimestamp,\\n abi.encode(userTicket)\\n );\\n\\n return (attestations);\\n }\\n\\n /*******************************************************\\n OPTIONAL HOOK VIRTUAL FUNCTIONS FROM ATTESTER.SOL\\n *******************************************************/\\n /**\\n * @dev Hook run before recording the attestation.\\n * Throws if ticket already used, not a renewal, and ticket on cooldown.\\n * @param request users request. Claim of having an account part of a group of accounts\\n * @param proofData provided to back the request. snark input and snark proof\\n */\\n function _beforeRecordAttestations(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n override\\n {\\n uint256 userTicket = proofData._getTicket();\\n TicketData memory userTicketData = _userTicketsData[userTicket];\\n\\n if (\\n userTicketData.destination != address(0) && userTicketData.destination != request.destination\\n ) {\\n if (_isOnCooldown(userTicketData)) revert TicketUsedAndOnCooldown(userTicketData);\\n _setTicketOnCooldown(userTicket);\\n }\\n _setDestinationForTicket(userTicket, request.destination);\\n }\\n\\n function _beforeDeleteAttestations(Attestation[] memory attestations, bytes calldata proofData)\\n internal\\n override\\n {\\n // we retrieve the ticketUsed from attestations extraData\\n for (uint256 i = 0; i < attestations.length; i++) {\\n uint256 userTicket = abi.decode(attestations[i].extraData, (uint256));\\n if (_isOnCooldown(_userTicketsData[userTicket]) == true) revert TicketFrozen(userTicket);\\n _userTicketsData[userTicket].destination = address(0);\\n }\\n }\\n\\n /*******************************************************\\n Hydra-S1 MANDATORY FUNCTIONS FROM Hydra-S1 Base Attester\\n *******************************************************/\\n\\n /**\\n * @dev Returns the ticket identifier from a user claim\\n * @param claim user Hydra-S1 claim = have an account with a specific value in a specific group\\n * ticket = hash(sourceSecretHash, ticketIdentifier), which is verified inside the snark\\n * users bring sourceSecretHash as private input in snark which guarantees privacy\\n \\n * Here we chose ticketIdentifier = hash(attesterAddress, claim.GroupId)\\n * Creates one ticket per group, per user and makes sure no collision with other attester's tickets\\n **/\\n function _getTicketIdentifierOfClaim(HydraS1Claim memory claim)\\n internal\\n view\\n override\\n returns (uint256)\\n {\\n uint256 ticketIdentifier = _encodeInSnarkField(address(this), claim.groupProperties.groupIndex);\\n return ticketIdentifier;\\n }\\n\\n /*******************************************************\\n Hydra-S1 Attester Specific Functions\\n *******************************************************/\\n\\n /**\\n * @dev Getter, returns the last attestation destination of a ticket\\n * @param userTicket ticket used\\n **/\\n function getDestinationOfTicket(uint256 userTicket) external view override returns (address) {\\n return _getDestinationOfTicket(userTicket);\\n }\\n\\n /**\\n * @dev Getter, returns the data linked to a ticket\\n * @param userTicket ticket used\\n **/\\n function getTicketData(uint256 userTicket) external view override returns (TicketData memory) {\\n return _getTicketData(userTicket);\\n }\\n\\n /**\\n * @dev returns whether a ticket is on cooldown or not\\n * @param userTicket ticket used\\n **/\\n function isTicketOnCooldown(uint256 userTicket) external view override returns (bool) {\\n return _isOnCooldown(_getTicketData(userTicket));\\n }\\n\\n function _setDestinationForTicket(uint256 userTicket, address destination) internal virtual {\\n _userTicketsData[userTicket].destination = destination;\\n emit TicketDestinationUpdated(userTicket, destination);\\n }\\n\\n function _setTicketOnCooldown(uint256 userTicket) internal {\\n _userTicketsData[userTicket].cooldownStart = uint32(block.timestamp);\\n emit TicketSetOnCooldown(userTicket);\\n }\\n\\n function _getDestinationOfTicket(uint256 userTicket) internal view returns (address) {\\n return _userTicketsData[userTicket].destination;\\n }\\n\\n function _isOnCooldown(TicketData memory userTicketData) internal view returns (bool) {\\n return userTicketData.cooldownStart + SOULBOUND_COOLDOWN_DURATION < block.timestamp;\\n }\\n\\n function _getTicketData(uint256 userTicket) internal view returns (TicketData memory) {\\n return _userTicketsData[userTicket];\\n }\\n\\n function _encodeInSnarkField(address addr, uint256 nb) internal pure returns (uint256) {\\n return uint256(keccak256(abi.encode(addr, nb))) % HydraS1Lib.SNARK_FIELD;\\n }\\n}\\n\",\"keccak256\":\"0xe72642edf2eecc2886aae203d09ac63f5515a1e51f0ad85b9da410aa59db6261\",\"license\":\"MIT\"},\"contracts/core/Attester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\nimport {IAttester} from './interfaces/IAttester.sol';\\nimport {IAttestationsRegistry} from './interfaces/IAttestationsRegistry.sol';\\nimport {Request, Attestation, AttestationData} from './libs/Structs.sol';\\n\\n/**\\n * @title Attester Abstract Contract\\n * @author Sismo\\n * @notice Contract to be inherited by Attesters\\n * All attesters that expect to be authorized in Sismo Protocol (i.e write access on the registry)\\n * are recommended to implemented this abstract contract\\n\\n * Take a look at the HydraS1SimpleAttester.sol for example on how to implement this abstract contract\\n *\\n * This contracts is built around two main external standard functions.\\n * They must NOT be override them, unless your really know what you are doing\\n \\n * - generateAttestations(request, proof) => will write attestations in the registry\\n * 1. (MANDATORY) Implement the buildAttestations() view function which generate attestations from user request\\n * 2. (MANDATORY) Implement teh _verifyRequest() internal function where to write checks\\n * 3. (OPTIONAL) Override _beforeRecordAttestations and _afterRecordAttestations hooks\\n\\n * - deleteAttestations(collectionId, owner, proof) => will delete attestations in the registry\\n * 1. (DEFAULT) By default this function throws (see _verifyAttestationsDeletionRequest)\\n * 2. (OPTIONAL) Override the _verifyAttestationsDeletionRequest so it no longer throws\\n * 3. (OPTIONAL) Override _beforeDeleteAttestations and _afterDeleteAttestations hooks\\n\\n * For more information: https://attesters.docs.sismo.io\\n **/\\nabstract contract Attester is IAttester {\\n // Registry where all attestations are stored\\n IAttestationsRegistry internal immutable ATTESTATIONS_REGISTRY;\\n\\n /**\\n * @dev Constructor\\n * @param attestationsRegistryAddress The address of the AttestationsRegistry contract storing attestations\\n */\\n constructor(address attestationsRegistryAddress) {\\n ATTESTATIONS_REGISTRY = IAttestationsRegistry(attestationsRegistryAddress);\\n }\\n\\n /**\\n * @dev Main external function. Allows to generate attestations by making a request and submitting proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that has been recorded\\n */\\n function generateAttestations(Request calldata request, bytes calldata proofData)\\n external\\n override\\n returns (Attestation[] memory)\\n {\\n // Verify if request is valid by verifying against proof\\n _verifyRequest(request, proofData);\\n\\n // Generate the actual attestations from user request\\n Attestation[] memory attestations = buildAttestations(request, proofData);\\n\\n _beforeRecordAttestations(request, proofData);\\n\\n ATTESTATIONS_REGISTRY.recordAttestations(attestations);\\n\\n _afterRecordAttestations(attestations);\\n\\n for (uint256 i = 0; i < attestations.length; i++) {\\n emit AttestationGenerated(attestations[i]);\\n }\\n\\n return attestations;\\n }\\n\\n /**\\n * @dev External facing function. Allows to delete attestations by submitting proof\\n * @param collectionIds Collection identifier of attestations to delete\\n * @param attestationsOwner Owner of attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n * @return attestations Attestations that were deleted\\n */\\n function deleteAttestations(\\n uint256[] calldata collectionIds,\\n address attestationsOwner,\\n bytes calldata proofData\\n ) external override returns (Attestation[] memory) {\\n // fetch attestations from the registry\\n Attestation[] memory attestationsToDelete;\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n (\\n address issuer,\\n uint256 attestationValue,\\n uint32 timestamp,\\n bytes memory extraData\\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\\n\\n attestationsToDelete[i] = (\\n Attestation(\\n collectionIds[i],\\n attestationsOwner,\\n issuer,\\n attestationValue,\\n timestamp,\\n extraData\\n )\\n );\\n }\\n\\n _verifyAttestationsDeletionRequest(attestationsToDelete, proofData);\\n\\n _beforeDeleteAttestations(attestationsToDelete, proofData);\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationsToDelete);\\n\\n _afterDeleteAttestations(attestationsToDelete, proofData);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n emit AttestationDeleted(attestationsToDelete[i]);\\n }\\n return attestationsToDelete;\\n }\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should build attestations from the user request and the proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(Request calldata request, bytes calldata proofData)\\n public\\n view\\n virtual\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev Attestation registry getter\\n * @return attestationRegistry\\n */\\n function getAttestationRegistry() external view override returns (IAttestationsRegistry) {\\n return ATTESTATIONS_REGISTRY;\\n }\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should verify the user request is valid\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _verifyRequest(Request calldata request, bytes calldata proofData) internal virtual;\\n\\n /**\\n * @dev Optional: must be overridden by attesters that want to feature attestations deletion\\n * Default behavior: throws\\n * It should verify attestations deletion request is valid\\n * @param attestations Attestations that will be deleted\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _verifyAttestationsDeletionRequest(\\n Attestation[] memory attestations,\\n bytes calldata proofData\\n ) internal virtual {\\n revert AttestationDeletionNotImplemented();\\n }\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called before recording attestations in the registry\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _beforeRecordAttestations(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n\\n /**\\n * @dev (Optional) Can be overridden in attesters inheriting this contract\\n * Will be called after recording an attestation\\n * @param attestations Recorded attestations\\n */\\n function _afterRecordAttestations(Attestation[] memory attestations) internal virtual {}\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called before deleting attestations from the registry\\n * @param attestations Attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n */\\n function _beforeDeleteAttestations(Attestation[] memory attestations, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called after deleting attestations from the registry\\n * @param attestations Attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n */\\n function _afterDeleteAttestations(Attestation[] memory attestations, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n}\\n\",\"keccak256\":\"0x37683c6752d4dc911459084eb191c1045f3bf34e2143f3db3d298a66c971a106\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttestationsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Attestation, AttestationData} from '../libs/Structs.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry {\\n event AttestationRecorded(Attestation attestation);\\n event AttestationDeleted(Attestation attestation);\\n\\n /**\\n * @dev Main function to be called by authorized issuers\\n * @param attestations Attestations to be recorded (creates a new one or overrides an existing one)\\n */\\n function recordAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Delete function to be called by authorized issuers\\n * @param attestations Attestations to be deleted\\n */\\n function deleteAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Returns whether a user has an attestation from a collection\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function hasAttestation(uint256 collectionId, address owner) external returns (bool);\\n\\n /**\\n * @dev Getter of the data of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationData(uint256 collectionId, address owner)\\n external\\n view\\n returns (AttestationData memory);\\n\\n /**\\n * @dev Getter of the value of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationValue(uint256 collectionId, address owner) external view returns (uint256);\\n\\n /**\\n * @dev Getter of the data of a specific attestation as tuple\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationDataTuple(uint256 collectionId, address owner)\\n external\\n view\\n returns (\\n address,\\n uint256,\\n uint32,\\n bytes memory\\n );\\n\\n /**\\n * @dev Getter of the extraData of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationExtraData(uint256 collectionId, address owner)\\n external\\n view\\n returns (bytes memory);\\n\\n /**\\n * @dev Getter of the issuer of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationIssuer(uint256 collectionId, address owner)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @dev Getter of the timestamp of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationTimestamp(uint256 collectionId, address owner)\\n external\\n view\\n returns (uint32);\\n\\n /**\\n * @dev Getter of the data of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationDataBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (AttestationData[] memory);\\n\\n /**\\n * @dev Getter of the values of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationValueBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xb5e25bd7e0372c9973e582fb7fe96318c145831a5452d8c79eb848a7464b0297\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Request, Attestation} from '../libs/Structs.sol';\\nimport {IAttestationsRegistry} from '../interfaces/IAttestationsRegistry.sol';\\n\\n/**\\n * @title IAttester\\n * @author Sismo\\n * @notice This is the interface for the attesters in Sismo Protocol\\n */\\ninterface IAttester {\\n event AttestationGenerated(Attestation attestation);\\n\\n event AttestationDeleted(Attestation attestation);\\n\\n error AttestationDeletionNotImplemented();\\n\\n /**\\n * @dev Main external function. Allows to generate attestations by making a request and submitting proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that has been recorded\\n */\\n function generateAttestations(Request calldata request, bytes calldata proofData)\\n external\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev External facing function. Allows to delete an attestation by submitting proof\\n * @param collectionIds Collection identifier of attestations to delete\\n * @param attestationsOwner Owner of attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n * @return attestations Attestations that was deleted\\n */\\n function deleteAttestations(\\n uint256[] calldata collectionIds,\\n address attestationsOwner,\\n bytes calldata proofData\\n ) external returns (Attestation[] memory);\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should build attestations from the user request and the proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(Request calldata request, bytes calldata proofData)\\n external\\n view\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev Attestation registry address getter\\n * @return attestationRegistry Address of the registry\\n */\\n function getAttestationRegistry() external view returns (IAttestationsRegistry);\\n}\\n\",\"keccak256\":\"0xafe9c1a742d7570033c8d74cee203e09ee9b7461eaed6d2ca77697449e2ce95d\",\"license\":\"MIT\"},\"contracts/core/libs/Structs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title Attestations Registry State\\n * @author Sismo\\n * @notice This contract holds all of the storage variables and data\\n * structures used by the AttestationsRegistry and parent\\n * contracts.\\n */\\n\\n// User Attestation Request, can be made by any user\\n// The context of an Attestation Request is a specific attester contract\\n// Each attester has groups of accounts in its available data\\n// eg: for a specific attester:\\n// group 1 <=> accounts that sent txs on mainnet\\n// group 2 <=> accounts that sent txs on polygon\\n// eg: for another attester:\\n// group 1 <=> accounts that sent eth txs in 2022\\n// group 2 <=> accounts sent eth txs in 2021\\nstruct Request {\\n // implicit address attester;\\n // implicit uint256 chainId;\\n Claim[] claims;\\n address destination; // destination that will receive the end attestation\\n}\\n\\nstruct Claim {\\n uint256 groupId; // user claims to have an account in this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n bytes extraData; // arbitrary data, may be required by the attester to verify claims or generate a specific attestation\\n}\\n\\n/**\\n * @dev Attestation Struct. This is the struct receive as argument by the Attestation Registry.\\n * @param collectionId Attestation collection\\n * @param owner Attestation collection\\n * @param issuer Attestation collection\\n * @param value Attestation collection\\n * @param timestamp Attestation collection\\n * @param extraData Attestation collection\\n */\\nstruct Attestation {\\n // implicit uint256 chainId;\\n uint256 collectionId; // Id of the attestation collection (in the registry)\\n address owner; // Owner of the attestation\\n address issuer; // Contract that created or last updated the record.\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Timestamp chosen by the attester, should correspond to the effective date of the attestation\\n // it is different from the recording timestamp (date when the attestation was recorded)\\n // e.g a proof of NFT ownership may have be recorded today which is 2 month old data.\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\\n// Attestation Data, stored in the registry\\n// The context is a specific owner of a specific collection\\nstruct AttestationData {\\n // implicit uint256 chainId\\n // implicit uint256 collectionId - from context\\n // implicit owner\\n address issuer; // Address of the contract that recorded the attestation\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Effective date of issuance of the attestation. (can be different from the recording timestamp)\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\",\"keccak256\":\"0x893d9a10429878dd4077388ff4da954c20b86a3c172a7bbdd10a01eb5d39b6a0\",\"license\":\"MIT\"},\"contracts/periphery/utils/AvailableRootsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {IAvailableRootsRegistry} from './interfaces/IAvailableRootsRegistry.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\n\\n/**\\n * @title Attesters Groups Registry\\n * @author Sismo\\n * @notice This contract stores that data required by attesters to be available so they can verify user claims\\n * This contract is deployed behind a proxy and this implementation is focused on storing merkle roots\\n * For more information: https://available-roots-registry.docs.sismo.io\\n *\\n **/\\ncontract AvailableRootsRegistry is IAvailableRootsRegistry, Initializable, Ownable {\\n mapping(address => mapping(uint256 => bool)) public _roots;\\n\\n /**\\n * @dev Constructor\\n * @param owner Owner of the contract, can register/ unregister roots\\n */\\n constructor(address owner) {\\n initialize(owner);\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n */\\n function initialize(address owner) public initializer {\\n _transferOwnership(owner);\\n }\\n\\n /**\\n * @dev Register a root available for an attester\\n * @param attester Attester which will have the root available\\n * @param root Root to register\\n */\\n function registerRootForAttester(address attester, uint256 root) external onlyOwner {\\n if (attester == address(0)) revert CannotRegisterForZeroAddress();\\n _registerRootForAttester(attester, root);\\n }\\n\\n /**\\n * @dev Unregister a root for an attester\\n * @param attester Attester which will no longer have the root available\\n * @param root Root to unregister\\n */\\n function unregisterRootForAttester(address attester, uint256 root) external onlyOwner {\\n if (attester == address(0)) revert CannotUnregisterForZeroAddress();\\n _unregisterRootForAttester(attester, root);\\n }\\n\\n /**\\n * @dev Registers a root, available for all contracts\\n * @param root Root to register\\n */\\n function registerRootForAll(uint256 root) external onlyOwner {\\n _registerRootForAttester(address(0), root);\\n }\\n\\n /**\\n * @dev Unregister a root, available for all contracts\\n * @param root Root to unregister\\n */\\n function unregisterRootForAll(uint256 root) external onlyOwner {\\n _unregisterRootForAttester(address(0), root);\\n }\\n\\n /**\\n * @dev returns whether a root is available for a caller (msg.sender)\\n * @param root root to check whether it is registered for me or not\\n */\\n function isRootAvailableForMe(uint256 root) external view returns (bool) {\\n return _roots[_msgSender()][root] || _roots[address(0)][root];\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param attester Owner of the contract, can update public key and address\\n * @param root Owner of the contract, can update public key and address\\n */\\n function isRootAvailableForAttester(address attester, uint256 root) external view returns (bool) {\\n return _roots[attester][root] || _roots[address(0)][root];\\n }\\n\\n function _registerRootForAttester(address attester, uint256 root) internal {\\n _roots[attester][root] = true;\\n if (attester == address(0)) {\\n emit RegisteredRootForAll(root);\\n } else {\\n emit RegisteredRootForAttester(attester, root);\\n }\\n }\\n\\n function _unregisterRootForAttester(address attester, uint256 root) internal {\\n _roots[attester][root] = false;\\n if (attester == address(0)) {\\n emit UnregisteredRootForAll(root);\\n } else {\\n emit UnregisteredRootForAttester(attester, root);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9329ecaf60ffe978c8ab4360e0a8f9bd36e2549e89d672dd39ae80f9a562f9a9\",\"license\":\"MIT\"},\"contracts/periphery/utils/CommitmentMapperRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\nimport {ICommitmentMapperRegistry} from './interfaces/ICommitmentMapperRegistry.sol';\\n\\n/**\\n * @title Commitment Mapper Registry Contract\\n * @author Sismo\\n * @notice This contract stores information about the commitment mapper.\\n * Its ethereum address and its EdDSA public key\\n * For more information: https://commitment-mapper.docs.sismo.io\\n *\\n **/\\ncontract CommitmentMapperRegistry is ICommitmentMapperRegistry, Initializable, Ownable {\\n uint256[2] internal _commitmentMapperPubKey;\\n address _commitmentMapperAddress;\\n\\n /**\\n * @dev Constructor\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n constructor(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) {\\n initialize(owner, commitmentMapperEdDSAPubKey, commitmentMapperAddress);\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n function initialize(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) public initializer {\\n _transferOwnership(owner);\\n _updateCommitmentMapperEdDSAPubKey(commitmentMapperEdDSAPubKey);\\n _updateCommitmentMapperAddress(commitmentMapperAddress);\\n }\\n\\n /**\\n * @dev Updates the EdDSA public key\\n * @param newEdDSAPubKey new EdDSA pubic key\\n */\\n function updateCommitmentMapperEdDSAPubKey(uint256[2] memory newEdDSAPubKey) external onlyOwner {\\n _updateCommitmentMapperEdDSAPubKey(newEdDSAPubKey);\\n }\\n\\n /**\\n * @dev Updates the address\\n * @param newAddress new address\\n */\\n function updateCommitmentMapperAddress(address newAddress) external onlyOwner {\\n _updateCommitmentMapperAddress(newAddress);\\n }\\n\\n /**\\n * @dev Getter of the EdDSA public key of the commitment mapper\\n */\\n function getEdDSAPubKey() external view override returns (uint256[2] memory) {\\n return _commitmentMapperPubKey;\\n }\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getAddress() external view override returns (address) {\\n return _commitmentMapperAddress;\\n }\\n\\n function _updateCommitmentMapperAddress(address newAddress) internal {\\n _commitmentMapperAddress = newAddress;\\n emit UpdatedCommitmentMapperAddress(newAddress);\\n }\\n\\n function _updateCommitmentMapperEdDSAPubKey(uint256[2] memory pubKey) internal {\\n _commitmentMapperPubKey = pubKey;\\n emit UpdatedCommitmentMapperEdDSAPubKey(pubKey);\\n }\\n}\\n\",\"keccak256\":\"0xacb5347ee1a0e8dc25a1ce3e6fbb427db646e833ff8508909454cad7950418d4\",\"license\":\"MIT\"},\"contracts/periphery/utils/interfaces/IAvailableRootsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title IAvailableRootsRegistry\\n * @author Sismo\\n * @notice Interface for (Merkle) Roots Registry\\n */\\ninterface IAvailableRootsRegistry {\\n event RegisteredRootForAttester(address attester, uint256 root);\\n event RegisteredRootForAll(uint256 root);\\n event UnregisteredRootForAttester(address attester, uint256 root);\\n event UnregisteredRootForAll(uint256 root);\\n\\n error CannotRegisterForZeroAddress();\\n error CannotUnregisterForZeroAddress();\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n */\\n function initialize(address owner) external;\\n\\n /**\\n * @dev Register a root available for an attester\\n * @param attester Attester which will have the root available\\n * @param root Root to register\\n */\\n function registerRootForAttester(address attester, uint256 root) external;\\n\\n /**\\n * @dev Unregister a root for an attester\\n * @param attester Attester which will no longer have the root available\\n * @param root Root to unregister\\n */\\n function unregisterRootForAttester(address attester, uint256 root) external;\\n\\n /**\\n * @dev Registers a root, available for all contracts\\n * @param root Root to register\\n */\\n function registerRootForAll(uint256 root) external;\\n\\n /**\\n * @dev Unregister a root, available for all contracts\\n * @param root Root to unregister\\n */\\n function unregisterRootForAll(uint256 root) external;\\n\\n /**\\n * @dev returns whether a root is available for a caller (msg.sender)\\n * @param root root to check whether it is registered for me or not\\n */\\n function isRootAvailableForMe(uint256 root) external view returns (bool);\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param attester Owner of the contract, can update public key and address\\n * @param root Owner of the contract, can update public key and address\\n */\\n function isRootAvailableForAttester(address attester, uint256 root) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x87f5035b58936a8458a22f3cf1b3865bd798813310d86af41af74680978c97c8\",\"license\":\"MIT\"},\"contracts/periphery/utils/interfaces/ICommitmentMapperRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\ninterface ICommitmentMapperRegistry {\\n event UpdatedCommitmentMapperEdDSAPubKey(uint256[2] newEdDSAPubKey);\\n event UpdatedCommitmentMapperAddress(address newAddress);\\n error PubKeyNotValid(uint256[2] pubKey);\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n function initialize(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) external;\\n\\n /**\\n * @dev Updates the EdDSA public key\\n * @param newEdDSAPubKey new EdDSA pubic key\\n */\\n function updateCommitmentMapperEdDSAPubKey(uint256[2] memory newEdDSAPubKey) external;\\n\\n /**\\n * @dev Updates the address\\n * @param newAddress new address\\n */\\n function updateCommitmentMapperAddress(address newAddress) external;\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getEdDSAPubKey() external view returns (uint256[2] memory);\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getAddress() external view returns (address);\\n}\\n\",\"keccak256\":\"0x8d6298b442dde99ee5a9cc989ada6ea808383a08b1e9bb1d4c2b58adc01eec69\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101606040523480156200001257600080fd5b506040516200218c3803806200218c833981016040819052620000359162000088565b6001600160a01b0395861660805293851660c05291841660a0529390921660e05261010092909252610120526101405262000102565b80516001600160a01b03811681146200008357600080fd5b919050565b600080600080600080600060e0888a031215620000a457600080fd5b620000af886200006b565b9650620000bf602089016200006b565b9550620000cf604089016200006b565b9450620000df606089016200006b565b93506080880151925060a0880151915060c0880151905092959891949750929550565b60805160a05160c05160e051610100516101205161014051611ff16200019b6000396000818161013e01526108d30152600081816101ad01526103c901526000818161017301526103a101526000818161023a015281816104e40152818161066601526107a00152600081816101d10152610ec701526000818160d60152610f6301526000818161011501526110be0152611ff16000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063918447af1161008c578063bfa6658511610066578063bfa6658514610238578063c776adde1461025e578063d9895e6a14610271578063e60f999f146102ae57600080fd5b8063918447af146101cf57806392cf369d146101f5578063af411a301461021857600080fd5b80632254f98e146100d457806346657fe9146101135780634e5cf9331461013957806354846d7a1461016e57806363e4afc2146101955780637000b051146101a8575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006100f6565b6101607f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161010a565b6101607f000000000000000000000000000000000000000000000000000000000000000081565b6100f66101a3366004611537565b6102c1565b6101607f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006100f6565b610208610203366004611537565b6102e0565b604051901515815260200161010a565b61022b610226366004611599565b6102f3565b60405161010a91906116c5565b7f00000000000000000000000000000000000000000000000000000000000000006100f6565b61022b61026c36600461174c565b6104ce565b61028461027f366004611537565b610745565b6040805182516001600160a01b0316815260209283015163ffffffff16928101929092520161010a565b61022b6102bc366004611599565b610762565b6000818152600160205260408120546001600160a01b03165b92915050565b60006102da6102ee8361087e565b6108ce565b60606000610308610303866118af565b61090e565b60408051600180825281830190925291925060009190816020015b6103746040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b8152602001906001900390816103235750506060830151519091506000906103c5906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611a3f565b90507f000000000000000000000000000000000000000000000000000000000000000081111561041057604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b30600061041d8888610993565b90506040518060c001604052808481526020018a60200160208101906104439190611a57565b6001600160a01b03168152602001836001600160a01b031681526020018660200151815260200186606001516020015163ffffffff1681526020018260405160200161049191815260200190565b604051602081830303815290604052815250846000815181106104b6576104b6611a74565b60209081029190910101525091979650505050505050565b60608060005b86811015610638576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78d8d8881811061052357610523611a74565b905060200201358c6040518363ffffffff1660e01b815260040161055a9291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610577573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261059f9190810190611a9e565b93509350935093506040518060c001604052808d8d888181106105c4576105c4611a74565b9050602002013581526020018b6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061061657610616611a74565b602002602001018190525050505050808061063090611b4e565b9150506104d4565b506106448185856109b8565b61064f818585610a53565b6040516373e4ca1b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e7c994369061069b9084906004016116c5565b600060405180830381600087803b1580156106b557600080fd5b505af11580156106c9573d6000803e3d6000fd5b5050505060005b8681101561073a577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061070b5761070b611a74565b60200260200101516040516107209190611b67565b60405180910390a18061073281611b4e565b9150506106d0565b509695505050505050565b60408051808201909152600080825260208201526102da8261087e565b606061076f848484610b29565b600061077c8585856102f3565b9050610789858585610b71565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906107d59084906004016116c5565b600060405180830381600087803b1580156107ef57600080fd5b505af1158015610803573d6000803e3d6000fd5b5050505060005b8151811015610875577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc82828151811061084657610846611a74565b602002602001015160405161085b9190611b67565b60405180910390a18061086d81611b4e565b91505061080a565b50949350505050565b6040805180820190915260008082526020820152506000908152600160209081526040918290208251808401909352546001600160a01b0381168352600160a01b900463ffffffff169082015290565b6000427f0000000000000000000000000000000000000000000000000000000000000000836020015163ffffffff166109079190611a3f565b1092915050565b610916611463565b6000826000015160008151811061092f5761092f611a74565b6020026020010151905061094281610c65565b6000816040015180602001905181019061095c9190611b8a565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b6000806109a283850185611cbb565b905060006109af82610ca9565b95945050505050565b60005b8351811015610a4d576000846000815181106109d9576109d9611a74565b602002602001015160a001518060200190518101906109f89190611d8c565b6000818152600160205260409020549091506001600160a01b03163314610a3a5760405162f8a2bf60e81b815260048101829052336024820152604401610407565b5080610a4581611b4e565b9150506109bb565b50505050565b60005b8351811015610a4d576000848281518110610a7357610a73611a74565b602002602001015160a00151806020019051810190610a929190611d8c565b6000818152600160209081526040918290208251808401909352546001600160a01b0381168352600160a01b900463ffffffff1690820152909150610ad6906108ce565b1515600103610afb57604051632fcfdde360e11b815260048101829052602401610407565b600090815260016020526040902080546001600160a01b031916905580610b2181611b4e565b915050610a56565b6000610b3782840184611cbb565b90506000610b4482610cbf565b90506000610b54610303876118af565b9050610b608183610d69565b610b6983611094565b505050505050565b6000610b7d8383610993565b6000818152600160209081526040918290208251808401909352546001600160a01b038116808452600160a01b90910463ffffffff16918301919091529192509015801590610bf15750610bd76040860160208701611a57565b6001600160a01b031681600001516001600160a01b031614155b15610c4257610bff816108ce565b15610c3957604051633f8ffaa560e01b815281516001600160a01b03166004820152602082015163ffffffff166024820152604401610407565b610c428261122d565b610c5b82610c566040880160208901611a57565b61128e565b5050505050565b50565b6000610c7482604001516112f4565b82519091508114610ca55781516040516337e3d1ab60e01b8152610407918391600401918252602082015260400190565b5050565b602081015160009060065b602002015192915050565b610cc76114c6565b604051806101200160405280610cdc84611329565b6001600160a01b03168152602001610cf384611337565b8152602001610d0184611346565b8152602001610d0f84611355565b8152602001610d1d84610ca9565b8152602001610d2b84611364565b8152602001610d3984611373565b8152602001610d518460200151610120015160011490565b15158152602001610d6184611382565b905292915050565b815160c082015114610d9e57815160c082015160405163fe405c7760e01b815260048101929092526024820152604401610407565b81606001516040015115158160e00151151503610de957606082015160409081015160e08301519151634629f1b560e11b815290151560048201529015156024820152604401610407565b81604001516001600160a01b031681600001516001600160a01b031614610e3d57604082810151825191516370a8d99b60e11b81526001600160a01b03918216600482015291166024820152604401610407565b46816020015114610e70576020810151604051630432cec160e31b81524660048201526024810191909152604401610407565b81602001518160a0015114610eab57602082015160a0820151604051630626ade360e41b815260048101929092526024820152604401610407565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015610f16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3a9190611da5565b610f5f57806040015160405163cbfe7bc360e01b815260040161040791815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa158015610fbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe29190611dc0565b80516101008401515191925014158061100957506020808201516101008401519091015114155b15611053578051602080830151610100850151805192015160405163318d812b60e01b81526004810194909452602484019190915260448301919091526064820152608401610407565b600061105e846113da565b905080836060015114610a4d5760608301516040516377bb6d2760e11b8152610407918391600401918252602082015260400190565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f6946110f794909392909190600401611e3c565b602060405180830381865afa925050508015611130575060408051601f3d908101601f1916820190925261112d91810190611da5565b60015b6112065761113c611ec0565b806308c379a0036111755750611150611edc565b8061115b57506111b4565b8060405162dd577760e81b81526004016104079190611f66565b634e487b71036111b457611187611f79565b9061119257506111b4565b60405162dd577760e81b81526020600482015260006024820152604401610407565b3d8080156111de576040519150601f19603f3d011682016040523d82523d6000602084013e6111e3565b606091505b5060405162dd577760e81b81526020600482015260006024820152604401610407565b80610ca55760405162dd577760e81b81526020600482015260006024820152604401610407565b600081815260016020908152604091829020805463ffffffff60a01b1916600160a01b4263ffffffff160217905590518281527f49ab97b1dc68eafe79e6e7f8ff996d00259888e84cb401cf9ec8d39adf7ab196910160405180910390a150565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b805160208201206000906102da907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190611f99565b602081015160009081610cb4565b60208101516000906001610cb4565b60208101516000906004610cb4565b60208101516000906005610cb4565b60208101516000906007610cb4565b60208101516000906008610cb4565b61138a611519565b604051806040016040528083602001516002600a81106113ac576113ac611a74565b6020020151815260200183602001516003600a81106113cd576113cd611a74565b6020020151905292915050565b6000806113f8308460600151600001516001600160801b03166113ff565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6113f89190611f99565b6040518060800160405280600081526020016000815260200160006001600160a01b031681526020016114c1604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b905290565b60405180610120016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016114c15b60405180604001604052806002906020820280368337509192915050565b60006020828403121561154957600080fd5b5035919050565b60008083601f84011261156257600080fd5b50813567ffffffffffffffff81111561157a57600080fd5b60208301915083602082850101111561159257600080fd5b9250929050565b6000806000604084860312156115ae57600080fd5b833567ffffffffffffffff808211156115c657600080fd5b90850190604082880312156115da57600080fd5b909350602085013590808211156115f057600080fd5b506115fd86828701611550565b9497909650939450505050565b60005b8381101561162557818101518382015260200161160d565b83811115610a4d5750506000910152565b6000815180845261164e81602086016020860161160a565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a08501526116bd60c0850182611636565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561171a57603f19888603018452611708858351611662565b945092850192908501906001016116ec565b5092979650505050505050565b6001600160a01b0381168114610c6257600080fd5b803561174781611727565b919050565b60008060008060006060868803121561176457600080fd5b853567ffffffffffffffff8082111561177c57600080fd5b818801915088601f83011261179057600080fd5b81358181111561179f57600080fd5b8960208260051b85010111156117b457600080fd5b602083019750809650506117ca6020890161173c565b945060408801359150808211156117e057600080fd5b506117ed88828901611550565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b6040810181811067ffffffffffffffff82111715611834576118346117fe565b60405250565b6060810181811067ffffffffffffffff82111715611834576118346117fe565b601f8201601f1916810167ffffffffffffffff81118282101715611880576118806117fe565b6040525050565b600067ffffffffffffffff8211156118a1576118a16117fe565b50601f01601f191660200190565b600060408083360312156118c257600080fd5b80516118cd81611814565b833567ffffffffffffffff808211156118e557600080fd5b9085019036601f8301126118f857600080fd5b813560208282111561190c5761190c6117fe565b8160051b865161191e8383018261185a565b9283528481018201928281013685111561193757600080fd5b83870192505b84831015611a0b578235868111156119555760008081fd5b8701606036829003601f190181131561196e5760008081fd5b8a516119798161183a565b8287013581528b8301358188015290820135908882111561199a5760008081fd5b9181019136603f8401126119b057600091508182fd5b8683013591506119bf82611887565b8c516119cb828261185a565b838152368e8587010111156119e257600091508182fd5b838e86018a830137600093810189019390935250808c019190915282525091830191830161193d565b50865250611a1a88820161173c565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611a5257611a52611a29565b500190565b600060208284031215611a6957600080fd5b81356113f881611727565b634e487b7160e01b600052603260045260246000fd5b805163ffffffff8116811461174757600080fd5b60008060008060808587031215611ab457600080fd5b8451611abf81611727565b60208601519094509250611ad560408601611a8a565b9150606085015167ffffffffffffffff811115611af157600080fd5b8501601f81018713611b0257600080fd5b8051611b0d81611887565b604051611b1a828261185a565b828152896020848601011115611b2f57600080fd5b611b4083602083016020870161160a565b969995985093965050505050565b600060018201611b6057611b60611a29565b5060010190565b6020815260006113f86020830184611662565b8051801515811461174757600080fd5b600060608284031215611b9c57600080fd5b6040516060810181811067ffffffffffffffff82111715611bbf57611bbf6117fe565b60405282516001600160801b0381168114611bd957600080fd5b8152611be760208401611a8a565b6020820152611bf860408401611b7a565b60408201529392505050565b600082601f830112611c1557600080fd5b604051611c2181611814565b806040840185811115611c3357600080fd5b845b81811015611c4d578035835260209283019201611c35565b509195945050505050565b600082601f830112611c6957600080fd5b60405161014080820182811067ffffffffffffffff82111715611c8e57611c8e6117fe565b60405283018185821115611ca157600080fd5b845b82811015611c4d578035825260209182019101611ca3565b6000818303610240811215611ccf57600080fd5b60408051611cdc81611814565b61010080841215611cec57600080fd5b82519350611cf98461183a565b611d038787611c04565b845286605f870112611d1457600080fd5b8251611d1f81611814565b8060c0880189811115611d3157600080fd5b8589015b81811015611d5657611d478b82611c04565b83526020909201918601611d35565b50826020880152611d678a82611c04565b86880152505050838252611d7d87828801611c58565b60208301525095945050505050565b600060208284031215611d9e57600080fd5b5051919050565b600060208284031215611db757600080fd5b6113f882611b7a565b600060408284031215611dd257600080fd5b82601f830112611de157600080fd5b604051611ded81611814565b806040840185811115611dff57600080fd5b845b81811015611c4d578051835260209283019201611e01565b8060005b6002811015610a4d578151845260209384019390910190600101611e1d565b6102408101611e4b8287611e19565b60408083018660005b6002811015611e7b57611e68838351611e19565b9183019160209190910190600101611e54565b50505050611e8c60c0830185611e19565b61010082018360005b600a811015611eb4578151835260209283019290910190600101611e95565b50505095945050505050565b600060033d1115611ed95760046000803e5060005160e01c5b90565b600060443d1015611eea5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611f1a57505050505090565b8285019150815181811115611f325750505050505090565b843d8701016020828501011115611f4c5750505050505090565b611f5b6020828601018761185a565b509095945050505050565b6020815260006113f86020830184611636565b60008060233d1115611f95576020600460003e50506000516001905b9091565b600082611fb657634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220f1374674d2143dc1e1f8e0666c58769f2e4bc209220c094f513f5b717a358ad464736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063918447af1161008c578063bfa6658511610066578063bfa6658514610238578063c776adde1461025e578063d9895e6a14610271578063e60f999f146102ae57600080fd5b8063918447af146101cf57806392cf369d146101f5578063af411a301461021857600080fd5b80632254f98e146100d457806346657fe9146101135780634e5cf9331461013957806354846d7a1461016e57806363e4afc2146101955780637000b051146101a8575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006100f6565b6101607f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161010a565b6101607f000000000000000000000000000000000000000000000000000000000000000081565b6100f66101a3366004611537565b6102c1565b6101607f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006100f6565b610208610203366004611537565b6102e0565b604051901515815260200161010a565b61022b610226366004611599565b6102f3565b60405161010a91906116c5565b7f00000000000000000000000000000000000000000000000000000000000000006100f6565b61022b61026c36600461174c565b6104ce565b61028461027f366004611537565b610745565b6040805182516001600160a01b0316815260209283015163ffffffff16928101929092520161010a565b61022b6102bc366004611599565b610762565b6000818152600160205260408120546001600160a01b03165b92915050565b60006102da6102ee8361087e565b6108ce565b60606000610308610303866118af565b61090e565b60408051600180825281830190925291925060009190816020015b6103746040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b8152602001906001900390816103235750506060830151519091506000906103c5906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611a3f565b90507f000000000000000000000000000000000000000000000000000000000000000081111561041057604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b30600061041d8888610993565b90506040518060c001604052808481526020018a60200160208101906104439190611a57565b6001600160a01b03168152602001836001600160a01b031681526020018660200151815260200186606001516020015163ffffffff1681526020018260405160200161049191815260200190565b604051602081830303815290604052815250846000815181106104b6576104b6611a74565b60209081029190910101525091979650505050505050565b60608060005b86811015610638576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78d8d8881811061052357610523611a74565b905060200201358c6040518363ffffffff1660e01b815260040161055a9291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610577573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261059f9190810190611a9e565b93509350935093506040518060c001604052808d8d888181106105c4576105c4611a74565b9050602002013581526020018b6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061061657610616611a74565b602002602001018190525050505050808061063090611b4e565b9150506104d4565b506106448185856109b8565b61064f818585610a53565b6040516373e4ca1b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e7c994369061069b9084906004016116c5565b600060405180830381600087803b1580156106b557600080fd5b505af11580156106c9573d6000803e3d6000fd5b5050505060005b8681101561073a577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061070b5761070b611a74565b60200260200101516040516107209190611b67565b60405180910390a18061073281611b4e565b9150506106d0565b509695505050505050565b60408051808201909152600080825260208201526102da8261087e565b606061076f848484610b29565b600061077c8585856102f3565b9050610789858585610b71565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906107d59084906004016116c5565b600060405180830381600087803b1580156107ef57600080fd5b505af1158015610803573d6000803e3d6000fd5b5050505060005b8151811015610875577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc82828151811061084657610846611a74565b602002602001015160405161085b9190611b67565b60405180910390a18061086d81611b4e565b91505061080a565b50949350505050565b6040805180820190915260008082526020820152506000908152600160209081526040918290208251808401909352546001600160a01b0381168352600160a01b900463ffffffff169082015290565b6000427f0000000000000000000000000000000000000000000000000000000000000000836020015163ffffffff166109079190611a3f565b1092915050565b610916611463565b6000826000015160008151811061092f5761092f611a74565b6020026020010151905061094281610c65565b6000816040015180602001905181019061095c9190611b8a565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b6000806109a283850185611cbb565b905060006109af82610ca9565b95945050505050565b60005b8351811015610a4d576000846000815181106109d9576109d9611a74565b602002602001015160a001518060200190518101906109f89190611d8c565b6000818152600160205260409020549091506001600160a01b03163314610a3a5760405162f8a2bf60e81b815260048101829052336024820152604401610407565b5080610a4581611b4e565b9150506109bb565b50505050565b60005b8351811015610a4d576000848281518110610a7357610a73611a74565b602002602001015160a00151806020019051810190610a929190611d8c565b6000818152600160209081526040918290208251808401909352546001600160a01b0381168352600160a01b900463ffffffff1690820152909150610ad6906108ce565b1515600103610afb57604051632fcfdde360e11b815260048101829052602401610407565b600090815260016020526040902080546001600160a01b031916905580610b2181611b4e565b915050610a56565b6000610b3782840184611cbb565b90506000610b4482610cbf565b90506000610b54610303876118af565b9050610b608183610d69565b610b6983611094565b505050505050565b6000610b7d8383610993565b6000818152600160209081526040918290208251808401909352546001600160a01b038116808452600160a01b90910463ffffffff16918301919091529192509015801590610bf15750610bd76040860160208701611a57565b6001600160a01b031681600001516001600160a01b031614155b15610c4257610bff816108ce565b15610c3957604051633f8ffaa560e01b815281516001600160a01b03166004820152602082015163ffffffff166024820152604401610407565b610c428261122d565b610c5b82610c566040880160208901611a57565b61128e565b5050505050565b50565b6000610c7482604001516112f4565b82519091508114610ca55781516040516337e3d1ab60e01b8152610407918391600401918252602082015260400190565b5050565b602081015160009060065b602002015192915050565b610cc76114c6565b604051806101200160405280610cdc84611329565b6001600160a01b03168152602001610cf384611337565b8152602001610d0184611346565b8152602001610d0f84611355565b8152602001610d1d84610ca9565b8152602001610d2b84611364565b8152602001610d3984611373565b8152602001610d518460200151610120015160011490565b15158152602001610d6184611382565b905292915050565b815160c082015114610d9e57815160c082015160405163fe405c7760e01b815260048101929092526024820152604401610407565b81606001516040015115158160e00151151503610de957606082015160409081015160e08301519151634629f1b560e11b815290151560048201529015156024820152604401610407565b81604001516001600160a01b031681600001516001600160a01b031614610e3d57604082810151825191516370a8d99b60e11b81526001600160a01b03918216600482015291166024820152604401610407565b46816020015114610e70576020810151604051630432cec160e31b81524660048201526024810191909152604401610407565b81602001518160a0015114610eab57602082015160a0820151604051630626ade360e41b815260048101929092526024820152604401610407565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015610f16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3a9190611da5565b610f5f57806040015160405163cbfe7bc360e01b815260040161040791815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa158015610fbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe29190611dc0565b80516101008401515191925014158061100957506020808201516101008401519091015114155b15611053578051602080830151610100850151805192015160405163318d812b60e01b81526004810194909452602484019190915260448301919091526064820152608401610407565b600061105e846113da565b905080836060015114610a4d5760608301516040516377bb6d2760e11b8152610407918391600401918252602082015260400190565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f6946110f794909392909190600401611e3c565b602060405180830381865afa925050508015611130575060408051601f3d908101601f1916820190925261112d91810190611da5565b60015b6112065761113c611ec0565b806308c379a0036111755750611150611edc565b8061115b57506111b4565b8060405162dd577760e81b81526004016104079190611f66565b634e487b71036111b457611187611f79565b9061119257506111b4565b60405162dd577760e81b81526020600482015260006024820152604401610407565b3d8080156111de576040519150601f19603f3d011682016040523d82523d6000602084013e6111e3565b606091505b5060405162dd577760e81b81526020600482015260006024820152604401610407565b80610ca55760405162dd577760e81b81526020600482015260006024820152604401610407565b600081815260016020908152604091829020805463ffffffff60a01b1916600160a01b4263ffffffff160217905590518281527f49ab97b1dc68eafe79e6e7f8ff996d00259888e84cb401cf9ec8d39adf7ab196910160405180910390a150565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b805160208201206000906102da907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190611f99565b602081015160009081610cb4565b60208101516000906001610cb4565b60208101516000906004610cb4565b60208101516000906005610cb4565b60208101516000906007610cb4565b60208101516000906008610cb4565b61138a611519565b604051806040016040528083602001516002600a81106113ac576113ac611a74565b6020020151815260200183602001516003600a81106113cd576113cd611a74565b6020020151905292915050565b6000806113f8308460600151600001516001600160801b03166113ff565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6113f89190611f99565b6040518060800160405280600081526020016000815260200160006001600160a01b031681526020016114c1604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b905290565b60405180610120016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016114c15b60405180604001604052806002906020820280368337509192915050565b60006020828403121561154957600080fd5b5035919050565b60008083601f84011261156257600080fd5b50813567ffffffffffffffff81111561157a57600080fd5b60208301915083602082850101111561159257600080fd5b9250929050565b6000806000604084860312156115ae57600080fd5b833567ffffffffffffffff808211156115c657600080fd5b90850190604082880312156115da57600080fd5b909350602085013590808211156115f057600080fd5b506115fd86828701611550565b9497909650939450505050565b60005b8381101561162557818101518382015260200161160d565b83811115610a4d5750506000910152565b6000815180845261164e81602086016020860161160a565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a08501526116bd60c0850182611636565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561171a57603f19888603018452611708858351611662565b945092850192908501906001016116ec565b5092979650505050505050565b6001600160a01b0381168114610c6257600080fd5b803561174781611727565b919050565b60008060008060006060868803121561176457600080fd5b853567ffffffffffffffff8082111561177c57600080fd5b818801915088601f83011261179057600080fd5b81358181111561179f57600080fd5b8960208260051b85010111156117b457600080fd5b602083019750809650506117ca6020890161173c565b945060408801359150808211156117e057600080fd5b506117ed88828901611550565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b6040810181811067ffffffffffffffff82111715611834576118346117fe565b60405250565b6060810181811067ffffffffffffffff82111715611834576118346117fe565b601f8201601f1916810167ffffffffffffffff81118282101715611880576118806117fe565b6040525050565b600067ffffffffffffffff8211156118a1576118a16117fe565b50601f01601f191660200190565b600060408083360312156118c257600080fd5b80516118cd81611814565b833567ffffffffffffffff808211156118e557600080fd5b9085019036601f8301126118f857600080fd5b813560208282111561190c5761190c6117fe565b8160051b865161191e8383018261185a565b9283528481018201928281013685111561193757600080fd5b83870192505b84831015611a0b578235868111156119555760008081fd5b8701606036829003601f190181131561196e5760008081fd5b8a516119798161183a565b8287013581528b8301358188015290820135908882111561199a5760008081fd5b9181019136603f8401126119b057600091508182fd5b8683013591506119bf82611887565b8c516119cb828261185a565b838152368e8587010111156119e257600091508182fd5b838e86018a830137600093810189019390935250808c019190915282525091830191830161193d565b50865250611a1a88820161173c565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611a5257611a52611a29565b500190565b600060208284031215611a6957600080fd5b81356113f881611727565b634e487b7160e01b600052603260045260246000fd5b805163ffffffff8116811461174757600080fd5b60008060008060808587031215611ab457600080fd5b8451611abf81611727565b60208601519094509250611ad560408601611a8a565b9150606085015167ffffffffffffffff811115611af157600080fd5b8501601f81018713611b0257600080fd5b8051611b0d81611887565b604051611b1a828261185a565b828152896020848601011115611b2f57600080fd5b611b4083602083016020870161160a565b969995985093965050505050565b600060018201611b6057611b60611a29565b5060010190565b6020815260006113f86020830184611662565b8051801515811461174757600080fd5b600060608284031215611b9c57600080fd5b6040516060810181811067ffffffffffffffff82111715611bbf57611bbf6117fe565b60405282516001600160801b0381168114611bd957600080fd5b8152611be760208401611a8a565b6020820152611bf860408401611b7a565b60408201529392505050565b600082601f830112611c1557600080fd5b604051611c2181611814565b806040840185811115611c3357600080fd5b845b81811015611c4d578035835260209283019201611c35565b509195945050505050565b600082601f830112611c6957600080fd5b60405161014080820182811067ffffffffffffffff82111715611c8e57611c8e6117fe565b60405283018185821115611ca157600080fd5b845b82811015611c4d578035825260209182019101611ca3565b6000818303610240811215611ccf57600080fd5b60408051611cdc81611814565b61010080841215611cec57600080fd5b82519350611cf98461183a565b611d038787611c04565b845286605f870112611d1457600080fd5b8251611d1f81611814565b8060c0880189811115611d3157600080fd5b8589015b81811015611d5657611d478b82611c04565b83526020909201918601611d35565b50826020880152611d678a82611c04565b86880152505050838252611d7d87828801611c58565b60208301525095945050505050565b600060208284031215611d9e57600080fd5b5051919050565b600060208284031215611db757600080fd5b6113f882611b7a565b600060408284031215611dd257600080fd5b82601f830112611de157600080fd5b604051611ded81611814565b806040840185811115611dff57600080fd5b845b81811015611c4d578051835260209283019201611e01565b8060005b6002811015610a4d578151845260209384019390910190600101611e1d565b6102408101611e4b8287611e19565b60408083018660005b6002811015611e7b57611e68838351611e19565b9183019160209190910190600101611e54565b50505050611e8c60c0830185611e19565b61010082018360005b600a811015611eb4578151835260209283019290910190600101611e95565b50505095945050505050565b600060033d1115611ed95760046000803e5060005160e01c5b90565b600060443d1015611eea5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611f1a57505050505090565b8285019150815181811115611f325750505050505090565b843d8701016020828501011115611f4c5750505050505090565b611f5b6020828601018761185a565b509095945050505050565b6020815260006113f86020830184611636565b60008060233d1115611f95576020600460003e50506000516001905b9091565b600082611fb657634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220f1374674d2143dc1e1f8e0666c58769f2e4bc209220c094f513f5b717a358ad464736f6c634300080e0033", + "devdoc": { + "author": "Sismo", + "kind": "dev", + "methods": { + "buildAttestations(((uint256,uint256,bytes)[],address),bytes)": { + "details": "Returns the actual attestations constructed from the user request", + "params": { + "proofData": "snark public input as well as snark proof", + "request": "users request. Claim of having an account part of a group of accounts" + } + }, + "constructor": { + "details": "Constructor. Initializes the contract", + "params": { + "attestationsRegistryAddress": "Attestations Registry contract on which the attester will write attestations", + "availableRootsRegistryAddress": "Registry storing the available groups for this attester (e.g roots of registry merkle trees)", + "collectionIdFirst": "Id of the first collection in which the attester is supposed to record", + "collectionIdLast": "Id of the last collection in which the attester is supposed to record", + "commitmentMapperAddress": "commitment mapper's public key registry", + "hydraS1VerifierAddress": "ZK Snark Hydra-S1 Verifier contract" + } + }, + "deleteAttestations(uint256[],address,bytes)": { + "details": "External facing function. Allows to delete attestations by submitting proof", + "params": { + "attestationsOwner": "Owner of attestations to delete", + "collectionIds": "Collection identifier of attestations to delete", + "proofData": "Data sent along the deletion request to prove its validity" + }, + "returns": { + "_0": "attestations Attestations that were deleted" + } + }, + "generateAttestations(((uint256,uint256,bytes)[],address),bytes)": { + "details": "Main external function. Allows to generate attestations by making a request and submitting proof", + "params": { + "proofData": "Data sent along the request to prove its validity", + "request": "User request" + }, + "returns": { + "_0": "attestations Attestations that has been recorded" + } + }, + "getAttestationRegistry()": { + "details": "Attestation registry getter", + "returns": { + "_0": "attestationRegistry" + } + }, + "getAvailableRootsRegistry()": { + "details": "Getter of Roots Registry Contract" + }, + "getCommitmentMapperRegistry()": { + "details": "Getter of Commitment Mapper Registry contract" + }, + "getDestinationOfTicket(uint256)": { + "details": "Getter, returns the last attestation destination of a ticket", + "params": { + "userTicket": "ticket used*" + } + }, + "getTicketData(uint256)": { + "details": "Getter, returns the data linked to a ticket", + "params": { + "userTicket": "ticket used*" + } + }, + "getVerifier()": { + "details": "Getter of Hydra-S1 Verifier contract" + }, + "isTicketOnCooldown(uint256)": { + "details": "returns whether a ticket is on cooldown or not", + "params": { + "userTicket": "ticket used*" + } + } + }, + "stateVariables": { + "AUTHORIZED_COLLECTION_ID_FIRST": { + "details": "Getter returns of the first collection in which the attester is supposed to record*" + }, + "AUTHORIZED_COLLECTION_ID_LAST": { + "details": "Getter returns of the last collection in which the attester is supposed to record*" + }, + "SOULBOUND_COOLDOWN_DURATION": { + "details": "Getter returns of the duration of the cooldown period after having used a ticket*" + } + }, + "title": "Hydra-S1 Soulbound Attester", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "This attester is part of the family of the Hydra-S1 Attesters. Hydra-S1 attesters enable users to prove they have an account in a group in a privacy preserving way. The Hydra-S1 Base abstract contract is inherited and holds the complex Hydra S1 verification logic. We invite readers to refer to: - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1 This specific attester has the following characteristics: - Zero Knowledge One cannot deduct from an attestation what source account was used to generate the underlying proof - Non Strict (scores) If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100. This attester generate attestations of scores - Ticketed Each source account gets one userTicket per claim (i.e only one attestation per source account per claim) For people used to semaphore/ tornado cash people: userTicket = hash(sourceSecret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier) - SoulBound (with cooldown period) A user can chose to delete attestations or generate attestation to a new destination. When deleting/ sending to a new destination, the ticket will enter a cooldown period, so it remains occasional User will need to wait until the end of the cooldown period before being able to delete or switch destination again One can however know that the former and the new destinations were created using the same userTicket - Renewable A userTicket can actually be reused as long as the destination of the attestation remains the same It enables users to renew or update their attestations*", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 936, + "contract": "contracts/attesters/hydra-s1/variants/HydraS1SoulboundAttester.sol:HydraS1SoulboundAttester", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 939, + "contract": "contracts/attesters/hydra-s1/variants/HydraS1SoulboundAttester.sol:HydraS1SoulboundAttester", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 7701, + "contract": "contracts/attesters/hydra-s1/variants/HydraS1SoulboundAttester.sol:HydraS1SoulboundAttester", + "label": "_userTicketsData", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_uint256,t_struct(TicketData)7128_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_uint256,t_struct(TicketData)7128_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct IHydraS1SoulboundAttester.TicketData)", + "numberOfBytes": "32", + "value": "t_struct(TicketData)7128_storage" + }, + "t_struct(TicketData)7128_storage": { + "encoding": "inplace", + "label": "struct IHydraS1SoulboundAttester.TicketData", + "members": [ + { + "astId": 7125, + "contract": "contracts/attesters/hydra-s1/variants/HydraS1SoulboundAttester.sol:HydraS1SoulboundAttester", + "label": "destination", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 7127, + "contract": "contracts/attesters/hydra-s1/variants/HydraS1SoulboundAttester.sol:HydraS1SoulboundAttester", + "label": "cooldownStart", + "offset": 20, + "slot": "0", + "type": "t_uint32" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/HydraS1SoulboundAttesterImplem.json b/deployments/mumbai/HydraS1SoulboundAttesterImplem.json new file mode 100644 index 0000000..b269023 --- /dev/null +++ b/deployments/mumbai/HydraS1SoulboundAttesterImplem.json @@ -0,0 +1,1019 @@ +{ + "address": "0x1F38a480d04348708F4b2413fb9AB1F975C176b6", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "attestationsRegistryAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "hydraS1VerifierAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "availableRootsRegistryAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "commitmentMapperAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "collectionIdFirst", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collectionIdLast", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "soulboundCooldownDuration", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedAccountsTreeValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputAccountsTreeValue", + "type": "uint256" + } + ], + "name": "AccountsTreeValueMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "AttestationDeletionNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "ChainIdMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "claimLength", + "type": "uint256" + } + ], + "name": "ClaimsLengthDifferentThanOne", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + } + ], + "name": "CollectionIdOutOfBound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedX", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedY", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputX", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputY", + "type": "uint256" + } + ], + "name": "CommitmentMapperPubKeyMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expectedDestination", + "type": "address" + }, + { + "internalType": "address", + "name": "inputDestination", + "type": "address" + } + ], + "name": "DestinationMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedGroupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + } + ], + "name": "GroupIdAndPropertiesMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "InvalidGroth16Proof", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "expectedStrictness", + "type": "bool" + }, + { + "internalType": "bool", + "name": "strictNess", + "type": "bool" + } + ], + "name": "IsStrictMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "ticket", + "type": "uint256" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "NotAttestationOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "inputRoot", + "type": "uint256" + } + ], + "name": "RegistryRootMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "ticketData", + "type": "uint256" + } + ], + "name": "TicketFrozen", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedTicketIdentifier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ticketIdentifier", + "type": "uint256" + } + ], + "name": "TicketIdentifierMismatch", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "internalType": "uint32", + "name": "cooldownStart", + "type": "uint32" + } + ], + "internalType": "struct IHydraS1SoulboundAttester.TicketData", + "name": "ticketData", + "type": "tuple" + } + ], + "name": "TicketUsedAndOnCooldown", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputValue", + "type": "uint256" + } + ], + "name": "ValueMismatch", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct Attestation", + "name": "attestation", + "type": "tuple" + } + ], + "name": "AttestationDeleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct Attestation", + "name": "attestation", + "type": "tuple" + } + ], + "name": "AttestationGenerated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "ticket", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "TicketDestinationUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "ticket", + "type": "uint256" + } + ], + "name": "TicketSetOnCooldown", + "type": "event" + }, + { + "inputs": [], + "name": "AUTHORIZED_COLLECTION_ID_FIRST", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "AUTHORIZED_COLLECTION_ID_LAST", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SOULBOUND_COOLDOWN_DURATION", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "buildAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "collectionIds", + "type": "uint256[]" + }, + { + "internalType": "address", + "name": "attestationsOwner", + "type": "address" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "deleteAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "generateAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAttestationRegistry", + "outputs": [ + { + "internalType": "contract IAttestationsRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAvailableRootsRegistry", + "outputs": [ + { + "internalType": "contract IAvailableRootsRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCommitmentMapperRegistry", + "outputs": [ + { + "internalType": "contract ICommitmentMapperRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "userTicket", + "type": "uint256" + } + ], + "name": "getDestinationOfTicket", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "userTicket", + "type": "uint256" + } + ], + "name": "getTicketData", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "internalType": "uint32", + "name": "cooldownStart", + "type": "uint32" + } + ], + "internalType": "struct IHydraS1SoulboundAttester.TicketData", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVerifier", + "outputs": [ + { + "internalType": "contract HydraS1Verifier", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "userTicket", + "type": "uint256" + } + ], + "name": "isTicketOnCooldown", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x7f977d111604fac7d95c4998e96790f6bdefc834edb860dba96112b86e22f892", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x1F38a480d04348708F4b2413fb9AB1F975C176b6", + "transactionIndex": 42, + "gasUsed": "1821131", + "logsBloom": "0x00000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000010000000000000000000008000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0xf02d122fdcb54cfbd733e9ab75450089d94b6287c89947756c1cb33c040d4a4e", + "transactionHash": "0x7f977d111604fac7d95c4998e96790f6bdefc834edb860dba96112b86e22f892", + "logs": [ + { + "transactionIndex": 42, + "blockNumber": 28600035, + "transactionHash": "0x7f977d111604fac7d95c4998e96790f6bdefc834edb860dba96112b86e22f892", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x00000000000000000000000000000000000000000000000000125f7c53b1970e00000000000000000000000000000000000000000000000082adc81c0122e43400000000000000000000000000000000000000000000167a30e33576abc94b08000000000000000000000000000000000000000000000000829b689fad714d2600000000000000000000000000000000000000000000167a30f594f2ff7ae216", + "logIndex": 250, + "blockHash": "0xf02d122fdcb54cfbd733e9ab75450089d94b6287c89947756c1cb33c040d4a4e" + } + ], + "blockNumber": 28600035, + "cumulativeGasUsed": "10654068", + "status": 1, + "byzantium": true + }, + "args": [ + "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", + "0x34e3CcCF4fF2E297be22465b85F03E5E6D27b41B", + "0x2c17e335d131dfd21238475Dd545B9B29Fb5A27D", + "0x82B54988e4E3a2850501F91AC06CEA82bdb014D3", + "20000001", + "30000000", + "295200" + ], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attestationsRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"hydraS1VerifierAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"availableRootsRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"commitmentMapperAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"collectionIdFirst\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collectionIdLast\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"soulboundCooldownDuration\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedAccountsTreeValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputAccountsTreeValue\",\"type\":\"uint256\"}],\"name\":\"AccountsTreeValueMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AttestationDeletionNotImplemented\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"name\":\"ChainIdMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"claimLength\",\"type\":\"uint256\"}],\"name\":\"ClaimsLengthDifferentThanOne\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"}],\"name\":\"CollectionIdOutOfBound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedX\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expectedY\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputX\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputY\",\"type\":\"uint256\"}],\"name\":\"CommitmentMapperPubKeyMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"expectedDestination\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"inputDestination\",\"type\":\"address\"}],\"name\":\"DestinationMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedGroupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"}],\"name\":\"GroupIdAndPropertiesMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"InvalidGroth16Proof\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"expectedStrictness\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"strictNess\",\"type\":\"bool\"}],\"name\":\"IsStrictMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ticket\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"NotAttestationOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"inputRoot\",\"type\":\"uint256\"}],\"name\":\"RegistryRootMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"ticketData\",\"type\":\"uint256\"}],\"name\":\"TicketFrozen\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedTicketIdentifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ticketIdentifier\",\"type\":\"uint256\"}],\"name\":\"TicketIdentifierMismatch\",\"type\":\"error\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"cooldownStart\",\"type\":\"uint32\"}],\"internalType\":\"struct IHydraS1SoulboundAttester.TicketData\",\"name\":\"ticketData\",\"type\":\"tuple\"}],\"name\":\"TicketUsedAndOnCooldown\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputValue\",\"type\":\"uint256\"}],\"name\":\"ValueMismatch\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct Attestation\",\"name\":\"attestation\",\"type\":\"tuple\"}],\"name\":\"AttestationDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct Attestation\",\"name\":\"attestation\",\"type\":\"tuple\"}],\"name\":\"AttestationGenerated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ticket\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"TicketDestinationUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ticket\",\"type\":\"uint256\"}],\"name\":\"TicketSetOnCooldown\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"AUTHORIZED_COLLECTION_ID_FIRST\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"AUTHORIZED_COLLECTION_ID_LAST\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SOULBOUND_COOLDOWN_DURATION\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"buildAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"attestationsOwner\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"deleteAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"generateAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAttestationRegistry\",\"outputs\":[{\"internalType\":\"contract IAttestationsRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAvailableRootsRegistry\",\"outputs\":[{\"internalType\":\"contract IAvailableRootsRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCommitmentMapperRegistry\",\"outputs\":[{\"internalType\":\"contract ICommitmentMapperRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"userTicket\",\"type\":\"uint256\"}],\"name\":\"getDestinationOfTicket\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"userTicket\",\"type\":\"uint256\"}],\"name\":\"getTicketData\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"cooldownStart\",\"type\":\"uint32\"}],\"internalType\":\"struct IHydraS1SoulboundAttester.TicketData\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVerifier\",\"outputs\":[{\"internalType\":\"contract HydraS1Verifier\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"userTicket\",\"type\":\"uint256\"}],\"name\":\"isTicketOnCooldown\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"buildAttestations(((uint256,uint256,bytes)[],address),bytes)\":{\"details\":\"Returns the actual attestations constructed from the user request\",\"params\":{\"proofData\":\"snark public input as well as snark proof\",\"request\":\"users request. Claim of having an account part of a group of accounts\"}},\"constructor\":{\"details\":\"Constructor. Initializes the contract\",\"params\":{\"attestationsRegistryAddress\":\"Attestations Registry contract on which the attester will write attestations\",\"availableRootsRegistryAddress\":\"Registry storing the available groups for this attester (e.g roots of registry merkle trees)\",\"collectionIdFirst\":\"Id of the first collection in which the attester is supposed to record\",\"collectionIdLast\":\"Id of the last collection in which the attester is supposed to record\",\"commitmentMapperAddress\":\"commitment mapper's public key registry\",\"hydraS1VerifierAddress\":\"ZK Snark Hydra-S1 Verifier contract\"}},\"deleteAttestations(uint256[],address,bytes)\":{\"details\":\"External facing function. Allows to delete attestations by submitting proof\",\"params\":{\"attestationsOwner\":\"Owner of attestations to delete\",\"collectionIds\":\"Collection identifier of attestations to delete\",\"proofData\":\"Data sent along the deletion request to prove its validity\"},\"returns\":{\"_0\":\"attestations Attestations that were deleted\"}},\"generateAttestations(((uint256,uint256,bytes)[],address),bytes)\":{\"details\":\"Main external function. Allows to generate attestations by making a request and submitting proof\",\"params\":{\"proofData\":\"Data sent along the request to prove its validity\",\"request\":\"User request\"},\"returns\":{\"_0\":\"attestations Attestations that has been recorded\"}},\"getAttestationRegistry()\":{\"details\":\"Attestation registry getter\",\"returns\":{\"_0\":\"attestationRegistry\"}},\"getAvailableRootsRegistry()\":{\"details\":\"Getter of Roots Registry Contract\"},\"getCommitmentMapperRegistry()\":{\"details\":\"Getter of Commitment Mapper Registry contract\"},\"getDestinationOfTicket(uint256)\":{\"details\":\"Getter, returns the last attestation destination of a ticket\",\"params\":{\"userTicket\":\"ticket used*\"}},\"getTicketData(uint256)\":{\"details\":\"Getter, returns the data linked to a ticket\",\"params\":{\"userTicket\":\"ticket used*\"}},\"getVerifier()\":{\"details\":\"Getter of Hydra-S1 Verifier contract\"},\"isTicketOnCooldown(uint256)\":{\"details\":\"returns whether a ticket is on cooldown or not\",\"params\":{\"userTicket\":\"ticket used*\"}}},\"stateVariables\":{\"AUTHORIZED_COLLECTION_ID_FIRST\":{\"details\":\"Getter returns of the first collection in which the attester is supposed to record*\"},\"AUTHORIZED_COLLECTION_ID_LAST\":{\"details\":\"Getter returns of the last collection in which the attester is supposed to record*\"},\"SOULBOUND_COOLDOWN_DURATION\":{\"details\":\"Getter returns of the duration of the cooldown period after having used a ticket*\"}},\"title\":\"Hydra-S1 Soulbound Attester\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"This attester is part of the family of the Hydra-S1 Attesters. Hydra-S1 attesters enable users to prove they have an account in a group in a privacy preserving way. The Hydra-S1 Base abstract contract is inherited and holds the complex Hydra S1 verification logic. We invite readers to refer to: - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1 This specific attester has the following characteristics: - Zero Knowledge One cannot deduct from an attestation what source account was used to generate the underlying proof - Non Strict (scores) If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100. This attester generate attestations of scores - Ticketed Each source account gets one userTicket per claim (i.e only one attestation per source account per claim) For people used to semaphore/ tornado cash people: userTicket = hash(sourceSecret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier) - SoulBound (with cooldown period) A user can chose to delete attestations or generate attestation to a new destination. When deleting/ sending to a new destination, the ticket will enter a cooldown period, so it remains occasional User will need to wait until the end of the cooldown period before being able to delete or switch destination again One can however know that the former and the new destinations were created using the same userTicket - Renewable A userTicket can actually be reused as long as the destination of the attestation remains the same It enables users to renew or update their attestations*\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/attesters/hydra-s1/variants/HydraS1SoulboundAttester.sol\":\"HydraS1SoulboundAttester\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() initializer {}\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\\n // contract may have been reentered.\\n require(_initializing ? _isConstructor() : !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} modifier, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n function _isConstructor() private view returns (bool) {\\n return !Address.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x4823752b07b8ea4ca971b217e39457930e7cb103c2c91e2a29729e5ca907e4f0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@sismo-core/hydra-s1/contracts/HydraS1Verifier.sol\":{\"content\":\"//\\n// Copyright 2017 Christian Reitwiessner\\n// 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:\\n// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\\n// 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.\\n//\\n// 2019 OKIMS\\n// ported to solidity 0.6\\n// fixed linter warnings\\n// added requiere error messages\\n//\\n//\\n// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.0;\\nlibrary Pairing {\\n struct G1Point {\\n uint X;\\n uint Y;\\n }\\n // Encoding of field elements is: X[0] * z + X[1]\\n struct G2Point {\\n uint[2] X;\\n uint[2] Y;\\n }\\n /// @return the generator of G1\\n function P1() internal pure returns (G1Point memory) {\\n return G1Point(1, 2);\\n }\\n /// @return the generator of G2\\n function P2() internal pure returns (G2Point memory) {\\n // Original code point\\n return G2Point(\\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\\n );\\n\\n/*\\n // Changed by Jordi point\\n return G2Point(\\n [10857046999023057135944570762232829481370756359578518086990519993285655852781,\\n 11559732032986387107991004021392285783925812861821192530917403151452391805634],\\n [8495653923123431417604973247489272438418190587263600148770280649306958101930,\\n 4082367875863433681332203403145435568316851327593401208105741076214120093531]\\n );\\n*/\\n }\\n /// @return r the negation of p, i.e. p.addition(p.negate()) should be zero.\\n function negate(G1Point memory p) internal pure returns (G1Point memory r) {\\n // The prime q in the base field F_q for G1\\n uint q = 21888242871839275222246405745257275088696311157297823662689037894645226208583;\\n if (p.X == 0 && p.Y == 0)\\n return G1Point(0, 0);\\n return G1Point(p.X, q - (p.Y % q));\\n }\\n /// @return r the sum of two points of G1\\n function addition(G1Point memory p1, G1Point memory p2) internal view returns (G1Point memory r) {\\n uint[4] memory input;\\n input[0] = p1.X;\\n input[1] = p1.Y;\\n input[2] = p2.X;\\n input[3] = p2.Y;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require(success,\\\"pairing-add-failed\\\");\\n }\\n /// @return r the product of a point on G1 and a scalar, i.e.\\n /// p == p.scalar_mul(1) and p.addition(p) == p.scalar_mul(2) for all points p.\\n function scalar_mul(G1Point memory p, uint s) internal view returns (G1Point memory r) {\\n uint[3] memory input;\\n input[0] = p.X;\\n input[1] = p.Y;\\n input[2] = s;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require (success,\\\"pairing-mul-failed\\\");\\n }\\n /// @return the result of computing the pairing check\\n /// e(p1[0], p2[0]) * .... * e(p1[n], p2[n]) == 1\\n /// For example pairing([P1(), P1().negate()], [P2(), P2()]) should\\n /// return true.\\n function pairing(G1Point[] memory p1, G2Point[] memory p2) internal view returns (bool) {\\n require(p1.length == p2.length,\\\"pairing-lengths-failed\\\");\\n uint elements = p1.length;\\n uint inputSize = elements * 6;\\n uint[] memory input = new uint[](inputSize);\\n for (uint i = 0; i < elements; i++)\\n {\\n input[i * 6 + 0] = p1[i].X;\\n input[i * 6 + 1] = p1[i].Y;\\n input[i * 6 + 2] = p2[i].X[0];\\n input[i * 6 + 3] = p2[i].X[1];\\n input[i * 6 + 4] = p2[i].Y[0];\\n input[i * 6 + 5] = p2[i].Y[1];\\n }\\n uint[1] memory out;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 8, add(input, 0x20), mul(inputSize, 0x20), out, 0x20)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require(success,\\\"pairing-opcode-failed\\\");\\n return out[0] != 0;\\n }\\n /// Convenience method for a pairing check for two pairs.\\n function pairingProd2(G1Point memory a1, G2Point memory a2, G1Point memory b1, G2Point memory b2) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](2);\\n G2Point[] memory p2 = new G2Point[](2);\\n p1[0] = a1;\\n p1[1] = b1;\\n p2[0] = a2;\\n p2[1] = b2;\\n return pairing(p1, p2);\\n }\\n /// Convenience method for a pairing check for three pairs.\\n function pairingProd3(\\n G1Point memory a1, G2Point memory a2,\\n G1Point memory b1, G2Point memory b2,\\n G1Point memory c1, G2Point memory c2\\n ) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](3);\\n G2Point[] memory p2 = new G2Point[](3);\\n p1[0] = a1;\\n p1[1] = b1;\\n p1[2] = c1;\\n p2[0] = a2;\\n p2[1] = b2;\\n p2[2] = c2;\\n return pairing(p1, p2);\\n }\\n /// Convenience method for a pairing check for four pairs.\\n function pairingProd4(\\n G1Point memory a1, G2Point memory a2,\\n G1Point memory b1, G2Point memory b2,\\n G1Point memory c1, G2Point memory c2,\\n G1Point memory d1, G2Point memory d2\\n ) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](4);\\n G2Point[] memory p2 = new G2Point[](4);\\n p1[0] = a1;\\n p1[1] = b1;\\n p1[2] = c1;\\n p1[3] = d1;\\n p2[0] = a2;\\n p2[1] = b2;\\n p2[2] = c2;\\n p2[3] = d2;\\n return pairing(p1, p2);\\n }\\n}\\ncontract HydraS1Verifier {\\n using Pairing for *;\\n struct VerifyingKey {\\n Pairing.G1Point alfa1;\\n Pairing.G2Point beta2;\\n Pairing.G2Point gamma2;\\n Pairing.G2Point delta2;\\n Pairing.G1Point[] IC;\\n }\\n struct Proof {\\n Pairing.G1Point A;\\n Pairing.G2Point B;\\n Pairing.G1Point C;\\n }\\n function verifyingKey() internal pure returns (VerifyingKey memory vk) {\\n vk.alfa1 = Pairing.G1Point(\\n 20491192805390485299153009773594534940189261866228447918068658471970481763042,\\n 9383485363053290200918347156157836566562967994039712273449902621266178545958\\n );\\n\\n vk.beta2 = Pairing.G2Point(\\n [4252822878758300859123897981450591353533073413197771768651442665752259397132,\\n 6375614351688725206403948262868962793625744043794305715222011528459656738731],\\n [21847035105528745403288232691147584728191162732299865338377159692350059136679,\\n 10505242626370262277552901082094356697409835680220590971873171140371331206856]\\n );\\n vk.gamma2 = Pairing.G2Point(\\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\\n );\\n vk.delta2 = Pairing.G2Point(\\n [16703691932058078091905716404571265959476320760471681443119627655715361207341,\\n 14290274403144646058563103675066900294643500151498463054614740831207315388514],\\n [9120517679481713774648131333833134160499672068094273767171232839700590114148,\\n 18338638855816625080803231766917659002322979855877827709378572546717723262324]\\n );\\n vk.IC = new Pairing.G1Point[](11);\\n \\n vk.IC[0] = Pairing.G1Point( \\n 15183981365841448712456044920259850142312423574262787585047804960636415432994,\\n 7001044530623564797357151512361873851017731748844374046997463344585588795777\\n ); \\n \\n vk.IC[1] = Pairing.G1Point( \\n 3754737654948662562435613969155994959132173506784418442817218316697091994043,\\n 16520141448541154153981919757383608282199583682574061862571018786569723115048\\n ); \\n \\n vk.IC[2] = Pairing.G1Point( \\n 14734466460881491794568175288621656907425457509621292263456156896685122952305,\\n 18495564446073110430251898491840031389094613665866187171071741938161262650771\\n ); \\n \\n vk.IC[3] = Pairing.G1Point( \\n 16380352455102502109444307845900237792657209995731679788026311308996926499427,\\n 11872494853967118743957240270505831687788406895959276908447589431944985706662\\n ); \\n \\n vk.IC[4] = Pairing.G1Point( \\n 20199514202493196707492057247804402540358301491780845748325025913208809441866,\\n 12760637713678265881350279209961337475498485836996922236408521200416764617323\\n ); \\n \\n vk.IC[5] = Pairing.G1Point( \\n 19153715775490328450864792250302417403928222720390978634383848496516270422395,\\n 546002182798634190282541153661423157791776194062719045593389981526666716416\\n ); \\n \\n vk.IC[6] = Pairing.G1Point( \\n 2572546294944895555897986264162285493992700415786641015895831165477991460890,\\n 16475880996834565556958124284585338184010927435675877479782010166270319781724\\n ); \\n \\n vk.IC[7] = Pairing.G1Point( \\n 1189084334785746899933155760881982253715630415235816484826929546449434025692,\\n 4229672360641556939458327562740354930286687266228809328535679188294452033396\\n ); \\n \\n vk.IC[8] = Pairing.G1Point( \\n 19602244162575575785636531633124796303002902053486919698240132790672698216585,\\n 181057165072599074288983745076121344893296348827576905983079816835912241514\\n ); \\n \\n vk.IC[9] = Pairing.G1Point( \\n 2674333225598340315002358633842521216418358316694409406540164227900893354209,\\n 2129512057743264354864596186877181463207231175912159744730924346148245351960\\n ); \\n \\n vk.IC[10] = Pairing.G1Point( \\n 7320700433668244102684846027945878190869912696586803178638351868907615350377,\\n 2941840530209756385349015075958743796933501451265755778001586753024906675441\\n ); \\n \\n }\\n function verify(uint[] memory input, Proof memory proof) internal view returns (uint) {\\n uint256 snark_scalar_field = 21888242871839275222246405745257275088548364400416034343698204186575808495617;\\n VerifyingKey memory vk = verifyingKey();\\n require(input.length + 1 == vk.IC.length,\\\"verifier-bad-input\\\");\\n // Compute the linear combination vk_x\\n Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);\\n for (uint i = 0; i < input.length; i++) {\\n require(input[i] < snark_scalar_field,\\\"verifier-gte-snark-scalar-field\\\");\\n vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i]));\\n }\\n vk_x = Pairing.addition(vk_x, vk.IC[0]);\\n if (!Pairing.pairingProd4(\\n Pairing.negate(proof.A), proof.B,\\n vk.alfa1, vk.beta2,\\n vk_x, vk.gamma2,\\n proof.C, vk.delta2\\n )) return 1;\\n return 0;\\n }\\n /// @return r bool true if proof is valid\\n function verifyProof(\\n uint[2] memory a,\\n uint[2][2] memory b,\\n uint[2] memory c,\\n uint[10] memory input\\n ) public view returns (bool r) {\\n Proof memory proof;\\n proof.A = Pairing.G1Point(a[0], a[1]);\\n proof.B = Pairing.G2Point([b[0][0], b[0][1]], [b[1][0], b[1][1]]);\\n proof.C = Pairing.G1Point(c[0], c[1]);\\n uint[] memory inputValues = new uint[](input.length);\\n for(uint i = 0; i < input.length; i++){\\n inputValues[i] = input[i];\\n }\\n if (verify(inputValues, proof) == 0) {\\n return true;\\n } else {\\n return false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x70c0b7d96ff1b90538938a4cb2d8086b3aabb4febf1e36cb3f470bfe0b4a9e89\",\"license\":\"GPL-3.0\"},\"contracts/attesters/hydra-s1/base/HydraS1Base.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {IHydraS1Base} from './IHydraS1Base.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\n\\n// Protocol imports\\nimport {Request, Attestation, Claim} from '../../../core/libs/Structs.sol';\\n\\n// Imports related to Hydra S1 ZK Proving Scheme\\nimport {HydraS1Verifier, HydraS1Lib, HydraS1Claim, HydraS1ProofData, HydraS1ProofInput, HydraS1GroupProperties} from '../libs/HydraS1Lib.sol';\\nimport {ICommitmentMapperRegistry} from '../../../periphery/utils/CommitmentMapperRegistry.sol';\\nimport {IAvailableRootsRegistry} from '../../../periphery/utils/AvailableRootsRegistry.sol';\\n\\n/**\\n * @title Hydra-S1 Base Attester\\n * @author Sismo\\n * @notice Abstract contract that facilitates the use of the Hydra-S1 ZK Proving Scheme.\\n * Hydra-S1 is single source, single group: it allows users to verify they are part of one and only one group at a time\\n * It is inherited by the family of Hydra-S1 attesters.\\n * It contains the user input checking and the ZK-SNARK proof verification.\\n * We invite readers to refer to:\\n * - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations\\n * - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1\\n \\n \\n **/\\nabstract contract HydraS1Base is IHydraS1Base, Initializable {\\n using HydraS1Lib for HydraS1ProofData;\\n\\n // ZK-SNARK Verifier\\n HydraS1Verifier immutable VERIFIER;\\n // Registry storing the Commitment Mapper EdDSA Public key\\n ICommitmentMapperRegistry immutable COMMITMENT_MAPPER_REGISTRY;\\n // Registry storing the Registry Tree Roots of the Attester's available ClaimData\\n IAvailableRootsRegistry immutable AVAILABLE_ROOTS_REGISTRY;\\n\\n /*******************************************************\\n INITIALIZATION FUNCTIONS \\n *******************************************************/\\n /**\\n * @dev Constructor. Initializes the contract\\n * @param hydraS1VerifierAddress ZK Snark Verifier contract\\n * @param availableRootsRegistryAddress Registry where is the Available Data (Registry Merkle Roots)\\n * @param commitmentMapperAddress Commitment mapper's public key registry\\n */\\n constructor(\\n address hydraS1VerifierAddress,\\n address availableRootsRegistryAddress,\\n address commitmentMapperAddress\\n ) {\\n VERIFIER = HydraS1Verifier(hydraS1VerifierAddress);\\n AVAILABLE_ROOTS_REGISTRY = IAvailableRootsRegistry(availableRootsRegistryAddress);\\n COMMITMENT_MAPPER_REGISTRY = ICommitmentMapperRegistry(commitmentMapperAddress);\\n }\\n\\n /**\\n * @dev Getter of Hydra-S1 Verifier contract\\n */\\n function getVerifier() external view returns (HydraS1Verifier) {\\n return VERIFIER;\\n }\\n\\n /**\\n * @dev Getter of Commitment Mapper Registry contract\\n */\\n function getCommitmentMapperRegistry() external view returns (ICommitmentMapperRegistry) {\\n return COMMITMENT_MAPPER_REGISTRY;\\n }\\n\\n /**\\n * @dev Getter of Roots Registry Contract\\n */\\n function getAvailableRootsRegistry() external view returns (IAvailableRootsRegistry) {\\n return AVAILABLE_ROOTS_REGISTRY;\\n }\\n\\n /*******************************************************\\n Hydra-S1 SPECIFIC FUNCTIONS\\n *******************************************************/\\n\\n /**\\n * @dev MANDATORY: must be implemented to return the ticket identifier from a user request\\n * so it can be checked against snark input\\n * ticket = hash(sourceSecretHash, ticketIdentifier), which is verified inside the snark\\n * users bring sourceSecretHash as private input which guarantees privacy\\n\\n * This function MUST be implemented by Hydra-S1 attesters.\\n * This is the core function that implements the logic of tickets\\n\\n * Do they get one ticket per claim?\\n * Do they get 2 tickets per claim?\\n * Do they get 1 ticket per claim, every month?\\n * Take a look at Hydra-S1 Simple Attester for an example\\n * @param claim user claim: part of a group of accounts, with a claimedValue for their account\\n */\\n function _getTicketIdentifierOfClaim(HydraS1Claim memory claim)\\n internal\\n view\\n virtual\\n returns (uint256);\\n\\n /**\\n * @dev Checks whether the user claim and the snark public input are a match\\n * @param claim user claim\\n * @param input snark public input\\n */\\n function _validateInput(HydraS1Claim memory claim, HydraS1ProofInput memory input)\\n internal\\n view\\n virtual\\n {\\n if (input.accountsTreeValue != claim.groupId)\\n revert AccountsTreeValueMismatch(claim.groupId, input.accountsTreeValue);\\n\\n if (input.isStrict == claim.groupProperties.isScore)\\n revert IsStrictMismatch(claim.groupProperties.isScore, input.isStrict);\\n\\n if (input.destination != claim.destination)\\n revert DestinationMismatch(claim.destination, input.destination);\\n\\n if (input.chainId != block.chainid) revert ChainIdMismatch(block.chainid, input.chainId);\\n\\n if (input.value != claim.claimedValue) revert ValueMismatch(claim.claimedValue, input.value);\\n\\n if (!AVAILABLE_ROOTS_REGISTRY.isRootAvailableForMe(input.registryRoot))\\n revert RegistryRootMismatch(input.registryRoot);\\n\\n uint256[2] memory commitmentMapperPubKey = COMMITMENT_MAPPER_REGISTRY.getEdDSAPubKey();\\n if (\\n input.commitmentMapperPubKey[0] != commitmentMapperPubKey[0] ||\\n input.commitmentMapperPubKey[1] != commitmentMapperPubKey[1]\\n )\\n revert CommitmentMapperPubKeyMismatch(\\n commitmentMapperPubKey[0],\\n commitmentMapperPubKey[1],\\n input.commitmentMapperPubKey[0],\\n input.commitmentMapperPubKey[1]\\n );\\n\\n uint256 ticketIdentifier = _getTicketIdentifierOfClaim(claim);\\n\\n if (input.ticketIdentifier != ticketIdentifier)\\n revert TicketIdentifierMismatch(ticketIdentifier, input.ticketIdentifier);\\n }\\n\\n /**\\n * @dev verify the groth16 mathematical proof\\n * @param proofData snark public input\\n */\\n function _verifyProof(HydraS1ProofData memory proofData) internal view virtual {\\n try\\n VERIFIER.verifyProof(proofData.proof.a, proofData.proof.b, proofData.proof.c, proofData.input)\\n returns (bool success) {\\n if (!success) revert InvalidGroth16Proof('');\\n } catch Error(string memory reason) {\\n revert InvalidGroth16Proof(reason);\\n } catch Panic(\\n uint256 /*errorCode*/\\n ) {\\n revert InvalidGroth16Proof('');\\n } catch (\\n bytes memory /*lowLevelData*/\\n ) {\\n revert InvalidGroth16Proof('');\\n }\\n }\\n}\\n\",\"keccak256\":\"0x02708884237382835cd3d3514fdc3603409ce5ea1dc7255a7ceea07dff417c34\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/base/IHydraS1Base.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {HydraS1Verifier, HydraS1Lib, HydraS1ProofData} from '../libs/HydraS1Lib.sol';\\nimport {ICommitmentMapperRegistry} from '../../../periphery/utils/CommitmentMapperRegistry.sol';\\nimport {IAvailableRootsRegistry} from '../../../periphery/utils/AvailableRootsRegistry.sol';\\n\\n// todo: explain well what is specific to this attester\\ninterface IHydraS1Base {\\n error ClaimsLengthDifferentThanOne(uint256 claimLength);\\n error RegistryRootMismatch(uint256 inputRoot);\\n error DestinationMismatch(address expectedDestination, address inputDestination);\\n error CommitmentMapperPubKeyMismatch(\\n uint256 expectedX,\\n uint256 expectedY,\\n uint256 inputX,\\n uint256 inputY\\n );\\n error TicketIdentifierMismatch(uint256 expectedTicketIdentifier, uint256 ticketIdentifier);\\n error IsStrictMismatch(bool expectedStrictness, bool strictNess);\\n error ChainIdMismatch(uint256 expectedChainId, uint256 chainId);\\n error ValueMismatch(uint256 expectedValue, uint256 inputValue);\\n error AccountsTreeValueMismatch(\\n uint256 expectedAccountsTreeValue,\\n uint256 inputAccountsTreeValue\\n );\\n error InvalidGroth16Proof(string reason);\\n\\n /**\\n * @dev Getter of Hydra-S1 Verifier contract\\n */\\n function getVerifier() external view returns (HydraS1Verifier);\\n\\n /**\\n * @dev Getter of Commitment Mapper Registry contract\\n */\\n function getCommitmentMapperRegistry() external view returns (ICommitmentMapperRegistry);\\n\\n /**\\n * @dev Getter of Roots Registry Contract\\n */\\n function getAvailableRootsRegistry() external view returns (IAvailableRootsRegistry);\\n}\\n\",\"keccak256\":\"0x73cff4dcd9c30857859721ea2897be8bb7087c0122f4587acdaa79d8ec0a728d\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/interfaces/IHydraS1SoulboundAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {Attestation} from '../../../core/libs/Structs.sol';\\nimport {IAttester} from '../../../core/interfaces/IAttester.sol';\\nimport {CommitmentMapperRegistry} from '../../../periphery/utils/CommitmentMapperRegistry.sol';\\nimport {AvailableRootsRegistry} from '../../../periphery/utils/AvailableRootsRegistry.sol';\\nimport {HydraS1Lib, HydraS1ProofData, HydraS1ProofInput} from './../libs/HydraS1Lib.sol';\\nimport {IHydraS1Base} from './../base/IHydraS1Base.sol';\\n\\n// todo: explain well what is specific to this attester\\ninterface IHydraS1SoulboundAttester is IHydraS1Base, IAttester {\\n struct TicketData {\\n address destination;\\n uint32 cooldownStart;\\n }\\n error NotAttestationOwner(uint256 ticket, address sender);\\n error TicketFrozen(uint256 ticketData);\\n error TicketUsedAndOnCooldown(TicketData ticketData);\\n error CollectionIdOutOfBound(uint256 collectionId);\\n\\n event TicketDestinationUpdated(uint256 ticket, address newOwner);\\n event TicketSetOnCooldown(uint256 ticket);\\n\\n /**\\n * @dev returns whether a ticket is on cooldown or not\\n * @param userTicket ticket used\\n **/\\n function isTicketOnCooldown(uint256 userTicket) external view returns (bool);\\n\\n /**\\n * @dev Getter, returns the data linked to a ticket\\n * @param userTicket ticket used\\n **/\\n function getTicketData(uint256 userTicket) external view returns (TicketData memory);\\n\\n /**\\n * @dev Getter, returns the last attestation destination of a ticket\\n * @param userTicket ticket used\\n **/\\n function getDestinationOfTicket(uint256 userTicket) external view returns (address);\\n\\n /**\\n * @dev Getter\\n * returns of the first collection in which the attester is supposed to record\\n **/\\n function AUTHORIZED_COLLECTION_ID_FIRST() external view returns (uint256);\\n\\n /**\\n * @dev Getter\\n * returns of the last collection in which the attester is supposed to record\\n **/\\n function AUTHORIZED_COLLECTION_ID_LAST() external view returns (uint256);\\n\\n /**\\n * @dev Getter\\n * returns of the duration of the cooldown period after having used a ticket\\n **/\\n function SOULBOUND_COOLDOWN_DURATION() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x253a424fda33fca3de3fabd731e4a4f5d48af14bcd9d7c66302113268fd3a9f5\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/libs/HydraS1Lib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Claim, Request} from '../../../core/libs/Structs.sol';\\nimport {HydraS1Verifier} from '@sismo-core/hydra-s1/contracts/HydraS1Verifier.sol';\\n\\n// user Hydra-S1 claim retrieved form his request\\nstruct HydraS1Claim {\\n uint256 groupId; // user claims to have an account in this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n address destination; // user claims to own this destination[]\\n HydraS1GroupProperties groupProperties; // user claims the group has the following properties\\n}\\n\\nstruct HydraS1GroupProperties {\\n uint128 groupIndex;\\n uint32 generationTimestamp;\\n bool isScore;\\n}\\n\\nstruct HydraS1CircomSnarkProof {\\n uint256[2] a;\\n uint256[2][2] b;\\n uint256[2] c;\\n}\\n\\nstruct HydraS1ProofData {\\n HydraS1CircomSnarkProof proof;\\n uint256[10] input;\\n // destination\\n // chainId\\n // commitmentMapperPubKey.x\\n // commitmentMapperPubKey.y\\n // registryTreeRoot\\n // ticketIdentifier\\n // ticket\\n // claimedValue\\n // accountsTreeValue\\n // isStrict\\n}\\n\\nstruct HydraS1ProofInput {\\n address destination;\\n uint256 chainId;\\n uint256 registryRoot;\\n uint256 ticketIdentifier;\\n uint256 ticket;\\n uint256 value;\\n uint256 accountsTreeValue;\\n bool isStrict;\\n uint256[2] commitmentMapperPubKey;\\n}\\n\\nlibrary HydraS1Lib {\\n uint256 constant SNARK_FIELD =\\n 21888242871839275222246405745257275088548364400416034343698204186575808495617;\\n\\n error GroupIdAndPropertiesMismatch(uint256 expectedGroupId, uint256 groupId);\\n\\n function _input(HydraS1ProofData memory self) internal pure returns (HydraS1ProofInput memory) {\\n return\\n HydraS1ProofInput(\\n _getDestination(self),\\n _getChainId(self),\\n _getRegistryRoot(self),\\n _getExpectedExternalNullifier(self),\\n _getTicket(self),\\n _getValue(self),\\n _getAccountsTreeValue(self),\\n _getIsStrict(self),\\n _getCommitmentMapperPubKey(self)\\n );\\n }\\n\\n function _claim(Request memory self) internal pure returns (HydraS1Claim memory) {\\n Claim memory claim = self.claims[0];\\n _validateClaim(claim);\\n\\n HydraS1GroupProperties memory groupProperties = abi.decode(\\n claim.extraData,\\n (HydraS1GroupProperties)\\n );\\n\\n return (HydraS1Claim(claim.groupId, claim.claimedValue, self.destination, groupProperties));\\n }\\n\\n function _toCircomFormat(HydraS1ProofData memory self)\\n internal\\n pure\\n returns (\\n uint256[2] memory,\\n uint256[2][2] memory,\\n uint256[2] memory,\\n uint256[10] memory\\n )\\n {\\n return (self.proof.a, self.proof.b, self.proof.c, self.input);\\n }\\n\\n function _getDestination(HydraS1ProofData memory self) internal pure returns (address) {\\n return address(uint160(self.input[0]));\\n }\\n\\n function _getChainId(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[1];\\n }\\n\\n function _getCommitmentMapperPubKey(HydraS1ProofData memory self)\\n internal\\n pure\\n returns (uint256[2] memory)\\n {\\n return [self.input[2], self.input[3]];\\n }\\n\\n function _getRegistryRoot(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[4];\\n }\\n\\n function _getExpectedExternalNullifier(HydraS1ProofData memory self)\\n internal\\n pure\\n returns (uint256)\\n {\\n return self.input[5];\\n }\\n\\n function _getTicket(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[6];\\n }\\n\\n function _getValue(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[7];\\n }\\n\\n function _getAccountsTreeValue(HydraS1ProofData memory self) internal pure returns (uint256) {\\n return self.input[8];\\n }\\n\\n function _getIsStrict(HydraS1ProofData memory self) internal pure returns (bool) {\\n return self.input[9] == 1;\\n }\\n\\n function _getTicket(bytes calldata self) internal pure returns (uint256) {\\n HydraS1ProofData memory snarkProofData = abi.decode(self, (HydraS1ProofData));\\n uint256 userTicket = uint256(_getTicket(snarkProofData));\\n return userTicket;\\n }\\n\\n function _generateGroupIdFromProperties(\\n uint128 groupIndex,\\n uint32 generationTimestamp,\\n bool isScore\\n ) internal pure returns (uint256) {\\n return\\n _generateGroupIdFromEncodedProperties(\\n _encodeGroupProperties(groupIndex, generationTimestamp, isScore)\\n );\\n }\\n\\n function _generateGroupIdFromEncodedProperties(bytes memory encodedProperties)\\n internal\\n pure\\n returns (uint256)\\n {\\n return uint256(keccak256(encodedProperties)) % HydraS1Lib.SNARK_FIELD;\\n }\\n\\n function _encodeGroupProperties(\\n uint128 groupIndex,\\n uint32 generationTimestamp,\\n bool isScore\\n ) internal pure returns (bytes memory) {\\n return abi.encode(groupIndex, generationTimestamp, isScore);\\n }\\n\\n function _validateClaim(Claim memory claim) internal pure {\\n uint256 expectedGroupId = _generateGroupIdFromEncodedProperties(claim.extraData);\\n if (claim.groupId != expectedGroupId)\\n revert GroupIdAndPropertiesMismatch(expectedGroupId, claim.groupId);\\n }\\n}\\n\",\"keccak256\":\"0x596225970aabbc4edb989ee640867c76944e797bfafe5e06dcf37b973480b957\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/variants/HydraS1SoulboundAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {IHydraS1SoulboundAttester} from '../interfaces/IHydraS1SoulboundAttester.sol';\\n\\n// Core protocol Protocol imports\\nimport {Request, Attestation, Claim} from '../../../core/libs/Structs.sol';\\nimport {Attester, IAttester, IAttestationsRegistry} from '../../../core/Attester.sol';\\n\\n// Imports related to HydraS1 Proving Scheme\\nimport {HydraS1Base, HydraS1Lib, HydraS1ProofData, HydraS1ProofInput, HydraS1Claim} from '../base/HydraS1Base.sol';\\n\\n/**\\n * @title Hydra-S1 Soulbound Attester\\n * @author Sismo\\n * @notice This attester is part of the family of the Hydra-S1 Attesters.\\n * Hydra-S1 attesters enable users to prove they have an account in a group in a privacy preserving way.\\n * The Hydra-S1 Base abstract contract is inherited and holds the complex Hydra S1 verification logic.\\n * We invite readers to refer to:\\n * - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations\\n * - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1\\n\\n * This specific attester has the following characteristics:\\n\\n * - Zero Knowledge\\n * One cannot deduct from an attestation what source account was used to generate the underlying proof\\n\\n * - Non Strict (scores)\\n * If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100.\\n * This attester generate attestations of scores\\n\\n * - Ticketed\\n * Each source account gets one userTicket per claim (i.e only one attestation per source account per claim)\\n * For people used to semaphore/ tornado cash people:\\n * userTicket = hash(sourceSecret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier)\\n \\n * - SoulBound (with cooldown period)\\n * A user can chose to delete attestations or generate attestation to a new destination.\\n * When deleting/ sending to a new destination, the ticket will enter a cooldown period, so it remains occasional\\n * User will need to wait until the end of the cooldown period before being able to delete or switch destination again\\n * One can however know that the former and the new destinations were created using the same userTicket\\n \\n * - Renewable\\n * A userTicket can actually be reused as long as the destination of the attestation remains the same\\n * It enables users to renew or update their attestations\\n **/\\ncontract HydraS1SoulboundAttester is IHydraS1SoulboundAttester, HydraS1Base, Attester {\\n using HydraS1Lib for HydraS1ProofData;\\n using HydraS1Lib for bytes;\\n using HydraS1Lib for Request;\\n\\n // The deployed contract will need to be authorized to write into the Attestation registry\\n // It should get write access on collections from AUTHORIZED_COLLECTION_ID_FIRST to AUTHORIZED_COLLECTION_ID_LAST.\\n uint256 public immutable AUTHORIZED_COLLECTION_ID_FIRST;\\n uint256 public immutable AUTHORIZED_COLLECTION_ID_LAST;\\n uint256 public immutable SOULBOUND_COOLDOWN_DURATION;\\n\\n mapping(uint256 => TicketData) internal _userTicketsData;\\n\\n /*******************************************************\\n INITIALIZATION FUNCTIONS \\n *******************************************************/\\n /**\\n * @dev Constructor. Initializes the contract\\n * @param attestationsRegistryAddress Attestations Registry contract on which the attester will write attestations\\n * @param hydraS1VerifierAddress ZK Snark Hydra-S1 Verifier contract\\n * @param availableRootsRegistryAddress Registry storing the available groups for this attester (e.g roots of registry merkle trees)\\n * @param commitmentMapperAddress commitment mapper's public key registry\\n * @param collectionIdFirst Id of the first collection in which the attester is supposed to record\\n * @param collectionIdLast Id of the last collection in which the attester is supposed to record\\n */\\n constructor(\\n address attestationsRegistryAddress,\\n address hydraS1VerifierAddress,\\n address availableRootsRegistryAddress,\\n address commitmentMapperAddress,\\n uint256 collectionIdFirst,\\n uint256 collectionIdLast,\\n uint256 soulboundCooldownDuration\\n )\\n Attester(attestationsRegistryAddress)\\n HydraS1Base(hydraS1VerifierAddress, availableRootsRegistryAddress, commitmentMapperAddress)\\n {\\n AUTHORIZED_COLLECTION_ID_FIRST = collectionIdFirst;\\n AUTHORIZED_COLLECTION_ID_LAST = collectionIdLast;\\n SOULBOUND_COOLDOWN_DURATION = soulboundCooldownDuration;\\n }\\n\\n /*******************************************************\\n MANDATORY FUNCTIONS TO OVERRIDE FROM ATTESTER.SOL\\n *******************************************************/\\n\\n /**\\n * @dev Throws if user attestations request is invalid\\n * Look into HydraS1Base for more details\\n * @param request users request. Claim of having an account part of a group of accounts\\n * @param proofData snark proof backing the claim\\n */\\n function _verifyRequest(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n override\\n {\\n HydraS1ProofData memory snarkProof = abi.decode(proofData, (HydraS1ProofData));\\n HydraS1ProofInput memory snarkInput = snarkProof._input();\\n HydraS1Claim memory claim = request._claim();\\n\\n // verifies that the proof corresponds to the claim\\n _validateInput(claim, snarkInput);\\n // verifies the proof validity\\n _verifyProof(snarkProof);\\n }\\n\\n /**\\n * @dev Throws if user attestations deletion request is not made by its owner\\n * @param attestations attestations to delete\\n */\\n function _verifyAttestationsDeletionRequest(Attestation[] memory attestations, bytes calldata)\\n internal\\n view\\n override\\n {\\n for (uint256 i = 0; i < attestations.length; i++) {\\n uint256 userTicket = abi.decode(attestations[0].extraData, (uint256));\\n if (_userTicketsData[userTicket].destination != msg.sender)\\n revert NotAttestationOwner(userTicket, msg.sender);\\n }\\n }\\n\\n /**\\n * @dev Returns the actual attestations constructed from the user request\\n * @param request users request. Claim of having an account part of a group of accounts\\n * @param proofData snark public input as well as snark proof\\n */\\n function buildAttestations(Request calldata request, bytes calldata proofData)\\n public\\n view\\n virtual\\n override(IAttester, Attester)\\n returns (Attestation[] memory)\\n {\\n HydraS1Claim memory claim = request._claim();\\n\\n Attestation[] memory attestations = new Attestation[](1);\\n\\n uint256 attestationCollectionId = AUTHORIZED_COLLECTION_ID_FIRST +\\n claim.groupProperties.groupIndex;\\n if (attestationCollectionId > AUTHORIZED_COLLECTION_ID_LAST)\\n revert CollectionIdOutOfBound(attestationCollectionId);\\n\\n // The issuer of attestations is the attester\\n address issuer = address(this);\\n // user sends the ticket as input in the data\\n uint256 userTicket = proofData._getTicket();\\n\\n attestations[0] = Attestation(\\n attestationCollectionId,\\n request.destination,\\n issuer,\\n claim.claimedValue,\\n claim.groupProperties.generationTimestamp,\\n abi.encode(userTicket)\\n );\\n\\n return (attestations);\\n }\\n\\n /*******************************************************\\n OPTIONAL HOOK VIRTUAL FUNCTIONS FROM ATTESTER.SOL\\n *******************************************************/\\n /**\\n * @dev Hook run before recording the attestation.\\n * Throws if ticket already used, not a renewal, and ticket on cooldown.\\n * @param request users request. Claim of having an account part of a group of accounts\\n * @param proofData provided to back the request. snark input and snark proof\\n */\\n function _beforeRecordAttestations(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n override\\n {\\n uint256 userTicket = proofData._getTicket();\\n TicketData memory userTicketData = _userTicketsData[userTicket];\\n\\n if (\\n userTicketData.destination != address(0) && userTicketData.destination != request.destination\\n ) {\\n if (_isOnCooldown(userTicketData)) revert TicketUsedAndOnCooldown(userTicketData);\\n _setTicketOnCooldown(userTicket);\\n }\\n _setDestinationForTicket(userTicket, request.destination);\\n }\\n\\n function _beforeDeleteAttestations(Attestation[] memory attestations, bytes calldata proofData)\\n internal\\n override\\n {\\n // we retrieve the ticketUsed from attestations extraData\\n for (uint256 i = 0; i < attestations.length; i++) {\\n uint256 userTicket = abi.decode(attestations[i].extraData, (uint256));\\n if (_isOnCooldown(_userTicketsData[userTicket]) == true) revert TicketFrozen(userTicket);\\n _userTicketsData[userTicket].destination = address(0);\\n }\\n }\\n\\n /*******************************************************\\n Hydra-S1 MANDATORY FUNCTIONS FROM Hydra-S1 Base Attester\\n *******************************************************/\\n\\n /**\\n * @dev Returns the ticket identifier from a user claim\\n * @param claim user Hydra-S1 claim = have an account with a specific value in a specific group\\n * ticket = hash(sourceSecretHash, ticketIdentifier), which is verified inside the snark\\n * users bring sourceSecretHash as private input in snark which guarantees privacy\\n \\n * Here we chose ticketIdentifier = hash(attesterAddress, claim.GroupId)\\n * Creates one ticket per group, per user and makes sure no collision with other attester's tickets\\n **/\\n function _getTicketIdentifierOfClaim(HydraS1Claim memory claim)\\n internal\\n view\\n override\\n returns (uint256)\\n {\\n uint256 ticketIdentifier = _encodeInSnarkField(address(this), claim.groupProperties.groupIndex);\\n return ticketIdentifier;\\n }\\n\\n /*******************************************************\\n Hydra-S1 Attester Specific Functions\\n *******************************************************/\\n\\n /**\\n * @dev Getter, returns the last attestation destination of a ticket\\n * @param userTicket ticket used\\n **/\\n function getDestinationOfTicket(uint256 userTicket) external view override returns (address) {\\n return _getDestinationOfTicket(userTicket);\\n }\\n\\n /**\\n * @dev Getter, returns the data linked to a ticket\\n * @param userTicket ticket used\\n **/\\n function getTicketData(uint256 userTicket) external view override returns (TicketData memory) {\\n return _getTicketData(userTicket);\\n }\\n\\n /**\\n * @dev returns whether a ticket is on cooldown or not\\n * @param userTicket ticket used\\n **/\\n function isTicketOnCooldown(uint256 userTicket) external view override returns (bool) {\\n return _isOnCooldown(_getTicketData(userTicket));\\n }\\n\\n function _setDestinationForTicket(uint256 userTicket, address destination) internal virtual {\\n _userTicketsData[userTicket].destination = destination;\\n emit TicketDestinationUpdated(userTicket, destination);\\n }\\n\\n function _setTicketOnCooldown(uint256 userTicket) internal {\\n _userTicketsData[userTicket].cooldownStart = uint32(block.timestamp);\\n emit TicketSetOnCooldown(userTicket);\\n }\\n\\n function _getDestinationOfTicket(uint256 userTicket) internal view returns (address) {\\n return _userTicketsData[userTicket].destination;\\n }\\n\\n function _isOnCooldown(TicketData memory userTicketData) internal view returns (bool) {\\n return userTicketData.cooldownStart + SOULBOUND_COOLDOWN_DURATION < block.timestamp;\\n }\\n\\n function _getTicketData(uint256 userTicket) internal view returns (TicketData memory) {\\n return _userTicketsData[userTicket];\\n }\\n\\n function _encodeInSnarkField(address addr, uint256 nb) internal pure returns (uint256) {\\n return uint256(keccak256(abi.encode(addr, nb))) % HydraS1Lib.SNARK_FIELD;\\n }\\n}\\n\",\"keccak256\":\"0xe72642edf2eecc2886aae203d09ac63f5515a1e51f0ad85b9da410aa59db6261\",\"license\":\"MIT\"},\"contracts/core/Attester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\nimport {IAttester} from './interfaces/IAttester.sol';\\nimport {IAttestationsRegistry} from './interfaces/IAttestationsRegistry.sol';\\nimport {Request, Attestation, AttestationData} from './libs/Structs.sol';\\n\\n/**\\n * @title Attester Abstract Contract\\n * @author Sismo\\n * @notice Contract to be inherited by Attesters\\n * All attesters that expect to be authorized in Sismo Protocol (i.e write access on the registry)\\n * are recommended to implemented this abstract contract\\n\\n * Take a look at the HydraS1SimpleAttester.sol for example on how to implement this abstract contract\\n *\\n * This contracts is built around two main external standard functions.\\n * They must NOT be override them, unless your really know what you are doing\\n \\n * - generateAttestations(request, proof) => will write attestations in the registry\\n * 1. (MANDATORY) Implement the buildAttestations() view function which generate attestations from user request\\n * 2. (MANDATORY) Implement teh _verifyRequest() internal function where to write checks\\n * 3. (OPTIONAL) Override _beforeRecordAttestations and _afterRecordAttestations hooks\\n\\n * - deleteAttestations(collectionId, owner, proof) => will delete attestations in the registry\\n * 1. (DEFAULT) By default this function throws (see _verifyAttestationsDeletionRequest)\\n * 2. (OPTIONAL) Override the _verifyAttestationsDeletionRequest so it no longer throws\\n * 3. (OPTIONAL) Override _beforeDeleteAttestations and _afterDeleteAttestations hooks\\n\\n * For more information: https://attesters.docs.sismo.io\\n **/\\nabstract contract Attester is IAttester {\\n // Registry where all attestations are stored\\n IAttestationsRegistry internal immutable ATTESTATIONS_REGISTRY;\\n\\n /**\\n * @dev Constructor\\n * @param attestationsRegistryAddress The address of the AttestationsRegistry contract storing attestations\\n */\\n constructor(address attestationsRegistryAddress) {\\n ATTESTATIONS_REGISTRY = IAttestationsRegistry(attestationsRegistryAddress);\\n }\\n\\n /**\\n * @dev Main external function. Allows to generate attestations by making a request and submitting proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that has been recorded\\n */\\n function generateAttestations(Request calldata request, bytes calldata proofData)\\n external\\n override\\n returns (Attestation[] memory)\\n {\\n // Verify if request is valid by verifying against proof\\n _verifyRequest(request, proofData);\\n\\n // Generate the actual attestations from user request\\n Attestation[] memory attestations = buildAttestations(request, proofData);\\n\\n _beforeRecordAttestations(request, proofData);\\n\\n ATTESTATIONS_REGISTRY.recordAttestations(attestations);\\n\\n _afterRecordAttestations(attestations);\\n\\n for (uint256 i = 0; i < attestations.length; i++) {\\n emit AttestationGenerated(attestations[i]);\\n }\\n\\n return attestations;\\n }\\n\\n /**\\n * @dev External facing function. Allows to delete attestations by submitting proof\\n * @param collectionIds Collection identifier of attestations to delete\\n * @param attestationsOwner Owner of attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n * @return attestations Attestations that were deleted\\n */\\n function deleteAttestations(\\n uint256[] calldata collectionIds,\\n address attestationsOwner,\\n bytes calldata proofData\\n ) external override returns (Attestation[] memory) {\\n // fetch attestations from the registry\\n Attestation[] memory attestationsToDelete;\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n (\\n address issuer,\\n uint256 attestationValue,\\n uint32 timestamp,\\n bytes memory extraData\\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\\n\\n attestationsToDelete[i] = (\\n Attestation(\\n collectionIds[i],\\n attestationsOwner,\\n issuer,\\n attestationValue,\\n timestamp,\\n extraData\\n )\\n );\\n }\\n\\n _verifyAttestationsDeletionRequest(attestationsToDelete, proofData);\\n\\n _beforeDeleteAttestations(attestationsToDelete, proofData);\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationsToDelete);\\n\\n _afterDeleteAttestations(attestationsToDelete, proofData);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n emit AttestationDeleted(attestationsToDelete[i]);\\n }\\n return attestationsToDelete;\\n }\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should build attestations from the user request and the proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(Request calldata request, bytes calldata proofData)\\n public\\n view\\n virtual\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev Attestation registry getter\\n * @return attestationRegistry\\n */\\n function getAttestationRegistry() external view override returns (IAttestationsRegistry) {\\n return ATTESTATIONS_REGISTRY;\\n }\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should verify the user request is valid\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _verifyRequest(Request calldata request, bytes calldata proofData) internal virtual;\\n\\n /**\\n * @dev Optional: must be overridden by attesters that want to feature attestations deletion\\n * Default behavior: throws\\n * It should verify attestations deletion request is valid\\n * @param attestations Attestations that will be deleted\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _verifyAttestationsDeletionRequest(\\n Attestation[] memory attestations,\\n bytes calldata proofData\\n ) internal virtual {\\n revert AttestationDeletionNotImplemented();\\n }\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called before recording attestations in the registry\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _beforeRecordAttestations(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n\\n /**\\n * @dev (Optional) Can be overridden in attesters inheriting this contract\\n * Will be called after recording an attestation\\n * @param attestations Recorded attestations\\n */\\n function _afterRecordAttestations(Attestation[] memory attestations) internal virtual {}\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called before deleting attestations from the registry\\n * @param attestations Attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n */\\n function _beforeDeleteAttestations(Attestation[] memory attestations, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called after deleting attestations from the registry\\n * @param attestations Attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n */\\n function _afterDeleteAttestations(Attestation[] memory attestations, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n}\\n\",\"keccak256\":\"0x37683c6752d4dc911459084eb191c1045f3bf34e2143f3db3d298a66c971a106\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttestationsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Attestation, AttestationData} from '../libs/Structs.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry {\\n event AttestationRecorded(Attestation attestation);\\n event AttestationDeleted(Attestation attestation);\\n\\n /**\\n * @dev Main function to be called by authorized issuers\\n * @param attestations Attestations to be recorded (creates a new one or overrides an existing one)\\n */\\n function recordAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Delete function to be called by authorized issuers\\n * @param attestations Attestations to be deleted\\n */\\n function deleteAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Returns whether a user has an attestation from a collection\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function hasAttestation(uint256 collectionId, address owner) external returns (bool);\\n\\n /**\\n * @dev Getter of the data of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationData(uint256 collectionId, address owner)\\n external\\n view\\n returns (AttestationData memory);\\n\\n /**\\n * @dev Getter of the value of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationValue(uint256 collectionId, address owner) external view returns (uint256);\\n\\n /**\\n * @dev Getter of the data of a specific attestation as tuple\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationDataTuple(uint256 collectionId, address owner)\\n external\\n view\\n returns (\\n address,\\n uint256,\\n uint32,\\n bytes memory\\n );\\n\\n /**\\n * @dev Getter of the extraData of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationExtraData(uint256 collectionId, address owner)\\n external\\n view\\n returns (bytes memory);\\n\\n /**\\n * @dev Getter of the issuer of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationIssuer(uint256 collectionId, address owner)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @dev Getter of the timestamp of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationTimestamp(uint256 collectionId, address owner)\\n external\\n view\\n returns (uint32);\\n\\n /**\\n * @dev Getter of the data of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationDataBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (AttestationData[] memory);\\n\\n /**\\n * @dev Getter of the values of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationValueBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xb5e25bd7e0372c9973e582fb7fe96318c145831a5452d8c79eb848a7464b0297\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Request, Attestation} from '../libs/Structs.sol';\\nimport {IAttestationsRegistry} from '../interfaces/IAttestationsRegistry.sol';\\n\\n/**\\n * @title IAttester\\n * @author Sismo\\n * @notice This is the interface for the attesters in Sismo Protocol\\n */\\ninterface IAttester {\\n event AttestationGenerated(Attestation attestation);\\n\\n event AttestationDeleted(Attestation attestation);\\n\\n error AttestationDeletionNotImplemented();\\n\\n /**\\n * @dev Main external function. Allows to generate attestations by making a request and submitting proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that has been recorded\\n */\\n function generateAttestations(Request calldata request, bytes calldata proofData)\\n external\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev External facing function. Allows to delete an attestation by submitting proof\\n * @param collectionIds Collection identifier of attestations to delete\\n * @param attestationsOwner Owner of attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n * @return attestations Attestations that was deleted\\n */\\n function deleteAttestations(\\n uint256[] calldata collectionIds,\\n address attestationsOwner,\\n bytes calldata proofData\\n ) external returns (Attestation[] memory);\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should build attestations from the user request and the proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(Request calldata request, bytes calldata proofData)\\n external\\n view\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev Attestation registry address getter\\n * @return attestationRegistry Address of the registry\\n */\\n function getAttestationRegistry() external view returns (IAttestationsRegistry);\\n}\\n\",\"keccak256\":\"0xafe9c1a742d7570033c8d74cee203e09ee9b7461eaed6d2ca77697449e2ce95d\",\"license\":\"MIT\"},\"contracts/core/libs/Structs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title Attestations Registry State\\n * @author Sismo\\n * @notice This contract holds all of the storage variables and data\\n * structures used by the AttestationsRegistry and parent\\n * contracts.\\n */\\n\\n// User Attestation Request, can be made by any user\\n// The context of an Attestation Request is a specific attester contract\\n// Each attester has groups of accounts in its available data\\n// eg: for a specific attester:\\n// group 1 <=> accounts that sent txs on mainnet\\n// group 2 <=> accounts that sent txs on polygon\\n// eg: for another attester:\\n// group 1 <=> accounts that sent eth txs in 2022\\n// group 2 <=> accounts sent eth txs in 2021\\nstruct Request {\\n // implicit address attester;\\n // implicit uint256 chainId;\\n Claim[] claims;\\n address destination; // destination that will receive the end attestation\\n}\\n\\nstruct Claim {\\n uint256 groupId; // user claims to have an account in this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n bytes extraData; // arbitrary data, may be required by the attester to verify claims or generate a specific attestation\\n}\\n\\n/**\\n * @dev Attestation Struct. This is the struct receive as argument by the Attestation Registry.\\n * @param collectionId Attestation collection\\n * @param owner Attestation collection\\n * @param issuer Attestation collection\\n * @param value Attestation collection\\n * @param timestamp Attestation collection\\n * @param extraData Attestation collection\\n */\\nstruct Attestation {\\n // implicit uint256 chainId;\\n uint256 collectionId; // Id of the attestation collection (in the registry)\\n address owner; // Owner of the attestation\\n address issuer; // Contract that created or last updated the record.\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Timestamp chosen by the attester, should correspond to the effective date of the attestation\\n // it is different from the recording timestamp (date when the attestation was recorded)\\n // e.g a proof of NFT ownership may have be recorded today which is 2 month old data.\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\\n// Attestation Data, stored in the registry\\n// The context is a specific owner of a specific collection\\nstruct AttestationData {\\n // implicit uint256 chainId\\n // implicit uint256 collectionId - from context\\n // implicit owner\\n address issuer; // Address of the contract that recorded the attestation\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Effective date of issuance of the attestation. (can be different from the recording timestamp)\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\",\"keccak256\":\"0x893d9a10429878dd4077388ff4da954c20b86a3c172a7bbdd10a01eb5d39b6a0\",\"license\":\"MIT\"},\"contracts/periphery/utils/AvailableRootsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {IAvailableRootsRegistry} from './interfaces/IAvailableRootsRegistry.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\n\\n/**\\n * @title Attesters Groups Registry\\n * @author Sismo\\n * @notice This contract stores that data required by attesters to be available so they can verify user claims\\n * This contract is deployed behind a proxy and this implementation is focused on storing merkle roots\\n * For more information: https://available-roots-registry.docs.sismo.io\\n *\\n **/\\ncontract AvailableRootsRegistry is IAvailableRootsRegistry, Initializable, Ownable {\\n mapping(address => mapping(uint256 => bool)) public _roots;\\n\\n /**\\n * @dev Constructor\\n * @param owner Owner of the contract, can register/ unregister roots\\n */\\n constructor(address owner) {\\n initialize(owner);\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n */\\n function initialize(address owner) public initializer {\\n _transferOwnership(owner);\\n }\\n\\n /**\\n * @dev Register a root available for an attester\\n * @param attester Attester which will have the root available\\n * @param root Root to register\\n */\\n function registerRootForAttester(address attester, uint256 root) external onlyOwner {\\n if (attester == address(0)) revert CannotRegisterForZeroAddress();\\n _registerRootForAttester(attester, root);\\n }\\n\\n /**\\n * @dev Unregister a root for an attester\\n * @param attester Attester which will no longer have the root available\\n * @param root Root to unregister\\n */\\n function unregisterRootForAttester(address attester, uint256 root) external onlyOwner {\\n if (attester == address(0)) revert CannotUnregisterForZeroAddress();\\n _unregisterRootForAttester(attester, root);\\n }\\n\\n /**\\n * @dev Registers a root, available for all contracts\\n * @param root Root to register\\n */\\n function registerRootForAll(uint256 root) external onlyOwner {\\n _registerRootForAttester(address(0), root);\\n }\\n\\n /**\\n * @dev Unregister a root, available for all contracts\\n * @param root Root to unregister\\n */\\n function unregisterRootForAll(uint256 root) external onlyOwner {\\n _unregisterRootForAttester(address(0), root);\\n }\\n\\n /**\\n * @dev returns whether a root is available for a caller (msg.sender)\\n * @param root root to check whether it is registered for me or not\\n */\\n function isRootAvailableForMe(uint256 root) external view returns (bool) {\\n return _roots[_msgSender()][root] || _roots[address(0)][root];\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param attester Owner of the contract, can update public key and address\\n * @param root Owner of the contract, can update public key and address\\n */\\n function isRootAvailableForAttester(address attester, uint256 root) external view returns (bool) {\\n return _roots[attester][root] || _roots[address(0)][root];\\n }\\n\\n function _registerRootForAttester(address attester, uint256 root) internal {\\n _roots[attester][root] = true;\\n if (attester == address(0)) {\\n emit RegisteredRootForAll(root);\\n } else {\\n emit RegisteredRootForAttester(attester, root);\\n }\\n }\\n\\n function _unregisterRootForAttester(address attester, uint256 root) internal {\\n _roots[attester][root] = false;\\n if (attester == address(0)) {\\n emit UnregisteredRootForAll(root);\\n } else {\\n emit UnregisteredRootForAttester(attester, root);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9329ecaf60ffe978c8ab4360e0a8f9bd36e2549e89d672dd39ae80f9a562f9a9\",\"license\":\"MIT\"},\"contracts/periphery/utils/CommitmentMapperRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\nimport {ICommitmentMapperRegistry} from './interfaces/ICommitmentMapperRegistry.sol';\\n\\n/**\\n * @title Commitment Mapper Registry Contract\\n * @author Sismo\\n * @notice This contract stores information about the commitment mapper.\\n * Its ethereum address and its EdDSA public key\\n * For more information: https://commitment-mapper.docs.sismo.io\\n *\\n **/\\ncontract CommitmentMapperRegistry is ICommitmentMapperRegistry, Initializable, Ownable {\\n uint256[2] internal _commitmentMapperPubKey;\\n address _commitmentMapperAddress;\\n\\n /**\\n * @dev Constructor\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n constructor(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) {\\n initialize(owner, commitmentMapperEdDSAPubKey, commitmentMapperAddress);\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n function initialize(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) public initializer {\\n _transferOwnership(owner);\\n _updateCommitmentMapperEdDSAPubKey(commitmentMapperEdDSAPubKey);\\n _updateCommitmentMapperAddress(commitmentMapperAddress);\\n }\\n\\n /**\\n * @dev Updates the EdDSA public key\\n * @param newEdDSAPubKey new EdDSA pubic key\\n */\\n function updateCommitmentMapperEdDSAPubKey(uint256[2] memory newEdDSAPubKey) external onlyOwner {\\n _updateCommitmentMapperEdDSAPubKey(newEdDSAPubKey);\\n }\\n\\n /**\\n * @dev Updates the address\\n * @param newAddress new address\\n */\\n function updateCommitmentMapperAddress(address newAddress) external onlyOwner {\\n _updateCommitmentMapperAddress(newAddress);\\n }\\n\\n /**\\n * @dev Getter of the EdDSA public key of the commitment mapper\\n */\\n function getEdDSAPubKey() external view override returns (uint256[2] memory) {\\n return _commitmentMapperPubKey;\\n }\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getAddress() external view override returns (address) {\\n return _commitmentMapperAddress;\\n }\\n\\n function _updateCommitmentMapperAddress(address newAddress) internal {\\n _commitmentMapperAddress = newAddress;\\n emit UpdatedCommitmentMapperAddress(newAddress);\\n }\\n\\n function _updateCommitmentMapperEdDSAPubKey(uint256[2] memory pubKey) internal {\\n _commitmentMapperPubKey = pubKey;\\n emit UpdatedCommitmentMapperEdDSAPubKey(pubKey);\\n }\\n}\\n\",\"keccak256\":\"0xacb5347ee1a0e8dc25a1ce3e6fbb427db646e833ff8508909454cad7950418d4\",\"license\":\"MIT\"},\"contracts/periphery/utils/interfaces/IAvailableRootsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title IAvailableRootsRegistry\\n * @author Sismo\\n * @notice Interface for (Merkle) Roots Registry\\n */\\ninterface IAvailableRootsRegistry {\\n event RegisteredRootForAttester(address attester, uint256 root);\\n event RegisteredRootForAll(uint256 root);\\n event UnregisteredRootForAttester(address attester, uint256 root);\\n event UnregisteredRootForAll(uint256 root);\\n\\n error CannotRegisterForZeroAddress();\\n error CannotUnregisterForZeroAddress();\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n */\\n function initialize(address owner) external;\\n\\n /**\\n * @dev Register a root available for an attester\\n * @param attester Attester which will have the root available\\n * @param root Root to register\\n */\\n function registerRootForAttester(address attester, uint256 root) external;\\n\\n /**\\n * @dev Unregister a root for an attester\\n * @param attester Attester which will no longer have the root available\\n * @param root Root to unregister\\n */\\n function unregisterRootForAttester(address attester, uint256 root) external;\\n\\n /**\\n * @dev Registers a root, available for all contracts\\n * @param root Root to register\\n */\\n function registerRootForAll(uint256 root) external;\\n\\n /**\\n * @dev Unregister a root, available for all contracts\\n * @param root Root to unregister\\n */\\n function unregisterRootForAll(uint256 root) external;\\n\\n /**\\n * @dev returns whether a root is available for a caller (msg.sender)\\n * @param root root to check whether it is registered for me or not\\n */\\n function isRootAvailableForMe(uint256 root) external view returns (bool);\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param attester Owner of the contract, can update public key and address\\n * @param root Owner of the contract, can update public key and address\\n */\\n function isRootAvailableForAttester(address attester, uint256 root) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x87f5035b58936a8458a22f3cf1b3865bd798813310d86af41af74680978c97c8\",\"license\":\"MIT\"},\"contracts/periphery/utils/interfaces/ICommitmentMapperRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\ninterface ICommitmentMapperRegistry {\\n event UpdatedCommitmentMapperEdDSAPubKey(uint256[2] newEdDSAPubKey);\\n event UpdatedCommitmentMapperAddress(address newAddress);\\n error PubKeyNotValid(uint256[2] pubKey);\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param owner Owner of the contract, can update public key and address\\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\\n * @param commitmentMapperAddress Address of the commitment mapper\\n */\\n function initialize(\\n address owner,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) external;\\n\\n /**\\n * @dev Updates the EdDSA public key\\n * @param newEdDSAPubKey new EdDSA pubic key\\n */\\n function updateCommitmentMapperEdDSAPubKey(uint256[2] memory newEdDSAPubKey) external;\\n\\n /**\\n * @dev Updates the address\\n * @param newAddress new address\\n */\\n function updateCommitmentMapperAddress(address newAddress) external;\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getEdDSAPubKey() external view returns (uint256[2] memory);\\n\\n /**\\n * @dev Getter of the address of the commitment mapper\\n */\\n function getAddress() external view returns (address);\\n}\\n\",\"keccak256\":\"0x8d6298b442dde99ee5a9cc989ada6ea808383a08b1e9bb1d4c2b58adc01eec69\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101606040523480156200001257600080fd5b506040516200218c3803806200218c833981016040819052620000359162000088565b6001600160a01b0395861660805293851660c05291841660a0529390921660e05261010092909252610120526101405262000102565b80516001600160a01b03811681146200008357600080fd5b919050565b600080600080600080600060e0888a031215620000a457600080fd5b620000af886200006b565b9650620000bf602089016200006b565b9550620000cf604089016200006b565b9450620000df606089016200006b565b93506080880151925060a0880151915060c0880151905092959891949750929550565b60805160a05160c05160e051610100516101205161014051611ff16200019b6000396000818161013e01526108d30152600081816101ad01526103c901526000818161017301526103a101526000818161023a015281816104e40152818161066601526107a00152600081816101d10152610ec701526000818160d60152610f6301526000818161011501526110be0152611ff16000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063918447af1161008c578063bfa6658511610066578063bfa6658514610238578063c776adde1461025e578063d9895e6a14610271578063e60f999f146102ae57600080fd5b8063918447af146101cf57806392cf369d146101f5578063af411a301461021857600080fd5b80632254f98e146100d457806346657fe9146101135780634e5cf9331461013957806354846d7a1461016e57806363e4afc2146101955780637000b051146101a8575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006100f6565b6101607f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161010a565b6101607f000000000000000000000000000000000000000000000000000000000000000081565b6100f66101a3366004611537565b6102c1565b6101607f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006100f6565b610208610203366004611537565b6102e0565b604051901515815260200161010a565b61022b610226366004611599565b6102f3565b60405161010a91906116c5565b7f00000000000000000000000000000000000000000000000000000000000000006100f6565b61022b61026c36600461174c565b6104ce565b61028461027f366004611537565b610745565b6040805182516001600160a01b0316815260209283015163ffffffff16928101929092520161010a565b61022b6102bc366004611599565b610762565b6000818152600160205260408120546001600160a01b03165b92915050565b60006102da6102ee8361087e565b6108ce565b60606000610308610303866118af565b61090e565b60408051600180825281830190925291925060009190816020015b6103746040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b8152602001906001900390816103235750506060830151519091506000906103c5906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611a3f565b90507f000000000000000000000000000000000000000000000000000000000000000081111561041057604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b30600061041d8888610993565b90506040518060c001604052808481526020018a60200160208101906104439190611a57565b6001600160a01b03168152602001836001600160a01b031681526020018660200151815260200186606001516020015163ffffffff1681526020018260405160200161049191815260200190565b604051602081830303815290604052815250846000815181106104b6576104b6611a74565b60209081029190910101525091979650505050505050565b60608060005b86811015610638576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78d8d8881811061052357610523611a74565b905060200201358c6040518363ffffffff1660e01b815260040161055a9291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610577573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261059f9190810190611a9e565b93509350935093506040518060c001604052808d8d888181106105c4576105c4611a74565b9050602002013581526020018b6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061061657610616611a74565b602002602001018190525050505050808061063090611b4e565b9150506104d4565b506106448185856109b8565b61064f818585610a53565b6040516373e4ca1b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e7c994369061069b9084906004016116c5565b600060405180830381600087803b1580156106b557600080fd5b505af11580156106c9573d6000803e3d6000fd5b5050505060005b8681101561073a577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061070b5761070b611a74565b60200260200101516040516107209190611b67565b60405180910390a18061073281611b4e565b9150506106d0565b509695505050505050565b60408051808201909152600080825260208201526102da8261087e565b606061076f848484610b29565b600061077c8585856102f3565b9050610789858585610b71565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906107d59084906004016116c5565b600060405180830381600087803b1580156107ef57600080fd5b505af1158015610803573d6000803e3d6000fd5b5050505060005b8151811015610875577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc82828151811061084657610846611a74565b602002602001015160405161085b9190611b67565b60405180910390a18061086d81611b4e565b91505061080a565b50949350505050565b6040805180820190915260008082526020820152506000908152600160209081526040918290208251808401909352546001600160a01b0381168352600160a01b900463ffffffff169082015290565b6000427f0000000000000000000000000000000000000000000000000000000000000000836020015163ffffffff166109079190611a3f565b1092915050565b610916611463565b6000826000015160008151811061092f5761092f611a74565b6020026020010151905061094281610c65565b6000816040015180602001905181019061095c9190611b8a565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b6000806109a283850185611cbb565b905060006109af82610ca9565b95945050505050565b60005b8351811015610a4d576000846000815181106109d9576109d9611a74565b602002602001015160a001518060200190518101906109f89190611d8c565b6000818152600160205260409020549091506001600160a01b03163314610a3a5760405162f8a2bf60e81b815260048101829052336024820152604401610407565b5080610a4581611b4e565b9150506109bb565b50505050565b60005b8351811015610a4d576000848281518110610a7357610a73611a74565b602002602001015160a00151806020019051810190610a929190611d8c565b6000818152600160209081526040918290208251808401909352546001600160a01b0381168352600160a01b900463ffffffff1690820152909150610ad6906108ce565b1515600103610afb57604051632fcfdde360e11b815260048101829052602401610407565b600090815260016020526040902080546001600160a01b031916905580610b2181611b4e565b915050610a56565b6000610b3782840184611cbb565b90506000610b4482610cbf565b90506000610b54610303876118af565b9050610b608183610d69565b610b6983611094565b505050505050565b6000610b7d8383610993565b6000818152600160209081526040918290208251808401909352546001600160a01b038116808452600160a01b90910463ffffffff16918301919091529192509015801590610bf15750610bd76040860160208701611a57565b6001600160a01b031681600001516001600160a01b031614155b15610c4257610bff816108ce565b15610c3957604051633f8ffaa560e01b815281516001600160a01b03166004820152602082015163ffffffff166024820152604401610407565b610c428261122d565b610c5b82610c566040880160208901611a57565b61128e565b5050505050565b50565b6000610c7482604001516112f4565b82519091508114610ca55781516040516337e3d1ab60e01b8152610407918391600401918252602082015260400190565b5050565b602081015160009060065b602002015192915050565b610cc76114c6565b604051806101200160405280610cdc84611329565b6001600160a01b03168152602001610cf384611337565b8152602001610d0184611346565b8152602001610d0f84611355565b8152602001610d1d84610ca9565b8152602001610d2b84611364565b8152602001610d3984611373565b8152602001610d518460200151610120015160011490565b15158152602001610d6184611382565b905292915050565b815160c082015114610d9e57815160c082015160405163fe405c7760e01b815260048101929092526024820152604401610407565b81606001516040015115158160e00151151503610de957606082015160409081015160e08301519151634629f1b560e11b815290151560048201529015156024820152604401610407565b81604001516001600160a01b031681600001516001600160a01b031614610e3d57604082810151825191516370a8d99b60e11b81526001600160a01b03918216600482015291166024820152604401610407565b46816020015114610e70576020810151604051630432cec160e31b81524660048201526024810191909152604401610407565b81602001518160a0015114610eab57602082015160a0820151604051630626ade360e41b815260048101929092526024820152604401610407565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015610f16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3a9190611da5565b610f5f57806040015160405163cbfe7bc360e01b815260040161040791815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa158015610fbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe29190611dc0565b80516101008401515191925014158061100957506020808201516101008401519091015114155b15611053578051602080830151610100850151805192015160405163318d812b60e01b81526004810194909452602484019190915260448301919091526064820152608401610407565b600061105e846113da565b905080836060015114610a4d5760608301516040516377bb6d2760e11b8152610407918391600401918252602082015260400190565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f6946110f794909392909190600401611e3c565b602060405180830381865afa925050508015611130575060408051601f3d908101601f1916820190925261112d91810190611da5565b60015b6112065761113c611ec0565b806308c379a0036111755750611150611edc565b8061115b57506111b4565b8060405162dd577760e81b81526004016104079190611f66565b634e487b71036111b457611187611f79565b9061119257506111b4565b60405162dd577760e81b81526020600482015260006024820152604401610407565b3d8080156111de576040519150601f19603f3d011682016040523d82523d6000602084013e6111e3565b606091505b5060405162dd577760e81b81526020600482015260006024820152604401610407565b80610ca55760405162dd577760e81b81526020600482015260006024820152604401610407565b600081815260016020908152604091829020805463ffffffff60a01b1916600160a01b4263ffffffff160217905590518281527f49ab97b1dc68eafe79e6e7f8ff996d00259888e84cb401cf9ec8d39adf7ab196910160405180910390a150565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b805160208201206000906102da907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190611f99565b602081015160009081610cb4565b60208101516000906001610cb4565b60208101516000906004610cb4565b60208101516000906005610cb4565b60208101516000906007610cb4565b60208101516000906008610cb4565b61138a611519565b604051806040016040528083602001516002600a81106113ac576113ac611a74565b6020020151815260200183602001516003600a81106113cd576113cd611a74565b6020020151905292915050565b6000806113f8308460600151600001516001600160801b03166113ff565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6113f89190611f99565b6040518060800160405280600081526020016000815260200160006001600160a01b031681526020016114c1604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b905290565b60405180610120016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016114c15b60405180604001604052806002906020820280368337509192915050565b60006020828403121561154957600080fd5b5035919050565b60008083601f84011261156257600080fd5b50813567ffffffffffffffff81111561157a57600080fd5b60208301915083602082850101111561159257600080fd5b9250929050565b6000806000604084860312156115ae57600080fd5b833567ffffffffffffffff808211156115c657600080fd5b90850190604082880312156115da57600080fd5b909350602085013590808211156115f057600080fd5b506115fd86828701611550565b9497909650939450505050565b60005b8381101561162557818101518382015260200161160d565b83811115610a4d5750506000910152565b6000815180845261164e81602086016020860161160a565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a08501526116bd60c0850182611636565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561171a57603f19888603018452611708858351611662565b945092850192908501906001016116ec565b5092979650505050505050565b6001600160a01b0381168114610c6257600080fd5b803561174781611727565b919050565b60008060008060006060868803121561176457600080fd5b853567ffffffffffffffff8082111561177c57600080fd5b818801915088601f83011261179057600080fd5b81358181111561179f57600080fd5b8960208260051b85010111156117b457600080fd5b602083019750809650506117ca6020890161173c565b945060408801359150808211156117e057600080fd5b506117ed88828901611550565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b6040810181811067ffffffffffffffff82111715611834576118346117fe565b60405250565b6060810181811067ffffffffffffffff82111715611834576118346117fe565b601f8201601f1916810167ffffffffffffffff81118282101715611880576118806117fe565b6040525050565b600067ffffffffffffffff8211156118a1576118a16117fe565b50601f01601f191660200190565b600060408083360312156118c257600080fd5b80516118cd81611814565b833567ffffffffffffffff808211156118e557600080fd5b9085019036601f8301126118f857600080fd5b813560208282111561190c5761190c6117fe565b8160051b865161191e8383018261185a565b9283528481018201928281013685111561193757600080fd5b83870192505b84831015611a0b578235868111156119555760008081fd5b8701606036829003601f190181131561196e5760008081fd5b8a516119798161183a565b8287013581528b8301358188015290820135908882111561199a5760008081fd5b9181019136603f8401126119b057600091508182fd5b8683013591506119bf82611887565b8c516119cb828261185a565b838152368e8587010111156119e257600091508182fd5b838e86018a830137600093810189019390935250808c019190915282525091830191830161193d565b50865250611a1a88820161173c565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611a5257611a52611a29565b500190565b600060208284031215611a6957600080fd5b81356113f881611727565b634e487b7160e01b600052603260045260246000fd5b805163ffffffff8116811461174757600080fd5b60008060008060808587031215611ab457600080fd5b8451611abf81611727565b60208601519094509250611ad560408601611a8a565b9150606085015167ffffffffffffffff811115611af157600080fd5b8501601f81018713611b0257600080fd5b8051611b0d81611887565b604051611b1a828261185a565b828152896020848601011115611b2f57600080fd5b611b4083602083016020870161160a565b969995985093965050505050565b600060018201611b6057611b60611a29565b5060010190565b6020815260006113f86020830184611662565b8051801515811461174757600080fd5b600060608284031215611b9c57600080fd5b6040516060810181811067ffffffffffffffff82111715611bbf57611bbf6117fe565b60405282516001600160801b0381168114611bd957600080fd5b8152611be760208401611a8a565b6020820152611bf860408401611b7a565b60408201529392505050565b600082601f830112611c1557600080fd5b604051611c2181611814565b806040840185811115611c3357600080fd5b845b81811015611c4d578035835260209283019201611c35565b509195945050505050565b600082601f830112611c6957600080fd5b60405161014080820182811067ffffffffffffffff82111715611c8e57611c8e6117fe565b60405283018185821115611ca157600080fd5b845b82811015611c4d578035825260209182019101611ca3565b6000818303610240811215611ccf57600080fd5b60408051611cdc81611814565b61010080841215611cec57600080fd5b82519350611cf98461183a565b611d038787611c04565b845286605f870112611d1457600080fd5b8251611d1f81611814565b8060c0880189811115611d3157600080fd5b8589015b81811015611d5657611d478b82611c04565b83526020909201918601611d35565b50826020880152611d678a82611c04565b86880152505050838252611d7d87828801611c58565b60208301525095945050505050565b600060208284031215611d9e57600080fd5b5051919050565b600060208284031215611db757600080fd5b6113f882611b7a565b600060408284031215611dd257600080fd5b82601f830112611de157600080fd5b604051611ded81611814565b806040840185811115611dff57600080fd5b845b81811015611c4d578051835260209283019201611e01565b8060005b6002811015610a4d578151845260209384019390910190600101611e1d565b6102408101611e4b8287611e19565b60408083018660005b6002811015611e7b57611e68838351611e19565b9183019160209190910190600101611e54565b50505050611e8c60c0830185611e19565b61010082018360005b600a811015611eb4578151835260209283019290910190600101611e95565b50505095945050505050565b600060033d1115611ed95760046000803e5060005160e01c5b90565b600060443d1015611eea5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611f1a57505050505090565b8285019150815181811115611f325750505050505090565b843d8701016020828501011115611f4c5750505050505090565b611f5b6020828601018761185a565b509095945050505050565b6020815260006113f86020830184611636565b60008060233d1115611f95576020600460003e50506000516001905b9091565b600082611fb657634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220f1374674d2143dc1e1f8e0666c58769f2e4bc209220c094f513f5b717a358ad464736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063918447af1161008c578063bfa6658511610066578063bfa6658514610238578063c776adde1461025e578063d9895e6a14610271578063e60f999f146102ae57600080fd5b8063918447af146101cf57806392cf369d146101f5578063af411a301461021857600080fd5b80632254f98e146100d457806346657fe9146101135780634e5cf9331461013957806354846d7a1461016e57806363e4afc2146101955780637000b051146101a8575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006100f6565b6101607f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161010a565b6101607f000000000000000000000000000000000000000000000000000000000000000081565b6100f66101a3366004611537565b6102c1565b6101607f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006100f6565b610208610203366004611537565b6102e0565b604051901515815260200161010a565b61022b610226366004611599565b6102f3565b60405161010a91906116c5565b7f00000000000000000000000000000000000000000000000000000000000000006100f6565b61022b61026c36600461174c565b6104ce565b61028461027f366004611537565b610745565b6040805182516001600160a01b0316815260209283015163ffffffff16928101929092520161010a565b61022b6102bc366004611599565b610762565b6000818152600160205260408120546001600160a01b03165b92915050565b60006102da6102ee8361087e565b6108ce565b60606000610308610303866118af565b61090e565b60408051600180825281830190925291925060009190816020015b6103746040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b8152602001906001900390816103235750506060830151519091506000906103c5906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611a3f565b90507f000000000000000000000000000000000000000000000000000000000000000081111561041057604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b30600061041d8888610993565b90506040518060c001604052808481526020018a60200160208101906104439190611a57565b6001600160a01b03168152602001836001600160a01b031681526020018660200151815260200186606001516020015163ffffffff1681526020018260405160200161049191815260200190565b604051602081830303815290604052815250846000815181106104b6576104b6611a74565b60209081029190910101525091979650505050505050565b60608060005b86811015610638576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78d8d8881811061052357610523611a74565b905060200201358c6040518363ffffffff1660e01b815260040161055a9291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610577573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261059f9190810190611a9e565b93509350935093506040518060c001604052808d8d888181106105c4576105c4611a74565b9050602002013581526020018b6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061061657610616611a74565b602002602001018190525050505050808061063090611b4e565b9150506104d4565b506106448185856109b8565b61064f818585610a53565b6040516373e4ca1b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e7c994369061069b9084906004016116c5565b600060405180830381600087803b1580156106b557600080fd5b505af11580156106c9573d6000803e3d6000fd5b5050505060005b8681101561073a577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061070b5761070b611a74565b60200260200101516040516107209190611b67565b60405180910390a18061073281611b4e565b9150506106d0565b509695505050505050565b60408051808201909152600080825260208201526102da8261087e565b606061076f848484610b29565b600061077c8585856102f3565b9050610789858585610b71565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906107d59084906004016116c5565b600060405180830381600087803b1580156107ef57600080fd5b505af1158015610803573d6000803e3d6000fd5b5050505060005b8151811015610875577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc82828151811061084657610846611a74565b602002602001015160405161085b9190611b67565b60405180910390a18061086d81611b4e565b91505061080a565b50949350505050565b6040805180820190915260008082526020820152506000908152600160209081526040918290208251808401909352546001600160a01b0381168352600160a01b900463ffffffff169082015290565b6000427f0000000000000000000000000000000000000000000000000000000000000000836020015163ffffffff166109079190611a3f565b1092915050565b610916611463565b6000826000015160008151811061092f5761092f611a74565b6020026020010151905061094281610c65565b6000816040015180602001905181019061095c9190611b8a565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b6000806109a283850185611cbb565b905060006109af82610ca9565b95945050505050565b60005b8351811015610a4d576000846000815181106109d9576109d9611a74565b602002602001015160a001518060200190518101906109f89190611d8c565b6000818152600160205260409020549091506001600160a01b03163314610a3a5760405162f8a2bf60e81b815260048101829052336024820152604401610407565b5080610a4581611b4e565b9150506109bb565b50505050565b60005b8351811015610a4d576000848281518110610a7357610a73611a74565b602002602001015160a00151806020019051810190610a929190611d8c565b6000818152600160209081526040918290208251808401909352546001600160a01b0381168352600160a01b900463ffffffff1690820152909150610ad6906108ce565b1515600103610afb57604051632fcfdde360e11b815260048101829052602401610407565b600090815260016020526040902080546001600160a01b031916905580610b2181611b4e565b915050610a56565b6000610b3782840184611cbb565b90506000610b4482610cbf565b90506000610b54610303876118af565b9050610b608183610d69565b610b6983611094565b505050505050565b6000610b7d8383610993565b6000818152600160209081526040918290208251808401909352546001600160a01b038116808452600160a01b90910463ffffffff16918301919091529192509015801590610bf15750610bd76040860160208701611a57565b6001600160a01b031681600001516001600160a01b031614155b15610c4257610bff816108ce565b15610c3957604051633f8ffaa560e01b815281516001600160a01b03166004820152602082015163ffffffff166024820152604401610407565b610c428261122d565b610c5b82610c566040880160208901611a57565b61128e565b5050505050565b50565b6000610c7482604001516112f4565b82519091508114610ca55781516040516337e3d1ab60e01b8152610407918391600401918252602082015260400190565b5050565b602081015160009060065b602002015192915050565b610cc76114c6565b604051806101200160405280610cdc84611329565b6001600160a01b03168152602001610cf384611337565b8152602001610d0184611346565b8152602001610d0f84611355565b8152602001610d1d84610ca9565b8152602001610d2b84611364565b8152602001610d3984611373565b8152602001610d518460200151610120015160011490565b15158152602001610d6184611382565b905292915050565b815160c082015114610d9e57815160c082015160405163fe405c7760e01b815260048101929092526024820152604401610407565b81606001516040015115158160e00151151503610de957606082015160409081015160e08301519151634629f1b560e11b815290151560048201529015156024820152604401610407565b81604001516001600160a01b031681600001516001600160a01b031614610e3d57604082810151825191516370a8d99b60e11b81526001600160a01b03918216600482015291166024820152604401610407565b46816020015114610e70576020810151604051630432cec160e31b81524660048201526024810191909152604401610407565b81602001518160a0015114610eab57602082015160a0820151604051630626ade360e41b815260048101929092526024820152604401610407565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015610f16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3a9190611da5565b610f5f57806040015160405163cbfe7bc360e01b815260040161040791815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa158015610fbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe29190611dc0565b80516101008401515191925014158061100957506020808201516101008401519091015114155b15611053578051602080830151610100850151805192015160405163318d812b60e01b81526004810194909452602484019190915260448301919091526064820152608401610407565b600061105e846113da565b905080836060015114610a4d5760608301516040516377bb6d2760e11b8152610407918391600401918252602082015260400190565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f6946110f794909392909190600401611e3c565b602060405180830381865afa925050508015611130575060408051601f3d908101601f1916820190925261112d91810190611da5565b60015b6112065761113c611ec0565b806308c379a0036111755750611150611edc565b8061115b57506111b4565b8060405162dd577760e81b81526004016104079190611f66565b634e487b71036111b457611187611f79565b9061119257506111b4565b60405162dd577760e81b81526020600482015260006024820152604401610407565b3d8080156111de576040519150601f19603f3d011682016040523d82523d6000602084013e6111e3565b606091505b5060405162dd577760e81b81526020600482015260006024820152604401610407565b80610ca55760405162dd577760e81b81526020600482015260006024820152604401610407565b600081815260016020908152604091829020805463ffffffff60a01b1916600160a01b4263ffffffff160217905590518281527f49ab97b1dc68eafe79e6e7f8ff996d00259888e84cb401cf9ec8d39adf7ab196910160405180910390a150565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b805160208201206000906102da907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190611f99565b602081015160009081610cb4565b60208101516000906001610cb4565b60208101516000906004610cb4565b60208101516000906005610cb4565b60208101516000906007610cb4565b60208101516000906008610cb4565b61138a611519565b604051806040016040528083602001516002600a81106113ac576113ac611a74565b6020020151815260200183602001516003600a81106113cd576113cd611a74565b6020020151905292915050565b6000806113f8308460600151600001516001600160801b03166113ff565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6113f89190611f99565b6040518060800160405280600081526020016000815260200160006001600160a01b031681526020016114c1604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b905290565b60405180610120016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016114c15b60405180604001604052806002906020820280368337509192915050565b60006020828403121561154957600080fd5b5035919050565b60008083601f84011261156257600080fd5b50813567ffffffffffffffff81111561157a57600080fd5b60208301915083602082850101111561159257600080fd5b9250929050565b6000806000604084860312156115ae57600080fd5b833567ffffffffffffffff808211156115c657600080fd5b90850190604082880312156115da57600080fd5b909350602085013590808211156115f057600080fd5b506115fd86828701611550565b9497909650939450505050565b60005b8381101561162557818101518382015260200161160d565b83811115610a4d5750506000910152565b6000815180845261164e81602086016020860161160a565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a08501526116bd60c0850182611636565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561171a57603f19888603018452611708858351611662565b945092850192908501906001016116ec565b5092979650505050505050565b6001600160a01b0381168114610c6257600080fd5b803561174781611727565b919050565b60008060008060006060868803121561176457600080fd5b853567ffffffffffffffff8082111561177c57600080fd5b818801915088601f83011261179057600080fd5b81358181111561179f57600080fd5b8960208260051b85010111156117b457600080fd5b602083019750809650506117ca6020890161173c565b945060408801359150808211156117e057600080fd5b506117ed88828901611550565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b6040810181811067ffffffffffffffff82111715611834576118346117fe565b60405250565b6060810181811067ffffffffffffffff82111715611834576118346117fe565b601f8201601f1916810167ffffffffffffffff81118282101715611880576118806117fe565b6040525050565b600067ffffffffffffffff8211156118a1576118a16117fe565b50601f01601f191660200190565b600060408083360312156118c257600080fd5b80516118cd81611814565b833567ffffffffffffffff808211156118e557600080fd5b9085019036601f8301126118f857600080fd5b813560208282111561190c5761190c6117fe565b8160051b865161191e8383018261185a565b9283528481018201928281013685111561193757600080fd5b83870192505b84831015611a0b578235868111156119555760008081fd5b8701606036829003601f190181131561196e5760008081fd5b8a516119798161183a565b8287013581528b8301358188015290820135908882111561199a5760008081fd5b9181019136603f8401126119b057600091508182fd5b8683013591506119bf82611887565b8c516119cb828261185a565b838152368e8587010111156119e257600091508182fd5b838e86018a830137600093810189019390935250808c019190915282525091830191830161193d565b50865250611a1a88820161173c565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611a5257611a52611a29565b500190565b600060208284031215611a6957600080fd5b81356113f881611727565b634e487b7160e01b600052603260045260246000fd5b805163ffffffff8116811461174757600080fd5b60008060008060808587031215611ab457600080fd5b8451611abf81611727565b60208601519094509250611ad560408601611a8a565b9150606085015167ffffffffffffffff811115611af157600080fd5b8501601f81018713611b0257600080fd5b8051611b0d81611887565b604051611b1a828261185a565b828152896020848601011115611b2f57600080fd5b611b4083602083016020870161160a565b969995985093965050505050565b600060018201611b6057611b60611a29565b5060010190565b6020815260006113f86020830184611662565b8051801515811461174757600080fd5b600060608284031215611b9c57600080fd5b6040516060810181811067ffffffffffffffff82111715611bbf57611bbf6117fe565b60405282516001600160801b0381168114611bd957600080fd5b8152611be760208401611a8a565b6020820152611bf860408401611b7a565b60408201529392505050565b600082601f830112611c1557600080fd5b604051611c2181611814565b806040840185811115611c3357600080fd5b845b81811015611c4d578035835260209283019201611c35565b509195945050505050565b600082601f830112611c6957600080fd5b60405161014080820182811067ffffffffffffffff82111715611c8e57611c8e6117fe565b60405283018185821115611ca157600080fd5b845b82811015611c4d578035825260209182019101611ca3565b6000818303610240811215611ccf57600080fd5b60408051611cdc81611814565b61010080841215611cec57600080fd5b82519350611cf98461183a565b611d038787611c04565b845286605f870112611d1457600080fd5b8251611d1f81611814565b8060c0880189811115611d3157600080fd5b8589015b81811015611d5657611d478b82611c04565b83526020909201918601611d35565b50826020880152611d678a82611c04565b86880152505050838252611d7d87828801611c58565b60208301525095945050505050565b600060208284031215611d9e57600080fd5b5051919050565b600060208284031215611db757600080fd5b6113f882611b7a565b600060408284031215611dd257600080fd5b82601f830112611de157600080fd5b604051611ded81611814565b806040840185811115611dff57600080fd5b845b81811015611c4d578051835260209283019201611e01565b8060005b6002811015610a4d578151845260209384019390910190600101611e1d565b6102408101611e4b8287611e19565b60408083018660005b6002811015611e7b57611e68838351611e19565b9183019160209190910190600101611e54565b50505050611e8c60c0830185611e19565b61010082018360005b600a811015611eb4578151835260209283019290910190600101611e95565b50505095945050505050565b600060033d1115611ed95760046000803e5060005160e01c5b90565b600060443d1015611eea5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611f1a57505050505090565b8285019150815181811115611f325750505050505090565b843d8701016020828501011115611f4c5750505050505090565b611f5b6020828601018761185a565b509095945050505050565b6020815260006113f86020830184611636565b60008060233d1115611f95576020600460003e50506000516001905b9091565b600082611fb657634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220f1374674d2143dc1e1f8e0666c58769f2e4bc209220c094f513f5b717a358ad464736f6c634300080e0033", + "devdoc": { + "author": "Sismo", + "kind": "dev", + "methods": { + "buildAttestations(((uint256,uint256,bytes)[],address),bytes)": { + "details": "Returns the actual attestations constructed from the user request", + "params": { + "proofData": "snark public input as well as snark proof", + "request": "users request. Claim of having an account part of a group of accounts" + } + }, + "constructor": { + "details": "Constructor. Initializes the contract", + "params": { + "attestationsRegistryAddress": "Attestations Registry contract on which the attester will write attestations", + "availableRootsRegistryAddress": "Registry storing the available groups for this attester (e.g roots of registry merkle trees)", + "collectionIdFirst": "Id of the first collection in which the attester is supposed to record", + "collectionIdLast": "Id of the last collection in which the attester is supposed to record", + "commitmentMapperAddress": "commitment mapper's public key registry", + "hydraS1VerifierAddress": "ZK Snark Hydra-S1 Verifier contract" + } + }, + "deleteAttestations(uint256[],address,bytes)": { + "details": "External facing function. Allows to delete attestations by submitting proof", + "params": { + "attestationsOwner": "Owner of attestations to delete", + "collectionIds": "Collection identifier of attestations to delete", + "proofData": "Data sent along the deletion request to prove its validity" + }, + "returns": { + "_0": "attestations Attestations that were deleted" + } + }, + "generateAttestations(((uint256,uint256,bytes)[],address),bytes)": { + "details": "Main external function. Allows to generate attestations by making a request and submitting proof", + "params": { + "proofData": "Data sent along the request to prove its validity", + "request": "User request" + }, + "returns": { + "_0": "attestations Attestations that has been recorded" + } + }, + "getAttestationRegistry()": { + "details": "Attestation registry getter", + "returns": { + "_0": "attestationRegistry" + } + }, + "getAvailableRootsRegistry()": { + "details": "Getter of Roots Registry Contract" + }, + "getCommitmentMapperRegistry()": { + "details": "Getter of Commitment Mapper Registry contract" + }, + "getDestinationOfTicket(uint256)": { + "details": "Getter, returns the last attestation destination of a ticket", + "params": { + "userTicket": "ticket used*" + } + }, + "getTicketData(uint256)": { + "details": "Getter, returns the data linked to a ticket", + "params": { + "userTicket": "ticket used*" + } + }, + "getVerifier()": { + "details": "Getter of Hydra-S1 Verifier contract" + }, + "isTicketOnCooldown(uint256)": { + "details": "returns whether a ticket is on cooldown or not", + "params": { + "userTicket": "ticket used*" + } + } + }, + "stateVariables": { + "AUTHORIZED_COLLECTION_ID_FIRST": { + "details": "Getter returns of the first collection in which the attester is supposed to record*" + }, + "AUTHORIZED_COLLECTION_ID_LAST": { + "details": "Getter returns of the last collection in which the attester is supposed to record*" + }, + "SOULBOUND_COOLDOWN_DURATION": { + "details": "Getter returns of the duration of the cooldown period after having used a ticket*" + } + }, + "title": "Hydra-S1 Soulbound Attester", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "This attester is part of the family of the Hydra-S1 Attesters. Hydra-S1 attesters enable users to prove they have an account in a group in a privacy preserving way. The Hydra-S1 Base abstract contract is inherited and holds the complex Hydra S1 verification logic. We invite readers to refer to: - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1 This specific attester has the following characteristics: - Zero Knowledge One cannot deduct from an attestation what source account was used to generate the underlying proof - Non Strict (scores) If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100. This attester generate attestations of scores - Ticketed Each source account gets one userTicket per claim (i.e only one attestation per source account per claim) For people used to semaphore/ tornado cash people: userTicket = hash(sourceSecret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier) - SoulBound (with cooldown period) A user can chose to delete attestations or generate attestation to a new destination. When deleting/ sending to a new destination, the ticket will enter a cooldown period, so it remains occasional User will need to wait until the end of the cooldown period before being able to delete or switch destination again One can however know that the former and the new destinations were created using the same userTicket - Renewable A userTicket can actually be reused as long as the destination of the attestation remains the same It enables users to renew or update their attestations*", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 936, + "contract": "contracts/attesters/hydra-s1/variants/HydraS1SoulboundAttester.sol:HydraS1SoulboundAttester", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 939, + "contract": "contracts/attesters/hydra-s1/variants/HydraS1SoulboundAttester.sol:HydraS1SoulboundAttester", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 7701, + "contract": "contracts/attesters/hydra-s1/variants/HydraS1SoulboundAttester.sol:HydraS1SoulboundAttester", + "label": "_userTicketsData", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_uint256,t_struct(TicketData)7128_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_uint256,t_struct(TicketData)7128_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => struct IHydraS1SoulboundAttester.TicketData)", + "numberOfBytes": "32", + "value": "t_struct(TicketData)7128_storage" + }, + "t_struct(TicketData)7128_storage": { + "encoding": "inplace", + "label": "struct IHydraS1SoulboundAttester.TicketData", + "members": [ + { + "astId": 7125, + "contract": "contracts/attesters/hydra-s1/variants/HydraS1SoulboundAttester.sol:HydraS1SoulboundAttester", + "label": "destination", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 7127, + "contract": "contracts/attesters/hydra-s1/variants/HydraS1SoulboundAttester.sol:HydraS1SoulboundAttester", + "label": "cooldownStart", + "offset": 20, + "slot": "0", + "type": "t_uint32" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/HydraS1SoulboundAttesterProxy.json b/deployments/mumbai/HydraS1SoulboundAttesterProxy.json new file mode 100644 index 0000000..6526735 --- /dev/null +++ b/deployments/mumbai/HydraS1SoulboundAttesterProxy.json @@ -0,0 +1,250 @@ +{ + "address": "0x76D8Ed0e34555dEF84c2bfff9be85446e8E9fa2A", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xa7d369b9ff4f0bba0feebc8e219d88fb28c6aa45c04efab51653cff906b2aafd", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x76D8Ed0e34555dEF84c2bfff9be85446e8E9fa2A", + "transactionIndex": 37, + "gasUsed": "583384", + "logsBloom": "0x00000000000000020000000000000000400000000000008000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000002800000000000000000000100000000000000000000000000000000000000000000000000800000000080000000000000000000000000000000000000000000000000000010000000000000000000808000200000080000000020000000000000000001000000000000000000000000004000000020000000000001000000000000008040000400000000100000000010000000000000000000000000000000000000000000000000000020000000108000", + "blockHash": "0xb4502778295749da386c2393d33d065c35d9fc8157c4bff3f7de0e30f9b15182", + "transactionHash": "0xa7d369b9ff4f0bba0feebc8e219d88fb28c6aa45c04efab51653cff906b2aafd", + "logs": [ + { + "transactionIndex": 37, + "blockNumber": 28600037, + "transactionHash": "0xa7d369b9ff4f0bba0feebc8e219d88fb28c6aa45c04efab51653cff906b2aafd", + "address": "0x76D8Ed0e34555dEF84c2bfff9be85446e8E9fa2A", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000001f38a480d04348708f4b2413fb9ab1f975c176b6" + ], + "data": "0x", + "logIndex": 180, + "blockHash": "0xb4502778295749da386c2393d33d065c35d9fc8157c4bff3f7de0e30f9b15182" + }, + { + "transactionIndex": 37, + "blockNumber": 28600037, + "transactionHash": "0xa7d369b9ff4f0bba0feebc8e219d88fb28c6aa45c04efab51653cff906b2aafd", + "address": "0x76D8Ed0e34555dEF84c2bfff9be85446e8E9fa2A", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000246e71bc2a257f4be9c7fad4664e6d7444844adc", + "logIndex": 181, + "blockHash": "0xb4502778295749da386c2393d33d065c35d9fc8157c4bff3f7de0e30f9b15182" + }, + { + "transactionIndex": 37, + "blockNumber": 28600037, + "transactionHash": "0xa7d369b9ff4f0bba0feebc8e219d88fb28c6aa45c04efab51653cff906b2aafd", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x0000000000000000000000000000000000000000000000000005e2b8d9b55d7000000000000000000000000000000000000000000000000081698e1f24bb5d9800000000000000000000000000000000000000000000167a31ceb366608cf8330000000000000000000000000000000000000000000000008163ab664b06002800000000000000000000000000000000000000000000167a31d4961f3a4255a3", + "logIndex": 182, + "blockHash": "0xb4502778295749da386c2393d33d065c35d9fc8157c4bff3f7de0e30f9b15182" + } + ], + "blockNumber": 28600037, + "cumulativeGasUsed": "6241153", + "status": 1, + "byzantium": true + }, + "args": [ + "0x1F38a480d04348708F4b2413fb9AB1F975C176b6", + "0x246E71bC2a257f4BE9C7fAD4664E6D7444844Adc", + "0x" + ], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/periphery/utils/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0x0edeb16b9821ae2b16e9d69c383b38d3ad2fbb3e0c06cf809a0786d96e602551\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"contracts/periphery/utils/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n// Note: we just copied so that we can see the contract used\\npragma solidity ^0.8.14;\\n\\nimport {ERC1967Proxy} from '@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol';\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1));\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(''), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n ifAdmin\\n {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(\\n msg.sender != _getAdmin(),\\n 'TransparentUpgradeableProxy: admin cannot fallback to proxy target'\\n );\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0x0d943fb8814617343a244f762e791c664bb647e32d484ba94fe1958bac85f6dc\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000f2a38038062000f2a833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b60008051602062000ee3833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b60008051602062000ec383398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b6200022e1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e9838360405180606001604052806027815260200162000f036027913962000381565b9392505050565b60006200021a60008051602062000ec383398151915260001b6200046760201b620001ea1760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd60008051602062000ec383398151915260001b6200046760201b620001ea1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200025a1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd60008051602062000ee383398151915260001b6200046760201b620001ea1760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b61082b80620006986000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b5565b610118565b61005b6100933660046106d0565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b5565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107cf602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6104bb565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610368836104e3565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610523565b60606001600160a01b0384163b6104465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016102f5565b600080856001600160a01b031685604051610461919061077f565b600060405180830381855af49150503d806000811461049c576040519150601f19603f3d011682016040523d82523d6000602084013e6104a1565b606091505b50915091506104b18282866105cc565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b6104ec81610605565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105885760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105db575081610253565b8251156105eb5782518084602001fd5b8160405162461bcd60e51b81526004016102f5919061079b565b6001600160a01b0381163b6106725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105ab565b80356001600160a01b03811681146106b057600080fd5b919050565b6000602082840312156106c757600080fd5b61025382610699565b6000806000604084860312156106e557600080fd5b6106ee84610699565b9250602084013567ffffffffffffffff8082111561070b57600080fd5b818601915086601f83011261071f57600080fd5b81358181111561072e57600080fd5b87602082850101111561074057600080fd5b6020830194508093505050509250925092565b60005b8381101561076e578181015183820152602001610756565b838111156103845750506000910152565b60008251610791818460208701610753565b9190910192915050565b60208152600082518060208401526107ba816040850160208701610753565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200396e81b41a53c52a5f2bff0f6a830a500e30d67dcfc4c47e029fb4021c6775064736f6c634300080e0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b5565b610118565b61005b6100933660046106d0565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b5565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107cf602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6104bb565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610368836104e3565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610523565b60606001600160a01b0384163b6104465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016102f5565b600080856001600160a01b031685604051610461919061077f565b600060405180830381855af49150503d806000811461049c576040519150601f19603f3d011682016040523d82523d6000602084013e6104a1565b606091505b50915091506104b18282866105cc565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b6104ec81610605565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105885760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105db575081610253565b8251156105eb5782518084602001fd5b8160405162461bcd60e51b81526004016102f5919061079b565b6001600160a01b0381163b6106725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105ab565b80356001600160a01b03811681146106b057600080fd5b919050565b6000602082840312156106c757600080fd5b61025382610699565b6000806000604084860312156106e557600080fd5b6106ee84610699565b9250602084013567ffffffffffffffff8082111561070b57600080fd5b818601915086601f83011261071f57600080fd5b81358181111561072e57600080fd5b87602082850101111561074057600080fd5b6020830194508093505050509250925092565b60005b8381101561076e578181015183820152602001610756565b838111156103845750506000910152565b60008251610791818460208701610753565b9190910192915050565b60208152600082518060208401526107ba816040850160208701610753565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200396e81b41a53c52a5f2bff0f6a830a500e30d67dcfc4c47e029fb4021c6775064736f6c634300080e0033", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/HydraS1Verifier.json b/deployments/mumbai/HydraS1Verifier.json new file mode 100644 index 0000000..d949473 --- /dev/null +++ b/deployments/mumbai/HydraS1Verifier.json @@ -0,0 +1,97 @@ +{ + "address": "0x34e3CcCF4fF2E297be22465b85F03E5E6D27b41B", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256[2]", + "name": "a", + "type": "uint256[2]" + }, + { + "internalType": "uint256[2][2]", + "name": "b", + "type": "uint256[2][2]" + }, + { + "internalType": "uint256[2]", + "name": "c", + "type": "uint256[2]" + }, + { + "internalType": "uint256[10]", + "name": "input", + "type": "uint256[10]" + } + ], + "name": "verifyProof", + "outputs": [ + { + "internalType": "bool", + "name": "r", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xe014dc2f684e0ea6fb465c893377c297968ee215f697e47d04c455d4cdd2314f", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x34e3CcCF4fF2E297be22465b85F03E5E6D27b41B", + "transactionIndex": 3, + "gasUsed": "1247423", + "logsBloom": "0x00000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000010000000000000000000008000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0xc2dc6f6303a4b047fad6406e8d9d6518fd83937fb6872d933d5051a81473b68b", + "transactionHash": "0xe014dc2f684e0ea6fb465c893377c297968ee215f697e47d04c455d4cdd2314f", + "logs": [ + { + "transactionIndex": 3, + "blockNumber": 28600026, + "transactionHash": "0xe014dc2f684e0ea6fb465c893377c297968ee215f697e47d04c455d4cdd2314f", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + ], + "data": "0x000000000000000000000000000000000000000000000000000d3280231e45e7000000000000000000000000000000000000000000000000852b987ff9dca96100000000000000000000000000000000000000000000167a2ba1291d2b16eb32000000000000000000000000000000000000000000000000851e65ffd6be637a00000000000000000000000000000000000000000000167a2bae5b9d4e353119", + "logIndex": 4, + "blockHash": "0xc2dc6f6303a4b047fad6406e8d9d6518fd83937fb6872d933d5051a81473b68b" + } + ], + "blockNumber": 28600026, + "cumulativeGasUsed": "1648632", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"a\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2][2]\",\"name\":\"b\",\"type\":\"uint256[2][2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"c\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[10]\",\"name\":\"input\",\"type\":\"uint256[10]\"}],\"name\":\"verifyProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"r\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"verifyProof(uint256[2],uint256[2][2],uint256[2],uint256[10])\":{\"returns\":{\"r\":\" bool true if proof is valid\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@sismo-core/hydra-s1/contracts/HydraS1Verifier.sol\":\"HydraS1Verifier\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@sismo-core/hydra-s1/contracts/HydraS1Verifier.sol\":{\"content\":\"//\\n// Copyright 2017 Christian Reitwiessner\\n// 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:\\n// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\\n// 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.\\n//\\n// 2019 OKIMS\\n// ported to solidity 0.6\\n// fixed linter warnings\\n// added requiere error messages\\n//\\n//\\n// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.0;\\nlibrary Pairing {\\n struct G1Point {\\n uint X;\\n uint Y;\\n }\\n // Encoding of field elements is: X[0] * z + X[1]\\n struct G2Point {\\n uint[2] X;\\n uint[2] Y;\\n }\\n /// @return the generator of G1\\n function P1() internal pure returns (G1Point memory) {\\n return G1Point(1, 2);\\n }\\n /// @return the generator of G2\\n function P2() internal pure returns (G2Point memory) {\\n // Original code point\\n return G2Point(\\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\\n );\\n\\n/*\\n // Changed by Jordi point\\n return G2Point(\\n [10857046999023057135944570762232829481370756359578518086990519993285655852781,\\n 11559732032986387107991004021392285783925812861821192530917403151452391805634],\\n [8495653923123431417604973247489272438418190587263600148770280649306958101930,\\n 4082367875863433681332203403145435568316851327593401208105741076214120093531]\\n );\\n*/\\n }\\n /// @return r the negation of p, i.e. p.addition(p.negate()) should be zero.\\n function negate(G1Point memory p) internal pure returns (G1Point memory r) {\\n // The prime q in the base field F_q for G1\\n uint q = 21888242871839275222246405745257275088696311157297823662689037894645226208583;\\n if (p.X == 0 && p.Y == 0)\\n return G1Point(0, 0);\\n return G1Point(p.X, q - (p.Y % q));\\n }\\n /// @return r the sum of two points of G1\\n function addition(G1Point memory p1, G1Point memory p2) internal view returns (G1Point memory r) {\\n uint[4] memory input;\\n input[0] = p1.X;\\n input[1] = p1.Y;\\n input[2] = p2.X;\\n input[3] = p2.Y;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require(success,\\\"pairing-add-failed\\\");\\n }\\n /// @return r the product of a point on G1 and a scalar, i.e.\\n /// p == p.scalar_mul(1) and p.addition(p) == p.scalar_mul(2) for all points p.\\n function scalar_mul(G1Point memory p, uint s) internal view returns (G1Point memory r) {\\n uint[3] memory input;\\n input[0] = p.X;\\n input[1] = p.Y;\\n input[2] = s;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require (success,\\\"pairing-mul-failed\\\");\\n }\\n /// @return the result of computing the pairing check\\n /// e(p1[0], p2[0]) * .... * e(p1[n], p2[n]) == 1\\n /// For example pairing([P1(), P1().negate()], [P2(), P2()]) should\\n /// return true.\\n function pairing(G1Point[] memory p1, G2Point[] memory p2) internal view returns (bool) {\\n require(p1.length == p2.length,\\\"pairing-lengths-failed\\\");\\n uint elements = p1.length;\\n uint inputSize = elements * 6;\\n uint[] memory input = new uint[](inputSize);\\n for (uint i = 0; i < elements; i++)\\n {\\n input[i * 6 + 0] = p1[i].X;\\n input[i * 6 + 1] = p1[i].Y;\\n input[i * 6 + 2] = p2[i].X[0];\\n input[i * 6 + 3] = p2[i].X[1];\\n input[i * 6 + 4] = p2[i].Y[0];\\n input[i * 6 + 5] = p2[i].Y[1];\\n }\\n uint[1] memory out;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 8, add(input, 0x20), mul(inputSize, 0x20), out, 0x20)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require(success,\\\"pairing-opcode-failed\\\");\\n return out[0] != 0;\\n }\\n /// Convenience method for a pairing check for two pairs.\\n function pairingProd2(G1Point memory a1, G2Point memory a2, G1Point memory b1, G2Point memory b2) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](2);\\n G2Point[] memory p2 = new G2Point[](2);\\n p1[0] = a1;\\n p1[1] = b1;\\n p2[0] = a2;\\n p2[1] = b2;\\n return pairing(p1, p2);\\n }\\n /// Convenience method for a pairing check for three pairs.\\n function pairingProd3(\\n G1Point memory a1, G2Point memory a2,\\n G1Point memory b1, G2Point memory b2,\\n G1Point memory c1, G2Point memory c2\\n ) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](3);\\n G2Point[] memory p2 = new G2Point[](3);\\n p1[0] = a1;\\n p1[1] = b1;\\n p1[2] = c1;\\n p2[0] = a2;\\n p2[1] = b2;\\n p2[2] = c2;\\n return pairing(p1, p2);\\n }\\n /// Convenience method for a pairing check for four pairs.\\n function pairingProd4(\\n G1Point memory a1, G2Point memory a2,\\n G1Point memory b1, G2Point memory b2,\\n G1Point memory c1, G2Point memory c2,\\n G1Point memory d1, G2Point memory d2\\n ) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](4);\\n G2Point[] memory p2 = new G2Point[](4);\\n p1[0] = a1;\\n p1[1] = b1;\\n p1[2] = c1;\\n p1[3] = d1;\\n p2[0] = a2;\\n p2[1] = b2;\\n p2[2] = c2;\\n p2[3] = d2;\\n return pairing(p1, p2);\\n }\\n}\\ncontract HydraS1Verifier {\\n using Pairing for *;\\n struct VerifyingKey {\\n Pairing.G1Point alfa1;\\n Pairing.G2Point beta2;\\n Pairing.G2Point gamma2;\\n Pairing.G2Point delta2;\\n Pairing.G1Point[] IC;\\n }\\n struct Proof {\\n Pairing.G1Point A;\\n Pairing.G2Point B;\\n Pairing.G1Point C;\\n }\\n function verifyingKey() internal pure returns (VerifyingKey memory vk) {\\n vk.alfa1 = Pairing.G1Point(\\n 20491192805390485299153009773594534940189261866228447918068658471970481763042,\\n 9383485363053290200918347156157836566562967994039712273449902621266178545958\\n );\\n\\n vk.beta2 = Pairing.G2Point(\\n [4252822878758300859123897981450591353533073413197771768651442665752259397132,\\n 6375614351688725206403948262868962793625744043794305715222011528459656738731],\\n [21847035105528745403288232691147584728191162732299865338377159692350059136679,\\n 10505242626370262277552901082094356697409835680220590971873171140371331206856]\\n );\\n vk.gamma2 = Pairing.G2Point(\\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\\n );\\n vk.delta2 = Pairing.G2Point(\\n [16703691932058078091905716404571265959476320760471681443119627655715361207341,\\n 14290274403144646058563103675066900294643500151498463054614740831207315388514],\\n [9120517679481713774648131333833134160499672068094273767171232839700590114148,\\n 18338638855816625080803231766917659002322979855877827709378572546717723262324]\\n );\\n vk.IC = new Pairing.G1Point[](11);\\n \\n vk.IC[0] = Pairing.G1Point( \\n 15183981365841448712456044920259850142312423574262787585047804960636415432994,\\n 7001044530623564797357151512361873851017731748844374046997463344585588795777\\n ); \\n \\n vk.IC[1] = Pairing.G1Point( \\n 3754737654948662562435613969155994959132173506784418442817218316697091994043,\\n 16520141448541154153981919757383608282199583682574061862571018786569723115048\\n ); \\n \\n vk.IC[2] = Pairing.G1Point( \\n 14734466460881491794568175288621656907425457509621292263456156896685122952305,\\n 18495564446073110430251898491840031389094613665866187171071741938161262650771\\n ); \\n \\n vk.IC[3] = Pairing.G1Point( \\n 16380352455102502109444307845900237792657209995731679788026311308996926499427,\\n 11872494853967118743957240270505831687788406895959276908447589431944985706662\\n ); \\n \\n vk.IC[4] = Pairing.G1Point( \\n 20199514202493196707492057247804402540358301491780845748325025913208809441866,\\n 12760637713678265881350279209961337475498485836996922236408521200416764617323\\n ); \\n \\n vk.IC[5] = Pairing.G1Point( \\n 19153715775490328450864792250302417403928222720390978634383848496516270422395,\\n 546002182798634190282541153661423157791776194062719045593389981526666716416\\n ); \\n \\n vk.IC[6] = Pairing.G1Point( \\n 2572546294944895555897986264162285493992700415786641015895831165477991460890,\\n 16475880996834565556958124284585338184010927435675877479782010166270319781724\\n ); \\n \\n vk.IC[7] = Pairing.G1Point( \\n 1189084334785746899933155760881982253715630415235816484826929546449434025692,\\n 4229672360641556939458327562740354930286687266228809328535679188294452033396\\n ); \\n \\n vk.IC[8] = Pairing.G1Point( \\n 19602244162575575785636531633124796303002902053486919698240132790672698216585,\\n 181057165072599074288983745076121344893296348827576905983079816835912241514\\n ); \\n \\n vk.IC[9] = Pairing.G1Point( \\n 2674333225598340315002358633842521216418358316694409406540164227900893354209,\\n 2129512057743264354864596186877181463207231175912159744730924346148245351960\\n ); \\n \\n vk.IC[10] = Pairing.G1Point( \\n 7320700433668244102684846027945878190869912696586803178638351868907615350377,\\n 2941840530209756385349015075958743796933501451265755778001586753024906675441\\n ); \\n \\n }\\n function verify(uint[] memory input, Proof memory proof) internal view returns (uint) {\\n uint256 snark_scalar_field = 21888242871839275222246405745257275088548364400416034343698204186575808495617;\\n VerifyingKey memory vk = verifyingKey();\\n require(input.length + 1 == vk.IC.length,\\\"verifier-bad-input\\\");\\n // Compute the linear combination vk_x\\n Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);\\n for (uint i = 0; i < input.length; i++) {\\n require(input[i] < snark_scalar_field,\\\"verifier-gte-snark-scalar-field\\\");\\n vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i]));\\n }\\n vk_x = Pairing.addition(vk_x, vk.IC[0]);\\n if (!Pairing.pairingProd4(\\n Pairing.negate(proof.A), proof.B,\\n vk.alfa1, vk.beta2,\\n vk_x, vk.gamma2,\\n proof.C, vk.delta2\\n )) return 1;\\n return 0;\\n }\\n /// @return r bool true if proof is valid\\n function verifyProof(\\n uint[2] memory a,\\n uint[2][2] memory b,\\n uint[2] memory c,\\n uint[10] memory input\\n ) public view returns (bool r) {\\n Proof memory proof;\\n proof.A = Pairing.G1Point(a[0], a[1]);\\n proof.B = Pairing.G2Point([b[0][0], b[0][1]], [b[1][0], b[1][1]]);\\n proof.C = Pairing.G1Point(c[0], c[1]);\\n uint[] memory inputValues = new uint[](input.length);\\n for(uint i = 0; i < input.length; i++){\\n inputValues[i] = input[i];\\n }\\n if (verify(inputValues, proof) == 0) {\\n return true;\\n } else {\\n return false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x70c0b7d96ff1b90538938a4cb2d8086b3aabb4febf1e36cb3f470bfe0b4a9e89\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611597806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063f3bb70f614610030575b600080fd5b61004361003e3660046113ce565b610057565b604051901515815260200160405180910390f35b60006100616111e1565b604080518082018252875181526020808901518183015290835281516080810183528751518184019081528851830151606083015281528251808401845288830180515182525183015181840152818301528382015281518083018352865181528682015181830152838301528151600a8082526101608201909352600092909182016101408036833701905050905060005b600a811015610143578481600a811061010f5761010f6114ac565b6020020151828281518110610126576101266114ac565b60209081029190910101528061013b816114d8565b9150506100f4565b5061014e818361016f565b60000361016057600192505050610167565b6000925050505b949350505050565b60007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018161019b610366565b9050806080015151855160016101b191906114f1565b146101f85760405162461bcd60e51b81526020600482015260126024820152711d995c9a599a595c8b5898590b5a5b9c1d5d60721b60448201526064015b60405180910390fd5b604080518082019091526000808252602082018190525b86518110156102e9578387828151811061022b5761022b6114ac565b6020026020010151106102805760405162461bcd60e51b815260206004820152601f60248201527f76657269666965722d6774652d736e61726b2d7363616c61722d6669656c640060448201526064016101ef565b6102d5826102d0856080015184600161029991906114f1565b815181106102a9576102a96114ac565b60200260200101518a85815181106102c3576102c36114ac565b6020026020010151610b30565b610bc6565b9150806102e1816114d8565b91505061020f565b50610312818360800151600081518110610305576103056114ac565b6020026020010151610bc6565b90506103486103248660000151610c5f565b8660200151846000015185602001518587604001518b604001518960600151610cfe565b6103585760019350505050610360565b600093505050505b92915050565b61036e611232565b6040805180820182527f2d4d9aa7e302d9df41749d5507949d05dbea33fbb16c643b22f599a2be6df2e281527f14bedd503c37ceb061d8ec60209fe345ce89830a19230301f076caff004d19266020808301919091529083528151608080820184527f0967032fcbf776d1afc985f88877f182d38480a653f2decaa9794cbc3bf3060c8285019081527f0e187847ad4c798374d0d6732bf501847dd68bc0e071241e0213bc7fc13db7ab606080850191909152908352845180860186527f304cfbd1e08a704a99f5e847d93f8c3caafddec46b7a0d379da69a4d112346a781527f1739c1b1a457a8c7313123d24d2f9192f896b7c63eea05a9d57f06547ad0cec8818601528385015285840192909252835180820185527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28186019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed828501528152845180860186527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b81527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa818601528185015285850152835190810184527f24edf4608928ab2e294017ecd50ee67f8bc4af3e757e22d4287063d562b5342d8185019081527f1f9802391c8ea20e4ab99a90999c111b4fdeda5f2286f14030c4b9d48526b862828401528152835180850185527f142a07b2bdeb273e1d26c4f9f6ce3b6d714069d9cdb2a9bf4f04c4bf0d74356481527f288b4d40646e027ef607ca71d10fdf438435b1f9f04a8598940702832cfdfd748185015281840152908401528151600b8082526101808201909352919082015b60408051808201909152600080825260208201528152602001906001900390816105ea57505060808201908152604080518082019091527f2191d432bdb3ae17dc48f015ca1e5a194067cc676f5b12bbf2704bb171b2d92281527f0f7a7366579dfef36e7b743b7d76edc15933eea30e95feaa2cf96e3217d2e98160208201529051805160009061067d5761067d6114ac565b602002602001018190525060405180604001604052807f084d1b300a1ecc4c0d892345551e790b2d49fe22a1b71fbcd94d0be8931871bb81526020017f24861196b6282d728048cae2ec60fbc8496829a8dfbb4273f731b2b726b0f62881525081608001516001815181106106f4576106f46114ac565b602002602001018190525060405180604001604052807f209369983ced02fe1bdfed53e6c88a12bd3efd860515daa6a398aa73bbb09c7181526020017f28e41e5609c0e714afa30a906663b8ee61baecd274f9d30fd36f9c426ff9e593815250816080015160028151811061076b5761076b6114ac565b602002602001018190525060405180604001604052807f2436f370c4d94130c354a1c38a6eba2ec14e4b36d1f62f823af19a13a4d7ea6381526020017f1a3f980d5d078472d6f27233d0f83f227849b7ad2a7f626ae5f869aa774000a681525081608001516003815181106107e2576107e26114ac565b602002602001018190525060405180604001604052807f2ca8851735361bdfd2cffea9982c0f94d44bec1420ebcc177231af812087ca4a81526020017f1c3643d6f15453c75c41431f7d177a73dc40fa96ef0a4d757fd22617feea626b8152508160800151600481518110610859576108596114ac565b602002602001018190525060405180604001604052807f2a589e73a13253f62ef04f0de55310307772aa3b2182f0fe774f69814e50797b81526020017f013506ba8c18df3e46b2384f3e7cf3641ba7406caecda831d94b82fc9db3250081525081608001516005815181106108d0576108d06114ac565b602002602001018190525060405180604001604052807f05b0027566c0abfb896f99cb833f5cc81a261d7b384e6a64c9b84fddac3bb01a81526020017f246d04a75084e3d6cec4165eec1a93ec268741e077ae5aa861927fb928f1e75c8152508160800151600681518110610947576109476114ac565b602002602001018190525060405180604001604052807f02a0ff754861398f35b941fec5d7f79c2c345bc133e29adeb13c103907e59edc81526020017f0959e8e35ad6f4f6985264f3db47dbe42815ff3aa194a2e9fb997c6cba66b77481525081608001516007815181106109be576109be6114ac565b602002602001018190525060405180604001604052807f2b567a1e26a932fa728a650315371e9f9df455a5b0c1c0886bd80d6060a9908981526020017e66798780cd5512ad9f5a2373f1fb64535a8e3c4ad8c33ddc8bd18fc441116a8152508160800151600881518110610a3457610a346114ac565b602002602001018190525060405180604001604052807f05e99e747e67c5e99caba3c9e6de0a28d723b5f7a3a218d1ab75713230a4d8e181526020017f04b542d839b6a92ff2a2d92d68fb1b9fbe1767bc66422bbcd0d340703ad22e188152508160800151600981518110610aab57610aab6114ac565b602002602001018190525060405180604001604052807f102f5e9ec24f58ddf1d39e018b5367ef9ea173301e98cdd899627bd14762ee6981526020017f068105d1e3d4238ec4274b68a5177670d700a905e46fd5c6779ef83d6916c4f18152508160800151600a81518110610b2257610b226114ac565b602002602001018190525090565b6040805180820190915260008082526020820152610b4c611283565b835181526020808501519082015260408101839052600060608360808460076107d05a03fa90508080610b7b57fe5b5080610bbe5760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5b5d5b0b59985a5b195960721b60448201526064016101ef565b505092915050565b6040805180820190915260008082526020820152610be26112a1565b8351815260208085015181830152835160408301528301516060808301919091526000908360c08460066107d05a03fa90508080610c1c57fe5b5080610bbe5760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5859190b59985a5b195960721b60448201526064016101ef565b604080518082019091526000808252602082015281517f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4790158015610ca657506020830151155b15610cc65750506040805180820190915260008082526020820152919050565b604051806040016040528084600001518152602001828560200151610ceb9190611509565b610cf5908461152b565b90529392505050565b60408051600480825260a08201909252600091829190816020015b6040805180820190915260008082526020820152815260200190600190039081610d1957505060408051600480825260a0820190925291925060009190602082015b610d636112bf565b815260200190600190039081610d5b5790505090508a82600081518110610d8c57610d8c6114ac565b60200260200101819052508882600181518110610dab57610dab6114ac565b60200260200101819052508682600281518110610dca57610dca6114ac565b60200260200101819052508482600381518110610de957610de96114ac565b60200260200101819052508981600081518110610e0857610e086114ac565b60200260200101819052508781600181518110610e2757610e276114ac565b60200260200101819052508581600281518110610e4657610e466114ac565b60200260200101819052508381600381518110610e6557610e656114ac565b6020026020010181905250610e7a8282610e89565b9b9a5050505050505050505050565b60008151835114610ed55760405162461bcd60e51b81526020600482015260166024820152751c185a5c9a5b99cb5b195b99dd1a1ccb59985a5b195960521b60448201526064016101ef565b82516000610ee4826006611542565b905060008167ffffffffffffffff811115610f0157610f0161131b565b604051908082528060200260200182016040528015610f2a578160200160208202803683370190505b50905060005b8381101561116557868181518110610f4a57610f4a6114ac565b60200260200101516000015182826006610f649190611542565b610f6f9060006114f1565b81518110610f7f57610f7f6114ac565b602002602001018181525050868181518110610f9d57610f9d6114ac565b60200260200101516020015182826006610fb79190611542565b610fc29060016114f1565b81518110610fd257610fd26114ac565b602002602001018181525050858181518110610ff057610ff06114ac565b6020908102919091010151515182611009836006611542565b6110149060026114f1565b81518110611024576110246114ac565b602002602001018181525050858181518110611042576110426114ac565b6020908102919091018101515101518261105d836006611542565b6110689060036114f1565b81518110611078576110786114ac565b602002602001018181525050858181518110611096576110966114ac565b6020026020010151602001516000600281106110b4576110b46114ac565b6020020151826110c5836006611542565b6110d09060046114f1565b815181106110e0576110e06114ac565b6020026020010181815250508581815181106110fe576110fe6114ac565b60200260200101516020015160016002811061111c5761111c6114ac565b60200201518261112d836006611542565b6111389060056114f1565b81518110611148576111486114ac565b60209081029190910101528061115d816114d8565b915050610f30565b5061116e6112df565b6000602082602086026020860160086107d05a03fa9050808061118d57fe5b50806111d35760405162461bcd60e51b81526020600482015260156024820152741c185a5c9a5b99cb5bdc18dbd9194b59985a5b1959605a1b60448201526064016101ef565b505115159695505050505050565b6040805160a08101909152600060608201818152608083019190915281526020810161120b6112bf565b815260200161122d604051806040016040528060008152602001600081525090565b905290565b6040805160e08101909152600060a0820181815260c083019190915281526020810161125c6112bf565b81526020016112696112bf565b81526020016112766112bf565b8152602001606081525090565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b60405180604001604052806112d26112fd565b815260200161122d6112fd565b60405180602001604052806001906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156113545761135461131b565b60405290565b604051610140810167ffffffffffffffff811182821017156113545761135461131b565b600082601f83011261138f57600080fd5b611397611331565b8060408401858111156113a957600080fd5b845b818110156113c35780358452602093840193016113ab565b509095945050505050565b6000806000806102408086880312156113e657600080fd5b6113f0878761137e565b9450604087605f88011261140357600080fd5b61140b611331565b8060c089018a81111561141d57600080fd5b838a015b81811015611442576114338c8261137e565b84526020909301928401611421565b508197506114508b8261137e565b9650505050508661011f87011261146657600080fd5b61146e61135a565b90860190808883111561148057600080fd5b61010088015b8381101561149e578035835260209283019201611486565b509598949750929550505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016114ea576114ea6114c2565b5060010190565b60008219821115611504576115046114c2565b500190565b60008261152657634e487b7160e01b600052601260045260246000fd5b500690565b60008282101561153d5761153d6114c2565b500390565b600081600019048311821515161561155c5761155c6114c2565b50029056fea2646970667358221220e8781558c3439f0e675a30351c2195a1d04561fa654f01751045f8d07ad8b22464736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063f3bb70f614610030575b600080fd5b61004361003e3660046113ce565b610057565b604051901515815260200160405180910390f35b60006100616111e1565b604080518082018252875181526020808901518183015290835281516080810183528751518184019081528851830151606083015281528251808401845288830180515182525183015181840152818301528382015281518083018352865181528682015181830152838301528151600a8082526101608201909352600092909182016101408036833701905050905060005b600a811015610143578481600a811061010f5761010f6114ac565b6020020151828281518110610126576101266114ac565b60209081029190910101528061013b816114d8565b9150506100f4565b5061014e818361016f565b60000361016057600192505050610167565b6000925050505b949350505050565b60007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018161019b610366565b9050806080015151855160016101b191906114f1565b146101f85760405162461bcd60e51b81526020600482015260126024820152711d995c9a599a595c8b5898590b5a5b9c1d5d60721b60448201526064015b60405180910390fd5b604080518082019091526000808252602082018190525b86518110156102e9578387828151811061022b5761022b6114ac565b6020026020010151106102805760405162461bcd60e51b815260206004820152601f60248201527f76657269666965722d6774652d736e61726b2d7363616c61722d6669656c640060448201526064016101ef565b6102d5826102d0856080015184600161029991906114f1565b815181106102a9576102a96114ac565b60200260200101518a85815181106102c3576102c36114ac565b6020026020010151610b30565b610bc6565b9150806102e1816114d8565b91505061020f565b50610312818360800151600081518110610305576103056114ac565b6020026020010151610bc6565b90506103486103248660000151610c5f565b8660200151846000015185602001518587604001518b604001518960600151610cfe565b6103585760019350505050610360565b600093505050505b92915050565b61036e611232565b6040805180820182527f2d4d9aa7e302d9df41749d5507949d05dbea33fbb16c643b22f599a2be6df2e281527f14bedd503c37ceb061d8ec60209fe345ce89830a19230301f076caff004d19266020808301919091529083528151608080820184527f0967032fcbf776d1afc985f88877f182d38480a653f2decaa9794cbc3bf3060c8285019081527f0e187847ad4c798374d0d6732bf501847dd68bc0e071241e0213bc7fc13db7ab606080850191909152908352845180860186527f304cfbd1e08a704a99f5e847d93f8c3caafddec46b7a0d379da69a4d112346a781527f1739c1b1a457a8c7313123d24d2f9192f896b7c63eea05a9d57f06547ad0cec8818601528385015285840192909252835180820185527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28186019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed828501528152845180860186527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b81527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa818601528185015285850152835190810184527f24edf4608928ab2e294017ecd50ee67f8bc4af3e757e22d4287063d562b5342d8185019081527f1f9802391c8ea20e4ab99a90999c111b4fdeda5f2286f14030c4b9d48526b862828401528152835180850185527f142a07b2bdeb273e1d26c4f9f6ce3b6d714069d9cdb2a9bf4f04c4bf0d74356481527f288b4d40646e027ef607ca71d10fdf438435b1f9f04a8598940702832cfdfd748185015281840152908401528151600b8082526101808201909352919082015b60408051808201909152600080825260208201528152602001906001900390816105ea57505060808201908152604080518082019091527f2191d432bdb3ae17dc48f015ca1e5a194067cc676f5b12bbf2704bb171b2d92281527f0f7a7366579dfef36e7b743b7d76edc15933eea30e95feaa2cf96e3217d2e98160208201529051805160009061067d5761067d6114ac565b602002602001018190525060405180604001604052807f084d1b300a1ecc4c0d892345551e790b2d49fe22a1b71fbcd94d0be8931871bb81526020017f24861196b6282d728048cae2ec60fbc8496829a8dfbb4273f731b2b726b0f62881525081608001516001815181106106f4576106f46114ac565b602002602001018190525060405180604001604052807f209369983ced02fe1bdfed53e6c88a12bd3efd860515daa6a398aa73bbb09c7181526020017f28e41e5609c0e714afa30a906663b8ee61baecd274f9d30fd36f9c426ff9e593815250816080015160028151811061076b5761076b6114ac565b602002602001018190525060405180604001604052807f2436f370c4d94130c354a1c38a6eba2ec14e4b36d1f62f823af19a13a4d7ea6381526020017f1a3f980d5d078472d6f27233d0f83f227849b7ad2a7f626ae5f869aa774000a681525081608001516003815181106107e2576107e26114ac565b602002602001018190525060405180604001604052807f2ca8851735361bdfd2cffea9982c0f94d44bec1420ebcc177231af812087ca4a81526020017f1c3643d6f15453c75c41431f7d177a73dc40fa96ef0a4d757fd22617feea626b8152508160800151600481518110610859576108596114ac565b602002602001018190525060405180604001604052807f2a589e73a13253f62ef04f0de55310307772aa3b2182f0fe774f69814e50797b81526020017f013506ba8c18df3e46b2384f3e7cf3641ba7406caecda831d94b82fc9db3250081525081608001516005815181106108d0576108d06114ac565b602002602001018190525060405180604001604052807f05b0027566c0abfb896f99cb833f5cc81a261d7b384e6a64c9b84fddac3bb01a81526020017f246d04a75084e3d6cec4165eec1a93ec268741e077ae5aa861927fb928f1e75c8152508160800151600681518110610947576109476114ac565b602002602001018190525060405180604001604052807f02a0ff754861398f35b941fec5d7f79c2c345bc133e29adeb13c103907e59edc81526020017f0959e8e35ad6f4f6985264f3db47dbe42815ff3aa194a2e9fb997c6cba66b77481525081608001516007815181106109be576109be6114ac565b602002602001018190525060405180604001604052807f2b567a1e26a932fa728a650315371e9f9df455a5b0c1c0886bd80d6060a9908981526020017e66798780cd5512ad9f5a2373f1fb64535a8e3c4ad8c33ddc8bd18fc441116a8152508160800151600881518110610a3457610a346114ac565b602002602001018190525060405180604001604052807f05e99e747e67c5e99caba3c9e6de0a28d723b5f7a3a218d1ab75713230a4d8e181526020017f04b542d839b6a92ff2a2d92d68fb1b9fbe1767bc66422bbcd0d340703ad22e188152508160800151600981518110610aab57610aab6114ac565b602002602001018190525060405180604001604052807f102f5e9ec24f58ddf1d39e018b5367ef9ea173301e98cdd899627bd14762ee6981526020017f068105d1e3d4238ec4274b68a5177670d700a905e46fd5c6779ef83d6916c4f18152508160800151600a81518110610b2257610b226114ac565b602002602001018190525090565b6040805180820190915260008082526020820152610b4c611283565b835181526020808501519082015260408101839052600060608360808460076107d05a03fa90508080610b7b57fe5b5080610bbe5760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5b5d5b0b59985a5b195960721b60448201526064016101ef565b505092915050565b6040805180820190915260008082526020820152610be26112a1565b8351815260208085015181830152835160408301528301516060808301919091526000908360c08460066107d05a03fa90508080610c1c57fe5b5080610bbe5760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5859190b59985a5b195960721b60448201526064016101ef565b604080518082019091526000808252602082015281517f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4790158015610ca657506020830151155b15610cc65750506040805180820190915260008082526020820152919050565b604051806040016040528084600001518152602001828560200151610ceb9190611509565b610cf5908461152b565b90529392505050565b60408051600480825260a08201909252600091829190816020015b6040805180820190915260008082526020820152815260200190600190039081610d1957505060408051600480825260a0820190925291925060009190602082015b610d636112bf565b815260200190600190039081610d5b5790505090508a82600081518110610d8c57610d8c6114ac565b60200260200101819052508882600181518110610dab57610dab6114ac565b60200260200101819052508682600281518110610dca57610dca6114ac565b60200260200101819052508482600381518110610de957610de96114ac565b60200260200101819052508981600081518110610e0857610e086114ac565b60200260200101819052508781600181518110610e2757610e276114ac565b60200260200101819052508581600281518110610e4657610e466114ac565b60200260200101819052508381600381518110610e6557610e656114ac565b6020026020010181905250610e7a8282610e89565b9b9a5050505050505050505050565b60008151835114610ed55760405162461bcd60e51b81526020600482015260166024820152751c185a5c9a5b99cb5b195b99dd1a1ccb59985a5b195960521b60448201526064016101ef565b82516000610ee4826006611542565b905060008167ffffffffffffffff811115610f0157610f0161131b565b604051908082528060200260200182016040528015610f2a578160200160208202803683370190505b50905060005b8381101561116557868181518110610f4a57610f4a6114ac565b60200260200101516000015182826006610f649190611542565b610f6f9060006114f1565b81518110610f7f57610f7f6114ac565b602002602001018181525050868181518110610f9d57610f9d6114ac565b60200260200101516020015182826006610fb79190611542565b610fc29060016114f1565b81518110610fd257610fd26114ac565b602002602001018181525050858181518110610ff057610ff06114ac565b6020908102919091010151515182611009836006611542565b6110149060026114f1565b81518110611024576110246114ac565b602002602001018181525050858181518110611042576110426114ac565b6020908102919091018101515101518261105d836006611542565b6110689060036114f1565b81518110611078576110786114ac565b602002602001018181525050858181518110611096576110966114ac565b6020026020010151602001516000600281106110b4576110b46114ac565b6020020151826110c5836006611542565b6110d09060046114f1565b815181106110e0576110e06114ac565b6020026020010181815250508581815181106110fe576110fe6114ac565b60200260200101516020015160016002811061111c5761111c6114ac565b60200201518261112d836006611542565b6111389060056114f1565b81518110611148576111486114ac565b60209081029190910101528061115d816114d8565b915050610f30565b5061116e6112df565b6000602082602086026020860160086107d05a03fa9050808061118d57fe5b50806111d35760405162461bcd60e51b81526020600482015260156024820152741c185a5c9a5b99cb5bdc18dbd9194b59985a5b1959605a1b60448201526064016101ef565b505115159695505050505050565b6040805160a08101909152600060608201818152608083019190915281526020810161120b6112bf565b815260200161122d604051806040016040528060008152602001600081525090565b905290565b6040805160e08101909152600060a0820181815260c083019190915281526020810161125c6112bf565b81526020016112696112bf565b81526020016112766112bf565b8152602001606081525090565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b60405180604001604052806112d26112fd565b815260200161122d6112fd565b60405180602001604052806001906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156113545761135461131b565b60405290565b604051610140810167ffffffffffffffff811182821017156113545761135461131b565b600082601f83011261138f57600080fd5b611397611331565b8060408401858111156113a957600080fd5b845b818110156113c35780358452602093840193016113ab565b509095945050505050565b6000806000806102408086880312156113e657600080fd5b6113f0878761137e565b9450604087605f88011261140357600080fd5b61140b611331565b8060c089018a81111561141d57600080fd5b838a015b81811015611442576114338c8261137e565b84526020909301928401611421565b508197506114508b8261137e565b9650505050508661011f87011261146657600080fd5b61146e61135a565b90860190808883111561148057600080fd5b61010088015b8381101561149e578035835260209283019201611486565b509598949750929550505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016114ea576114ea6114c2565b5060010190565b60008219821115611504576115046114c2565b500190565b60008261152657634e487b7160e01b600052601260045260246000fd5b500690565b60008282101561153d5761153d6114c2565b500390565b600081600019048311821515161561155c5761155c6114c2565b50029056fea2646970667358221220e8781558c3439f0e675a30351c2195a1d04561fa654f01751045f8d07ad8b22464736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "verifyProof(uint256[2],uint256[2][2],uint256[2],uint256[10])": { + "returns": { + "r": " bool true if proof is valid" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/Pythia1SimpleAttester.json b/deployments/mumbai/Pythia1SimpleAttester.json new file mode 100644 index 0000000..17e7e50 --- /dev/null +++ b/deployments/mumbai/Pythia1SimpleAttester.json @@ -0,0 +1,1009 @@ +{ + "address": "0x1586190051bf7bb0b754A7AA7CDde21E920ad009", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "attestationsRegistryAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "collectionIdFirst", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collectionIdLast", + "type": "uint256" + }, + { + "internalType": "address", + "name": "pythia1VerifierAddress", + "type": "address" + }, + { + "internalType": "uint256[2]", + "name": "commitmentSignerPubKey", + "type": "uint256[2]" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AttestationDeletionNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "ChainIdMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + } + ], + "name": "CollectionIdOutOfBound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedX", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedY", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputX", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputY", + "type": "uint256" + } + ], + "name": "CommitmentSignerPubKeyMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expectedDestination", + "type": "address" + }, + { + "internalType": "address", + "name": "inputDestination", + "type": "address" + } + ], + "name": "DestinationMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedGroupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + } + ], + "name": "GroupIdAndPropertiesMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedAccountsTreeValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputAccountsTreeValue", + "type": "uint256" + } + ], + "name": "GroupIdMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "InvalidGroth16Proof", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "expectedStrictness", + "type": "bool" + }, + { + "internalType": "bool", + "name": "strictNess", + "type": "bool" + } + ], + "name": "IsStrictMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedTicketIdentifier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ticketIdentifier", + "type": "uint256" + } + ], + "name": "TicketIdentifierMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "userTicket", + "type": "uint256" + } + ], + "name": "TicketUsed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "inputdestination", + "type": "address" + } + ], + "name": "UserShouldOwnItsDestination", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputValue", + "type": "uint256" + } + ], + "name": "ValueMismatch", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct Attestation", + "name": "attestation", + "type": "tuple" + } + ], + "name": "AttestationDeleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct Attestation", + "name": "attestation", + "type": "tuple" + } + ], + "name": "AttestationGenerated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[2]", + "name": "newCommitmentSignerPubKey", + "type": "uint256[2]" + } + ], + "name": "CommitmentSignerPubKeyUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "ticket", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "TicketDestinationUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "AUTHORIZED_COLLECTION_ID_FIRST", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "AUTHORIZED_COLLECTION_ID_LAST", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "buildAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "collectionIds", + "type": "uint256[]" + }, + { + "internalType": "address", + "name": "attestationsOwner", + "type": "address" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "deleteAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "generateAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAttestationRegistry", + "outputs": [ + { + "internalType": "contract IAttestationsRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCommitmentSignerPubKey", + "outputs": [ + { + "internalType": "uint256[2]", + "name": "", + "type": "uint256[2]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "userTicket", + "type": "uint256" + } + ], + "name": "getDestinationOfTicket", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVerifier", + "outputs": [ + { + "internalType": "contract Pythia1Verifier", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[2]", + "name": "commitmentSignerPubKey", + "type": "uint256[2]" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[2]", + "name": "commitmentSignerPubKey", + "type": "uint256[2]" + } + ], + "name": "updateCommitmentSignerPubKey", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x7D4358593d1F3e8202d7d3a7f3Fa9e97a61b464E", + "transactionIndex": 7, + "gasUsed": "1836653", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800010000000000000000000000020000000000000000100008000000040000000000000000000000000000000000000000000000000800001000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000400000000000000000000000200000000000000010000000000000000000008000200000000000000000200000080000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000001020000000000000000000000000000000000000000200000000000020000000100000", + "blockHash": "0x8f8bb6a6cf5de842bd59356d89fa7381911dfb68626902fd5d969d435f9859f5", + "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", + "logs": [ + { + "transactionIndex": 7, + "blockNumber": 28600083, + "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", + "address": "0x7D4358593d1F3e8202d7d3a7f3Fa9e97a61b464E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 44, + "blockHash": "0x8f8bb6a6cf5de842bd59356d89fa7381911dfb68626902fd5d969d435f9859f5" + }, + { + "transactionIndex": 7, + "blockNumber": 28600083, + "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", + "address": "0x7D4358593d1F3e8202d7d3a7f3Fa9e97a61b464E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 45, + "blockHash": "0x8f8bb6a6cf5de842bd59356d89fa7381911dfb68626902fd5d969d435f9859f5" + }, + { + "transactionIndex": 7, + "blockNumber": 28600083, + "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", + "address": "0x7D4358593d1F3e8202d7d3a7f3Fa9e97a61b464E", + "topics": [ + "0xda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df" + ], + "data": "0x038d3d596875c66eb90608bbe04e4e238607fd32ad61f4278bdaf47aadc28d601b46b55a0ce3f35d6025cdd4554aaac1fc7180b14d51b0f15aa51a6929bdb952", + "logIndex": 46, + "blockHash": "0x8f8bb6a6cf5de842bd59356d89fa7381911dfb68626902fd5d969d435f9859f5" + }, + { + "transactionIndex": 7, + "blockNumber": 28600083, + "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99" + ], + "data": "0x000000000000000000000000000000000000000000000000002025bbacd28c810000000000000000000000000000000000000000000000007fd7faf32f52f12c0000000000000000000000000000000000000000000007c52f89c3d5584a97d50000000000000000000000000000000000000000000000007fb7d537828064ab0000000000000000000000000000000000000000000007c52fa9e991051d2456", + "logIndex": 47, + "blockHash": "0x8f8bb6a6cf5de842bd59356d89fa7381911dfb68626902fd5d969d435f9859f5" + } + ], + "blockNumber": 28600083, + "cumulativeGasUsed": "3332715", + "status": 1, + "byzantium": true + }, + "args": [ + "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", + "30000001", + "30000100", + "0x115dFa344C877fF74e970F06BE10FF5A59EAba02", + [ + "0x038d3d596875c66eb90608bbe04e4e238607fd32ad61f4278bdaf47aadc28d60", + "0x1b46b55a0ce3f35d6025cdd4554aaac1fc7180b14d51b0f15aa51a6929bdb952" + ], + "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6" + ], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attestationsRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"collectionIdFirst\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collectionIdLast\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"pythia1VerifierAddress\",\"type\":\"address\"},{\"internalType\":\"uint256[2]\",\"name\":\"commitmentSignerPubKey\",\"type\":\"uint256[2]\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AttestationDeletionNotImplemented\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"name\":\"ChainIdMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"}],\"name\":\"CollectionIdOutOfBound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedX\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expectedY\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputX\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputY\",\"type\":\"uint256\"}],\"name\":\"CommitmentSignerPubKeyMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"expectedDestination\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"inputDestination\",\"type\":\"address\"}],\"name\":\"DestinationMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedGroupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"}],\"name\":\"GroupIdAndPropertiesMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedAccountsTreeValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputAccountsTreeValue\",\"type\":\"uint256\"}],\"name\":\"GroupIdMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"InvalidGroth16Proof\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"expectedStrictness\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"strictNess\",\"type\":\"bool\"}],\"name\":\"IsStrictMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedTicketIdentifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ticketIdentifier\",\"type\":\"uint256\"}],\"name\":\"TicketIdentifierMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"userTicket\",\"type\":\"uint256\"}],\"name\":\"TicketUsed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"inputdestination\",\"type\":\"address\"}],\"name\":\"UserShouldOwnItsDestination\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputValue\",\"type\":\"uint256\"}],\"name\":\"ValueMismatch\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct Attestation\",\"name\":\"attestation\",\"type\":\"tuple\"}],\"name\":\"AttestationDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct Attestation\",\"name\":\"attestation\",\"type\":\"tuple\"}],\"name\":\"AttestationGenerated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256[2]\",\"name\":\"newCommitmentSignerPubKey\",\"type\":\"uint256[2]\"}],\"name\":\"CommitmentSignerPubKeyUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ticket\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"TicketDestinationUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"AUTHORIZED_COLLECTION_ID_FIRST\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"AUTHORIZED_COLLECTION_ID_LAST\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"buildAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"attestationsOwner\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"deleteAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"generateAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAttestationRegistry\",\"outputs\":[{\"internalType\":\"contract IAttestationsRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCommitmentSignerPubKey\",\"outputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"\",\"type\":\"uint256[2]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"userTicket\",\"type\":\"uint256\"}],\"name\":\"getDestinationOfTicket\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVerifier\",\"outputs\":[{\"internalType\":\"contract Pythia1Verifier\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"commitmentSignerPubKey\",\"type\":\"uint256[2]\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"commitmentSignerPubKey\",\"type\":\"uint256[2]\"}],\"name\":\"updateCommitmentSignerPubKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"buildAttestations(((uint256,uint256,bytes)[],address),bytes)\":{\"details\":\"Returns attestations that will be recorded, constructed from the user request\",\"params\":{\"request\":\"users request. Claim of having an account part of a group of accounts\"}},\"constructor\":{\"details\":\"Constructor. Initializes the contract\",\"params\":{\"attestationsRegistryAddress\":\"Attestations Registry contract on which the attester will write attestations\",\"collectionIdFirst\":\"Id of the first collection in which the attester is supposed to record\",\"collectionIdLast\":\"Id of the last collection in which the attester is supposed to record\",\"commitmentSignerPubKey\":\"The EdDSA public key of the commitment signer for the Pythia 1 Proving Scheme\",\"owner\":\"The owner of the contract that can update the commitment signer pub key\",\"pythia1VerifierAddress\":\"ZK Snark Pythia-1 Verifier contract\"}},\"deleteAttestations(uint256[],address,bytes)\":{\"details\":\"External facing function. Allows to delete attestations by submitting proof\",\"params\":{\"attestationsOwner\":\"Owner of attestations to delete\",\"collectionIds\":\"Collection identifier of attestations to delete\",\"proofData\":\"Data sent along the deletion request to prove its validity\"},\"returns\":{\"_0\":\"attestations Attestations that were deleted\"}},\"generateAttestations(((uint256,uint256,bytes)[],address),bytes)\":{\"details\":\"Main external function. Allows to generate attestations by making a request and submitting proof\",\"params\":{\"proofData\":\"Data sent along the request to prove its validity\",\"request\":\"User request\"},\"returns\":{\"_0\":\"attestations Attestations that has been recorded\"}},\"getAttestationRegistry()\":{\"details\":\"Attestation registry getter\",\"returns\":{\"_0\":\"attestationRegistry\"}},\"getCommitmentSignerPubKey()\":{\"details\":\"Getter of the Commitment signer Eddsa Public key\"},\"getDestinationOfTicket(uint256)\":{\"details\":\"Getter, returns the last attestation destination of a ticket\",\"params\":{\"userTicket\":\"ticket used*\"}},\"getVerifier()\":{\"details\":\"Getter of Pythia-1 Verifier contract\"},\"initialize(uint256[2],address)\":{\"details\":\"Initializes the contract, to be called by the proxy delegating calls to this implementation\",\"params\":{\"commitmentSignerPubKey\":\"EdDSA public key of the commitment signer\",\"owner\":\"Owner of the contract, can update public key and address\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"stateVariables\":{\"AUTHORIZED_COLLECTION_ID_FIRST\":{\"details\":\"Getter returns of the first collection in which the attester is supposed to record*\"},\"AUTHORIZED_COLLECTION_ID_LAST\":{\"details\":\"Getter returns of the last collection in which the attester is supposed to record*\"}},\"title\":\"Pythia-1 Simple Attester\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"This attester is part of the family of the Pythia-1 Attesters. Pythia-1 attesters enable users to prove they have a claim and its proof issued by an offchain service in a privacy preserving way. That means no-one can make the link between the account used in the offchain service and the onchain account where the attestation is stored. The Pythia-1 Base abstract contract is inherited and holds the complex Pythia 1 verification logic. We invite readers to refer to: - https://pythia-1.docs.sismo.io for a full guide through the Pythia-1 ZK Attestations - https://pythia-1-circuits.docs.sismo.io for circuits, prover and verifiers of Pythia-1 This specific attester has the following characteristics: - Zero Knowledge One cannot deduct from an attestation what offchain issuer's account was used to generate the underlying proof - Non Strict (scores) If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100. This attester generate attestations of scores - Ticketed Each users gets one userTicket per claim For people used to semaphore/ tornado cash people: userTicket = hash(secret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier)*\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/attesters/pythia-1/Pythia1SimpleAttester.sol\":\"Pythia1SimpleAttester\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() initializer {}\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\\n // contract may have been reentered.\\n require(_initializing ? _isConstructor() : !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} modifier, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n function _isConstructor() private view returns (bool) {\\n return !Address.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x4823752b07b8ea4ca971b217e39457930e7cb103c2c91e2a29729e5ca907e4f0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@sismo-core/pythia-1/contracts/Pythia1Verifier.sol\":{\"content\":\"//\\n// Copyright 2017 Christian Reitwiessner\\n// 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:\\n// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\\n// 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.\\n//\\n// 2019 OKIMS\\n// ported to solidity 0.6\\n// fixed linter warnings\\n// added requiere error messages\\n//\\n//\\n// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.0;\\nlibrary Pairing {\\n struct G1Point {\\n uint X;\\n uint Y;\\n }\\n // Encoding of field elements is: X[0] * z + X[1]\\n struct G2Point {\\n uint[2] X;\\n uint[2] Y;\\n }\\n /// @return the generator of G1\\n function P1() internal pure returns (G1Point memory) {\\n return G1Point(1, 2);\\n }\\n /// @return the generator of G2\\n function P2() internal pure returns (G2Point memory) {\\n // Original code point\\n return G2Point(\\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\\n );\\n\\n/*\\n // Changed by Jordi point\\n return G2Point(\\n [10857046999023057135944570762232829481370756359578518086990519993285655852781,\\n 11559732032986387107991004021392285783925812861821192530917403151452391805634],\\n [8495653923123431417604973247489272438418190587263600148770280649306958101930,\\n 4082367875863433681332203403145435568316851327593401208105741076214120093531]\\n );\\n*/\\n }\\n /// @return r the negation of p, i.e. p.addition(p.negate()) should be zero.\\n function negate(G1Point memory p) internal pure returns (G1Point memory r) {\\n // The prime q in the base field F_q for G1\\n uint q = 21888242871839275222246405745257275088696311157297823662689037894645226208583;\\n if (p.X == 0 && p.Y == 0)\\n return G1Point(0, 0);\\n return G1Point(p.X, q - (p.Y % q));\\n }\\n /// @return r the sum of two points of G1\\n function addition(G1Point memory p1, G1Point memory p2) internal view returns (G1Point memory r) {\\n uint[4] memory input;\\n input[0] = p1.X;\\n input[1] = p1.Y;\\n input[2] = p2.X;\\n input[3] = p2.Y;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require(success,\\\"pairing-add-failed\\\");\\n }\\n /// @return r the product of a point on G1 and a scalar, i.e.\\n /// p == p.scalar_mul(1) and p.addition(p) == p.scalar_mul(2) for all points p.\\n function scalar_mul(G1Point memory p, uint s) internal view returns (G1Point memory r) {\\n uint[3] memory input;\\n input[0] = p.X;\\n input[1] = p.Y;\\n input[2] = s;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require (success,\\\"pairing-mul-failed\\\");\\n }\\n /// @return the result of computing the pairing check\\n /// e(p1[0], p2[0]) * .... * e(p1[n], p2[n]) == 1\\n /// For example pairing([P1(), P1().negate()], [P2(), P2()]) should\\n /// return true.\\n function pairing(G1Point[] memory p1, G2Point[] memory p2) internal view returns (bool) {\\n require(p1.length == p2.length,\\\"pairing-lengths-failed\\\");\\n uint elements = p1.length;\\n uint inputSize = elements * 6;\\n uint[] memory input = new uint[](inputSize);\\n for (uint i = 0; i < elements; i++)\\n {\\n input[i * 6 + 0] = p1[i].X;\\n input[i * 6 + 1] = p1[i].Y;\\n input[i * 6 + 2] = p2[i].X[0];\\n input[i * 6 + 3] = p2[i].X[1];\\n input[i * 6 + 4] = p2[i].Y[0];\\n input[i * 6 + 5] = p2[i].Y[1];\\n }\\n uint[1] memory out;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 8, add(input, 0x20), mul(inputSize, 0x20), out, 0x20)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require(success,\\\"pairing-opcode-failed\\\");\\n return out[0] != 0;\\n }\\n /// Convenience method for a pairing check for two pairs.\\n function pairingProd2(G1Point memory a1, G2Point memory a2, G1Point memory b1, G2Point memory b2) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](2);\\n G2Point[] memory p2 = new G2Point[](2);\\n p1[0] = a1;\\n p1[1] = b1;\\n p2[0] = a2;\\n p2[1] = b2;\\n return pairing(p1, p2);\\n }\\n /// Convenience method for a pairing check for three pairs.\\n function pairingProd3(\\n G1Point memory a1, G2Point memory a2,\\n G1Point memory b1, G2Point memory b2,\\n G1Point memory c1, G2Point memory c2\\n ) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](3);\\n G2Point[] memory p2 = new G2Point[](3);\\n p1[0] = a1;\\n p1[1] = b1;\\n p1[2] = c1;\\n p2[0] = a2;\\n p2[1] = b2;\\n p2[2] = c2;\\n return pairing(p1, p2);\\n }\\n /// Convenience method for a pairing check for four pairs.\\n function pairingProd4(\\n G1Point memory a1, G2Point memory a2,\\n G1Point memory b1, G2Point memory b2,\\n G1Point memory c1, G2Point memory c2,\\n G1Point memory d1, G2Point memory d2\\n ) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](4);\\n G2Point[] memory p2 = new G2Point[](4);\\n p1[0] = a1;\\n p1[1] = b1;\\n p1[2] = c1;\\n p1[3] = d1;\\n p2[0] = a2;\\n p2[1] = b2;\\n p2[2] = c2;\\n p2[3] = d2;\\n return pairing(p1, p2);\\n }\\n}\\ncontract Pythia1Verifier {\\n using Pairing for *;\\n struct VerifyingKey {\\n Pairing.G1Point alfa1;\\n Pairing.G2Point beta2;\\n Pairing.G2Point gamma2;\\n Pairing.G2Point delta2;\\n Pairing.G1Point[] IC;\\n }\\n struct Proof {\\n Pairing.G1Point A;\\n Pairing.G2Point B;\\n Pairing.G1Point C;\\n }\\n function verifyingKey() internal pure returns (VerifyingKey memory vk) {\\n vk.alfa1 = Pairing.G1Point(\\n 20491192805390485299153009773594534940189261866228447918068658471970481763042,\\n 9383485363053290200918347156157836566562967994039712273449902621266178545958\\n );\\n\\n vk.beta2 = Pairing.G2Point(\\n [4252822878758300859123897981450591353533073413197771768651442665752259397132,\\n 6375614351688725206403948262868962793625744043794305715222011528459656738731],\\n [21847035105528745403288232691147584728191162732299865338377159692350059136679,\\n 10505242626370262277552901082094356697409835680220590971873171140371331206856]\\n );\\n vk.gamma2 = Pairing.G2Point(\\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\\n );\\n vk.delta2 = Pairing.G2Point(\\n [10531421060471803210764242282180596988661354300825243432694370526898549660572,\\n 16907777539267866029484140695898606769333962039725819851897531221528016291246],\\n [1262343472093645508827094724965505457998222566160570888483460111770233999788,\\n 15912415772039780433311820224136904737706664077875817672499292870626930031698]\\n );\\n vk.IC = new Pairing.G1Point[](10);\\n \\n vk.IC[0] = Pairing.G1Point( \\n 5517688305750201128762483893091304147062827104408157512730579569350848407613,\\n 5780136537335992008649392871793066674866342777759859789350700119480160130924\\n ); \\n \\n vk.IC[1] = Pairing.G1Point( \\n 12697944246979452442578306963760600646953905903147293524406388488412105525306,\\n 7947498303555241939381866476162499321683671397366404411964730108870115767741\\n ); \\n \\n vk.IC[2] = Pairing.G1Point( \\n 104028078850975554065172701281783302003220555203883119831575537681421753151,\\n 19148240629904598794948591359118971959790791697910953160820265703277306346\\n ); \\n \\n vk.IC[3] = Pairing.G1Point( \\n 5389100687915168292769005150998138946551934165417656464020514059527551078739,\\n 2995810062694628906192141834014562842416411391073941090612035469327148467089\\n ); \\n \\n vk.IC[4] = Pairing.G1Point( \\n 13361404455959093513465491032733056651449943760514352043673570676442342622118,\\n 13062233980231097531380816290641636455952795449264050237462472029810698552529\\n ); \\n \\n vk.IC[5] = Pairing.G1Point( \\n 11459259237872151197093706264224074511822899275820846406369316478681920338712,\\n 17008950402703007066305862393917002979068108987255258732198250350572930280478\\n ); \\n \\n vk.IC[6] = Pairing.G1Point( \\n 6864252787935048608809029133239993600538509116976873537320635937882667431893,\\n 21828895867329533519544146243248306555649073137427314743033980762667640230681\\n ); \\n \\n vk.IC[7] = Pairing.G1Point( \\n 9438320622270795479948280183526528671720880729000858589094410097102899873097,\\n 5568101658133066923956745075211904883930639183482936243523669908553853509584\\n ); \\n \\n vk.IC[8] = Pairing.G1Point( \\n 8243240866289541427505408968801246044483594232529594515653799293334187695980,\\n 16836688029681482175969944959379945743029264506292968109365225279154937195513\\n ); \\n \\n vk.IC[9] = Pairing.G1Point( \\n 8901554162474861401157311041464523592671931268194133233238376271355243714980,\\n 3625114242544161778734123207817598834256751400634638318925544817537792055578\\n ); \\n \\n }\\n function verify(uint[] memory input, Proof memory proof) internal view returns (uint) {\\n uint256 snark_scalar_field = 21888242871839275222246405745257275088548364400416034343698204186575808495617;\\n VerifyingKey memory vk = verifyingKey();\\n require(input.length + 1 == vk.IC.length,\\\"verifier-bad-input\\\");\\n // Compute the linear combination vk_x\\n Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);\\n for (uint i = 0; i < input.length; i++) {\\n require(input[i] < snark_scalar_field,\\\"verifier-gte-snark-scalar-field\\\");\\n vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i]));\\n }\\n vk_x = Pairing.addition(vk_x, vk.IC[0]);\\n if (!Pairing.pairingProd4(\\n Pairing.negate(proof.A), proof.B,\\n vk.alfa1, vk.beta2,\\n vk_x, vk.gamma2,\\n proof.C, vk.delta2\\n )) return 1;\\n return 0;\\n }\\n /// @return r bool true if proof is valid\\n function verifyProof(\\n uint[2] memory a,\\n uint[2][2] memory b,\\n uint[2] memory c,\\n uint[9] memory input\\n ) public view returns (bool r) {\\n Proof memory proof;\\n proof.A = Pairing.G1Point(a[0], a[1]);\\n proof.B = Pairing.G2Point([b[0][0], b[0][1]], [b[1][0], b[1][1]]);\\n proof.C = Pairing.G1Point(c[0], c[1]);\\n uint[] memory inputValues = new uint[](input.length);\\n for(uint i = 0; i < input.length; i++){\\n inputValues[i] = input[i];\\n }\\n if (verify(inputValues, proof) == 0) {\\n return true;\\n } else {\\n return false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3babb956e64535b9bf535df94288b4d83ea82c54727f79ee8949fe4a19c1d5ba\",\"license\":\"GPL-3.0\"},\"contracts/attesters/pythia-1/Pythia1SimpleAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {IPythia1SimpleAttester} from './interfaces/IPythia1SimpleAttester.sol';\\n\\n// Core protocol Protocol imports\\nimport {Request, Attestation, Claim} from './../../core/libs/Structs.sol';\\nimport {Attester, IAttester, IAttestationsRegistry} from './../../core/Attester.sol';\\n\\n// Imports related to Pythia1 Proving Scheme\\nimport {Pythia1Base, Pythia1Lib, Pythia1ProofData, Pythia1ProofInput, Pythia1Claim} from './base/Pythia1Base.sol';\\n\\n/**\\n * @title Pythia-1 Simple Attester\\n * @author Sismo\\n * @notice This attester is part of the family of the Pythia-1 Attesters.\\n * Pythia-1 attesters enable users to prove they have a claim and its proof issued by an \\n * offchain service in a privacy preserving way. \\n * That means no-one can make the link between the account used in the offchain service\\n * and the onchain account where the attestation is stored.\\n * The Pythia-1 Base abstract contract is inherited and holds the complex Pythia 1 verification logic.\\n * We invite readers to refer to:\\n * - https://pythia-1.docs.sismo.io for a full guide through the Pythia-1 ZK Attestations\\n * - https://pythia-1-circuits.docs.sismo.io for circuits, prover and verifiers of Pythia-1\\n\\n * This specific attester has the following characteristics:\\n\\n * - Zero Knowledge\\n * One cannot deduct from an attestation what offchain issuer's account was used to generate the underlying proof\\n\\n * - Non Strict (scores)\\n * If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100.\\n * This attester generate attestations of scores\\n\\n * - Ticketed\\n * Each users gets one userTicket per claim\\n * For people used to semaphore/ tornado cash people:\\n * userTicket = hash(secret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier)\\n **/\\n\\ncontract Pythia1SimpleAttester is IPythia1SimpleAttester, Pythia1Base, Attester, Ownable {\\n using Pythia1Lib for Pythia1ProofData;\\n using Pythia1Lib for bytes;\\n using Pythia1Lib for Request;\\n\\n // The deployed contract will need to be authorized to write into the Attestation registry\\n // It should get write access on attestation collections from AUTHORIZED_COLLECTION_ID_FIRST to AUTHORIZED_COLLECTION_ID_LAST.\\n uint256 public immutable AUTHORIZED_COLLECTION_ID_FIRST;\\n uint256 public immutable AUTHORIZED_COLLECTION_ID_LAST;\\n\\n uint256[2] internal _commitmentSignerPubKey;\\n mapping(uint256 => address) internal _ticketsDestinations;\\n\\n /*******************************************************\\n INITIALIZATION FUNCTIONS \\n *******************************************************/\\n /**\\n * @dev Constructor. Initializes the contract\\n * @param attestationsRegistryAddress Attestations Registry contract on which the attester will write attestations\\n * @param collectionIdFirst Id of the first collection in which the attester is supposed to record\\n * @param collectionIdLast Id of the last collection in which the attester is supposed to record\\n * @param pythia1VerifierAddress ZK Snark Pythia-1 Verifier contract\\n * @param commitmentSignerPubKey The EdDSA public key of the commitment signer for the Pythia 1 Proving Scheme\\n * @param owner The owner of the contract that can update the commitment signer pub key\\n */\\n constructor(\\n address attestationsRegistryAddress,\\n uint256 collectionIdFirst,\\n uint256 collectionIdLast,\\n address pythia1VerifierAddress,\\n uint256[2] memory commitmentSignerPubKey,\\n address owner\\n ) Attester(attestationsRegistryAddress) Pythia1Base(pythia1VerifierAddress) {\\n AUTHORIZED_COLLECTION_ID_FIRST = collectionIdFirst;\\n AUTHORIZED_COLLECTION_ID_LAST = collectionIdLast;\\n initialize(commitmentSignerPubKey, owner);\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param commitmentSignerPubKey EdDSA public key of the commitment signer\\n * @param owner Owner of the contract, can update public key and address\\n */\\n function initialize(uint256[2] memory commitmentSignerPubKey, address owner) public initializer {\\n _transferOwnership(owner);\\n _updateCommitmentSignerPubKey(commitmentSignerPubKey);\\n }\\n\\n /*******************************************************\\n MANDATORY FUNCTIONS TO OVERRIDE FROM ATTESTER.SOL\\n *******************************************************/\\n /**\\n * @dev Throws if user request is invalid when verified against\\n * Look into Pythia1Base for more details\\n * @param request users request. Claim of having an account part of a group of accounts\\n * @param proofData provided to back the request. snark input and snark proof\\n */\\n function _verifyRequest(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n override\\n {\\n Pythia1ProofData memory snarkProof = abi.decode(proofData, (Pythia1ProofData));\\n Pythia1ProofInput memory snarkInput = snarkProof._input();\\n Pythia1Claim memory claim = request._claim();\\n\\n // verifies that the proof corresponds to the claim\\n _validateInput(claim, snarkInput);\\n // verifies the proof validity\\n _verifyProof(snarkProof);\\n }\\n\\n /**\\n * @dev Returns attestations that will be recorded, constructed from the user request\\n * @param request users request. Claim of having an account part of a group of accounts\\n */\\n function buildAttestations(Request calldata request, bytes calldata)\\n public\\n view\\n virtual\\n override(IAttester, Attester)\\n returns (Attestation[] memory)\\n {\\n Pythia1Claim memory claim = request._claim();\\n\\n Attestation[] memory attestations = new Attestation[](1);\\n\\n uint256 attestationCollectionId = AUTHORIZED_COLLECTION_ID_FIRST +\\n claim.groupProperties.internalCollectionId;\\n\\n if (attestationCollectionId > AUTHORIZED_COLLECTION_ID_LAST)\\n revert CollectionIdOutOfBound(attestationCollectionId);\\n\\n address issuer = address(this);\\n\\n attestations[0] = Attestation(\\n attestationCollectionId,\\n claim.destination,\\n issuer,\\n claim.claimedValue,\\n uint32(block.timestamp),\\n ''\\n );\\n return (attestations);\\n }\\n\\n /*******************************************************\\n OPTIONAL HOOK VIRTUAL FUNCTIONS FROM ATTESTER.SOL\\n *******************************************************/\\n\\n /**\\n * @dev Hook run before recording the attestation.\\n * Throws if ticket already used\\n * @param request users request. Claim of beiing part of a group.\\n * @param proofData provided to back the request. snark input and snark proof\\n */\\n function _beforeRecordAttestations(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n override\\n {\\n // we get the ticket used from the snark input in the data provided\\n uint256 userTicket = proofData._getTicket();\\n address currentDestination = _getDestinationOfTicket(userTicket);\\n\\n if (currentDestination != address(0)) {\\n revert TicketUsed(userTicket);\\n }\\n\\n _setDestinationForTicket(userTicket, request.destination);\\n }\\n\\n /*******************************************************\\n Pythia-1 MANDATORY FUNCTIONS FROM Pythia-1 Base Attester\\n *******************************************************/\\n\\n /**\\n * @dev Returns the ticket identifier from a user claim\\n * @param claim user Pythia-1 claim = have an offchain account with a specific value in a specific group\\n * ticket = hash(secretHash, ticketIdentifier), which is verified inside the snark\\n * users bring secretHash as private input in snark which guarantees privacy\\n * the secretHash is only known by the user and never escape the user's browser\\n \\n * Here we chose ticketIdentifier = hash(attesterAddress, claim.GroupId)\\n * Creates one ticket per group, per user and makes sure no collision with other attester's tickets\\n **/\\n function _getTicketIdentifierOfClaim(Pythia1Claim memory claim)\\n internal\\n view\\n override\\n returns (uint256)\\n {\\n uint256 ticketIdentifier = _encodeInSnarkField(\\n address(this),\\n claim.groupProperties.internalCollectionId\\n );\\n return ticketIdentifier;\\n }\\n\\n function _getCommitmentSignerPubKey() internal view override returns (uint256[2] memory) {\\n return _commitmentSignerPubKey;\\n }\\n\\n /*******************************************************\\n Pythia-1 Attester Specific Functions\\n *******************************************************/\\n\\n function updateCommitmentSignerPubKey(uint256[2] memory commitmentSignerPubKey)\\n external\\n onlyOwner\\n {\\n _updateCommitmentSignerPubKey(commitmentSignerPubKey);\\n }\\n\\n function _updateCommitmentSignerPubKey(uint256[2] memory commitmentSignerPubKey) internal {\\n _commitmentSignerPubKey = commitmentSignerPubKey;\\n emit CommitmentSignerPubKeyUpdated(commitmentSignerPubKey);\\n }\\n\\n /**\\n * @dev Getter, returns the last attestation destination of a ticket\\n * @param userTicket ticket used\\n **/\\n function getDestinationOfTicket(uint256 userTicket) external view override returns (address) {\\n return _getDestinationOfTicket(userTicket);\\n }\\n\\n function _setDestinationForTicket(uint256 userTicket, address destination) internal virtual {\\n _ticketsDestinations[userTicket] = destination;\\n emit TicketDestinationUpdated(userTicket, destination);\\n }\\n\\n function _getDestinationOfTicket(uint256 userTicket) internal view returns (address) {\\n return _ticketsDestinations[userTicket];\\n }\\n\\n function _encodeInSnarkField(address addr, uint256 nb) internal pure returns (uint256) {\\n return uint256(keccak256(abi.encode(addr, nb))) % Pythia1Lib.SNARK_FIELD;\\n }\\n}\\n\",\"keccak256\":\"0x8e9e36f3b5d2ca8decde179a6aac0c06de656f20c25268444fd8d0feac327bc0\",\"license\":\"MIT\"},\"contracts/attesters/pythia-1/base/IPythia1Base.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {Pythia1Verifier, Pythia1Lib, Pythia1ProofData} from '../libs/Pythia1Lib.sol';\\n\\ninterface IPythia1Base {\\n error DestinationMismatch(address expectedDestination, address inputDestination);\\n error UserShouldOwnItsDestination(address sender, address inputdestination);\\n error CommitmentSignerPubKeyMismatch(\\n uint256 expectedX,\\n uint256 expectedY,\\n uint256 inputX,\\n uint256 inputY\\n );\\n error TicketIdentifierMismatch(uint256 expectedTicketIdentifier, uint256 ticketIdentifier);\\n error IsStrictMismatch(bool expectedStrictness, bool strictNess);\\n error ChainIdMismatch(uint256 expectedChainId, uint256 chainId);\\n error ValueMismatch(uint256 expectedValue, uint256 inputValue);\\n error GroupIdMismatch(uint256 expectedAccountsTreeValue, uint256 inputAccountsTreeValue);\\n error InvalidGroth16Proof(string reason);\\n\\n /**\\n * @dev Getter of Pythia-1 Verifier contract\\n */\\n function getVerifier() external view returns (Pythia1Verifier);\\n\\n /**\\n * @dev Getter of the Commitment Signer EdDSA Public Key\\n */\\n function getCommitmentSignerPubKey() external view returns (uint256[2] memory);\\n}\\n\",\"keccak256\":\"0x61924d768ab0c8cd61d0ff3c9ecbfbc37aacdbec7f575f0d46041b1847222526\",\"license\":\"MIT\"},\"contracts/attesters/pythia-1/base/Pythia1Base.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {IPythia1Base} from './IPythia1Base.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\n\\n// Protocol imports\\nimport {Request, Attestation, Claim} from '../../../core/libs/Structs.sol';\\n\\n// Imports related to Pythia 1 ZK Proving Scheme\\nimport {Pythia1Verifier, Pythia1Lib, Pythia1Claim, Pythia1ProofData, Pythia1ProofInput, Pythia1GroupProperties} from '../libs/Pythia1Lib.sol';\\n\\n/**\\n * @title Pythia-1 Base Attester\\n * @author Sismo\\n * @notice Abstract contract that facilitates the use of the Pythia-1 ZK Proving Scheme.\\n * Pythia-1: it allows issuing attestations from an offchain service and send it onchain \\n * without anyone being able to make the link between the offchain service and the onchain service.\\n * It is inherited by the family of Pythia-1 attesters.\\n * It contains the user input checking and the ZK-SNARK proof verification.\\n * We invite readers to refer to:\\n * - https://pythia-1.docs.sismo.io for a full guide through the Pythia-1 ZK Attestations\\n * - https://pythia-1-circuits.docs.sismo.io for circuits, prover and verifiers of Pythia-1\\n \\n \\n **/\\nabstract contract Pythia1Base is IPythia1Base, Initializable {\\n using Pythia1Lib for Pythia1ProofData;\\n\\n // ZK-SNARK Verifier\\n Pythia1Verifier immutable VERIFIER;\\n\\n /*******************************************************\\n INITIALIZATION FUNCTIONS \\n *******************************************************/\\n /**\\n * @dev Constructor. Initializes the contract\\n * @param Pythia1VerifierAddress ZK Snark Verifier contract\\n */\\n constructor(address Pythia1VerifierAddress) {\\n VERIFIER = Pythia1Verifier(Pythia1VerifierAddress);\\n }\\n\\n /**\\n * @dev Getter of Pythia-1 Verifier contract\\n */\\n function getVerifier() external view returns (Pythia1Verifier) {\\n return VERIFIER;\\n }\\n\\n /**\\n * @dev Getter of the Commitment signer Eddsa Public key\\n */\\n function getCommitmentSignerPubKey() external view returns (uint256[2] memory) {\\n return _getCommitmentSignerPubKey();\\n }\\n\\n /*******************************************************\\n Pythia-1 SPECIFIC FUNCTIONS\\n *******************************************************/\\n\\n /**\\n * @dev MANDATORY: must be implemented to return the ticket identifier from a user request\\n * so it can be checked against snark input\\n * ticket = hash(secretHash, ticketIdentifier), which is verified inside the snark\\n * the secretHash is a number only known by the user and is used in \\n * the zero knowledge as a private input which guarantees privacy\\n\\n * This function MUST be implemented by Pythia-1 attesters.\\n * This is the core function that implements the logic of tickets\\n\\n * Do they get one ticket per claim?\\n * Do they get 2 tickets per claim?\\n * Do they get 1 ticket per claim, every month?\\n * Take a look at Pythia-1 Simple Attester for an example\\n * @param claim user claim: a particular claim that a user have that he can prove s right.\\n */\\n function _getTicketIdentifierOfClaim(Pythia1Claim memory claim)\\n internal\\n view\\n virtual\\n returns (uint256);\\n\\n /**\\n * @dev MANDATORY: must be implemented to return the commitment signer that allows to\\n * prove the claim was correctly issued for the user.\\n */\\n function _getCommitmentSignerPubKey() internal view virtual returns (uint256[2] memory);\\n\\n /**\\n * @dev Checks whether the user claim and the snark public input are a match\\n * @param claim user claim\\n * @param input snark public input\\n */\\n function _validateInput(Pythia1Claim memory claim, Pythia1ProofInput memory input)\\n internal\\n view\\n virtual\\n {\\n if (input.groupId != claim.groupId) revert GroupIdMismatch(claim.groupId, input.groupId);\\n\\n if (input.isStrict == claim.groupProperties.isScore)\\n revert IsStrictMismatch(claim.groupProperties.isScore, input.isStrict);\\n\\n if (input.destination != claim.destination)\\n revert DestinationMismatch(claim.destination, input.destination);\\n\\n if (claim.destination != msg.sender)\\n revert UserShouldOwnItsDestination(msg.sender, claim.destination);\\n\\n if (input.chainId != block.chainid) revert ChainIdMismatch(block.chainid, input.chainId);\\n\\n if (input.value != claim.claimedValue) revert ValueMismatch(claim.claimedValue, input.value);\\n\\n uint256[2] memory commitmentSignerPubKey = _getCommitmentSignerPubKey();\\n if (\\n input.commitmentSignerPubKey[0] != commitmentSignerPubKey[0] ||\\n input.commitmentSignerPubKey[1] != commitmentSignerPubKey[1]\\n )\\n revert CommitmentSignerPubKeyMismatch(\\n commitmentSignerPubKey[0],\\n commitmentSignerPubKey[1],\\n input.commitmentSignerPubKey[0],\\n input.commitmentSignerPubKey[1]\\n );\\n\\n uint256 ticketIdentifier = _getTicketIdentifierOfClaim(claim);\\n\\n if (input.ticketIdentifier != ticketIdentifier)\\n revert TicketIdentifierMismatch(ticketIdentifier, input.ticketIdentifier);\\n }\\n\\n /**\\n * @dev verify the plonk mathematical proof using the circom verifier contract\\n * @param proofData snark public input\\n */\\n function _verifyProof(Pythia1ProofData memory proofData) internal view virtual {\\n try\\n VERIFIER.verifyProof(proofData.proof.a, proofData.proof.b, proofData.proof.c, proofData.input)\\n returns (bool success) {\\n if (!success) revert InvalidGroth16Proof('');\\n } catch Error(string memory reason) {\\n revert InvalidGroth16Proof(reason);\\n } catch Panic(\\n uint256 /*errorCode*/\\n ) {\\n revert InvalidGroth16Proof('');\\n } catch (\\n bytes memory /*lowLevelData*/\\n ) {\\n revert InvalidGroth16Proof('');\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec48f1e07923e6ceed30965ef7bdd0faf6763a3bbd239c31e1eb3c54577e5cb\",\"license\":\"MIT\"},\"contracts/attesters/pythia-1/interfaces/IPythia1SimpleAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {Attestation} from '../../../core/libs/Structs.sol';\\nimport {IAttester} from '../../../core/interfaces/IAttester.sol';\\nimport {Pythia1Lib, Pythia1ProofData, Pythia1ProofInput} from './../libs/Pythia1Lib.sol';\\nimport {IPythia1Base} from './../base/IPythia1Base.sol';\\n\\ninterface IPythia1SimpleAttester is IPythia1Base, IAttester {\\n error TicketUsed(uint256 userTicket);\\n error CollectionIdOutOfBound(uint256 collectionId);\\n\\n event TicketDestinationUpdated(uint256 ticket, address newOwner);\\n event CommitmentSignerPubKeyUpdated(uint256[2] newCommitmentSignerPubKey);\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param commitmentSignerPubKey EdDSA public key of the commitment signer\\n * @param owner Owner of the contract, can update public key and address\\n */\\n function initialize(uint256[2] memory commitmentSignerPubKey, address owner) external;\\n\\n /**\\n * @dev Getter, returns the last attestation destination of a ticket\\n * @param userTicket ticket used\\n **/\\n function getDestinationOfTicket(uint256 userTicket) external view returns (address);\\n\\n /**\\n * @dev Getter\\n * returns of the first collection in which the attester is supposed to record\\n **/\\n function AUTHORIZED_COLLECTION_ID_FIRST() external view returns (uint256);\\n\\n /**\\n * @dev Getter\\n * returns of the last collection in which the attester is supposed to record\\n **/\\n function AUTHORIZED_COLLECTION_ID_LAST() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb5eca9793c0e8f015e5c7fbdc6b4e6a5137f4fd0b82b51c1c3d69accec039a4b\",\"license\":\"MIT\"},\"contracts/attesters/pythia-1/libs/Pythia1Lib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Claim, Request} from '../../../core/libs/Structs.sol';\\nimport {Pythia1Verifier} from '@sismo-core/pythia-1/contracts/Pythia1Verifier.sol';\\n\\n// user Pythia-1 claim retrieved form his request\\nstruct Pythia1Claim {\\n uint256 groupId; // user claims be part of this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n address destination; // user claims to own this destination[]\\n Pythia1GroupProperties groupProperties; // user claims the group has the following properties\\n}\\n\\nstruct Pythia1GroupProperties {\\n uint128 internalCollectionId;\\n bool isScore;\\n}\\n\\nstruct Pythia1CircomSnarkProof {\\n uint256[2] a;\\n uint256[2][2] b;\\n uint256[2] c;\\n}\\n\\nstruct Pythia1ProofData {\\n Pythia1CircomSnarkProof proof;\\n uint256[9] input;\\n // destination;\\n // chainId;\\n // commitmentSignerPubKey.x;\\n // commitmentSignerPubKey.y;\\n // groupId;\\n // ticketIdentifier;\\n // userTicket;\\n // value;\\n // isStrict;\\n}\\n\\nstruct Pythia1ProofInput {\\n address destination;\\n uint256 chainId;\\n uint256 groupId;\\n uint256 ticketIdentifier;\\n uint256 ticket;\\n uint256 value;\\n bool isStrict;\\n uint256[2] commitmentSignerPubKey;\\n}\\n\\nlibrary Pythia1Lib {\\n uint256 constant SNARK_FIELD =\\n 21888242871839275222246405745257275088548364400416034343698204186575808495617;\\n\\n error GroupIdAndPropertiesMismatch(uint256 expectedGroupId, uint256 groupId);\\n\\n function _input(Pythia1ProofData memory self) internal pure returns (Pythia1ProofInput memory) {\\n return\\n Pythia1ProofInput(\\n _getDestination(self),\\n _getChainId(self),\\n _getGroupId(self),\\n _getExpectedExternalNullifier(self),\\n _getTicket(self),\\n _getValue(self),\\n _getIsStrict(self),\\n _getCommitmentMapperPubKey(self)\\n );\\n }\\n\\n function _claim(Request memory self) internal pure returns (Pythia1Claim memory) {\\n Claim memory claim = self.claims[0];\\n _validateClaim(claim);\\n Pythia1GroupProperties memory groupProperties = abi.decode(\\n claim.extraData,\\n (Pythia1GroupProperties)\\n );\\n return (Pythia1Claim(claim.groupId, claim.claimedValue, self.destination, groupProperties));\\n }\\n\\n function _toCircomFormat(Pythia1ProofData memory self)\\n internal\\n pure\\n returns (\\n uint256[2] memory,\\n uint256[2][2] memory,\\n uint256[2] memory,\\n uint256[9] memory\\n )\\n {\\n return (self.proof.a, self.proof.b, self.proof.c, self.input);\\n }\\n\\n function _getDestination(Pythia1ProofData memory self) internal pure returns (address) {\\n return address(uint160(self.input[0]));\\n }\\n\\n function _getChainId(Pythia1ProofData memory self) internal pure returns (uint256) {\\n return self.input[1];\\n }\\n\\n function _getCommitmentMapperPubKey(Pythia1ProofData memory self)\\n internal\\n pure\\n returns (uint256[2] memory)\\n {\\n return [self.input[2], self.input[3]];\\n }\\n\\n function _getGroupId(Pythia1ProofData memory self) internal pure returns (uint256) {\\n return self.input[4];\\n }\\n\\n function _getExpectedExternalNullifier(Pythia1ProofData memory self)\\n internal\\n pure\\n returns (uint256)\\n {\\n return self.input[5];\\n }\\n\\n function _getTicket(Pythia1ProofData memory self) internal pure returns (uint256) {\\n return self.input[6];\\n }\\n\\n function _getValue(Pythia1ProofData memory self) internal pure returns (uint256) {\\n return self.input[7];\\n }\\n\\n function _getIsStrict(Pythia1ProofData memory self) internal pure returns (bool) {\\n return self.input[8] == 1;\\n }\\n\\n function _getTicket(bytes calldata self) internal pure returns (uint256) {\\n Pythia1ProofData memory snarkProofData = abi.decode(self, (Pythia1ProofData));\\n uint256 userTicket = uint256(_getTicket(snarkProofData));\\n return userTicket;\\n }\\n\\n function _generateGroupIdFromProperties(uint128 internalCollectionId, bool isScore)\\n internal\\n pure\\n returns (uint256)\\n {\\n return\\n _generateGroupIdFromEncodedProperties(_encodeGroupProperties(internalCollectionId, isScore));\\n }\\n\\n function _generateGroupIdFromEncodedProperties(bytes memory encodedProperties)\\n internal\\n pure\\n returns (uint256)\\n {\\n return uint256(keccak256(encodedProperties)) % Pythia1Lib.SNARK_FIELD;\\n }\\n\\n function _encodeGroupProperties(uint128 internalCollectionId, bool isScore)\\n internal\\n pure\\n returns (bytes memory)\\n {\\n return abi.encode(internalCollectionId, isScore);\\n }\\n\\n function _validateClaim(Claim memory claim) internal pure {\\n uint256 expectedGroupId = _generateGroupIdFromEncodedProperties(claim.extraData);\\n if (claim.groupId != expectedGroupId)\\n revert GroupIdAndPropertiesMismatch(expectedGroupId, claim.groupId);\\n }\\n}\\n\",\"keccak256\":\"0x2431749971d4fa2f5789cd0adb62457edec6819ed956962b9db55a39bc2e5832\",\"license\":\"MIT\"},\"contracts/core/Attester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\nimport {IAttester} from './interfaces/IAttester.sol';\\nimport {IAttestationsRegistry} from './interfaces/IAttestationsRegistry.sol';\\nimport {Request, Attestation, AttestationData} from './libs/Structs.sol';\\n\\n/**\\n * @title Attester Abstract Contract\\n * @author Sismo\\n * @notice Contract to be inherited by Attesters\\n * All attesters that expect to be authorized in Sismo Protocol (i.e write access on the registry)\\n * are recommended to implemented this abstract contract\\n\\n * Take a look at the HydraS1SimpleAttester.sol for example on how to implement this abstract contract\\n *\\n * This contracts is built around two main external standard functions.\\n * They must NOT be override them, unless your really know what you are doing\\n \\n * - generateAttestations(request, proof) => will write attestations in the registry\\n * 1. (MANDATORY) Implement the buildAttestations() view function which generate attestations from user request\\n * 2. (MANDATORY) Implement teh _verifyRequest() internal function where to write checks\\n * 3. (OPTIONAL) Override _beforeRecordAttestations and _afterRecordAttestations hooks\\n\\n * - deleteAttestations(collectionId, owner, proof) => will delete attestations in the registry\\n * 1. (DEFAULT) By default this function throws (see _verifyAttestationsDeletionRequest)\\n * 2. (OPTIONAL) Override the _verifyAttestationsDeletionRequest so it no longer throws\\n * 3. (OPTIONAL) Override _beforeDeleteAttestations and _afterDeleteAttestations hooks\\n\\n * For more information: https://attesters.docs.sismo.io\\n **/\\nabstract contract Attester is IAttester {\\n // Registry where all attestations are stored\\n IAttestationsRegistry internal immutable ATTESTATIONS_REGISTRY;\\n\\n /**\\n * @dev Constructor\\n * @param attestationsRegistryAddress The address of the AttestationsRegistry contract storing attestations\\n */\\n constructor(address attestationsRegistryAddress) {\\n ATTESTATIONS_REGISTRY = IAttestationsRegistry(attestationsRegistryAddress);\\n }\\n\\n /**\\n * @dev Main external function. Allows to generate attestations by making a request and submitting proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that has been recorded\\n */\\n function generateAttestations(Request calldata request, bytes calldata proofData)\\n external\\n override\\n returns (Attestation[] memory)\\n {\\n // Verify if request is valid by verifying against proof\\n _verifyRequest(request, proofData);\\n\\n // Generate the actual attestations from user request\\n Attestation[] memory attestations = buildAttestations(request, proofData);\\n\\n _beforeRecordAttestations(request, proofData);\\n\\n ATTESTATIONS_REGISTRY.recordAttestations(attestations);\\n\\n _afterRecordAttestations(attestations);\\n\\n for (uint256 i = 0; i < attestations.length; i++) {\\n emit AttestationGenerated(attestations[i]);\\n }\\n\\n return attestations;\\n }\\n\\n /**\\n * @dev External facing function. Allows to delete attestations by submitting proof\\n * @param collectionIds Collection identifier of attestations to delete\\n * @param attestationsOwner Owner of attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n * @return attestations Attestations that were deleted\\n */\\n function deleteAttestations(\\n uint256[] calldata collectionIds,\\n address attestationsOwner,\\n bytes calldata proofData\\n ) external override returns (Attestation[] memory) {\\n // fetch attestations from the registry\\n Attestation[] memory attestationsToDelete;\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n (\\n address issuer,\\n uint256 attestationValue,\\n uint32 timestamp,\\n bytes memory extraData\\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\\n\\n attestationsToDelete[i] = (\\n Attestation(\\n collectionIds[i],\\n attestationsOwner,\\n issuer,\\n attestationValue,\\n timestamp,\\n extraData\\n )\\n );\\n }\\n\\n _verifyAttestationsDeletionRequest(attestationsToDelete, proofData);\\n\\n _beforeDeleteAttestations(attestationsToDelete, proofData);\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationsToDelete);\\n\\n _afterDeleteAttestations(attestationsToDelete, proofData);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n emit AttestationDeleted(attestationsToDelete[i]);\\n }\\n return attestationsToDelete;\\n }\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should build attestations from the user request and the proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(Request calldata request, bytes calldata proofData)\\n public\\n view\\n virtual\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev Attestation registry getter\\n * @return attestationRegistry\\n */\\n function getAttestationRegistry() external view override returns (IAttestationsRegistry) {\\n return ATTESTATIONS_REGISTRY;\\n }\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should verify the user request is valid\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _verifyRequest(Request calldata request, bytes calldata proofData) internal virtual;\\n\\n /**\\n * @dev Optional: must be overridden by attesters that want to feature attestations deletion\\n * Default behavior: throws\\n * It should verify attestations deletion request is valid\\n * @param attestations Attestations that will be deleted\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _verifyAttestationsDeletionRequest(\\n Attestation[] memory attestations,\\n bytes calldata proofData\\n ) internal virtual {\\n revert AttestationDeletionNotImplemented();\\n }\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called before recording attestations in the registry\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _beforeRecordAttestations(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n\\n /**\\n * @dev (Optional) Can be overridden in attesters inheriting this contract\\n * Will be called after recording an attestation\\n * @param attestations Recorded attestations\\n */\\n function _afterRecordAttestations(Attestation[] memory attestations) internal virtual {}\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called before deleting attestations from the registry\\n * @param attestations Attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n */\\n function _beforeDeleteAttestations(Attestation[] memory attestations, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called after deleting attestations from the registry\\n * @param attestations Attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n */\\n function _afterDeleteAttestations(Attestation[] memory attestations, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n}\\n\",\"keccak256\":\"0x37683c6752d4dc911459084eb191c1045f3bf34e2143f3db3d298a66c971a106\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttestationsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Attestation, AttestationData} from '../libs/Structs.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry {\\n event AttestationRecorded(Attestation attestation);\\n event AttestationDeleted(Attestation attestation);\\n\\n /**\\n * @dev Main function to be called by authorized issuers\\n * @param attestations Attestations to be recorded (creates a new one or overrides an existing one)\\n */\\n function recordAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Delete function to be called by authorized issuers\\n * @param attestations Attestations to be deleted\\n */\\n function deleteAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Returns whether a user has an attestation from a collection\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function hasAttestation(uint256 collectionId, address owner) external returns (bool);\\n\\n /**\\n * @dev Getter of the data of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationData(uint256 collectionId, address owner)\\n external\\n view\\n returns (AttestationData memory);\\n\\n /**\\n * @dev Getter of the value of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationValue(uint256 collectionId, address owner) external view returns (uint256);\\n\\n /**\\n * @dev Getter of the data of a specific attestation as tuple\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationDataTuple(uint256 collectionId, address owner)\\n external\\n view\\n returns (\\n address,\\n uint256,\\n uint32,\\n bytes memory\\n );\\n\\n /**\\n * @dev Getter of the extraData of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationExtraData(uint256 collectionId, address owner)\\n external\\n view\\n returns (bytes memory);\\n\\n /**\\n * @dev Getter of the issuer of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationIssuer(uint256 collectionId, address owner)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @dev Getter of the timestamp of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationTimestamp(uint256 collectionId, address owner)\\n external\\n view\\n returns (uint32);\\n\\n /**\\n * @dev Getter of the data of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationDataBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (AttestationData[] memory);\\n\\n /**\\n * @dev Getter of the values of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationValueBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xb5e25bd7e0372c9973e582fb7fe96318c145831a5452d8c79eb848a7464b0297\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Request, Attestation} from '../libs/Structs.sol';\\nimport {IAttestationsRegistry} from '../interfaces/IAttestationsRegistry.sol';\\n\\n/**\\n * @title IAttester\\n * @author Sismo\\n * @notice This is the interface for the attesters in Sismo Protocol\\n */\\ninterface IAttester {\\n event AttestationGenerated(Attestation attestation);\\n\\n event AttestationDeleted(Attestation attestation);\\n\\n error AttestationDeletionNotImplemented();\\n\\n /**\\n * @dev Main external function. Allows to generate attestations by making a request and submitting proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that has been recorded\\n */\\n function generateAttestations(Request calldata request, bytes calldata proofData)\\n external\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev External facing function. Allows to delete an attestation by submitting proof\\n * @param collectionIds Collection identifier of attestations to delete\\n * @param attestationsOwner Owner of attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n * @return attestations Attestations that was deleted\\n */\\n function deleteAttestations(\\n uint256[] calldata collectionIds,\\n address attestationsOwner,\\n bytes calldata proofData\\n ) external returns (Attestation[] memory);\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should build attestations from the user request and the proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(Request calldata request, bytes calldata proofData)\\n external\\n view\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev Attestation registry address getter\\n * @return attestationRegistry Address of the registry\\n */\\n function getAttestationRegistry() external view returns (IAttestationsRegistry);\\n}\\n\",\"keccak256\":\"0xafe9c1a742d7570033c8d74cee203e09ee9b7461eaed6d2ca77697449e2ce95d\",\"license\":\"MIT\"},\"contracts/core/libs/Structs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title Attestations Registry State\\n * @author Sismo\\n * @notice This contract holds all of the storage variables and data\\n * structures used by the AttestationsRegistry and parent\\n * contracts.\\n */\\n\\n// User Attestation Request, can be made by any user\\n// The context of an Attestation Request is a specific attester contract\\n// Each attester has groups of accounts in its available data\\n// eg: for a specific attester:\\n// group 1 <=> accounts that sent txs on mainnet\\n// group 2 <=> accounts that sent txs on polygon\\n// eg: for another attester:\\n// group 1 <=> accounts that sent eth txs in 2022\\n// group 2 <=> accounts sent eth txs in 2021\\nstruct Request {\\n // implicit address attester;\\n // implicit uint256 chainId;\\n Claim[] claims;\\n address destination; // destination that will receive the end attestation\\n}\\n\\nstruct Claim {\\n uint256 groupId; // user claims to have an account in this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n bytes extraData; // arbitrary data, may be required by the attester to verify claims or generate a specific attestation\\n}\\n\\n/**\\n * @dev Attestation Struct. This is the struct receive as argument by the Attestation Registry.\\n * @param collectionId Attestation collection\\n * @param owner Attestation collection\\n * @param issuer Attestation collection\\n * @param value Attestation collection\\n * @param timestamp Attestation collection\\n * @param extraData Attestation collection\\n */\\nstruct Attestation {\\n // implicit uint256 chainId;\\n uint256 collectionId; // Id of the attestation collection (in the registry)\\n address owner; // Owner of the attestation\\n address issuer; // Contract that created or last updated the record.\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Timestamp chosen by the attester, should correspond to the effective date of the attestation\\n // it is different from the recording timestamp (date when the attestation was recorded)\\n // e.g a proof of NFT ownership may have be recorded today which is 2 month old data.\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\\n// Attestation Data, stored in the registry\\n// The context is a specific owner of a specific collection\\nstruct AttestationData {\\n // implicit uint256 chainId\\n // implicit uint256 collectionId - from context\\n // implicit owner\\n address issuer; // Address of the contract that recorded the attestation\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Effective date of issuance of the attestation. (can be different from the recording timestamp)\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\",\"keccak256\":\"0x893d9a10429878dd4077388ff4da954c20b86a3c172a7bbdd10a01eb5d39b6a0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b50604051620022ca380380620022ca8339810160408190526200003591620002b6565b6001600160a01b03838116608052861660a052620000533362000075565b60c085905260e0849052620000698282620000d0565b505050505050620003b7565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054610100900460ff16620000ed5760005460ff1615620000f7565b620000f7620001b0565b6200015f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801562000182576000805461ffff19166101011790555b6200018d8262000075565b6200019883620001ce565b8015620001ab576000805461ff00191690555b505050565b6000620001c8306200021a60201b620009ca1760201c565b15905090565b620001dd600182600262000229565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df816040516200020f919062000384565b60405180910390a150565b6001600160a01b03163b151590565b82600281019282156200025a579160200282015b828111156200025a5782518255916020019190600101906200023d565b50620002689291506200026c565b5090565b5b808211156200026857600081556001016200026d565b80516001600160a01b03811681146200029b57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060e08789031215620002d057600080fd5b620002db8762000283565b9550602080880151955060408801519450620002fa6060890162000283565b935088609f8901126200030c57600080fd5b604080519081016001600160401b0381118282101715620003315762000331620002a0565b6040528060c08a018b8111156200034757600080fd5b60808b015b818110156200036557805183529184019184016200034c565b50829550620003748162000283565b9450505050509295509295509295565b60408101818360005b6002811015620003ae5781518352602092830192909101906001016200038d565b50505092915050565b60805160a05160c05160e051611eaf6200041b600039600081816101a9015261040901526000818161016101526103e101526000818161020c015281816104ec01528181610663015261084d0152600081816101240152610f810152611eaf6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063c776adde11610066578063c776adde14610230578063c9cdef0414610243578063e60f999f14610256578063f2fde38b1461026957600080fd5b80638da5cb5b146101d3578063af411a30146101ea578063bfa665851461020a57600080fd5b806354846d7a116100c857806354846d7a1461015c57806363e4afc2146101915780637000b051146101a4578063715018a6146101cb57600080fd5b8063124d7199146100ef5780632785e3221461010457806346657fe914610122575b600080fd5b6101026100fd3660046114ac565b61027c565b005b61010c6102c2565b60405161011991906114eb565b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610119565b6101837f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610119565b61014461019f3660046114f9565b6102d7565b6101837f000000000000000000000000000000000000000000000000000000000000000081565b6101026102f6565b6000546201000090046001600160a01b0316610144565b6101fd6101f836600461155a565b610333565b6040516101199190611685565b7f0000000000000000000000000000000000000000000000000000000000000000610144565b6101fd61023e36600461170c565b6104d6565b6101026102513660046117bd565b610742565b6101fd61026436600461155a565b61080f565b6101026102773660046117f5565b61092b565b6000546001600160a01b03620100009091041633146102b65760405162461bcd60e51b81526004016102ad90611812565b60405180910390fd5b6102bf816109d9565b50565b6102ca6112f1565b6102d2610a21565b905090565b6000818152600360205260408120546001600160a01b03165b92915050565b6000546001600160a01b03620100009091041633146103275760405162461bcd60e51b81526004016102ad90611812565b6103316000610a5b565b565b606060006103486103438661186e565b610ab6565b60408051600180825281830190925291925060009190816020015b6103b46040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b815260200190600190039081610363575050606083015151909150600090610405906001600160801b03167f00000000000000000000000000000000000000000000000000000000000000006119fd565b90507f000000000000000000000000000000000000000000000000000000000000000081111561044b57604051637bbf29e360e01b8152600481018290526024016102ad565b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b03168152602001856020015181526020014263ffffffff16815260200160405180602001604052806000815250815250836000815181106104bf576104bf611a15565b602090810291909101015250909695505050505050565b60608060005b86811015610640576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78d8d8881811061052b5761052b611a15565b905060200201358c6040518363ffffffff1660e01b81526004016105629291909182526001600160a01b0316602082015260400190565b600060405180830381865afa15801561057f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105a79190810190611a2b565b93509350935093506040518060c001604052808d8d888181106105cc576105cc611a15565b9050602002013581526020018b6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061061e5761061e611a15565b602002602001018190525050505050808061063890611ae6565b9150506104dc565b5061064c818585610b6a565b6040516373e4ca1b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e7c9943690610698908490600401611685565b600060405180830381600087803b1580156106b257600080fd5b505af11580156106c6573d6000803e3d6000fd5b5050505060005b86811015610737577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061070857610708611a15565b602002602001015160405161071d9190611aff565b60405180910390a18061072f81611ae6565b9150506106cd565b509695505050505050565b600054610100900460ff1661075d5760005460ff1615610761565b303b155b6107c45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102ad565b600054610100900460ff161580156107e6576000805461ffff19166101011790555b6107ef82610a5b565b6107f8836109d9565b801561080a576000805461ff00191690555b505050565b606061081c848484610b83565b6000610829858585610333565b9050610836858585610bcb565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c09390610882908490600401611685565b600060405180830381600087803b15801561089c57600080fd5b505af11580156108b0573d6000803e3d6000fd5b5050505060005b8151811015610922577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc8282815181106108f3576108f3611a15565b60200260200101516040516109089190611aff565b60405180910390a18061091a81611ae6565b9150506108b7565b50949350505050565b6000546001600160a01b036201000090910416331461095c5760405162461bcd60e51b81526004016102ad90611812565b6001600160a01b0381166109c15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ad565b6102bf81610a5b565b6001600160a01b03163b151590565b6109e6600182600261130f565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df81604051610a1691906114eb565b60405180910390a150565b610a296112f1565b60408051808201918290529060019060029082845b815481526020019060010190808311610a3e575050505050905090565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b610aed6040805160808101825260008082526020808301829052828401829052835180850190945281845283015290606082015290565b60008260000151600081518110610b0657610b06611a15565b60200260200101519050610b1981610c34565b60008160400151806020019051810190610b339190611b22565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610b9182840184611bec565b90506000610b9e82610c78565b90506000610bae6103438761186e565b9050610bba8183610d14565b610bc383610f57565b505050505050565b6000610bd783836110f0565b6000818152600360205260409020549091506001600160a01b03168015610c1457604051631f5d53e360e01b8152600481018390526024016102ad565b610c2d82610c2860408801602089016117f5565b611115565b5050505050565b6000610c43826040015161117b565b82519091508114610c745781516040516337e3d1ab60e01b81526102ad918391600401918252602082015260400190565b5050565b610c80611352565b604051806101000160405280610c95846111b0565b6001600160a01b03168152602001610cac846111c5565b8152602001610cba846111d4565b8152602001610cc8846111e3565b8152602001610cd6846111f2565b8152602001610ce484611201565b8152602001610cfc8460200151610100015160011490565b15158152602001610d0c84611210565b905292915050565b8151604082015114610d4957815160408281015190516347a9715d60e01b8152600481019290925260248201526044016102ad565b81606001516020015115158160c00151151503610d925760608201516020015160c0820151604051634629f1b560e11b81529115156004830152151560248201526044016102ad565b81604001516001600160a01b031681600001516001600160a01b031614610de657604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016102ad565b60408201516001600160a01b03163314610e2a576040808301519051632bfa317f60e11b81523360048201526001600160a01b0390911660248201526044016102ad565b46816020015114610e5d576020810151604051630432cec160e31b815246600482015260248101919091526044016102ad565b81602001518160a0015114610e9857602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016102ad565b6000610ea2610a21565b805160e084015151919250141580610ec7575060208082015160e08401519091015114155b15610f1057805160208083015160e0850151805192015160405163f71cb0f760e01b815260048101949094526024840191909152604483019190915260648201526084016102ad565b6000610f1b84611268565b905080836060015114610f515760608301516040516377bb6d2760e11b81526102ad918391600401918252602082015260400190565b50505050565b8051805160208083015160409384015191850151935163c542c93b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463c542c93b94610fba94909392909190600401611cbd565b602060405180830381865afa925050508015610ff3575060408051601f3d908101601f19168201909252610ff091810190611d64565b60015b6110c957610fff611d7f565b806308c379a0036110385750611013611d9b565b8061101e5750611077565b8060405162dd577760e81b81526004016102ad9190611e24565b634e487b71036110775761104a611e37565b906110555750611077565b60405162dd577760e81b815260206004820152600060248201526044016102ad565b3d8080156110a1576040519150601f19603f3d011682016040523d82523d6000602084013e6110a6565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016102ad565b80610c745760405162dd577760e81b815260206004820152600060248201526044016102ad565b6000806110ff83850185611bec565b9050600061110c826111f2565b95945050505050565b60008281526003602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b805160208201206000906102f0907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190611e57565b6020810151600090815b602002015192915050565b602081015160009060016111ba565b602081015160009060046111ba565b602081015160009060056111ba565b602081015160009060066111ba565b602081015160009060076111ba565b6112186112f1565b6040518060400160405280836020015160026009811061123a5761123a611a15565b60200201518152602001836020015160036009811061125b5761125b611a15565b6020020151905292915050565b600080611286308460600151600001516001600160801b031661128d565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6112869190611e57565b60405180604001604052806002906020820280368337509192915050565b826002810192821561133d579160200282015b8281111561133d578251825591602001919060010190611322565b506113499291506113a2565b5090565b905290565b60405180610100016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200161134d6112f1565b5b8082111561134957600081556001016113a3565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b03821117156113ec576113ec6113b7565b60405250565b606081018181106001600160401b03821117156113ec576113ec6113b7565b601f8201601f191681016001600160401b0381118282101715611436576114366113b7565b6040525050565b600082601f83011261144e57600080fd5b604051604081018181106001600160401b0382111715611470576114706113b7565b806040525080604084018581111561148757600080fd5b845b818110156114a1578035835260209283019201611489565b509195945050505050565b6000604082840312156114be57600080fd5b611286838361143d565b8060005b6002811015610f515781518452602093840193909101906001016114cc565b604081016102f082846114c8565b60006020828403121561150b57600080fd5b5035919050565b60008083601f84011261152457600080fd5b5081356001600160401b0381111561153b57600080fd5b60208301915083602082850101111561155357600080fd5b9250929050565b60008060006040848603121561156f57600080fd5b83356001600160401b038082111561158657600080fd5b908501906040828803121561159a57600080fd5b909350602085013590808211156115b057600080fd5b506115bd86828701611512565b9497909650939450505050565b60005b838110156115e55781810151838201526020016115cd565b83811115610f515750506000910152565b6000815180845261160e8160208601602086016115ca565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261167d60c08501826115f6565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156116da57603f198886030184526116c8858351611622565b945092850192908501906001016116ac565b5092979650505050505050565b6001600160a01b03811681146102bf57600080fd5b8035611707816116e7565b919050565b60008060008060006060868803121561172457600080fd5b85356001600160401b038082111561173b57600080fd5b818801915088601f83011261174f57600080fd5b81358181111561175e57600080fd5b8960208260051b850101111561177357600080fd5b60208301975080965050611789602089016116fc565b9450604088013591508082111561179f57600080fd5b506117ac88828901611512565b969995985093965092949392505050565b600080606083850312156117d057600080fd5b6117da848461143d565b915060408301356117ea816116e7565b809150509250929050565b60006020828403121561180757600080fd5b8135611286816116e7565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006001600160401b03821115611860576118606113b7565b50601f01601f191660200190565b6000604080833603121561188157600080fd5b805161188c816113cd565b83356001600160401b03808211156118a357600080fd5b9085019036601f8301126118b657600080fd5b81356020828211156118ca576118ca6113b7565b8160051b86516118dc83830182611411565b928352848101820192828101368511156118f557600080fd5b83870192505b848310156119c9578235868111156119135760008081fd5b8701606036829003601f190181131561192c5760008081fd5b8a51611937816113f2565b8287013581528b830135818801529082013590888211156119585760008081fd5b9181019136603f84011261196e57600091508182fd5b86830135915061197d82611847565b8c516119898282611411565b838152368e8587010111156119a057600091508182fd5b838e86018a830137600093810189019390935250808c01919091528252509183019183016118fb565b508652506119d88882016116fc565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611a1057611a106119e7565b500190565b634e487b7160e01b600052603260045260246000fd5b60008060008060808587031215611a4157600080fd5b8451611a4c816116e7565b60208601516040870151919550935063ffffffff81168114611a6d57600080fd5b60608601519092506001600160401b03811115611a8957600080fd5b8501601f81018713611a9a57600080fd5b8051611aa581611847565b604051611ab28282611411565b828152896020848601011115611ac757600080fd5b611ad88360208301602087016115ca565b969995985093965050505050565b600060018201611af857611af86119e7565b5060010190565b6020815260006112866020830184611622565b8051801515811461170757600080fd5b600060408284031215611b3457600080fd5b604051604081018181106001600160401b0382111715611b5657611b566113b7565b60405282516001600160801b0381168114611b7057600080fd5b8152611b7e60208401611b12565b60208201529392505050565b600082601f830112611b9b57600080fd5b6040516101208082018281106001600160401b0382111715611bbf57611bbf6113b7565b60405283018185821115611bd257600080fd5b845b828110156114a1578035825260209182019101611bd4565b6000818303610220811215611c0057600080fd5b60408051611c0d816113cd565b61010080841215611c1d57600080fd5b82519350611c2a846113f2565b611c34878761143d565b845286605f870112611c4557600080fd5b8251611c50816113cd565b8060c0880189811115611c6257600080fd5b8589015b81811015611c8757611c788b8261143d565b83526020909201918601611c66565b50826020880152611c988a8261143d565b86880152505050838252611cae87828801611b8a565b60208301525095945050505050565b6102208101611ccc82876114c8565b60408083018660005b6002808210611ce45750611d1f565b82518460005b83811015611d08578251825260209283019290910190600101611cea565b505050928401925060209190910190600101611cd5565b50505050611d3060c08301856114c8565b61010082018360005b6009811015611d58578151835260209283019290910190600101611d39565b50505095945050505050565b600060208284031215611d7657600080fd5b61128682611b12565b600060033d1115611d985760046000803e5060005160e01c5b90565b600060443d1015611da95790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715611dd857505050505090565b8285019150815181811115611df05750505050505090565b843d8701016020828501011115611e0a5750505050505090565b611e1960208286010187611411565b509095945050505050565b60208152600061128660208301846115f6565b60008060233d1115611e53576020600460003e50506000516001905b9091565b600082611e7457634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220f99c2aea826755ba5e1a8e62436347bc7b71c757c34e94a9193c561d9672999164736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063c776adde11610066578063c776adde14610230578063c9cdef0414610243578063e60f999f14610256578063f2fde38b1461026957600080fd5b80638da5cb5b146101d3578063af411a30146101ea578063bfa665851461020a57600080fd5b806354846d7a116100c857806354846d7a1461015c57806363e4afc2146101915780637000b051146101a4578063715018a6146101cb57600080fd5b8063124d7199146100ef5780632785e3221461010457806346657fe914610122575b600080fd5b6101026100fd3660046114ac565b61027c565b005b61010c6102c2565b60405161011991906114eb565b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610119565b6101837f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610119565b61014461019f3660046114f9565b6102d7565b6101837f000000000000000000000000000000000000000000000000000000000000000081565b6101026102f6565b6000546201000090046001600160a01b0316610144565b6101fd6101f836600461155a565b610333565b6040516101199190611685565b7f0000000000000000000000000000000000000000000000000000000000000000610144565b6101fd61023e36600461170c565b6104d6565b6101026102513660046117bd565b610742565b6101fd61026436600461155a565b61080f565b6101026102773660046117f5565b61092b565b6000546001600160a01b03620100009091041633146102b65760405162461bcd60e51b81526004016102ad90611812565b60405180910390fd5b6102bf816109d9565b50565b6102ca6112f1565b6102d2610a21565b905090565b6000818152600360205260408120546001600160a01b03165b92915050565b6000546001600160a01b03620100009091041633146103275760405162461bcd60e51b81526004016102ad90611812565b6103316000610a5b565b565b606060006103486103438661186e565b610ab6565b60408051600180825281830190925291925060009190816020015b6103b46040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b815260200190600190039081610363575050606083015151909150600090610405906001600160801b03167f00000000000000000000000000000000000000000000000000000000000000006119fd565b90507f000000000000000000000000000000000000000000000000000000000000000081111561044b57604051637bbf29e360e01b8152600481018290526024016102ad565b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b03168152602001856020015181526020014263ffffffff16815260200160405180602001604052806000815250815250836000815181106104bf576104bf611a15565b602090810291909101015250909695505050505050565b60608060005b86811015610640576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78d8d8881811061052b5761052b611a15565b905060200201358c6040518363ffffffff1660e01b81526004016105629291909182526001600160a01b0316602082015260400190565b600060405180830381865afa15801561057f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105a79190810190611a2b565b93509350935093506040518060c001604052808d8d888181106105cc576105cc611a15565b9050602002013581526020018b6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061061e5761061e611a15565b602002602001018190525050505050808061063890611ae6565b9150506104dc565b5061064c818585610b6a565b6040516373e4ca1b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e7c9943690610698908490600401611685565b600060405180830381600087803b1580156106b257600080fd5b505af11580156106c6573d6000803e3d6000fd5b5050505060005b86811015610737577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061070857610708611a15565b602002602001015160405161071d9190611aff565b60405180910390a18061072f81611ae6565b9150506106cd565b509695505050505050565b600054610100900460ff1661075d5760005460ff1615610761565b303b155b6107c45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102ad565b600054610100900460ff161580156107e6576000805461ffff19166101011790555b6107ef82610a5b565b6107f8836109d9565b801561080a576000805461ff00191690555b505050565b606061081c848484610b83565b6000610829858585610333565b9050610836858585610bcb565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c09390610882908490600401611685565b600060405180830381600087803b15801561089c57600080fd5b505af11580156108b0573d6000803e3d6000fd5b5050505060005b8151811015610922577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc8282815181106108f3576108f3611a15565b60200260200101516040516109089190611aff565b60405180910390a18061091a81611ae6565b9150506108b7565b50949350505050565b6000546001600160a01b036201000090910416331461095c5760405162461bcd60e51b81526004016102ad90611812565b6001600160a01b0381166109c15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ad565b6102bf81610a5b565b6001600160a01b03163b151590565b6109e6600182600261130f565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df81604051610a1691906114eb565b60405180910390a150565b610a296112f1565b60408051808201918290529060019060029082845b815481526020019060010190808311610a3e575050505050905090565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b610aed6040805160808101825260008082526020808301829052828401829052835180850190945281845283015290606082015290565b60008260000151600081518110610b0657610b06611a15565b60200260200101519050610b1981610c34565b60008160400151806020019051810190610b339190611b22565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610b9182840184611bec565b90506000610b9e82610c78565b90506000610bae6103438761186e565b9050610bba8183610d14565b610bc383610f57565b505050505050565b6000610bd783836110f0565b6000818152600360205260409020549091506001600160a01b03168015610c1457604051631f5d53e360e01b8152600481018390526024016102ad565b610c2d82610c2860408801602089016117f5565b611115565b5050505050565b6000610c43826040015161117b565b82519091508114610c745781516040516337e3d1ab60e01b81526102ad918391600401918252602082015260400190565b5050565b610c80611352565b604051806101000160405280610c95846111b0565b6001600160a01b03168152602001610cac846111c5565b8152602001610cba846111d4565b8152602001610cc8846111e3565b8152602001610cd6846111f2565b8152602001610ce484611201565b8152602001610cfc8460200151610100015160011490565b15158152602001610d0c84611210565b905292915050565b8151604082015114610d4957815160408281015190516347a9715d60e01b8152600481019290925260248201526044016102ad565b81606001516020015115158160c00151151503610d925760608201516020015160c0820151604051634629f1b560e11b81529115156004830152151560248201526044016102ad565b81604001516001600160a01b031681600001516001600160a01b031614610de657604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016102ad565b60408201516001600160a01b03163314610e2a576040808301519051632bfa317f60e11b81523360048201526001600160a01b0390911660248201526044016102ad565b46816020015114610e5d576020810151604051630432cec160e31b815246600482015260248101919091526044016102ad565b81602001518160a0015114610e9857602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016102ad565b6000610ea2610a21565b805160e084015151919250141580610ec7575060208082015160e08401519091015114155b15610f1057805160208083015160e0850151805192015160405163f71cb0f760e01b815260048101949094526024840191909152604483019190915260648201526084016102ad565b6000610f1b84611268565b905080836060015114610f515760608301516040516377bb6d2760e11b81526102ad918391600401918252602082015260400190565b50505050565b8051805160208083015160409384015191850151935163c542c93b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463c542c93b94610fba94909392909190600401611cbd565b602060405180830381865afa925050508015610ff3575060408051601f3d908101601f19168201909252610ff091810190611d64565b60015b6110c957610fff611d7f565b806308c379a0036110385750611013611d9b565b8061101e5750611077565b8060405162dd577760e81b81526004016102ad9190611e24565b634e487b71036110775761104a611e37565b906110555750611077565b60405162dd577760e81b815260206004820152600060248201526044016102ad565b3d8080156110a1576040519150601f19603f3d011682016040523d82523d6000602084013e6110a6565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016102ad565b80610c745760405162dd577760e81b815260206004820152600060248201526044016102ad565b6000806110ff83850185611bec565b9050600061110c826111f2565b95945050505050565b60008281526003602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b805160208201206000906102f0907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190611e57565b6020810151600090815b602002015192915050565b602081015160009060016111ba565b602081015160009060046111ba565b602081015160009060056111ba565b602081015160009060066111ba565b602081015160009060076111ba565b6112186112f1565b6040518060400160405280836020015160026009811061123a5761123a611a15565b60200201518152602001836020015160036009811061125b5761125b611a15565b6020020151905292915050565b600080611286308460600151600001516001600160801b031661128d565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6112869190611e57565b60405180604001604052806002906020820280368337509192915050565b826002810192821561133d579160200282015b8281111561133d578251825591602001919060010190611322565b506113499291506113a2565b5090565b905290565b60405180610100016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200161134d6112f1565b5b8082111561134957600081556001016113a3565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b03821117156113ec576113ec6113b7565b60405250565b606081018181106001600160401b03821117156113ec576113ec6113b7565b601f8201601f191681016001600160401b0381118282101715611436576114366113b7565b6040525050565b600082601f83011261144e57600080fd5b604051604081018181106001600160401b0382111715611470576114706113b7565b806040525080604084018581111561148757600080fd5b845b818110156114a1578035835260209283019201611489565b509195945050505050565b6000604082840312156114be57600080fd5b611286838361143d565b8060005b6002811015610f515781518452602093840193909101906001016114cc565b604081016102f082846114c8565b60006020828403121561150b57600080fd5b5035919050565b60008083601f84011261152457600080fd5b5081356001600160401b0381111561153b57600080fd5b60208301915083602082850101111561155357600080fd5b9250929050565b60008060006040848603121561156f57600080fd5b83356001600160401b038082111561158657600080fd5b908501906040828803121561159a57600080fd5b909350602085013590808211156115b057600080fd5b506115bd86828701611512565b9497909650939450505050565b60005b838110156115e55781810151838201526020016115cd565b83811115610f515750506000910152565b6000815180845261160e8160208601602086016115ca565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261167d60c08501826115f6565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156116da57603f198886030184526116c8858351611622565b945092850192908501906001016116ac565b5092979650505050505050565b6001600160a01b03811681146102bf57600080fd5b8035611707816116e7565b919050565b60008060008060006060868803121561172457600080fd5b85356001600160401b038082111561173b57600080fd5b818801915088601f83011261174f57600080fd5b81358181111561175e57600080fd5b8960208260051b850101111561177357600080fd5b60208301975080965050611789602089016116fc565b9450604088013591508082111561179f57600080fd5b506117ac88828901611512565b969995985093965092949392505050565b600080606083850312156117d057600080fd5b6117da848461143d565b915060408301356117ea816116e7565b809150509250929050565b60006020828403121561180757600080fd5b8135611286816116e7565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006001600160401b03821115611860576118606113b7565b50601f01601f191660200190565b6000604080833603121561188157600080fd5b805161188c816113cd565b83356001600160401b03808211156118a357600080fd5b9085019036601f8301126118b657600080fd5b81356020828211156118ca576118ca6113b7565b8160051b86516118dc83830182611411565b928352848101820192828101368511156118f557600080fd5b83870192505b848310156119c9578235868111156119135760008081fd5b8701606036829003601f190181131561192c5760008081fd5b8a51611937816113f2565b8287013581528b830135818801529082013590888211156119585760008081fd5b9181019136603f84011261196e57600091508182fd5b86830135915061197d82611847565b8c516119898282611411565b838152368e8587010111156119a057600091508182fd5b838e86018a830137600093810189019390935250808c01919091528252509183019183016118fb565b508652506119d88882016116fc565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611a1057611a106119e7565b500190565b634e487b7160e01b600052603260045260246000fd5b60008060008060808587031215611a4157600080fd5b8451611a4c816116e7565b60208601516040870151919550935063ffffffff81168114611a6d57600080fd5b60608601519092506001600160401b03811115611a8957600080fd5b8501601f81018713611a9a57600080fd5b8051611aa581611847565b604051611ab28282611411565b828152896020848601011115611ac757600080fd5b611ad88360208301602087016115ca565b969995985093965050505050565b600060018201611af857611af86119e7565b5060010190565b6020815260006112866020830184611622565b8051801515811461170757600080fd5b600060408284031215611b3457600080fd5b604051604081018181106001600160401b0382111715611b5657611b566113b7565b60405282516001600160801b0381168114611b7057600080fd5b8152611b7e60208401611b12565b60208201529392505050565b600082601f830112611b9b57600080fd5b6040516101208082018281106001600160401b0382111715611bbf57611bbf6113b7565b60405283018185821115611bd257600080fd5b845b828110156114a1578035825260209182019101611bd4565b6000818303610220811215611c0057600080fd5b60408051611c0d816113cd565b61010080841215611c1d57600080fd5b82519350611c2a846113f2565b611c34878761143d565b845286605f870112611c4557600080fd5b8251611c50816113cd565b8060c0880189811115611c6257600080fd5b8589015b81811015611c8757611c788b8261143d565b83526020909201918601611c66565b50826020880152611c988a8261143d565b86880152505050838252611cae87828801611b8a565b60208301525095945050505050565b6102208101611ccc82876114c8565b60408083018660005b6002808210611ce45750611d1f565b82518460005b83811015611d08578251825260209283019290910190600101611cea565b505050928401925060209190910190600101611cd5565b50505050611d3060c08301856114c8565b61010082018360005b6009811015611d58578151835260209283019290910190600101611d39565b50505095945050505050565b600060208284031215611d7657600080fd5b61128682611b12565b600060033d1115611d985760046000803e5060005160e01c5b90565b600060443d1015611da95790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715611dd857505050505090565b8285019150815181811115611df05750505050505090565b843d8701016020828501011115611e0a5750505050505090565b611e1960208286010187611411565b509095945050505050565b60208152600061128660208301846115f6565b60008060233d1115611e53576020600460003e50506000516001905b9091565b600082611e7457634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220f99c2aea826755ba5e1a8e62436347bc7b71c757c34e94a9193c561d9672999164736f6c634300080e0033", + "devdoc": { + "author": "Sismo", + "kind": "dev", + "methods": { + "buildAttestations(((uint256,uint256,bytes)[],address),bytes)": { + "details": "Returns attestations that will be recorded, constructed from the user request", + "params": { + "request": "users request. Claim of having an account part of a group of accounts" + } + }, + "constructor": { + "details": "Constructor. Initializes the contract", + "params": { + "attestationsRegistryAddress": "Attestations Registry contract on which the attester will write attestations", + "collectionIdFirst": "Id of the first collection in which the attester is supposed to record", + "collectionIdLast": "Id of the last collection in which the attester is supposed to record", + "commitmentSignerPubKey": "The EdDSA public key of the commitment signer for the Pythia 1 Proving Scheme", + "owner": "The owner of the contract that can update the commitment signer pub key", + "pythia1VerifierAddress": "ZK Snark Pythia-1 Verifier contract" + } + }, + "deleteAttestations(uint256[],address,bytes)": { + "details": "External facing function. Allows to delete attestations by submitting proof", + "params": { + "attestationsOwner": "Owner of attestations to delete", + "collectionIds": "Collection identifier of attestations to delete", + "proofData": "Data sent along the deletion request to prove its validity" + }, + "returns": { + "_0": "attestations Attestations that were deleted" + } + }, + "generateAttestations(((uint256,uint256,bytes)[],address),bytes)": { + "details": "Main external function. Allows to generate attestations by making a request and submitting proof", + "params": { + "proofData": "Data sent along the request to prove its validity", + "request": "User request" + }, + "returns": { + "_0": "attestations Attestations that has been recorded" + } + }, + "getAttestationRegistry()": { + "details": "Attestation registry getter", + "returns": { + "_0": "attestationRegistry" + } + }, + "getCommitmentSignerPubKey()": { + "details": "Getter of the Commitment signer Eddsa Public key" + }, + "getDestinationOfTicket(uint256)": { + "details": "Getter, returns the last attestation destination of a ticket", + "params": { + "userTicket": "ticket used*" + } + }, + "getVerifier()": { + "details": "Getter of Pythia-1 Verifier contract" + }, + "initialize(uint256[2],address)": { + "details": "Initializes the contract, to be called by the proxy delegating calls to this implementation", + "params": { + "commitmentSignerPubKey": "EdDSA public key of the commitment signer", + "owner": "Owner of the contract, can update public key and address" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "stateVariables": { + "AUTHORIZED_COLLECTION_ID_FIRST": { + "details": "Getter returns of the first collection in which the attester is supposed to record*" + }, + "AUTHORIZED_COLLECTION_ID_LAST": { + "details": "Getter returns of the last collection in which the attester is supposed to record*" + } + }, + "title": "Pythia-1 Simple Attester", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "This attester is part of the family of the Pythia-1 Attesters. Pythia-1 attesters enable users to prove they have a claim and its proof issued by an offchain service in a privacy preserving way. That means no-one can make the link between the account used in the offchain service and the onchain account where the attestation is stored. The Pythia-1 Base abstract contract is inherited and holds the complex Pythia 1 verification logic. We invite readers to refer to: - https://pythia-1.docs.sismo.io for a full guide through the Pythia-1 ZK Attestations - https://pythia-1-circuits.docs.sismo.io for circuits, prover and verifiers of Pythia-1 This specific attester has the following characteristics: - Zero Knowledge One cannot deduct from an attestation what offchain issuer's account was used to generate the underlying proof - Non Strict (scores) If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100. This attester generate attestations of scores - Ticketed Each users gets one userTicket per claim For people used to semaphore/ tornado cash people: userTicket = hash(secret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier)*", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 936, + "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 939, + "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 389, + "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", + "label": "_owner", + "offset": 2, + "slot": "0", + "type": "t_address" + }, + { + "astId": 8268, + "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", + "label": "_commitmentSignerPubKey", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)2_storage" + }, + { + "astId": 8272, + "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", + "label": "_ticketsDestinations", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)2_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[2]", + "numberOfBytes": "64" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/Pythia1SimpleAttesterImplem.json b/deployments/mumbai/Pythia1SimpleAttesterImplem.json new file mode 100644 index 0000000..183b6be --- /dev/null +++ b/deployments/mumbai/Pythia1SimpleAttesterImplem.json @@ -0,0 +1,1009 @@ +{ + "address": "0x7D4358593d1F3e8202d7d3a7f3Fa9e97a61b464E", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "attestationsRegistryAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "collectionIdFirst", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collectionIdLast", + "type": "uint256" + }, + { + "internalType": "address", + "name": "pythia1VerifierAddress", + "type": "address" + }, + { + "internalType": "uint256[2]", + "name": "commitmentSignerPubKey", + "type": "uint256[2]" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AttestationDeletionNotImplemented", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + } + ], + "name": "ChainIdMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + } + ], + "name": "CollectionIdOutOfBound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedX", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedY", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputX", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputY", + "type": "uint256" + } + ], + "name": "CommitmentSignerPubKeyMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expectedDestination", + "type": "address" + }, + { + "internalType": "address", + "name": "inputDestination", + "type": "address" + } + ], + "name": "DestinationMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedGroupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + } + ], + "name": "GroupIdAndPropertiesMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedAccountsTreeValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputAccountsTreeValue", + "type": "uint256" + } + ], + "name": "GroupIdMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "InvalidGroth16Proof", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "expectedStrictness", + "type": "bool" + }, + { + "internalType": "bool", + "name": "strictNess", + "type": "bool" + } + ], + "name": "IsStrictMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedTicketIdentifier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ticketIdentifier", + "type": "uint256" + } + ], + "name": "TicketIdentifierMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "userTicket", + "type": "uint256" + } + ], + "name": "TicketUsed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "inputdestination", + "type": "address" + } + ], + "name": "UserShouldOwnItsDestination", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedValue", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "inputValue", + "type": "uint256" + } + ], + "name": "ValueMismatch", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct Attestation", + "name": "attestation", + "type": "tuple" + } + ], + "name": "AttestationDeleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct Attestation", + "name": "attestation", + "type": "tuple" + } + ], + "name": "AttestationGenerated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256[2]", + "name": "newCommitmentSignerPubKey", + "type": "uint256[2]" + } + ], + "name": "CommitmentSignerPubKeyUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "ticket", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "TicketDestinationUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "AUTHORIZED_COLLECTION_ID_FIRST", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "AUTHORIZED_COLLECTION_ID_LAST", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "buildAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "collectionIds", + "type": "uint256[]" + }, + { + "internalType": "address", + "name": "attestationsOwner", + "type": "address" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "deleteAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "uint256", + "name": "groupId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Claim[]", + "name": "claims", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + } + ], + "internalType": "struct Request", + "name": "request", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "proofData", + "type": "bytes" + } + ], + "name": "generateAttestations", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "timestamp", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "internalType": "struct Attestation[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAttestationRegistry", + "outputs": [ + { + "internalType": "contract IAttestationsRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCommitmentSignerPubKey", + "outputs": [ + { + "internalType": "uint256[2]", + "name": "", + "type": "uint256[2]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "userTicket", + "type": "uint256" + } + ], + "name": "getDestinationOfTicket", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVerifier", + "outputs": [ + { + "internalType": "contract Pythia1Verifier", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[2]", + "name": "commitmentSignerPubKey", + "type": "uint256[2]" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[2]", + "name": "commitmentSignerPubKey", + "type": "uint256[2]" + } + ], + "name": "updateCommitmentSignerPubKey", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x7D4358593d1F3e8202d7d3a7f3Fa9e97a61b464E", + "transactionIndex": 7, + "gasUsed": "1836653", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800010000000000000000000000020000000000000000100008000000040000000000000000000000000000000000000000000000000800001000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000400000000000000000000000200000000000000010000000000000000000008000200000000000000000200000080000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000001020000000000000000000000000000000000000000200000000000020000000100000", + "blockHash": "0x8f8bb6a6cf5de842bd59356d89fa7381911dfb68626902fd5d969d435f9859f5", + "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", + "logs": [ + { + "transactionIndex": 7, + "blockNumber": 28600083, + "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", + "address": "0x7D4358593d1F3e8202d7d3a7f3Fa9e97a61b464E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 44, + "blockHash": "0x8f8bb6a6cf5de842bd59356d89fa7381911dfb68626902fd5d969d435f9859f5" + }, + { + "transactionIndex": 7, + "blockNumber": 28600083, + "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", + "address": "0x7D4358593d1F3e8202d7d3a7f3Fa9e97a61b464E", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 45, + "blockHash": "0x8f8bb6a6cf5de842bd59356d89fa7381911dfb68626902fd5d969d435f9859f5" + }, + { + "transactionIndex": 7, + "blockNumber": 28600083, + "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", + "address": "0x7D4358593d1F3e8202d7d3a7f3Fa9e97a61b464E", + "topics": [ + "0xda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df" + ], + "data": "0x038d3d596875c66eb90608bbe04e4e238607fd32ad61f4278bdaf47aadc28d601b46b55a0ce3f35d6025cdd4554aaac1fc7180b14d51b0f15aa51a6929bdb952", + "logIndex": 46, + "blockHash": "0x8f8bb6a6cf5de842bd59356d89fa7381911dfb68626902fd5d969d435f9859f5" + }, + { + "transactionIndex": 7, + "blockNumber": 28600083, + "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99" + ], + "data": "0x000000000000000000000000000000000000000000000000002025bbacd28c810000000000000000000000000000000000000000000000007fd7faf32f52f12c0000000000000000000000000000000000000000000007c52f89c3d5584a97d50000000000000000000000000000000000000000000000007fb7d537828064ab0000000000000000000000000000000000000000000007c52fa9e991051d2456", + "logIndex": 47, + "blockHash": "0x8f8bb6a6cf5de842bd59356d89fa7381911dfb68626902fd5d969d435f9859f5" + } + ], + "blockNumber": 28600083, + "cumulativeGasUsed": "3332715", + "status": 1, + "byzantium": true + }, + "args": [ + "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", + "30000001", + "30000100", + "0x115dFa344C877fF74e970F06BE10FF5A59EAba02", + [ + "0x038d3d596875c66eb90608bbe04e4e238607fd32ad61f4278bdaf47aadc28d60", + "0x1b46b55a0ce3f35d6025cdd4554aaac1fc7180b14d51b0f15aa51a6929bdb952" + ], + "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6" + ], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attestationsRegistryAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"collectionIdFirst\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"collectionIdLast\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"pythia1VerifierAddress\",\"type\":\"address\"},{\"internalType\":\"uint256[2]\",\"name\":\"commitmentSignerPubKey\",\"type\":\"uint256[2]\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AttestationDeletionNotImplemented\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedChainId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"}],\"name\":\"ChainIdMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"}],\"name\":\"CollectionIdOutOfBound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedX\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"expectedY\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputX\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputY\",\"type\":\"uint256\"}],\"name\":\"CommitmentSignerPubKeyMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"expectedDestination\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"inputDestination\",\"type\":\"address\"}],\"name\":\"DestinationMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedGroupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"}],\"name\":\"GroupIdAndPropertiesMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedAccountsTreeValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputAccountsTreeValue\",\"type\":\"uint256\"}],\"name\":\"GroupIdMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"reason\",\"type\":\"string\"}],\"name\":\"InvalidGroth16Proof\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"expectedStrictness\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"strictNess\",\"type\":\"bool\"}],\"name\":\"IsStrictMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedTicketIdentifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ticketIdentifier\",\"type\":\"uint256\"}],\"name\":\"TicketIdentifierMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"userTicket\",\"type\":\"uint256\"}],\"name\":\"TicketUsed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"inputdestination\",\"type\":\"address\"}],\"name\":\"UserShouldOwnItsDestination\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedValue\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"inputValue\",\"type\":\"uint256\"}],\"name\":\"ValueMismatch\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct Attestation\",\"name\":\"attestation\",\"type\":\"tuple\"}],\"name\":\"AttestationDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"indexed\":false,\"internalType\":\"struct Attestation\",\"name\":\"attestation\",\"type\":\"tuple\"}],\"name\":\"AttestationGenerated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256[2]\",\"name\":\"newCommitmentSignerPubKey\",\"type\":\"uint256[2]\"}],\"name\":\"CommitmentSignerPubKeyUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ticket\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"TicketDestinationUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"AUTHORIZED_COLLECTION_ID_FIRST\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"AUTHORIZED_COLLECTION_ID_LAST\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"buildAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"attestationsOwner\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"deleteAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"groupId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"claimedValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Claim[]\",\"name\":\"claims\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"internalType\":\"struct Request\",\"name\":\"request\",\"type\":\"tuple\"},{\"internalType\":\"bytes\",\"name\":\"proofData\",\"type\":\"bytes\"}],\"name\":\"generateAttestations\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"timestamp\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"internalType\":\"struct Attestation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAttestationRegistry\",\"outputs\":[{\"internalType\":\"contract IAttestationsRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCommitmentSignerPubKey\",\"outputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"\",\"type\":\"uint256[2]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"userTicket\",\"type\":\"uint256\"}],\"name\":\"getDestinationOfTicket\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVerifier\",\"outputs\":[{\"internalType\":\"contract Pythia1Verifier\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"commitmentSignerPubKey\",\"type\":\"uint256[2]\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"commitmentSignerPubKey\",\"type\":\"uint256[2]\"}],\"name\":\"updateCommitmentSignerPubKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"buildAttestations(((uint256,uint256,bytes)[],address),bytes)\":{\"details\":\"Returns attestations that will be recorded, constructed from the user request\",\"params\":{\"request\":\"users request. Claim of having an account part of a group of accounts\"}},\"constructor\":{\"details\":\"Constructor. Initializes the contract\",\"params\":{\"attestationsRegistryAddress\":\"Attestations Registry contract on which the attester will write attestations\",\"collectionIdFirst\":\"Id of the first collection in which the attester is supposed to record\",\"collectionIdLast\":\"Id of the last collection in which the attester is supposed to record\",\"commitmentSignerPubKey\":\"The EdDSA public key of the commitment signer for the Pythia 1 Proving Scheme\",\"owner\":\"The owner of the contract that can update the commitment signer pub key\",\"pythia1VerifierAddress\":\"ZK Snark Pythia-1 Verifier contract\"}},\"deleteAttestations(uint256[],address,bytes)\":{\"details\":\"External facing function. Allows to delete attestations by submitting proof\",\"params\":{\"attestationsOwner\":\"Owner of attestations to delete\",\"collectionIds\":\"Collection identifier of attestations to delete\",\"proofData\":\"Data sent along the deletion request to prove its validity\"},\"returns\":{\"_0\":\"attestations Attestations that were deleted\"}},\"generateAttestations(((uint256,uint256,bytes)[],address),bytes)\":{\"details\":\"Main external function. Allows to generate attestations by making a request and submitting proof\",\"params\":{\"proofData\":\"Data sent along the request to prove its validity\",\"request\":\"User request\"},\"returns\":{\"_0\":\"attestations Attestations that has been recorded\"}},\"getAttestationRegistry()\":{\"details\":\"Attestation registry getter\",\"returns\":{\"_0\":\"attestationRegistry\"}},\"getCommitmentSignerPubKey()\":{\"details\":\"Getter of the Commitment signer Eddsa Public key\"},\"getDestinationOfTicket(uint256)\":{\"details\":\"Getter, returns the last attestation destination of a ticket\",\"params\":{\"userTicket\":\"ticket used*\"}},\"getVerifier()\":{\"details\":\"Getter of Pythia-1 Verifier contract\"},\"initialize(uint256[2],address)\":{\"details\":\"Initializes the contract, to be called by the proxy delegating calls to this implementation\",\"params\":{\"commitmentSignerPubKey\":\"EdDSA public key of the commitment signer\",\"owner\":\"Owner of the contract, can update public key and address\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"stateVariables\":{\"AUTHORIZED_COLLECTION_ID_FIRST\":{\"details\":\"Getter returns of the first collection in which the attester is supposed to record*\"},\"AUTHORIZED_COLLECTION_ID_LAST\":{\"details\":\"Getter returns of the last collection in which the attester is supposed to record*\"}},\"title\":\"Pythia-1 Simple Attester\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"notice\":\"This attester is part of the family of the Pythia-1 Attesters. Pythia-1 attesters enable users to prove they have a claim and its proof issued by an offchain service in a privacy preserving way. That means no-one can make the link between the account used in the offchain service and the onchain account where the attestation is stored. The Pythia-1 Base abstract contract is inherited and holds the complex Pythia 1 verification logic. We invite readers to refer to: - https://pythia-1.docs.sismo.io for a full guide through the Pythia-1 ZK Attestations - https://pythia-1-circuits.docs.sismo.io for circuits, prover and verifiers of Pythia-1 This specific attester has the following characteristics: - Zero Knowledge One cannot deduct from an attestation what offchain issuer's account was used to generate the underlying proof - Non Strict (scores) If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100. This attester generate attestations of scores - Ticketed Each users gets one userTicket per claim For people used to semaphore/ tornado cash people: userTicket = hash(secret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier)*\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/attesters/pythia-1/Pythia1SimpleAttester.sol\":\"Pythia1SimpleAttester\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/Address.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() initializer {}\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\\n // contract may have been reentered.\\n require(_initializing ? _isConstructor() : !_initialized, \\\"Initializable: contract is already initialized\\\");\\n\\n bool isTopLevelCall = !_initializing;\\n if (isTopLevelCall) {\\n _initializing = true;\\n _initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n _initializing = false;\\n }\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} modifier, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n function _isConstructor() private view returns (bool) {\\n return !Address.isContract(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x4823752b07b8ea4ca971b217e39457930e7cb103c2c91e2a29729e5ca907e4f0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@sismo-core/pythia-1/contracts/Pythia1Verifier.sol\":{\"content\":\"//\\n// Copyright 2017 Christian Reitwiessner\\n// 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:\\n// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\\n// 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.\\n//\\n// 2019 OKIMS\\n// ported to solidity 0.6\\n// fixed linter warnings\\n// added requiere error messages\\n//\\n//\\n// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.0;\\nlibrary Pairing {\\n struct G1Point {\\n uint X;\\n uint Y;\\n }\\n // Encoding of field elements is: X[0] * z + X[1]\\n struct G2Point {\\n uint[2] X;\\n uint[2] Y;\\n }\\n /// @return the generator of G1\\n function P1() internal pure returns (G1Point memory) {\\n return G1Point(1, 2);\\n }\\n /// @return the generator of G2\\n function P2() internal pure returns (G2Point memory) {\\n // Original code point\\n return G2Point(\\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\\n );\\n\\n/*\\n // Changed by Jordi point\\n return G2Point(\\n [10857046999023057135944570762232829481370756359578518086990519993285655852781,\\n 11559732032986387107991004021392285783925812861821192530917403151452391805634],\\n [8495653923123431417604973247489272438418190587263600148770280649306958101930,\\n 4082367875863433681332203403145435568316851327593401208105741076214120093531]\\n );\\n*/\\n }\\n /// @return r the negation of p, i.e. p.addition(p.negate()) should be zero.\\n function negate(G1Point memory p) internal pure returns (G1Point memory r) {\\n // The prime q in the base field F_q for G1\\n uint q = 21888242871839275222246405745257275088696311157297823662689037894645226208583;\\n if (p.X == 0 && p.Y == 0)\\n return G1Point(0, 0);\\n return G1Point(p.X, q - (p.Y % q));\\n }\\n /// @return r the sum of two points of G1\\n function addition(G1Point memory p1, G1Point memory p2) internal view returns (G1Point memory r) {\\n uint[4] memory input;\\n input[0] = p1.X;\\n input[1] = p1.Y;\\n input[2] = p2.X;\\n input[3] = p2.Y;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require(success,\\\"pairing-add-failed\\\");\\n }\\n /// @return r the product of a point on G1 and a scalar, i.e.\\n /// p == p.scalar_mul(1) and p.addition(p) == p.scalar_mul(2) for all points p.\\n function scalar_mul(G1Point memory p, uint s) internal view returns (G1Point memory r) {\\n uint[3] memory input;\\n input[0] = p.X;\\n input[1] = p.Y;\\n input[2] = s;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require (success,\\\"pairing-mul-failed\\\");\\n }\\n /// @return the result of computing the pairing check\\n /// e(p1[0], p2[0]) * .... * e(p1[n], p2[n]) == 1\\n /// For example pairing([P1(), P1().negate()], [P2(), P2()]) should\\n /// return true.\\n function pairing(G1Point[] memory p1, G2Point[] memory p2) internal view returns (bool) {\\n require(p1.length == p2.length,\\\"pairing-lengths-failed\\\");\\n uint elements = p1.length;\\n uint inputSize = elements * 6;\\n uint[] memory input = new uint[](inputSize);\\n for (uint i = 0; i < elements; i++)\\n {\\n input[i * 6 + 0] = p1[i].X;\\n input[i * 6 + 1] = p1[i].Y;\\n input[i * 6 + 2] = p2[i].X[0];\\n input[i * 6 + 3] = p2[i].X[1];\\n input[i * 6 + 4] = p2[i].Y[0];\\n input[i * 6 + 5] = p2[i].Y[1];\\n }\\n uint[1] memory out;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 8, add(input, 0x20), mul(inputSize, 0x20), out, 0x20)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require(success,\\\"pairing-opcode-failed\\\");\\n return out[0] != 0;\\n }\\n /// Convenience method for a pairing check for two pairs.\\n function pairingProd2(G1Point memory a1, G2Point memory a2, G1Point memory b1, G2Point memory b2) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](2);\\n G2Point[] memory p2 = new G2Point[](2);\\n p1[0] = a1;\\n p1[1] = b1;\\n p2[0] = a2;\\n p2[1] = b2;\\n return pairing(p1, p2);\\n }\\n /// Convenience method for a pairing check for three pairs.\\n function pairingProd3(\\n G1Point memory a1, G2Point memory a2,\\n G1Point memory b1, G2Point memory b2,\\n G1Point memory c1, G2Point memory c2\\n ) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](3);\\n G2Point[] memory p2 = new G2Point[](3);\\n p1[0] = a1;\\n p1[1] = b1;\\n p1[2] = c1;\\n p2[0] = a2;\\n p2[1] = b2;\\n p2[2] = c2;\\n return pairing(p1, p2);\\n }\\n /// Convenience method for a pairing check for four pairs.\\n function pairingProd4(\\n G1Point memory a1, G2Point memory a2,\\n G1Point memory b1, G2Point memory b2,\\n G1Point memory c1, G2Point memory c2,\\n G1Point memory d1, G2Point memory d2\\n ) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](4);\\n G2Point[] memory p2 = new G2Point[](4);\\n p1[0] = a1;\\n p1[1] = b1;\\n p1[2] = c1;\\n p1[3] = d1;\\n p2[0] = a2;\\n p2[1] = b2;\\n p2[2] = c2;\\n p2[3] = d2;\\n return pairing(p1, p2);\\n }\\n}\\ncontract Pythia1Verifier {\\n using Pairing for *;\\n struct VerifyingKey {\\n Pairing.G1Point alfa1;\\n Pairing.G2Point beta2;\\n Pairing.G2Point gamma2;\\n Pairing.G2Point delta2;\\n Pairing.G1Point[] IC;\\n }\\n struct Proof {\\n Pairing.G1Point A;\\n Pairing.G2Point B;\\n Pairing.G1Point C;\\n }\\n function verifyingKey() internal pure returns (VerifyingKey memory vk) {\\n vk.alfa1 = Pairing.G1Point(\\n 20491192805390485299153009773594534940189261866228447918068658471970481763042,\\n 9383485363053290200918347156157836566562967994039712273449902621266178545958\\n );\\n\\n vk.beta2 = Pairing.G2Point(\\n [4252822878758300859123897981450591353533073413197771768651442665752259397132,\\n 6375614351688725206403948262868962793625744043794305715222011528459656738731],\\n [21847035105528745403288232691147584728191162732299865338377159692350059136679,\\n 10505242626370262277552901082094356697409835680220590971873171140371331206856]\\n );\\n vk.gamma2 = Pairing.G2Point(\\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\\n );\\n vk.delta2 = Pairing.G2Point(\\n [10531421060471803210764242282180596988661354300825243432694370526898549660572,\\n 16907777539267866029484140695898606769333962039725819851897531221528016291246],\\n [1262343472093645508827094724965505457998222566160570888483460111770233999788,\\n 15912415772039780433311820224136904737706664077875817672499292870626930031698]\\n );\\n vk.IC = new Pairing.G1Point[](10);\\n \\n vk.IC[0] = Pairing.G1Point( \\n 5517688305750201128762483893091304147062827104408157512730579569350848407613,\\n 5780136537335992008649392871793066674866342777759859789350700119480160130924\\n ); \\n \\n vk.IC[1] = Pairing.G1Point( \\n 12697944246979452442578306963760600646953905903147293524406388488412105525306,\\n 7947498303555241939381866476162499321683671397366404411964730108870115767741\\n ); \\n \\n vk.IC[2] = Pairing.G1Point( \\n 104028078850975554065172701281783302003220555203883119831575537681421753151,\\n 19148240629904598794948591359118971959790791697910953160820265703277306346\\n ); \\n \\n vk.IC[3] = Pairing.G1Point( \\n 5389100687915168292769005150998138946551934165417656464020514059527551078739,\\n 2995810062694628906192141834014562842416411391073941090612035469327148467089\\n ); \\n \\n vk.IC[4] = Pairing.G1Point( \\n 13361404455959093513465491032733056651449943760514352043673570676442342622118,\\n 13062233980231097531380816290641636455952795449264050237462472029810698552529\\n ); \\n \\n vk.IC[5] = Pairing.G1Point( \\n 11459259237872151197093706264224074511822899275820846406369316478681920338712,\\n 17008950402703007066305862393917002979068108987255258732198250350572930280478\\n ); \\n \\n vk.IC[6] = Pairing.G1Point( \\n 6864252787935048608809029133239993600538509116976873537320635937882667431893,\\n 21828895867329533519544146243248306555649073137427314743033980762667640230681\\n ); \\n \\n vk.IC[7] = Pairing.G1Point( \\n 9438320622270795479948280183526528671720880729000858589094410097102899873097,\\n 5568101658133066923956745075211904883930639183482936243523669908553853509584\\n ); \\n \\n vk.IC[8] = Pairing.G1Point( \\n 8243240866289541427505408968801246044483594232529594515653799293334187695980,\\n 16836688029681482175969944959379945743029264506292968109365225279154937195513\\n ); \\n \\n vk.IC[9] = Pairing.G1Point( \\n 8901554162474861401157311041464523592671931268194133233238376271355243714980,\\n 3625114242544161778734123207817598834256751400634638318925544817537792055578\\n ); \\n \\n }\\n function verify(uint[] memory input, Proof memory proof) internal view returns (uint) {\\n uint256 snark_scalar_field = 21888242871839275222246405745257275088548364400416034343698204186575808495617;\\n VerifyingKey memory vk = verifyingKey();\\n require(input.length + 1 == vk.IC.length,\\\"verifier-bad-input\\\");\\n // Compute the linear combination vk_x\\n Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);\\n for (uint i = 0; i < input.length; i++) {\\n require(input[i] < snark_scalar_field,\\\"verifier-gte-snark-scalar-field\\\");\\n vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i]));\\n }\\n vk_x = Pairing.addition(vk_x, vk.IC[0]);\\n if (!Pairing.pairingProd4(\\n Pairing.negate(proof.A), proof.B,\\n vk.alfa1, vk.beta2,\\n vk_x, vk.gamma2,\\n proof.C, vk.delta2\\n )) return 1;\\n return 0;\\n }\\n /// @return r bool true if proof is valid\\n function verifyProof(\\n uint[2] memory a,\\n uint[2][2] memory b,\\n uint[2] memory c,\\n uint[9] memory input\\n ) public view returns (bool r) {\\n Proof memory proof;\\n proof.A = Pairing.G1Point(a[0], a[1]);\\n proof.B = Pairing.G2Point([b[0][0], b[0][1]], [b[1][0], b[1][1]]);\\n proof.C = Pairing.G1Point(c[0], c[1]);\\n uint[] memory inputValues = new uint[](input.length);\\n for(uint i = 0; i < input.length; i++){\\n inputValues[i] = input[i];\\n }\\n if (verify(inputValues, proof) == 0) {\\n return true;\\n } else {\\n return false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3babb956e64535b9bf535df94288b4d83ea82c54727f79ee8949fe4a19c1d5ba\",\"license\":\"GPL-3.0\"},\"contracts/attesters/pythia-1/Pythia1SimpleAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\nimport {IPythia1SimpleAttester} from './interfaces/IPythia1SimpleAttester.sol';\\n\\n// Core protocol Protocol imports\\nimport {Request, Attestation, Claim} from './../../core/libs/Structs.sol';\\nimport {Attester, IAttester, IAttestationsRegistry} from './../../core/Attester.sol';\\n\\n// Imports related to Pythia1 Proving Scheme\\nimport {Pythia1Base, Pythia1Lib, Pythia1ProofData, Pythia1ProofInput, Pythia1Claim} from './base/Pythia1Base.sol';\\n\\n/**\\n * @title Pythia-1 Simple Attester\\n * @author Sismo\\n * @notice This attester is part of the family of the Pythia-1 Attesters.\\n * Pythia-1 attesters enable users to prove they have a claim and its proof issued by an \\n * offchain service in a privacy preserving way. \\n * That means no-one can make the link between the account used in the offchain service\\n * and the onchain account where the attestation is stored.\\n * The Pythia-1 Base abstract contract is inherited and holds the complex Pythia 1 verification logic.\\n * We invite readers to refer to:\\n * - https://pythia-1.docs.sismo.io for a full guide through the Pythia-1 ZK Attestations\\n * - https://pythia-1-circuits.docs.sismo.io for circuits, prover and verifiers of Pythia-1\\n\\n * This specific attester has the following characteristics:\\n\\n * - Zero Knowledge\\n * One cannot deduct from an attestation what offchain issuer's account was used to generate the underlying proof\\n\\n * - Non Strict (scores)\\n * If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100.\\n * This attester generate attestations of scores\\n\\n * - Ticketed\\n * Each users gets one userTicket per claim\\n * For people used to semaphore/ tornado cash people:\\n * userTicket = hash(secret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier)\\n **/\\n\\ncontract Pythia1SimpleAttester is IPythia1SimpleAttester, Pythia1Base, Attester, Ownable {\\n using Pythia1Lib for Pythia1ProofData;\\n using Pythia1Lib for bytes;\\n using Pythia1Lib for Request;\\n\\n // The deployed contract will need to be authorized to write into the Attestation registry\\n // It should get write access on attestation collections from AUTHORIZED_COLLECTION_ID_FIRST to AUTHORIZED_COLLECTION_ID_LAST.\\n uint256 public immutable AUTHORIZED_COLLECTION_ID_FIRST;\\n uint256 public immutable AUTHORIZED_COLLECTION_ID_LAST;\\n\\n uint256[2] internal _commitmentSignerPubKey;\\n mapping(uint256 => address) internal _ticketsDestinations;\\n\\n /*******************************************************\\n INITIALIZATION FUNCTIONS \\n *******************************************************/\\n /**\\n * @dev Constructor. Initializes the contract\\n * @param attestationsRegistryAddress Attestations Registry contract on which the attester will write attestations\\n * @param collectionIdFirst Id of the first collection in which the attester is supposed to record\\n * @param collectionIdLast Id of the last collection in which the attester is supposed to record\\n * @param pythia1VerifierAddress ZK Snark Pythia-1 Verifier contract\\n * @param commitmentSignerPubKey The EdDSA public key of the commitment signer for the Pythia 1 Proving Scheme\\n * @param owner The owner of the contract that can update the commitment signer pub key\\n */\\n constructor(\\n address attestationsRegistryAddress,\\n uint256 collectionIdFirst,\\n uint256 collectionIdLast,\\n address pythia1VerifierAddress,\\n uint256[2] memory commitmentSignerPubKey,\\n address owner\\n ) Attester(attestationsRegistryAddress) Pythia1Base(pythia1VerifierAddress) {\\n AUTHORIZED_COLLECTION_ID_FIRST = collectionIdFirst;\\n AUTHORIZED_COLLECTION_ID_LAST = collectionIdLast;\\n initialize(commitmentSignerPubKey, owner);\\n }\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param commitmentSignerPubKey EdDSA public key of the commitment signer\\n * @param owner Owner of the contract, can update public key and address\\n */\\n function initialize(uint256[2] memory commitmentSignerPubKey, address owner) public initializer {\\n _transferOwnership(owner);\\n _updateCommitmentSignerPubKey(commitmentSignerPubKey);\\n }\\n\\n /*******************************************************\\n MANDATORY FUNCTIONS TO OVERRIDE FROM ATTESTER.SOL\\n *******************************************************/\\n /**\\n * @dev Throws if user request is invalid when verified against\\n * Look into Pythia1Base for more details\\n * @param request users request. Claim of having an account part of a group of accounts\\n * @param proofData provided to back the request. snark input and snark proof\\n */\\n function _verifyRequest(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n override\\n {\\n Pythia1ProofData memory snarkProof = abi.decode(proofData, (Pythia1ProofData));\\n Pythia1ProofInput memory snarkInput = snarkProof._input();\\n Pythia1Claim memory claim = request._claim();\\n\\n // verifies that the proof corresponds to the claim\\n _validateInput(claim, snarkInput);\\n // verifies the proof validity\\n _verifyProof(snarkProof);\\n }\\n\\n /**\\n * @dev Returns attestations that will be recorded, constructed from the user request\\n * @param request users request. Claim of having an account part of a group of accounts\\n */\\n function buildAttestations(Request calldata request, bytes calldata)\\n public\\n view\\n virtual\\n override(IAttester, Attester)\\n returns (Attestation[] memory)\\n {\\n Pythia1Claim memory claim = request._claim();\\n\\n Attestation[] memory attestations = new Attestation[](1);\\n\\n uint256 attestationCollectionId = AUTHORIZED_COLLECTION_ID_FIRST +\\n claim.groupProperties.internalCollectionId;\\n\\n if (attestationCollectionId > AUTHORIZED_COLLECTION_ID_LAST)\\n revert CollectionIdOutOfBound(attestationCollectionId);\\n\\n address issuer = address(this);\\n\\n attestations[0] = Attestation(\\n attestationCollectionId,\\n claim.destination,\\n issuer,\\n claim.claimedValue,\\n uint32(block.timestamp),\\n ''\\n );\\n return (attestations);\\n }\\n\\n /*******************************************************\\n OPTIONAL HOOK VIRTUAL FUNCTIONS FROM ATTESTER.SOL\\n *******************************************************/\\n\\n /**\\n * @dev Hook run before recording the attestation.\\n * Throws if ticket already used\\n * @param request users request. Claim of beiing part of a group.\\n * @param proofData provided to back the request. snark input and snark proof\\n */\\n function _beforeRecordAttestations(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n override\\n {\\n // we get the ticket used from the snark input in the data provided\\n uint256 userTicket = proofData._getTicket();\\n address currentDestination = _getDestinationOfTicket(userTicket);\\n\\n if (currentDestination != address(0)) {\\n revert TicketUsed(userTicket);\\n }\\n\\n _setDestinationForTicket(userTicket, request.destination);\\n }\\n\\n /*******************************************************\\n Pythia-1 MANDATORY FUNCTIONS FROM Pythia-1 Base Attester\\n *******************************************************/\\n\\n /**\\n * @dev Returns the ticket identifier from a user claim\\n * @param claim user Pythia-1 claim = have an offchain account with a specific value in a specific group\\n * ticket = hash(secretHash, ticketIdentifier), which is verified inside the snark\\n * users bring secretHash as private input in snark which guarantees privacy\\n * the secretHash is only known by the user and never escape the user's browser\\n \\n * Here we chose ticketIdentifier = hash(attesterAddress, claim.GroupId)\\n * Creates one ticket per group, per user and makes sure no collision with other attester's tickets\\n **/\\n function _getTicketIdentifierOfClaim(Pythia1Claim memory claim)\\n internal\\n view\\n override\\n returns (uint256)\\n {\\n uint256 ticketIdentifier = _encodeInSnarkField(\\n address(this),\\n claim.groupProperties.internalCollectionId\\n );\\n return ticketIdentifier;\\n }\\n\\n function _getCommitmentSignerPubKey() internal view override returns (uint256[2] memory) {\\n return _commitmentSignerPubKey;\\n }\\n\\n /*******************************************************\\n Pythia-1 Attester Specific Functions\\n *******************************************************/\\n\\n function updateCommitmentSignerPubKey(uint256[2] memory commitmentSignerPubKey)\\n external\\n onlyOwner\\n {\\n _updateCommitmentSignerPubKey(commitmentSignerPubKey);\\n }\\n\\n function _updateCommitmentSignerPubKey(uint256[2] memory commitmentSignerPubKey) internal {\\n _commitmentSignerPubKey = commitmentSignerPubKey;\\n emit CommitmentSignerPubKeyUpdated(commitmentSignerPubKey);\\n }\\n\\n /**\\n * @dev Getter, returns the last attestation destination of a ticket\\n * @param userTicket ticket used\\n **/\\n function getDestinationOfTicket(uint256 userTicket) external view override returns (address) {\\n return _getDestinationOfTicket(userTicket);\\n }\\n\\n function _setDestinationForTicket(uint256 userTicket, address destination) internal virtual {\\n _ticketsDestinations[userTicket] = destination;\\n emit TicketDestinationUpdated(userTicket, destination);\\n }\\n\\n function _getDestinationOfTicket(uint256 userTicket) internal view returns (address) {\\n return _ticketsDestinations[userTicket];\\n }\\n\\n function _encodeInSnarkField(address addr, uint256 nb) internal pure returns (uint256) {\\n return uint256(keccak256(abi.encode(addr, nb))) % Pythia1Lib.SNARK_FIELD;\\n }\\n}\\n\",\"keccak256\":\"0x8e9e36f3b5d2ca8decde179a6aac0c06de656f20c25268444fd8d0feac327bc0\",\"license\":\"MIT\"},\"contracts/attesters/pythia-1/base/IPythia1Base.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {Pythia1Verifier, Pythia1Lib, Pythia1ProofData} from '../libs/Pythia1Lib.sol';\\n\\ninterface IPythia1Base {\\n error DestinationMismatch(address expectedDestination, address inputDestination);\\n error UserShouldOwnItsDestination(address sender, address inputdestination);\\n error CommitmentSignerPubKeyMismatch(\\n uint256 expectedX,\\n uint256 expectedY,\\n uint256 inputX,\\n uint256 inputY\\n );\\n error TicketIdentifierMismatch(uint256 expectedTicketIdentifier, uint256 ticketIdentifier);\\n error IsStrictMismatch(bool expectedStrictness, bool strictNess);\\n error ChainIdMismatch(uint256 expectedChainId, uint256 chainId);\\n error ValueMismatch(uint256 expectedValue, uint256 inputValue);\\n error GroupIdMismatch(uint256 expectedAccountsTreeValue, uint256 inputAccountsTreeValue);\\n error InvalidGroth16Proof(string reason);\\n\\n /**\\n * @dev Getter of Pythia-1 Verifier contract\\n */\\n function getVerifier() external view returns (Pythia1Verifier);\\n\\n /**\\n * @dev Getter of the Commitment Signer EdDSA Public Key\\n */\\n function getCommitmentSignerPubKey() external view returns (uint256[2] memory);\\n}\\n\",\"keccak256\":\"0x61924d768ab0c8cd61d0ff3c9ecbfbc37aacdbec7f575f0d46041b1847222526\",\"license\":\"MIT\"},\"contracts/attesters/pythia-1/base/Pythia1Base.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {IPythia1Base} from './IPythia1Base.sol';\\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\\n\\n// Protocol imports\\nimport {Request, Attestation, Claim} from '../../../core/libs/Structs.sol';\\n\\n// Imports related to Pythia 1 ZK Proving Scheme\\nimport {Pythia1Verifier, Pythia1Lib, Pythia1Claim, Pythia1ProofData, Pythia1ProofInput, Pythia1GroupProperties} from '../libs/Pythia1Lib.sol';\\n\\n/**\\n * @title Pythia-1 Base Attester\\n * @author Sismo\\n * @notice Abstract contract that facilitates the use of the Pythia-1 ZK Proving Scheme.\\n * Pythia-1: it allows issuing attestations from an offchain service and send it onchain \\n * without anyone being able to make the link between the offchain service and the onchain service.\\n * It is inherited by the family of Pythia-1 attesters.\\n * It contains the user input checking and the ZK-SNARK proof verification.\\n * We invite readers to refer to:\\n * - https://pythia-1.docs.sismo.io for a full guide through the Pythia-1 ZK Attestations\\n * - https://pythia-1-circuits.docs.sismo.io for circuits, prover and verifiers of Pythia-1\\n \\n \\n **/\\nabstract contract Pythia1Base is IPythia1Base, Initializable {\\n using Pythia1Lib for Pythia1ProofData;\\n\\n // ZK-SNARK Verifier\\n Pythia1Verifier immutable VERIFIER;\\n\\n /*******************************************************\\n INITIALIZATION FUNCTIONS \\n *******************************************************/\\n /**\\n * @dev Constructor. Initializes the contract\\n * @param Pythia1VerifierAddress ZK Snark Verifier contract\\n */\\n constructor(address Pythia1VerifierAddress) {\\n VERIFIER = Pythia1Verifier(Pythia1VerifierAddress);\\n }\\n\\n /**\\n * @dev Getter of Pythia-1 Verifier contract\\n */\\n function getVerifier() external view returns (Pythia1Verifier) {\\n return VERIFIER;\\n }\\n\\n /**\\n * @dev Getter of the Commitment signer Eddsa Public key\\n */\\n function getCommitmentSignerPubKey() external view returns (uint256[2] memory) {\\n return _getCommitmentSignerPubKey();\\n }\\n\\n /*******************************************************\\n Pythia-1 SPECIFIC FUNCTIONS\\n *******************************************************/\\n\\n /**\\n * @dev MANDATORY: must be implemented to return the ticket identifier from a user request\\n * so it can be checked against snark input\\n * ticket = hash(secretHash, ticketIdentifier), which is verified inside the snark\\n * the secretHash is a number only known by the user and is used in \\n * the zero knowledge as a private input which guarantees privacy\\n\\n * This function MUST be implemented by Pythia-1 attesters.\\n * This is the core function that implements the logic of tickets\\n\\n * Do they get one ticket per claim?\\n * Do they get 2 tickets per claim?\\n * Do they get 1 ticket per claim, every month?\\n * Take a look at Pythia-1 Simple Attester for an example\\n * @param claim user claim: a particular claim that a user have that he can prove s right.\\n */\\n function _getTicketIdentifierOfClaim(Pythia1Claim memory claim)\\n internal\\n view\\n virtual\\n returns (uint256);\\n\\n /**\\n * @dev MANDATORY: must be implemented to return the commitment signer that allows to\\n * prove the claim was correctly issued for the user.\\n */\\n function _getCommitmentSignerPubKey() internal view virtual returns (uint256[2] memory);\\n\\n /**\\n * @dev Checks whether the user claim and the snark public input are a match\\n * @param claim user claim\\n * @param input snark public input\\n */\\n function _validateInput(Pythia1Claim memory claim, Pythia1ProofInput memory input)\\n internal\\n view\\n virtual\\n {\\n if (input.groupId != claim.groupId) revert GroupIdMismatch(claim.groupId, input.groupId);\\n\\n if (input.isStrict == claim.groupProperties.isScore)\\n revert IsStrictMismatch(claim.groupProperties.isScore, input.isStrict);\\n\\n if (input.destination != claim.destination)\\n revert DestinationMismatch(claim.destination, input.destination);\\n\\n if (claim.destination != msg.sender)\\n revert UserShouldOwnItsDestination(msg.sender, claim.destination);\\n\\n if (input.chainId != block.chainid) revert ChainIdMismatch(block.chainid, input.chainId);\\n\\n if (input.value != claim.claimedValue) revert ValueMismatch(claim.claimedValue, input.value);\\n\\n uint256[2] memory commitmentSignerPubKey = _getCommitmentSignerPubKey();\\n if (\\n input.commitmentSignerPubKey[0] != commitmentSignerPubKey[0] ||\\n input.commitmentSignerPubKey[1] != commitmentSignerPubKey[1]\\n )\\n revert CommitmentSignerPubKeyMismatch(\\n commitmentSignerPubKey[0],\\n commitmentSignerPubKey[1],\\n input.commitmentSignerPubKey[0],\\n input.commitmentSignerPubKey[1]\\n );\\n\\n uint256 ticketIdentifier = _getTicketIdentifierOfClaim(claim);\\n\\n if (input.ticketIdentifier != ticketIdentifier)\\n revert TicketIdentifierMismatch(ticketIdentifier, input.ticketIdentifier);\\n }\\n\\n /**\\n * @dev verify the plonk mathematical proof using the circom verifier contract\\n * @param proofData snark public input\\n */\\n function _verifyProof(Pythia1ProofData memory proofData) internal view virtual {\\n try\\n VERIFIER.verifyProof(proofData.proof.a, proofData.proof.b, proofData.proof.c, proofData.input)\\n returns (bool success) {\\n if (!success) revert InvalidGroth16Proof('');\\n } catch Error(string memory reason) {\\n revert InvalidGroth16Proof(reason);\\n } catch Panic(\\n uint256 /*errorCode*/\\n ) {\\n revert InvalidGroth16Proof('');\\n } catch (\\n bytes memory /*lowLevelData*/\\n ) {\\n revert InvalidGroth16Proof('');\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6ec48f1e07923e6ceed30965ef7bdd0faf6763a3bbd239c31e1eb3c54577e5cb\",\"license\":\"MIT\"},\"contracts/attesters/pythia-1/interfaces/IPythia1SimpleAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {Attestation} from '../../../core/libs/Structs.sol';\\nimport {IAttester} from '../../../core/interfaces/IAttester.sol';\\nimport {Pythia1Lib, Pythia1ProofData, Pythia1ProofInput} from './../libs/Pythia1Lib.sol';\\nimport {IPythia1Base} from './../base/IPythia1Base.sol';\\n\\ninterface IPythia1SimpleAttester is IPythia1Base, IAttester {\\n error TicketUsed(uint256 userTicket);\\n error CollectionIdOutOfBound(uint256 collectionId);\\n\\n event TicketDestinationUpdated(uint256 ticket, address newOwner);\\n event CommitmentSignerPubKeyUpdated(uint256[2] newCommitmentSignerPubKey);\\n\\n /**\\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\\n * @param commitmentSignerPubKey EdDSA public key of the commitment signer\\n * @param owner Owner of the contract, can update public key and address\\n */\\n function initialize(uint256[2] memory commitmentSignerPubKey, address owner) external;\\n\\n /**\\n * @dev Getter, returns the last attestation destination of a ticket\\n * @param userTicket ticket used\\n **/\\n function getDestinationOfTicket(uint256 userTicket) external view returns (address);\\n\\n /**\\n * @dev Getter\\n * returns of the first collection in which the attester is supposed to record\\n **/\\n function AUTHORIZED_COLLECTION_ID_FIRST() external view returns (uint256);\\n\\n /**\\n * @dev Getter\\n * returns of the last collection in which the attester is supposed to record\\n **/\\n function AUTHORIZED_COLLECTION_ID_LAST() external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xb5eca9793c0e8f015e5c7fbdc6b4e6a5137f4fd0b82b51c1c3d69accec039a4b\",\"license\":\"MIT\"},\"contracts/attesters/pythia-1/libs/Pythia1Lib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Claim, Request} from '../../../core/libs/Structs.sol';\\nimport {Pythia1Verifier} from '@sismo-core/pythia-1/contracts/Pythia1Verifier.sol';\\n\\n// user Pythia-1 claim retrieved form his request\\nstruct Pythia1Claim {\\n uint256 groupId; // user claims be part of this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n address destination; // user claims to own this destination[]\\n Pythia1GroupProperties groupProperties; // user claims the group has the following properties\\n}\\n\\nstruct Pythia1GroupProperties {\\n uint128 internalCollectionId;\\n bool isScore;\\n}\\n\\nstruct Pythia1CircomSnarkProof {\\n uint256[2] a;\\n uint256[2][2] b;\\n uint256[2] c;\\n}\\n\\nstruct Pythia1ProofData {\\n Pythia1CircomSnarkProof proof;\\n uint256[9] input;\\n // destination;\\n // chainId;\\n // commitmentSignerPubKey.x;\\n // commitmentSignerPubKey.y;\\n // groupId;\\n // ticketIdentifier;\\n // userTicket;\\n // value;\\n // isStrict;\\n}\\n\\nstruct Pythia1ProofInput {\\n address destination;\\n uint256 chainId;\\n uint256 groupId;\\n uint256 ticketIdentifier;\\n uint256 ticket;\\n uint256 value;\\n bool isStrict;\\n uint256[2] commitmentSignerPubKey;\\n}\\n\\nlibrary Pythia1Lib {\\n uint256 constant SNARK_FIELD =\\n 21888242871839275222246405745257275088548364400416034343698204186575808495617;\\n\\n error GroupIdAndPropertiesMismatch(uint256 expectedGroupId, uint256 groupId);\\n\\n function _input(Pythia1ProofData memory self) internal pure returns (Pythia1ProofInput memory) {\\n return\\n Pythia1ProofInput(\\n _getDestination(self),\\n _getChainId(self),\\n _getGroupId(self),\\n _getExpectedExternalNullifier(self),\\n _getTicket(self),\\n _getValue(self),\\n _getIsStrict(self),\\n _getCommitmentMapperPubKey(self)\\n );\\n }\\n\\n function _claim(Request memory self) internal pure returns (Pythia1Claim memory) {\\n Claim memory claim = self.claims[0];\\n _validateClaim(claim);\\n Pythia1GroupProperties memory groupProperties = abi.decode(\\n claim.extraData,\\n (Pythia1GroupProperties)\\n );\\n return (Pythia1Claim(claim.groupId, claim.claimedValue, self.destination, groupProperties));\\n }\\n\\n function _toCircomFormat(Pythia1ProofData memory self)\\n internal\\n pure\\n returns (\\n uint256[2] memory,\\n uint256[2][2] memory,\\n uint256[2] memory,\\n uint256[9] memory\\n )\\n {\\n return (self.proof.a, self.proof.b, self.proof.c, self.input);\\n }\\n\\n function _getDestination(Pythia1ProofData memory self) internal pure returns (address) {\\n return address(uint160(self.input[0]));\\n }\\n\\n function _getChainId(Pythia1ProofData memory self) internal pure returns (uint256) {\\n return self.input[1];\\n }\\n\\n function _getCommitmentMapperPubKey(Pythia1ProofData memory self)\\n internal\\n pure\\n returns (uint256[2] memory)\\n {\\n return [self.input[2], self.input[3]];\\n }\\n\\n function _getGroupId(Pythia1ProofData memory self) internal pure returns (uint256) {\\n return self.input[4];\\n }\\n\\n function _getExpectedExternalNullifier(Pythia1ProofData memory self)\\n internal\\n pure\\n returns (uint256)\\n {\\n return self.input[5];\\n }\\n\\n function _getTicket(Pythia1ProofData memory self) internal pure returns (uint256) {\\n return self.input[6];\\n }\\n\\n function _getValue(Pythia1ProofData memory self) internal pure returns (uint256) {\\n return self.input[7];\\n }\\n\\n function _getIsStrict(Pythia1ProofData memory self) internal pure returns (bool) {\\n return self.input[8] == 1;\\n }\\n\\n function _getTicket(bytes calldata self) internal pure returns (uint256) {\\n Pythia1ProofData memory snarkProofData = abi.decode(self, (Pythia1ProofData));\\n uint256 userTicket = uint256(_getTicket(snarkProofData));\\n return userTicket;\\n }\\n\\n function _generateGroupIdFromProperties(uint128 internalCollectionId, bool isScore)\\n internal\\n pure\\n returns (uint256)\\n {\\n return\\n _generateGroupIdFromEncodedProperties(_encodeGroupProperties(internalCollectionId, isScore));\\n }\\n\\n function _generateGroupIdFromEncodedProperties(bytes memory encodedProperties)\\n internal\\n pure\\n returns (uint256)\\n {\\n return uint256(keccak256(encodedProperties)) % Pythia1Lib.SNARK_FIELD;\\n }\\n\\n function _encodeGroupProperties(uint128 internalCollectionId, bool isScore)\\n internal\\n pure\\n returns (bytes memory)\\n {\\n return abi.encode(internalCollectionId, isScore);\\n }\\n\\n function _validateClaim(Claim memory claim) internal pure {\\n uint256 expectedGroupId = _generateGroupIdFromEncodedProperties(claim.extraData);\\n if (claim.groupId != expectedGroupId)\\n revert GroupIdAndPropertiesMismatch(expectedGroupId, claim.groupId);\\n }\\n}\\n\",\"keccak256\":\"0x2431749971d4fa2f5789cd0adb62457edec6819ed956962b9db55a39bc2e5832\",\"license\":\"MIT\"},\"contracts/core/Attester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\nimport {IAttester} from './interfaces/IAttester.sol';\\nimport {IAttestationsRegistry} from './interfaces/IAttestationsRegistry.sol';\\nimport {Request, Attestation, AttestationData} from './libs/Structs.sol';\\n\\n/**\\n * @title Attester Abstract Contract\\n * @author Sismo\\n * @notice Contract to be inherited by Attesters\\n * All attesters that expect to be authorized in Sismo Protocol (i.e write access on the registry)\\n * are recommended to implemented this abstract contract\\n\\n * Take a look at the HydraS1SimpleAttester.sol for example on how to implement this abstract contract\\n *\\n * This contracts is built around two main external standard functions.\\n * They must NOT be override them, unless your really know what you are doing\\n \\n * - generateAttestations(request, proof) => will write attestations in the registry\\n * 1. (MANDATORY) Implement the buildAttestations() view function which generate attestations from user request\\n * 2. (MANDATORY) Implement teh _verifyRequest() internal function where to write checks\\n * 3. (OPTIONAL) Override _beforeRecordAttestations and _afterRecordAttestations hooks\\n\\n * - deleteAttestations(collectionId, owner, proof) => will delete attestations in the registry\\n * 1. (DEFAULT) By default this function throws (see _verifyAttestationsDeletionRequest)\\n * 2. (OPTIONAL) Override the _verifyAttestationsDeletionRequest so it no longer throws\\n * 3. (OPTIONAL) Override _beforeDeleteAttestations and _afterDeleteAttestations hooks\\n\\n * For more information: https://attesters.docs.sismo.io\\n **/\\nabstract contract Attester is IAttester {\\n // Registry where all attestations are stored\\n IAttestationsRegistry internal immutable ATTESTATIONS_REGISTRY;\\n\\n /**\\n * @dev Constructor\\n * @param attestationsRegistryAddress The address of the AttestationsRegistry contract storing attestations\\n */\\n constructor(address attestationsRegistryAddress) {\\n ATTESTATIONS_REGISTRY = IAttestationsRegistry(attestationsRegistryAddress);\\n }\\n\\n /**\\n * @dev Main external function. Allows to generate attestations by making a request and submitting proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that has been recorded\\n */\\n function generateAttestations(Request calldata request, bytes calldata proofData)\\n external\\n override\\n returns (Attestation[] memory)\\n {\\n // Verify if request is valid by verifying against proof\\n _verifyRequest(request, proofData);\\n\\n // Generate the actual attestations from user request\\n Attestation[] memory attestations = buildAttestations(request, proofData);\\n\\n _beforeRecordAttestations(request, proofData);\\n\\n ATTESTATIONS_REGISTRY.recordAttestations(attestations);\\n\\n _afterRecordAttestations(attestations);\\n\\n for (uint256 i = 0; i < attestations.length; i++) {\\n emit AttestationGenerated(attestations[i]);\\n }\\n\\n return attestations;\\n }\\n\\n /**\\n * @dev External facing function. Allows to delete attestations by submitting proof\\n * @param collectionIds Collection identifier of attestations to delete\\n * @param attestationsOwner Owner of attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n * @return attestations Attestations that were deleted\\n */\\n function deleteAttestations(\\n uint256[] calldata collectionIds,\\n address attestationsOwner,\\n bytes calldata proofData\\n ) external override returns (Attestation[] memory) {\\n // fetch attestations from the registry\\n Attestation[] memory attestationsToDelete;\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n (\\n address issuer,\\n uint256 attestationValue,\\n uint32 timestamp,\\n bytes memory extraData\\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\\n\\n attestationsToDelete[i] = (\\n Attestation(\\n collectionIds[i],\\n attestationsOwner,\\n issuer,\\n attestationValue,\\n timestamp,\\n extraData\\n )\\n );\\n }\\n\\n _verifyAttestationsDeletionRequest(attestationsToDelete, proofData);\\n\\n _beforeDeleteAttestations(attestationsToDelete, proofData);\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationsToDelete);\\n\\n _afterDeleteAttestations(attestationsToDelete, proofData);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n emit AttestationDeleted(attestationsToDelete[i]);\\n }\\n return attestationsToDelete;\\n }\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should build attestations from the user request and the proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(Request calldata request, bytes calldata proofData)\\n public\\n view\\n virtual\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev Attestation registry getter\\n * @return attestationRegistry\\n */\\n function getAttestationRegistry() external view override returns (IAttestationsRegistry) {\\n return ATTESTATIONS_REGISTRY;\\n }\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should verify the user request is valid\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _verifyRequest(Request calldata request, bytes calldata proofData) internal virtual;\\n\\n /**\\n * @dev Optional: must be overridden by attesters that want to feature attestations deletion\\n * Default behavior: throws\\n * It should verify attestations deletion request is valid\\n * @param attestations Attestations that will be deleted\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _verifyAttestationsDeletionRequest(\\n Attestation[] memory attestations,\\n bytes calldata proofData\\n ) internal virtual {\\n revert AttestationDeletionNotImplemented();\\n }\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called before recording attestations in the registry\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n */\\n function _beforeRecordAttestations(Request calldata request, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n\\n /**\\n * @dev (Optional) Can be overridden in attesters inheriting this contract\\n * Will be called after recording an attestation\\n * @param attestations Recorded attestations\\n */\\n function _afterRecordAttestations(Attestation[] memory attestations) internal virtual {}\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called before deleting attestations from the registry\\n * @param attestations Attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n */\\n function _beforeDeleteAttestations(Attestation[] memory attestations, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n\\n /**\\n * @dev Optional: Hook, can be overridden in attesters\\n * Will be called after deleting attestations from the registry\\n * @param attestations Attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n */\\n function _afterDeleteAttestations(Attestation[] memory attestations, bytes calldata proofData)\\n internal\\n virtual\\n {}\\n}\\n\",\"keccak256\":\"0x37683c6752d4dc911459084eb191c1045f3bf34e2143f3db3d298a66c971a106\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttestationsRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Attestation, AttestationData} from '../libs/Structs.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry {\\n event AttestationRecorded(Attestation attestation);\\n event AttestationDeleted(Attestation attestation);\\n\\n /**\\n * @dev Main function to be called by authorized issuers\\n * @param attestations Attestations to be recorded (creates a new one or overrides an existing one)\\n */\\n function recordAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Delete function to be called by authorized issuers\\n * @param attestations Attestations to be deleted\\n */\\n function deleteAttestations(Attestation[] calldata attestations) external;\\n\\n /**\\n * @dev Returns whether a user has an attestation from a collection\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function hasAttestation(uint256 collectionId, address owner) external returns (bool);\\n\\n /**\\n * @dev Getter of the data of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationData(uint256 collectionId, address owner)\\n external\\n view\\n returns (AttestationData memory);\\n\\n /**\\n * @dev Getter of the value of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationValue(uint256 collectionId, address owner) external view returns (uint256);\\n\\n /**\\n * @dev Getter of the data of a specific attestation as tuple\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationDataTuple(uint256 collectionId, address owner)\\n external\\n view\\n returns (\\n address,\\n uint256,\\n uint32,\\n bytes memory\\n );\\n\\n /**\\n * @dev Getter of the extraData of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationExtraData(uint256 collectionId, address owner)\\n external\\n view\\n returns (bytes memory);\\n\\n /**\\n * @dev Getter of the issuer of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationIssuer(uint256 collectionId, address owner)\\n external\\n view\\n returns (address);\\n\\n /**\\n * @dev Getter of the timestamp of a specific attestation\\n * @param collectionId Collection identifier of the targeted attestation\\n * @param owner Owner of the targeted attestation\\n */\\n function getAttestationTimestamp(uint256 collectionId, address owner)\\n external\\n view\\n returns (uint32);\\n\\n /**\\n * @dev Getter of the data of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationDataBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (AttestationData[] memory);\\n\\n /**\\n * @dev Getter of the values of specific attestations\\n * @param collectionIds Collection identifiers of the targeted attestations\\n * @param owners Owners of the targeted attestations\\n */\\n function getAttestationValueBatch(uint256[] memory collectionIds, address[] memory owners)\\n external\\n view\\n returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0xb5e25bd7e0372c9973e582fb7fe96318c145831a5452d8c79eb848a7464b0297\",\"license\":\"MIT\"},\"contracts/core/interfaces/IAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Request, Attestation} from '../libs/Structs.sol';\\nimport {IAttestationsRegistry} from '../interfaces/IAttestationsRegistry.sol';\\n\\n/**\\n * @title IAttester\\n * @author Sismo\\n * @notice This is the interface for the attesters in Sismo Protocol\\n */\\ninterface IAttester {\\n event AttestationGenerated(Attestation attestation);\\n\\n event AttestationDeleted(Attestation attestation);\\n\\n error AttestationDeletionNotImplemented();\\n\\n /**\\n * @dev Main external function. Allows to generate attestations by making a request and submitting proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that has been recorded\\n */\\n function generateAttestations(Request calldata request, bytes calldata proofData)\\n external\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev External facing function. Allows to delete an attestation by submitting proof\\n * @param collectionIds Collection identifier of attestations to delete\\n * @param attestationsOwner Owner of attestations to delete\\n * @param proofData Data sent along the deletion request to prove its validity\\n * @return attestations Attestations that was deleted\\n */\\n function deleteAttestations(\\n uint256[] calldata collectionIds,\\n address attestationsOwner,\\n bytes calldata proofData\\n ) external returns (Attestation[] memory);\\n\\n /**\\n * @dev MANDATORY: must be implemented in attesters\\n * It should build attestations from the user request and the proof\\n * @param request User request\\n * @param proofData Data sent along the request to prove its validity\\n * @return attestations Attestations that will be recorded\\n */\\n function buildAttestations(Request calldata request, bytes calldata proofData)\\n external\\n view\\n returns (Attestation[] memory);\\n\\n /**\\n * @dev Attestation registry address getter\\n * @return attestationRegistry Address of the registry\\n */\\n function getAttestationRegistry() external view returns (IAttestationsRegistry);\\n}\\n\",\"keccak256\":\"0xafe9c1a742d7570033c8d74cee203e09ee9b7461eaed6d2ca77697449e2ce95d\",\"license\":\"MIT\"},\"contracts/core/libs/Structs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/**\\n * @title Attestations Registry State\\n * @author Sismo\\n * @notice This contract holds all of the storage variables and data\\n * structures used by the AttestationsRegistry and parent\\n * contracts.\\n */\\n\\n// User Attestation Request, can be made by any user\\n// The context of an Attestation Request is a specific attester contract\\n// Each attester has groups of accounts in its available data\\n// eg: for a specific attester:\\n// group 1 <=> accounts that sent txs on mainnet\\n// group 2 <=> accounts that sent txs on polygon\\n// eg: for another attester:\\n// group 1 <=> accounts that sent eth txs in 2022\\n// group 2 <=> accounts sent eth txs in 2021\\nstruct Request {\\n // implicit address attester;\\n // implicit uint256 chainId;\\n Claim[] claims;\\n address destination; // destination that will receive the end attestation\\n}\\n\\nstruct Claim {\\n uint256 groupId; // user claims to have an account in this group\\n uint256 claimedValue; // user claims this value for its account in the group\\n bytes extraData; // arbitrary data, may be required by the attester to verify claims or generate a specific attestation\\n}\\n\\n/**\\n * @dev Attestation Struct. This is the struct receive as argument by the Attestation Registry.\\n * @param collectionId Attestation collection\\n * @param owner Attestation collection\\n * @param issuer Attestation collection\\n * @param value Attestation collection\\n * @param timestamp Attestation collection\\n * @param extraData Attestation collection\\n */\\nstruct Attestation {\\n // implicit uint256 chainId;\\n uint256 collectionId; // Id of the attestation collection (in the registry)\\n address owner; // Owner of the attestation\\n address issuer; // Contract that created or last updated the record.\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Timestamp chosen by the attester, should correspond to the effective date of the attestation\\n // it is different from the recording timestamp (date when the attestation was recorded)\\n // e.g a proof of NFT ownership may have be recorded today which is 2 month old data.\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\\n// Attestation Data, stored in the registry\\n// The context is a specific owner of a specific collection\\nstruct AttestationData {\\n // implicit uint256 chainId\\n // implicit uint256 collectionId - from context\\n // implicit owner\\n address issuer; // Address of the contract that recorded the attestation\\n uint256 value; // Value of the attestation\\n uint32 timestamp; // Effective date of issuance of the attestation. (can be different from the recording timestamp)\\n bytes extraData; // arbitrary data that can be added by the attester\\n}\\n\",\"keccak256\":\"0x893d9a10429878dd4077388ff4da954c20b86a3c172a7bbdd10a01eb5d39b6a0\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b50604051620022ca380380620022ca8339810160408190526200003591620002b6565b6001600160a01b03838116608052861660a052620000533362000075565b60c085905260e0849052620000698282620000d0565b505050505050620003b7565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054610100900460ff16620000ed5760005460ff1615620000f7565b620000f7620001b0565b6200015f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801562000182576000805461ffff19166101011790555b6200018d8262000075565b6200019883620001ce565b8015620001ab576000805461ff00191690555b505050565b6000620001c8306200021a60201b620009ca1760201c565b15905090565b620001dd600182600262000229565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df816040516200020f919062000384565b60405180910390a150565b6001600160a01b03163b151590565b82600281019282156200025a579160200282015b828111156200025a5782518255916020019190600101906200023d565b50620002689291506200026c565b5090565b5b808211156200026857600081556001016200026d565b80516001600160a01b03811681146200029b57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060e08789031215620002d057600080fd5b620002db8762000283565b9550602080880151955060408801519450620002fa6060890162000283565b935088609f8901126200030c57600080fd5b604080519081016001600160401b0381118282101715620003315762000331620002a0565b6040528060c08a018b8111156200034757600080fd5b60808b015b818110156200036557805183529184019184016200034c565b50829550620003748162000283565b9450505050509295509295509295565b60408101818360005b6002811015620003ae5781518352602092830192909101906001016200038d565b50505092915050565b60805160a05160c05160e051611eaf6200041b600039600081816101a9015261040901526000818161016101526103e101526000818161020c015281816104ec01528181610663015261084d0152600081816101240152610f810152611eaf6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063c776adde11610066578063c776adde14610230578063c9cdef0414610243578063e60f999f14610256578063f2fde38b1461026957600080fd5b80638da5cb5b146101d3578063af411a30146101ea578063bfa665851461020a57600080fd5b806354846d7a116100c857806354846d7a1461015c57806363e4afc2146101915780637000b051146101a4578063715018a6146101cb57600080fd5b8063124d7199146100ef5780632785e3221461010457806346657fe914610122575b600080fd5b6101026100fd3660046114ac565b61027c565b005b61010c6102c2565b60405161011991906114eb565b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610119565b6101837f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610119565b61014461019f3660046114f9565b6102d7565b6101837f000000000000000000000000000000000000000000000000000000000000000081565b6101026102f6565b6000546201000090046001600160a01b0316610144565b6101fd6101f836600461155a565b610333565b6040516101199190611685565b7f0000000000000000000000000000000000000000000000000000000000000000610144565b6101fd61023e36600461170c565b6104d6565b6101026102513660046117bd565b610742565b6101fd61026436600461155a565b61080f565b6101026102773660046117f5565b61092b565b6000546001600160a01b03620100009091041633146102b65760405162461bcd60e51b81526004016102ad90611812565b60405180910390fd5b6102bf816109d9565b50565b6102ca6112f1565b6102d2610a21565b905090565b6000818152600360205260408120546001600160a01b03165b92915050565b6000546001600160a01b03620100009091041633146103275760405162461bcd60e51b81526004016102ad90611812565b6103316000610a5b565b565b606060006103486103438661186e565b610ab6565b60408051600180825281830190925291925060009190816020015b6103b46040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b815260200190600190039081610363575050606083015151909150600090610405906001600160801b03167f00000000000000000000000000000000000000000000000000000000000000006119fd565b90507f000000000000000000000000000000000000000000000000000000000000000081111561044b57604051637bbf29e360e01b8152600481018290526024016102ad565b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b03168152602001856020015181526020014263ffffffff16815260200160405180602001604052806000815250815250836000815181106104bf576104bf611a15565b602090810291909101015250909695505050505050565b60608060005b86811015610640576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78d8d8881811061052b5761052b611a15565b905060200201358c6040518363ffffffff1660e01b81526004016105629291909182526001600160a01b0316602082015260400190565b600060405180830381865afa15801561057f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105a79190810190611a2b565b93509350935093506040518060c001604052808d8d888181106105cc576105cc611a15565b9050602002013581526020018b6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061061e5761061e611a15565b602002602001018190525050505050808061063890611ae6565b9150506104dc565b5061064c818585610b6a565b6040516373e4ca1b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e7c9943690610698908490600401611685565b600060405180830381600087803b1580156106b257600080fd5b505af11580156106c6573d6000803e3d6000fd5b5050505060005b86811015610737577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061070857610708611a15565b602002602001015160405161071d9190611aff565b60405180910390a18061072f81611ae6565b9150506106cd565b509695505050505050565b600054610100900460ff1661075d5760005460ff1615610761565b303b155b6107c45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102ad565b600054610100900460ff161580156107e6576000805461ffff19166101011790555b6107ef82610a5b565b6107f8836109d9565b801561080a576000805461ff00191690555b505050565b606061081c848484610b83565b6000610829858585610333565b9050610836858585610bcb565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c09390610882908490600401611685565b600060405180830381600087803b15801561089c57600080fd5b505af11580156108b0573d6000803e3d6000fd5b5050505060005b8151811015610922577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc8282815181106108f3576108f3611a15565b60200260200101516040516109089190611aff565b60405180910390a18061091a81611ae6565b9150506108b7565b50949350505050565b6000546001600160a01b036201000090910416331461095c5760405162461bcd60e51b81526004016102ad90611812565b6001600160a01b0381166109c15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ad565b6102bf81610a5b565b6001600160a01b03163b151590565b6109e6600182600261130f565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df81604051610a1691906114eb565b60405180910390a150565b610a296112f1565b60408051808201918290529060019060029082845b815481526020019060010190808311610a3e575050505050905090565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b610aed6040805160808101825260008082526020808301829052828401829052835180850190945281845283015290606082015290565b60008260000151600081518110610b0657610b06611a15565b60200260200101519050610b1981610c34565b60008160400151806020019051810190610b339190611b22565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610b9182840184611bec565b90506000610b9e82610c78565b90506000610bae6103438761186e565b9050610bba8183610d14565b610bc383610f57565b505050505050565b6000610bd783836110f0565b6000818152600360205260409020549091506001600160a01b03168015610c1457604051631f5d53e360e01b8152600481018390526024016102ad565b610c2d82610c2860408801602089016117f5565b611115565b5050505050565b6000610c43826040015161117b565b82519091508114610c745781516040516337e3d1ab60e01b81526102ad918391600401918252602082015260400190565b5050565b610c80611352565b604051806101000160405280610c95846111b0565b6001600160a01b03168152602001610cac846111c5565b8152602001610cba846111d4565b8152602001610cc8846111e3565b8152602001610cd6846111f2565b8152602001610ce484611201565b8152602001610cfc8460200151610100015160011490565b15158152602001610d0c84611210565b905292915050565b8151604082015114610d4957815160408281015190516347a9715d60e01b8152600481019290925260248201526044016102ad565b81606001516020015115158160c00151151503610d925760608201516020015160c0820151604051634629f1b560e11b81529115156004830152151560248201526044016102ad565b81604001516001600160a01b031681600001516001600160a01b031614610de657604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016102ad565b60408201516001600160a01b03163314610e2a576040808301519051632bfa317f60e11b81523360048201526001600160a01b0390911660248201526044016102ad565b46816020015114610e5d576020810151604051630432cec160e31b815246600482015260248101919091526044016102ad565b81602001518160a0015114610e9857602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016102ad565b6000610ea2610a21565b805160e084015151919250141580610ec7575060208082015160e08401519091015114155b15610f1057805160208083015160e0850151805192015160405163f71cb0f760e01b815260048101949094526024840191909152604483019190915260648201526084016102ad565b6000610f1b84611268565b905080836060015114610f515760608301516040516377bb6d2760e11b81526102ad918391600401918252602082015260400190565b50505050565b8051805160208083015160409384015191850151935163c542c93b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463c542c93b94610fba94909392909190600401611cbd565b602060405180830381865afa925050508015610ff3575060408051601f3d908101601f19168201909252610ff091810190611d64565b60015b6110c957610fff611d7f565b806308c379a0036110385750611013611d9b565b8061101e5750611077565b8060405162dd577760e81b81526004016102ad9190611e24565b634e487b71036110775761104a611e37565b906110555750611077565b60405162dd577760e81b815260206004820152600060248201526044016102ad565b3d8080156110a1576040519150601f19603f3d011682016040523d82523d6000602084013e6110a6565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016102ad565b80610c745760405162dd577760e81b815260206004820152600060248201526044016102ad565b6000806110ff83850185611bec565b9050600061110c826111f2565b95945050505050565b60008281526003602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b805160208201206000906102f0907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190611e57565b6020810151600090815b602002015192915050565b602081015160009060016111ba565b602081015160009060046111ba565b602081015160009060056111ba565b602081015160009060066111ba565b602081015160009060076111ba565b6112186112f1565b6040518060400160405280836020015160026009811061123a5761123a611a15565b60200201518152602001836020015160036009811061125b5761125b611a15565b6020020151905292915050565b600080611286308460600151600001516001600160801b031661128d565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6112869190611e57565b60405180604001604052806002906020820280368337509192915050565b826002810192821561133d579160200282015b8281111561133d578251825591602001919060010190611322565b506113499291506113a2565b5090565b905290565b60405180610100016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200161134d6112f1565b5b8082111561134957600081556001016113a3565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b03821117156113ec576113ec6113b7565b60405250565b606081018181106001600160401b03821117156113ec576113ec6113b7565b601f8201601f191681016001600160401b0381118282101715611436576114366113b7565b6040525050565b600082601f83011261144e57600080fd5b604051604081018181106001600160401b0382111715611470576114706113b7565b806040525080604084018581111561148757600080fd5b845b818110156114a1578035835260209283019201611489565b509195945050505050565b6000604082840312156114be57600080fd5b611286838361143d565b8060005b6002811015610f515781518452602093840193909101906001016114cc565b604081016102f082846114c8565b60006020828403121561150b57600080fd5b5035919050565b60008083601f84011261152457600080fd5b5081356001600160401b0381111561153b57600080fd5b60208301915083602082850101111561155357600080fd5b9250929050565b60008060006040848603121561156f57600080fd5b83356001600160401b038082111561158657600080fd5b908501906040828803121561159a57600080fd5b909350602085013590808211156115b057600080fd5b506115bd86828701611512565b9497909650939450505050565b60005b838110156115e55781810151838201526020016115cd565b83811115610f515750506000910152565b6000815180845261160e8160208601602086016115ca565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261167d60c08501826115f6565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156116da57603f198886030184526116c8858351611622565b945092850192908501906001016116ac565b5092979650505050505050565b6001600160a01b03811681146102bf57600080fd5b8035611707816116e7565b919050565b60008060008060006060868803121561172457600080fd5b85356001600160401b038082111561173b57600080fd5b818801915088601f83011261174f57600080fd5b81358181111561175e57600080fd5b8960208260051b850101111561177357600080fd5b60208301975080965050611789602089016116fc565b9450604088013591508082111561179f57600080fd5b506117ac88828901611512565b969995985093965092949392505050565b600080606083850312156117d057600080fd5b6117da848461143d565b915060408301356117ea816116e7565b809150509250929050565b60006020828403121561180757600080fd5b8135611286816116e7565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006001600160401b03821115611860576118606113b7565b50601f01601f191660200190565b6000604080833603121561188157600080fd5b805161188c816113cd565b83356001600160401b03808211156118a357600080fd5b9085019036601f8301126118b657600080fd5b81356020828211156118ca576118ca6113b7565b8160051b86516118dc83830182611411565b928352848101820192828101368511156118f557600080fd5b83870192505b848310156119c9578235868111156119135760008081fd5b8701606036829003601f190181131561192c5760008081fd5b8a51611937816113f2565b8287013581528b830135818801529082013590888211156119585760008081fd5b9181019136603f84011261196e57600091508182fd5b86830135915061197d82611847565b8c516119898282611411565b838152368e8587010111156119a057600091508182fd5b838e86018a830137600093810189019390935250808c01919091528252509183019183016118fb565b508652506119d88882016116fc565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611a1057611a106119e7565b500190565b634e487b7160e01b600052603260045260246000fd5b60008060008060808587031215611a4157600080fd5b8451611a4c816116e7565b60208601516040870151919550935063ffffffff81168114611a6d57600080fd5b60608601519092506001600160401b03811115611a8957600080fd5b8501601f81018713611a9a57600080fd5b8051611aa581611847565b604051611ab28282611411565b828152896020848601011115611ac757600080fd5b611ad88360208301602087016115ca565b969995985093965050505050565b600060018201611af857611af86119e7565b5060010190565b6020815260006112866020830184611622565b8051801515811461170757600080fd5b600060408284031215611b3457600080fd5b604051604081018181106001600160401b0382111715611b5657611b566113b7565b60405282516001600160801b0381168114611b7057600080fd5b8152611b7e60208401611b12565b60208201529392505050565b600082601f830112611b9b57600080fd5b6040516101208082018281106001600160401b0382111715611bbf57611bbf6113b7565b60405283018185821115611bd257600080fd5b845b828110156114a1578035825260209182019101611bd4565b6000818303610220811215611c0057600080fd5b60408051611c0d816113cd565b61010080841215611c1d57600080fd5b82519350611c2a846113f2565b611c34878761143d565b845286605f870112611c4557600080fd5b8251611c50816113cd565b8060c0880189811115611c6257600080fd5b8589015b81811015611c8757611c788b8261143d565b83526020909201918601611c66565b50826020880152611c988a8261143d565b86880152505050838252611cae87828801611b8a565b60208301525095945050505050565b6102208101611ccc82876114c8565b60408083018660005b6002808210611ce45750611d1f565b82518460005b83811015611d08578251825260209283019290910190600101611cea565b505050928401925060209190910190600101611cd5565b50505050611d3060c08301856114c8565b61010082018360005b6009811015611d58578151835260209283019290910190600101611d39565b50505095945050505050565b600060208284031215611d7657600080fd5b61128682611b12565b600060033d1115611d985760046000803e5060005160e01c5b90565b600060443d1015611da95790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715611dd857505050505090565b8285019150815181811115611df05750505050505090565b843d8701016020828501011115611e0a5750505050505090565b611e1960208286010187611411565b509095945050505050565b60208152600061128660208301846115f6565b60008060233d1115611e53576020600460003e50506000516001905b9091565b600082611e7457634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220f99c2aea826755ba5e1a8e62436347bc7b71c757c34e94a9193c561d9672999164736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063c776adde11610066578063c776adde14610230578063c9cdef0414610243578063e60f999f14610256578063f2fde38b1461026957600080fd5b80638da5cb5b146101d3578063af411a30146101ea578063bfa665851461020a57600080fd5b806354846d7a116100c857806354846d7a1461015c57806363e4afc2146101915780637000b051146101a4578063715018a6146101cb57600080fd5b8063124d7199146100ef5780632785e3221461010457806346657fe914610122575b600080fd5b6101026100fd3660046114ac565b61027c565b005b61010c6102c2565b60405161011991906114eb565b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610119565b6101837f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610119565b61014461019f3660046114f9565b6102d7565b6101837f000000000000000000000000000000000000000000000000000000000000000081565b6101026102f6565b6000546201000090046001600160a01b0316610144565b6101fd6101f836600461155a565b610333565b6040516101199190611685565b7f0000000000000000000000000000000000000000000000000000000000000000610144565b6101fd61023e36600461170c565b6104d6565b6101026102513660046117bd565b610742565b6101fd61026436600461155a565b61080f565b6101026102773660046117f5565b61092b565b6000546001600160a01b03620100009091041633146102b65760405162461bcd60e51b81526004016102ad90611812565b60405180910390fd5b6102bf816109d9565b50565b6102ca6112f1565b6102d2610a21565b905090565b6000818152600360205260408120546001600160a01b03165b92915050565b6000546001600160a01b03620100009091041633146103275760405162461bcd60e51b81526004016102ad90611812565b6103316000610a5b565b565b606060006103486103438661186e565b610ab6565b60408051600180825281830190925291925060009190816020015b6103b46040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b815260200190600190039081610363575050606083015151909150600090610405906001600160801b03167f00000000000000000000000000000000000000000000000000000000000000006119fd565b90507f000000000000000000000000000000000000000000000000000000000000000081111561044b57604051637bbf29e360e01b8152600481018290526024016102ad565b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b03168152602001856020015181526020014263ffffffff16815260200160405180602001604052806000815250815250836000815181106104bf576104bf611a15565b602090810291909101015250909695505050505050565b60608060005b86811015610640576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78d8d8881811061052b5761052b611a15565b905060200201358c6040518363ffffffff1660e01b81526004016105629291909182526001600160a01b0316602082015260400190565b600060405180830381865afa15801561057f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105a79190810190611a2b565b93509350935093506040518060c001604052808d8d888181106105cc576105cc611a15565b9050602002013581526020018b6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061061e5761061e611a15565b602002602001018190525050505050808061063890611ae6565b9150506104dc565b5061064c818585610b6a565b6040516373e4ca1b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e7c9943690610698908490600401611685565b600060405180830381600087803b1580156106b257600080fd5b505af11580156106c6573d6000803e3d6000fd5b5050505060005b86811015610737577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061070857610708611a15565b602002602001015160405161071d9190611aff565b60405180910390a18061072f81611ae6565b9150506106cd565b509695505050505050565b600054610100900460ff1661075d5760005460ff1615610761565b303b155b6107c45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102ad565b600054610100900460ff161580156107e6576000805461ffff19166101011790555b6107ef82610a5b565b6107f8836109d9565b801561080a576000805461ff00191690555b505050565b606061081c848484610b83565b6000610829858585610333565b9050610836858585610bcb565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c09390610882908490600401611685565b600060405180830381600087803b15801561089c57600080fd5b505af11580156108b0573d6000803e3d6000fd5b5050505060005b8151811015610922577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc8282815181106108f3576108f3611a15565b60200260200101516040516109089190611aff565b60405180910390a18061091a81611ae6565b9150506108b7565b50949350505050565b6000546001600160a01b036201000090910416331461095c5760405162461bcd60e51b81526004016102ad90611812565b6001600160a01b0381166109c15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ad565b6102bf81610a5b565b6001600160a01b03163b151590565b6109e6600182600261130f565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df81604051610a1691906114eb565b60405180910390a150565b610a296112f1565b60408051808201918290529060019060029082845b815481526020019060010190808311610a3e575050505050905090565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b610aed6040805160808101825260008082526020808301829052828401829052835180850190945281845283015290606082015290565b60008260000151600081518110610b0657610b06611a15565b60200260200101519050610b1981610c34565b60008160400151806020019051810190610b339190611b22565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610b9182840184611bec565b90506000610b9e82610c78565b90506000610bae6103438761186e565b9050610bba8183610d14565b610bc383610f57565b505050505050565b6000610bd783836110f0565b6000818152600360205260409020549091506001600160a01b03168015610c1457604051631f5d53e360e01b8152600481018390526024016102ad565b610c2d82610c2860408801602089016117f5565b611115565b5050505050565b6000610c43826040015161117b565b82519091508114610c745781516040516337e3d1ab60e01b81526102ad918391600401918252602082015260400190565b5050565b610c80611352565b604051806101000160405280610c95846111b0565b6001600160a01b03168152602001610cac846111c5565b8152602001610cba846111d4565b8152602001610cc8846111e3565b8152602001610cd6846111f2565b8152602001610ce484611201565b8152602001610cfc8460200151610100015160011490565b15158152602001610d0c84611210565b905292915050565b8151604082015114610d4957815160408281015190516347a9715d60e01b8152600481019290925260248201526044016102ad565b81606001516020015115158160c00151151503610d925760608201516020015160c0820151604051634629f1b560e11b81529115156004830152151560248201526044016102ad565b81604001516001600160a01b031681600001516001600160a01b031614610de657604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016102ad565b60408201516001600160a01b03163314610e2a576040808301519051632bfa317f60e11b81523360048201526001600160a01b0390911660248201526044016102ad565b46816020015114610e5d576020810151604051630432cec160e31b815246600482015260248101919091526044016102ad565b81602001518160a0015114610e9857602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016102ad565b6000610ea2610a21565b805160e084015151919250141580610ec7575060208082015160e08401519091015114155b15610f1057805160208083015160e0850151805192015160405163f71cb0f760e01b815260048101949094526024840191909152604483019190915260648201526084016102ad565b6000610f1b84611268565b905080836060015114610f515760608301516040516377bb6d2760e11b81526102ad918391600401918252602082015260400190565b50505050565b8051805160208083015160409384015191850151935163c542c93b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463c542c93b94610fba94909392909190600401611cbd565b602060405180830381865afa925050508015610ff3575060408051601f3d908101601f19168201909252610ff091810190611d64565b60015b6110c957610fff611d7f565b806308c379a0036110385750611013611d9b565b8061101e5750611077565b8060405162dd577760e81b81526004016102ad9190611e24565b634e487b71036110775761104a611e37565b906110555750611077565b60405162dd577760e81b815260206004820152600060248201526044016102ad565b3d8080156110a1576040519150601f19603f3d011682016040523d82523d6000602084013e6110a6565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016102ad565b80610c745760405162dd577760e81b815260206004820152600060248201526044016102ad565b6000806110ff83850185611bec565b9050600061110c826111f2565b95945050505050565b60008281526003602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b805160208201206000906102f0907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190611e57565b6020810151600090815b602002015192915050565b602081015160009060016111ba565b602081015160009060046111ba565b602081015160009060056111ba565b602081015160009060066111ba565b602081015160009060076111ba565b6112186112f1565b6040518060400160405280836020015160026009811061123a5761123a611a15565b60200201518152602001836020015160036009811061125b5761125b611a15565b6020020151905292915050565b600080611286308460600151600001516001600160801b031661128d565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6112869190611e57565b60405180604001604052806002906020820280368337509192915050565b826002810192821561133d579160200282015b8281111561133d578251825591602001919060010190611322565b506113499291506113a2565b5090565b905290565b60405180610100016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200161134d6112f1565b5b8082111561134957600081556001016113a3565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b03821117156113ec576113ec6113b7565b60405250565b606081018181106001600160401b03821117156113ec576113ec6113b7565b601f8201601f191681016001600160401b0381118282101715611436576114366113b7565b6040525050565b600082601f83011261144e57600080fd5b604051604081018181106001600160401b0382111715611470576114706113b7565b806040525080604084018581111561148757600080fd5b845b818110156114a1578035835260209283019201611489565b509195945050505050565b6000604082840312156114be57600080fd5b611286838361143d565b8060005b6002811015610f515781518452602093840193909101906001016114cc565b604081016102f082846114c8565b60006020828403121561150b57600080fd5b5035919050565b60008083601f84011261152457600080fd5b5081356001600160401b0381111561153b57600080fd5b60208301915083602082850101111561155357600080fd5b9250929050565b60008060006040848603121561156f57600080fd5b83356001600160401b038082111561158657600080fd5b908501906040828803121561159a57600080fd5b909350602085013590808211156115b057600080fd5b506115bd86828701611512565b9497909650939450505050565b60005b838110156115e55781810151838201526020016115cd565b83811115610f515750506000910152565b6000815180845261160e8160208601602086016115ca565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261167d60c08501826115f6565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156116da57603f198886030184526116c8858351611622565b945092850192908501906001016116ac565b5092979650505050505050565b6001600160a01b03811681146102bf57600080fd5b8035611707816116e7565b919050565b60008060008060006060868803121561172457600080fd5b85356001600160401b038082111561173b57600080fd5b818801915088601f83011261174f57600080fd5b81358181111561175e57600080fd5b8960208260051b850101111561177357600080fd5b60208301975080965050611789602089016116fc565b9450604088013591508082111561179f57600080fd5b506117ac88828901611512565b969995985093965092949392505050565b600080606083850312156117d057600080fd5b6117da848461143d565b915060408301356117ea816116e7565b809150509250929050565b60006020828403121561180757600080fd5b8135611286816116e7565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006001600160401b03821115611860576118606113b7565b50601f01601f191660200190565b6000604080833603121561188157600080fd5b805161188c816113cd565b83356001600160401b03808211156118a357600080fd5b9085019036601f8301126118b657600080fd5b81356020828211156118ca576118ca6113b7565b8160051b86516118dc83830182611411565b928352848101820192828101368511156118f557600080fd5b83870192505b848310156119c9578235868111156119135760008081fd5b8701606036829003601f190181131561192c5760008081fd5b8a51611937816113f2565b8287013581528b830135818801529082013590888211156119585760008081fd5b9181019136603f84011261196e57600091508182fd5b86830135915061197d82611847565b8c516119898282611411565b838152368e8587010111156119a057600091508182fd5b838e86018a830137600093810189019390935250808c01919091528252509183019183016118fb565b508652506119d88882016116fc565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611a1057611a106119e7565b500190565b634e487b7160e01b600052603260045260246000fd5b60008060008060808587031215611a4157600080fd5b8451611a4c816116e7565b60208601516040870151919550935063ffffffff81168114611a6d57600080fd5b60608601519092506001600160401b03811115611a8957600080fd5b8501601f81018713611a9a57600080fd5b8051611aa581611847565b604051611ab28282611411565b828152896020848601011115611ac757600080fd5b611ad88360208301602087016115ca565b969995985093965050505050565b600060018201611af857611af86119e7565b5060010190565b6020815260006112866020830184611622565b8051801515811461170757600080fd5b600060408284031215611b3457600080fd5b604051604081018181106001600160401b0382111715611b5657611b566113b7565b60405282516001600160801b0381168114611b7057600080fd5b8152611b7e60208401611b12565b60208201529392505050565b600082601f830112611b9b57600080fd5b6040516101208082018281106001600160401b0382111715611bbf57611bbf6113b7565b60405283018185821115611bd257600080fd5b845b828110156114a1578035825260209182019101611bd4565b6000818303610220811215611c0057600080fd5b60408051611c0d816113cd565b61010080841215611c1d57600080fd5b82519350611c2a846113f2565b611c34878761143d565b845286605f870112611c4557600080fd5b8251611c50816113cd565b8060c0880189811115611c6257600080fd5b8589015b81811015611c8757611c788b8261143d565b83526020909201918601611c66565b50826020880152611c988a8261143d565b86880152505050838252611cae87828801611b8a565b60208301525095945050505050565b6102208101611ccc82876114c8565b60408083018660005b6002808210611ce45750611d1f565b82518460005b83811015611d08578251825260209283019290910190600101611cea565b505050928401925060209190910190600101611cd5565b50505050611d3060c08301856114c8565b61010082018360005b6009811015611d58578151835260209283019290910190600101611d39565b50505095945050505050565b600060208284031215611d7657600080fd5b61128682611b12565b600060033d1115611d985760046000803e5060005160e01c5b90565b600060443d1015611da95790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715611dd857505050505090565b8285019150815181811115611df05750505050505090565b843d8701016020828501011115611e0a5750505050505090565b611e1960208286010187611411565b509095945050505050565b60208152600061128660208301846115f6565b60008060233d1115611e53576020600460003e50506000516001905b9091565b600082611e7457634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220f99c2aea826755ba5e1a8e62436347bc7b71c757c34e94a9193c561d9672999164736f6c634300080e0033", + "devdoc": { + "author": "Sismo", + "kind": "dev", + "methods": { + "buildAttestations(((uint256,uint256,bytes)[],address),bytes)": { + "details": "Returns attestations that will be recorded, constructed from the user request", + "params": { + "request": "users request. Claim of having an account part of a group of accounts" + } + }, + "constructor": { + "details": "Constructor. Initializes the contract", + "params": { + "attestationsRegistryAddress": "Attestations Registry contract on which the attester will write attestations", + "collectionIdFirst": "Id of the first collection in which the attester is supposed to record", + "collectionIdLast": "Id of the last collection in which the attester is supposed to record", + "commitmentSignerPubKey": "The EdDSA public key of the commitment signer for the Pythia 1 Proving Scheme", + "owner": "The owner of the contract that can update the commitment signer pub key", + "pythia1VerifierAddress": "ZK Snark Pythia-1 Verifier contract" + } + }, + "deleteAttestations(uint256[],address,bytes)": { + "details": "External facing function. Allows to delete attestations by submitting proof", + "params": { + "attestationsOwner": "Owner of attestations to delete", + "collectionIds": "Collection identifier of attestations to delete", + "proofData": "Data sent along the deletion request to prove its validity" + }, + "returns": { + "_0": "attestations Attestations that were deleted" + } + }, + "generateAttestations(((uint256,uint256,bytes)[],address),bytes)": { + "details": "Main external function. Allows to generate attestations by making a request and submitting proof", + "params": { + "proofData": "Data sent along the request to prove its validity", + "request": "User request" + }, + "returns": { + "_0": "attestations Attestations that has been recorded" + } + }, + "getAttestationRegistry()": { + "details": "Attestation registry getter", + "returns": { + "_0": "attestationRegistry" + } + }, + "getCommitmentSignerPubKey()": { + "details": "Getter of the Commitment signer Eddsa Public key" + }, + "getDestinationOfTicket(uint256)": { + "details": "Getter, returns the last attestation destination of a ticket", + "params": { + "userTicket": "ticket used*" + } + }, + "getVerifier()": { + "details": "Getter of Pythia-1 Verifier contract" + }, + "initialize(uint256[2],address)": { + "details": "Initializes the contract, to be called by the proxy delegating calls to this implementation", + "params": { + "commitmentSignerPubKey": "EdDSA public key of the commitment signer", + "owner": "Owner of the contract, can update public key and address" + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "stateVariables": { + "AUTHORIZED_COLLECTION_ID_FIRST": { + "details": "Getter returns of the first collection in which the attester is supposed to record*" + }, + "AUTHORIZED_COLLECTION_ID_LAST": { + "details": "Getter returns of the last collection in which the attester is supposed to record*" + } + }, + "title": "Pythia-1 Simple Attester", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "notice": "This attester is part of the family of the Pythia-1 Attesters. Pythia-1 attesters enable users to prove they have a claim and its proof issued by an offchain service in a privacy preserving way. That means no-one can make the link between the account used in the offchain service and the onchain account where the attestation is stored. The Pythia-1 Base abstract contract is inherited and holds the complex Pythia 1 verification logic. We invite readers to refer to: - https://pythia-1.docs.sismo.io for a full guide through the Pythia-1 ZK Attestations - https://pythia-1-circuits.docs.sismo.io for circuits, prover and verifiers of Pythia-1 This specific attester has the following characteristics: - Zero Knowledge One cannot deduct from an attestation what offchain issuer's account was used to generate the underlying proof - Non Strict (scores) If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100. This attester generate attestations of scores - Ticketed Each users gets one userTicket per claim For people used to semaphore/ tornado cash people: userTicket = hash(secret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier)*", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 936, + "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 939, + "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 389, + "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", + "label": "_owner", + "offset": 2, + "slot": "0", + "type": "t_address" + }, + { + "astId": 8268, + "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", + "label": "_commitmentSignerPubKey", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)2_storage" + }, + { + "astId": 8272, + "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", + "label": "_ticketsDestinations", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint256,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)2_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[2]", + "numberOfBytes": "64" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_mapping(t_uint256,t_address)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/Pythia1SimpleAttesterProxy.json b/deployments/mumbai/Pythia1SimpleAttesterProxy.json new file mode 100644 index 0000000..0109c11 --- /dev/null +++ b/deployments/mumbai/Pythia1SimpleAttesterProxy.json @@ -0,0 +1,276 @@ +{ + "address": "0x1586190051bf7bb0b754A7AA7CDde21E920ad009", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_logic", + "type": "address" + }, + { + "internalType": "address", + "name": "admin_", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousAdmin", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "AdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "beacon", + "type": "address" + } + ], + "name": "BeaconUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "Upgraded", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [], + "name": "admin", + "outputs": [ + { + "internalType": "address", + "name": "admin_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "changeAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "implementation_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "upgradeTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newImplementation", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "upgradeToAndCall", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xecd2ffdd3fb951d04e41cc8cb319366b0cda73c75821f380704f161304034f8e", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x1586190051bf7bb0b754A7AA7CDde21E920ad009", + "transactionIndex": 2, + "gasUsed": "657801", + "logsBloom": "0x00000000000000000000000000040000400000000000000000800010000000000000000000000020000000000000000000008000000040000000000000010000040000000000000000000000000002800001000000000000000100800000000000000000020000000000000000000800000000800000000080000000000000400000000000000000000000000000000000000010000080000000000000808000200000000000000000200000200000000000000000000000000000000000004000000020000000000001000000000000000000000400000000100000001020000000000000000000000000000000000000000200000000000020000000100000", + "blockHash": "0x4e9b6480f0ad3eccfa386b8f7ff38b1e8f3019595af07be6220ec2dfbe54914b", + "transactionHash": "0xecd2ffdd3fb951d04e41cc8cb319366b0cda73c75821f380704f161304034f8e", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 28600085, + "transactionHash": "0xecd2ffdd3fb951d04e41cc8cb319366b0cda73c75821f380704f161304034f8e", + "address": "0x1586190051bf7bb0b754A7AA7CDde21E920ad009", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x0000000000000000000000007d4358593d1f3e8202d7d3a7f3fa9e97a61b464e" + ], + "data": "0x", + "logIndex": 10, + "blockHash": "0x4e9b6480f0ad3eccfa386b8f7ff38b1e8f3019595af07be6220ec2dfbe54914b" + }, + { + "transactionIndex": 2, + "blockNumber": 28600085, + "transactionHash": "0xecd2ffdd3fb951d04e41cc8cb319366b0cda73c75821f380704f161304034f8e", + "address": "0x1586190051bf7bb0b754A7AA7CDde21E920ad009", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 11, + "blockHash": "0x4e9b6480f0ad3eccfa386b8f7ff38b1e8f3019595af07be6220ec2dfbe54914b" + }, + { + "transactionIndex": 2, + "blockNumber": 28600085, + "transactionHash": "0xecd2ffdd3fb951d04e41cc8cb319366b0cda73c75821f380704f161304034f8e", + "address": "0x1586190051bf7bb0b754A7AA7CDde21E920ad009", + "topics": [ + "0xda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df" + ], + "data": "0x038d3d596875c66eb90608bbe04e4e238607fd32ad61f4278bdaf47aadc28d601b46b55a0ce3f35d6025cdd4554aaac1fc7180b14d51b0f15aa51a6929bdb952", + "logIndex": 12, + "blockHash": "0x4e9b6480f0ad3eccfa386b8f7ff38b1e8f3019595af07be6220ec2dfbe54914b" + }, + { + "transactionIndex": 2, + "blockNumber": 28600085, + "transactionHash": "0xecd2ffdd3fb951d04e41cc8cb319366b0cda73c75821f380704f161304034f8e", + "address": "0x1586190051bf7bb0b754A7AA7CDde21E920ad009", + "topics": [ + "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000246e71bc2a257f4be9c7fad4664e6d7444844adc", + "logIndex": 13, + "blockHash": "0x4e9b6480f0ad3eccfa386b8f7ff38b1e8f3019595af07be6220ec2dfbe54914b" + }, + { + "transactionIndex": 2, + "blockNumber": 28600085, + "transactionHash": "0xecd2ffdd3fb951d04e41cc8cb319366b0cda73c75821f380704f161304034f8e", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99" + ], + "data": "0x000000000000000000000000000000000000000000000000000b2045c5c1e74d0000000000000000000000000000000000000000000000007e988c4bda10fa7b0000000000000000000000000000000000000000000007c531247d7793ce3ea60000000000000000000000000000000000000000000000007e8d6c06144f132e0000000000000000000000000000000000000000000007c5312f9dbd599025f3", + "logIndex": 14, + "blockHash": "0x4e9b6480f0ad3eccfa386b8f7ff38b1e8f3019595af07be6220ec2dfbe54914b" + } + ], + "blockNumber": 28600085, + "cumulativeGasUsed": "788600", + "status": 1, + "byzantium": true + }, + "args": [ + "0x7D4358593d1F3e8202d7d3a7f3Fa9e97a61b464E", + "0x246E71bC2a257f4BE9C7fAD4664E6D7444844Adc", + "0xc9cdef04038d3d596875c66eb90608bbe04e4e238607fd32ad61f4278bdaf47aadc28d601b46b55a0ce3f35d6025cdd4554aaac1fc7180b14d51b0f15aa51a6929bdb952000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_logic\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"beacon\",\"type\":\"address\"}],\"name\":\"BeaconUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"admin_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"implementation_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \\\"admin cannot fallback to proxy target\\\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\",\"kind\":\"dev\",\"methods\":{\"admin()\":{\"details\":\"Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\"},\"changeAdmin(address)\":{\"details\":\"Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\"},\"constructor\":{\"details\":\"Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\"},\"implementation()\":{\"details\":\"Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\"},\"upgradeTo(address)\":{\"details\":\"Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\"},\"upgradeToAndCall(address,bytes)\":{\"details\":\"Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/periphery/utils/TransparentUpgradeableProxy.sol\":\"TransparentUpgradeableProxy\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC1822.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\\n * proxy whose upgrades are fully controlled by the current implementation.\\n */\\ninterface IERC1822Proxiable {\\n /**\\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\\n * address.\\n *\\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\\n * function revert if invoked through a proxy.\\n */\\n function proxiableUUID() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0x1d4afe6cb24200cc4545eed814ecf5847277dfe5d613a1707aad5fceecebcfff\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Proxy.sol\\\";\\nimport \\\"./ERC1967Upgrade.sol\\\";\\n\\n/**\\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\\n * implementation address that can be changed. This address is stored in storage in the location specified by\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\\n * implementation behind the proxy.\\n */\\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\\n /**\\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\\n *\\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\\n */\\n constructor(address _logic, bytes memory _data) payable {\\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\\\"eip1967.proxy.implementation\\\")) - 1));\\n _upgradeToAndCall(_logic, _data, false);\\n }\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _implementation() internal view virtual override returns (address impl) {\\n return ERC1967Upgrade._getImplementation();\\n }\\n}\\n\",\"keccak256\":\"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../beacon/IBeacon.sol\\\";\\nimport \\\"../../interfaces/draft-IERC1822.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/StorageSlot.sol\\\";\\n\\n/**\\n * @dev This abstract contract provides getters and event emitting update functions for\\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\\n *\\n * _Available since v4.1._\\n *\\n * @custom:oz-upgrades-unsafe-allow delegatecall\\n */\\nabstract contract ERC1967Upgrade {\\n // This is the keccak-256 hash of \\\"eip1967.proxy.rollback\\\" subtracted by 1\\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\\n\\n /**\\n * @dev Storage slot with the address of the current implementation.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n /**\\n * @dev Emitted when the implementation is upgraded.\\n */\\n event Upgraded(address indexed implementation);\\n\\n /**\\n * @dev Returns the current implementation address.\\n */\\n function _getImplementation() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 implementation slot.\\n */\\n function _setImplementation(address newImplementation) private {\\n require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n }\\n\\n /**\\n * @dev Perform implementation upgrade\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeTo(address newImplementation) internal {\\n _setImplementation(newImplementation);\\n emit Upgraded(newImplementation);\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCall(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _upgradeTo(newImplementation);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(newImplementation, data);\\n }\\n }\\n\\n /**\\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\\n *\\n * Emits an {Upgraded} event.\\n */\\n function _upgradeToAndCallUUPS(\\n address newImplementation,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n // Upgrades from old implementations will perform a rollback test. This test requires the new\\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\\n // this special case will break upgrade paths from old UUPS implementation to new ones.\\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\\n _setImplementation(newImplementation);\\n } else {\\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\\n require(slot == _IMPLEMENTATION_SLOT, \\\"ERC1967Upgrade: unsupported proxiableUUID\\\");\\n } catch {\\n revert(\\\"ERC1967Upgrade: new implementation is not UUPS\\\");\\n }\\n _upgradeToAndCall(newImplementation, data, forceCall);\\n }\\n }\\n\\n /**\\n * @dev Storage slot with the admin of the contract.\\n * This is the keccak-256 hash of \\\"eip1967.proxy.admin\\\" subtracted by 1, and is\\n * validated in the constructor.\\n */\\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\\n\\n /**\\n * @dev Emitted when the admin account has changed.\\n */\\n event AdminChanged(address previousAdmin, address newAdmin);\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _getAdmin() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new address in the EIP1967 admin slot.\\n */\\n function _setAdmin(address newAdmin) private {\\n require(newAdmin != address(0), \\\"ERC1967: new admin is the zero address\\\");\\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n */\\n function _changeAdmin(address newAdmin) internal {\\n emit AdminChanged(_getAdmin(), newAdmin);\\n _setAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\\n */\\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\\n\\n /**\\n * @dev Emitted when the beacon is upgraded.\\n */\\n event BeaconUpgraded(address indexed beacon);\\n\\n /**\\n * @dev Returns the current beacon.\\n */\\n function _getBeacon() internal view returns (address) {\\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\\n }\\n\\n /**\\n * @dev Stores a new beacon in the EIP1967 beacon slot.\\n */\\n function _setBeacon(address newBeacon) private {\\n require(Address.isContract(newBeacon), \\\"ERC1967: new beacon is not a contract\\\");\\n require(\\n Address.isContract(IBeacon(newBeacon).implementation()),\\n \\\"ERC1967: beacon implementation is not a contract\\\"\\n );\\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\\n }\\n\\n /**\\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\\n *\\n * Emits a {BeaconUpgraded} event.\\n */\\n function _upgradeBeaconToAndCall(\\n address newBeacon,\\n bytes memory data,\\n bool forceCall\\n ) internal {\\n _setBeacon(newBeacon);\\n emit BeaconUpgraded(newBeacon);\\n if (data.length > 0 || forceCall) {\\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xabf3f59bc0e5423eae45e459dbe92e7052c6983628d39008590edc852a62f94a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/Proxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/Proxy.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\\n * be specified by overriding the virtual {_implementation} function.\\n *\\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\\n * different contract through the {_delegate} function.\\n *\\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\\n */\\nabstract contract Proxy {\\n /**\\n * @dev Delegates the current call to `implementation`.\\n *\\n * This function does not return to its internal call site, it will return directly to the external caller.\\n */\\n function _delegate(address implementation) internal virtual {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n /**\\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\\n * and {_fallback} should delegate.\\n */\\n function _implementation() internal view virtual returns (address);\\n\\n /**\\n * @dev Delegates the current call to the address returned by `_implementation()`.\\n *\\n * This function does not return to its internall call site, it will return directly to the external caller.\\n */\\n function _fallback() internal virtual {\\n _beforeFallback();\\n _delegate(_implementation());\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\\n * function in the contract matches the call data.\\n */\\n fallback() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\\n * is empty.\\n */\\n receive() external payable virtual {\\n _fallback();\\n }\\n\\n /**\\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\\n * call, or as part of the Solidity `fallback` or `receive` functions.\\n *\\n * If overriden should call `super._beforeFallback()`.\\n */\\n function _beforeFallback() internal virtual {}\\n}\\n\",\"keccak256\":\"0x0edeb16b9821ae2b16e9d69c383b38d3ad2fbb3e0c06cf809a0786d96e602551\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/beacon/IBeacon.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\\n */\\ninterface IBeacon {\\n /**\\n * @dev Must return an address that can be used as a delegate call target.\\n *\\n * {BeaconProxy} will check that this address is a contract.\\n */\\n function implementation() external view returns (address);\\n}\\n\",\"keccak256\":\"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/StorageSlot.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Library for reading and writing primitive types to specific storage slots.\\n *\\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\\n * This library helps with reading and writing to such slots without the need for inline assembly.\\n *\\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\\n *\\n * Example usage to set ERC1967 implementation slot:\\n * ```\\n * contract ERC1967 {\\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n *\\n * function _getImplementation() internal view returns (address) {\\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\\n * }\\n *\\n * function _setImplementation(address newImplementation) internal {\\n * require(Address.isContract(newImplementation), \\\"ERC1967: new implementation is not a contract\\\");\\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\\n * }\\n * }\\n * ```\\n *\\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\\n */\\nlibrary StorageSlot {\\n struct AddressSlot {\\n address value;\\n }\\n\\n struct BooleanSlot {\\n bool value;\\n }\\n\\n struct Bytes32Slot {\\n bytes32 value;\\n }\\n\\n struct Uint256Slot {\\n uint256 value;\\n }\\n\\n /**\\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\\n */\\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\\n */\\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\\n */\\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n\\n /**\\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\\n */\\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\\n assembly {\\n r.slot := slot\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca\",\"license\":\"MIT\"},\"contracts/periphery/utils/TransparentUpgradeableProxy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\\n// Note: we just copied so that we can see the contract used\\npragma solidity ^0.8.14;\\n\\nimport {ERC1967Proxy} from '@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol';\\n\\n/**\\n * @dev This contract implements a proxy that is upgradeable by an admin.\\n *\\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\\n * clashing], which can potentially be used in an attack, this contract uses the\\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\\n * things that go hand in hand:\\n *\\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\\n * that call matches one of the admin functions exposed by the proxy itself.\\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\\n * \\\"admin cannot fallback to proxy target\\\".\\n *\\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\\n * to sudden errors when trying to call a function from the proxy implementation.\\n *\\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\\n */\\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\\n /**\\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\\n */\\n constructor(\\n address _logic,\\n address admin_,\\n bytes memory _data\\n ) payable ERC1967Proxy(_logic, _data) {\\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1));\\n _changeAdmin(admin_);\\n }\\n\\n /**\\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\\n */\\n modifier ifAdmin() {\\n if (msg.sender == _getAdmin()) {\\n _;\\n } else {\\n _fallback();\\n }\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\\n */\\n function admin() external ifAdmin returns (address admin_) {\\n admin_ = _getAdmin();\\n }\\n\\n /**\\n * @dev Returns the current implementation.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\\n *\\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\\n */\\n function implementation() external ifAdmin returns (address implementation_) {\\n implementation_ = _implementation();\\n }\\n\\n /**\\n * @dev Changes the admin of the proxy.\\n *\\n * Emits an {AdminChanged} event.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\\n */\\n function changeAdmin(address newAdmin) external virtual ifAdmin {\\n _changeAdmin(newAdmin);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\\n */\\n function upgradeTo(address newImplementation) external ifAdmin {\\n _upgradeToAndCall(newImplementation, bytes(''), false);\\n }\\n\\n /**\\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\\n * proxied contract.\\n *\\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\\n */\\n function upgradeToAndCall(address newImplementation, bytes calldata data)\\n external\\n payable\\n ifAdmin\\n {\\n _upgradeToAndCall(newImplementation, data, true);\\n }\\n\\n /**\\n * @dev Returns the current admin.\\n */\\n function _admin() internal view virtual returns (address) {\\n return _getAdmin();\\n }\\n\\n /**\\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\\n */\\n function _beforeFallback() internal virtual override {\\n require(\\n msg.sender != _getAdmin(),\\n 'TransparentUpgradeableProxy: admin cannot fallback to proxy target'\\n );\\n super._beforeFallback();\\n }\\n}\\n\",\"keccak256\":\"0x0d943fb8814617343a244f762e791c664bb647e32d484ba94fe1958bac85f6dc\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162000f2a38038062000f2a833981016040819052620000269162000519565b82816200005560017f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbd620005f9565b60008051602062000ee3833981519152146200007557620000756200061f565b6200008382826000620000e7565b50620000b3905060017fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6104620005f9565b60008051602062000ec383398151915214620000d357620000d36200061f565b620000de8262000124565b50505062000688565b620000f2836200017f565b600082511180620001005750805b156200011f576200011d8383620001c160201b6200022e1760201c565b505b505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6200014f620001f0565b604080516001600160a01b03928316815291841660208301520160405180910390a16200017c8162000229565b50565b6200018a81620002de565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6060620001e9838360405180606001604052806027815260200162000f036027913962000381565b9392505050565b60006200021a60008051602062000ec383398151915260001b6200046760201b620001ea1760201c565b546001600160a01b0316919050565b6001600160a01b038116620002945760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b80620002bd60008051602062000ec383398151915260001b6200046760201b620001ea1760201c565b80546001600160a01b0319166001600160a01b039290921691909117905550565b620002f4816200046a60201b6200025a1760201c565b620003585760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016200028b565b80620002bd60008051602062000ee383398151915260001b6200046760201b620001ea1760201c565b60606001600160a01b0384163b620003eb5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016200028b565b600080856001600160a01b03168560405162000408919062000635565b600060405180830381855af49150503d806000811462000445576040519150601f19603f3d011682016040523d82523d6000602084013e6200044a565b606091505b5090925090506200045d82828662000479565b9695505050505050565b90565b6001600160a01b03163b151590565b606083156200048a575081620001e9565b8251156200049b5782518084602001fd5b8160405162461bcd60e51b81526004016200028b919062000653565b80516001600160a01b0381168114620004cf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101562000507578181015183820152602001620004ed565b838111156200011d5750506000910152565b6000806000606084860312156200052f57600080fd5b6200053a84620004b7565b92506200054a60208501620004b7565b60408501519092506001600160401b03808211156200056857600080fd5b818601915086601f8301126200057d57600080fd5b815181811115620005925762000592620004d4565b604051601f8201601f19908116603f01168101908382118183101715620005bd57620005bd620004d4565b81604052828152896020848701011115620005d757600080fd5b620005ea836020830160208801620004ea565b80955050505050509250925092565b6000828210156200061a57634e487b7160e01b600052601160045260246000fd5b500390565b634e487b7160e01b600052600160045260246000fd5b6000825162000649818460208701620004ea565b9190910192915050565b602081526000825180602084015262000674816040850160208701620004ea565b601f01601f19169190910160400192915050565b61082b80620006986000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b5565b610118565b61005b6100933660046106d0565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b5565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107cf602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6104bb565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610368836104e3565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610523565b60606001600160a01b0384163b6104465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016102f5565b600080856001600160a01b031685604051610461919061077f565b600060405180830381855af49150503d806000811461049c576040519150601f19603f3d011682016040523d82523d6000602084013e6104a1565b606091505b50915091506104b18282866105cc565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b6104ec81610605565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105885760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105db575081610253565b8251156105eb5782518084602001fd5b8160405162461bcd60e51b81526004016102f5919061079b565b6001600160a01b0381163b6106725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105ab565b80356001600160a01b03811681146106b057600080fd5b919050565b6000602082840312156106c757600080fd5b61025382610699565b6000806000604084860312156106e557600080fd5b6106ee84610699565b9250602084013567ffffffffffffffff8082111561070b57600080fd5b818601915086601f83011261071f57600080fd5b81358181111561072e57600080fd5b87602082850101111561074057600080fd5b6020830194508093505050509250925092565b60005b8381101561076e578181015183820152602001610756565b838111156103845750506000910152565b60008251610791818460208701610753565b9190910192915050565b60208152600082518060208401526107ba816040850160208701610753565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200396e81b41a53c52a5f2bff0f6a830a500e30d67dcfc4c47e029fb4021c6775064736f6c634300080e0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564", + "deployedBytecode": "0x60806040526004361061004e5760003560e01c80633659cfe6146100655780634f1ef286146100855780635c60da1b146100985780638f283970146100c9578063f851a440146100e95761005d565b3661005d5761005b6100fe565b005b61005b6100fe565b34801561007157600080fd5b5061005b6100803660046106b5565b610118565b61005b6100933660046106d0565b610155565b3480156100a457600080fd5b506100ad6101bc565b6040516001600160a01b03909116815260200160405180910390f35b3480156100d557600080fd5b5061005b6100e43660046106b5565b6101ed565b3480156100f557600080fd5b506100ad61020d565b610106610269565b6101166101116102fe565b610308565b565b61012061032c565b6001600160a01b0316330361014d5761014a8160405180602001604052806000815250600061035f565b50565b61014a6100fe565b61015d61032c565b6001600160a01b031633036101b4576101af8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061035f915050565b505050565b6101af6100fe565b60006101c661032c565b6001600160a01b031633036101e2576101dd6102fe565b905090565b6101ea6100fe565b90565b6101f561032c565b6001600160a01b0316330361014d5761014a8161038a565b600061021761032c565b6001600160a01b031633036101e2576101dd61032c565b606061025383836040518060600160405280602781526020016107cf602791396103de565b9392505050565b6001600160a01b03163b151590565b61027161032c565b6001600160a01b031633036101165760405162461bcd60e51b815260206004820152604260248201527f5472616e73706172656e745570677261646561626c6550726f78793a2061646d60448201527f696e2063616e6e6f742066616c6c6261636b20746f2070726f78792074617267606482015261195d60f21b608482015260a4015b60405180910390fd5b60006101dd6104bb565b3660008037600080366000845af43d6000803e808015610327573d6000f35b3d6000fd5b60007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b546001600160a01b0316919050565b610368836104e3565b6000825111806103755750805b156101af57610384838361022e565b50505050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6103b361032c565b604080516001600160a01b03928316815291841660208301520160405180910390a161014a81610523565b60606001600160a01b0384163b6104465760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016102f5565b600080856001600160a01b031685604051610461919061077f565b600060405180830381855af49150503d806000811461049c576040519150601f19603f3d011682016040523d82523d6000602084013e6104a1565b606091505b50915091506104b18282866105cc565b9695505050505050565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc610350565b6104ec81610605565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6001600160a01b0381166105885760405162461bcd60e51b815260206004820152602660248201527f455243313936373a206e65772061646d696e20697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f5565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035b80546001600160a01b0319166001600160a01b039290921691909117905550565b606083156105db575081610253565b8251156105eb5782518084602001fd5b8160405162461bcd60e51b81526004016102f5919061079b565b6001600160a01b0381163b6106725760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016102f5565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc6105ab565b80356001600160a01b03811681146106b057600080fd5b919050565b6000602082840312156106c757600080fd5b61025382610699565b6000806000604084860312156106e557600080fd5b6106ee84610699565b9250602084013567ffffffffffffffff8082111561070b57600080fd5b818601915086601f83011261071f57600080fd5b81358181111561072e57600080fd5b87602082850101111561074057600080fd5b6020830194508093505050509250925092565b60005b8381101561076e578181015183820152602001610756565b838111156103845750506000910152565b60008251610791818460208701610753565b9190910192915050565b60208152600082518060208401526107ba816040850160208701610753565b601f01601f1916919091016040019291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a26469706673582212200396e81b41a53c52a5f2bff0f6a830a500e30d67dcfc4c47e029fb4021c6775064736f6c634300080e0033", + "devdoc": { + "details": "This contract implements a proxy that is upgradeable by an admin. To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector clashing], which can potentially be used in an attack, this contract uses the https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two things that go hand in hand: 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if that call matches one of the admin functions exposed by the proxy itself. 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the implementation. If the admin tries to call a function on the implementation it will fail with an error that says \"admin cannot fallback to proxy target\". These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due to sudden errors when trying to call a function from the proxy implementation. Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way, you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.", + "kind": "dev", + "methods": { + "admin()": { + "details": "Returns the current admin. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`" + }, + "changeAdmin(address)": { + "details": "Changes the admin of the proxy. Emits an {AdminChanged} event. NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}." + }, + "constructor": { + "details": "Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}." + }, + "implementation()": { + "details": "Returns the current implementation. NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}. TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`" + }, + "upgradeTo(address)": { + "details": "Upgrade the implementation of the proxy. NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}." + }, + "upgradeToAndCall(address,bytes)": { + "details": "Upgrade the implementation of the proxy, and then call a function from the new implementation as specified by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the proxied contract. NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}." + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/Pythia1Verifier.json b/deployments/mumbai/Pythia1Verifier.json new file mode 100644 index 0000000..992ceba --- /dev/null +++ b/deployments/mumbai/Pythia1Verifier.json @@ -0,0 +1,97 @@ +{ + "address": "0x115dFa344C877fF74e970F06BE10FF5A59EAba02", + "abi": [ + { + "inputs": [ + { + "internalType": "uint256[2]", + "name": "a", + "type": "uint256[2]" + }, + { + "internalType": "uint256[2][2]", + "name": "b", + "type": "uint256[2][2]" + }, + { + "internalType": "uint256[2]", + "name": "c", + "type": "uint256[2]" + }, + { + "internalType": "uint256[9]", + "name": "input", + "type": "uint256[9]" + } + ], + "name": "verifyProof", + "outputs": [ + { + "internalType": "bool", + "name": "r", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x16f1c0c6e8bd77f3d470f3dedda19d89247917fe6f7918e831531d7add662d4a", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0x115dFa344C877fF74e970F06BE10FF5A59EAba02", + "transactionIndex": 47, + "gasUsed": "1221464", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000010000000000000000000000020000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000010000000000000000000008000200000000000000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000001000000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0xcf9a0856f376a52189220b0ce35d92734ae301243530ed010e48c813e542bddc", + "transactionHash": "0x16f1c0c6e8bd77f3d470f3dedda19d89247917fe6f7918e831531d7add662d4a", + "logs": [ + { + "transactionIndex": 47, + "blockNumber": 28600078, + "transactionHash": "0x16f1c0c6e8bd77f3d470f3dedda19d89247917fe6f7918e831531d7add662d4a", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99" + ], + "data": "0x000000000000000000000000000000000000000000000000001569ae17fbc83800000000000000000000000000000000000000000000000080b66afa93ee8ef40000000000000000000000000000000000000000000007c52cad548d0060ac1200000000000000000000000000000000000000000000000080a1014c7bf2c6bc0000000000000000000000000000000000000000000007c52cc2be3b185c744a", + "logIndex": 268, + "blockHash": "0xcf9a0856f376a52189220b0ce35d92734ae301243530ed010e48c813e542bddc" + } + ], + "blockNumber": 28600078, + "cumulativeGasUsed": "9445272", + "status": 1, + "byzantium": true + }, + "args": [], + "numDeployments": 1, + "solcInputHash": "70d5ec851bd4311fac67c09b114b9c0c", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256[2]\",\"name\":\"a\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[2][2]\",\"name\":\"b\",\"type\":\"uint256[2][2]\"},{\"internalType\":\"uint256[2]\",\"name\":\"c\",\"type\":\"uint256[2]\"},{\"internalType\":\"uint256[9]\",\"name\":\"input\",\"type\":\"uint256[9]\"}],\"name\":\"verifyProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"r\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"verifyProof(uint256[2],uint256[2][2],uint256[2],uint256[9])\":{\"returns\":{\"r\":\" bool true if proof is valid\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@sismo-core/pythia-1/contracts/Pythia1Verifier.sol\":\"Pythia1Verifier\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@sismo-core/pythia-1/contracts/Pythia1Verifier.sol\":{\"content\":\"//\\n// Copyright 2017 Christian Reitwiessner\\n// 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:\\n// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\\n// 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.\\n//\\n// 2019 OKIMS\\n// ported to solidity 0.6\\n// fixed linter warnings\\n// added requiere error messages\\n//\\n//\\n// SPDX-License-Identifier: GPL-3.0\\npragma solidity ^0.8.0;\\nlibrary Pairing {\\n struct G1Point {\\n uint X;\\n uint Y;\\n }\\n // Encoding of field elements is: X[0] * z + X[1]\\n struct G2Point {\\n uint[2] X;\\n uint[2] Y;\\n }\\n /// @return the generator of G1\\n function P1() internal pure returns (G1Point memory) {\\n return G1Point(1, 2);\\n }\\n /// @return the generator of G2\\n function P2() internal pure returns (G2Point memory) {\\n // Original code point\\n return G2Point(\\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\\n );\\n\\n/*\\n // Changed by Jordi point\\n return G2Point(\\n [10857046999023057135944570762232829481370756359578518086990519993285655852781,\\n 11559732032986387107991004021392285783925812861821192530917403151452391805634],\\n [8495653923123431417604973247489272438418190587263600148770280649306958101930,\\n 4082367875863433681332203403145435568316851327593401208105741076214120093531]\\n );\\n*/\\n }\\n /// @return r the negation of p, i.e. p.addition(p.negate()) should be zero.\\n function negate(G1Point memory p) internal pure returns (G1Point memory r) {\\n // The prime q in the base field F_q for G1\\n uint q = 21888242871839275222246405745257275088696311157297823662689037894645226208583;\\n if (p.X == 0 && p.Y == 0)\\n return G1Point(0, 0);\\n return G1Point(p.X, q - (p.Y % q));\\n }\\n /// @return r the sum of two points of G1\\n function addition(G1Point memory p1, G1Point memory p2) internal view returns (G1Point memory r) {\\n uint[4] memory input;\\n input[0] = p1.X;\\n input[1] = p1.Y;\\n input[2] = p2.X;\\n input[3] = p2.Y;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require(success,\\\"pairing-add-failed\\\");\\n }\\n /// @return r the product of a point on G1 and a scalar, i.e.\\n /// p == p.scalar_mul(1) and p.addition(p) == p.scalar_mul(2) for all points p.\\n function scalar_mul(G1Point memory p, uint s) internal view returns (G1Point memory r) {\\n uint[3] memory input;\\n input[0] = p.X;\\n input[1] = p.Y;\\n input[2] = s;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require (success,\\\"pairing-mul-failed\\\");\\n }\\n /// @return the result of computing the pairing check\\n /// e(p1[0], p2[0]) * .... * e(p1[n], p2[n]) == 1\\n /// For example pairing([P1(), P1().negate()], [P2(), P2()]) should\\n /// return true.\\n function pairing(G1Point[] memory p1, G2Point[] memory p2) internal view returns (bool) {\\n require(p1.length == p2.length,\\\"pairing-lengths-failed\\\");\\n uint elements = p1.length;\\n uint inputSize = elements * 6;\\n uint[] memory input = new uint[](inputSize);\\n for (uint i = 0; i < elements; i++)\\n {\\n input[i * 6 + 0] = p1[i].X;\\n input[i * 6 + 1] = p1[i].Y;\\n input[i * 6 + 2] = p2[i].X[0];\\n input[i * 6 + 3] = p2[i].X[1];\\n input[i * 6 + 4] = p2[i].Y[0];\\n input[i * 6 + 5] = p2[i].Y[1];\\n }\\n uint[1] memory out;\\n bool success;\\n // solium-disable-next-line security/no-inline-assembly\\n assembly {\\n success := staticcall(sub(gas(), 2000), 8, add(input, 0x20), mul(inputSize, 0x20), out, 0x20)\\n // Use \\\"invalid\\\" to make gas estimation work\\n switch success case 0 { invalid() }\\n }\\n require(success,\\\"pairing-opcode-failed\\\");\\n return out[0] != 0;\\n }\\n /// Convenience method for a pairing check for two pairs.\\n function pairingProd2(G1Point memory a1, G2Point memory a2, G1Point memory b1, G2Point memory b2) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](2);\\n G2Point[] memory p2 = new G2Point[](2);\\n p1[0] = a1;\\n p1[1] = b1;\\n p2[0] = a2;\\n p2[1] = b2;\\n return pairing(p1, p2);\\n }\\n /// Convenience method for a pairing check for three pairs.\\n function pairingProd3(\\n G1Point memory a1, G2Point memory a2,\\n G1Point memory b1, G2Point memory b2,\\n G1Point memory c1, G2Point memory c2\\n ) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](3);\\n G2Point[] memory p2 = new G2Point[](3);\\n p1[0] = a1;\\n p1[1] = b1;\\n p1[2] = c1;\\n p2[0] = a2;\\n p2[1] = b2;\\n p2[2] = c2;\\n return pairing(p1, p2);\\n }\\n /// Convenience method for a pairing check for four pairs.\\n function pairingProd4(\\n G1Point memory a1, G2Point memory a2,\\n G1Point memory b1, G2Point memory b2,\\n G1Point memory c1, G2Point memory c2,\\n G1Point memory d1, G2Point memory d2\\n ) internal view returns (bool) {\\n G1Point[] memory p1 = new G1Point[](4);\\n G2Point[] memory p2 = new G2Point[](4);\\n p1[0] = a1;\\n p1[1] = b1;\\n p1[2] = c1;\\n p1[3] = d1;\\n p2[0] = a2;\\n p2[1] = b2;\\n p2[2] = c2;\\n p2[3] = d2;\\n return pairing(p1, p2);\\n }\\n}\\ncontract Pythia1Verifier {\\n using Pairing for *;\\n struct VerifyingKey {\\n Pairing.G1Point alfa1;\\n Pairing.G2Point beta2;\\n Pairing.G2Point gamma2;\\n Pairing.G2Point delta2;\\n Pairing.G1Point[] IC;\\n }\\n struct Proof {\\n Pairing.G1Point A;\\n Pairing.G2Point B;\\n Pairing.G1Point C;\\n }\\n function verifyingKey() internal pure returns (VerifyingKey memory vk) {\\n vk.alfa1 = Pairing.G1Point(\\n 20491192805390485299153009773594534940189261866228447918068658471970481763042,\\n 9383485363053290200918347156157836566562967994039712273449902621266178545958\\n );\\n\\n vk.beta2 = Pairing.G2Point(\\n [4252822878758300859123897981450591353533073413197771768651442665752259397132,\\n 6375614351688725206403948262868962793625744043794305715222011528459656738731],\\n [21847035105528745403288232691147584728191162732299865338377159692350059136679,\\n 10505242626370262277552901082094356697409835680220590971873171140371331206856]\\n );\\n vk.gamma2 = Pairing.G2Point(\\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\\n );\\n vk.delta2 = Pairing.G2Point(\\n [10531421060471803210764242282180596988661354300825243432694370526898549660572,\\n 16907777539267866029484140695898606769333962039725819851897531221528016291246],\\n [1262343472093645508827094724965505457998222566160570888483460111770233999788,\\n 15912415772039780433311820224136904737706664077875817672499292870626930031698]\\n );\\n vk.IC = new Pairing.G1Point[](10);\\n \\n vk.IC[0] = Pairing.G1Point( \\n 5517688305750201128762483893091304147062827104408157512730579569350848407613,\\n 5780136537335992008649392871793066674866342777759859789350700119480160130924\\n ); \\n \\n vk.IC[1] = Pairing.G1Point( \\n 12697944246979452442578306963760600646953905903147293524406388488412105525306,\\n 7947498303555241939381866476162499321683671397366404411964730108870115767741\\n ); \\n \\n vk.IC[2] = Pairing.G1Point( \\n 104028078850975554065172701281783302003220555203883119831575537681421753151,\\n 19148240629904598794948591359118971959790791697910953160820265703277306346\\n ); \\n \\n vk.IC[3] = Pairing.G1Point( \\n 5389100687915168292769005150998138946551934165417656464020514059527551078739,\\n 2995810062694628906192141834014562842416411391073941090612035469327148467089\\n ); \\n \\n vk.IC[4] = Pairing.G1Point( \\n 13361404455959093513465491032733056651449943760514352043673570676442342622118,\\n 13062233980231097531380816290641636455952795449264050237462472029810698552529\\n ); \\n \\n vk.IC[5] = Pairing.G1Point( \\n 11459259237872151197093706264224074511822899275820846406369316478681920338712,\\n 17008950402703007066305862393917002979068108987255258732198250350572930280478\\n ); \\n \\n vk.IC[6] = Pairing.G1Point( \\n 6864252787935048608809029133239993600538509116976873537320635937882667431893,\\n 21828895867329533519544146243248306555649073137427314743033980762667640230681\\n ); \\n \\n vk.IC[7] = Pairing.G1Point( \\n 9438320622270795479948280183526528671720880729000858589094410097102899873097,\\n 5568101658133066923956745075211904883930639183482936243523669908553853509584\\n ); \\n \\n vk.IC[8] = Pairing.G1Point( \\n 8243240866289541427505408968801246044483594232529594515653799293334187695980,\\n 16836688029681482175969944959379945743029264506292968109365225279154937195513\\n ); \\n \\n vk.IC[9] = Pairing.G1Point( \\n 8901554162474861401157311041464523592671931268194133233238376271355243714980,\\n 3625114242544161778734123207817598834256751400634638318925544817537792055578\\n ); \\n \\n }\\n function verify(uint[] memory input, Proof memory proof) internal view returns (uint) {\\n uint256 snark_scalar_field = 21888242871839275222246405745257275088548364400416034343698204186575808495617;\\n VerifyingKey memory vk = verifyingKey();\\n require(input.length + 1 == vk.IC.length,\\\"verifier-bad-input\\\");\\n // Compute the linear combination vk_x\\n Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);\\n for (uint i = 0; i < input.length; i++) {\\n require(input[i] < snark_scalar_field,\\\"verifier-gte-snark-scalar-field\\\");\\n vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i]));\\n }\\n vk_x = Pairing.addition(vk_x, vk.IC[0]);\\n if (!Pairing.pairingProd4(\\n Pairing.negate(proof.A), proof.B,\\n vk.alfa1, vk.beta2,\\n vk_x, vk.gamma2,\\n proof.C, vk.delta2\\n )) return 1;\\n return 0;\\n }\\n /// @return r bool true if proof is valid\\n function verifyProof(\\n uint[2] memory a,\\n uint[2][2] memory b,\\n uint[2] memory c,\\n uint[9] memory input\\n ) public view returns (bool r) {\\n Proof memory proof;\\n proof.A = Pairing.G1Point(a[0], a[1]);\\n proof.B = Pairing.G2Point([b[0][0], b[0][1]], [b[1][0], b[1][1]]);\\n proof.C = Pairing.G1Point(c[0], c[1]);\\n uint[] memory inputValues = new uint[](input.length);\\n for(uint i = 0; i < input.length; i++){\\n inputValues[i] = input[i];\\n }\\n if (verify(inputValues, proof) == 0) {\\n return true;\\n } else {\\n return false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3babb956e64535b9bf535df94288b4d83ea82c54727f79ee8949fe4a19c1d5ba\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061151f806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063c542c93b14610030575b600080fd5b61004361003e366004611356565b610057565b604051901515815260200160405180910390f35b6000610061611169565b60408051808201825287518152602080890151818301529083528151608081018352875151818401908152885183015160608301528152825180840184528883018051518252518301518184015281830152838201528151808301835286518152868201518183015283830152815160098082526101408201909352600092909182016101208036833701905050905060005b60098110156101435784816009811061010f5761010f611434565b602002015182828151811061012657610126611434565b60209081029190910101528061013b81611460565b9150506100f4565b5061014e818361016f565b60000361016057600192505050610167565b6000925050505b949350505050565b60007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018161019b610366565b9050806080015151855160016101b19190611479565b146101f85760405162461bcd60e51b81526020600482015260126024820152711d995c9a599a595c8b5898590b5a5b9c1d5d60721b60448201526064015b60405180910390fd5b604080518082019091526000808252602082018190525b86518110156102e9578387828151811061022b5761022b611434565b6020026020010151106102805760405162461bcd60e51b815260206004820152601f60248201527f76657269666965722d6774652d736e61726b2d7363616c61722d6669656c640060448201526064016101ef565b6102d5826102d085608001518460016102999190611479565b815181106102a9576102a9611434565b60200260200101518a85815181106102c3576102c3611434565b6020026020010151610ab8565b610b4e565b9150806102e181611460565b91505061020f565b5061031281836080015160008151811061030557610305611434565b6020026020010151610b4e565b90506103486103248660000151610be7565b8660200151846000015185602001518587604001518b604001518960600151610c86565b6103585760019350505050610360565b600093505050505b92915050565b61036e6111ba565b6040805180820182527f2d4d9aa7e302d9df41749d5507949d05dbea33fbb16c643b22f599a2be6df2e281527f14bedd503c37ceb061d8ec60209fe345ce89830a19230301f076caff004d19266020808301919091529083528151608080820184527f0967032fcbf776d1afc985f88877f182d38480a653f2decaa9794cbc3bf3060c8285019081527f0e187847ad4c798374d0d6732bf501847dd68bc0e071241e0213bc7fc13db7ab606080850191909152908352845180860186527f304cfbd1e08a704a99f5e847d93f8c3caafddec46b7a0d379da69a4d112346a781527f1739c1b1a457a8c7313123d24d2f9192f896b7c63eea05a9d57f06547ad0cec8818601528385015285840192909252835180820185527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28186019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed828501528152845180860186527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b81527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa818601528185015285850152835190810184527f174892b5bad4ddcfd89eda92cc1a5fb630cfd006cdb1659b082e3fae39df9b9c8185019081527f256176846e5a9b02d671495ae4d617f2bd45ce621c1a181cb505f4b5b8b785ae828401528152835180850185527f02ca7609b5aecf9430434e2f4ecb35f1d85090b34f1e9db416b6ed27a47211ac81527f232e1bb08a19b6cc0e639c831b21a6fefdb07f9361801b61dcab9871483b7c528185015281840152908401528151600a8082526101608201909352919082015b60408051808201909152600080825260208201528152602001906001900390816105ea57505060808201908152604080518082019091527f0c32e6a2033cd6027d1a46a68265e41b8a47bfb7a3e130a2c0f533ef102de83d81527f0cc770fbf603ef9467a0c6e6cc28e85214afd8411c933e69178479d2841e976c60208201529051805160009061067d5761067d611434565b602002602001018190525060405180604001604052807f1c12c8210513044ddb9ea2a7cfb8f3b529b6d43abe416e35c005a63a6fffc83a81526020017f11921fe7e6b849a03a0428e49a6465a87f3c98016eb6d13ad110ab15ee0cb5bd81525081608001516001815181106106f4576106f4611434565b602002602001018190525060405180604001604052807e3ae0b7e630d0708e4da300f02dd27c42654381541ab974a678042eb4fadb3f81526020017e0ad667b81d05c6e95487a6140ca0dc3ba85d47509073a2c1b457cfbf67a1ea815250816080015160028151811061076957610769611434565b602002602001018190525060405180604001604052807f0bea1f762ed1b817dddb25a7b7e60f69ff7671eb72fe695a8a24b620fae6515381526020017f069f91831bbeea0bcb8e658c68c110e35e033ae01637be60803083e3696b439181525081608001516003815181106107e0576107e0611434565b602002602001018190525060405180604001604052807f1d8a4973e60e7186c4dd89fd553304f628ebac9870b43dead962ce96064803a681526020017f1ce0f6623640030a2a8210d5e37d04e983127c85dd0bca8f503b2b24c8ad04d1815250816080015160048151811061085757610857611434565b602002602001018190525060405180604001604052807f1955b5fc797055fe5682e71ee08375742622a371f736e40a827fde747dbc7b1881526020017f259ab98a8122832a5779c0c1373733a1d9204803eabd831c550583852bab2c1e81525081608001516005815181106108ce576108ce611434565b602002602001018190525060405180604001604052807f0f2d07869bdb9a50651a2ad87da88a78d29bc7f5abb0c866769189f94f3b37d581526020017f3042b79c235d1a7e6781dde92773e7a52276a8912fe06de16a781d3995ed1319815250816080015160068151811061094557610945611434565b602002602001018190525060405180604001604052807f14dde6710af95fd2d6c49a1cadc761ae8b093e2b80fe9d7b980538baf49b854981526020017f0c4f6f112e147b22270b3c65f5d65a07842b81682deb09f6d4236dac4b9b1fd081525081608001516007815181106109bc576109bc611434565b602002602001018190525060405180604001604052807f1239824d3a77d0e97d55504525df59d36e148fab147bc75b41e74e47478c5f6c81526020017f25393a4bf81046bad1869efc59edfb1a6b379d1d1eab45fcb634b73c0108ebf98152508160800151600881518110610a3357610a33611434565b602002602001018190525060405180604001604052807f13ae19e280548637b1ce4de3d1405ffdd1d8838f2c34a3017cb05810880cd9a481526020017f0803bdf0743261ea96d28d68f7f3cce9505ad2dbce28eb78ba7ccc002c93991a8152508160800151600981518110610aaa57610aaa611434565b602002602001018190525090565b6040805180820190915260008082526020820152610ad461120b565b835181526020808501519082015260408101839052600060608360808460076107d05a03fa90508080610b0357fe5b5080610b465760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5b5d5b0b59985a5b195960721b60448201526064016101ef565b505092915050565b6040805180820190915260008082526020820152610b6a611229565b8351815260208085015181830152835160408301528301516060808301919091526000908360c08460066107d05a03fa90508080610ba457fe5b5080610b465760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5859190b59985a5b195960721b60448201526064016101ef565b604080518082019091526000808252602082015281517f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4790158015610c2e57506020830151155b15610c4e5750506040805180820190915260008082526020820152919050565b604051806040016040528084600001518152602001828560200151610c739190611491565b610c7d90846114b3565b90529392505050565b60408051600480825260a08201909252600091829190816020015b6040805180820190915260008082526020820152815260200190600190039081610ca157505060408051600480825260a0820190925291925060009190602082015b610ceb611247565b815260200190600190039081610ce35790505090508a82600081518110610d1457610d14611434565b60200260200101819052508882600181518110610d3357610d33611434565b60200260200101819052508682600281518110610d5257610d52611434565b60200260200101819052508482600381518110610d7157610d71611434565b60200260200101819052508981600081518110610d9057610d90611434565b60200260200101819052508781600181518110610daf57610daf611434565b60200260200101819052508581600281518110610dce57610dce611434565b60200260200101819052508381600381518110610ded57610ded611434565b6020026020010181905250610e028282610e11565b9b9a5050505050505050505050565b60008151835114610e5d5760405162461bcd60e51b81526020600482015260166024820152751c185a5c9a5b99cb5b195b99dd1a1ccb59985a5b195960521b60448201526064016101ef565b82516000610e6c8260066114ca565b905060008167ffffffffffffffff811115610e8957610e896112a3565b604051908082528060200260200182016040528015610eb2578160200160208202803683370190505b50905060005b838110156110ed57868181518110610ed257610ed2611434565b60200260200101516000015182826006610eec91906114ca565b610ef7906000611479565b81518110610f0757610f07611434565b602002602001018181525050868181518110610f2557610f25611434565b60200260200101516020015182826006610f3f91906114ca565b610f4a906001611479565b81518110610f5a57610f5a611434565b602002602001018181525050858181518110610f7857610f78611434565b6020908102919091010151515182610f918360066114ca565b610f9c906002611479565b81518110610fac57610fac611434565b602002602001018181525050858181518110610fca57610fca611434565b60209081029190910181015151015182610fe58360066114ca565b610ff0906003611479565b8151811061100057611000611434565b60200260200101818152505085818151811061101e5761101e611434565b60200260200101516020015160006002811061103c5761103c611434565b60200201518261104d8360066114ca565b611058906004611479565b8151811061106857611068611434565b60200260200101818152505085818151811061108657611086611434565b6020026020010151602001516001600281106110a4576110a4611434565b6020020151826110b58360066114ca565b6110c0906005611479565b815181106110d0576110d0611434565b6020908102919091010152806110e581611460565b915050610eb8565b506110f6611267565b6000602082602086026020860160086107d05a03fa9050808061111557fe5b508061115b5760405162461bcd60e51b81526020600482015260156024820152741c185a5c9a5b99cb5bdc18dbd9194b59985a5b1959605a1b60448201526064016101ef565b505115159695505050505050565b6040805160a081019091526000606082018181526080830191909152815260208101611193611247565b81526020016111b5604051806040016040528060008152602001600081525090565b905290565b6040805160e08101909152600060a0820181815260c08301919091528152602081016111e4611247565b81526020016111f1611247565b81526020016111fe611247565b8152602001606081525090565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b604051806040016040528061125a611285565b81526020016111b5611285565b60405180602001604052806001906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156112dc576112dc6112a3565b60405290565b604051610120810167ffffffffffffffff811182821017156112dc576112dc6112a3565b600082601f83011261131757600080fd5b61131f6112b9565b80604084018581111561133157600080fd5b845b8181101561134b578035845260209384019301611333565b509095945050505050565b60008060008061022080868803121561136e57600080fd5b6113788787611306565b9450604087605f88011261138b57600080fd5b6113936112b9565b8060c089018a8111156113a557600080fd5b838a015b818110156113ca576113bb8c82611306565b845260209093019284016113a9565b508197506113d88b82611306565b9650505050508661011f8701126113ee57600080fd5b6113f66112e2565b90860190808883111561140857600080fd5b61010088015b8381101561142657803583526020928301920161140e565b509598949750929550505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016114725761147261144a565b5060010190565b6000821982111561148c5761148c61144a565b500190565b6000826114ae57634e487b7160e01b600052601260045260246000fd5b500690565b6000828210156114c5576114c561144a565b500390565b60008160001904831182151516156114e4576114e461144a565b50029056fea264697066735822122064ca8e728369809bbfe58b0cff27a54a0e5e793919a8ed928a392738c3f2924564736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063c542c93b14610030575b600080fd5b61004361003e366004611356565b610057565b604051901515815260200160405180910390f35b6000610061611169565b60408051808201825287518152602080890151818301529083528151608081018352875151818401908152885183015160608301528152825180840184528883018051518252518301518184015281830152838201528151808301835286518152868201518183015283830152815160098082526101408201909352600092909182016101208036833701905050905060005b60098110156101435784816009811061010f5761010f611434565b602002015182828151811061012657610126611434565b60209081029190910101528061013b81611460565b9150506100f4565b5061014e818361016f565b60000361016057600192505050610167565b6000925050505b949350505050565b60007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018161019b610366565b9050806080015151855160016101b19190611479565b146101f85760405162461bcd60e51b81526020600482015260126024820152711d995c9a599a595c8b5898590b5a5b9c1d5d60721b60448201526064015b60405180910390fd5b604080518082019091526000808252602082018190525b86518110156102e9578387828151811061022b5761022b611434565b6020026020010151106102805760405162461bcd60e51b815260206004820152601f60248201527f76657269666965722d6774652d736e61726b2d7363616c61722d6669656c640060448201526064016101ef565b6102d5826102d085608001518460016102999190611479565b815181106102a9576102a9611434565b60200260200101518a85815181106102c3576102c3611434565b6020026020010151610ab8565b610b4e565b9150806102e181611460565b91505061020f565b5061031281836080015160008151811061030557610305611434565b6020026020010151610b4e565b90506103486103248660000151610be7565b8660200151846000015185602001518587604001518b604001518960600151610c86565b6103585760019350505050610360565b600093505050505b92915050565b61036e6111ba565b6040805180820182527f2d4d9aa7e302d9df41749d5507949d05dbea33fbb16c643b22f599a2be6df2e281527f14bedd503c37ceb061d8ec60209fe345ce89830a19230301f076caff004d19266020808301919091529083528151608080820184527f0967032fcbf776d1afc985f88877f182d38480a653f2decaa9794cbc3bf3060c8285019081527f0e187847ad4c798374d0d6732bf501847dd68bc0e071241e0213bc7fc13db7ab606080850191909152908352845180860186527f304cfbd1e08a704a99f5e847d93f8c3caafddec46b7a0d379da69a4d112346a781527f1739c1b1a457a8c7313123d24d2f9192f896b7c63eea05a9d57f06547ad0cec8818601528385015285840192909252835180820185527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28186019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed828501528152845180860186527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b81527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa818601528185015285850152835190810184527f174892b5bad4ddcfd89eda92cc1a5fb630cfd006cdb1659b082e3fae39df9b9c8185019081527f256176846e5a9b02d671495ae4d617f2bd45ce621c1a181cb505f4b5b8b785ae828401528152835180850185527f02ca7609b5aecf9430434e2f4ecb35f1d85090b34f1e9db416b6ed27a47211ac81527f232e1bb08a19b6cc0e639c831b21a6fefdb07f9361801b61dcab9871483b7c528185015281840152908401528151600a8082526101608201909352919082015b60408051808201909152600080825260208201528152602001906001900390816105ea57505060808201908152604080518082019091527f0c32e6a2033cd6027d1a46a68265e41b8a47bfb7a3e130a2c0f533ef102de83d81527f0cc770fbf603ef9467a0c6e6cc28e85214afd8411c933e69178479d2841e976c60208201529051805160009061067d5761067d611434565b602002602001018190525060405180604001604052807f1c12c8210513044ddb9ea2a7cfb8f3b529b6d43abe416e35c005a63a6fffc83a81526020017f11921fe7e6b849a03a0428e49a6465a87f3c98016eb6d13ad110ab15ee0cb5bd81525081608001516001815181106106f4576106f4611434565b602002602001018190525060405180604001604052807e3ae0b7e630d0708e4da300f02dd27c42654381541ab974a678042eb4fadb3f81526020017e0ad667b81d05c6e95487a6140ca0dc3ba85d47509073a2c1b457cfbf67a1ea815250816080015160028151811061076957610769611434565b602002602001018190525060405180604001604052807f0bea1f762ed1b817dddb25a7b7e60f69ff7671eb72fe695a8a24b620fae6515381526020017f069f91831bbeea0bcb8e658c68c110e35e033ae01637be60803083e3696b439181525081608001516003815181106107e0576107e0611434565b602002602001018190525060405180604001604052807f1d8a4973e60e7186c4dd89fd553304f628ebac9870b43dead962ce96064803a681526020017f1ce0f6623640030a2a8210d5e37d04e983127c85dd0bca8f503b2b24c8ad04d1815250816080015160048151811061085757610857611434565b602002602001018190525060405180604001604052807f1955b5fc797055fe5682e71ee08375742622a371f736e40a827fde747dbc7b1881526020017f259ab98a8122832a5779c0c1373733a1d9204803eabd831c550583852bab2c1e81525081608001516005815181106108ce576108ce611434565b602002602001018190525060405180604001604052807f0f2d07869bdb9a50651a2ad87da88a78d29bc7f5abb0c866769189f94f3b37d581526020017f3042b79c235d1a7e6781dde92773e7a52276a8912fe06de16a781d3995ed1319815250816080015160068151811061094557610945611434565b602002602001018190525060405180604001604052807f14dde6710af95fd2d6c49a1cadc761ae8b093e2b80fe9d7b980538baf49b854981526020017f0c4f6f112e147b22270b3c65f5d65a07842b81682deb09f6d4236dac4b9b1fd081525081608001516007815181106109bc576109bc611434565b602002602001018190525060405180604001604052807f1239824d3a77d0e97d55504525df59d36e148fab147bc75b41e74e47478c5f6c81526020017f25393a4bf81046bad1869efc59edfb1a6b379d1d1eab45fcb634b73c0108ebf98152508160800151600881518110610a3357610a33611434565b602002602001018190525060405180604001604052807f13ae19e280548637b1ce4de3d1405ffdd1d8838f2c34a3017cb05810880cd9a481526020017f0803bdf0743261ea96d28d68f7f3cce9505ad2dbce28eb78ba7ccc002c93991a8152508160800151600981518110610aaa57610aaa611434565b602002602001018190525090565b6040805180820190915260008082526020820152610ad461120b565b835181526020808501519082015260408101839052600060608360808460076107d05a03fa90508080610b0357fe5b5080610b465760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5b5d5b0b59985a5b195960721b60448201526064016101ef565b505092915050565b6040805180820190915260008082526020820152610b6a611229565b8351815260208085015181830152835160408301528301516060808301919091526000908360c08460066107d05a03fa90508080610ba457fe5b5080610b465760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5859190b59985a5b195960721b60448201526064016101ef565b604080518082019091526000808252602082015281517f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4790158015610c2e57506020830151155b15610c4e5750506040805180820190915260008082526020820152919050565b604051806040016040528084600001518152602001828560200151610c739190611491565b610c7d90846114b3565b90529392505050565b60408051600480825260a08201909252600091829190816020015b6040805180820190915260008082526020820152815260200190600190039081610ca157505060408051600480825260a0820190925291925060009190602082015b610ceb611247565b815260200190600190039081610ce35790505090508a82600081518110610d1457610d14611434565b60200260200101819052508882600181518110610d3357610d33611434565b60200260200101819052508682600281518110610d5257610d52611434565b60200260200101819052508482600381518110610d7157610d71611434565b60200260200101819052508981600081518110610d9057610d90611434565b60200260200101819052508781600181518110610daf57610daf611434565b60200260200101819052508581600281518110610dce57610dce611434565b60200260200101819052508381600381518110610ded57610ded611434565b6020026020010181905250610e028282610e11565b9b9a5050505050505050505050565b60008151835114610e5d5760405162461bcd60e51b81526020600482015260166024820152751c185a5c9a5b99cb5b195b99dd1a1ccb59985a5b195960521b60448201526064016101ef565b82516000610e6c8260066114ca565b905060008167ffffffffffffffff811115610e8957610e896112a3565b604051908082528060200260200182016040528015610eb2578160200160208202803683370190505b50905060005b838110156110ed57868181518110610ed257610ed2611434565b60200260200101516000015182826006610eec91906114ca565b610ef7906000611479565b81518110610f0757610f07611434565b602002602001018181525050868181518110610f2557610f25611434565b60200260200101516020015182826006610f3f91906114ca565b610f4a906001611479565b81518110610f5a57610f5a611434565b602002602001018181525050858181518110610f7857610f78611434565b6020908102919091010151515182610f918360066114ca565b610f9c906002611479565b81518110610fac57610fac611434565b602002602001018181525050858181518110610fca57610fca611434565b60209081029190910181015151015182610fe58360066114ca565b610ff0906003611479565b8151811061100057611000611434565b60200260200101818152505085818151811061101e5761101e611434565b60200260200101516020015160006002811061103c5761103c611434565b60200201518261104d8360066114ca565b611058906004611479565b8151811061106857611068611434565b60200260200101818152505085818151811061108657611086611434565b6020026020010151602001516001600281106110a4576110a4611434565b6020020151826110b58360066114ca565b6110c0906005611479565b815181106110d0576110d0611434565b6020908102919091010152806110e581611460565b915050610eb8565b506110f6611267565b6000602082602086026020860160086107d05a03fa9050808061111557fe5b508061115b5760405162461bcd60e51b81526020600482015260156024820152741c185a5c9a5b99cb5bdc18dbd9194b59985a5b1959605a1b60448201526064016101ef565b505115159695505050505050565b6040805160a081019091526000606082018181526080830191909152815260208101611193611247565b81526020016111b5604051806040016040528060008152602001600081525090565b905290565b6040805160e08101909152600060a0820181815260c08301919091528152602081016111e4611247565b81526020016111f1611247565b81526020016111fe611247565b8152602001606081525090565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b604051806040016040528061125a611285565b81526020016111b5611285565b60405180602001604052806001906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156112dc576112dc6112a3565b60405290565b604051610120810167ffffffffffffffff811182821017156112dc576112dc6112a3565b600082601f83011261131757600080fd5b61131f6112b9565b80604084018581111561133157600080fd5b845b8181101561134b578035845260209384019301611333565b509095945050505050565b60008060008061022080868803121561136e57600080fd5b6113788787611306565b9450604087605f88011261138b57600080fd5b6113936112b9565b8060c089018a8111156113a557600080fd5b838a015b818110156113ca576113bb8c82611306565b845260209093019284016113a9565b508197506113d88b82611306565b9650505050508661011f8701126113ee57600080fd5b6113f66112e2565b90860190808883111561140857600080fd5b61010088015b8381101561142657803583526020928301920161140e565b509598949750929550505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016114725761147261144a565b5060010190565b6000821982111561148c5761148c61144a565b500190565b6000826114ae57634e487b7160e01b600052601260045260246000fd5b500690565b6000828210156114c5576114c561144a565b500390565b60008160001904831182151516156114e4576114e461144a565b50029056fea264697066735822122064ca8e728369809bbfe58b0cff27a54a0e5e793919a8ed928a392738c3f2924564736f6c634300080e0033", + "devdoc": { + "kind": "dev", + "methods": { + "verifyProof(uint256[2],uint256[2][2],uint256[2],uint256[9])": { + "returns": { + "r": " bool true if proof is valid" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/mumbai/solcInputs/70d5ec851bd4311fac67c09b114b9c0c.json b/deployments/mumbai/solcInputs/70d5ec851bd4311fac67c09b114b9c0c.json new file mode 100644 index 0000000..1733491 --- /dev/null +++ b/deployments/mumbai/solcInputs/70d5ec851bd4311fac67c09b114b9c0c.json @@ -0,0 +1,227 @@ +{ + "language": "Solidity", + "sources": { + "contracts/attesters/hydra-s1/base/HydraS1Base.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.14;\npragma experimental ABIEncoderV2;\n\nimport {IHydraS1Base} from './IHydraS1Base.sol';\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\n\n// Protocol imports\nimport {Request, Attestation, Claim} from '../../../core/libs/Structs.sol';\n\n// Imports related to Hydra S1 ZK Proving Scheme\nimport {HydraS1Verifier, HydraS1Lib, HydraS1Claim, HydraS1ProofData, HydraS1ProofInput, HydraS1GroupProperties} from '../libs/HydraS1Lib.sol';\nimport {ICommitmentMapperRegistry} from '../../../periphery/utils/CommitmentMapperRegistry.sol';\nimport {IAvailableRootsRegistry} from '../../../periphery/utils/AvailableRootsRegistry.sol';\n\n/**\n * @title Hydra-S1 Base Attester\n * @author Sismo\n * @notice Abstract contract that facilitates the use of the Hydra-S1 ZK Proving Scheme.\n * Hydra-S1 is single source, single group: it allows users to verify they are part of one and only one group at a time\n * It is inherited by the family of Hydra-S1 attesters.\n * It contains the user input checking and the ZK-SNARK proof verification.\n * We invite readers to refer to:\n * - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations\n * - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1\n \n \n **/\nabstract contract HydraS1Base is IHydraS1Base, Initializable {\n using HydraS1Lib for HydraS1ProofData;\n\n // ZK-SNARK Verifier\n HydraS1Verifier immutable VERIFIER;\n // Registry storing the Commitment Mapper EdDSA Public key\n ICommitmentMapperRegistry immutable COMMITMENT_MAPPER_REGISTRY;\n // Registry storing the Registry Tree Roots of the Attester's available ClaimData\n IAvailableRootsRegistry immutable AVAILABLE_ROOTS_REGISTRY;\n\n /*******************************************************\n INITIALIZATION FUNCTIONS \n *******************************************************/\n /**\n * @dev Constructor. Initializes the contract\n * @param hydraS1VerifierAddress ZK Snark Verifier contract\n * @param availableRootsRegistryAddress Registry where is the Available Data (Registry Merkle Roots)\n * @param commitmentMapperAddress Commitment mapper's public key registry\n */\n constructor(\n address hydraS1VerifierAddress,\n address availableRootsRegistryAddress,\n address commitmentMapperAddress\n ) {\n VERIFIER = HydraS1Verifier(hydraS1VerifierAddress);\n AVAILABLE_ROOTS_REGISTRY = IAvailableRootsRegistry(availableRootsRegistryAddress);\n COMMITMENT_MAPPER_REGISTRY = ICommitmentMapperRegistry(commitmentMapperAddress);\n }\n\n /**\n * @dev Getter of Hydra-S1 Verifier contract\n */\n function getVerifier() external view returns (HydraS1Verifier) {\n return VERIFIER;\n }\n\n /**\n * @dev Getter of Commitment Mapper Registry contract\n */\n function getCommitmentMapperRegistry() external view returns (ICommitmentMapperRegistry) {\n return COMMITMENT_MAPPER_REGISTRY;\n }\n\n /**\n * @dev Getter of Roots Registry Contract\n */\n function getAvailableRootsRegistry() external view returns (IAvailableRootsRegistry) {\n return AVAILABLE_ROOTS_REGISTRY;\n }\n\n /*******************************************************\n Hydra-S1 SPECIFIC FUNCTIONS\n *******************************************************/\n\n /**\n * @dev MANDATORY: must be implemented to return the ticket identifier from a user request\n * so it can be checked against snark input\n * ticket = hash(sourceSecretHash, ticketIdentifier), which is verified inside the snark\n * users bring sourceSecretHash as private input which guarantees privacy\n\n * This function MUST be implemented by Hydra-S1 attesters.\n * This is the core function that implements the logic of tickets\n\n * Do they get one ticket per claim?\n * Do they get 2 tickets per claim?\n * Do they get 1 ticket per claim, every month?\n * Take a look at Hydra-S1 Simple Attester for an example\n * @param claim user claim: part of a group of accounts, with a claimedValue for their account\n */\n function _getTicketIdentifierOfClaim(HydraS1Claim memory claim)\n internal\n view\n virtual\n returns (uint256);\n\n /**\n * @dev Checks whether the user claim and the snark public input are a match\n * @param claim user claim\n * @param input snark public input\n */\n function _validateInput(HydraS1Claim memory claim, HydraS1ProofInput memory input)\n internal\n view\n virtual\n {\n if (input.accountsTreeValue != claim.groupId)\n revert AccountsTreeValueMismatch(claim.groupId, input.accountsTreeValue);\n\n if (input.isStrict == claim.groupProperties.isScore)\n revert IsStrictMismatch(claim.groupProperties.isScore, input.isStrict);\n\n if (input.destination != claim.destination)\n revert DestinationMismatch(claim.destination, input.destination);\n\n if (input.chainId != block.chainid) revert ChainIdMismatch(block.chainid, input.chainId);\n\n if (input.value != claim.claimedValue) revert ValueMismatch(claim.claimedValue, input.value);\n\n if (!AVAILABLE_ROOTS_REGISTRY.isRootAvailableForMe(input.registryRoot))\n revert RegistryRootMismatch(input.registryRoot);\n\n uint256[2] memory commitmentMapperPubKey = COMMITMENT_MAPPER_REGISTRY.getEdDSAPubKey();\n if (\n input.commitmentMapperPubKey[0] != commitmentMapperPubKey[0] ||\n input.commitmentMapperPubKey[1] != commitmentMapperPubKey[1]\n )\n revert CommitmentMapperPubKeyMismatch(\n commitmentMapperPubKey[0],\n commitmentMapperPubKey[1],\n input.commitmentMapperPubKey[0],\n input.commitmentMapperPubKey[1]\n );\n\n uint256 ticketIdentifier = _getTicketIdentifierOfClaim(claim);\n\n if (input.ticketIdentifier != ticketIdentifier)\n revert TicketIdentifierMismatch(ticketIdentifier, input.ticketIdentifier);\n }\n\n /**\n * @dev verify the groth16 mathematical proof\n * @param proofData snark public input\n */\n function _verifyProof(HydraS1ProofData memory proofData) internal view virtual {\n try\n VERIFIER.verifyProof(proofData.proof.a, proofData.proof.b, proofData.proof.c, proofData.input)\n returns (bool success) {\n if (!success) revert InvalidGroth16Proof('');\n } catch Error(string memory reason) {\n revert InvalidGroth16Proof(reason);\n } catch Panic(\n uint256 /*errorCode*/\n ) {\n revert InvalidGroth16Proof('');\n } catch (\n bytes memory /*lowLevelData*/\n ) {\n revert InvalidGroth16Proof('');\n }\n }\n}\n" + }, + "contracts/attesters/hydra-s1/base/IHydraS1Base.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.14;\npragma experimental ABIEncoderV2;\n\nimport {HydraS1Verifier, HydraS1Lib, HydraS1ProofData} from '../libs/HydraS1Lib.sol';\nimport {ICommitmentMapperRegistry} from '../../../periphery/utils/CommitmentMapperRegistry.sol';\nimport {IAvailableRootsRegistry} from '../../../periphery/utils/AvailableRootsRegistry.sol';\n\n// todo: explain well what is specific to this attester\ninterface IHydraS1Base {\n error ClaimsLengthDifferentThanOne(uint256 claimLength);\n error RegistryRootMismatch(uint256 inputRoot);\n error DestinationMismatch(address expectedDestination, address inputDestination);\n error CommitmentMapperPubKeyMismatch(\n uint256 expectedX,\n uint256 expectedY,\n uint256 inputX,\n uint256 inputY\n );\n error TicketIdentifierMismatch(uint256 expectedTicketIdentifier, uint256 ticketIdentifier);\n error IsStrictMismatch(bool expectedStrictness, bool strictNess);\n error ChainIdMismatch(uint256 expectedChainId, uint256 chainId);\n error ValueMismatch(uint256 expectedValue, uint256 inputValue);\n error AccountsTreeValueMismatch(\n uint256 expectedAccountsTreeValue,\n uint256 inputAccountsTreeValue\n );\n error InvalidGroth16Proof(string reason);\n\n /**\n * @dev Getter of Hydra-S1 Verifier contract\n */\n function getVerifier() external view returns (HydraS1Verifier);\n\n /**\n * @dev Getter of Commitment Mapper Registry contract\n */\n function getCommitmentMapperRegistry() external view returns (ICommitmentMapperRegistry);\n\n /**\n * @dev Getter of Roots Registry Contract\n */\n function getAvailableRootsRegistry() external view returns (IAvailableRootsRegistry);\n}\n" + }, + "@openzeppelin/contracts/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/Address.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() initializer {}\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n */\n bool private _initialized;\n\n /**\n * @dev Indicates that the contract is in the process of being initialized.\n */\n bool private _initializing;\n\n /**\n * @dev Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n // contract may have been reentered.\n require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} modifier, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n function _isConstructor() private view returns (bool) {\n return !Address.isContract(address(this));\n }\n}\n" + }, + "contracts/core/libs/Structs.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\n/**\n * @title Attestations Registry State\n * @author Sismo\n * @notice This contract holds all of the storage variables and data\n * structures used by the AttestationsRegistry and parent\n * contracts.\n */\n\n// User Attestation Request, can be made by any user\n// The context of an Attestation Request is a specific attester contract\n// Each attester has groups of accounts in its available data\n// eg: for a specific attester:\n// group 1 <=> accounts that sent txs on mainnet\n// group 2 <=> accounts that sent txs on polygon\n// eg: for another attester:\n// group 1 <=> accounts that sent eth txs in 2022\n// group 2 <=> accounts sent eth txs in 2021\nstruct Request {\n // implicit address attester;\n // implicit uint256 chainId;\n Claim[] claims;\n address destination; // destination that will receive the end attestation\n}\n\nstruct Claim {\n uint256 groupId; // user claims to have an account in this group\n uint256 claimedValue; // user claims this value for its account in the group\n bytes extraData; // arbitrary data, may be required by the attester to verify claims or generate a specific attestation\n}\n\n/**\n * @dev Attestation Struct. This is the struct receive as argument by the Attestation Registry.\n * @param collectionId Attestation collection\n * @param owner Attestation collection\n * @param issuer Attestation collection\n * @param value Attestation collection\n * @param timestamp Attestation collection\n * @param extraData Attestation collection\n */\nstruct Attestation {\n // implicit uint256 chainId;\n uint256 collectionId; // Id of the attestation collection (in the registry)\n address owner; // Owner of the attestation\n address issuer; // Contract that created or last updated the record.\n uint256 value; // Value of the attestation\n uint32 timestamp; // Timestamp chosen by the attester, should correspond to the effective date of the attestation\n // it is different from the recording timestamp (date when the attestation was recorded)\n // e.g a proof of NFT ownership may have be recorded today which is 2 month old data.\n bytes extraData; // arbitrary data that can be added by the attester\n}\n\n// Attestation Data, stored in the registry\n// The context is a specific owner of a specific collection\nstruct AttestationData {\n // implicit uint256 chainId\n // implicit uint256 collectionId - from context\n // implicit owner\n address issuer; // Address of the contract that recorded the attestation\n uint256 value; // Value of the attestation\n uint32 timestamp; // Effective date of issuance of the attestation. (can be different from the recording timestamp)\n bytes extraData; // arbitrary data that can be added by the attester\n}\n" + }, + "contracts/attesters/hydra-s1/libs/HydraS1Lib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\nimport {Claim, Request} from '../../../core/libs/Structs.sol';\nimport {HydraS1Verifier} from '@sismo-core/hydra-s1/contracts/HydraS1Verifier.sol';\n\n// user Hydra-S1 claim retrieved form his request\nstruct HydraS1Claim {\n uint256 groupId; // user claims to have an account in this group\n uint256 claimedValue; // user claims this value for its account in the group\n address destination; // user claims to own this destination[]\n HydraS1GroupProperties groupProperties; // user claims the group has the following properties\n}\n\nstruct HydraS1GroupProperties {\n uint128 groupIndex;\n uint32 generationTimestamp;\n bool isScore;\n}\n\nstruct HydraS1CircomSnarkProof {\n uint256[2] a;\n uint256[2][2] b;\n uint256[2] c;\n}\n\nstruct HydraS1ProofData {\n HydraS1CircomSnarkProof proof;\n uint256[10] input;\n // destination\n // chainId\n // commitmentMapperPubKey.x\n // commitmentMapperPubKey.y\n // registryTreeRoot\n // ticketIdentifier\n // ticket\n // claimedValue\n // accountsTreeValue\n // isStrict\n}\n\nstruct HydraS1ProofInput {\n address destination;\n uint256 chainId;\n uint256 registryRoot;\n uint256 ticketIdentifier;\n uint256 ticket;\n uint256 value;\n uint256 accountsTreeValue;\n bool isStrict;\n uint256[2] commitmentMapperPubKey;\n}\n\nlibrary HydraS1Lib {\n uint256 constant SNARK_FIELD =\n 21888242871839275222246405745257275088548364400416034343698204186575808495617;\n\n error GroupIdAndPropertiesMismatch(uint256 expectedGroupId, uint256 groupId);\n\n function _input(HydraS1ProofData memory self) internal pure returns (HydraS1ProofInput memory) {\n return\n HydraS1ProofInput(\n _getDestination(self),\n _getChainId(self),\n _getRegistryRoot(self),\n _getExpectedExternalNullifier(self),\n _getTicket(self),\n _getValue(self),\n _getAccountsTreeValue(self),\n _getIsStrict(self),\n _getCommitmentMapperPubKey(self)\n );\n }\n\n function _claim(Request memory self) internal pure returns (HydraS1Claim memory) {\n Claim memory claim = self.claims[0];\n _validateClaim(claim);\n\n HydraS1GroupProperties memory groupProperties = abi.decode(\n claim.extraData,\n (HydraS1GroupProperties)\n );\n\n return (HydraS1Claim(claim.groupId, claim.claimedValue, self.destination, groupProperties));\n }\n\n function _toCircomFormat(HydraS1ProofData memory self)\n internal\n pure\n returns (\n uint256[2] memory,\n uint256[2][2] memory,\n uint256[2] memory,\n uint256[10] memory\n )\n {\n return (self.proof.a, self.proof.b, self.proof.c, self.input);\n }\n\n function _getDestination(HydraS1ProofData memory self) internal pure returns (address) {\n return address(uint160(self.input[0]));\n }\n\n function _getChainId(HydraS1ProofData memory self) internal pure returns (uint256) {\n return self.input[1];\n }\n\n function _getCommitmentMapperPubKey(HydraS1ProofData memory self)\n internal\n pure\n returns (uint256[2] memory)\n {\n return [self.input[2], self.input[3]];\n }\n\n function _getRegistryRoot(HydraS1ProofData memory self) internal pure returns (uint256) {\n return self.input[4];\n }\n\n function _getExpectedExternalNullifier(HydraS1ProofData memory self)\n internal\n pure\n returns (uint256)\n {\n return self.input[5];\n }\n\n function _getTicket(HydraS1ProofData memory self) internal pure returns (uint256) {\n return self.input[6];\n }\n\n function _getValue(HydraS1ProofData memory self) internal pure returns (uint256) {\n return self.input[7];\n }\n\n function _getAccountsTreeValue(HydraS1ProofData memory self) internal pure returns (uint256) {\n return self.input[8];\n }\n\n function _getIsStrict(HydraS1ProofData memory self) internal pure returns (bool) {\n return self.input[9] == 1;\n }\n\n function _getTicket(bytes calldata self) internal pure returns (uint256) {\n HydraS1ProofData memory snarkProofData = abi.decode(self, (HydraS1ProofData));\n uint256 userTicket = uint256(_getTicket(snarkProofData));\n return userTicket;\n }\n\n function _generateGroupIdFromProperties(\n uint128 groupIndex,\n uint32 generationTimestamp,\n bool isScore\n ) internal pure returns (uint256) {\n return\n _generateGroupIdFromEncodedProperties(\n _encodeGroupProperties(groupIndex, generationTimestamp, isScore)\n );\n }\n\n function _generateGroupIdFromEncodedProperties(bytes memory encodedProperties)\n internal\n pure\n returns (uint256)\n {\n return uint256(keccak256(encodedProperties)) % HydraS1Lib.SNARK_FIELD;\n }\n\n function _encodeGroupProperties(\n uint128 groupIndex,\n uint32 generationTimestamp,\n bool isScore\n ) internal pure returns (bytes memory) {\n return abi.encode(groupIndex, generationTimestamp, isScore);\n }\n\n function _validateClaim(Claim memory claim) internal pure {\n uint256 expectedGroupId = _generateGroupIdFromEncodedProperties(claim.extraData);\n if (claim.groupId != expectedGroupId)\n revert GroupIdAndPropertiesMismatch(expectedGroupId, claim.groupId);\n }\n}\n" + }, + "contracts/periphery/utils/CommitmentMapperRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\nimport {ICommitmentMapperRegistry} from './interfaces/ICommitmentMapperRegistry.sol';\n\n/**\n * @title Commitment Mapper Registry Contract\n * @author Sismo\n * @notice This contract stores information about the commitment mapper.\n * Its ethereum address and its EdDSA public key\n * For more information: https://commitment-mapper.docs.sismo.io\n *\n **/\ncontract CommitmentMapperRegistry is ICommitmentMapperRegistry, Initializable, Ownable {\n uint256[2] internal _commitmentMapperPubKey;\n address _commitmentMapperAddress;\n\n /**\n * @dev Constructor\n * @param owner Owner of the contract, can update public key and address\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\n * @param commitmentMapperAddress Address of the commitment mapper\n */\n constructor(\n address owner,\n uint256[2] memory commitmentMapperEdDSAPubKey,\n address commitmentMapperAddress\n ) {\n initialize(owner, commitmentMapperEdDSAPubKey, commitmentMapperAddress);\n }\n\n /**\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\n * @param owner Owner of the contract, can update public key and address\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\n * @param commitmentMapperAddress Address of the commitment mapper\n */\n function initialize(\n address owner,\n uint256[2] memory commitmentMapperEdDSAPubKey,\n address commitmentMapperAddress\n ) public initializer {\n _transferOwnership(owner);\n _updateCommitmentMapperEdDSAPubKey(commitmentMapperEdDSAPubKey);\n _updateCommitmentMapperAddress(commitmentMapperAddress);\n }\n\n /**\n * @dev Updates the EdDSA public key\n * @param newEdDSAPubKey new EdDSA pubic key\n */\n function updateCommitmentMapperEdDSAPubKey(uint256[2] memory newEdDSAPubKey) external onlyOwner {\n _updateCommitmentMapperEdDSAPubKey(newEdDSAPubKey);\n }\n\n /**\n * @dev Updates the address\n * @param newAddress new address\n */\n function updateCommitmentMapperAddress(address newAddress) external onlyOwner {\n _updateCommitmentMapperAddress(newAddress);\n }\n\n /**\n * @dev Getter of the EdDSA public key of the commitment mapper\n */\n function getEdDSAPubKey() external view override returns (uint256[2] memory) {\n return _commitmentMapperPubKey;\n }\n\n /**\n * @dev Getter of the address of the commitment mapper\n */\n function getAddress() external view override returns (address) {\n return _commitmentMapperAddress;\n }\n\n function _updateCommitmentMapperAddress(address newAddress) internal {\n _commitmentMapperAddress = newAddress;\n emit UpdatedCommitmentMapperAddress(newAddress);\n }\n\n function _updateCommitmentMapperEdDSAPubKey(uint256[2] memory pubKey) internal {\n _commitmentMapperPubKey = pubKey;\n emit UpdatedCommitmentMapperEdDSAPubKey(pubKey);\n }\n}\n" + }, + "contracts/periphery/utils/AvailableRootsRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\nimport {IAvailableRootsRegistry} from './interfaces/IAvailableRootsRegistry.sol';\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\n\n/**\n * @title Attesters Groups Registry\n * @author Sismo\n * @notice This contract stores that data required by attesters to be available so they can verify user claims\n * This contract is deployed behind a proxy and this implementation is focused on storing merkle roots\n * For more information: https://available-roots-registry.docs.sismo.io\n *\n **/\ncontract AvailableRootsRegistry is IAvailableRootsRegistry, Initializable, Ownable {\n mapping(address => mapping(uint256 => bool)) public _roots;\n\n /**\n * @dev Constructor\n * @param owner Owner of the contract, can register/ unregister roots\n */\n constructor(address owner) {\n initialize(owner);\n }\n\n /**\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\n * @param owner Owner of the contract, can update public key and address\n */\n function initialize(address owner) public initializer {\n _transferOwnership(owner);\n }\n\n /**\n * @dev Register a root available for an attester\n * @param attester Attester which will have the root available\n * @param root Root to register\n */\n function registerRootForAttester(address attester, uint256 root) external onlyOwner {\n if (attester == address(0)) revert CannotRegisterForZeroAddress();\n _registerRootForAttester(attester, root);\n }\n\n /**\n * @dev Unregister a root for an attester\n * @param attester Attester which will no longer have the root available\n * @param root Root to unregister\n */\n function unregisterRootForAttester(address attester, uint256 root) external onlyOwner {\n if (attester == address(0)) revert CannotUnregisterForZeroAddress();\n _unregisterRootForAttester(attester, root);\n }\n\n /**\n * @dev Registers a root, available for all contracts\n * @param root Root to register\n */\n function registerRootForAll(uint256 root) external onlyOwner {\n _registerRootForAttester(address(0), root);\n }\n\n /**\n * @dev Unregister a root, available for all contracts\n * @param root Root to unregister\n */\n function unregisterRootForAll(uint256 root) external onlyOwner {\n _unregisterRootForAttester(address(0), root);\n }\n\n /**\n * @dev returns whether a root is available for a caller (msg.sender)\n * @param root root to check whether it is registered for me or not\n */\n function isRootAvailableForMe(uint256 root) external view returns (bool) {\n return _roots[_msgSender()][root] || _roots[address(0)][root];\n }\n\n /**\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\n * @param attester Owner of the contract, can update public key and address\n * @param root Owner of the contract, can update public key and address\n */\n function isRootAvailableForAttester(address attester, uint256 root) external view returns (bool) {\n return _roots[attester][root] || _roots[address(0)][root];\n }\n\n function _registerRootForAttester(address attester, uint256 root) internal {\n _roots[attester][root] = true;\n if (attester == address(0)) {\n emit RegisteredRootForAll(root);\n } else {\n emit RegisteredRootForAttester(attester, root);\n }\n }\n\n function _unregisterRootForAttester(address attester, uint256 root) internal {\n _roots[attester][root] = false;\n if (attester == address(0)) {\n emit UnregisteredRootForAll(root);\n } else {\n emit UnregisteredRootForAttester(attester, root);\n }\n }\n}\n" + }, + "@sismo-core/hydra-s1/contracts/HydraS1Verifier.sol": { + "content": "//\n// Copyright 2017 Christian Reitwiessner\n// 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:\n// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n// 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.\n//\n// 2019 OKIMS\n// ported to solidity 0.6\n// fixed linter warnings\n// added requiere error messages\n//\n//\n// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.0;\nlibrary Pairing {\n struct G1Point {\n uint X;\n uint Y;\n }\n // Encoding of field elements is: X[0] * z + X[1]\n struct G2Point {\n uint[2] X;\n uint[2] Y;\n }\n /// @return the generator of G1\n function P1() internal pure returns (G1Point memory) {\n return G1Point(1, 2);\n }\n /// @return the generator of G2\n function P2() internal pure returns (G2Point memory) {\n // Original code point\n return G2Point(\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\n );\n\n/*\n // Changed by Jordi point\n return G2Point(\n [10857046999023057135944570762232829481370756359578518086990519993285655852781,\n 11559732032986387107991004021392285783925812861821192530917403151452391805634],\n [8495653923123431417604973247489272438418190587263600148770280649306958101930,\n 4082367875863433681332203403145435568316851327593401208105741076214120093531]\n );\n*/\n }\n /// @return r the negation of p, i.e. p.addition(p.negate()) should be zero.\n function negate(G1Point memory p) internal pure returns (G1Point memory r) {\n // The prime q in the base field F_q for G1\n uint q = 21888242871839275222246405745257275088696311157297823662689037894645226208583;\n if (p.X == 0 && p.Y == 0)\n return G1Point(0, 0);\n return G1Point(p.X, q - (p.Y % q));\n }\n /// @return r the sum of two points of G1\n function addition(G1Point memory p1, G1Point memory p2) internal view returns (G1Point memory r) {\n uint[4] memory input;\n input[0] = p1.X;\n input[1] = p1.Y;\n input[2] = p2.X;\n input[3] = p2.Y;\n bool success;\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60)\n // Use \"invalid\" to make gas estimation work\n switch success case 0 { invalid() }\n }\n require(success,\"pairing-add-failed\");\n }\n /// @return r the product of a point on G1 and a scalar, i.e.\n /// p == p.scalar_mul(1) and p.addition(p) == p.scalar_mul(2) for all points p.\n function scalar_mul(G1Point memory p, uint s) internal view returns (G1Point memory r) {\n uint[3] memory input;\n input[0] = p.X;\n input[1] = p.Y;\n input[2] = s;\n bool success;\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60)\n // Use \"invalid\" to make gas estimation work\n switch success case 0 { invalid() }\n }\n require (success,\"pairing-mul-failed\");\n }\n /// @return the result of computing the pairing check\n /// e(p1[0], p2[0]) * .... * e(p1[n], p2[n]) == 1\n /// For example pairing([P1(), P1().negate()], [P2(), P2()]) should\n /// return true.\n function pairing(G1Point[] memory p1, G2Point[] memory p2) internal view returns (bool) {\n require(p1.length == p2.length,\"pairing-lengths-failed\");\n uint elements = p1.length;\n uint inputSize = elements * 6;\n uint[] memory input = new uint[](inputSize);\n for (uint i = 0; i < elements; i++)\n {\n input[i * 6 + 0] = p1[i].X;\n input[i * 6 + 1] = p1[i].Y;\n input[i * 6 + 2] = p2[i].X[0];\n input[i * 6 + 3] = p2[i].X[1];\n input[i * 6 + 4] = p2[i].Y[0];\n input[i * 6 + 5] = p2[i].Y[1];\n }\n uint[1] memory out;\n bool success;\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n success := staticcall(sub(gas(), 2000), 8, add(input, 0x20), mul(inputSize, 0x20), out, 0x20)\n // Use \"invalid\" to make gas estimation work\n switch success case 0 { invalid() }\n }\n require(success,\"pairing-opcode-failed\");\n return out[0] != 0;\n }\n /// Convenience method for a pairing check for two pairs.\n function pairingProd2(G1Point memory a1, G2Point memory a2, G1Point memory b1, G2Point memory b2) internal view returns (bool) {\n G1Point[] memory p1 = new G1Point[](2);\n G2Point[] memory p2 = new G2Point[](2);\n p1[0] = a1;\n p1[1] = b1;\n p2[0] = a2;\n p2[1] = b2;\n return pairing(p1, p2);\n }\n /// Convenience method for a pairing check for three pairs.\n function pairingProd3(\n G1Point memory a1, G2Point memory a2,\n G1Point memory b1, G2Point memory b2,\n G1Point memory c1, G2Point memory c2\n ) internal view returns (bool) {\n G1Point[] memory p1 = new G1Point[](3);\n G2Point[] memory p2 = new G2Point[](3);\n p1[0] = a1;\n p1[1] = b1;\n p1[2] = c1;\n p2[0] = a2;\n p2[1] = b2;\n p2[2] = c2;\n return pairing(p1, p2);\n }\n /// Convenience method for a pairing check for four pairs.\n function pairingProd4(\n G1Point memory a1, G2Point memory a2,\n G1Point memory b1, G2Point memory b2,\n G1Point memory c1, G2Point memory c2,\n G1Point memory d1, G2Point memory d2\n ) internal view returns (bool) {\n G1Point[] memory p1 = new G1Point[](4);\n G2Point[] memory p2 = new G2Point[](4);\n p1[0] = a1;\n p1[1] = b1;\n p1[2] = c1;\n p1[3] = d1;\n p2[0] = a2;\n p2[1] = b2;\n p2[2] = c2;\n p2[3] = d2;\n return pairing(p1, p2);\n }\n}\ncontract HydraS1Verifier {\n using Pairing for *;\n struct VerifyingKey {\n Pairing.G1Point alfa1;\n Pairing.G2Point beta2;\n Pairing.G2Point gamma2;\n Pairing.G2Point delta2;\n Pairing.G1Point[] IC;\n }\n struct Proof {\n Pairing.G1Point A;\n Pairing.G2Point B;\n Pairing.G1Point C;\n }\n function verifyingKey() internal pure returns (VerifyingKey memory vk) {\n vk.alfa1 = Pairing.G1Point(\n 20491192805390485299153009773594534940189261866228447918068658471970481763042,\n 9383485363053290200918347156157836566562967994039712273449902621266178545958\n );\n\n vk.beta2 = Pairing.G2Point(\n [4252822878758300859123897981450591353533073413197771768651442665752259397132,\n 6375614351688725206403948262868962793625744043794305715222011528459656738731],\n [21847035105528745403288232691147584728191162732299865338377159692350059136679,\n 10505242626370262277552901082094356697409835680220590971873171140371331206856]\n );\n vk.gamma2 = Pairing.G2Point(\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\n );\n vk.delta2 = Pairing.G2Point(\n [16703691932058078091905716404571265959476320760471681443119627655715361207341,\n 14290274403144646058563103675066900294643500151498463054614740831207315388514],\n [9120517679481713774648131333833134160499672068094273767171232839700590114148,\n 18338638855816625080803231766917659002322979855877827709378572546717723262324]\n );\n vk.IC = new Pairing.G1Point[](11);\n \n vk.IC[0] = Pairing.G1Point( \n 15183981365841448712456044920259850142312423574262787585047804960636415432994,\n 7001044530623564797357151512361873851017731748844374046997463344585588795777\n ); \n \n vk.IC[1] = Pairing.G1Point( \n 3754737654948662562435613969155994959132173506784418442817218316697091994043,\n 16520141448541154153981919757383608282199583682574061862571018786569723115048\n ); \n \n vk.IC[2] = Pairing.G1Point( \n 14734466460881491794568175288621656907425457509621292263456156896685122952305,\n 18495564446073110430251898491840031389094613665866187171071741938161262650771\n ); \n \n vk.IC[3] = Pairing.G1Point( \n 16380352455102502109444307845900237792657209995731679788026311308996926499427,\n 11872494853967118743957240270505831687788406895959276908447589431944985706662\n ); \n \n vk.IC[4] = Pairing.G1Point( \n 20199514202493196707492057247804402540358301491780845748325025913208809441866,\n 12760637713678265881350279209961337475498485836996922236408521200416764617323\n ); \n \n vk.IC[5] = Pairing.G1Point( \n 19153715775490328450864792250302417403928222720390978634383848496516270422395,\n 546002182798634190282541153661423157791776194062719045593389981526666716416\n ); \n \n vk.IC[6] = Pairing.G1Point( \n 2572546294944895555897986264162285493992700415786641015895831165477991460890,\n 16475880996834565556958124284585338184010927435675877479782010166270319781724\n ); \n \n vk.IC[7] = Pairing.G1Point( \n 1189084334785746899933155760881982253715630415235816484826929546449434025692,\n 4229672360641556939458327562740354930286687266228809328535679188294452033396\n ); \n \n vk.IC[8] = Pairing.G1Point( \n 19602244162575575785636531633124796303002902053486919698240132790672698216585,\n 181057165072599074288983745076121344893296348827576905983079816835912241514\n ); \n \n vk.IC[9] = Pairing.G1Point( \n 2674333225598340315002358633842521216418358316694409406540164227900893354209,\n 2129512057743264354864596186877181463207231175912159744730924346148245351960\n ); \n \n vk.IC[10] = Pairing.G1Point( \n 7320700433668244102684846027945878190869912696586803178638351868907615350377,\n 2941840530209756385349015075958743796933501451265755778001586753024906675441\n ); \n \n }\n function verify(uint[] memory input, Proof memory proof) internal view returns (uint) {\n uint256 snark_scalar_field = 21888242871839275222246405745257275088548364400416034343698204186575808495617;\n VerifyingKey memory vk = verifyingKey();\n require(input.length + 1 == vk.IC.length,\"verifier-bad-input\");\n // Compute the linear combination vk_x\n Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);\n for (uint i = 0; i < input.length; i++) {\n require(input[i] < snark_scalar_field,\"verifier-gte-snark-scalar-field\");\n vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i]));\n }\n vk_x = Pairing.addition(vk_x, vk.IC[0]);\n if (!Pairing.pairingProd4(\n Pairing.negate(proof.A), proof.B,\n vk.alfa1, vk.beta2,\n vk_x, vk.gamma2,\n proof.C, vk.delta2\n )) return 1;\n return 0;\n }\n /// @return r bool true if proof is valid\n function verifyProof(\n uint[2] memory a,\n uint[2][2] memory b,\n uint[2] memory c,\n uint[10] memory input\n ) public view returns (bool r) {\n Proof memory proof;\n proof.A = Pairing.G1Point(a[0], a[1]);\n proof.B = Pairing.G2Point([b[0][0], b[0][1]], [b[1][0], b[1][1]]);\n proof.C = Pairing.G1Point(c[0], c[1]);\n uint[] memory inputValues = new uint[](input.length);\n for(uint i = 0; i < input.length; i++){\n inputValues[i] = input[i];\n }\n if (verify(inputValues, proof) == 0) {\n return true;\n } else {\n return false;\n }\n }\n}\n" + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "contracts/periphery/utils/interfaces/ICommitmentMapperRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\ninterface ICommitmentMapperRegistry {\n event UpdatedCommitmentMapperEdDSAPubKey(uint256[2] newEdDSAPubKey);\n event UpdatedCommitmentMapperAddress(address newAddress);\n error PubKeyNotValid(uint256[2] pubKey);\n\n /**\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\n * @param owner Owner of the contract, can update public key and address\n * @param commitmentMapperEdDSAPubKey EdDSA public key of the commitment mapper\n * @param commitmentMapperAddress Address of the commitment mapper\n */\n function initialize(\n address owner,\n uint256[2] memory commitmentMapperEdDSAPubKey,\n address commitmentMapperAddress\n ) external;\n\n /**\n * @dev Updates the EdDSA public key\n * @param newEdDSAPubKey new EdDSA pubic key\n */\n function updateCommitmentMapperEdDSAPubKey(uint256[2] memory newEdDSAPubKey) external;\n\n /**\n * @dev Updates the address\n * @param newAddress new address\n */\n function updateCommitmentMapperAddress(address newAddress) external;\n\n /**\n * @dev Getter of the address of the commitment mapper\n */\n function getEdDSAPubKey() external view returns (uint256[2] memory);\n\n /**\n * @dev Getter of the address of the commitment mapper\n */\n function getAddress() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n" + }, + "contracts/periphery/utils/interfaces/IAvailableRootsRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.14;\n\n/**\n * @title IAvailableRootsRegistry\n * @author Sismo\n * @notice Interface for (Merkle) Roots Registry\n */\ninterface IAvailableRootsRegistry {\n event RegisteredRootForAttester(address attester, uint256 root);\n event RegisteredRootForAll(uint256 root);\n event UnregisteredRootForAttester(address attester, uint256 root);\n event UnregisteredRootForAll(uint256 root);\n\n error CannotRegisterForZeroAddress();\n error CannotUnregisterForZeroAddress();\n\n /**\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\n * @param owner Owner of the contract, can update public key and address\n */\n function initialize(address owner) external;\n\n /**\n * @dev Register a root available for an attester\n * @param attester Attester which will have the root available\n * @param root Root to register\n */\n function registerRootForAttester(address attester, uint256 root) external;\n\n /**\n * @dev Unregister a root for an attester\n * @param attester Attester which will no longer have the root available\n * @param root Root to unregister\n */\n function unregisterRootForAttester(address attester, uint256 root) external;\n\n /**\n * @dev Registers a root, available for all contracts\n * @param root Root to register\n */\n function registerRootForAll(uint256 root) external;\n\n /**\n * @dev Unregister a root, available for all contracts\n * @param root Root to unregister\n */\n function unregisterRootForAll(uint256 root) external;\n\n /**\n * @dev returns whether a root is available for a caller (msg.sender)\n * @param root root to check whether it is registered for me or not\n */\n function isRootAvailableForMe(uint256 root) external view returns (bool);\n\n /**\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\n * @param attester Owner of the contract, can update public key and address\n * @param root Owner of the contract, can update public key and address\n */\n function isRootAvailableForAttester(address attester, uint256 root) external view returns (bool);\n}\n" + }, + "contracts/attesters/hydra-s1/variants/HydraS1SoulboundAttester.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.14;\npragma experimental ABIEncoderV2;\n\nimport {IHydraS1SoulboundAttester} from '../interfaces/IHydraS1SoulboundAttester.sol';\n\n// Core protocol Protocol imports\nimport {Request, Attestation, Claim} from '../../../core/libs/Structs.sol';\nimport {Attester, IAttester, IAttestationsRegistry} from '../../../core/Attester.sol';\n\n// Imports related to HydraS1 Proving Scheme\nimport {HydraS1Base, HydraS1Lib, HydraS1ProofData, HydraS1ProofInput, HydraS1Claim} from '../base/HydraS1Base.sol';\n\n/**\n * @title Hydra-S1 Soulbound Attester\n * @author Sismo\n * @notice This attester is part of the family of the Hydra-S1 Attesters.\n * Hydra-S1 attesters enable users to prove they have an account in a group in a privacy preserving way.\n * The Hydra-S1 Base abstract contract is inherited and holds the complex Hydra S1 verification logic.\n * We invite readers to refer to:\n * - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations\n * - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1\n\n * This specific attester has the following characteristics:\n\n * - Zero Knowledge\n * One cannot deduct from an attestation what source account was used to generate the underlying proof\n\n * - Non Strict (scores)\n * If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100.\n * This attester generate attestations of scores\n\n * - Ticketed\n * Each source account gets one userTicket per claim (i.e only one attestation per source account per claim)\n * For people used to semaphore/ tornado cash people:\n * userTicket = hash(sourceSecret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier)\n \n * - SoulBound (with cooldown period)\n * A user can chose to delete attestations or generate attestation to a new destination.\n * When deleting/ sending to a new destination, the ticket will enter a cooldown period, so it remains occasional\n * User will need to wait until the end of the cooldown period before being able to delete or switch destination again\n * One can however know that the former and the new destinations were created using the same userTicket\n \n * - Renewable\n * A userTicket can actually be reused as long as the destination of the attestation remains the same\n * It enables users to renew or update their attestations\n **/\ncontract HydraS1SoulboundAttester is IHydraS1SoulboundAttester, HydraS1Base, Attester {\n using HydraS1Lib for HydraS1ProofData;\n using HydraS1Lib for bytes;\n using HydraS1Lib for Request;\n\n // The deployed contract will need to be authorized to write into the Attestation registry\n // It should get write access on collections from AUTHORIZED_COLLECTION_ID_FIRST to AUTHORIZED_COLLECTION_ID_LAST.\n uint256 public immutable AUTHORIZED_COLLECTION_ID_FIRST;\n uint256 public immutable AUTHORIZED_COLLECTION_ID_LAST;\n uint256 public immutable SOULBOUND_COOLDOWN_DURATION;\n\n mapping(uint256 => TicketData) internal _userTicketsData;\n\n /*******************************************************\n INITIALIZATION FUNCTIONS \n *******************************************************/\n /**\n * @dev Constructor. Initializes the contract\n * @param attestationsRegistryAddress Attestations Registry contract on which the attester will write attestations\n * @param hydraS1VerifierAddress ZK Snark Hydra-S1 Verifier contract\n * @param availableRootsRegistryAddress Registry storing the available groups for this attester (e.g roots of registry merkle trees)\n * @param commitmentMapperAddress commitment mapper's public key registry\n * @param collectionIdFirst Id of the first collection in which the attester is supposed to record\n * @param collectionIdLast Id of the last collection in which the attester is supposed to record\n */\n constructor(\n address attestationsRegistryAddress,\n address hydraS1VerifierAddress,\n address availableRootsRegistryAddress,\n address commitmentMapperAddress,\n uint256 collectionIdFirst,\n uint256 collectionIdLast,\n uint256 soulboundCooldownDuration\n )\n Attester(attestationsRegistryAddress)\n HydraS1Base(hydraS1VerifierAddress, availableRootsRegistryAddress, commitmentMapperAddress)\n {\n AUTHORIZED_COLLECTION_ID_FIRST = collectionIdFirst;\n AUTHORIZED_COLLECTION_ID_LAST = collectionIdLast;\n SOULBOUND_COOLDOWN_DURATION = soulboundCooldownDuration;\n }\n\n /*******************************************************\n MANDATORY FUNCTIONS TO OVERRIDE FROM ATTESTER.SOL\n *******************************************************/\n\n /**\n * @dev Throws if user attestations request is invalid\n * Look into HydraS1Base for more details\n * @param request users request. Claim of having an account part of a group of accounts\n * @param proofData snark proof backing the claim\n */\n function _verifyRequest(Request calldata request, bytes calldata proofData)\n internal\n virtual\n override\n {\n HydraS1ProofData memory snarkProof = abi.decode(proofData, (HydraS1ProofData));\n HydraS1ProofInput memory snarkInput = snarkProof._input();\n HydraS1Claim memory claim = request._claim();\n\n // verifies that the proof corresponds to the claim\n _validateInput(claim, snarkInput);\n // verifies the proof validity\n _verifyProof(snarkProof);\n }\n\n /**\n * @dev Throws if user attestations deletion request is not made by its owner\n * @param attestations attestations to delete\n */\n function _verifyAttestationsDeletionRequest(Attestation[] memory attestations, bytes calldata)\n internal\n view\n override\n {\n for (uint256 i = 0; i < attestations.length; i++) {\n uint256 userTicket = abi.decode(attestations[0].extraData, (uint256));\n if (_userTicketsData[userTicket].destination != msg.sender)\n revert NotAttestationOwner(userTicket, msg.sender);\n }\n }\n\n /**\n * @dev Returns the actual attestations constructed from the user request\n * @param request users request. Claim of having an account part of a group of accounts\n * @param proofData snark public input as well as snark proof\n */\n function buildAttestations(Request calldata request, bytes calldata proofData)\n public\n view\n virtual\n override(IAttester, Attester)\n returns (Attestation[] memory)\n {\n HydraS1Claim memory claim = request._claim();\n\n Attestation[] memory attestations = new Attestation[](1);\n\n uint256 attestationCollectionId = AUTHORIZED_COLLECTION_ID_FIRST +\n claim.groupProperties.groupIndex;\n if (attestationCollectionId > AUTHORIZED_COLLECTION_ID_LAST)\n revert CollectionIdOutOfBound(attestationCollectionId);\n\n // The issuer of attestations is the attester\n address issuer = address(this);\n // user sends the ticket as input in the data\n uint256 userTicket = proofData._getTicket();\n\n attestations[0] = Attestation(\n attestationCollectionId,\n request.destination,\n issuer,\n claim.claimedValue,\n claim.groupProperties.generationTimestamp,\n abi.encode(userTicket)\n );\n\n return (attestations);\n }\n\n /*******************************************************\n OPTIONAL HOOK VIRTUAL FUNCTIONS FROM ATTESTER.SOL\n *******************************************************/\n /**\n * @dev Hook run before recording the attestation.\n * Throws if ticket already used, not a renewal, and ticket on cooldown.\n * @param request users request. Claim of having an account part of a group of accounts\n * @param proofData provided to back the request. snark input and snark proof\n */\n function _beforeRecordAttestations(Request calldata request, bytes calldata proofData)\n internal\n virtual\n override\n {\n uint256 userTicket = proofData._getTicket();\n TicketData memory userTicketData = _userTicketsData[userTicket];\n\n if (\n userTicketData.destination != address(0) && userTicketData.destination != request.destination\n ) {\n if (_isOnCooldown(userTicketData)) revert TicketUsedAndOnCooldown(userTicketData);\n _setTicketOnCooldown(userTicket);\n }\n _setDestinationForTicket(userTicket, request.destination);\n }\n\n function _beforeDeleteAttestations(Attestation[] memory attestations, bytes calldata proofData)\n internal\n override\n {\n // we retrieve the ticketUsed from attestations extraData\n for (uint256 i = 0; i < attestations.length; i++) {\n uint256 userTicket = abi.decode(attestations[i].extraData, (uint256));\n if (_isOnCooldown(_userTicketsData[userTicket]) == true) revert TicketFrozen(userTicket);\n _userTicketsData[userTicket].destination = address(0);\n }\n }\n\n /*******************************************************\n Hydra-S1 MANDATORY FUNCTIONS FROM Hydra-S1 Base Attester\n *******************************************************/\n\n /**\n * @dev Returns the ticket identifier from a user claim\n * @param claim user Hydra-S1 claim = have an account with a specific value in a specific group\n * ticket = hash(sourceSecretHash, ticketIdentifier), which is verified inside the snark\n * users bring sourceSecretHash as private input in snark which guarantees privacy\n \n * Here we chose ticketIdentifier = hash(attesterAddress, claim.GroupId)\n * Creates one ticket per group, per user and makes sure no collision with other attester's tickets\n **/\n function _getTicketIdentifierOfClaim(HydraS1Claim memory claim)\n internal\n view\n override\n returns (uint256)\n {\n uint256 ticketIdentifier = _encodeInSnarkField(address(this), claim.groupProperties.groupIndex);\n return ticketIdentifier;\n }\n\n /*******************************************************\n Hydra-S1 Attester Specific Functions\n *******************************************************/\n\n /**\n * @dev Getter, returns the last attestation destination of a ticket\n * @param userTicket ticket used\n **/\n function getDestinationOfTicket(uint256 userTicket) external view override returns (address) {\n return _getDestinationOfTicket(userTicket);\n }\n\n /**\n * @dev Getter, returns the data linked to a ticket\n * @param userTicket ticket used\n **/\n function getTicketData(uint256 userTicket) external view override returns (TicketData memory) {\n return _getTicketData(userTicket);\n }\n\n /**\n * @dev returns whether a ticket is on cooldown or not\n * @param userTicket ticket used\n **/\n function isTicketOnCooldown(uint256 userTicket) external view override returns (bool) {\n return _isOnCooldown(_getTicketData(userTicket));\n }\n\n function _setDestinationForTicket(uint256 userTicket, address destination) internal virtual {\n _userTicketsData[userTicket].destination = destination;\n emit TicketDestinationUpdated(userTicket, destination);\n }\n\n function _setTicketOnCooldown(uint256 userTicket) internal {\n _userTicketsData[userTicket].cooldownStart = uint32(block.timestamp);\n emit TicketSetOnCooldown(userTicket);\n }\n\n function _getDestinationOfTicket(uint256 userTicket) internal view returns (address) {\n return _userTicketsData[userTicket].destination;\n }\n\n function _isOnCooldown(TicketData memory userTicketData) internal view returns (bool) {\n return userTicketData.cooldownStart + SOULBOUND_COOLDOWN_DURATION < block.timestamp;\n }\n\n function _getTicketData(uint256 userTicket) internal view returns (TicketData memory) {\n return _userTicketsData[userTicket];\n }\n\n function _encodeInSnarkField(address addr, uint256 nb) internal pure returns (uint256) {\n return uint256(keccak256(abi.encode(addr, nb))) % HydraS1Lib.SNARK_FIELD;\n }\n}\n" + }, + "contracts/attesters/hydra-s1/interfaces/IHydraS1SoulboundAttester.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.14;\npragma experimental ABIEncoderV2;\n\nimport {Attestation} from '../../../core/libs/Structs.sol';\nimport {IAttester} from '../../../core/interfaces/IAttester.sol';\nimport {CommitmentMapperRegistry} from '../../../periphery/utils/CommitmentMapperRegistry.sol';\nimport {AvailableRootsRegistry} from '../../../periphery/utils/AvailableRootsRegistry.sol';\nimport {HydraS1Lib, HydraS1ProofData, HydraS1ProofInput} from './../libs/HydraS1Lib.sol';\nimport {IHydraS1Base} from './../base/IHydraS1Base.sol';\n\n// todo: explain well what is specific to this attester\ninterface IHydraS1SoulboundAttester is IHydraS1Base, IAttester {\n struct TicketData {\n address destination;\n uint32 cooldownStart;\n }\n error NotAttestationOwner(uint256 ticket, address sender);\n error TicketFrozen(uint256 ticketData);\n error TicketUsedAndOnCooldown(TicketData ticketData);\n error CollectionIdOutOfBound(uint256 collectionId);\n\n event TicketDestinationUpdated(uint256 ticket, address newOwner);\n event TicketSetOnCooldown(uint256 ticket);\n\n /**\n * @dev returns whether a ticket is on cooldown or not\n * @param userTicket ticket used\n **/\n function isTicketOnCooldown(uint256 userTicket) external view returns (bool);\n\n /**\n * @dev Getter, returns the data linked to a ticket\n * @param userTicket ticket used\n **/\n function getTicketData(uint256 userTicket) external view returns (TicketData memory);\n\n /**\n * @dev Getter, returns the last attestation destination of a ticket\n * @param userTicket ticket used\n **/\n function getDestinationOfTicket(uint256 userTicket) external view returns (address);\n\n /**\n * @dev Getter\n * returns of the first collection in which the attester is supposed to record\n **/\n function AUTHORIZED_COLLECTION_ID_FIRST() external view returns (uint256);\n\n /**\n * @dev Getter\n * returns of the last collection in which the attester is supposed to record\n **/\n function AUTHORIZED_COLLECTION_ID_LAST() external view returns (uint256);\n\n /**\n * @dev Getter\n * returns of the duration of the cooldown period after having used a ticket\n **/\n function SOULBOUND_COOLDOWN_DURATION() external view returns (uint256);\n}\n" + }, + "contracts/core/Attester.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\nimport {IAttester} from './interfaces/IAttester.sol';\nimport {IAttestationsRegistry} from './interfaces/IAttestationsRegistry.sol';\nimport {Request, Attestation, AttestationData} from './libs/Structs.sol';\n\n/**\n * @title Attester Abstract Contract\n * @author Sismo\n * @notice Contract to be inherited by Attesters\n * All attesters that expect to be authorized in Sismo Protocol (i.e write access on the registry)\n * are recommended to implemented this abstract contract\n\n * Take a look at the HydraS1SimpleAttester.sol for example on how to implement this abstract contract\n *\n * This contracts is built around two main external standard functions.\n * They must NOT be override them, unless your really know what you are doing\n \n * - generateAttestations(request, proof) => will write attestations in the registry\n * 1. (MANDATORY) Implement the buildAttestations() view function which generate attestations from user request\n * 2. (MANDATORY) Implement teh _verifyRequest() internal function where to write checks\n * 3. (OPTIONAL) Override _beforeRecordAttestations and _afterRecordAttestations hooks\n\n * - deleteAttestations(collectionId, owner, proof) => will delete attestations in the registry\n * 1. (DEFAULT) By default this function throws (see _verifyAttestationsDeletionRequest)\n * 2. (OPTIONAL) Override the _verifyAttestationsDeletionRequest so it no longer throws\n * 3. (OPTIONAL) Override _beforeDeleteAttestations and _afterDeleteAttestations hooks\n\n * For more information: https://attesters.docs.sismo.io\n **/\nabstract contract Attester is IAttester {\n // Registry where all attestations are stored\n IAttestationsRegistry internal immutable ATTESTATIONS_REGISTRY;\n\n /**\n * @dev Constructor\n * @param attestationsRegistryAddress The address of the AttestationsRegistry contract storing attestations\n */\n constructor(address attestationsRegistryAddress) {\n ATTESTATIONS_REGISTRY = IAttestationsRegistry(attestationsRegistryAddress);\n }\n\n /**\n * @dev Main external function. Allows to generate attestations by making a request and submitting proof\n * @param request User request\n * @param proofData Data sent along the request to prove its validity\n * @return attestations Attestations that has been recorded\n */\n function generateAttestations(Request calldata request, bytes calldata proofData)\n external\n override\n returns (Attestation[] memory)\n {\n // Verify if request is valid by verifying against proof\n _verifyRequest(request, proofData);\n\n // Generate the actual attestations from user request\n Attestation[] memory attestations = buildAttestations(request, proofData);\n\n _beforeRecordAttestations(request, proofData);\n\n ATTESTATIONS_REGISTRY.recordAttestations(attestations);\n\n _afterRecordAttestations(attestations);\n\n for (uint256 i = 0; i < attestations.length; i++) {\n emit AttestationGenerated(attestations[i]);\n }\n\n return attestations;\n }\n\n /**\n * @dev External facing function. Allows to delete attestations by submitting proof\n * @param collectionIds Collection identifier of attestations to delete\n * @param attestationsOwner Owner of attestations to delete\n * @param proofData Data sent along the deletion request to prove its validity\n * @return attestations Attestations that were deleted\n */\n function deleteAttestations(\n uint256[] calldata collectionIds,\n address attestationsOwner,\n bytes calldata proofData\n ) external override returns (Attestation[] memory) {\n // fetch attestations from the registry\n Attestation[] memory attestationsToDelete;\n for (uint256 i = 0; i < collectionIds.length; i++) {\n (\n address issuer,\n uint256 attestationValue,\n uint32 timestamp,\n bytes memory extraData\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\n\n attestationsToDelete[i] = (\n Attestation(\n collectionIds[i],\n attestationsOwner,\n issuer,\n attestationValue,\n timestamp,\n extraData\n )\n );\n }\n\n _verifyAttestationsDeletionRequest(attestationsToDelete, proofData);\n\n _beforeDeleteAttestations(attestationsToDelete, proofData);\n\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationsToDelete);\n\n _afterDeleteAttestations(attestationsToDelete, proofData);\n\n for (uint256 i = 0; i < collectionIds.length; i++) {\n emit AttestationDeleted(attestationsToDelete[i]);\n }\n return attestationsToDelete;\n }\n\n /**\n * @dev MANDATORY: must be implemented in attesters\n * It should build attestations from the user request and the proof\n * @param request User request\n * @param proofData Data sent along the request to prove its validity\n * @return attestations Attestations that will be recorded\n */\n function buildAttestations(Request calldata request, bytes calldata proofData)\n public\n view\n virtual\n returns (Attestation[] memory);\n\n /**\n * @dev Attestation registry getter\n * @return attestationRegistry\n */\n function getAttestationRegistry() external view override returns (IAttestationsRegistry) {\n return ATTESTATIONS_REGISTRY;\n }\n\n /**\n * @dev MANDATORY: must be implemented in attesters\n * It should verify the user request is valid\n * @param request User request\n * @param proofData Data sent along the request to prove its validity\n */\n function _verifyRequest(Request calldata request, bytes calldata proofData) internal virtual;\n\n /**\n * @dev Optional: must be overridden by attesters that want to feature attestations deletion\n * Default behavior: throws\n * It should verify attestations deletion request is valid\n * @param attestations Attestations that will be deleted\n * @param proofData Data sent along the request to prove its validity\n */\n function _verifyAttestationsDeletionRequest(\n Attestation[] memory attestations,\n bytes calldata proofData\n ) internal virtual {\n revert AttestationDeletionNotImplemented();\n }\n\n /**\n * @dev Optional: Hook, can be overridden in attesters\n * Will be called before recording attestations in the registry\n * @param request User request\n * @param proofData Data sent along the request to prove its validity\n */\n function _beforeRecordAttestations(Request calldata request, bytes calldata proofData)\n internal\n virtual\n {}\n\n /**\n * @dev (Optional) Can be overridden in attesters inheriting this contract\n * Will be called after recording an attestation\n * @param attestations Recorded attestations\n */\n function _afterRecordAttestations(Attestation[] memory attestations) internal virtual {}\n\n /**\n * @dev Optional: Hook, can be overridden in attesters\n * Will be called before deleting attestations from the registry\n * @param attestations Attestations to delete\n * @param proofData Data sent along the deletion request to prove its validity\n */\n function _beforeDeleteAttestations(Attestation[] memory attestations, bytes calldata proofData)\n internal\n virtual\n {}\n\n /**\n * @dev Optional: Hook, can be overridden in attesters\n * Will be called after deleting attestations from the registry\n * @param attestations Attestations to delete\n * @param proofData Data sent along the deletion request to prove its validity\n */\n function _afterDeleteAttestations(Attestation[] memory attestations, bytes calldata proofData)\n internal\n virtual\n {}\n}\n" + }, + "contracts/core/interfaces/IAttester.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\nimport {Request, Attestation} from '../libs/Structs.sol';\nimport {IAttestationsRegistry} from '../interfaces/IAttestationsRegistry.sol';\n\n/**\n * @title IAttester\n * @author Sismo\n * @notice This is the interface for the attesters in Sismo Protocol\n */\ninterface IAttester {\n event AttestationGenerated(Attestation attestation);\n\n event AttestationDeleted(Attestation attestation);\n\n error AttestationDeletionNotImplemented();\n\n /**\n * @dev Main external function. Allows to generate attestations by making a request and submitting proof\n * @param request User request\n * @param proofData Data sent along the request to prove its validity\n * @return attestations Attestations that has been recorded\n */\n function generateAttestations(Request calldata request, bytes calldata proofData)\n external\n returns (Attestation[] memory);\n\n /**\n * @dev External facing function. Allows to delete an attestation by submitting proof\n * @param collectionIds Collection identifier of attestations to delete\n * @param attestationsOwner Owner of attestations to delete\n * @param proofData Data sent along the deletion request to prove its validity\n * @return attestations Attestations that was deleted\n */\n function deleteAttestations(\n uint256[] calldata collectionIds,\n address attestationsOwner,\n bytes calldata proofData\n ) external returns (Attestation[] memory);\n\n /**\n * @dev MANDATORY: must be implemented in attesters\n * It should build attestations from the user request and the proof\n * @param request User request\n * @param proofData Data sent along the request to prove its validity\n * @return attestations Attestations that will be recorded\n */\n function buildAttestations(Request calldata request, bytes calldata proofData)\n external\n view\n returns (Attestation[] memory);\n\n /**\n * @dev Attestation registry address getter\n * @return attestationRegistry Address of the registry\n */\n function getAttestationRegistry() external view returns (IAttestationsRegistry);\n}\n" + }, + "contracts/core/interfaces/IAttestationsRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\nimport {Attestation, AttestationData} from '../libs/Structs.sol';\n\n/**\n * @title IAttestationsRegistry\n * @author Sismo\n * @notice This is the interface of the AttestationRegistry\n */\ninterface IAttestationsRegistry {\n event AttestationRecorded(Attestation attestation);\n event AttestationDeleted(Attestation attestation);\n\n /**\n * @dev Main function to be called by authorized issuers\n * @param attestations Attestations to be recorded (creates a new one or overrides an existing one)\n */\n function recordAttestations(Attestation[] calldata attestations) external;\n\n /**\n * @dev Delete function to be called by authorized issuers\n * @param attestations Attestations to be deleted\n */\n function deleteAttestations(Attestation[] calldata attestations) external;\n\n /**\n * @dev Returns whether a user has an attestation from a collection\n * @param collectionId Collection identifier of the targeted attestation\n * @param owner Owner of the targeted attestation\n */\n function hasAttestation(uint256 collectionId, address owner) external returns (bool);\n\n /**\n * @dev Getter of the data of a specific attestation\n * @param collectionId Collection identifier of the targeted attestation\n * @param owner Owner of the targeted attestation\n */\n function getAttestationData(uint256 collectionId, address owner)\n external\n view\n returns (AttestationData memory);\n\n /**\n * @dev Getter of the value of a specific attestation\n * @param collectionId Collection identifier of the targeted attestation\n * @param owner Owner of the targeted attestation\n */\n function getAttestationValue(uint256 collectionId, address owner) external view returns (uint256);\n\n /**\n * @dev Getter of the data of a specific attestation as tuple\n * @param collectionId Collection identifier of the targeted attestation\n * @param owner Owner of the targeted attestation\n */\n function getAttestationDataTuple(uint256 collectionId, address owner)\n external\n view\n returns (\n address,\n uint256,\n uint32,\n bytes memory\n );\n\n /**\n * @dev Getter of the extraData of a specific attestation\n * @param collectionId Collection identifier of the targeted attestation\n * @param owner Owner of the targeted attestation\n */\n function getAttestationExtraData(uint256 collectionId, address owner)\n external\n view\n returns (bytes memory);\n\n /**\n * @dev Getter of the issuer of a specific attestation\n * @param collectionId Collection identifier of the targeted attestation\n * @param owner Owner of the targeted attestation\n */\n function getAttestationIssuer(uint256 collectionId, address owner)\n external\n view\n returns (address);\n\n /**\n * @dev Getter of the timestamp of a specific attestation\n * @param collectionId Collection identifier of the targeted attestation\n * @param owner Owner of the targeted attestation\n */\n function getAttestationTimestamp(uint256 collectionId, address owner)\n external\n view\n returns (uint32);\n\n /**\n * @dev Getter of the data of specific attestations\n * @param collectionIds Collection identifiers of the targeted attestations\n * @param owners Owners of the targeted attestations\n */\n function getAttestationDataBatch(uint256[] memory collectionIds, address[] memory owners)\n external\n view\n returns (AttestationData[] memory);\n\n /**\n * @dev Getter of the values of specific attestations\n * @param collectionIds Collection identifiers of the targeted attestations\n * @param owners Owners of the targeted attestations\n */\n function getAttestationValueBatch(uint256[] memory collectionIds, address[] memory owners)\n external\n view\n returns (uint256[] memory);\n}\n" + }, + "contracts/tests/MockAttester.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.14;\n\nimport {Attestation, Request} from '../core/libs/Structs.sol';\nimport {Attester} from '../core/Attester.sol';\nimport {IAttester} from '../core/interfaces/IAttester.sol';\n\ncontract MockAttester is IAttester, Attester {\n uint256 public immutable ATTESTATION_ID_MIN;\n uint256 public immutable ATTESTATION_ID_MAX;\n\n constructor(\n address ATTESTATION_REGISTRY_ADDRESS,\n uint256 collectionIdFirst,\n uint256 collectionIdLast\n ) Attester(ATTESTATION_REGISTRY_ADDRESS) {\n ATTESTATION_ID_MIN = collectionIdFirst;\n ATTESTATION_ID_MAX = collectionIdLast;\n }\n\n function _verifyRequest(Request calldata request, bytes calldata proofData)\n internal\n virtual\n override\n {}\n\n function buildAttestations(\n Request calldata request,\n bytes calldata /*data*/\n ) public view virtual override(Attester, IAttester) returns (Attestation[] memory) {\n uint256 collectionId = ATTESTATION_ID_MIN + request.claims[0].groupId;\n Attestation[] memory attestations = new Attestation[](1);\n attestations[0] = Attestation(\n collectionId,\n request.destination,\n address(this),\n request.claims[0].claimedValue,\n abi.decode(request.claims[0].extraData, (uint32)),\n 'Mock Attester v0'\n );\n return (attestations);\n }\n}\n" + }, + "contracts/core/Front.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\nimport {IFront} from './interfaces/IFront.sol';\nimport {IAttester} from './interfaces/IAttester.sol';\nimport {IAttestationsRegistry} from './interfaces/IAttestationsRegistry.sol';\nimport {Request, Attestation} from './libs/Structs.sol';\n\n/**\n * @title Front\n * @author Sismo\n * @notice This is the Front contract of the Sismo protocol\n * Behind a proxy, it routes attestations request to the targeted attester and can perform some actions\n * This specific implementation rewards early users with a early user attestation if they used sismo before ethcc conference\n\n * For more information: https://front.docs.sismo.io\n */\ncontract Front is IFront {\n IAttestationsRegistry public immutable ATTESTATIONS_REGISTRY;\n uint256 public constant EARLY_USER_COLLECTION = 0;\n uint32 public constant EARLY_USER_BADGE_END_DATE = 1663200000; // Sept 15\n\n /**\n * @dev Constructor\n * @param attestationsRegistryAddress Attestations registry contract address\n */\n constructor(address attestationsRegistryAddress) {\n ATTESTATIONS_REGISTRY = IAttestationsRegistry(attestationsRegistryAddress);\n }\n\n /**\n * @dev Forward a request to an attester and generates an early user attestation\n * @param attester Attester targeted by the request\n * @param request Request sent to the attester\n * @param proofData Data provided to the attester to back the request\n */\n function generateAttestations(\n address attester,\n Request calldata request,\n bytes calldata proofData\n ) external override returns (Attestation[] memory) {\n Attestation[] memory attestations = _forwardAttestationsGeneration(\n attester,\n request,\n proofData\n );\n _generateEarlyUserAttestation(request.destination);\n return attestations;\n }\n\n /**\n * @dev generate multiple attestations at once, to the same destination, generates an early user attestation\n * @param attesters Attesters targeted by the attesters\n * @param requests Requests sent to attester\n * @param proofDataArray Data sent with each request\n */\n function batchGenerateAttestations(\n address[] calldata attesters,\n Request[] calldata requests,\n bytes[] calldata proofDataArray\n ) external override returns (Attestation[][] memory) {\n Attestation[][] memory attestations = new Attestation[][](attesters.length);\n address destination = requests[0].destination;\n for (uint256 i = 0; i < attesters.length; i++) {\n if (requests[i].destination != destination) revert DifferentRequestsDestinations();\n attestations[i] = _forwardAttestationsGeneration(\n attesters[i],\n requests[i],\n proofDataArray[i]\n );\n }\n _generateEarlyUserAttestation(destination);\n return attestations;\n }\n\n /**\n * @dev build the attestations from a user request targeting a specific attester.\n * Forwards to the build function of targeted attester\n * @param attester Targeted attester\n * @param request User request\n * @param proofData Data sent along the request to prove its validity\n * @return attestations Attestations that will be recorded\n */\n function buildAttestations(\n address attester,\n Request calldata request,\n bytes calldata proofData\n ) external view override returns (Attestation[] memory) {\n return _forwardAttestationsBuild(attester, request, proofData);\n }\n\n /**\n * @dev build the attestations from multiple user requests.\n * Forwards to the build function of targeted attester\n * @param attesters Targeted attesters\n * @param requests User requests\n * @param proofDataArray Data sent along the request to prove its validity\n * @return attestations Attestations that will be recorded\n */\n function batchBuildAttestations(\n address[] calldata attesters,\n Request[] calldata requests,\n bytes[] calldata proofDataArray\n ) external view override returns (Attestation[][] memory) {\n Attestation[][] memory attestations = new Attestation[][](attesters.length);\n\n for (uint256 i = 0; i < attesters.length; i++) {\n attestations[i] = _forwardAttestationsBuild(attesters[i], requests[i], proofDataArray[i]);\n }\n return attestations;\n }\n\n function _forwardAttestationsBuild(\n address attester,\n Request calldata request,\n bytes calldata proofData\n ) internal view returns (Attestation[] memory) {\n return IAttester(attester).buildAttestations(request, proofData);\n }\n\n function _forwardAttestationsGeneration(\n address attester,\n Request calldata request,\n bytes calldata proofData\n ) internal returns (Attestation[] memory) {\n return IAttester(attester).generateAttestations(request, proofData);\n }\n\n function _generateEarlyUserAttestation(address destination) internal {\n uint32 currentTimestamp = uint32(block.timestamp);\n if (currentTimestamp < EARLY_USER_BADGE_END_DATE) {\n bool alreadyHasAttestation = ATTESTATIONS_REGISTRY.hasAttestation(\n EARLY_USER_COLLECTION,\n destination\n );\n\n if (!alreadyHasAttestation) {\n Attestation[] memory attestations = new Attestation[](1);\n attestations[0] = Attestation(\n EARLY_USER_COLLECTION,\n destination,\n address(this),\n 1,\n currentTimestamp,\n 'With strong love from Sismo'\n );\n ATTESTATIONS_REGISTRY.recordAttestations(attestations);\n emit EarlyUserAttestationGenerated(destination);\n }\n }\n }\n}\n" + }, + "contracts/core/interfaces/IFront.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\nimport {Request, Attestation} from '../libs/Structs.sol';\n\n/**\n * @title IFront\n * @author Sismo\n * @notice This is the interface of the Front Contract\n */\ninterface IFront {\n error DifferentRequestsDestinations();\n event EarlyUserAttestationGenerated(address destination);\n\n /**\n * @dev Forward a request to an attester and generates an early user attestation\n * @param attester Attester targeted by the request\n * @param request Request sent to the attester\n * @param proofData Data provided to the attester to back the request\n */\n function generateAttestations(\n address attester,\n Request calldata request,\n bytes calldata proofData\n ) external returns (Attestation[] memory);\n\n /**\n * @dev generate multiple attestations at once, to the same destination\n * @param attesters Attesters targeted by the attesters\n * @param requests Requests sent to attester\n * @param proofDataArray Data sent with each request\n */\n function batchGenerateAttestations(\n address[] calldata attesters,\n Request[] calldata requests,\n bytes[] calldata proofDataArray\n ) external returns (Attestation[][] memory);\n\n /**\n * @dev build the attestations from a user request targeting a specific attester.\n * Forwards to the build function of targeted attester\n * @param attester Targeted attester\n * @param request User request\n * @param proofData Data sent along the request to prove its validity\n * @return attestations Attestations that will be recorded\n */\n function buildAttestations(\n address attester,\n Request calldata request,\n bytes calldata proofData\n ) external view returns (Attestation[] memory);\n\n /**\n * @dev build the attestations from multiple user requests.\n * Forwards to the build function(s) of targeted attester(s)\n * @param attesters Targeted attesters\n * @param requests User requests\n * @param proofDataArray Data sent along the request to prove its validity\n * @return attestations Attestations that will be recorded\n */\n function batchBuildAttestations(\n address[] calldata attesters,\n Request[] calldata requests,\n bytes[] calldata proofDataArray\n ) external view returns (Attestation[][] memory);\n}\n" + }, + "contracts/tests/MockAttestationsRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\nimport {IAttestationsRegistry} from '../core/interfaces/IAttestationsRegistry.sol';\nimport {AttestationsRegistryConfigLogic} from '../core/libs/attestations-registry/AttestationsRegistryConfigLogic.sol';\nimport {AttestationsRegistryState} from '../core/libs/attestations-registry/AttestationsRegistryState.sol';\nimport {IBadges} from '../core/interfaces/IBadges.sol';\nimport {Attestation, AttestationData} from '../core/libs/Structs.sol';\n\ncontract MockAttestationsRegistry {\n uint256 immutable ATTESTATION_VALUE;\n\n event AttestationRecorded(Attestation attestation);\n\n constructor(uint256 attestationValue) {\n ATTESTATION_VALUE = attestationValue;\n }\n\n function getAttestationValue(uint256 collectionId, address owner)\n external\n view\n returns (uint256)\n {\n return ATTESTATION_VALUE;\n }\n\n function recordAttestations(Attestation[] calldata attestations) external {\n for (uint256 i = 0; i < attestations.length; i++) {\n emit AttestationRecorded(attestations[i]);\n }\n }\n}\n" + }, + "contracts/core/libs/attestations-registry/AttestationsRegistryConfigLogic.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Forked from, removed storage, OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.14;\n\nimport './OwnableLogic.sol';\nimport './PausableLogic.sol';\nimport './InitializableLogic.sol';\nimport './AttestationsRegistryState.sol';\nimport {IAttestationsRegistryConfigLogic} from './../../interfaces/IAttestationsRegistryConfigLogic.sol';\nimport {Range, RangeUtils} from '../utils/RangeLib.sol';\n\n/**\n * @title Attestations Registry Config Logic contract\n * @author Sismo\n * @notice Holds the logic of how to authorize/ unauthorize issuers of attestations in the registry\n **/\ncontract AttestationsRegistryConfigLogic is\n AttestationsRegistryState,\n IAttestationsRegistryConfigLogic,\n OwnableLogic,\n PausableLogic,\n InitializableLogic\n{\n using RangeUtils for Range[];\n\n /**\n * @dev Authorize an issuer for a specific range\n * @param issuer Issuer that will be authorized\n * @param firstCollectionId First collection Id of the range for which the issuer will be authorized\n * @param lastCollectionId Last collection Id of the range for which the issuer will be authorized\n */\n function authorizeRange(\n address issuer,\n uint256 firstCollectionId,\n uint256 lastCollectionId\n ) external override onlyOwner {\n _authorizeRange(issuer, firstCollectionId, lastCollectionId);\n }\n\n /**\n * @dev Unauthorize an issuer for a specific range\n * @param issuer Issuer that will be unauthorized\n * @param rangeIndex Index of the range to be unauthorized\n * @param firstCollectionId First collection Id of the range for which the issuer will be unauthorized\n * @param lastCollectionId Last collection Id of the range for which the issuer will be unauthorized\n */\n function unauthorizeRange(\n address issuer,\n uint256 rangeIndex,\n uint256 firstCollectionId,\n uint256 lastCollectionId\n ) external override onlyOwner {\n _unauthorizeRange(issuer, rangeIndex, firstCollectionId, lastCollectionId);\n }\n\n /**\n * @dev Authorize an issuer for specific ranges\n * @param issuer Issuer that will be authorized\n * @param ranges Ranges for which the issuer will be authorized\n */\n function authorizeRanges(address issuer, Range[] memory ranges) external override onlyOwner {\n for (uint256 i = 0; i < ranges.length; i++) {\n _authorizeRange(issuer, ranges[i].min, ranges[i].max);\n }\n }\n\n /**\n * @dev Unauthorize an issuer for specific ranges\n * @param issuer Issuer that will be unauthorized\n * @param ranges Ranges for which the issuer will be unauthorized\n */\n function unauthorizeRanges(\n address issuer,\n Range[] memory ranges,\n uint256[] memory rangeIndexes\n ) external override onlyOwner {\n for (uint256 i = 0; i < rangeIndexes.length; i++) {\n _unauthorizeRange(issuer, rangeIndexes[i] - i, ranges[i].min, ranges[i].max);\n }\n }\n\n /**\n * @dev Returns whether a specific issuer is authorized or not to record in a specific attestations collection\n * @param issuer Issuer to be checked\n * @param collectionId Collection Id for which the issuer will be checked\n */\n function isAuthorized(address issuer, uint256 collectionId) external view returns (bool) {\n return _isAuthorized(issuer, collectionId);\n }\n\n /**\n * @dev Pauses the registry. Issuers can no longer record or delete attestations\n */\n function pause() external override onlyOwner {\n _pause();\n }\n\n /**\n * @dev Unpauses the registry\n */\n function unpause() external override onlyOwner {\n _unpause();\n }\n\n function _isAuthorized(address issuer, uint256 collectionId) internal view returns (bool) {\n return _authorizedRanges[issuer]._includes(collectionId);\n }\n\n function _authorizeRange(\n address issuer,\n uint256 firstCollectionId,\n uint256 lastCollectionId\n ) internal {\n Range memory newRange = Range(firstCollectionId, lastCollectionId);\n _authorizedRanges[issuer].push(newRange);\n emit IssuerAuthorized(issuer, firstCollectionId, lastCollectionId);\n }\n\n function _unauthorizeRange(\n address issuer,\n uint256 rangeIndex,\n uint256 firstCollectionId,\n uint256 lastCollectionId\n ) internal onlyOwner {\n if (rangeIndex >= _authorizedRanges[issuer].length)\n revert RangeIndexOutOfBounds(issuer, _authorizedRanges[issuer].length, rangeIndex);\n\n uint256 expectedFirstId = _authorizedRanges[issuer][rangeIndex].min;\n uint256 expectedLastId = _authorizedRanges[issuer][rangeIndex].max;\n if (firstCollectionId != expectedFirstId || lastCollectionId != expectedLastId)\n revert IdsMismatch(\n issuer,\n rangeIndex,\n expectedFirstId,\n expectedLastId,\n firstCollectionId,\n lastCollectionId\n );\n\n _authorizedRanges[issuer][rangeIndex] = _authorizedRanges[issuer][\n _authorizedRanges[issuer].length - 1\n ];\n _authorizedRanges[issuer].pop();\n emit IssuerUnauthorized(issuer, firstCollectionId, lastCollectionId);\n }\n}\n" + }, + "contracts/core/libs/attestations-registry/AttestationsRegistryState.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\nimport {Range} from '../utils/RangeLib.sol';\nimport {Attestation, AttestationData} from '../Structs.sol';\n\ncontract AttestationsRegistryState {\n // main config\n bool internal _initialized;\n bool internal _initializing;\n bool internal _paused;\n address internal _owner;\n // keeping some space for future\n uint256[15] private _placeHolders;\n\n // storing the authorized ranges for each attesters\n mapping(address => Range[]) internal _authorizedRanges;\n // keeping some space for future\n uint256[15] private _placeHolders2;\n // storing the data of attestations\n // =collectionId=> =owner=> attestationData\n mapping(uint256 => mapping(address => AttestationData)) internal _attestationsData;\n}\n" + }, + "contracts/core/interfaces/IBadges.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\n/**\n * @title Interface for Badges contract\n * @author Sismo\n * @notice Stateless ERC1155 contract. Reads balance from the values of attestations\n * The associated attestations registry triggers TransferSingle events from this contract\n * It allows badge \"shadow mints and burns\" to be caught by off-chain platforms\n */\ninterface IBadges {\n error BadgesNonTransferrable();\n\n /**\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\n * @param uri Uri for the metadata of badges\n * @param owner Owner of the contract, super admin, can setup roles and update the attestation registry\n */\n function initialize(string memory uri, address owner) external;\n\n /**\n * @dev Main function of the ERC1155 badge\n * The balance of a user is equal to the value of the underlying attestation.\n * attestationCollectionId == badgeId\n * @param account Address to check badge balance (= value of attestation)\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev Emits a TransferSingle event, so subgraphs and other off-chain apps relying on events can see badge minting/burning\n * can only be called by address having the EVENT_TRIGGERER_ROLE (attestations registry address)\n * @param operator who is calling the TransferEvent\n * @param from address(0) if minting, address of the badge holder if burning\n * @param to address of the badge holder is minting, address(0) if burning\n * @param id badgeId for which to trigger the event\n * @param value minted/burned balance\n */\n function triggerTransferEvent(\n address operator,\n address from,\n address to,\n uint256 id,\n uint256 value\n ) external;\n\n /**\n * @dev Set the attestations registry address. Can only be called by owner (default admin)\n * @param attestationsRegistry new attestations registry address\n */\n function setAttestationsRegistry(address attestationsRegistry) external;\n\n /**\n * @dev Set the URI. Can only be called by owner (default admin)\n * @param uri new attestations registry address\n */\n function setUri(string memory uri) external;\n\n /**\n * @dev Getter of the attestations registry\n */\n function getAttestationsRegistry() external view returns (address);\n}\n" + }, + "contracts/core/libs/attestations-registry/OwnableLogic.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Forked from, removed storage, OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.14;\n\nimport '../utils/Context.sol';\nimport './AttestationsRegistryState.sol';\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableLogic is Context, AttestationsRegistryState {\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n // This is the only diff with OZ contract\n // address private _owner;\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), 'Ownable: caller is not the owner');\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), 'Ownable: new owner is the zero address');\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n" + }, + "contracts/core/libs/attestations-registry/PausableLogic.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Forked from, removed storage, OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\n\npragma solidity ^0.8.14;\n\nimport '../utils/Context.sol';\nimport './AttestationsRegistryState.sol';\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract PausableLogic is Context, AttestationsRegistryState {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n // this is the only diff with OZ contract\n // bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor() {\n _paused = false;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n require(!paused(), 'Pausable: paused');\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n require(paused(), 'Pausable: not paused');\n _;\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "contracts/core/libs/attestations-registry/InitializableLogic.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n// Forked from, removed storage, OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.14;\n\nimport '../utils/Address.sol';\nimport './AttestationsRegistryState.sol';\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() initializer {}\n * ```\n * ====\n */\nabstract contract InitializableLogic is AttestationsRegistryState {\n // only diff with oz\n // /**\n // * @dev Indicates that the contract has been initialized.\n // */\n // bool private _initialized;\n\n // /**\n // * @dev Indicates that the contract is in the process of being initialized.\n // */\n // bool private _initializing;\n\n /**\n * @dev Modifier to protect an initializer function from being invoked twice.\n */\n modifier initializer() {\n // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n // contract may have been reentered.\n require(\n _initializing ? _isConstructor() : !_initialized,\n 'Initializable: contract is already initialized'\n );\n\n bool isTopLevelCall = !_initializing;\n if (isTopLevelCall) {\n _initializing = true;\n _initialized = true;\n }\n\n _;\n\n if (isTopLevelCall) {\n _initializing = false;\n }\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} modifier, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, 'Initializable: contract is not initializing');\n _;\n }\n\n function _isConstructor() private view returns (bool) {\n return !Address.isContract(address(this));\n }\n}\n" + }, + "contracts/core/interfaces/IAttestationsRegistryConfigLogic.sol": { + "content": "// SPDX-License-Identifier: MIT\n// Forked from, removed storage, OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.14;\n\nimport {Range, RangeUtils} from '../libs/utils/RangeLib.sol';\n\ninterface IAttestationsRegistryConfigLogic {\n error IssuerNotAuthorized(address issuer, uint256 collectionId);\n error AttesterNotFound(address issuer);\n error RangeIndexOutOfBounds(address issuer, uint256 expectedArrayLength, uint256 rangeIndex);\n error IdsMismatch(\n address issuer,\n uint256 rangeIndex,\n uint256 expectedFirstId,\n uint256 expectedLastId,\n uint256 FirstId,\n uint256 lastCollectionId\n );\n event IssuerAuthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\n event IssuerUnauthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\n\n /**\n * @dev Authorize an issuer for a specific range\n * @param issuer Issuer that will be authorized\n * @param firstCollectionId First collection Id of the range for which the issuer will be authorized\n * @param lastCollectionId Last collection Id of the range for which the issuer will be authorized\n */\n function authorizeRange(\n address issuer,\n uint256 firstCollectionId,\n uint256 lastCollectionId\n ) external;\n\n /**\n * @dev Unauthorize an issuer for a specific range\n * @param issuer Issuer that will be unauthorized\n * @param rangeIndex Index of the range to be unauthorized\n * @param firstCollectionId First collection Id of the range for which the issuer will be unauthorized\n * @param lastCollectionId Last collection Id of the range for which the issuer will be unauthorized\n */\n function unauthorizeRange(\n address issuer,\n uint256 rangeIndex,\n uint256 firstCollectionId,\n uint256 lastCollectionId\n ) external;\n\n /**\n * @dev Authorize an issuer for specific ranges\n * @param issuer Issuer that will be authorized\n * @param ranges Ranges for which the issuer will be authorized\n */\n function authorizeRanges(address issuer, Range[] memory ranges) external;\n\n /**\n * @dev Unauthorize an issuer for specific ranges\n * @param issuer Issuer that will be unauthorized\n * @param ranges Ranges for which the issuer will be unauthorized\n */\n function unauthorizeRanges(\n address issuer,\n Range[] memory ranges,\n uint256[] memory rangeIndexes\n ) external;\n\n /**\n * @dev Returns whether a specific issuer is authorized or not to record in a specific attestations collection\n * @param issuer Issuer to be checked\n * @param collectionId Collection Id for which the issuer will be checked\n */\n function isAuthorized(address issuer, uint256 collectionId) external view returns (bool);\n\n /**\n * @dev Pauses the registry. Issuers can no longer record or delete attestations\n */\n function pause() external;\n\n /**\n * @dev Unpauses the registry\n */\n function unpause() external;\n}\n" + }, + "contracts/core/libs/utils/RangeLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\nstruct Range {\n uint256 min;\n uint256 max;\n}\n\n// Range [0;3] includees 0 and 3\nlibrary RangeUtils {\n function _includes(Range[] storage ranges, uint256 collectionId) internal view returns (bool) {\n for (uint256 i = 0; i < ranges.length; i++) {\n if (collectionId >= ranges[i].min && collectionId <= ranges[i].max) {\n return true;\n }\n }\n return false;\n }\n}\n" + }, + "contracts/core/libs/utils/Context.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.14;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n" + }, + "contracts/core/libs/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, 'Address: insufficient balance');\n\n (bool success, ) = recipient.call{value: amount}('');\n require(success, 'Address: unable to send value, recipient may have reverted');\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, 'Address: low-level call failed');\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, 'Address: low-level call with value failed');\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, 'Address: insufficient balance for call');\n require(isContract(target), 'Address: call to non-contract');\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data)\n internal\n view\n returns (bytes memory)\n {\n return functionStaticCall(target, data, 'Address: low-level static call failed');\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), 'Address: static call to non-contract');\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, 'Address: low-level delegate call failed');\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), 'Address: delegate call to non-contract');\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n" + }, + "contracts/core/Badges.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\nimport {ERC1155} from '@openzeppelin/contracts/token/ERC1155/ERC1155.sol';\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\nimport {ERC1155Pausable} from '@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol';\nimport {AccessControl} from '@openzeppelin/contracts/access/AccessControl.sol';\nimport {IAttestationsRegistry} from './interfaces/IAttestationsRegistry.sol';\nimport {IBadges} from './interfaces/IBadges.sol';\n\n/**\n * @title Badges contract\n * @author Sismo\n * @notice Stateless, Non-transferrable ERC1155 contract. Reads balance from the values of attestations\n * The associated attestations registry triggers TransferSingle events from this contract\n * It allows badge \"shadow mints and burns\" to be caught by off-chain platforms\n * For more information: https://badges.docs.sismo.io\n */\ncontract Badges is IBadges, Initializable, AccessControl, ERC1155 {\n IAttestationsRegistry internal _attestationsRegistry;\n\n bytes32 public constant EVENT_TRIGGERER_ROLE = keccak256('EVENT_TRIGGERER_ROLE');\n\n /**\n * @dev Constructor\n * @param uri Uri for the metadata of badges\n * @param owner Owner of the contract, super admin, can setup roles and update the attestation registry\n */\n constructor(\n string memory uri,\n address owner // This is Sismo Frontend Contract\n ) ERC1155(uri) {\n initialize(uri, owner);\n }\n\n /**\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\n * @param uri Uri for the metadata of badges\n * @param owner Owner of the contract, super admin, can setup roles and update the attestation registry\n */\n function initialize(string memory uri, address owner) public initializer {\n _setURI(uri);\n _grantRole(DEFAULT_ADMIN_ROLE, owner);\n }\n\n /**\n * @dev Main function of the ERC1155 badge\n * The balance of a user is equal to the value of the underlying attestation.\n * attestationCollectionId == badgeId\n * @param account Address to check badge balance (= value of attestation)\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function balanceOf(address account, uint256 id)\n public\n view\n virtual\n override(ERC1155, IBadges)\n returns (uint256)\n {\n return _attestationsRegistry.getAttestationValue(id, account);\n }\n\n /**\n * @dev Emits a TransferSingle event, so subgraphs and other off-chain apps relying on events can see badge minting/burning\n * can only be called by address having the EVENT_TRIGGERER_ROLE (attestations registry address)\n * @param operator who is calling the TransferEvent\n * @param from address(0) if minting, address of the badge holder if burning\n * @param to address of the badge holder is minting, address(0) if burning\n * @param id badgeId for which to trigger the event\n * @param value minted/burned balance\n */\n function triggerTransferEvent(\n address operator,\n address from,\n address to,\n uint256 id,\n uint256 value\n ) external onlyRole(EVENT_TRIGGERER_ROLE) {\n emit TransferSingle(operator, from, to, id, value);\n }\n\n /**\n * @dev Set the attestations registry address. Can only be called by owner (default admin)\n * @param attestationsRegistry new attestations registry address\n */\n function setAttestationsRegistry(address attestationsRegistry)\n external\n override\n onlyRole(DEFAULT_ADMIN_ROLE)\n {\n _attestationsRegistry = IAttestationsRegistry(attestationsRegistry);\n }\n\n /**\n * @dev Set the URI. Can only be called by owner (default admin)\n * @param uri new attestations registry address\n */\n function setUri(string memory uri) external override onlyRole(DEFAULT_ADMIN_ROLE) {\n _setURI(uri);\n }\n\n /**\n * @dev Getter of the attestations registry\n */\n function getAttestationsRegistry() external view override returns (address) {\n return address(_attestationsRegistry);\n }\n\n /**\n * @dev ERC165\n */\n function supportsInterface(bytes4 interfaceId)\n public\n view\n virtual\n override(AccessControl, ERC1155)\n returns (bool)\n {\n return super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Reverts, this is a non transferable ERC115 contract\n */\n function _beforeTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual override {\n revert BadgesNonTransferrable();\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/ERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC1155.sol\";\nimport \"./IERC1155Receiver.sol\";\nimport \"./extensions/IERC1155MetadataURI.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Implementation of the basic standard multi-token.\n * See https://eips.ethereum.org/EIPS/eip-1155\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\n *\n * _Available since v3.1._\n */\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\n using Address for address;\n\n // Mapping from token ID to account balances\n mapping(uint256 => mapping(address => uint256)) private _balances;\n\n // Mapping from account to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\n string private _uri;\n\n /**\n * @dev See {_setURI}.\n */\n constructor(string memory uri_) {\n _setURI(uri_);\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return\n interfaceId == type(IERC1155).interfaceId ||\n interfaceId == type(IERC1155MetadataURI).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC1155MetadataURI-uri}.\n *\n * This implementation returns the same URI for *all* token types. It relies\n * on the token type ID substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * Clients calling this function must replace the `\\{id\\}` substring with the\n * actual token type ID.\n */\n function uri(uint256) public view virtual override returns (string memory) {\n return _uri;\n }\n\n /**\n * @dev See {IERC1155-balanceOf}.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\n require(account != address(0), \"ERC1155: balance query for the zero address\");\n return _balances[id][account];\n }\n\n /**\n * @dev See {IERC1155-balanceOfBatch}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(address[] memory accounts, uint256[] memory ids)\n public\n view\n virtual\n override\n returns (uint256[] memory)\n {\n require(accounts.length == ids.length, \"ERC1155: accounts and ids length mismatch\");\n\n uint256[] memory batchBalances = new uint256[](accounts.length);\n\n for (uint256 i = 0; i < accounts.length; ++i) {\n batchBalances[i] = balanceOf(accounts[i], ids[i]);\n }\n\n return batchBalances;\n }\n\n /**\n * @dev See {IERC1155-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n _setApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC1155-isApprovedForAll}.\n */\n function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[account][operator];\n }\n\n /**\n * @dev See {IERC1155-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) public virtual override {\n require(\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: caller is not owner nor approved\"\n );\n _safeTransferFrom(from, to, id, amount, data);\n }\n\n /**\n * @dev See {IERC1155-safeBatchTransferFrom}.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) public virtual override {\n require(\n from == _msgSender() || isApprovedForAll(from, _msgSender()),\n \"ERC1155: transfer caller is not owner nor approved\"\n );\n _safeBatchTransferFrom(from, to, ids, amounts, data);\n }\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function _safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) internal virtual {\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);\n\n uint256 fromBalance = _balances[id][from];\n require(fromBalance >= amount, \"ERC1155: insufficient balance for transfer\");\n unchecked {\n _balances[id][from] = fromBalance - amount;\n }\n _balances[id][to] += amount;\n\n emit TransferSingle(operator, from, to, id, amount);\n\n _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function _safeBatchTransferFrom(\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n require(to != address(0), \"ERC1155: transfer to the zero address\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n for (uint256 i = 0; i < ids.length; ++i) {\n uint256 id = ids[i];\n uint256 amount = amounts[i];\n\n uint256 fromBalance = _balances[id][from];\n require(fromBalance >= amount, \"ERC1155: insufficient balance for transfer\");\n unchecked {\n _balances[id][from] = fromBalance - amount;\n }\n _balances[id][to] += amount;\n }\n\n emit TransferBatch(operator, from, to, ids, amounts);\n\n _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\n }\n\n /**\n * @dev Sets a new URI for all token types, by relying on the token type ID\n * substitution mechanism\n * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\n *\n * By this mechanism, any occurrence of the `\\{id\\}` substring in either the\n * URI or any of the amounts in the JSON file at said URI will be replaced by\n * clients with the token type ID.\n *\n * For example, the `https://token-cdn-domain/\\{id\\}.json` URI would be\n * interpreted by clients as\n * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\n * for token type ID 0x4cce0.\n *\n * See {uri}.\n *\n * Because these URIs cannot be meaningfully represented by the {URI} event,\n * this function emits no events.\n */\n function _setURI(string memory newuri) internal virtual {\n _uri = newuri;\n }\n\n /**\n * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function _mint(\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) internal virtual {\n require(to != address(0), \"ERC1155: mint to the zero address\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data);\n\n _balances[id][to] += amount;\n emit TransferSingle(operator, address(0), to, id, amount);\n\n _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function _mintBatch(\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {\n require(to != address(0), \"ERC1155: mint to the zero address\");\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n for (uint256 i = 0; i < ids.length; i++) {\n _balances[ids[i]][to] += amounts[i];\n }\n\n emit TransferBatch(operator, address(0), to, ids, amounts);\n\n _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\n }\n\n /**\n * @dev Destroys `amount` tokens of token type `id` from `from`\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `from` must have at least `amount` tokens of token type `id`.\n */\n function _burn(\n address from,\n uint256 id,\n uint256 amount\n ) internal virtual {\n require(from != address(0), \"ERC1155: burn from the zero address\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), \"\");\n\n uint256 fromBalance = _balances[id][from];\n require(fromBalance >= amount, \"ERC1155: burn amount exceeds balance\");\n unchecked {\n _balances[id][from] = fromBalance - amount;\n }\n\n emit TransferSingle(operator, from, address(0), id, amount);\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n */\n function _burnBatch(\n address from,\n uint256[] memory ids,\n uint256[] memory amounts\n ) internal virtual {\n require(from != address(0), \"ERC1155: burn from the zero address\");\n require(ids.length == amounts.length, \"ERC1155: ids and amounts length mismatch\");\n\n address operator = _msgSender();\n\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n\n for (uint256 i = 0; i < ids.length; i++) {\n uint256 id = ids[i];\n uint256 amount = amounts[i];\n\n uint256 fromBalance = _balances[id][from];\n require(fromBalance >= amount, \"ERC1155: burn amount exceeds balance\");\n unchecked {\n _balances[id][from] = fromBalance - amount;\n }\n }\n\n emit TransferBatch(operator, from, address(0), ids, amounts);\n }\n\n /**\n * @dev Approve `operator` to operate on all of `owner` tokens\n *\n * Emits a {ApprovalForAll} event.\n */\n function _setApprovalForAll(\n address owner,\n address operator,\n bool approved\n ) internal virtual {\n require(owner != operator, \"ERC1155: setting approval status for self\");\n _operatorApprovals[owner][operator] = approved;\n emit ApprovalForAll(owner, operator, approved);\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning, as well as batched variants.\n *\n * The same hook is called on both single and batched variants. For single\n * transfers, the length of the `id` and `amount` arrays will be 1.\n *\n * Calling conditions (for each `id` and `amount` pair):\n *\n * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * of token type `id` will be transferred to `to`.\n * - When `from` is zero, `amount` tokens of token type `id` will be minted\n * for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\n * will be burned.\n * - `from` and `to` are never both zero.\n * - `ids` and `amounts` have the same, non-zero length.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual {}\n\n function _doSafeTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes memory data\n ) private {\n if (to.isContract()) {\n try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\n if (response != IERC1155Receiver.onERC1155Received.selector) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n }\n }\n }\n\n function _doSafeBatchTransferAcceptanceCheck(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) private {\n if (to.isContract()) {\n try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\n bytes4 response\n ) {\n if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\n revert(\"ERC1155: ERC1155Receiver rejected tokens\");\n }\n } catch Error(string memory reason) {\n revert(reason);\n } catch {\n revert(\"ERC1155: transfer to non ERC1155Receiver implementer\");\n }\n }\n }\n\n function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\n uint256[] memory array = new uint256[](1);\n array[0] = element;\n\n return array;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1155.sol\";\nimport \"../../../security/Pausable.sol\";\n\n/**\n * @dev ERC1155 token with pausable token transfers, minting and burning.\n *\n * Useful for scenarios such as preventing trades until the end of an evaluation\n * period, or having an emergency switch for freezing all token transfers in the\n * event of a large bug.\n *\n * _Available since v3.1._\n */\nabstract contract ERC1155Pausable is ERC1155, Pausable {\n /**\n * @dev See {ERC1155-_beforeTokenTransfer}.\n *\n * Requirements:\n *\n * - the contract must not be paused.\n */\n function _beforeTokenTransfer(\n address operator,\n address from,\n address to,\n uint256[] memory ids,\n uint256[] memory amounts,\n bytes memory data\n ) internal virtual override {\n super._beforeTokenTransfer(operator, from, to, ids, amounts, data);\n\n require(!paused(), \"ERC1155Pausable: token transfer while paused\");\n }\n}\n" + }, + "@openzeppelin/contracts/access/AccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IAccessControl.sol\";\nimport \"../utils/Context.sol\";\nimport \"../utils/Strings.sol\";\nimport \"../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Contract module that allows children to implement role-based access\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\n * members except through off-chain means by accessing the contract event logs. Some\n * applications may benefit from on-chain enumerability, for those cases see\n * {AccessControlEnumerable}.\n *\n * Roles are referred to by their `bytes32` identifier. These should be exposed\n * in the external API and be unique. The best way to achieve this is by\n * using `public constant` hash digests:\n *\n * ```\n * bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\");\n * ```\n *\n * Roles can be used to represent a set of permissions. To restrict access to a\n * function call, use {hasRole}:\n *\n * ```\n * function foo() public {\n * require(hasRole(MY_ROLE, msg.sender));\n * ...\n * }\n * ```\n *\n * Roles can be granted and revoked dynamically via the {grantRole} and\n * {revokeRole} functions. Each role has an associated admin role, and only\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\n *\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\n * that only accounts with this role will be able to grant or revoke other\n * roles. More complex role relationships can be created by using\n * {_setRoleAdmin}.\n *\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\n * grant and revoke this role. Extra precautions should be taken to secure\n * accounts that have been granted it.\n */\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\n struct RoleData {\n mapping(address => bool) members;\n bytes32 adminRole;\n }\n\n mapping(bytes32 => RoleData) private _roles;\n\n bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\n\n /**\n * @dev Modifier that checks that an account has a specific role. Reverts\n * with a standardized message including the required role.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n *\n * _Available since v4.1._\n */\n modifier onlyRole(bytes32 role) {\n _checkRole(role, _msgSender());\n _;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\n return _roles[role].members[account];\n }\n\n /**\n * @dev Revert with a standard message if `account` is missing `role`.\n *\n * The format of the revert reason is given by the following regular expression:\n *\n * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\n */\n function _checkRole(bytes32 role, address account) internal view virtual {\n if (!hasRole(role, account)) {\n revert(\n string(\n abi.encodePacked(\n \"AccessControl: account \",\n Strings.toHexString(uint160(account), 20),\n \" is missing role \",\n Strings.toHexString(uint256(role), 32)\n )\n )\n );\n }\n }\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\n return _roles[role].adminRole;\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _grantRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\n _revokeRole(role, account);\n }\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been revoked `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) public virtual override {\n require(account == _msgSender(), \"AccessControl: can only renounce roles for self\");\n\n _revokeRole(role, account);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event. Note that unlike {grantRole}, this function doesn't perform any\n * checks on the calling account.\n *\n * [WARNING]\n * ====\n * This function should only be called from the constructor when setting\n * up the initial roles for the system.\n *\n * Using this function in any other way is effectively circumventing the admin\n * system imposed by {AccessControl}.\n * ====\n *\n * NOTE: This function is deprecated in favor of {_grantRole}.\n */\n function _setupRole(bytes32 role, address account) internal virtual {\n _grantRole(role, account);\n }\n\n /**\n * @dev Sets `adminRole` as ``role``'s admin role.\n *\n * Emits a {RoleAdminChanged} event.\n */\n function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\n bytes32 previousAdminRole = getRoleAdmin(role);\n _roles[role].adminRole = adminRole;\n emit RoleAdminChanged(role, previousAdminRole, adminRole);\n }\n\n /**\n * @dev Grants `role` to `account`.\n *\n * Internal function without access restriction.\n */\n function _grantRole(bytes32 role, address account) internal virtual {\n if (!hasRole(role, account)) {\n _roles[role].members[account] = true;\n emit RoleGranted(role, account, _msgSender());\n }\n }\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * Internal function without access restriction.\n */\n function _revokeRole(bytes32 role, address account) internal virtual {\n if (hasRole(role, account)) {\n _roles[role].members[account] = false;\n emit RoleRevoked(role, account, _msgSender());\n }\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/IERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155 is IERC165 {\n /**\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\n */\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\n\n /**\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\n * transfers.\n */\n event TransferBatch(\n address indexed operator,\n address indexed from,\n address indexed to,\n uint256[] ids,\n uint256[] values\n );\n\n /**\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\n * `approved`.\n */\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\n\n /**\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\n *\n * If an {URI} event was emitted for `id`, the standard\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\n * returned by {IERC1155MetadataURI-uri}.\n */\n event URI(string value, uint256 indexed id);\n\n /**\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function balanceOf(address account, uint256 id) external view returns (uint256);\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\n *\n * Requirements:\n *\n * - `accounts` and `ids` must have the same length.\n */\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\n external\n view\n returns (uint256[] memory);\n\n /**\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\n *\n * Emits an {ApprovalForAll} event.\n *\n * Requirements:\n *\n * - `operator` cannot be the caller.\n */\n function setApprovalForAll(address operator, bool approved) external;\n\n /**\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\n *\n * See {setApprovalForAll}.\n */\n function isApprovedForAll(address account, address operator) external view returns (bool);\n\n /**\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\n *\n * Emits a {TransferSingle} event.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\n * acceptance magic value.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 id,\n uint256 amount,\n bytes calldata data\n ) external;\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\n *\n * Emits a {TransferBatch} event.\n *\n * Requirements:\n *\n * - `ids` and `amounts` must have the same length.\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\n * acceptance magic value.\n */\n function safeBatchTransferFrom(\n address from,\n address to,\n uint256[] calldata ids,\n uint256[] calldata amounts,\n bytes calldata data\n ) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev _Available since v3.1._\n */\ninterface IERC1155Receiver is IERC165 {\n /**\n * @dev Handles the receipt of a single ERC1155 token type. This function is\n * called at the end of a `safeTransferFrom` after the balance has been updated.\n *\n * NOTE: To accept the transfer, this must return\n * `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))`\n * (i.e. 0xf23a6e61, or its own function selector).\n *\n * @param operator The address which initiated the transfer (i.e. msg.sender)\n * @param from The address which previously owned the token\n * @param id The ID of the token being transferred\n * @param value The amount of tokens being transferred\n * @param data Additional data with no specified format\n * @return `bytes4(keccak256(\"onERC1155Received(address,address,uint256,uint256,bytes)\"))` if transfer is allowed\n */\n function onERC1155Received(\n address operator,\n address from,\n uint256 id,\n uint256 value,\n bytes calldata data\n ) external returns (bytes4);\n\n /**\n * @dev Handles the receipt of a multiple ERC1155 token types. This function\n * is called at the end of a `safeBatchTransferFrom` after the balances have\n * been updated.\n *\n * NOTE: To accept the transfer(s), this must return\n * `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))`\n * (i.e. 0xbc197c81, or its own function selector).\n *\n * @param operator The address which initiated the batch transfer (i.e. msg.sender)\n * @param from The address which previously owned the token\n * @param ids An array containing ids of each token being transferred (order and length must match values array)\n * @param values An array containing amounts of each token being transferred (order and length must match ids array)\n * @param data Additional data with no specified format\n * @return `bytes4(keccak256(\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\"))` if transfer is allowed\n */\n function onERC1155BatchReceived(\n address operator,\n address from,\n uint256[] calldata ids,\n uint256[] calldata values,\n bytes calldata data\n ) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC1155.sol\";\n\n/**\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\n *\n * _Available since v3.1._\n */\ninterface IERC1155MetadataURI is IERC1155 {\n /**\n * @dev Returns the URI for token type `id`.\n *\n * If the `\\{id\\}` substring is present in the URI, it must be replaced by\n * clients with the actual token type ID.\n */\n function uri(uint256 id) external view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/ERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC165.sol\";\n\n/**\n * @dev Implementation of the {IERC165} interface.\n *\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\n * for the additional interface id that will be supported. For example:\n *\n * ```solidity\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\n * }\n * ```\n *\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\n */\nabstract contract ERC165 is IERC165 {\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\n return interfaceId == type(IERC165).interfaceId;\n }\n}\n" + }, + "@openzeppelin/contracts/utils/introspection/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC165 standard, as defined in the\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\n *\n * Implementers can declare support of contract interfaces, which can then be\n * queried by others ({ERC165Checker}).\n *\n * For an implementation, see {ERC165}.\n */\ninterface IERC165 {\n /**\n * @dev Returns true if this contract implements the interface defined by\n * `interfaceId`. See the corresponding\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\n * to learn more about how these ids are created.\n *\n * This function call must use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}\n" + }, + "@openzeppelin/contracts/security/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which allows children to implement an emergency stop\n * mechanism that can be triggered by an authorized account.\n *\n * This module is used through inheritance. It will make available the\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\n * the functions of your contract. Note that they will not be pausable by\n * simply including this module, only once the modifiers are put in place.\n */\nabstract contract Pausable is Context {\n /**\n * @dev Emitted when the pause is triggered by `account`.\n */\n event Paused(address account);\n\n /**\n * @dev Emitted when the pause is lifted by `account`.\n */\n event Unpaused(address account);\n\n bool private _paused;\n\n /**\n * @dev Initializes the contract in unpaused state.\n */\n constructor() {\n _paused = false;\n }\n\n /**\n * @dev Returns true if the contract is paused, and false otherwise.\n */\n function paused() public view virtual returns (bool) {\n return _paused;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is not paused.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n modifier whenNotPaused() {\n require(!paused(), \"Pausable: paused\");\n _;\n }\n\n /**\n * @dev Modifier to make a function callable only when the contract is paused.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n modifier whenPaused() {\n require(paused(), \"Pausable: not paused\");\n _;\n }\n\n /**\n * @dev Triggers stopped state.\n *\n * Requirements:\n *\n * - The contract must not be paused.\n */\n function _pause() internal virtual whenNotPaused {\n _paused = true;\n emit Paused(_msgSender());\n }\n\n /**\n * @dev Returns to normal state.\n *\n * Requirements:\n *\n * - The contract must be paused.\n */\n function _unpause() internal virtual whenPaused {\n _paused = false;\n emit Unpaused(_msgSender());\n }\n}\n" + }, + "@openzeppelin/contracts/access/IAccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControl {\n /**\n * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n *\n * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n * {RoleAdminChanged} not being emitted signaling this.\n *\n * _Available since v3.1._\n */\n event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n /**\n * @dev Emitted when `account` is granted `role`.\n *\n * `sender` is the account that originated the contract call, an admin role\n * bearer except when using {AccessControl-_setupRole}.\n */\n event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Emitted when `account` is revoked `role`.\n *\n * `sender` is the account that originated the contract call:\n * - if using `revokeRole`, it is the admin role bearer\n * - if using `renounceRole`, it is the role bearer (i.e. `account`)\n */\n event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n /**\n * @dev Returns `true` if `account` has been granted `role`.\n */\n function hasRole(bytes32 role, address account) external view returns (bool);\n\n /**\n * @dev Returns the admin role that controls `role`. See {grantRole} and\n * {revokeRole}.\n *\n * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n */\n function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n /**\n * @dev Grants `role` to `account`.\n *\n * If `account` had not been already granted `role`, emits a {RoleGranted}\n * event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function grantRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from `account`.\n *\n * If `account` had been granted `role`, emits a {RoleRevoked} event.\n *\n * Requirements:\n *\n * - the caller must have ``role``'s admin role.\n */\n function revokeRole(bytes32 role, address account) external;\n\n /**\n * @dev Revokes `role` from the calling account.\n *\n * Roles are often managed via {grantRole} and {revokeRole}: this function's\n * purpose is to provide a mechanism for accounts to lose their privileges\n * if they are compromised (such as when a trusted device is misplaced).\n *\n * If the calling account had been granted `role`, emits a {RoleRevoked}\n * event.\n *\n * Requirements:\n *\n * - the caller must be `account`.\n */\n function renounceRole(bytes32 role, address account) external;\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _HEX_SYMBOLS = \"0123456789abcdef\";\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n */\n function toString(uint256 value) internal pure returns (string memory) {\n // Inspired by OraclizeAPI's implementation - MIT licence\n // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol\n\n if (value == 0) {\n return \"0\";\n }\n uint256 temp = value;\n uint256 digits;\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n bytes memory buffer = new bytes(digits);\n while (value != 0) {\n digits -= 1;\n buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));\n value /= 10;\n }\n return string(buffer);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n */\n function toHexString(uint256 value) internal pure returns (string memory) {\n if (value == 0) {\n return \"0x00\";\n }\n uint256 temp = value;\n uint256 length = 0;\n while (temp != 0) {\n length++;\n temp >>= 8;\n }\n return toHexString(value, length);\n }\n\n /**\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n */\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n bytes memory buffer = new bytes(2 * length + 2);\n buffer[0] = \"0\";\n buffer[1] = \"x\";\n for (uint256 i = 2 * length + 1; i > 1; --i) {\n buffer[i] = _HEX_SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n}\n" + }, + "contracts/periphery/badges-examples/BAYCOwnershipBadgeExample.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\nimport {ERC721} from '@openzeppelin/contracts/token/ERC721/ERC721.sol';\nimport {IAttestationsRegistry} from '../../core/interfaces/IAttestationsRegistry.sol';\n\ncontract BAYCOwnershipBadge is ERC721 {\n IAttestationsRegistry immutable ATTESTATIONS_REGISTRY;\n uint256 constant HydraS1_BAYC_ATTESTATION_COLLECTION_ID = 100000001;\n uint256 constant SMPS_BAYC_ATTESTATION_COLLECTION_ID = 30000000000003;\n\n constructor(\n address attestationsRegistryAddress,\n string memory name,\n string memory symbol\n ) ERC721(name, symbol) {\n ATTESTATIONS_REGISTRY = IAttestationsRegistry(attestationsRegistryAddress);\n }\n\n function balanceOf(address account) public view virtual override returns (uint256) {\n bool hasZKAttestation = ATTESTATIONS_REGISTRY.getAttestationValue(\n HydraS1_BAYC_ATTESTATION_COLLECTION_ID,\n account\n ) > 0;\n bool hasDoxingAttestation = ATTESTATIONS_REGISTRY.getAttestationValue(\n SMPS_BAYC_ATTESTATION_COLLECTION_ID,\n account\n ) > 0;\n return hasZKAttestation || hasDoxingAttestation ? 1 : 0;\n }\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC721.sol\";\nimport \"./IERC721Receiver.sol\";\nimport \"./extensions/IERC721Metadata.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/Context.sol\";\nimport \"../../utils/Strings.sol\";\nimport \"../../utils/introspection/ERC165.sol\";\n\n/**\n * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including\n * the Metadata extension, but not including the Enumerable extension, which is available separately as\n * {ERC721Enumerable}.\n */\ncontract ERC721 is Context, ERC165, IERC721, IERC721Metadata {\n using Address for address;\n using Strings for uint256;\n\n // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Mapping from token ID to owner address\n mapping(uint256 => address) private _owners;\n\n // Mapping owner address to token count\n mapping(address => uint256) private _balances;\n\n // Mapping from token ID to approved address\n mapping(uint256 => address) private _tokenApprovals;\n\n // Mapping from owner to operator approvals\n mapping(address => mapping(address => bool)) private _operatorApprovals;\n\n /**\n * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n */\n function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n return\n interfaceId == type(IERC721).interfaceId ||\n interfaceId == type(IERC721Metadata).interfaceId ||\n super.supportsInterface(interfaceId);\n }\n\n /**\n * @dev See {IERC721-balanceOf}.\n */\n function balanceOf(address owner) public view virtual override returns (uint256) {\n require(owner != address(0), \"ERC721: balance query for the zero address\");\n return _balances[owner];\n }\n\n /**\n * @dev See {IERC721-ownerOf}.\n */\n function ownerOf(uint256 tokenId) public view virtual override returns (address) {\n address owner = _owners[tokenId];\n require(owner != address(0), \"ERC721: owner query for nonexistent token\");\n return owner;\n }\n\n /**\n * @dev See {IERC721Metadata-name}.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev See {IERC721Metadata-symbol}.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev See {IERC721Metadata-tokenURI}.\n */\n function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {\n require(_exists(tokenId), \"ERC721Metadata: URI query for nonexistent token\");\n\n string memory baseURI = _baseURI();\n return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : \"\";\n }\n\n /**\n * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each\n * token will be the concatenation of the `baseURI` and the `tokenId`. Empty\n * by default, can be overriden in child contracts.\n */\n function _baseURI() internal view virtual returns (string memory) {\n return \"\";\n }\n\n /**\n * @dev See {IERC721-approve}.\n */\n function approve(address to, uint256 tokenId) public virtual override {\n address owner = ERC721.ownerOf(tokenId);\n require(to != owner, \"ERC721: approval to current owner\");\n\n require(\n _msgSender() == owner || isApprovedForAll(owner, _msgSender()),\n \"ERC721: approve caller is not owner nor approved for all\"\n );\n\n _approve(to, tokenId);\n }\n\n /**\n * @dev See {IERC721-getApproved}.\n */\n function getApproved(uint256 tokenId) public view virtual override returns (address) {\n require(_exists(tokenId), \"ERC721: approved query for nonexistent token\");\n\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @dev See {IERC721-setApprovalForAll}.\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n _setApprovalForAll(_msgSender(), operator, approved);\n }\n\n /**\n * @dev See {IERC721-isApprovedForAll}.\n */\n function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev See {IERC721-transferFrom}.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n\n _transfer(from, to, tokenId);\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) public virtual override {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev See {IERC721-safeTransferFrom}.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) public virtual override {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n _safeTransfer(from, to, tokenId, _data);\n }\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * `_data` is additional data, it has no specified format and it is sent in call to `to`.\n *\n * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.\n * implement alternative mechanisms to perform token transfer, such as signature-based.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeTransfer(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) internal virtual {\n _transfer(from, to, tokenId);\n require(_checkOnERC721Received(from, to, tokenId, _data), \"ERC721: transfer to non ERC721Receiver implementer\");\n }\n\n /**\n * @dev Returns whether `tokenId` exists.\n *\n * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.\n *\n * Tokens start existing when they are minted (`_mint`),\n * and stop existing when they are burned (`_burn`).\n */\n function _exists(uint256 tokenId) internal view virtual returns (bool) {\n return _owners[tokenId] != address(0);\n }\n\n /**\n * @dev Returns whether `spender` is allowed to manage `tokenId`.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {\n require(_exists(tokenId), \"ERC721: operator query for nonexistent token\");\n address owner = ERC721.ownerOf(tokenId);\n return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));\n }\n\n /**\n * @dev Safely mints `tokenId` and transfers it to `to`.\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function _safeMint(address to, uint256 tokenId) internal virtual {\n _safeMint(to, tokenId, \"\");\n }\n\n /**\n * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is\n * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.\n */\n function _safeMint(\n address to,\n uint256 tokenId,\n bytes memory _data\n ) internal virtual {\n _mint(to, tokenId);\n require(\n _checkOnERC721Received(address(0), to, tokenId, _data),\n \"ERC721: transfer to non ERC721Receiver implementer\"\n );\n }\n\n /**\n * @dev Mints `tokenId` and transfers it to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible\n *\n * Requirements:\n *\n * - `tokenId` must not exist.\n * - `to` cannot be the zero address.\n *\n * Emits a {Transfer} event.\n */\n function _mint(address to, uint256 tokenId) internal virtual {\n require(to != address(0), \"ERC721: mint to the zero address\");\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n _beforeTokenTransfer(address(0), to, tokenId);\n\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n\n _afterTokenTransfer(address(0), to, tokenId);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n *\n * Emits a {Transfer} event.\n */\n function _burn(uint256 tokenId) internal virtual {\n address owner = ERC721.ownerOf(tokenId);\n\n _beforeTokenTransfer(owner, address(0), tokenId);\n\n // Clear approvals\n _approve(address(0), tokenId);\n\n _balances[owner] -= 1;\n delete _owners[tokenId];\n\n emit Transfer(owner, address(0), tokenId);\n\n _afterTokenTransfer(owner, address(0), tokenId);\n }\n\n /**\n * @dev Transfers `tokenId` from `from` to `to`.\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n *\n * Emits a {Transfer} event.\n */\n function _transfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {\n require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n require(to != address(0), \"ERC721: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, tokenId);\n\n // Clear approvals from the previous owner\n _approve(address(0), tokenId);\n\n _balances[from] -= 1;\n _balances[to] += 1;\n _owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n\n _afterTokenTransfer(from, to, tokenId);\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits a {Approval} event.\n */\n function _approve(address to, uint256 tokenId) internal virtual {\n _tokenApprovals[tokenId] = to;\n emit Approval(ERC721.ownerOf(tokenId), to, tokenId);\n }\n\n /**\n * @dev Approve `operator` to operate on all of `owner` tokens\n *\n * Emits a {ApprovalForAll} event.\n */\n function _setApprovalForAll(\n address owner,\n address operator,\n bool approved\n ) internal virtual {\n require(owner != operator, \"ERC721: approve to caller\");\n _operatorApprovals[owner][operator] = approved;\n emit ApprovalForAll(owner, operator, approved);\n }\n\n /**\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\n * The call is not executed if the target address is not a contract.\n *\n * @param from address representing the previous owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the token to be transferred\n * @param _data bytes optional data to send along with the call\n * @return bool whether the call correctly returned the expected magic value\n */\n function _checkOnERC721Received(\n address from,\n address to,\n uint256 tokenId,\n bytes memory _data\n ) private returns (bool) {\n if (to.isContract()) {\n try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {\n return retval == IERC721Receiver.onERC721Received.selector;\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n revert(\"ERC721: transfer to non ERC721Receiver implementer\");\n } else {\n assembly {\n revert(add(32, reason), mload(reason))\n }\n }\n }\n } else {\n return true;\n }\n }\n\n /**\n * @dev Hook that is called before any token transfer. This includes minting\n * and burning.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be\n * transferred to `to`.\n * - When `from` is zero, `tokenId` will be minted for `to`.\n * - When `to` is zero, ``from``'s `tokenId` will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 tokenId\n ) internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/introspection/IERC165.sol\";\n\n/**\n * @dev Required interface of an ERC721 compliant contract.\n */\ninterface IERC721 is IERC165 {\n /**\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\n */\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\n */\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n\n /**\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\n */\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of tokens in ``owner``'s account.\n */\n function balanceOf(address owner) external view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function ownerOf(uint256 tokenId) external view returns (address owner);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Transfers `tokenId` token from `from` to `to`.\n *\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 tokenId\n ) external;\n\n /**\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\n * The approval is cleared when the token is transferred.\n *\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\n *\n * Requirements:\n *\n * - The caller must own the token or be an approved operator.\n * - `tokenId` must exist.\n *\n * Emits an {Approval} event.\n */\n function approve(address to, uint256 tokenId) external;\n\n /**\n * @dev Returns the account approved for `tokenId` token.\n *\n * Requirements:\n *\n * - `tokenId` must exist.\n */\n function getApproved(uint256 tokenId) external view returns (address operator);\n\n /**\n * @dev Approve or remove `operator` as an operator for the caller.\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\n *\n * Requirements:\n *\n * - The `operator` cannot be the caller.\n *\n * Emits an {ApprovalForAll} event.\n */\n function setApprovalForAll(address operator, bool _approved) external;\n\n /**\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\n *\n * See {setApprovalForAll}\n */\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n\n /**\n * @dev Safely transfers `tokenId` token from `from` to `to`.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `tokenId` token must exist and be owned by `from`.\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\n *\n * Emits a {Transfer} event.\n */\n function safeTransferFrom(\n address from,\n address to,\n uint256 tokenId,\n bytes calldata data\n ) external;\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title ERC721 token receiver interface\n * @dev Interface for any contract that wants to support safeTransfers\n * from ERC721 asset contracts.\n */\ninterface IERC721Receiver {\n /**\n * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}\n * by `operator` from `from`, this function is called.\n *\n * It must return its Solidity selector to confirm the token transfer.\n * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.\n *\n * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.\n */\n function onERC721Received(\n address operator,\n address from,\n uint256 tokenId,\n bytes calldata data\n ) external returns (bytes4);\n}\n" + }, + "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC721.sol\";\n\n/**\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\n * @dev See https://eips.ethereum.org/EIPS/eip-721\n */\ninterface IERC721Metadata is IERC721 {\n /**\n * @dev Returns the token collection name.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the token collection symbol.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\n */\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../interfaces/draft-IERC1822.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade {\n // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n /**\n * @dev Storage slot with the address of the current implementation.\n * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n /**\n * @dev Emitted when the implementation is upgraded.\n */\n event Upgraded(address indexed implementation);\n\n /**\n * @dev Returns the current implementation address.\n */\n function _getImplementation() internal view returns (address) {\n return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 implementation slot.\n */\n function _setImplementation(address newImplementation) private {\n require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n }\n\n /**\n * @dev Perform implementation upgrade\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeTo(address newImplementation) internal {\n _setImplementation(newImplementation);\n emit Upgraded(newImplementation);\n }\n\n /**\n * @dev Perform implementation upgrade with additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCall(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n _upgradeTo(newImplementation);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(newImplementation, data);\n }\n }\n\n /**\n * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n *\n * Emits an {Upgraded} event.\n */\n function _upgradeToAndCallUUPS(\n address newImplementation,\n bytes memory data,\n bool forceCall\n ) internal {\n // Upgrades from old implementations will perform a rollback test. This test requires the new\n // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing\n // this special case will break upgrade paths from old UUPS implementation to new ones.\n if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) {\n _setImplementation(newImplementation);\n } else {\n try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {\n require(slot == _IMPLEMENTATION_SLOT, \"ERC1967Upgrade: unsupported proxiableUUID\");\n } catch {\n revert(\"ERC1967Upgrade: new implementation is not UUPS\");\n }\n _upgradeToAndCall(newImplementation, data, forceCall);\n }\n }\n\n /**\n * @dev Storage slot with the admin of the contract.\n * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n * validated in the constructor.\n */\n bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n /**\n * @dev Emitted when the admin account has changed.\n */\n event AdminChanged(address previousAdmin, address newAdmin);\n\n /**\n * @dev Returns the current admin.\n */\n function _getAdmin() internal view returns (address) {\n return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n }\n\n /**\n * @dev Stores a new address in the EIP1967 admin slot.\n */\n function _setAdmin(address newAdmin) private {\n require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n */\n function _changeAdmin(address newAdmin) internal {\n emit AdminChanged(_getAdmin(), newAdmin);\n _setAdmin(newAdmin);\n }\n\n /**\n * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n */\n bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n /**\n * @dev Emitted when the beacon is upgraded.\n */\n event BeaconUpgraded(address indexed beacon);\n\n /**\n * @dev Returns the current beacon.\n */\n function _getBeacon() internal view returns (address) {\n return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n }\n\n /**\n * @dev Stores a new beacon in the EIP1967 beacon slot.\n */\n function _setBeacon(address newBeacon) private {\n require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n require(\n Address.isContract(IBeacon(newBeacon).implementation()),\n \"ERC1967: beacon implementation is not a contract\"\n );\n StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n }\n\n /**\n * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n *\n * Emits a {BeaconUpgraded} event.\n */\n function _upgradeBeaconToAndCall(\n address newBeacon,\n bytes memory data,\n bool forceCall\n ) internal {\n _setBeacon(newBeacon);\n emit BeaconUpgraded(newBeacon);\n if (data.length > 0 || forceCall) {\n Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/beacon/IBeacon.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n /**\n * @dev Must return an address that can be used as a delegate call target.\n *\n * {BeaconProxy} will check that this address is a contract.\n */\n function implementation() external view returns (address);\n}\n" + }, + "@openzeppelin/contracts/interfaces/draft-IERC1822.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified\n * proxy whose upgrades are fully controlled by the current implementation.\n */\ninterface IERC1822Proxiable {\n /**\n * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation\n * address.\n *\n * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks\n * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this\n * function revert if invoked through a proxy.\n */\n function proxiableUUID() external view returns (bytes32);\n}\n" + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n * function _getImplementation() internal view returns (address) {\n * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n * }\n *\n * function _setImplementation(address newImplementation) internal {\n * require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n * }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n struct AddressSlot {\n address value;\n }\n\n struct BooleanSlot {\n bool value;\n }\n\n struct Bytes32Slot {\n bytes32 value;\n }\n\n struct Uint256Slot {\n uint256 value;\n }\n\n /**\n * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n */\n function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n */\n function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n */\n function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n\n /**\n * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n */\n function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n /**\n * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n *\n * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n * function call, and allows initializating the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\n assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.implementation\")) - 1));\n _upgradeToAndCall(_logic, _data, false);\n }\n\n /**\n * @dev Returns the current implementation address.\n */\n function _implementation() internal view virtual override returns (address impl) {\n return ERC1967Upgrade._getImplementation();\n }\n}\n" + }, + "@openzeppelin/contracts/proxy/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n /**\n * @dev Delegates the current call to `implementation`.\n *\n * This function does not return to its internal call site, it will return directly to the external caller.\n */\n function _delegate(address implementation) internal virtual {\n assembly {\n // Copy msg.data. We take full control of memory in this inline assembly\n // block because it will not return to Solidity code. We overwrite the\n // Solidity scratch pad at memory position 0.\n calldatacopy(0, 0, calldatasize())\n\n // Call the implementation.\n // out and outsize are 0 because we don't know the size yet.\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n // Copy the returned data.\n returndatacopy(0, 0, returndatasize())\n\n switch result\n // delegatecall returns 0 on error.\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n /**\n * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\n * and {_fallback} should delegate.\n */\n function _implementation() internal view virtual returns (address);\n\n /**\n * @dev Delegates the current call to the address returned by `_implementation()`.\n *\n * This function does not return to its internall call site, it will return directly to the external caller.\n */\n function _fallback() internal virtual {\n _beforeFallback();\n _delegate(_implementation());\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n * function in the contract matches the call data.\n */\n fallback() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n * is empty.\n */\n receive() external payable virtual {\n _fallback();\n }\n\n /**\n * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n * call, or as part of the Solidity `fallback` or `receive` functions.\n *\n * If overriden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "contracts/periphery/utils/TransparentUpgradeableProxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\n// Note: we just copied so that we can see the contract used\npragma solidity ^0.8.14;\n\nimport {ERC1967Proxy} from '@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol';\n\n/**\n * @dev This contract implements a proxy that is upgradeable by an admin.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches one of the admin functions exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\n * \"admin cannot fallback to proxy target\".\n *\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\n * to sudden errors when trying to call a function from the proxy implementation.\n *\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n /**\n * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\n */\n constructor(\n address _logic,\n address admin_,\n bytes memory _data\n ) payable ERC1967Proxy(_logic, _data) {\n assert(_ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1));\n _changeAdmin(admin_);\n }\n\n /**\n * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\n */\n modifier ifAdmin() {\n if (msg.sender == _getAdmin()) {\n _;\n } else {\n _fallback();\n }\n }\n\n /**\n * @dev Returns the current admin.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n */\n function admin() external ifAdmin returns (address admin_) {\n admin_ = _getAdmin();\n }\n\n /**\n * @dev Returns the current implementation.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\n *\n * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n */\n function implementation() external ifAdmin returns (address implementation_) {\n implementation_ = _implementation();\n }\n\n /**\n * @dev Changes the admin of the proxy.\n *\n * Emits an {AdminChanged} event.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\n */\n function changeAdmin(address newAdmin) external virtual ifAdmin {\n _changeAdmin(newAdmin);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\n */\n function upgradeTo(address newImplementation) external ifAdmin {\n _upgradeToAndCall(newImplementation, bytes(''), false);\n }\n\n /**\n * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\n * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\n * proxied contract.\n *\n * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\n */\n function upgradeToAndCall(address newImplementation, bytes calldata data)\n external\n payable\n ifAdmin\n {\n _upgradeToAndCall(newImplementation, data, true);\n }\n\n /**\n * @dev Returns the current admin.\n */\n function _admin() internal view virtual returns (address) {\n return _getAdmin();\n }\n\n /**\n * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\n */\n function _beforeFallback() internal virtual override {\n require(\n msg.sender != _getAdmin(),\n 'TransparentUpgradeableProxy: admin cannot fallback to proxy target'\n );\n super._beforeFallback();\n }\n}\n" + }, + "contracts/attesters/pythia-1/base/Pythia1Base.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.14;\npragma experimental ABIEncoderV2;\n\nimport {IPythia1Base} from './IPythia1Base.sol';\nimport {Initializable} from '@openzeppelin/contracts/proxy/utils/Initializable.sol';\n\n// Protocol imports\nimport {Request, Attestation, Claim} from '../../../core/libs/Structs.sol';\n\n// Imports related to Pythia 1 ZK Proving Scheme\nimport {Pythia1Verifier, Pythia1Lib, Pythia1Claim, Pythia1ProofData, Pythia1ProofInput, Pythia1GroupProperties} from '../libs/Pythia1Lib.sol';\n\n/**\n * @title Pythia-1 Base Attester\n * @author Sismo\n * @notice Abstract contract that facilitates the use of the Pythia-1 ZK Proving Scheme.\n * Pythia-1: it allows issuing attestations from an offchain service and send it onchain \n * without anyone being able to make the link between the offchain service and the onchain service.\n * It is inherited by the family of Pythia-1 attesters.\n * It contains the user input checking and the ZK-SNARK proof verification.\n * We invite readers to refer to:\n * - https://pythia-1.docs.sismo.io for a full guide through the Pythia-1 ZK Attestations\n * - https://pythia-1-circuits.docs.sismo.io for circuits, prover and verifiers of Pythia-1\n \n \n **/\nabstract contract Pythia1Base is IPythia1Base, Initializable {\n using Pythia1Lib for Pythia1ProofData;\n\n // ZK-SNARK Verifier\n Pythia1Verifier immutable VERIFIER;\n\n /*******************************************************\n INITIALIZATION FUNCTIONS \n *******************************************************/\n /**\n * @dev Constructor. Initializes the contract\n * @param Pythia1VerifierAddress ZK Snark Verifier contract\n */\n constructor(address Pythia1VerifierAddress) {\n VERIFIER = Pythia1Verifier(Pythia1VerifierAddress);\n }\n\n /**\n * @dev Getter of Pythia-1 Verifier contract\n */\n function getVerifier() external view returns (Pythia1Verifier) {\n return VERIFIER;\n }\n\n /**\n * @dev Getter of the Commitment signer Eddsa Public key\n */\n function getCommitmentSignerPubKey() external view returns (uint256[2] memory) {\n return _getCommitmentSignerPubKey();\n }\n\n /*******************************************************\n Pythia-1 SPECIFIC FUNCTIONS\n *******************************************************/\n\n /**\n * @dev MANDATORY: must be implemented to return the ticket identifier from a user request\n * so it can be checked against snark input\n * ticket = hash(secretHash, ticketIdentifier), which is verified inside the snark\n * the secretHash is a number only known by the user and is used in \n * the zero knowledge as a private input which guarantees privacy\n\n * This function MUST be implemented by Pythia-1 attesters.\n * This is the core function that implements the logic of tickets\n\n * Do they get one ticket per claim?\n * Do they get 2 tickets per claim?\n * Do they get 1 ticket per claim, every month?\n * Take a look at Pythia-1 Simple Attester for an example\n * @param claim user claim: a particular claim that a user have that he can prove s right.\n */\n function _getTicketIdentifierOfClaim(Pythia1Claim memory claim)\n internal\n view\n virtual\n returns (uint256);\n\n /**\n * @dev MANDATORY: must be implemented to return the commitment signer that allows to\n * prove the claim was correctly issued for the user.\n */\n function _getCommitmentSignerPubKey() internal view virtual returns (uint256[2] memory);\n\n /**\n * @dev Checks whether the user claim and the snark public input are a match\n * @param claim user claim\n * @param input snark public input\n */\n function _validateInput(Pythia1Claim memory claim, Pythia1ProofInput memory input)\n internal\n view\n virtual\n {\n if (input.groupId != claim.groupId) revert GroupIdMismatch(claim.groupId, input.groupId);\n\n if (input.isStrict == claim.groupProperties.isScore)\n revert IsStrictMismatch(claim.groupProperties.isScore, input.isStrict);\n\n if (input.destination != claim.destination)\n revert DestinationMismatch(claim.destination, input.destination);\n\n if (claim.destination != msg.sender)\n revert UserShouldOwnItsDestination(msg.sender, claim.destination);\n\n if (input.chainId != block.chainid) revert ChainIdMismatch(block.chainid, input.chainId);\n\n if (input.value != claim.claimedValue) revert ValueMismatch(claim.claimedValue, input.value);\n\n uint256[2] memory commitmentSignerPubKey = _getCommitmentSignerPubKey();\n if (\n input.commitmentSignerPubKey[0] != commitmentSignerPubKey[0] ||\n input.commitmentSignerPubKey[1] != commitmentSignerPubKey[1]\n )\n revert CommitmentSignerPubKeyMismatch(\n commitmentSignerPubKey[0],\n commitmentSignerPubKey[1],\n input.commitmentSignerPubKey[0],\n input.commitmentSignerPubKey[1]\n );\n\n uint256 ticketIdentifier = _getTicketIdentifierOfClaim(claim);\n\n if (input.ticketIdentifier != ticketIdentifier)\n revert TicketIdentifierMismatch(ticketIdentifier, input.ticketIdentifier);\n }\n\n /**\n * @dev verify the plonk mathematical proof using the circom verifier contract\n * @param proofData snark public input\n */\n function _verifyProof(Pythia1ProofData memory proofData) internal view virtual {\n try\n VERIFIER.verifyProof(proofData.proof.a, proofData.proof.b, proofData.proof.c, proofData.input)\n returns (bool success) {\n if (!success) revert InvalidGroth16Proof('');\n } catch Error(string memory reason) {\n revert InvalidGroth16Proof(reason);\n } catch Panic(\n uint256 /*errorCode*/\n ) {\n revert InvalidGroth16Proof('');\n } catch (\n bytes memory /*lowLevelData*/\n ) {\n revert InvalidGroth16Proof('');\n }\n }\n}\n" + }, + "contracts/attesters/pythia-1/base/IPythia1Base.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.14;\npragma experimental ABIEncoderV2;\n\nimport {Pythia1Verifier, Pythia1Lib, Pythia1ProofData} from '../libs/Pythia1Lib.sol';\n\ninterface IPythia1Base {\n error DestinationMismatch(address expectedDestination, address inputDestination);\n error UserShouldOwnItsDestination(address sender, address inputdestination);\n error CommitmentSignerPubKeyMismatch(\n uint256 expectedX,\n uint256 expectedY,\n uint256 inputX,\n uint256 inputY\n );\n error TicketIdentifierMismatch(uint256 expectedTicketIdentifier, uint256 ticketIdentifier);\n error IsStrictMismatch(bool expectedStrictness, bool strictNess);\n error ChainIdMismatch(uint256 expectedChainId, uint256 chainId);\n error ValueMismatch(uint256 expectedValue, uint256 inputValue);\n error GroupIdMismatch(uint256 expectedAccountsTreeValue, uint256 inputAccountsTreeValue);\n error InvalidGroth16Proof(string reason);\n\n /**\n * @dev Getter of Pythia-1 Verifier contract\n */\n function getVerifier() external view returns (Pythia1Verifier);\n\n /**\n * @dev Getter of the Commitment Signer EdDSA Public Key\n */\n function getCommitmentSignerPubKey() external view returns (uint256[2] memory);\n}\n" + }, + "contracts/attesters/pythia-1/libs/Pythia1Lib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\nimport {Claim, Request} from '../../../core/libs/Structs.sol';\nimport {Pythia1Verifier} from '@sismo-core/pythia-1/contracts/Pythia1Verifier.sol';\n\n// user Pythia-1 claim retrieved form his request\nstruct Pythia1Claim {\n uint256 groupId; // user claims be part of this group\n uint256 claimedValue; // user claims this value for its account in the group\n address destination; // user claims to own this destination[]\n Pythia1GroupProperties groupProperties; // user claims the group has the following properties\n}\n\nstruct Pythia1GroupProperties {\n uint128 internalCollectionId;\n bool isScore;\n}\n\nstruct Pythia1CircomSnarkProof {\n uint256[2] a;\n uint256[2][2] b;\n uint256[2] c;\n}\n\nstruct Pythia1ProofData {\n Pythia1CircomSnarkProof proof;\n uint256[9] input;\n // destination;\n // chainId;\n // commitmentSignerPubKey.x;\n // commitmentSignerPubKey.y;\n // groupId;\n // ticketIdentifier;\n // userTicket;\n // value;\n // isStrict;\n}\n\nstruct Pythia1ProofInput {\n address destination;\n uint256 chainId;\n uint256 groupId;\n uint256 ticketIdentifier;\n uint256 ticket;\n uint256 value;\n bool isStrict;\n uint256[2] commitmentSignerPubKey;\n}\n\nlibrary Pythia1Lib {\n uint256 constant SNARK_FIELD =\n 21888242871839275222246405745257275088548364400416034343698204186575808495617;\n\n error GroupIdAndPropertiesMismatch(uint256 expectedGroupId, uint256 groupId);\n\n function _input(Pythia1ProofData memory self) internal pure returns (Pythia1ProofInput memory) {\n return\n Pythia1ProofInput(\n _getDestination(self),\n _getChainId(self),\n _getGroupId(self),\n _getExpectedExternalNullifier(self),\n _getTicket(self),\n _getValue(self),\n _getIsStrict(self),\n _getCommitmentMapperPubKey(self)\n );\n }\n\n function _claim(Request memory self) internal pure returns (Pythia1Claim memory) {\n Claim memory claim = self.claims[0];\n _validateClaim(claim);\n Pythia1GroupProperties memory groupProperties = abi.decode(\n claim.extraData,\n (Pythia1GroupProperties)\n );\n return (Pythia1Claim(claim.groupId, claim.claimedValue, self.destination, groupProperties));\n }\n\n function _toCircomFormat(Pythia1ProofData memory self)\n internal\n pure\n returns (\n uint256[2] memory,\n uint256[2][2] memory,\n uint256[2] memory,\n uint256[9] memory\n )\n {\n return (self.proof.a, self.proof.b, self.proof.c, self.input);\n }\n\n function _getDestination(Pythia1ProofData memory self) internal pure returns (address) {\n return address(uint160(self.input[0]));\n }\n\n function _getChainId(Pythia1ProofData memory self) internal pure returns (uint256) {\n return self.input[1];\n }\n\n function _getCommitmentMapperPubKey(Pythia1ProofData memory self)\n internal\n pure\n returns (uint256[2] memory)\n {\n return [self.input[2], self.input[3]];\n }\n\n function _getGroupId(Pythia1ProofData memory self) internal pure returns (uint256) {\n return self.input[4];\n }\n\n function _getExpectedExternalNullifier(Pythia1ProofData memory self)\n internal\n pure\n returns (uint256)\n {\n return self.input[5];\n }\n\n function _getTicket(Pythia1ProofData memory self) internal pure returns (uint256) {\n return self.input[6];\n }\n\n function _getValue(Pythia1ProofData memory self) internal pure returns (uint256) {\n return self.input[7];\n }\n\n function _getIsStrict(Pythia1ProofData memory self) internal pure returns (bool) {\n return self.input[8] == 1;\n }\n\n function _getTicket(bytes calldata self) internal pure returns (uint256) {\n Pythia1ProofData memory snarkProofData = abi.decode(self, (Pythia1ProofData));\n uint256 userTicket = uint256(_getTicket(snarkProofData));\n return userTicket;\n }\n\n function _generateGroupIdFromProperties(uint128 internalCollectionId, bool isScore)\n internal\n pure\n returns (uint256)\n {\n return\n _generateGroupIdFromEncodedProperties(_encodeGroupProperties(internalCollectionId, isScore));\n }\n\n function _generateGroupIdFromEncodedProperties(bytes memory encodedProperties)\n internal\n pure\n returns (uint256)\n {\n return uint256(keccak256(encodedProperties)) % Pythia1Lib.SNARK_FIELD;\n }\n\n function _encodeGroupProperties(uint128 internalCollectionId, bool isScore)\n internal\n pure\n returns (bytes memory)\n {\n return abi.encode(internalCollectionId, isScore);\n }\n\n function _validateClaim(Claim memory claim) internal pure {\n uint256 expectedGroupId = _generateGroupIdFromEncodedProperties(claim.extraData);\n if (claim.groupId != expectedGroupId)\n revert GroupIdAndPropertiesMismatch(expectedGroupId, claim.groupId);\n }\n}\n" + }, + "@sismo-core/pythia-1/contracts/Pythia1Verifier.sol": { + "content": "//\n// Copyright 2017 Christian Reitwiessner\n// 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:\n// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n// 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.\n//\n// 2019 OKIMS\n// ported to solidity 0.6\n// fixed linter warnings\n// added requiere error messages\n//\n//\n// SPDX-License-Identifier: GPL-3.0\npragma solidity ^0.8.0;\nlibrary Pairing {\n struct G1Point {\n uint X;\n uint Y;\n }\n // Encoding of field elements is: X[0] * z + X[1]\n struct G2Point {\n uint[2] X;\n uint[2] Y;\n }\n /// @return the generator of G1\n function P1() internal pure returns (G1Point memory) {\n return G1Point(1, 2);\n }\n /// @return the generator of G2\n function P2() internal pure returns (G2Point memory) {\n // Original code point\n return G2Point(\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\n );\n\n/*\n // Changed by Jordi point\n return G2Point(\n [10857046999023057135944570762232829481370756359578518086990519993285655852781,\n 11559732032986387107991004021392285783925812861821192530917403151452391805634],\n [8495653923123431417604973247489272438418190587263600148770280649306958101930,\n 4082367875863433681332203403145435568316851327593401208105741076214120093531]\n );\n*/\n }\n /// @return r the negation of p, i.e. p.addition(p.negate()) should be zero.\n function negate(G1Point memory p) internal pure returns (G1Point memory r) {\n // The prime q in the base field F_q for G1\n uint q = 21888242871839275222246405745257275088696311157297823662689037894645226208583;\n if (p.X == 0 && p.Y == 0)\n return G1Point(0, 0);\n return G1Point(p.X, q - (p.Y % q));\n }\n /// @return r the sum of two points of G1\n function addition(G1Point memory p1, G1Point memory p2) internal view returns (G1Point memory r) {\n uint[4] memory input;\n input[0] = p1.X;\n input[1] = p1.Y;\n input[2] = p2.X;\n input[3] = p2.Y;\n bool success;\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n success := staticcall(sub(gas(), 2000), 6, input, 0xc0, r, 0x60)\n // Use \"invalid\" to make gas estimation work\n switch success case 0 { invalid() }\n }\n require(success,\"pairing-add-failed\");\n }\n /// @return r the product of a point on G1 and a scalar, i.e.\n /// p == p.scalar_mul(1) and p.addition(p) == p.scalar_mul(2) for all points p.\n function scalar_mul(G1Point memory p, uint s) internal view returns (G1Point memory r) {\n uint[3] memory input;\n input[0] = p.X;\n input[1] = p.Y;\n input[2] = s;\n bool success;\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n success := staticcall(sub(gas(), 2000), 7, input, 0x80, r, 0x60)\n // Use \"invalid\" to make gas estimation work\n switch success case 0 { invalid() }\n }\n require (success,\"pairing-mul-failed\");\n }\n /// @return the result of computing the pairing check\n /// e(p1[0], p2[0]) * .... * e(p1[n], p2[n]) == 1\n /// For example pairing([P1(), P1().negate()], [P2(), P2()]) should\n /// return true.\n function pairing(G1Point[] memory p1, G2Point[] memory p2) internal view returns (bool) {\n require(p1.length == p2.length,\"pairing-lengths-failed\");\n uint elements = p1.length;\n uint inputSize = elements * 6;\n uint[] memory input = new uint[](inputSize);\n for (uint i = 0; i < elements; i++)\n {\n input[i * 6 + 0] = p1[i].X;\n input[i * 6 + 1] = p1[i].Y;\n input[i * 6 + 2] = p2[i].X[0];\n input[i * 6 + 3] = p2[i].X[1];\n input[i * 6 + 4] = p2[i].Y[0];\n input[i * 6 + 5] = p2[i].Y[1];\n }\n uint[1] memory out;\n bool success;\n // solium-disable-next-line security/no-inline-assembly\n assembly {\n success := staticcall(sub(gas(), 2000), 8, add(input, 0x20), mul(inputSize, 0x20), out, 0x20)\n // Use \"invalid\" to make gas estimation work\n switch success case 0 { invalid() }\n }\n require(success,\"pairing-opcode-failed\");\n return out[0] != 0;\n }\n /// Convenience method for a pairing check for two pairs.\n function pairingProd2(G1Point memory a1, G2Point memory a2, G1Point memory b1, G2Point memory b2) internal view returns (bool) {\n G1Point[] memory p1 = new G1Point[](2);\n G2Point[] memory p2 = new G2Point[](2);\n p1[0] = a1;\n p1[1] = b1;\n p2[0] = a2;\n p2[1] = b2;\n return pairing(p1, p2);\n }\n /// Convenience method for a pairing check for three pairs.\n function pairingProd3(\n G1Point memory a1, G2Point memory a2,\n G1Point memory b1, G2Point memory b2,\n G1Point memory c1, G2Point memory c2\n ) internal view returns (bool) {\n G1Point[] memory p1 = new G1Point[](3);\n G2Point[] memory p2 = new G2Point[](3);\n p1[0] = a1;\n p1[1] = b1;\n p1[2] = c1;\n p2[0] = a2;\n p2[1] = b2;\n p2[2] = c2;\n return pairing(p1, p2);\n }\n /// Convenience method for a pairing check for four pairs.\n function pairingProd4(\n G1Point memory a1, G2Point memory a2,\n G1Point memory b1, G2Point memory b2,\n G1Point memory c1, G2Point memory c2,\n G1Point memory d1, G2Point memory d2\n ) internal view returns (bool) {\n G1Point[] memory p1 = new G1Point[](4);\n G2Point[] memory p2 = new G2Point[](4);\n p1[0] = a1;\n p1[1] = b1;\n p1[2] = c1;\n p1[3] = d1;\n p2[0] = a2;\n p2[1] = b2;\n p2[2] = c2;\n p2[3] = d2;\n return pairing(p1, p2);\n }\n}\ncontract Pythia1Verifier {\n using Pairing for *;\n struct VerifyingKey {\n Pairing.G1Point alfa1;\n Pairing.G2Point beta2;\n Pairing.G2Point gamma2;\n Pairing.G2Point delta2;\n Pairing.G1Point[] IC;\n }\n struct Proof {\n Pairing.G1Point A;\n Pairing.G2Point B;\n Pairing.G1Point C;\n }\n function verifyingKey() internal pure returns (VerifyingKey memory vk) {\n vk.alfa1 = Pairing.G1Point(\n 20491192805390485299153009773594534940189261866228447918068658471970481763042,\n 9383485363053290200918347156157836566562967994039712273449902621266178545958\n );\n\n vk.beta2 = Pairing.G2Point(\n [4252822878758300859123897981450591353533073413197771768651442665752259397132,\n 6375614351688725206403948262868962793625744043794305715222011528459656738731],\n [21847035105528745403288232691147584728191162732299865338377159692350059136679,\n 10505242626370262277552901082094356697409835680220590971873171140371331206856]\n );\n vk.gamma2 = Pairing.G2Point(\n [11559732032986387107991004021392285783925812861821192530917403151452391805634,\n 10857046999023057135944570762232829481370756359578518086990519993285655852781],\n [4082367875863433681332203403145435568316851327593401208105741076214120093531,\n 8495653923123431417604973247489272438418190587263600148770280649306958101930]\n );\n vk.delta2 = Pairing.G2Point(\n [10531421060471803210764242282180596988661354300825243432694370526898549660572,\n 16907777539267866029484140695898606769333962039725819851897531221528016291246],\n [1262343472093645508827094724965505457998222566160570888483460111770233999788,\n 15912415772039780433311820224136904737706664077875817672499292870626930031698]\n );\n vk.IC = new Pairing.G1Point[](10);\n \n vk.IC[0] = Pairing.G1Point( \n 5517688305750201128762483893091304147062827104408157512730579569350848407613,\n 5780136537335992008649392871793066674866342777759859789350700119480160130924\n ); \n \n vk.IC[1] = Pairing.G1Point( \n 12697944246979452442578306963760600646953905903147293524406388488412105525306,\n 7947498303555241939381866476162499321683671397366404411964730108870115767741\n ); \n \n vk.IC[2] = Pairing.G1Point( \n 104028078850975554065172701281783302003220555203883119831575537681421753151,\n 19148240629904598794948591359118971959790791697910953160820265703277306346\n ); \n \n vk.IC[3] = Pairing.G1Point( \n 5389100687915168292769005150998138946551934165417656464020514059527551078739,\n 2995810062694628906192141834014562842416411391073941090612035469327148467089\n ); \n \n vk.IC[4] = Pairing.G1Point( \n 13361404455959093513465491032733056651449943760514352043673570676442342622118,\n 13062233980231097531380816290641636455952795449264050237462472029810698552529\n ); \n \n vk.IC[5] = Pairing.G1Point( \n 11459259237872151197093706264224074511822899275820846406369316478681920338712,\n 17008950402703007066305862393917002979068108987255258732198250350572930280478\n ); \n \n vk.IC[6] = Pairing.G1Point( \n 6864252787935048608809029133239993600538509116976873537320635937882667431893,\n 21828895867329533519544146243248306555649073137427314743033980762667640230681\n ); \n \n vk.IC[7] = Pairing.G1Point( \n 9438320622270795479948280183526528671720880729000858589094410097102899873097,\n 5568101658133066923956745075211904883930639183482936243523669908553853509584\n ); \n \n vk.IC[8] = Pairing.G1Point( \n 8243240866289541427505408968801246044483594232529594515653799293334187695980,\n 16836688029681482175969944959379945743029264506292968109365225279154937195513\n ); \n \n vk.IC[9] = Pairing.G1Point( \n 8901554162474861401157311041464523592671931268194133233238376271355243714980,\n 3625114242544161778734123207817598834256751400634638318925544817537792055578\n ); \n \n }\n function verify(uint[] memory input, Proof memory proof) internal view returns (uint) {\n uint256 snark_scalar_field = 21888242871839275222246405745257275088548364400416034343698204186575808495617;\n VerifyingKey memory vk = verifyingKey();\n require(input.length + 1 == vk.IC.length,\"verifier-bad-input\");\n // Compute the linear combination vk_x\n Pairing.G1Point memory vk_x = Pairing.G1Point(0, 0);\n for (uint i = 0; i < input.length; i++) {\n require(input[i] < snark_scalar_field,\"verifier-gte-snark-scalar-field\");\n vk_x = Pairing.addition(vk_x, Pairing.scalar_mul(vk.IC[i + 1], input[i]));\n }\n vk_x = Pairing.addition(vk_x, vk.IC[0]);\n if (!Pairing.pairingProd4(\n Pairing.negate(proof.A), proof.B,\n vk.alfa1, vk.beta2,\n vk_x, vk.gamma2,\n proof.C, vk.delta2\n )) return 1;\n return 0;\n }\n /// @return r bool true if proof is valid\n function verifyProof(\n uint[2] memory a,\n uint[2][2] memory b,\n uint[2] memory c,\n uint[9] memory input\n ) public view returns (bool r) {\n Proof memory proof;\n proof.A = Pairing.G1Point(a[0], a[1]);\n proof.B = Pairing.G2Point([b[0][0], b[0][1]], [b[1][0], b[1][1]]);\n proof.C = Pairing.G1Point(c[0], c[1]);\n uint[] memory inputValues = new uint[](input.length);\n for(uint i = 0; i < input.length; i++){\n inputValues[i] = input[i];\n }\n if (verify(inputValues, proof) == 0) {\n return true;\n } else {\n return false;\n }\n }\n}\n" + }, + "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.14;\npragma experimental ABIEncoderV2;\n\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\nimport {IPythia1SimpleAttester} from './interfaces/IPythia1SimpleAttester.sol';\n\n// Core protocol Protocol imports\nimport {Request, Attestation, Claim} from './../../core/libs/Structs.sol';\nimport {Attester, IAttester, IAttestationsRegistry} from './../../core/Attester.sol';\n\n// Imports related to Pythia1 Proving Scheme\nimport {Pythia1Base, Pythia1Lib, Pythia1ProofData, Pythia1ProofInput, Pythia1Claim} from './base/Pythia1Base.sol';\n\n/**\n * @title Pythia-1 Simple Attester\n * @author Sismo\n * @notice This attester is part of the family of the Pythia-1 Attesters.\n * Pythia-1 attesters enable users to prove they have a claim and its proof issued by an \n * offchain service in a privacy preserving way. \n * That means no-one can make the link between the account used in the offchain service\n * and the onchain account where the attestation is stored.\n * The Pythia-1 Base abstract contract is inherited and holds the complex Pythia 1 verification logic.\n * We invite readers to refer to:\n * - https://pythia-1.docs.sismo.io for a full guide through the Pythia-1 ZK Attestations\n * - https://pythia-1-circuits.docs.sismo.io for circuits, prover and verifiers of Pythia-1\n\n * This specific attester has the following characteristics:\n\n * - Zero Knowledge\n * One cannot deduct from an attestation what offchain issuer's account was used to generate the underlying proof\n\n * - Non Strict (scores)\n * If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100.\n * This attester generate attestations of scores\n\n * - Ticketed\n * Each users gets one userTicket per claim\n * For people used to semaphore/ tornado cash people:\n * userTicket = hash(secret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier)\n **/\n\ncontract Pythia1SimpleAttester is IPythia1SimpleAttester, Pythia1Base, Attester, Ownable {\n using Pythia1Lib for Pythia1ProofData;\n using Pythia1Lib for bytes;\n using Pythia1Lib for Request;\n\n // The deployed contract will need to be authorized to write into the Attestation registry\n // It should get write access on attestation collections from AUTHORIZED_COLLECTION_ID_FIRST to AUTHORIZED_COLLECTION_ID_LAST.\n uint256 public immutable AUTHORIZED_COLLECTION_ID_FIRST;\n uint256 public immutable AUTHORIZED_COLLECTION_ID_LAST;\n\n uint256[2] internal _commitmentSignerPubKey;\n mapping(uint256 => address) internal _ticketsDestinations;\n\n /*******************************************************\n INITIALIZATION FUNCTIONS \n *******************************************************/\n /**\n * @dev Constructor. Initializes the contract\n * @param attestationsRegistryAddress Attestations Registry contract on which the attester will write attestations\n * @param collectionIdFirst Id of the first collection in which the attester is supposed to record\n * @param collectionIdLast Id of the last collection in which the attester is supposed to record\n * @param pythia1VerifierAddress ZK Snark Pythia-1 Verifier contract\n * @param commitmentSignerPubKey The EdDSA public key of the commitment signer for the Pythia 1 Proving Scheme\n * @param owner The owner of the contract that can update the commitment signer pub key\n */\n constructor(\n address attestationsRegistryAddress,\n uint256 collectionIdFirst,\n uint256 collectionIdLast,\n address pythia1VerifierAddress,\n uint256[2] memory commitmentSignerPubKey,\n address owner\n ) Attester(attestationsRegistryAddress) Pythia1Base(pythia1VerifierAddress) {\n AUTHORIZED_COLLECTION_ID_FIRST = collectionIdFirst;\n AUTHORIZED_COLLECTION_ID_LAST = collectionIdLast;\n initialize(commitmentSignerPubKey, owner);\n }\n\n /**\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\n * @param commitmentSignerPubKey EdDSA public key of the commitment signer\n * @param owner Owner of the contract, can update public key and address\n */\n function initialize(uint256[2] memory commitmentSignerPubKey, address owner) public initializer {\n _transferOwnership(owner);\n _updateCommitmentSignerPubKey(commitmentSignerPubKey);\n }\n\n /*******************************************************\n MANDATORY FUNCTIONS TO OVERRIDE FROM ATTESTER.SOL\n *******************************************************/\n /**\n * @dev Throws if user request is invalid when verified against\n * Look into Pythia1Base for more details\n * @param request users request. Claim of having an account part of a group of accounts\n * @param proofData provided to back the request. snark input and snark proof\n */\n function _verifyRequest(Request calldata request, bytes calldata proofData)\n internal\n virtual\n override\n {\n Pythia1ProofData memory snarkProof = abi.decode(proofData, (Pythia1ProofData));\n Pythia1ProofInput memory snarkInput = snarkProof._input();\n Pythia1Claim memory claim = request._claim();\n\n // verifies that the proof corresponds to the claim\n _validateInput(claim, snarkInput);\n // verifies the proof validity\n _verifyProof(snarkProof);\n }\n\n /**\n * @dev Returns attestations that will be recorded, constructed from the user request\n * @param request users request. Claim of having an account part of a group of accounts\n */\n function buildAttestations(Request calldata request, bytes calldata)\n public\n view\n virtual\n override(IAttester, Attester)\n returns (Attestation[] memory)\n {\n Pythia1Claim memory claim = request._claim();\n\n Attestation[] memory attestations = new Attestation[](1);\n\n uint256 attestationCollectionId = AUTHORIZED_COLLECTION_ID_FIRST +\n claim.groupProperties.internalCollectionId;\n\n if (attestationCollectionId > AUTHORIZED_COLLECTION_ID_LAST)\n revert CollectionIdOutOfBound(attestationCollectionId);\n\n address issuer = address(this);\n\n attestations[0] = Attestation(\n attestationCollectionId,\n claim.destination,\n issuer,\n claim.claimedValue,\n uint32(block.timestamp),\n ''\n );\n return (attestations);\n }\n\n /*******************************************************\n OPTIONAL HOOK VIRTUAL FUNCTIONS FROM ATTESTER.SOL\n *******************************************************/\n\n /**\n * @dev Hook run before recording the attestation.\n * Throws if ticket already used\n * @param request users request. Claim of beiing part of a group.\n * @param proofData provided to back the request. snark input and snark proof\n */\n function _beforeRecordAttestations(Request calldata request, bytes calldata proofData)\n internal\n virtual\n override\n {\n // we get the ticket used from the snark input in the data provided\n uint256 userTicket = proofData._getTicket();\n address currentDestination = _getDestinationOfTicket(userTicket);\n\n if (currentDestination != address(0)) {\n revert TicketUsed(userTicket);\n }\n\n _setDestinationForTicket(userTicket, request.destination);\n }\n\n /*******************************************************\n Pythia-1 MANDATORY FUNCTIONS FROM Pythia-1 Base Attester\n *******************************************************/\n\n /**\n * @dev Returns the ticket identifier from a user claim\n * @param claim user Pythia-1 claim = have an offchain account with a specific value in a specific group\n * ticket = hash(secretHash, ticketIdentifier), which is verified inside the snark\n * users bring secretHash as private input in snark which guarantees privacy\n * the secretHash is only known by the user and never escape the user's browser\n \n * Here we chose ticketIdentifier = hash(attesterAddress, claim.GroupId)\n * Creates one ticket per group, per user and makes sure no collision with other attester's tickets\n **/\n function _getTicketIdentifierOfClaim(Pythia1Claim memory claim)\n internal\n view\n override\n returns (uint256)\n {\n uint256 ticketIdentifier = _encodeInSnarkField(\n address(this),\n claim.groupProperties.internalCollectionId\n );\n return ticketIdentifier;\n }\n\n function _getCommitmentSignerPubKey() internal view override returns (uint256[2] memory) {\n return _commitmentSignerPubKey;\n }\n\n /*******************************************************\n Pythia-1 Attester Specific Functions\n *******************************************************/\n\n function updateCommitmentSignerPubKey(uint256[2] memory commitmentSignerPubKey)\n external\n onlyOwner\n {\n _updateCommitmentSignerPubKey(commitmentSignerPubKey);\n }\n\n function _updateCommitmentSignerPubKey(uint256[2] memory commitmentSignerPubKey) internal {\n _commitmentSignerPubKey = commitmentSignerPubKey;\n emit CommitmentSignerPubKeyUpdated(commitmentSignerPubKey);\n }\n\n /**\n * @dev Getter, returns the last attestation destination of a ticket\n * @param userTicket ticket used\n **/\n function getDestinationOfTicket(uint256 userTicket) external view override returns (address) {\n return _getDestinationOfTicket(userTicket);\n }\n\n function _setDestinationForTicket(uint256 userTicket, address destination) internal virtual {\n _ticketsDestinations[userTicket] = destination;\n emit TicketDestinationUpdated(userTicket, destination);\n }\n\n function _getDestinationOfTicket(uint256 userTicket) internal view returns (address) {\n return _ticketsDestinations[userTicket];\n }\n\n function _encodeInSnarkField(address addr, uint256 nb) internal pure returns (uint256) {\n return uint256(keccak256(abi.encode(addr, nb))) % Pythia1Lib.SNARK_FIELD;\n }\n}\n" + }, + "contracts/attesters/pythia-1/interfaces/IPythia1SimpleAttester.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.14;\npragma experimental ABIEncoderV2;\n\nimport {Attestation} from '../../../core/libs/Structs.sol';\nimport {IAttester} from '../../../core/interfaces/IAttester.sol';\nimport {Pythia1Lib, Pythia1ProofData, Pythia1ProofInput} from './../libs/Pythia1Lib.sol';\nimport {IPythia1Base} from './../base/IPythia1Base.sol';\n\ninterface IPythia1SimpleAttester is IPythia1Base, IAttester {\n error TicketUsed(uint256 userTicket);\n error CollectionIdOutOfBound(uint256 collectionId);\n\n event TicketDestinationUpdated(uint256 ticket, address newOwner);\n event CommitmentSignerPubKeyUpdated(uint256[2] newCommitmentSignerPubKey);\n\n /**\n * @dev Initializes the contract, to be called by the proxy delegating calls to this implementation\n * @param commitmentSignerPubKey EdDSA public key of the commitment signer\n * @param owner Owner of the contract, can update public key and address\n */\n function initialize(uint256[2] memory commitmentSignerPubKey, address owner) external;\n\n /**\n * @dev Getter, returns the last attestation destination of a ticket\n * @param userTicket ticket used\n **/\n function getDestinationOfTicket(uint256 userTicket) external view returns (address);\n\n /**\n * @dev Getter\n * returns of the first collection in which the attester is supposed to record\n **/\n function AUTHORIZED_COLLECTION_ID_FIRST() external view returns (uint256);\n\n /**\n * @dev Getter\n * returns of the last collection in which the attester is supposed to record\n **/\n function AUTHORIZED_COLLECTION_ID_LAST() external view returns (uint256);\n}\n" + }, + "contracts/attesters/hydra-s1/interfaces/IHydraS1SimpleAttester.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.14;\npragma experimental ABIEncoderV2;\n\nimport {Attestation} from '../../../core/libs/Structs.sol';\nimport {IAttester} from '../../../core/interfaces/IAttester.sol';\nimport {CommitmentMapperRegistry} from '../../../periphery/utils/CommitmentMapperRegistry.sol';\nimport {AvailableRootsRegistry} from '../../../periphery/utils/AvailableRootsRegistry.sol';\nimport {HydraS1Lib, HydraS1ProofData, HydraS1ProofInput} from './../libs/HydraS1Lib.sol';\nimport {IHydraS1Base} from './../base/IHydraS1Base.sol';\n\n// todo: explain well what is specific to this attester\ninterface IHydraS1SimpleAttester is IHydraS1Base, IAttester {\n error TicketUsed(uint256 userTicket);\n error CollectionIdOutOfBound(uint256 collectionId);\n\n event TicketDestinationUpdated(uint256 ticket, address newOwner);\n\n /**\n * @dev Getter, returns the last attestation destination of a ticket\n * @param userTicket ticket used\n **/\n function getDestinationOfTicket(uint256 userTicket) external view returns (address);\n\n /**\n * @dev Getter\n * returns of the first collection in which the attester is supposed to record\n **/\n function AUTHORIZED_COLLECTION_ID_FIRST() external view returns (uint256);\n\n /**\n * @dev Getter\n * returns of the last collection in which the attester is supposed to record\n **/\n function AUTHORIZED_COLLECTION_ID_LAST() external view returns (uint256);\n}\n" + }, + "contracts/attesters/hydra-s1/HydraS1SimpleAttester.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.14;\npragma experimental ABIEncoderV2;\n\nimport {IHydraS1SimpleAttester} from './interfaces/IHydraS1SimpleAttester.sol';\n\n// Core protocol Protocol imports\nimport {Request, Attestation, Claim} from './../../core/libs/Structs.sol';\nimport {Attester, IAttester, IAttestationsRegistry} from './../../core/Attester.sol';\n\n// Imports related to HydraS1 Proving Scheme\nimport {HydraS1Base, HydraS1Lib, HydraS1ProofData, HydraS1ProofInput, HydraS1Claim} from './base/HydraS1Base.sol';\n\n/**\n * @title Hydra-S1 Simple Attester\n * @author Sismo\n * @notice This attester is part of the family of the Hydra-S1 Attesters.\n * Hydra-S1 attesters enable users to prove they have an account in a group in a privacy preserving way.\n * The Hydra-S1 Base abstract contract is inherited and holds the complex Hydra S1 verification logic.\n * We invite readers to refer to:\n * - https://hydra-s1.docs.sismo.io for a full guide through the Hydra-S1 ZK Attestations\n * - https://hydra-s1-circuits.docs.sismo.io for circuits, prover and verifiers of Hydra-S1\n\n * This specific attester has the following characteristics:\n\n * - Zero Knowledge\n * One cannot deduct from an attestation what source account was used to generate the underlying proof\n\n * - Non Strict (scores)\n * If a user can generate an attestation of max value 100, they can also generate any attestation with value < 100.\n * This attester generate attestations of scores\n\n * - Ticketed\n * Each source account gets one userTicket per claim (i.e only one attestation per source account per claim)\n * For people used to semaphore/ tornado cash people:\n * userTicket = hash(sourceSecret, ticketIdentifier) <=> nullifierHash = hash(IdNullifier, externalNullifier)\n \n * - Renewable\n * A userTicket can actually be reused as long as the destination of the attestation remains the same\n * It enables users to renew their attestations\n **/\n\ncontract HydraS1SimpleAttester is IHydraS1SimpleAttester, HydraS1Base, Attester {\n using HydraS1Lib for HydraS1ProofData;\n using HydraS1Lib for bytes;\n using HydraS1Lib for Request;\n\n // The deployed contract will need to be authorized to write into the Attestation registry\n // It should get write access on attestation collections from AUTHORIZED_COLLECTION_ID_FIRST to AUTHORIZED_COLLECTION_ID_LAST.\n uint256 public immutable AUTHORIZED_COLLECTION_ID_FIRST;\n uint256 public immutable AUTHORIZED_COLLECTION_ID_LAST;\n\n mapping(uint256 => address) internal _ticketsDestinations;\n\n /*******************************************************\n INITIALIZATION FUNCTIONS \n *******************************************************/\n /**\n * @dev Constructor. Initializes the contract\n * @param attestationsRegistryAddress Attestations Registry contract on which the attester will write attestations\n * @param hydraS1VerifierAddress ZK Snark Hydra-S1 Verifier contract\n * @param availableRootsRegistryAddress Registry storing the available groups for this attester (e.g roots of registry merkle trees)\n * @param commitmentMapperAddress commitment mapper's public key registry\n * @param collectionIdFirst Id of the first collection in which the attester is supposed to record\n * @param collectionIdLast Id of the last collection in which the attester is supposed to record\n */\n constructor(\n address attestationsRegistryAddress,\n address hydraS1VerifierAddress,\n address availableRootsRegistryAddress,\n address commitmentMapperAddress,\n uint256 collectionIdFirst,\n uint256 collectionIdLast\n )\n Attester(attestationsRegistryAddress)\n HydraS1Base(hydraS1VerifierAddress, availableRootsRegistryAddress, commitmentMapperAddress)\n {\n AUTHORIZED_COLLECTION_ID_FIRST = collectionIdFirst;\n AUTHORIZED_COLLECTION_ID_LAST = collectionIdLast;\n }\n\n /*******************************************************\n MANDATORY FUNCTIONS TO OVERRIDE FROM ATTESTER.SOL\n *******************************************************/\n\n /**\n * @dev Throws if user request is invalid when verified against\n * Look into HydraS1Base for more details\n * @param request users request. Claim of having an account part of a group of accounts\n * @param proofData provided to back the request. snark input and snark proof\n */\n function _verifyRequest(Request calldata request, bytes calldata proofData)\n internal\n virtual\n override\n {\n HydraS1ProofData memory snarkProof = abi.decode(proofData, (HydraS1ProofData));\n HydraS1ProofInput memory snarkInput = snarkProof._input();\n HydraS1Claim memory claim = request._claim();\n\n // verifies that the proof corresponds to the claim\n _validateInput(claim, snarkInput);\n // verifies the proof validity\n _verifyProof(snarkProof);\n }\n\n /**\n * @dev Returns attestations that will be recorded, constructed from the user request\n * @param request users request. Claim of having an account part of a group of accounts\n */\n function buildAttestations(Request calldata request, bytes calldata)\n public\n view\n virtual\n override(IAttester, Attester)\n returns (Attestation[] memory)\n {\n HydraS1Claim memory claim = request._claim();\n\n Attestation[] memory attestations = new Attestation[](1);\n\n uint256 attestationCollectionId = AUTHORIZED_COLLECTION_ID_FIRST +\n claim.groupProperties.groupIndex;\n\n if (attestationCollectionId > AUTHORIZED_COLLECTION_ID_LAST)\n revert CollectionIdOutOfBound(attestationCollectionId);\n\n address issuer = address(this);\n\n attestations[0] = Attestation(\n attestationCollectionId,\n claim.destination,\n issuer,\n claim.claimedValue,\n claim.groupProperties.generationTimestamp,\n ''\n );\n return (attestations);\n }\n\n /*******************************************************\n OPTIONAL HOOK VIRTUAL FUNCTIONS FROM ATTESTER.SOL\n *******************************************************/\n\n /**\n * @dev Hook run before recording the attestation.\n * Throws if ticket already used and not a renewal (e.g destination different that last)\n * @param request users request. Claim of having an account part of a group of accounts\n * @param proofData provided to back the request. snark input and snark proof\n */\n function _beforeRecordAttestations(Request calldata request, bytes calldata proofData)\n internal\n virtual\n override\n {\n // we get the ticket used from the snark input in the data provided\n uint256 userTicket = proofData._getTicket();\n address currentDestination = _getDestinationOfTicket(userTicket);\n\n if (currentDestination != address(0) && currentDestination != request.destination) {\n revert TicketUsed(userTicket);\n }\n\n _setDestinationForTicket(userTicket, request.destination);\n }\n\n /*******************************************************\n Hydra-S1 MANDATORY FUNCTIONS FROM Hydra-S1 Base Attester\n *******************************************************/\n\n /**\n * @dev Returns the ticket identifier from a user claim\n * @param claim user Hydra-S1 claim = have an account with a specific value in a specific group\n * ticket = hash(sourceSecretHash, ticketIdentifier), which is verified inside the snark\n * users bring sourceSecretHash as private input in snark which guarantees privacy\n \n * Here we chose ticketIdentifier = hash(attesterAddress, claim.GroupId)\n * Creates one ticket per group, per user and makes sure no collision with other attester's tickets\n **/\n function _getTicketIdentifierOfClaim(HydraS1Claim memory claim)\n internal\n view\n override\n returns (uint256)\n {\n uint256 ticketIdentifier = _encodeInSnarkField(address(this), claim.groupProperties.groupIndex);\n return ticketIdentifier;\n }\n\n /*******************************************************\n Hydra-S1 Attester Specific Functions\n *******************************************************/\n\n /**\n * @dev Getter, returns the last attestation destination of a ticket\n * @param userTicket ticket used\n **/\n function getDestinationOfTicket(uint256 userTicket) external view override returns (address) {\n return _getDestinationOfTicket(userTicket);\n }\n\n function _setDestinationForTicket(uint256 userTicket, address destination) internal virtual {\n _ticketsDestinations[userTicket] = destination;\n emit TicketDestinationUpdated(userTicket, destination);\n }\n\n function _getDestinationOfTicket(uint256 userTicket) internal view returns (address) {\n return _ticketsDestinations[userTicket];\n }\n\n function _encodeInSnarkField(address addr, uint256 nb) internal pure returns (uint256) {\n return uint256(keccak256(abi.encode(addr, nb))) % HydraS1Lib.SNARK_FIELD;\n }\n}\n" + }, + "contracts/core/AttestationsRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\nimport {IAttestationsRegistry} from './interfaces/IAttestationsRegistry.sol';\nimport {AttestationsRegistryConfigLogic} from './libs/attestations-registry/AttestationsRegistryConfigLogic.sol';\nimport {AttestationsRegistryState} from './libs/attestations-registry/AttestationsRegistryState.sol';\nimport {Range, RangeUtils} from './libs/utils/RangeLib.sol';\nimport {Attestation, AttestationData} from './libs/Structs.sol';\nimport {IBadges} from './interfaces/IBadges.sol';\n\n/**\n * @title Attestations Registry\n * @author Sismo\n * @notice Main contract of Sismo, stores all recorded attestations in attestations collections\n * Only authorized attestations issuers can record attestation in the registry\n * Attesters that expect to record in the Attestations Registry must be authorized issuers\n * For more information: https://attestations-registry.docs.sismo.io\n\n * For each attestation recorded, a badge is received by the user\n * The badge is the Non transferrable NFT representation of an attestation \n * Its ERC1155 contract is stateless, balances are read directly from the registry. Badge balances <=> Attestations values\n * After the creation or update of an attestation, the registry triggers a TransferSingle event from the ERC1155 Badges contracts\n * It enables off-chain apps such as opensea to catch the \"shadow mint\" of the badge\n **/\ncontract AttestationsRegistry is\n AttestationsRegistryState,\n IAttestationsRegistry,\n AttestationsRegistryConfigLogic\n{\n IBadges immutable BADGES;\n\n /**\n * @dev Constructor.\n * @param owner Owner of the contract, has the right to authorize/unauthorize attestations issuers\n * @param badgesAddress Stateless ERC1155 Badges contract\n */\n constructor(address owner, address badgesAddress) {\n initialize(owner);\n BADGES = IBadges(badgesAddress);\n }\n\n /**\n * @dev Initialize function, to be called by the proxy delegating calls to this implementation\n * @param owner Owner of the contract, has the right to authorize/unauthorize attestations issuers\n */\n function initialize(address owner) public initializer {\n _transferOwnership(owner);\n }\n\n /**\n * @dev Main function to be called by authorized issuers\n * @param attestations Attestations to be recorded (creates a new one or overrides an existing one)\n */\n function recordAttestations(Attestation[] calldata attestations) external override whenNotPaused {\n address issuer = _msgSender();\n for (uint256 i = 0; i < attestations.length; i++) {\n if (!_isAuthorized(issuer, attestations[i].collectionId))\n revert IssuerNotAuthorized(issuer, attestations[i].collectionId);\n\n uint256 previousAttestationValue = _attestationsData[attestations[i].collectionId][\n attestations[i].owner\n ].value;\n\n _attestationsData[attestations[i].collectionId][attestations[i].owner] = AttestationData(\n attestations[i].issuer,\n attestations[i].value,\n attestations[i].timestamp,\n attestations[i].extraData\n );\n\n _triggerBadgeTransferEvent(\n attestations[i].collectionId,\n attestations[i].owner,\n previousAttestationValue,\n attestations[i].value\n );\n emit AttestationRecorded(attestations[i]);\n }\n }\n\n /**\n * @dev Delete function to be called by authorized issuers\n * @param attestations Attestations to be deleted\n */\n function deleteAttestations(Attestation[] memory attestations) external override whenNotPaused {\n address issuer = _msgSender();\n for (uint256 i = 0; i < attestations.length; i++) {\n uint256 previousAttestationValue = _attestationsData[attestations[i].collectionId][\n attestations[i].owner\n ].value;\n\n if (!_isAuthorized(issuer, attestations[i].collectionId))\n revert IssuerNotAuthorized(issuer, attestations[i].collectionId);\n delete _attestationsData[attestations[i].collectionId][attestations[i].owner];\n\n _triggerBadgeTransferEvent(\n attestations[i].collectionId,\n attestations[i].owner,\n previousAttestationValue,\n 0\n );\n\n emit AttestationDeleted(\n Attestation(\n attestations[i].collectionId,\n attestations[i].owner,\n attestations[i].issuer,\n attestations[i].value,\n attestations[i].timestamp,\n attestations[i].extraData\n )\n );\n }\n }\n\n /**\n * @dev Returns whether a user has an attestation from a collection\n * @param collectionId Collection identifier of the targeted attestation\n * @param owner Owner of the targeted attestation\n */\n function hasAttestation(uint256 collectionId, address owner)\n external\n view\n override\n returns (bool)\n {\n return _getAttestationValue(collectionId, owner) != 0;\n }\n\n /**\n * @dev Getter of the data of a specific attestation\n * @param collectionId Collection identifier of the targeted attestation\n * @param owner Owner of the targeted attestation\n */\n function getAttestationData(uint256 collectionId, address owner)\n external\n view\n override\n returns (AttestationData memory)\n {\n return _getAttestationData(collectionId, owner);\n }\n\n /**\n * @dev Getter of the value of a specific attestation\n * @param collectionId Collection identifier of the targeted attestation\n * @param owner Owner of the targeted attestation\n */\n function getAttestationValue(uint256 collectionId, address owner)\n external\n view\n override\n returns (uint256)\n {\n return _getAttestationValue(collectionId, owner);\n }\n\n /**\n * @dev Getter of the data of a specific attestation as tuple\n * @param collectionId Collection identifier of the targeted attestation\n * @param owner Owner of the targeted attestation\n */\n function getAttestationDataTuple(uint256 collectionId, address owner)\n external\n view\n override\n returns (\n address,\n uint256,\n uint32,\n bytes memory\n )\n {\n AttestationData memory attestationData = _attestationsData[collectionId][owner];\n return (\n attestationData.issuer,\n attestationData.value,\n attestationData.timestamp,\n attestationData.extraData\n );\n }\n\n /**\n * @dev Getter of the extraData of a specific attestation\n * @param collectionId Collection identifier of the targeted attestation\n * @param owner Owner of the targeted attestation\n */\n function getAttestationExtraData(uint256 collectionId, address owner)\n external\n view\n override\n returns (bytes memory)\n {\n return _attestationsData[collectionId][owner].extraData;\n }\n\n /**\n * @dev Getter of the issuer of a specific attestation\n * @param collectionId Collection identifier of the targeted attestation\n * @param owner Owner of the targeted attestation\n */\n function getAttestationIssuer(uint256 collectionId, address owner)\n external\n view\n override\n returns (address)\n {\n return _attestationsData[collectionId][owner].issuer;\n }\n\n /**\n * @dev Getter of the timestamp of a specific attestation\n * @param collectionId Collection identifier of the targeted attestation\n * @param owner Owner of the targeted attestation\n */\n function getAttestationTimestamp(uint256 collectionId, address owner)\n external\n view\n override\n returns (uint32)\n {\n return _attestationsData[collectionId][owner].timestamp;\n }\n\n /**\n * @dev Getter of the data of specific attestations\n * @param collectionIds Collection identifiers of the targeted attestations\n * @param owners Owners of the targeted attestations\n */\n function getAttestationDataBatch(uint256[] memory collectionIds, address[] memory owners)\n external\n view\n override\n returns (AttestationData[] memory)\n {\n AttestationData[] memory attestationsDataArray = new AttestationData[](collectionIds.length);\n for (uint256 i = 0; i < collectionIds.length; i++) {\n attestationsDataArray[i] = _getAttestationData(collectionIds[i], owners[i]);\n }\n return attestationsDataArray;\n }\n\n /**\n * @dev Getter of the values of specific attestations\n * @param collectionIds Collection identifiers of the targeted attestations\n * @param owners Owners of the targeted attestations\n */\n function getAttestationValueBatch(uint256[] memory collectionIds, address[] memory owners)\n external\n view\n override\n returns (uint256[] memory)\n {\n uint256[] memory attestationsValues = new uint256[](collectionIds.length);\n for (uint256 i = 0; i < collectionIds.length; i++) {\n attestationsValues[i] = _getAttestationValue(collectionIds[i], owners[i]);\n }\n return attestationsValues;\n }\n\n /**\n * @dev Function that trigger a TransferSingle event from the stateless ERC1155 Badges contract\n * It enables off-chain apps such as opensea to catch the \"shadow mints/burns\" of badges\n */\n function _triggerBadgeTransferEvent(\n uint256 badgeTokenId,\n address owner,\n uint256 previousValue,\n uint256 newValue\n ) internal {\n bool isGreaterValue = newValue > previousValue;\n address operator = address(this);\n address from = isGreaterValue ? address(0) : owner;\n address to = isGreaterValue ? owner : address(0);\n uint256 value = isGreaterValue ? newValue - previousValue : previousValue - newValue;\n\n // if isGreaterValue is true, function triggers mint event. Otherwise triggers burn event.\n BADGES.triggerTransferEvent(operator, from, to, badgeTokenId, value);\n }\n\n function _getAttestationData(uint256 collectionId, address owner)\n internal\n view\n returns (AttestationData memory)\n {\n return (_attestationsData[collectionId][owner]);\n }\n\n function _getAttestationValue(uint256 collectionId, address owner)\n internal\n view\n returns (uint256)\n {\n return _attestationsData[collectionId][owner].value;\n }\n}\n" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/tasks/deploy-tasks/deployments-config.ts b/tasks/deploy-tasks/deployments-config.ts index 7ed3f65..4165674 100644 --- a/tasks/deploy-tasks/deployments-config.ts +++ b/tasks/deploy-tasks/deployments-config.ts @@ -35,6 +35,10 @@ const ALPHA_RINKEBY_PROXY_ADMIN = '0x246E71bC2a257f4BE9C7fAD4664E6D7444844Adc'; const ALPHA_GOERLI_OWNER = '0x4e070E9b85a659F0B7B47cde33152ad6c2F63954'; const ALPHA_GOERLI_ROOTS_OWNER_RELAYER = '0x7f2e6e158643bcaf85f30c57ae8625f623d82659'; const ALPHA_GOERLI_PROXY_ADMIN = '0x246E71bC2a257f4BE9C7fAD4664E6D7444844Adc'; +// Goerli +const ALPHA_MUMBAI_OWNER = '0x4e070E9b85a659F0B7B47cde33152ad6c2F63954'; +const ALPHA_MUMBAI_ROOTS_OWNER_RELAYER = '0x63f08f8f13126b9eadc76dd683902c61c5115138'; +const ALPHA_MUMBAI_PROXY_ADMIN = '0x246E71bC2a257f4BE9C7fAD4664E6D7444844Adc'; // Polygon const ALPHA_POLYGON_OWNER = '0xaee4acd5c4Bf516330ca8fe11B07206fC6709294'; const ALPHA_POLYGON_ROOTS_OWNER_RELAYER = '0xf0a0b692e1c764281c211948d03edeef5fb57111'; @@ -137,6 +141,53 @@ export const deploymentsConfig: DeploymentsConfigTypes = { EdDSAPubKeyY: COMMITMENT_MAPPER_EDDSA_PUB_KEY_PROD[1], }, }, + // deployer "alpha-testnets-mumbai-mnemonic-deployer-october-13-2022" + mumbai: { + deployOptions: { + manualConfirm: false, + log: true, + behindProxy: true, + proxyAdmin: ALPHA_MUMBAI_PROXY_ADMIN, + }, + badges: { + owner: ALPHA_MUMBAI_OWNER, + // Badges Metadata URI for the Badges contract + uri: 'https://hub.staging.zikies.io/badges/mumbai/{id}.json', + }, + front: { + collectionIdFirst: '0', + collectionIdLast: '10000000', + }, + hydraS1SimpleAttester: { + collectionIdFirst: '10000001', + collectionIdLast: '20000000', + initialRoot: '0', + }, + hydraS1SoulboundAttester: { + collectionIdFirst: '20000001', + collectionIdLast: '30000000', + soulboundCooldownDuration: THREE_DAYS, // 3 days + initialRoot: '0', + }, + synapsPythia1SimpleAttester: { + collectionIdFirst: '30000001', + collectionIdLast: '30000100', + commitmentSignerPubKeyX: COMMITMENT_SIGNER_PUB_KEY_SYNAPS_STAGING[0], + commitmentSignerPubKeyY: COMMITMENT_SIGNER_PUB_KEY_SYNAPS_STAGING[1], + owner: ALPHA_MUMBAI_OWNER, + }, + attestationsRegistry: { + owner: ALPHA_MUMBAI_OWNER, + }, + availableRootsRegistry: { + owner: ALPHA_MUMBAI_ROOTS_OWNER_RELAYER, + }, + commitmentMapper: { + owner: ALPHA_MUMBAI_OWNER, + EdDSAPubKeyX: COMMITMENT_MAPPER_EDDSA_PUB_KEY_STAGING[0], + EdDSAPubKeyY: COMMITMENT_MAPPER_EDDSA_PUB_KEY_STAGING[1], + }, + }, // deployer "alpha-testnets-goerli-mnemonic-deployer-october-4-2022" goerli: { deployOptions: {