diff --git a/deployments/mumbai/AttestationsRegistry.json b/deployments/mumbai/AttestationsRegistry.json index 3a8e4db..ce1c3d3 100644 --- a/deployments/mumbai/AttestationsRegistry.json +++ b/deployments/mumbai/AttestationsRegistry.json @@ -17,6 +17,11 @@ "stateMutability": "nonpayable", "type": "constructor" }, + { + "inputs": [], + "name": "ArgsLengthDoesNotMatch", + "type": "error" + }, { "inputs": [ { @@ -28,6 +33,28 @@ "name": "AttesterNotFound", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "attributeIndex", + "type": "uint8" + } + ], + "name": "AttributeAlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "attributeIndex", + "type": "uint8" + } + ], + "name": "AttributeDoesNotExist", + "type": "error" + }, { "inputs": [ { @@ -64,6 +91,17 @@ "name": "IdsMismatch", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "index", + "type": "uint8" + } + ], + "name": "IndexOutOfBounds", + "type": "error" + }, { "inputs": [ { @@ -117,6 +155,17 @@ "name": "RangeIndexOutOfBounds", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "value", + "type": "uint8" + } + ], + "name": "ValueOutOfBounds", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -207,6 +256,88 @@ "name": "AttestationRecorded", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "attributeIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "attributeValue", + "type": "uint8" + } + ], + "name": "AttestationsCollectionAttributeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "attributeIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "deletedAttributeName", + "type": "bytes32" + } + ], + "name": "AttributeDeleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "attributeIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "newAttributeName", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "previousAttributeName", + "type": "bytes32" + } + ], + "name": "AttributeNameUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -257,6 +388,25 @@ "name": "IssuerUnauthorized", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "attributeIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "attributeName", + "type": "bytes32" + } + ], + "name": "NewAttributeCreated", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -302,6 +452,67 @@ "name": "Unpaused", "type": "event" }, + { + "inputs": [], + "name": "IMPLEMENTATION_VERSION", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "index", + "type": "uint8" + } + ], + "name": "attestationsCollectionHasAttribute", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "uint8[]", + "name": "indices", + "type": "uint8[]" + } + ], + "name": "attestationsCollectionHasAttributes", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -355,6 +566,42 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "index", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "name", + "type": "bytes32" + } + ], + "name": "createNewAttribute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8[]", + "name": "indices", + "type": "uint8[]" + }, + { + "internalType": "bytes32[]", + "name": "names", + "type": "bytes32[]" + } + ], + "name": "createNewAttributes", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -373,6 +620,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "index", + "type": "uint8" + } + ], + "name": "deleteAttribute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8[]", + "name": "indices", + "type": "uint8[]" + } + ], + "name": "deleteAttributes", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -624,6 +897,78 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "index", + "type": "uint8" + } + ], + "name": "getAttributeValueForAttestationsCollection", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + } + ], + "name": "getAttributesNamesAndValuesForAttestationsCollection", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + }, + { + "internalType": "uint8[]", + "name": "", + "type": "uint8[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "uint8[]", + "name": "indices", + "type": "uint8[]" + } + ], + "name": "getAttributesValuesForAttestationsCollection", + "outputs": [ + { + "internalType": "uint8[]", + "name": "", + "type": "uint8[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -652,7 +997,7 @@ "inputs": [ { "internalType": "address", - "name": "owner", + "name": "ownerAddress", "type": "address" } ], @@ -770,6 +1115,52 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "index", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "value", + "type": "uint8" + } + ], + "name": "setAttributeValueForAttestationsCollection", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "collectionIds", + "type": "uint256[]" + }, + { + "internalType": "uint8[]", + "name": "indices", + "type": "uint8[]" + }, + { + "internalType": "uint8[]", + "name": "values", + "type": "uint8[]" + } + ], + "name": "setAttributesValuesForAttestationsCollections", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -852,65 +1243,113 @@ "outputs": [], "stateMutability": "nonpayable", "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "index", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "newName", + "type": "bytes32" + } + ], + "name": "updateAttributeName", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8[]", + "name": "indices", + "type": "uint8[]" + }, + { + "internalType": "bytes32[]", + "name": "newNames", + "type": "bytes32[]" + } + ], + "name": "updateAttributesName", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" } ], - "transactionHash": "0xfc19a49675cb547c8dae170d8a14d4b12d5434f47ef6d48ff4606406bb755c7d", + "transactionHash": "0x23ead6ee5b2b09647afa2e281d6cb93a084f26cc05fb59708bf0b291222cfaf7", "receipt": { "to": null, "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0x21a3087def6980A695D5390EC5d75D3f52E97D49", - "transactionIndex": 5, - "gasUsed": "2203165", - "logsBloom": "0x00000000100000000000000000020100000000000000000000800000000000000000000000000000000000000000000000008000000000000000000000008000000000000000040000000000000000800001000000000000000100000000000000000000020000000000000000000800002000000000000080000000000000400000000000000000000000000000000000000010000000000000000000008000200000000000000000080000800000000000000000000000000000000000004000000000000000000001000000000100000000000000000000100000000020000000000000000000000000000000000000000000000000000020000000100000", - "blockHash": "0x6b72a4c980e5f86d21d5dd25ad709faf3f03949d86b18effc16facf9dbbc8eb2", - "transactionHash": "0xfc19a49675cb547c8dae170d8a14d4b12d5434f47ef6d48ff4606406bb755c7d", + "contractAddress": "0x219aEB9920E8528C2664EC673c2df0E55DEEc26E", + "transactionIndex": 11, + "gasUsed": "3121566", + "logsBloom": "0x00000000000000000000000000020000000000000000000000800000000000000000000000000000000000000000000000008000002000000000000000000000000000000000000000000000000000800001000000000000040100000000000000000000020000000000200000000800002000000000000080000000000000400000000000000000000000000000000000000010000080000000000000008000200000000000000000000000800400000000000000000000000040000000004000000000000000000001000000040000000800000000000000100000000020000000000000000002000000000000000000000000000000000020000000100000", + "blockHash": "0x655bddf3573ec82ece82fb6dc8dfc789151c1afcc549317e790c1eca4dc5568c", + "transactionHash": "0x23ead6ee5b2b09647afa2e281d6cb93a084f26cc05fb59708bf0b291222cfaf7", "logs": [ { - "transactionIndex": 5, - "blockNumber": 28807620, - "transactionHash": "0xfc19a49675cb547c8dae170d8a14d4b12d5434f47ef6d48ff4606406bb755c7d", - "address": "0x21a3087def6980A695D5390EC5d75D3f52E97D49", + "transactionIndex": 11, + "blockNumber": 29540661, + "transactionHash": "0x23ead6ee5b2b09647afa2e281d6cb93a084f26cc05fb59708bf0b291222cfaf7", + "address": "0x219aEB9920E8528C2664EC673c2df0E55DEEc26E", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" ], "data": "0x", - "logIndex": 21, - "blockHash": "0x6b72a4c980e5f86d21d5dd25ad709faf3f03949d86b18effc16facf9dbbc8eb2" + "logIndex": 32, + "blockHash": "0x655bddf3573ec82ece82fb6dc8dfc789151c1afcc549317e790c1eca4dc5568c" }, { - "transactionIndex": 5, - "blockNumber": 28807620, - "transactionHash": "0xfc19a49675cb547c8dae170d8a14d4b12d5434f47ef6d48ff4606406bb755c7d", - "address": "0x21a3087def6980A695D5390EC5d75D3f52E97D49", + "transactionIndex": 11, + "blockNumber": 29540661, + "transactionHash": "0x23ead6ee5b2b09647afa2e281d6cb93a084f26cc05fb59708bf0b291222cfaf7", + "address": "0x219aEB9920E8528C2664EC673c2df0E55DEEc26E", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", "0x0000000000000000000000004e070e9b85a659f0b7b47cde33152ad6c2f63954" ], "data": "0x", - "logIndex": 22, - "blockHash": "0x6b72a4c980e5f86d21d5dd25ad709faf3f03949d86b18effc16facf9dbbc8eb2" + "logIndex": 33, + "blockHash": "0x655bddf3573ec82ece82fb6dc8dfc789151c1afcc549317e790c1eca4dc5568c" + }, + { + "transactionIndex": 11, + "blockNumber": 29540661, + "transactionHash": "0x23ead6ee5b2b09647afa2e281d6cb93a084f26cc05fb59708bf0b291222cfaf7", + "address": "0x219aEB9920E8528C2664EC673c2df0E55DEEc26E", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000003", + "logIndex": 34, + "blockHash": "0x655bddf3573ec82ece82fb6dc8dfc789151c1afcc549317e790c1eca4dc5568c" }, { - "transactionIndex": 5, - "blockNumber": 28807620, - "transactionHash": "0xfc19a49675cb547c8dae170d8a14d4b12d5434f47ef6d48ff4606406bb755c7d", + "transactionIndex": 11, + "blockNumber": 29540661, + "transactionHash": "0x23ead6ee5b2b09647afa2e281d6cb93a084f26cc05fb59708bf0b291222cfaf7", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", "0x0000000000000000000000000000000000000000000000000000000000001010", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x0000000000000000000000003a22c8bc68e98b0faf40f349dd2b2890fae01484" + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" ], - "data": "0x000000000000000000000000000000000000000000000000001b652f233917000000000000000000000000000000000000000000000000007e0d6a25db838c0e0000000000000000000000000000000000000000000000000163f6fb76d2e23b0000000000000000000000000000000000000000000000007df204f6b84a750e000000000000000000000000000000000000000000000000017f5c2a9a0bf93b", - "logIndex": 23, - "blockHash": "0x6b72a4c980e5f86d21d5dd25ad709faf3f03949d86b18effc16facf9dbbc8eb2" + "data": "0x000000000000000000000000000000000000000000000000000ed690e9d737dc0000000000000000000000000000000000000000000000007d35c1e8683d9f52000000000000000000000000000000000000000000000b8e6f62240848713dbc0000000000000000000000000000000000000000000000007d26eb577e666776000000000000000000000000000000000000000000000b8e6f70fa9932487598", + "logIndex": 35, + "blockHash": "0x655bddf3573ec82ece82fb6dc8dfc789151c1afcc549317e790c1eca4dc5568c" } ], - "blockNumber": 28807620, - "cumulativeGasUsed": "3020635", + "blockNumber": 29540661, + "cumulativeGasUsed": "4966184", "status": 1, "byzantium": true }, @@ -918,15 +1357,22 @@ "0x4e070E9b85a659F0B7B47cde33152ad6c2F63954", "0x5722fEa81027533721BA161964622271560da1aC" ], - "numDeployments": 3, - "solcInputHash": "c7c67c4a1ddf53de4ef76f8a114dfc39", - "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\":\"owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"}],\"name\":\"OwnersAndCollectionIdsLengthMismatch\",\"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\":[{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"}],\"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(address[],uint256[])\":{\"details\":\"Delete function to be called by authorized issuers\",\"params\":{\"collectionIds\":\"The collection ids of the attestations to be deleted\",\"owners\":\"The owners of the 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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds)\\n external\\n override\\n whenNotPaused\\n {\\n if (owners.length != collectionIds.length)\\n revert OwnersAndCollectionIdsLengthMismatch(owners, collectionIds);\\n\\n address issuer = _msgSender();\\n for (uint256 i = 0; i < owners.length; i++) {\\n AttestationData memory attestationData = _attestationsData[collectionIds[i]][owners[i]];\\n\\n if (!_isAuthorized(issuer, collectionIds[i]))\\n revert IssuerNotAuthorized(issuer, collectionIds[i]);\\n delete _attestationsData[collectionIds[i]][owners[i]];\\n\\n _triggerBadgeTransferEvent(collectionIds[i], owners[i], attestationData.value, 0);\\n\\n emit AttestationDeleted(\\n Attestation(\\n collectionIds[i],\\n owners[i],\\n attestationData.issuer,\\n attestationData.value,\\n attestationData.timestamp,\\n attestationData.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\":\"0x3a99acc1d7a7ee0c581e1e266233b5b5b7d29f41ab7300d044a8f21188e7bd62\",\"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 error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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\":\"0xcf79a817ec578f5b4d8f23853dd8df0e3b1acfbff2b5a01601fd9a7315862ec9\",\"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 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\":\"0xf6499c0a3d08c2ef84d15c8888b833828141f89a20c2aac96af6c7e66b490807\",\"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": "0x60a06040523480156200001157600080fd5b506040516200287b3803806200287b8339810160408190526200003491620001e4565b6200003f3362000069565b6000805462ff0000191690556200005682620000c6565b6001600160a01b0316608052506200021c565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054610100900460ff16620000e35760005460ff1615620000ed565b620000ed6200019a565b620001555760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801562000178576000805461ffff19166101011790555b620001838262000069565b801562000196576000805461ff00191690555b5050565b6000620001b230620001b860201b620013d31760201c565b15905090565b6001600160a01b03163b151590565b80516001600160a01b0381168114620001df57600080fd5b919050565b60008060408385031215620001f857600080fd5b6200020383620001c7565b91506200021360208401620001c7565b90509250929050565b6080516126436200023860003960006119ed01526126436000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c8063811a6af7116100c3578063c06d5db61161007c578063c06d5db614610326578063c4d66de814610339578063c7da9aa61461034c578063dc873d0114610381578063ebc5c093146103a1578063f2fde38b146103b457600080fd5b8063811a6af71461028b5780638456cb591461029e57806384c2ad82146102a65780638c3c9e32146102c65780638da5cb5b146102e7578063b88656731461031357600080fd5b80633be1ced7116101155780633be1ced7146102145780633f4ba83a146102375780635c975abb1461023f5780636d7fbb6714610250578063715018a6146102705780637cde0fe21461027857600080fd5b8063011023901461015257806314067f8b1461017a57806315027bda146101cc578063181dfdff146101ec5780632972b0f014610201575b600080fd5b610165610160366004611c35565b6103c7565b60405190151581526020015b60405180910390f35b6101b7610188366004611c35565b6000918252602080805260408084206001600160a01b0393909316845291905290206002015463ffffffff1690565b60405163ffffffff9091168152602001610171565b6101df6101da366004611d5d565b6103de565b6040516101719190611eb4565b6101ff6101fa366004611f95565b6104cf565b005b61016561020f366004612008565b610598565b610227610222366004611c35565b6105ab565b6040516101719493929190612032565b6101ff6106c1565b60005462010000900460ff16610165565b61026361025e366004611c35565b6106fd565b604051610171919061206f565b6101ff6107b5565b6101ff610286366004612082565b6107f1565b6101ff610299366004612100565b610833565b6101ff610c0f565b6102b96102b4366004611c35565b610c49565b604051610171919061216b565b6102d96102d4366004611c35565b610c76565b604051908152602001610171565b600054630100000090046001600160a01b03165b6040516001600160a01b039091168152602001610171565b6101ff61032136600461217e565b610c82565b6101ff6103343660046121cb565b610d17565b6101ff610347366004612204565b610d55565b6102fb61035a366004611c35565b6000918252602080805260408084206001600160a01b039384168552909152909120541690565b61039461038f366004611d5d565b610e18565b604051610171919061221f565b6101ff6103af366004612263565b610ed8565b6101ff6103c2366004612204565b611330565b60006103d383836113e2565b151590505b92915050565b6060600083516001600160401b038111156103fb576103fb611c61565b60405190808252806020026020018201604052801561044c57816020015b60408051608081018252600080825260208083018290529282015260608082015282526000199092019101816104195790505b50905060005b84518110156104c757610497858281518110610470576104706122a4565b602002602001015185838151811061048a5761048a6122a4565b602002602001015161140b565b8282815181106104a9576104a96122a4565b602002602001018190525080806104bf906122d0565b915050610452565b509392505050565b6000546001600160a01b03630100000090910416331461050a5760405162461bcd60e51b8152600401610501906122e9565b60405180910390fd5b60005b815181101561059257610580848284848151811061052d5761052d6122a4565b602002602001015161053f919061231e565b858481518110610551576105516122a4565b60200260200101516000015186858151811061056f5761056f6122a4565b60200260200101516020015161151a565b8061058a816122d0565b91505061050d565b50505050565b60006105a483836117b9565b9392505050565b6000828152602080805260408083206001600160a01b038086168552908352818420825160808101845281549092168252600181015493820193909352600283015463ffffffff1691810191909152600382018054849384936060938593919291838601919061061a90612335565b80601f016020809104026020016040519081016040528092919081815260200182805461064690612335565b80156106935780601f1061066857610100808354040283529160200191610693565b820191906000526020600020905b81548152906001019060200180831161067657829003601f168201915b505050919092525050815160208301516040840151606090940151919b909a50929850965090945050505050565b6000546001600160a01b0363010000009091041633146106f35760405162461bcd60e51b8152600401610501906122e9565b6106fb6117db565b565b6000828152602080805260408083206001600160a01b0385168452909152902060030180546060919061072f90612335565b80601f016020809104026020016040519081016040528092919081815260200182805461075b90612335565b80156107a85780601f1061077d576101008083540402835291602001916107a8565b820191906000526020600020905b81548152906001019060200180831161078b57829003601f168201915b5050505050905092915050565b6000546001600160a01b0363010000009091041633146107e75760405162461bcd60e51b8152600401610501906122e9565b6106fb6000611876565b6000546001600160a01b0363010000009091041633146108235760405162461bcd60e51b8152600401610501906122e9565b61082e8383836118d3565b505050565b60005462010000900460ff161561085c5760405162461bcd60e51b81526004016105019061236f565b8281146108845783838383604051638ceb003d60e01b81526004016105019493929190612399565b3360005b84811015610c07576000602060008686858181106108a8576108a86122a4565b90506020020135815260200190815260200160002060008888858181106108d1576108d16122a4565b90506020020160208101906108e69190612204565b6001600160a01b0390811682526020808301939093526040918201600020825160808101845281549092168252600181015493820193909352600283015463ffffffff169181019190915260038201805491929160608401919061094990612335565b80601f016020809104026020016040519081016040528092919081815260200182805461097590612335565b80156109c25780601f10610997576101008083540402835291602001916109c2565b820191906000526020600020905b8154815290600101906020018083116109a557829003601f168201915b50505050508152505090506109ef838686858181106109e3576109e36122a4565b905060200201356117b9565b610a395782858584818110610a0657610a066122a4565b60405163c522f21160e01b81526001600160a01b0390941660048501526020029190910135602483015250604401610501565b60206000868685818110610a4f57610a4f6122a4565b9050602002013581526020019081526020016000206000888885818110610a7857610a786122a4565b9050602002016020810190610a8d9190612204565b6001600160a01b031681526020810191909152604001600090812080546001600160a01b03191681556001810182905560028101805463ffffffff1916905590610ada6003830182611b46565b5050610b2b858584818110610af157610af16122a4565b90506020020135888885818110610b0a57610b0a6122a4565b9050602002016020810190610b1f9190612204565b83602001516000611965565b7f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b6040518060c00160405280878786818110610b6957610b696122a4565b905060200201358152602001898986818110610b8757610b876122a4565b9050602002016020810190610b9c9190612204565b6001600160a01b0316815260200183600001516001600160a01b0316815260200183602001518152602001836040015163ffffffff1681526020018360600151815250604051610bec919061241b565b60405180910390a15080610bff816122d0565b915050610888565b505050505050565b6000546001600160a01b036301000000909104163314610c415760405162461bcd60e51b8152600401610501906122e9565b6106fb611a56565b60408051608081018252600080825260208201819052918101919091526060808201526105a4838361140b565b60006105a483836113e2565b6000546001600160a01b036301000000909104163314610cb45760405162461bcd60e51b8152600401610501906122e9565b60005b815181101561082e57610d0583838381518110610cd657610cd66122a4565b602002602001015160000151848481518110610cf457610cf46122a4565b6020026020010151602001516118d3565b80610d0f816122d0565b915050610cb7565b6000546001600160a01b036301000000909104163314610d495760405162461bcd60e51b8152600401610501906122e9565b6105928484848461151a565b600054610100900460ff16610d705760005460ff1615610d74565b303b155b610dd75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610501565b600054610100900460ff16158015610df9576000805461ffff19166101011790555b610e0282611876565b8015610e14576000805461ff00191690555b5050565b6060600083516001600160401b03811115610e3557610e35611c61565b604051908082528060200260200182016040528015610e5e578160200160208202803683370190505b50905060005b84518110156104c757610ea9858281518110610e8257610e826122a4565b6020026020010151858381518110610e9c57610e9c6122a4565b60200260200101516113e2565b828281518110610ebb57610ebb6122a4565b602090810291909101015280610ed0816122d0565b915050610e64565b60005462010000900460ff1615610f015760405162461bcd60e51b81526004016105019061236f565b3360005b8281101561059257610f3b82858584818110610f2357610f236122a4565b9050602002810190610f35919061247c565b356117b9565b610f8f5781848483818110610f5257610f526122a4565b9050602002810190610f64919061247c565b60405163c522f21160e01b81526001600160a01b039092166004830152356024820152604401610501565b600060206000868685818110610fa757610fa76122a4565b9050602002810190610fb9919061247c565b6000013581526020019081526020016000206000868685818110610fdf57610fdf6122a4565b9050602002810190610ff1919061247c565b611002906040810190602001612204565b6001600160a01b03166001600160a01b031681526020019081526020016000206001015490506040518060800160405280868685818110611045576110456122a4565b9050602002810190611057919061247c565b611068906060810190604001612204565b6001600160a01b03168152602001868685818110611088576110886122a4565b905060200281019061109a919061247c565b6060013581526020018686858181106110b5576110b56122a4565b90506020028101906110c7919061247c565b6110d89060a08101906080016124b0565b63ffffffff1681526020018686858181106110f5576110f56122a4565b9050602002810190611107919061247c565b6111159060a08101906124cb565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250602092508890508786818110611162576111626122a4565b9050602002810190611174919061247c565b600001358152602001908152602001600020600087878681811061119a5761119a6122a4565b90506020028101906111ac919061247c565b6111bd906040810190602001612204565b6001600160a01b0390811682526020808301939093526040918201600020845181546001600160a01b03191692169190911781558383015160018201559083015160028201805463ffffffff191663ffffffff90921691909117905560608301518051919261123492600385019290910190611b80565b509050506112c385858481811061124d5761124d6122a4565b905060200281019061125f919061247c565b35868685818110611272576112726122a4565b9050602002810190611284919061247c565b611295906040810190602001612204565b838888878181106112a8576112a86122a4565b90506020028101906112ba919061247c565b60600135611965565b7f8c20c3acb6b5208b7affea2fd90dabc8d47e77cee9766c855ce42730505cb2058585848181106112f6576112f66122a4565b9050602002810190611308919061247c565b604051611315919061253a565b60405180910390a15080611328816122d0565b915050610f05565b6000546001600160a01b0363010000009091041633146113625760405162461bcd60e51b8152600401610501906122e9565b6001600160a01b0381166113c75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610501565b6113d081611876565b50565b6001600160a01b03163b151590565b6000918252602080805260408084206001600160a01b0393909316845291905290206001015490565b60408051608081018252600080825260208201819052918101919091526060808201526000838152602080805260408083206001600160a01b03808716855290835292819020815160808101835281549094168452600181015492840192909252600282015463ffffffff169083015260038101805460608401919061149090612335565b80601f01602080910402602001604051908101604052809291908181526020018280546114bc90612335565b80156115095780601f106114de57610100808354040283529160200191611509565b820191906000526020600020905b8154815290600101906020018083116114ec57829003601f168201915b505050505081525050905092915050565b6000546001600160a01b03630100000090910416331461154c5760405162461bcd60e51b8152600401610501906122e9565b6001600160a01b03841660009081526010602052604090205483106115ae576001600160a01b038416600081815260106020526040908190205490516345e388eb60e01b81526004810192909252602482015260448101849052606401610501565b6001600160a01b03841660009081526010602052604081208054859081106115d8576115d86122a4565b600091825260208083206002909202909101546001600160a01b038816835260109091526040822080549193509086908110611616576116166122a4565b906000526020600020906002020160010154905081841415806116395750808314155b1561168557604051637a4dd76560e01b81526001600160a01b03871660048201526024810186905260448101839052606481018290526084810185905260a4810184905260c401610501565b6001600160a01b038616600090815260106020526040902080546116ab9060019061231e565b815481106116bb576116bb6122a4565b906000526020600020906002020160106000886001600160a01b03166001600160a01b0316815260200190815260200160002086815481106116ff576116ff6122a4565b60009182526020808320845460029093020191825560019384015493909101929092556001600160a01b0388168152601090915260409020805480611746576117466125f7565b6000828152602080822060026000199490940193840201828155600101919091559155604080516001600160a01b038916815291820186905281018490527f33cff58e54c3a8acae85cad63487b5dcf617521e33bb03f071299f374c29de1f9060600160405180910390a1505050505050565b6001600160a01b03821660009081526010602052604081206105a49083611ab8565b60005462010000900460ff1661182a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610501565b6000805462ff0000191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60408051808201825283815260208082018481526001600160a01b03871660008181526010845285812080546001808201835591835291859020865160029093020191825592519201919091558351908152908101859052918201839052907fe7d6ac0b740347f7f96a97e6a9dc0f20f4f11eca65495315adc009a55b6762f89060600160405180910390a150505050565b818111306000826119765785611979565b60005b905060008361198957600061198b565b865b90506000846119a35761199e868861231e565b6119ad565b6119ad878761231e565b604051633885984b60e11b81526001600160a01b03868116600483015285811660248301528481166044830152606482018c9052608482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063710b30969060a401600060405180830381600087803b158015611a3357600080fd5b505af1158015611a47573d6000803e3d6000fd5b50505050505050505050505050565b60005462010000900460ff1615611a7f5760405162461bcd60e51b81526004016105019061236f565b6000805462ff00001916620100001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586118593390565b6000805b8354811015611b3c57838181548110611ad757611ad76122a4565b9060005260206000209060020201600001548310158015611b1b5750838181548110611b0557611b056122a4565b9060005260206000209060020201600101548311155b15611b2a5760019150506103d8565b80611b34816122d0565b915050611abc565b5060009392505050565b508054611b5290612335565b6000825580601f10611b62575050565b601f0160209004906000526020600020908101906113d09190611c04565b828054611b8c90612335565b90600052602060002090601f016020900481019282611bae5760008555611bf4565b82601f10611bc757805160ff1916838001178555611bf4565b82800160010185558215611bf4579182015b82811115611bf4578251825591602001919060010190611bd9565b50611c00929150611c04565b5090565b5b80821115611c005760008155600101611c05565b80356001600160a01b0381168114611c3057600080fd5b919050565b60008060408385031215611c4857600080fd5b82359150611c5860208401611c19565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715611c9957611c99611c61565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611cc757611cc7611c61565b604052919050565b60006001600160401b03821115611ce857611ce8611c61565b5060051b60200190565b600082601f830112611d0357600080fd5b81356020611d18611d1383611ccf565b611c9f565b82815260059290921b84018101918181019086841115611d3757600080fd5b8286015b84811015611d525780358352918301918301611d3b565b509695505050505050565b60008060408385031215611d7057600080fd5b82356001600160401b0380821115611d8757600080fd5b611d9386838701611cf2565b9350602091508185013581811115611daa57600080fd5b85019050601f81018613611dbd57600080fd5b8035611dcb611d1382611ccf565b81815260059190911b82018301908381019088831115611dea57600080fd5b928401925b82841015611e0f57611e0084611c19565b82529284019290840190611def565b80955050505050509250929050565b6000815180845260005b81811015611e4457602081850181015186830182015201611e28565b81811115611e56576000602083870101525b50601f01601f19169290920160200192915050565b60018060a01b0381511682526020810151602083015263ffffffff60408201511660408301526000606082015160806060850152611eac6080850182611e1e565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611f0957603f19888603018452611ef7858351611e6b565b94509285019290850190600101611edb565b5092979650505050505050565b600082601f830112611f2757600080fd5b81356020611f37611d1383611ccf565b82815260069290921b84018101918181019086841115611f5657600080fd5b8286015b84811015611d525760408189031215611f735760008081fd5b611f7b611c77565b813581528482013585820152835291830191604001611f5a565b600080600060608486031215611faa57600080fd5b611fb384611c19565b925060208401356001600160401b0380821115611fcf57600080fd5b611fdb87838801611f16565b93506040860135915080821115611ff157600080fd5b50611ffe86828701611cf2565b9150509250925092565b6000806040838503121561201b57600080fd5b61202483611c19565b946020939093013593505050565b60018060a01b038516815283602082015263ffffffff831660408201526080606082015260006120656080830184611e1e565b9695505050505050565b6020815260006105a46020830184611e1e565b60008060006060848603121561209757600080fd5b6120a084611c19565b95602085013595506040909401359392505050565b60008083601f8401126120c757600080fd5b5081356001600160401b038111156120de57600080fd5b6020830191508360208260051b85010111156120f957600080fd5b9250929050565b6000806000806040858703121561211657600080fd5b84356001600160401b038082111561212d57600080fd5b612139888389016120b5565b9096509450602087013591508082111561215257600080fd5b5061215f878288016120b5565b95989497509550505050565b6020815260006105a46020830184611e6b565b6000806040838503121561219157600080fd5b61219a83611c19565b915060208301356001600160401b038111156121b557600080fd5b6121c185828601611f16565b9150509250929050565b600080600080608085870312156121e157600080fd5b6121ea85611c19565b966020860135965060408601359560600135945092505050565b60006020828403121561221657600080fd5b6105a482611c19565b6020808252825182820181905260009190848201906040850190845b818110156122575783518352928401929184019160010161223b565b50909695505050505050565b6000806020838503121561227657600080fd5b82356001600160401b0381111561228c57600080fd5b612298858286016120b5565b90969095509350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016122e2576122e26122ba565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600082821015612330576123306122ba565b500390565b600181811c9082168061234957607f821691505b60208210810361236957634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6040808252810184905260008560608301825b878110156123da576001600160a01b036123c584611c19565b168252602092830192909101906001016123ac565b5083810360208501528481526001600160fb1b038511156123fa57600080fd5b8460051b915081866020830137600091016020019081529695505050505050565b60208152815160208201526000602083015160018060a01b03808216604085015280604086015116606085015250506060830151608083015263ffffffff60808401511660a083015260a083015160c080840152611eac60e0840182611e1e565b6000823560be1983360301811261249257600080fd5b9190910192915050565b803563ffffffff81168114611c3057600080fd5b6000602082840312156124c257600080fd5b6105a48261249c565b6000808335601e198436030181126124e257600080fd5b8301803591506001600160401b038211156124fc57600080fd5b6020019150368190038213156120f957600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815281356020820152600061255360208401611c19565b60018060a01b0380821660408501528061256f60408701611c19565b16606085015250506060830135608083015263ffffffff6125926080850161249c565b1660a083015260a0830135601e198436030181126125af57600080fd5b83016020810190356001600160401b038111156125cb57600080fd5b8036038213156125da57600080fd5b60c0808501526125ee60e085018284612511565b95945050505050565b634e487b7160e01b600052603160045260246000fdfea26469706673582212208c8ee55074d6fbc4f64c05512852a1590038e3eed679507bebd8242c2dff3f4564736f6c634300080e0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061014d5760003560e01c8063811a6af7116100c3578063c06d5db61161007c578063c06d5db614610326578063c4d66de814610339578063c7da9aa61461034c578063dc873d0114610381578063ebc5c093146103a1578063f2fde38b146103b457600080fd5b8063811a6af71461028b5780638456cb591461029e57806384c2ad82146102a65780638c3c9e32146102c65780638da5cb5b146102e7578063b88656731461031357600080fd5b80633be1ced7116101155780633be1ced7146102145780633f4ba83a146102375780635c975abb1461023f5780636d7fbb6714610250578063715018a6146102705780637cde0fe21461027857600080fd5b8063011023901461015257806314067f8b1461017a57806315027bda146101cc578063181dfdff146101ec5780632972b0f014610201575b600080fd5b610165610160366004611c35565b6103c7565b60405190151581526020015b60405180910390f35b6101b7610188366004611c35565b6000918252602080805260408084206001600160a01b0393909316845291905290206002015463ffffffff1690565b60405163ffffffff9091168152602001610171565b6101df6101da366004611d5d565b6103de565b6040516101719190611eb4565b6101ff6101fa366004611f95565b6104cf565b005b61016561020f366004612008565b610598565b610227610222366004611c35565b6105ab565b6040516101719493929190612032565b6101ff6106c1565b60005462010000900460ff16610165565b61026361025e366004611c35565b6106fd565b604051610171919061206f565b6101ff6107b5565b6101ff610286366004612082565b6107f1565b6101ff610299366004612100565b610833565b6101ff610c0f565b6102b96102b4366004611c35565b610c49565b604051610171919061216b565b6102d96102d4366004611c35565b610c76565b604051908152602001610171565b600054630100000090046001600160a01b03165b6040516001600160a01b039091168152602001610171565b6101ff61032136600461217e565b610c82565b6101ff6103343660046121cb565b610d17565b6101ff610347366004612204565b610d55565b6102fb61035a366004611c35565b6000918252602080805260408084206001600160a01b039384168552909152909120541690565b61039461038f366004611d5d565b610e18565b604051610171919061221f565b6101ff6103af366004612263565b610ed8565b6101ff6103c2366004612204565b611330565b60006103d383836113e2565b151590505b92915050565b6060600083516001600160401b038111156103fb576103fb611c61565b60405190808252806020026020018201604052801561044c57816020015b60408051608081018252600080825260208083018290529282015260608082015282526000199092019101816104195790505b50905060005b84518110156104c757610497858281518110610470576104706122a4565b602002602001015185838151811061048a5761048a6122a4565b602002602001015161140b565b8282815181106104a9576104a96122a4565b602002602001018190525080806104bf906122d0565b915050610452565b509392505050565b6000546001600160a01b03630100000090910416331461050a5760405162461bcd60e51b8152600401610501906122e9565b60405180910390fd5b60005b815181101561059257610580848284848151811061052d5761052d6122a4565b602002602001015161053f919061231e565b858481518110610551576105516122a4565b60200260200101516000015186858151811061056f5761056f6122a4565b60200260200101516020015161151a565b8061058a816122d0565b91505061050d565b50505050565b60006105a483836117b9565b9392505050565b6000828152602080805260408083206001600160a01b038086168552908352818420825160808101845281549092168252600181015493820193909352600283015463ffffffff1691810191909152600382018054849384936060938593919291838601919061061a90612335565b80601f016020809104026020016040519081016040528092919081815260200182805461064690612335565b80156106935780601f1061066857610100808354040283529160200191610693565b820191906000526020600020905b81548152906001019060200180831161067657829003601f168201915b505050919092525050815160208301516040840151606090940151919b909a50929850965090945050505050565b6000546001600160a01b0363010000009091041633146106f35760405162461bcd60e51b8152600401610501906122e9565b6106fb6117db565b565b6000828152602080805260408083206001600160a01b0385168452909152902060030180546060919061072f90612335565b80601f016020809104026020016040519081016040528092919081815260200182805461075b90612335565b80156107a85780601f1061077d576101008083540402835291602001916107a8565b820191906000526020600020905b81548152906001019060200180831161078b57829003601f168201915b5050505050905092915050565b6000546001600160a01b0363010000009091041633146107e75760405162461bcd60e51b8152600401610501906122e9565b6106fb6000611876565b6000546001600160a01b0363010000009091041633146108235760405162461bcd60e51b8152600401610501906122e9565b61082e8383836118d3565b505050565b60005462010000900460ff161561085c5760405162461bcd60e51b81526004016105019061236f565b8281146108845783838383604051638ceb003d60e01b81526004016105019493929190612399565b3360005b84811015610c07576000602060008686858181106108a8576108a86122a4565b90506020020135815260200190815260200160002060008888858181106108d1576108d16122a4565b90506020020160208101906108e69190612204565b6001600160a01b0390811682526020808301939093526040918201600020825160808101845281549092168252600181015493820193909352600283015463ffffffff169181019190915260038201805491929160608401919061094990612335565b80601f016020809104026020016040519081016040528092919081815260200182805461097590612335565b80156109c25780601f10610997576101008083540402835291602001916109c2565b820191906000526020600020905b8154815290600101906020018083116109a557829003601f168201915b50505050508152505090506109ef838686858181106109e3576109e36122a4565b905060200201356117b9565b610a395782858584818110610a0657610a066122a4565b60405163c522f21160e01b81526001600160a01b0390941660048501526020029190910135602483015250604401610501565b60206000868685818110610a4f57610a4f6122a4565b9050602002013581526020019081526020016000206000888885818110610a7857610a786122a4565b9050602002016020810190610a8d9190612204565b6001600160a01b031681526020810191909152604001600090812080546001600160a01b03191681556001810182905560028101805463ffffffff1916905590610ada6003830182611b46565b5050610b2b858584818110610af157610af16122a4565b90506020020135888885818110610b0a57610b0a6122a4565b9050602002016020810190610b1f9190612204565b83602001516000611965565b7f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b6040518060c00160405280878786818110610b6957610b696122a4565b905060200201358152602001898986818110610b8757610b876122a4565b9050602002016020810190610b9c9190612204565b6001600160a01b0316815260200183600001516001600160a01b0316815260200183602001518152602001836040015163ffffffff1681526020018360600151815250604051610bec919061241b565b60405180910390a15080610bff816122d0565b915050610888565b505050505050565b6000546001600160a01b036301000000909104163314610c415760405162461bcd60e51b8152600401610501906122e9565b6106fb611a56565b60408051608081018252600080825260208201819052918101919091526060808201526105a4838361140b565b60006105a483836113e2565b6000546001600160a01b036301000000909104163314610cb45760405162461bcd60e51b8152600401610501906122e9565b60005b815181101561082e57610d0583838381518110610cd657610cd66122a4565b602002602001015160000151848481518110610cf457610cf46122a4565b6020026020010151602001516118d3565b80610d0f816122d0565b915050610cb7565b6000546001600160a01b036301000000909104163314610d495760405162461bcd60e51b8152600401610501906122e9565b6105928484848461151a565b600054610100900460ff16610d705760005460ff1615610d74565b303b155b610dd75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610501565b600054610100900460ff16158015610df9576000805461ffff19166101011790555b610e0282611876565b8015610e14576000805461ff00191690555b5050565b6060600083516001600160401b03811115610e3557610e35611c61565b604051908082528060200260200182016040528015610e5e578160200160208202803683370190505b50905060005b84518110156104c757610ea9858281518110610e8257610e826122a4565b6020026020010151858381518110610e9c57610e9c6122a4565b60200260200101516113e2565b828281518110610ebb57610ebb6122a4565b602090810291909101015280610ed0816122d0565b915050610e64565b60005462010000900460ff1615610f015760405162461bcd60e51b81526004016105019061236f565b3360005b8281101561059257610f3b82858584818110610f2357610f236122a4565b9050602002810190610f35919061247c565b356117b9565b610f8f5781848483818110610f5257610f526122a4565b9050602002810190610f64919061247c565b60405163c522f21160e01b81526001600160a01b039092166004830152356024820152604401610501565b600060206000868685818110610fa757610fa76122a4565b9050602002810190610fb9919061247c565b6000013581526020019081526020016000206000868685818110610fdf57610fdf6122a4565b9050602002810190610ff1919061247c565b611002906040810190602001612204565b6001600160a01b03166001600160a01b031681526020019081526020016000206001015490506040518060800160405280868685818110611045576110456122a4565b9050602002810190611057919061247c565b611068906060810190604001612204565b6001600160a01b03168152602001868685818110611088576110886122a4565b905060200281019061109a919061247c565b6060013581526020018686858181106110b5576110b56122a4565b90506020028101906110c7919061247c565b6110d89060a08101906080016124b0565b63ffffffff1681526020018686858181106110f5576110f56122a4565b9050602002810190611107919061247c565b6111159060a08101906124cb565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250602092508890508786818110611162576111626122a4565b9050602002810190611174919061247c565b600001358152602001908152602001600020600087878681811061119a5761119a6122a4565b90506020028101906111ac919061247c565b6111bd906040810190602001612204565b6001600160a01b0390811682526020808301939093526040918201600020845181546001600160a01b03191692169190911781558383015160018201559083015160028201805463ffffffff191663ffffffff90921691909117905560608301518051919261123492600385019290910190611b80565b509050506112c385858481811061124d5761124d6122a4565b905060200281019061125f919061247c565b35868685818110611272576112726122a4565b9050602002810190611284919061247c565b611295906040810190602001612204565b838888878181106112a8576112a86122a4565b90506020028101906112ba919061247c565b60600135611965565b7f8c20c3acb6b5208b7affea2fd90dabc8d47e77cee9766c855ce42730505cb2058585848181106112f6576112f66122a4565b9050602002810190611308919061247c565b604051611315919061253a565b60405180910390a15080611328816122d0565b915050610f05565b6000546001600160a01b0363010000009091041633146113625760405162461bcd60e51b8152600401610501906122e9565b6001600160a01b0381166113c75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610501565b6113d081611876565b50565b6001600160a01b03163b151590565b6000918252602080805260408084206001600160a01b0393909316845291905290206001015490565b60408051608081018252600080825260208201819052918101919091526060808201526000838152602080805260408083206001600160a01b03808716855290835292819020815160808101835281549094168452600181015492840192909252600282015463ffffffff169083015260038101805460608401919061149090612335565b80601f01602080910402602001604051908101604052809291908181526020018280546114bc90612335565b80156115095780601f106114de57610100808354040283529160200191611509565b820191906000526020600020905b8154815290600101906020018083116114ec57829003601f168201915b505050505081525050905092915050565b6000546001600160a01b03630100000090910416331461154c5760405162461bcd60e51b8152600401610501906122e9565b6001600160a01b03841660009081526010602052604090205483106115ae576001600160a01b038416600081815260106020526040908190205490516345e388eb60e01b81526004810192909252602482015260448101849052606401610501565b6001600160a01b03841660009081526010602052604081208054859081106115d8576115d86122a4565b600091825260208083206002909202909101546001600160a01b038816835260109091526040822080549193509086908110611616576116166122a4565b906000526020600020906002020160010154905081841415806116395750808314155b1561168557604051637a4dd76560e01b81526001600160a01b03871660048201526024810186905260448101839052606481018290526084810185905260a4810184905260c401610501565b6001600160a01b038616600090815260106020526040902080546116ab9060019061231e565b815481106116bb576116bb6122a4565b906000526020600020906002020160106000886001600160a01b03166001600160a01b0316815260200190815260200160002086815481106116ff576116ff6122a4565b60009182526020808320845460029093020191825560019384015493909101929092556001600160a01b0388168152601090915260409020805480611746576117466125f7565b6000828152602080822060026000199490940193840201828155600101919091559155604080516001600160a01b038916815291820186905281018490527f33cff58e54c3a8acae85cad63487b5dcf617521e33bb03f071299f374c29de1f9060600160405180910390a1505050505050565b6001600160a01b03821660009081526010602052604081206105a49083611ab8565b60005462010000900460ff1661182a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610501565b6000805462ff0000191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60408051808201825283815260208082018481526001600160a01b03871660008181526010845285812080546001808201835591835291859020865160029093020191825592519201919091558351908152908101859052918201839052907fe7d6ac0b740347f7f96a97e6a9dc0f20f4f11eca65495315adc009a55b6762f89060600160405180910390a150505050565b818111306000826119765785611979565b60005b905060008361198957600061198b565b865b90506000846119a35761199e868861231e565b6119ad565b6119ad878761231e565b604051633885984b60e11b81526001600160a01b03868116600483015285811660248301528481166044830152606482018c9052608482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063710b30969060a401600060405180830381600087803b158015611a3357600080fd5b505af1158015611a47573d6000803e3d6000fd5b50505050505050505050505050565b60005462010000900460ff1615611a7f5760405162461bcd60e51b81526004016105019061236f565b6000805462ff00001916620100001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586118593390565b6000805b8354811015611b3c57838181548110611ad757611ad76122a4565b9060005260206000209060020201600001548310158015611b1b5750838181548110611b0557611b056122a4565b9060005260206000209060020201600101548311155b15611b2a5760019150506103d8565b80611b34816122d0565b915050611abc565b5060009392505050565b508054611b5290612335565b6000825580601f10611b62575050565b601f0160209004906000526020600020908101906113d09190611c04565b828054611b8c90612335565b90600052602060002090601f016020900481019282611bae5760008555611bf4565b82601f10611bc757805160ff1916838001178555611bf4565b82800160010185558215611bf4579182015b82811115611bf4578251825591602001919060010190611bd9565b50611c00929150611c04565b5090565b5b80821115611c005760008155600101611c05565b80356001600160a01b0381168114611c3057600080fd5b919050565b60008060408385031215611c4857600080fd5b82359150611c5860208401611c19565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715611c9957611c99611c61565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611cc757611cc7611c61565b604052919050565b60006001600160401b03821115611ce857611ce8611c61565b5060051b60200190565b600082601f830112611d0357600080fd5b81356020611d18611d1383611ccf565b611c9f565b82815260059290921b84018101918181019086841115611d3757600080fd5b8286015b84811015611d525780358352918301918301611d3b565b509695505050505050565b60008060408385031215611d7057600080fd5b82356001600160401b0380821115611d8757600080fd5b611d9386838701611cf2565b9350602091508185013581811115611daa57600080fd5b85019050601f81018613611dbd57600080fd5b8035611dcb611d1382611ccf565b81815260059190911b82018301908381019088831115611dea57600080fd5b928401925b82841015611e0f57611e0084611c19565b82529284019290840190611def565b80955050505050509250929050565b6000815180845260005b81811015611e4457602081850181015186830182015201611e28565b81811115611e56576000602083870101525b50601f01601f19169290920160200192915050565b60018060a01b0381511682526020810151602083015263ffffffff60408201511660408301526000606082015160806060850152611eac6080850182611e1e565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611f0957603f19888603018452611ef7858351611e6b565b94509285019290850190600101611edb565b5092979650505050505050565b600082601f830112611f2757600080fd5b81356020611f37611d1383611ccf565b82815260069290921b84018101918181019086841115611f5657600080fd5b8286015b84811015611d525760408189031215611f735760008081fd5b611f7b611c77565b813581528482013585820152835291830191604001611f5a565b600080600060608486031215611faa57600080fd5b611fb384611c19565b925060208401356001600160401b0380821115611fcf57600080fd5b611fdb87838801611f16565b93506040860135915080821115611ff157600080fd5b50611ffe86828701611cf2565b9150509250925092565b6000806040838503121561201b57600080fd5b61202483611c19565b946020939093013593505050565b60018060a01b038516815283602082015263ffffffff831660408201526080606082015260006120656080830184611e1e565b9695505050505050565b6020815260006105a46020830184611e1e565b60008060006060848603121561209757600080fd5b6120a084611c19565b95602085013595506040909401359392505050565b60008083601f8401126120c757600080fd5b5081356001600160401b038111156120de57600080fd5b6020830191508360208260051b85010111156120f957600080fd5b9250929050565b6000806000806040858703121561211657600080fd5b84356001600160401b038082111561212d57600080fd5b612139888389016120b5565b9096509450602087013591508082111561215257600080fd5b5061215f878288016120b5565b95989497509550505050565b6020815260006105a46020830184611e6b565b6000806040838503121561219157600080fd5b61219a83611c19565b915060208301356001600160401b038111156121b557600080fd5b6121c185828601611f16565b9150509250929050565b600080600080608085870312156121e157600080fd5b6121ea85611c19565b966020860135965060408601359560600135945092505050565b60006020828403121561221657600080fd5b6105a482611c19565b6020808252825182820181905260009190848201906040850190845b818110156122575783518352928401929184019160010161223b565b50909695505050505050565b6000806020838503121561227657600080fd5b82356001600160401b0381111561228c57600080fd5b612298858286016120b5565b90969095509350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016122e2576122e26122ba565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600082821015612330576123306122ba565b500390565b600181811c9082168061234957607f821691505b60208210810361236957634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6040808252810184905260008560608301825b878110156123da576001600160a01b036123c584611c19565b168252602092830192909101906001016123ac565b5083810360208501528481526001600160fb1b038511156123fa57600080fd5b8460051b915081866020830137600091016020019081529695505050505050565b60208152815160208201526000602083015160018060a01b03808216604085015280604086015116606085015250506060830151608083015263ffffffff60808401511660a083015260a083015160c080840152611eac60e0840182611e1e565b6000823560be1983360301811261249257600080fd5b9190910192915050565b803563ffffffff81168114611c3057600080fd5b6000602082840312156124c257600080fd5b6105a48261249c565b6000808335601e198436030181126124e257600080fd5b8301803591506001600160401b038211156124fc57600080fd5b6020019150368190038213156120f957600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815281356020820152600061255360208401611c19565b60018060a01b0380821660408501528061256f60408701611c19565b16606085015250506060830135608083015263ffffffff6125926080850161249c565b1660a083015260a0830135601e198436030181126125af57600080fd5b83016020810190356001600160401b038111156125cb57600080fd5b8036038213156125da57600080fd5b60c0808501526125ee60e085018284612511565b95945050505050565b634e487b7160e01b600052603160045260246000fdfea26469706673582212208c8ee55074d6fbc4f64c05512852a1590038e3eed679507bebd8242c2dff3f4564736f6c634300080e0033", + "numDeployments": 4, + "solcInputHash": "6edb98fea2bf424a369954d0e80655f6", + "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\":[],\"name\":\"ArgsLengthDoesNotMatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"}],\"name\":\"AttesterNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"attributeIndex\",\"type\":\"uint8\"}],\"name\":\"AttributeAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"attributeIndex\",\"type\":\"uint8\"}],\"name\":\"AttributeDoesNotExist\",\"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\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"name\":\"IndexOutOfBounds\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"}],\"name\":\"IssuerNotAuthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"}],\"name\":\"OwnersAndCollectionIdsLengthMismatch\",\"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\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"value\",\"type\":\"uint8\"}],\"name\":\"ValueOutOfBounds\",\"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\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"attributeIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"attributeValue\",\"type\":\"uint8\"}],\"name\":\"AttestationsCollectionAttributeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"attributeIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"deletedAttributeName\",\"type\":\"bytes32\"}],\"name\":\"AttributeDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"attributeIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"newAttributeName\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"previousAttributeName\",\"type\":\"bytes32\"}],\"name\":\"AttributeNameUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\":false,\"internalType\":\"uint8\",\"name\":\"attributeIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"attributeName\",\"type\":\"bytes32\"}],\"name\":\"NewAttributeCreated\",\"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\":[],\"name\":\"IMPLEMENTATION_VERSION\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"name\":\"attestationsCollectionHasAttribute\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"uint8[]\",\"name\":\"indices\",\"type\":\"uint8[]\"}],\"name\":\"attestationsCollectionHasAttributes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":[{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"createNewAttribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8[]\",\"name\":\"indices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"names\",\"type\":\"bytes32[]\"}],\"name\":\"createNewAttributes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"}],\"name\":\"deleteAttestations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"name\":\"deleteAttribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8[]\",\"name\":\"indices\",\"type\":\"uint8[]\"}],\"name\":\"deleteAttributes\",\"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\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"name\":\"getAttributeValueForAttestationsCollection\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"}],\"name\":\"getAttributesNamesAndValuesForAttestationsCollection\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint8[]\",\"name\":\"\",\"type\":\"uint8[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"uint8[]\",\"name\":\"indices\",\"type\":\"uint8[]\"}],\"name\":\"getAttributesValuesForAttestationsCollection\",\"outputs\":[{\"internalType\":\"uint8[]\",\"name\":\"\",\"type\":\"uint8[]\"}],\"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\":\"ownerAddress\",\"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\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"value\",\"type\":\"uint8\"}],\"name\":\"setAttributeValueForAttestationsCollection\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint8[]\",\"name\":\"indices\",\"type\":\"uint8[]\"},{\"internalType\":\"uint8[]\",\"name\":\"values\",\"type\":\"uint8[]\"}],\"name\":\"setAttributesValuesForAttestationsCollections\",\"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\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"newName\",\"type\":\"bytes32\"}],\"name\":\"updateAttributeName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8[]\",\"name\":\"indices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"newNames\",\"type\":\"bytes32[]\"}],\"name\":\"updateAttributesName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"attestationsCollectionHasAttribute(uint256,uint8)\":{\"details\":\"Returns whether an attestationsCollection has a specific attribute referenced by its index\",\"params\":{\"collectionId\":\"Collection Id of the targeted attestationsCollection\",\"index\":\"Index of the attribute. Can go from 0 to 63.\"}},\"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\"}},\"createNewAttribute(uint8,bytes32)\":{\"details\":\"Create a new attribute.\",\"params\":{\"index\":\"Index of the attribute. Can go from 0 to 63.\",\"name\":\"Name in bytes32 of the attribute\"}},\"deleteAttestations(address[],uint256[])\":{\"details\":\"Delete function to be called by authorized issuers\",\"params\":{\"collectionIds\":\"The collection ids of the attestations to be deleted\",\"owners\":\"The owners of the attestations to be deleted\"}},\"deleteAttribute(uint8)\":{\"details\":\"Delete an existing attribute\",\"params\":{\"index\":\"Index of the attribute. Can go from 0 to 63. The attribute must already exist\"}},\"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\"}},\"getAttributeValueForAttestationsCollection(uint256,uint8)\":{\"details\":\"Returns the attribute's value (from 0 to 15) of an attestationsCollection\",\"params\":{\"collectionId\":\"Collection Id of the targeted attestationsCollection\",\"index\":\"Index of the attribute. Can go from 0 to 63.\"}},\"getAttributesNamesAndValuesForAttestationsCollection(uint256)\":{\"details\":\"Returns all the enabled attributes names and their values for a specific attestationsCollection\",\"params\":{\"collectionId\":\"Collection Id of the targeted attestationsCollection\"}},\"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\":{\"ownerAddress\":\"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.\"},\"setAttributeValueForAttestationsCollection(uint256,uint8,uint8)\":{\"details\":\"Set a value for an attribute of an attestationsCollection. The attribute should already be created.\",\"params\":{\"collectionId\":\"Collection Id of the targeted attestationsCollection\",\"index\":\"Index of the attribute (must be between 0 and 63)\",\"value\":\"Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15\"}},\"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\"},\"updateAttributeName(uint8,bytes32)\":{\"details\":\"Update the name of an existing attribute\",\"params\":{\"index\":\"Index of the attribute. Can go from 0 to 63. The attribute must exist\",\"newName\":\"new name in bytes32 of the attribute\"}}},\"title\":\"Attestations Registry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"initialize(address)\":{\"notice\":\"The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\"}},\"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 uint8 public constant IMPLEMENTATION_VERSION = 3;\\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 BADGES = IBadges(badgesAddress);\\n initialize(owner);\\n }\\n\\n /**\\n * @dev Initialize function, to be called by the proxy delegating calls to this implementation\\n * @param ownerAddress Owner of the contract, has the right to authorize/unauthorize attestations issuers\\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\n */\\n function initialize(address ownerAddress) public reinitializer(IMPLEMENTATION_VERSION) {\\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\\n if (owner() == address(0) || address(this).code.length == 0) {\\n _transferOwnership(ownerAddress);\\n }\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(\\n address[] calldata owners,\\n uint256[] calldata collectionIds\\n ) external override whenNotPaused {\\n if (owners.length != collectionIds.length)\\n revert OwnersAndCollectionIdsLengthMismatch(owners, collectionIds);\\n\\n address issuer = _msgSender();\\n for (uint256 i = 0; i < owners.length; i++) {\\n AttestationData memory attestationData = _attestationsData[collectionIds[i]][owners[i]];\\n\\n if (!_isAuthorized(issuer, collectionIds[i]))\\n revert IssuerNotAuthorized(issuer, collectionIds[i]);\\n delete _attestationsData[collectionIds[i]][owners[i]];\\n\\n _triggerBadgeTransferEvent(collectionIds[i], owners[i], attestationData.value, 0);\\n\\n emit AttestationDeleted(\\n Attestation(\\n collectionIds[i],\\n owners[i],\\n attestationData.issuer,\\n attestationData.value,\\n attestationData.timestamp,\\n attestationData.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(\\n uint256 collectionId,\\n address owner\\n ) external view override returns (bool) {\\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(\\n uint256 collectionId,\\n address owner\\n ) external view override returns (AttestationData memory) {\\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(\\n uint256 collectionId,\\n address owner\\n ) external view override returns (uint256) {\\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(\\n uint256 collectionId,\\n address owner\\n ) external view override returns (address, uint256, uint32, bytes memory) {\\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(\\n uint256 collectionId,\\n address owner\\n ) external view override returns (bytes memory) {\\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(\\n uint256 collectionId,\\n address owner\\n ) external view override returns (address) {\\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(\\n uint256 collectionId,\\n address owner\\n ) external view override returns (uint32) {\\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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view override returns (AttestationData[] memory) {\\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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view override returns (uint256[] memory) {\\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(\\n uint256 collectionId,\\n address owner\\n ) internal view returns (AttestationData memory) {\\n return (_attestationsData[collectionId][owner]);\\n }\\n\\n function _getAttestationValue(\\n uint256 collectionId,\\n address owner\\n ) internal view returns (uint256) {\\n return _attestationsData[collectionId][owner].value;\\n }\\n}\\n\",\"keccak256\":\"0xc21afe30d8096d2bab3683ca28b2533f99f53fa20a1f2c13aa44f1d46ecb9ae6\",\"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';\\nimport {IAttestationsRegistryConfigLogic} from './IAttestationsRegistryConfigLogic.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry is IAttestationsRegistryConfigLogic {\\n error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view returns (address, uint256, uint32, bytes memory);\\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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view 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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0x0c3af349bcfa545c959f4d9f25aacb73e3ef1ca7cfe62a2eda4a743a6835904f\",\"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 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 error AttributeDoesNotExist(uint8 attributeIndex);\\n error AttributeAlreadyExists(uint8 attributeIndex);\\n error ArgsLengthDoesNotMatch();\\n\\n event NewAttributeCreated(uint8 attributeIndex, bytes32 attributeName);\\n event AttributeNameUpdated(\\n uint8 attributeIndex,\\n bytes32 newAttributeName,\\n bytes32 previousAttributeName\\n );\\n event AttributeDeleted(uint8 attributeIndex, bytes32 deletedAttributeName);\\n\\n event AttestationsCollectionAttributeSet(\\n uint256 collectionId,\\n uint8 attributeIndex,\\n uint8 attributeValue\\n );\\n\\n event IssuerAuthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n event IssuerUnauthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n\\n /**\\n * @dev Returns whether an attestationsCollection has a specific attribute referenced by its index\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute. Can go from 0 to 63.\\n */\\n function attestationsCollectionHasAttribute(\\n uint256 collectionId,\\n uint8 index\\n ) external view returns (bool);\\n\\n function attestationsCollectionHasAttributes(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (bool);\\n\\n /**\\n * @dev Returns the attribute's value (from 1 to 15) of an attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param attributeIndex Index of the attribute. Can go from 0 to 63.\\n */\\n function getAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 attributeIndex\\n ) external view returns (uint8);\\n\\n function getAttributesValuesForAttestationsCollection(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (uint8[] memory);\\n\\n /**\\n * @dev Set a value for an attribute of an attestationsCollection. The attribute should already be created.\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute (must be between 0 and 63)\\n * @param value Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15\\n */\\n function setAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 index,\\n uint8 value\\n ) external;\\n\\n function setAttributesValuesForAttestationsCollections(\\n uint256[] memory collectionIds,\\n uint8[] memory indices,\\n uint8[] memory values\\n ) external;\\n\\n /**\\n * @dev Returns all the enabled attributes names and their values for a specific attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n */\\n function getAttributesNamesAndValuesForAttestationsCollection(\\n uint256 collectionId\\n ) external view returns (bytes32[] memory, uint8[] memory);\\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 /**\\n * @dev Create a new attribute.\\n * @param index Index of the attribute. Can go from 0 to 63.\\n * @param name Name in bytes32 of the attribute\\n */\\n function createNewAttribute(uint8 index, bytes32 name) external;\\n\\n function createNewAttributes(uint8[] memory indices, bytes32[] memory names) external;\\n\\n /**\\n * @dev Update the name of an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n * @param newName new name in bytes32 of the attribute\\n */\\n function updateAttributeName(uint8 index, bytes32 newName) external;\\n\\n function updateAttributesName(uint8[] memory indices, bytes32[] memory names) external;\\n\\n /**\\n * @dev Delete an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n */\\n function deleteAttribute(uint8 index) external;\\n\\n function deleteAttributes(uint8[] memory indices) external;\\n}\\n\",\"keccak256\":\"0x07a1a9e8d2caf1d810ba8fb760a35ce2a0ef60a76814d44881a5aa56162ce26b\",\"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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\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 /**\\n * @dev Getter of the badge issuer\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeIssuer(address account, uint256 id) external view returns (address);\\n\\n /**\\n * @dev Getter of the badge timestamp\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeTimestamp(address account, uint256 id) external view returns (uint32);\\n\\n /**\\n * @dev Getter of the badge extra data (it can store nullifier and burnCount)\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeExtraData(address account, uint256 id) external view returns (bytes memory);\\n\\n /**\\n * @dev Getter of the value of a specific badge attribute\\n * @param id Badge Id to check (= attestationCollectionId)\\n * @param index Index of the attribute\\n */\\n function getAttributeValueForBadge(uint256 id, uint8 index) external view returns (uint8);\\n\\n /**\\n * @dev Getter of all badge attributes and their values for a specific badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getAttributesNamesAndValuesForBadge(\\n uint256 id\\n ) external view returns (bytes32[] memory, uint8[] memory);\\n}\\n\",\"keccak256\":\"0xd6bdfc887ef15ee022eb05d89dbe2e2938ee6c0a55a55f8db527ef650242c6bb\",\"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';\\nimport {Bitmap256Bit} from '../utils/Bitmap256Bit.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 using Bitmap256Bit for uint256;\\n using Bitmap256Bit for uint8;\\n\\n /******************************************\\n *\\n * ATTESTATION REGISTRY WRITE ACCESS MANAGEMENT (ISSUERS)\\n *\\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 /**\\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 *\\n * ATTRIBUTES CONFIG LOGIC\\n *\\n *****************************************/\\n\\n /**\\n * @dev Create a new attribute.\\n * @param index Index of the attribute. Can go from 0 to 63.\\n * @param name Name in bytes32 of the attribute\\n */\\n function createNewAttribute(uint8 index, bytes32 name) public onlyOwner {\\n index._checkIndexIsValid();\\n if (_isAttributeCreated(index)) {\\n revert AttributeAlreadyExists(index);\\n }\\n _createNewAttribute(index, name);\\n }\\n\\n function createNewAttributes(uint8[] memory indices, bytes32[] memory names) external onlyOwner {\\n if (indices.length != names.length) {\\n revert ArgsLengthDoesNotMatch();\\n }\\n\\n for (uint256 i = 0; i < indices.length; i++) {\\n createNewAttribute(indices[i], names[i]);\\n }\\n }\\n\\n /**\\n * @dev Update the name of an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n * @param newName new name in bytes32 of the attribute\\n */\\n function updateAttributeName(uint8 index, bytes32 newName) public onlyOwner {\\n index._checkIndexIsValid();\\n if (!_isAttributeCreated(index)) {\\n revert AttributeDoesNotExist(index);\\n }\\n _updateAttributeName(index, newName);\\n }\\n\\n function updateAttributesName(\\n uint8[] memory indices,\\n bytes32[] memory newNames\\n ) external onlyOwner {\\n if (indices.length != newNames.length) {\\n revert ArgsLengthDoesNotMatch();\\n }\\n\\n for (uint256 i = 0; i < indices.length; i++) {\\n updateAttributeName(indices[i], newNames[i]);\\n }\\n }\\n\\n /**\\n * @dev Delete an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must already exist\\n */\\n function deleteAttribute(uint8 index) public onlyOwner {\\n index._checkIndexIsValid();\\n if (!_isAttributeCreated(index)) {\\n revert AttributeDoesNotExist(index);\\n }\\n _deleteAttribute(index);\\n }\\n\\n function deleteAttributes(uint8[] memory indices) external onlyOwner {\\n for (uint256 i = 0; i < indices.length; i++) {\\n deleteAttribute(indices[i]);\\n }\\n }\\n\\n /**\\n * @dev Set a value for an attribute of an attestationsCollection. The attribute should already be created.\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute (must be between 0 and 63)\\n * @param value Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15\\n */\\n function setAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 index,\\n uint8 value\\n ) public onlyOwner {\\n index._checkIndexIsValid();\\n\\n if (!_isAttributeCreated(index)) {\\n revert AttributeDoesNotExist(index);\\n }\\n\\n _setAttributeForAttestationsCollection(collectionId, index, value);\\n }\\n\\n function setAttributesValuesForAttestationsCollections(\\n uint256[] memory collectionIds,\\n uint8[] memory indices,\\n uint8[] memory values\\n ) external onlyOwner {\\n if (collectionIds.length != indices.length || collectionIds.length != values.length) {\\n revert ArgsLengthDoesNotMatch();\\n }\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n setAttributeValueForAttestationsCollection(collectionIds[i], indices[i], values[i]);\\n }\\n }\\n\\n /**\\n * @dev Returns the attribute's value (from 0 to 15) of an attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute. Can go from 0 to 63.\\n */\\n function getAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 index\\n ) public view returns (uint8) {\\n uint256 currentAttributesValues = _getAttributesValuesBitmapForAttestationsCollection(\\n collectionId\\n );\\n return currentAttributesValues._get(index);\\n }\\n\\n function getAttributesValuesForAttestationsCollection(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (uint8[] memory) {\\n uint8[] memory attributesValues = new uint8[](indices.length);\\n for (uint256 i = 0; i < indices.length; i++) {\\n attributesValues[i] = getAttributeValueForAttestationsCollection(collectionId, indices[i]);\\n }\\n return attributesValues;\\n }\\n\\n /**\\n * @dev Returns whether an attestationsCollection has a specific attribute referenced by its index\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute. Can go from 0 to 63.\\n */\\n function attestationsCollectionHasAttribute(\\n uint256 collectionId,\\n uint8 index\\n ) public view returns (bool) {\\n uint256 currentAttributeValues = _getAttributesValuesBitmapForAttestationsCollection(\\n collectionId\\n );\\n return currentAttributeValues._get(index) > 0;\\n }\\n\\n function attestationsCollectionHasAttributes(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (bool) {\\n for (uint256 i = 0; i < indices.length; i++) {\\n if (!attestationsCollectionHasAttribute(collectionId, indices[i])) {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /**\\n * @dev Returns all the enabled attributes names and their values for a specific attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n */\\n function getAttributesNamesAndValuesForAttestationsCollection(\\n uint256 collectionId\\n ) public view returns (bytes32[] memory, uint8[] memory) {\\n uint256 currentAttributesValues = _getAttributesValuesBitmapForAttestationsCollection(\\n collectionId\\n );\\n\\n (\\n uint8[] memory indices,\\n uint8[] memory values,\\n uint8 nbOfNonZeroValues\\n ) = currentAttributesValues._getAllNonZeroValues();\\n\\n bytes32[] memory attributesNames = new bytes32[](nbOfNonZeroValues);\\n uint8[] memory attributesValues = new uint8[](nbOfNonZeroValues);\\n for (uint8 i = 0; i < nbOfNonZeroValues; i++) {\\n attributesNames[i] = _attributesNames[indices[i]];\\n attributesValues[i] = values[i];\\n }\\n\\n return (attributesNames, attributesValues);\\n }\\n\\n /*****************************\\n *\\n * INTERNAL FUNCTIONS\\n *\\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 function _isAuthorized(address issuer, uint256 collectionId) internal view returns (bool) {\\n return _authorizedRanges[issuer]._includes(collectionId);\\n }\\n\\n function _setAttributeForAttestationsCollection(\\n uint256 collectionId,\\n uint8 index,\\n uint8 value\\n ) internal {\\n uint256 currentAttributes = _getAttributesValuesBitmapForAttestationsCollection(collectionId);\\n\\n _attestationsCollectionAttributesValuesBitmap[collectionId] = currentAttributes._set(\\n index,\\n value\\n );\\n\\n emit AttestationsCollectionAttributeSet(collectionId, index, value);\\n }\\n\\n function _createNewAttribute(uint8 index, bytes32 name) internal {\\n _attributesNames[index] = name;\\n\\n emit NewAttributeCreated(index, name);\\n }\\n\\n function _updateAttributeName(uint8 index, bytes32 newName) internal {\\n bytes32 previousName = _attributesNames[index];\\n\\n _attributesNames[index] = newName;\\n\\n emit AttributeNameUpdated(index, newName, previousName);\\n }\\n\\n function _deleteAttribute(uint8 index) internal {\\n bytes32 deletedName = _attributesNames[index];\\n\\n delete _attributesNames[index];\\n\\n emit AttributeDeleted(index, deletedName);\\n }\\n\\n function _getAttributesValuesBitmapForAttestationsCollection(\\n uint256 collectionId\\n ) internal view returns (uint256) {\\n return _attestationsCollectionAttributesValuesBitmap[collectionId];\\n }\\n\\n function _isAttributeCreated(uint8 index) internal view returns (bool) {\\n if (_attributesNames[index] == 0) {\\n return false;\\n }\\n return true;\\n }\\n}\\n\",\"keccak256\":\"0xa48b3131a3870684389282cb863a34734c67194d7f50d266ed8421114b3d786a\",\"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 /*******************************************************\\n Storage layout:\\n 19 slots for config\\n 4 currently used for _initialized, _initializing, _paused, _owner\\n 15 place holders\\n 16 slots for logic\\n 3 currently used for _authorizedRanges, _attestationsCollectionAttributesValuesBitmap, _attributesNames\\n 13 place holders\\n 1 slot for _attestationsData \\n *******************************************************/\\n\\n // main config\\n // changed `_initialized` from bool to uint8\\n // as we were using OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\\n // and changed to OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n // PR: https://github.com/sismo-core/sismo-protocol/pull/41\\n uint8 internal _initialized;\\n bool internal _initializing;\\n bool internal _paused;\\n address internal _owner;\\n // keeping some space for future\\n uint256[15] private _placeHoldersAdmin;\\n\\n // storing the authorized ranges for each attesters\\n mapping(address => Range[]) internal _authorizedRanges;\\n // Storing the attributes values used for each attestations collection\\n // Each attribute value is an hexadecimal\\n mapping(uint256 => uint256) internal _attestationsCollectionAttributesValuesBitmap;\\n // Storing the attribute name for each attributes index\\n mapping(uint8 => bytes32) internal _attributesNames;\\n // keeping some space for future\\n uint256[13] private _placeHoldersConfig;\\n // storing the data of attestations\\n // =collectionId=> =owner=> attestationData\\n mapping(uint256 => mapping(address => AttestationData)) internal _attestationsData;\\n}\\n\",\"keccak256\":\"0xabd7a629901a128cc32f80102ce06db228a76bd04f27818ccaf54827921eb149\",\"license\":\"MIT\"},\"contracts/core/libs/attestations-registry/InitializableLogic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) ||\\n (!Address.isContract(address(this)) && _initialized == 1),\\n 'Initializable: contract is already initialized'\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(\\n !_initializing && _initialized < version,\\n 'Initializable: contract is already initialized'\\n );\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, 'Initializable: contract is not initializing');\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, 'Initializable: contract is initializing');\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x64d931c5e29318bd4ae2ec44b3be45783ad7ad20431594bbcb9ae4e2014bc5ef\",\"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(\\n address target,\\n bytes memory data\\n ) 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\":\"0xdbca640e165333604a6121b07d206eea2b596dd3c3bb4d62caa436a05ac1d91d\",\"license\":\"MIT\"},\"contracts/core/libs/utils/Bitmap256Bit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/*\\n * The 256-bit bitmap is structured in 64 chuncks of 4 bits each.\\n * The 4 bits can encode any value from 0 to 15.\\n\\n chunck63 chunck2 chunck1 chunck0\\n bits bits bits bits \\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510 \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u252c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u252c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 1 1 1 1 \\u2502 .... \\u2502 1 0 1 1 \\u2502 0 0 0 0 \\u2502 0 0 0 1 \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518 \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2534\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2534\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n value 15 value 11 value 0 value 1\\n\\n * A chunck index must be between 0 and 63.\\n * A value must be between 0 and 15.\\n **/\\n\\nlibrary Bitmap256Bit {\\n uint256 constant MAX_INT = 2 ** 256 - 1;\\n\\n error IndexOutOfBounds(uint8 index);\\n error ValueOutOfBounds(uint8 value);\\n\\n /**\\n * @dev Return the value at a given index of a 256-bit bitmap\\n * @param index index where the value can be found. Can be between 0 and 63\\n */\\n function _get(uint256 self, uint8 index) internal pure returns (uint8) {\\n uint256 currentValues = self;\\n // Get the encoded 4-bit value by right shifting to the `index` position\\n uint256 shifted = currentValues >> (4 * index);\\n // Get the value by only masking the last 4 bits with an AND operator\\n return uint8(shifted & (2 ** 4 - 1));\\n }\\n\\n /**\\n * @dev Set a value at a chosen index in a 256-bit bitmap\\n * @param index index where the value will be stored. Can be between 0 and 63\\n * @param value value to store. Can be between 0 and 15\\n */\\n function _set(uint256 self, uint8 index, uint8 value) internal pure returns (uint256) {\\n _checkIndexIsValid(index);\\n _checkValueIsValid(value);\\n\\n uint256 currentValues = self;\\n // 1. first we need to remove the current value for the inputed `index`\\n // Left Shift 4 bits mask (1111 mask) to the `index` position\\n uint256 mask = (2 ** 4 - 1) << (4 * index);\\n // Apply a XOR operation to obtain a mask with all bits set to 1 except the 4 bits that we want to remove\\n uint256 negativeMask = MAX_INT ^ mask;\\n // Apply a AND operation between the current values and the negative mask to remove the wanted bits\\n uint256 newValues = currentValues & negativeMask;\\n\\n // 2. We set the new value wanted at the `index` position\\n // Create the 4 bits encoding the new value and left shift them to the `index` position\\n uint256 newValueMask = uint256(value) << (4 * index);\\n // Apply an OR operation between the current values and the newValueMask to reference new value\\n return newValues | newValueMask;\\n }\\n\\n /**\\n * @dev Get all the non-zero values in a 256-bit bitmap\\n * @param self a 256-bit bitmap\\n */\\n function _getAllNonZeroValues(\\n uint256 self\\n ) internal pure returns (uint8[] memory, uint8[] memory, uint8) {\\n uint8[] memory indices = new uint8[](64);\\n uint8[] memory values = new uint8[](64);\\n uint8 nbOfNonZeroValues = 0;\\n for (uint8 i = 0; i < 63; i++) {\\n uint8 value = _get(self, i);\\n if (value > 0) {\\n indices[nbOfNonZeroValues] = i;\\n values[nbOfNonZeroValues] = value;\\n nbOfNonZeroValues++;\\n }\\n }\\n return (indices, values, nbOfNonZeroValues);\\n }\\n\\n /**\\n * @dev Check if the index is valid (is between 0 and 63)\\n * @param index index of a chunck\\n */\\n function _checkIndexIsValid(uint8 index) internal pure {\\n if (index > 63) {\\n revert IndexOutOfBounds(index);\\n }\\n }\\n\\n /**\\n * @dev Check if the value is valid (is between 0 and 15)\\n * @param value value to encode in a chunck\\n */\\n function _checkValueIsValid(uint8 value) internal pure {\\n if (value > 15) {\\n revert ValueOutOfBounds(value);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xac6ca38e106fb9e999b0c765dba0f8894697c3aead9459ffeab6b32e3560b39e\",\"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": "0x60a06040523480156200001157600080fd5b506040516200393538038062003935833981016040819052620000349162000209565b6200003f336200006b565b6000805462ff0000191690556001600160a01b0381166080526200006382620000c8565b505062000241565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054600390610100900460ff16158015620000eb575060005460ff8083169116105b620001535760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805461ffff191660ff83161761010017815562000181600054630100000090046001600160a01b031690565b6001600160a01b03161480620001965750303b155b15620001a757620001a7826200006b565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b80516001600160a01b03811681146200020457600080fd5b919050565b600080604083850312156200021d57600080fd5b6200022883620001ec565b91506200023860208401620001ec565b90509250929050565b6080516136d86200025d600039600061258301526136d86000f3fe608060405234801561001057600080fd5b50600436106102275760003560e01c80637ffe93fc11610130578063b8865673116100b8578063dc873d011161007c578063dc873d0114610566578063e78d54bb14610586578063e972f91014610599578063ebc5c093146105ac578063f2fde38b146105bf57600080fd5b8063b8865673146104e5578063c06d5db6146104f8578063c4d66de81461050b578063c7da9aa61461051e578063da5d314b1461055357600080fd5b806384c2ad82116100ff57806384c2ad821461044d5780638c3c9e321461046d5780638da5cb5b1461048e578063aad9a979146104bf578063b1cb1662146104d257600080fd5b80637ffe93fc1461040c578063811a6af71461041f57806381213f22146104325780638456cb591461044557600080fd5b8063436a76f3116101b35780636d7fbb67116101825780636d7fbb67146103a4578063715018a6146103c4578063754b377c146103cc5780637cc920b4146103e65780637cde0fe2146103f957600080fd5b8063436a76f31461033f5780635657f0361461035f5780635c975abb1461038057806364fff83c1461039157600080fd5b80631538ff08116101fa5780631538ff08146102db578063181dfdff146102ee5780632972b0f0146103015780633be1ced7146103145780633f4ba83a1461033757600080fd5b8063011023901461022c57806305b374211461025457806314067f8b1461026957806315027bda146102bb575b600080fd5b61023f61023a366004612932565b6105d2565b60405190151581526020015b60405180910390f35b61026761026236600461296f565b6105e9565b005b6102a6610277366004612932565b6000918252602080805260408084206001600160a01b0393909316845291905290206002015463ffffffff1690565b60405163ffffffff909116815260200161024b565b6102ce6102c9366004612a95565b610669565b60405161024b9190612be4565b6102676102e9366004612ca8565b61075a565b6102676102fc366004612dd2565b61080d565b61023f61030f366004612e45565b6108cd565b610327610322366004612932565b6108e0565b60405161024b9493929190612e61565b6102676109f6565b61035261034d366004612e9e565b610a32565b60405161024b9190612f22565b61037261036d366004612f35565b610ae0565b60405161024b929190612f4e565b60005462010000900460ff1661023f565b61026761039f366004612f9b565b610c65565b6103b76103b2366004612932565b610cd7565b60405161024b9190612fcf565b610267610d8f565b6103d4600381565b60405160ff909116815260200161024b565b6102676103f4366004612fe2565b610dcb565b61026761040736600461305f565b610ea2565b61026761041a366004613092565b610edf565b61026761042d3660046130f8565b610f54565b61023f610440366004612e9e565b611330565b61026761138a565b61046061045b366004612932565b6113c4565b60405161024b9190613163565b61048061047b366004612932565b6113f1565b60405190815260200161024b565b6104a7600054630100000090046001600160a01b031690565b6040516001600160a01b03909116815260200161024b565b6102676104cd36600461296f565b6113fd565b6102676104e0366004612ca8565b611471565b6102676104f3366004613176565b61151f565b6102676105063660046131b9565b6115b4565b6102676105193660046131f2565b6115f2565b6104a761052c366004612932565b6000918252602080805260408084206001600160a01b039384168552909152909120541690565b61023f61056136600461320d565b61170c565b610579610574366004612a95565b611733565b60405161024b9190613230565b610267610594366004613274565b6117f3565b6103d46105a736600461320d565b611867565b6102676105ba3660046132b0565b611888565b6102676105cd3660046131f2565b611ce0565b60006105de8383611d80565b151590505b92915050565b6000546001600160a01b0363010000009091041633146106245760405162461bcd60e51b815260040161061b906132f1565b60405180910390fd5b6106308260ff16611da9565b61063982611dd3565b61065b5760405163eabeadd360e01b815260ff8316600482015260240161061b565b6106658282611dfc565b5050565b6060600083516001600160401b0381111561068657610686612999565b6040519080825280602002602001820160405280156106d757816020015b60408051608081018252600080825260208083018290529282015260608082015282526000199092019101816106a45790505b50905060005b8451811015610752576107228582815181106106fb576106fb613326565b602002602001015185838151811061071557610715613326565b6020026020010151611e5c565b82828151811061073457610734613326565b6020026020010181905250808061074a90613352565b9150506106dd565b509392505050565b6000546001600160a01b03630100000090910416331461078c5760405162461bcd60e51b815260040161061b906132f1565b80518251146107ae57604051636e37235160e11b815260040160405180910390fd5b60005b8251811015610808576107f68382815181106107cf576107cf613326565b60200260200101518383815181106107e9576107e9613326565b60200260200101516105e9565b8061080081613352565b9150506107b1565b505050565b6000546001600160a01b03630100000090910416331461083f5760405162461bcd60e51b815260040161061b906132f1565b60005b81518110156108c7576108b5848284848151811061086257610862613326565b6020026020010151610874919061336b565b85848151811061088657610886613326565b6020026020010151600001518685815181106108a4576108a4613326565b602002602001015160200151611f6b565b806108bf81613352565b915050610842565b50505050565b60006108d9838361220a565b9392505050565b6000828152602080805260408083206001600160a01b038086168552908352818420825160808101845281549092168252600181015493820193909352600283015463ffffffff1691810191909152600382018054849384936060938593919291838601919061094f90613382565b80601f016020809104026020016040519081016040528092919081815260200182805461097b90613382565b80156109c85780601f1061099d576101008083540402835291602001916109c8565b820191906000526020600020905b8154815290600101906020018083116109ab57829003601f168201915b505050919092525050815160208301516040840151606090940151919b909a50929850965090945050505050565b6000546001600160a01b036301000000909104163314610a285760405162461bcd60e51b815260040161061b906132f1565b610a3061222c565b565b6060600082516001600160401b03811115610a4f57610a4f612999565b604051908082528060200260200182016040528015610a78578160200160208202803683370190505b50905060005b835181101561075257610aaa85858381518110610a9d57610a9d613326565b6020026020010151611867565b828281518110610abc57610abc613326565b60ff9092166020928302919091019091015280610ad881613352565b915050610a7e565b6000818152601160205260408120546060918291908080610b00846122c7565b92509250925060008160ff166001600160401b03811115610b2357610b23612999565b604051908082528060200260200182016040528015610b4c578160200160208202803683370190505b50905060008260ff166001600160401b03811115610b6c57610b6c612999565b604051908082528060200260200182016040528015610b95578160200160208202803683370190505b50905060005b8360ff168160ff161015610c565760126000878360ff1681518110610bc257610bc2613326565b602002602001015160ff1660ff16815260200190815260200160002054838260ff1681518110610bf457610bf4613326565b602002602001018181525050848160ff1681518110610c1557610c15613326565b6020026020010151828260ff1681518110610c3257610c32613326565b60ff9092166020928302919091019091015280610c4e816133bc565b915050610b9b565b50909890975095505050505050565b6000546001600160a01b036301000000909104163314610c975760405162461bcd60e51b815260040161061b906132f1565b60005b815181101561066557610cc5828281518110610cb857610cb8613326565b6020026020010151610edf565b80610ccf81613352565b915050610c9a565b6000828152602080805260408083206001600160a01b03851684529091529020600301805460609190610d0990613382565b80601f0160208091040260200160405190810160405280929190818152602001828054610d3590613382565b8015610d825780601f10610d5757610100808354040283529160200191610d82565b820191906000526020600020905b815481529060010190602001808311610d6557829003601f168201915b5050505050905092915050565b6000546001600160a01b036301000000909104163314610dc15760405162461bcd60e51b815260040161061b906132f1565b610a3060006123bc565b6000546001600160a01b036301000000909104163314610dfd5760405162461bcd60e51b815260040161061b906132f1565b81518351141580610e1057508051835114155b15610e2e57604051636e37235160e11b815260040160405180910390fd5b60005b83518110156108c757610e90848281518110610e4f57610e4f613326565b6020026020010151848381518110610e6957610e69613326565b6020026020010151848481518110610e8357610e83613326565b60200260200101516117f3565b80610e9a81613352565b915050610e31565b6000546001600160a01b036301000000909104163314610ed45760405162461bcd60e51b815260040161061b906132f1565b610808838383612419565b6000546001600160a01b036301000000909104163314610f115760405162461bcd60e51b815260040161061b906132f1565b610f1d8160ff16611da9565b610f2681611dd3565b610f485760405163eabeadd360e01b815260ff8216600482015260240161061b565b610f51816124ac565b50565b60005462010000900460ff1615610f7d5760405162461bcd60e51b815260040161061b906133db565b828114610fa55783838383604051638ceb003d60e01b815260040161061b9493929190613405565b3360005b8481101561132857600060206000868685818110610fc957610fc9613326565b9050602002013581526020019081526020016000206000888885818110610ff257610ff2613326565b905060200201602081019061100791906131f2565b6001600160a01b0390811682526020808301939093526040918201600020825160808101845281549092168252600181015493820193909352600283015463ffffffff169181019190915260038201805491929160608401919061106a90613382565b80601f016020809104026020016040519081016040528092919081815260200182805461109690613382565b80156110e35780601f106110b8576101008083540402835291602001916110e3565b820191906000526020600020905b8154815290600101906020018083116110c657829003601f168201915b50505050508152505090506111108386868581811061110457611104613326565b9050602002013561220a565b61115a578285858481811061112757611127613326565b60405163c522f21160e01b81526001600160a01b039094166004850152602002919091013560248301525060440161061b565b6020600086868581811061117057611170613326565b905060200201358152602001908152602001600020600088888581811061119957611199613326565b90506020020160208101906111ae91906131f2565b6001600160a01b031681526020810191909152604001600090812080546001600160a01b03191681556001810182905560028101805463ffffffff19169055906111fb6003830182612843565b505061124c85858481811061121257611212613326565b9050602002013588888581811061122b5761122b613326565b905060200201602081019061124091906131f2565b836020015160006124fb565b7f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b6040518060c0016040528087878681811061128a5761128a613326565b9050602002013581526020018989868181106112a8576112a8613326565b90506020020160208101906112bd91906131f2565b6001600160a01b0316815260200183600001516001600160a01b0316815260200183602001518152602001836040015163ffffffff168152602001836060015181525060405161130d9190613487565b60405180910390a1508061132081613352565b915050610fa9565b505050505050565b6000805b8251811015611380576113608484838151811061135357611353613326565b602002602001015161170c565b61136e5760009150506105e3565b8061137881613352565b915050611334565b5060019392505050565b6000546001600160a01b0363010000009091041633146113bc5760405162461bcd60e51b815260040161061b906132f1565b610a306125ec565b60408051608081018252600080825260208201819052918101919091526060808201526108d98383611e5c565b60006108d98383611d80565b6000546001600160a01b03630100000090910416331461142f5760405162461bcd60e51b815260040161061b906132f1565b61143b8260ff16611da9565b61144482611dd3565b1561146757604051635d04d75160e01b815260ff8316600482015260240161061b565b610665828261264e565b6000546001600160a01b0363010000009091041633146114a35760405162461bcd60e51b815260040161061b906132f1565b80518251146114c557604051636e37235160e11b815260040160405180910390fd5b60005b82518110156108085761150d8382815181106114e6576114e6613326565b602002602001015183838151811061150057611500613326565b60200260200101516113fd565b8061151781613352565b9150506114c8565b6000546001600160a01b0363010000009091041633146115515760405162461bcd60e51b815260040161061b906132f1565b60005b8151811015610808576115a28383838151811061157357611573613326565b60200260200101516000015184848151811061159157611591613326565b602002602001015160200151612419565b806115ac81613352565b915050611554565b6000546001600160a01b0363010000009091041633146115e65760405162461bcd60e51b815260040161061b906132f1565b6108c784848484611f6b565b600054600390610100900460ff16158015611614575060005460ff8083169116105b6116775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161061b565b6000805461ffff191660ff8316176101001781556116a4600054630100000090046001600160a01b031690565b6001600160a01b031614806116b85750303b155b156116c6576116c6826123bc565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b60008281526011602052604081205460006117278285612699565b60ff1611949350505050565b6060600083516001600160401b0381111561175057611750612999565b604051908082528060200260200182016040528015611779578160200160208202803683370190505b50905060005b8451811015610752576117c485828151811061179d5761179d613326565b60200260200101518583815181106117b7576117b7613326565b6020026020010151611d80565b8282815181106117d6576117d6613326565b6020908102919091010152806117eb81613352565b91505061177f565b6000546001600160a01b0363010000009091041633146118255760405162461bcd60e51b815260040161061b906132f1565b6118318260ff16611da9565b61183a82611dd3565b61185c5760405163eabeadd360e01b815260ff8316600482015260240161061b565b6108088383836126be565b6000828152601160205260408120546118808184612699565b949350505050565b60005462010000900460ff16156118b15760405162461bcd60e51b815260040161061b906133db565b3360005b828110156108c7576118eb828585848181106118d3576118d3613326565b90506020028101906118e591906134e8565b3561220a565b61193f578184848381811061190257611902613326565b905060200281019061191491906134e8565b60405163c522f21160e01b81526001600160a01b03909216600483015235602482015260440161061b565b60006020600086868581811061195757611957613326565b905060200281019061196991906134e8565b600001358152602001908152602001600020600086868581811061198f5761198f613326565b90506020028101906119a191906134e8565b6119b29060408101906020016131f2565b6001600160a01b03166001600160a01b0316815260200190815260200160002060010154905060405180608001604052808686858181106119f5576119f5613326565b9050602002810190611a0791906134e8565b611a189060608101906040016131f2565b6001600160a01b03168152602001868685818110611a3857611a38613326565b9050602002810190611a4a91906134e8565b606001358152602001868685818110611a6557611a65613326565b9050602002810190611a7791906134e8565b611a889060a081019060800161351c565b63ffffffff168152602001868685818110611aa557611aa5613326565b9050602002810190611ab791906134e8565b611ac59060a0810190613537565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250602092508890508786818110611b1257611b12613326565b9050602002810190611b2491906134e8565b6000013581526020019081526020016000206000878786818110611b4a57611b4a613326565b9050602002810190611b5c91906134e8565b611b6d9060408101906020016131f2565b6001600160a01b0390811682526020808301939093526040918201600020845181546001600160a01b03191692169190911781558383015160018201559083015160028201805463ffffffff191663ffffffff909216919091179055606083015180519192611be49260038501929091019061287d565b50905050611c73858584818110611bfd57611bfd613326565b9050602002810190611c0f91906134e8565b35868685818110611c2257611c22613326565b9050602002810190611c3491906134e8565b611c459060408101906020016131f2565b83888887818110611c5857611c58613326565b9050602002810190611c6a91906134e8565b606001356124fb565b7f8c20c3acb6b5208b7affea2fd90dabc8d47e77cee9766c855ce42730505cb205858584818110611ca657611ca6613326565b9050602002810190611cb891906134e8565b604051611cc591906135a6565b60405180910390a15080611cd881613352565b9150506118b5565b6000546001600160a01b036301000000909104163314611d125760405162461bcd60e51b815260040161061b906132f1565b6001600160a01b038116611d775760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161061b565b610f51816123bc565b6000918252602080805260408084206001600160a01b0393909316845291905290206001015490565b603f8160ff161115610f515760405163453e14b960e01b815260ff8216600482015260240161061b565b60ff81166000908152601260205260408120548103611df457506000919050565b506001919050565b60ff82166000818152601260209081526040918290208054908590558251938452908301849052908201819052907f0d3d8d66bac9b2a9f0e5c83181a30443294ab849472526080d03fffd7187f7169060600160405180910390a1505050565b60408051608081018252600080825260208201819052918101919091526060808201526000838152602080805260408083206001600160a01b03808716855290835292819020815160808101835281549094168452600181015492840192909252600282015463ffffffff1690830152600381018054606084019190611ee190613382565b80601f0160208091040260200160405190810160405280929190818152602001828054611f0d90613382565b8015611f5a5780601f10611f2f57610100808354040283529160200191611f5a565b820191906000526020600020905b815481529060010190602001808311611f3d57829003601f168201915b505050505081525050905092915050565b6000546001600160a01b036301000000909104163314611f9d5760405162461bcd60e51b815260040161061b906132f1565b6001600160a01b0384166000908152601060205260409020548310611fff576001600160a01b038416600081815260106020526040908190205490516345e388eb60e01b8152600481019290925260248201526044810184905260640161061b565b6001600160a01b038416600090815260106020526040812080548590811061202957612029613326565b600091825260208083206002909202909101546001600160a01b03881683526010909152604082208054919350908690811061206757612067613326565b9060005260206000209060020201600101549050818414158061208a5750808314155b156120d657604051637a4dd76560e01b81526001600160a01b03871660048201526024810186905260448101839052606481018290526084810185905260a4810184905260c40161061b565b6001600160a01b038616600090815260106020526040902080546120fc9060019061336b565b8154811061210c5761210c613326565b906000526020600020906002020160106000886001600160a01b03166001600160a01b03168152602001908152602001600020868154811061215057612150613326565b60009182526020808320845460029093020191825560019384015493909101929092556001600160a01b038816815260109091526040902080548061219757612197613663565b6000828152602080822060026000199490940193840201828155600101919091559155604080516001600160a01b038916815291820186905281018490527f33cff58e54c3a8acae85cad63487b5dcf617521e33bb03f071299f374c29de1f9060600160405180910390a1505050505050565b6001600160a01b03821660009081526010602052604081206108d99083612732565b60005462010000900460ff1661227b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161061b565b6000805462ff0000191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60408051818152610820810182526060918291600091829190602082016108008036833750506040805181815261082081018252929350600092915060208201610800803683370190505090506000805b603f8160ff1610156123ae5760006123308983612699565b905060ff81161561239b5781858460ff168151811061235157612351613326565b602002602001019060ff16908160ff168152505080848460ff168151811061237b5761237b613326565b60ff9092166020928302919091019091015282612397816133bc565b9350505b50806123a6816133bc565b915050612318565b509196909550909350915050565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60408051808201825283815260208082018481526001600160a01b03871660008181526010845285812080546001808201835591835291859020865160029093020191825592519201919091558351908152908101859052918201839052907fe7d6ac0b740347f7f96a97e6a9dc0f20f4f11eca65495315adc009a55b6762f8906060015b60405180910390a150505050565b60ff811660008181526012602090815260408083208054939055805193845290830182905290917feb82955a27e39ea7559b6ec7e7d8b371081ab0d8783c7b0d01597555e7dcadbf9101611700565b8181113060008261250c578561250f565b60005b905060008361251f576000612521565b865b905060008461253957612534868861336b565b612543565b612543878761336b565b604051633885984b60e11b81526001600160a01b03868116600483015285811660248301528481166044830152606482018c9052608482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063710b30969060a401600060405180830381600087803b1580156125c957600080fd5b505af11580156125dd573d6000803e3d6000fd5b50505050505050505050505050565b60005462010000900460ff16156126155760405162461bcd60e51b815260040161061b906133db565b6000805462ff00001916620100001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586122aa3390565b60ff8216600081815260126020908152604091829020849055815192835282018390527f16f0bfe4b02efd5423ef8906906b049c0943f21df8f10347d319fddbc59222079101611700565b600082816126a8846004613679565b60ff1682901c905080600f169250505092915050565b6000838152601160205260409020546126d88184846127c0565b6000858152601160205260409081902091909155517f393b86c90799fa411201ae723a54e105823fcf7c6c8dffa90903fc44c03b4ac79061249e9086908690869092835260ff918216602084015216604082015260600190565b6000805b83548110156127b65783818154811061275157612751613326565b9060005260206000209060020201600001548310158015612795575083818154811061277f5761277f613326565b9060005260206000209060020201600101548311155b156127a45760019150506105e3565b806127ae81613352565b915050612736565b5060009392505050565b60006127cb83611da9565b6127d482612819565b8360006127e2856004613679565b600f60ff919091161b905060001981188281166000612802886004613679565b60ff97881697169690961b17979650505050505050565b600f8160ff161115610f51576040516329afd27b60e21b815260ff8216600482015260240161061b565b50805461284f90613382565b6000825580601f1061285f575050565b601f016020900490600052602060002090810190610f519190612901565b82805461288990613382565b90600052602060002090601f0160209004810192826128ab57600085556128f1565b82601f106128c457805160ff19168380011785556128f1565b828001600101855582156128f1579182015b828111156128f15782518255916020019190600101906128d6565b506128fd929150612901565b5090565b5b808211156128fd5760008155600101612902565b80356001600160a01b038116811461292d57600080fd5b919050565b6000806040838503121561294557600080fd5b8235915061295560208401612916565b90509250929050565b803560ff8116811461292d57600080fd5b6000806040838503121561298257600080fd5b61298b8361295e565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156129d1576129d1612999565b60405290565b604051601f8201601f191681016001600160401b03811182821017156129ff576129ff612999565b604052919050565b60006001600160401b03821115612a2057612a20612999565b5060051b60200190565b600082601f830112612a3b57600080fd5b81356020612a50612a4b83612a07565b6129d7565b82815260059290921b84018101918181019086841115612a6f57600080fd5b8286015b84811015612a8a5780358352918301918301612a73565b509695505050505050565b60008060408385031215612aa857600080fd5b82356001600160401b0380821115612abf57600080fd5b612acb86838701612a2a565b9350602091508185013581811115612ae257600080fd5b85019050601f81018613612af557600080fd5b8035612b03612a4b82612a07565b81815260059190911b82018301908381019088831115612b2257600080fd5b928401925b82841015612b4757612b3884612916565b82529284019290840190612b27565b80955050505050509250929050565b6000815180845260005b81811015612b7c57602081850181015186830182015201612b60565b81811115612b8e576000602083870101525b50601f01601f19169290920160200192915050565b60018060a01b0381511682526020810151602083015263ffffffff604082015116604083015260006060820151608060608501526118806080850182612b56565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015612c3957603f19888603018452612c27858351612ba3565b94509285019290850190600101612c0b565b5092979650505050505050565b600082601f830112612c5757600080fd5b81356020612c67612a4b83612a07565b82815260059290921b84018101918181019086841115612c8657600080fd5b8286015b84811015612a8a57612c9b8161295e565b8352918301918301612c8a565b60008060408385031215612cbb57600080fd5b82356001600160401b0380821115612cd257600080fd5b612cde86838701612c46565b9350602091508185013581811115612cf557600080fd5b85019050601f81018613612d0857600080fd5b8035612d16612a4b82612a07565b81815260059190911b82018301908381019088831115612d3557600080fd5b928401925b82841015612b4757833582529284019290840190612d3a565b600082601f830112612d6457600080fd5b81356020612d74612a4b83612a07565b82815260069290921b84018101918181019086841115612d9357600080fd5b8286015b84811015612a8a5760408189031215612db05760008081fd5b612db86129af565b813581528482013585820152835291830191604001612d97565b600080600060608486031215612de757600080fd5b612df084612916565b925060208401356001600160401b0380821115612e0c57600080fd5b612e1887838801612d53565b93506040860135915080821115612e2e57600080fd5b50612e3b86828701612a2a565b9150509250925092565b60008060408385031215612e5857600080fd5b61298b83612916565b60018060a01b038516815283602082015263ffffffff83166040820152608060608201526000612e946080830184612b56565b9695505050505050565b60008060408385031215612eb157600080fd5b8235915060208301356001600160401b03811115612ece57600080fd5b612eda85828601612c46565b9150509250929050565b600081518084526020808501945080840160005b83811015612f1757815160ff1687529582019590820190600101612ef8565b509495945050505050565b6020815260006108d96020830184612ee4565b600060208284031215612f4757600080fd5b5035919050565b604080825283519082018190526000906020906060840190828701845b82811015612f8757815184529284019290840190600101612f6b565b50505083810382850152612e948186612ee4565b600060208284031215612fad57600080fd5b81356001600160401b03811115612fc357600080fd5b61188084828501612c46565b6020815260006108d96020830184612b56565b600080600060608486031215612ff757600080fd5b83356001600160401b038082111561300e57600080fd5b61301a87838801612a2a565b9450602086013591508082111561303057600080fd5b61303c87838801612c46565b9350604086013591508082111561305257600080fd5b50612e3b86828701612c46565b60008060006060848603121561307457600080fd5b61307d84612916565b95602085013595506040909401359392505050565b6000602082840312156130a457600080fd5b6108d98261295e565b60008083601f8401126130bf57600080fd5b5081356001600160401b038111156130d657600080fd5b6020830191508360208260051b85010111156130f157600080fd5b9250929050565b6000806000806040858703121561310e57600080fd5b84356001600160401b038082111561312557600080fd5b613131888389016130ad565b9096509450602087013591508082111561314a57600080fd5b50613157878288016130ad565b95989497509550505050565b6020815260006108d96020830184612ba3565b6000806040838503121561318957600080fd5b61319283612916565b915060208301356001600160401b038111156131ad57600080fd5b612eda85828601612d53565b600080600080608085870312156131cf57600080fd5b6131d885612916565b966020860135965060408601359560600135945092505050565b60006020828403121561320457600080fd5b6108d982612916565b6000806040838503121561322057600080fd5b823591506129556020840161295e565b6020808252825182820181905260009190848201906040850190845b818110156132685783518352928401929184019160010161324c565b50909695505050505050565b60008060006060848603121561328957600080fd5b833592506132996020850161295e565b91506132a76040850161295e565b90509250925092565b600080602083850312156132c357600080fd5b82356001600160401b038111156132d957600080fd5b6132e5858286016130ad565b90969095509350505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016133645761336461333c565b5060010190565b60008282101561337d5761337d61333c565b500390565b600181811c9082168061339657607f821691505b6020821081036133b657634e487b7160e01b600052602260045260246000fd5b50919050565b600060ff821660ff81036133d2576133d261333c565b60010192915050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6040808252810184905260008560608301825b87811015613446576001600160a01b0361343184612916565b16825260209283019290910190600101613418565b5083810360208501528481526001600160fb1b0385111561346657600080fd5b8460051b915081866020830137600091016020019081529695505050505050565b60208152815160208201526000602083015160018060a01b03808216604085015280604086015116606085015250506060830151608083015263ffffffff60808401511660a083015260a083015160c08084015261188060e0840182612b56565b6000823560be198336030181126134fe57600080fd5b9190910192915050565b803563ffffffff8116811461292d57600080fd5b60006020828403121561352e57600080fd5b6108d982613508565b6000808335601e1984360301811261354e57600080fd5b8301803591506001600160401b0382111561356857600080fd5b6020019150368190038213156130f157600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081528135602082015260006135bf60208401612916565b60018060a01b038082166040850152806135db60408701612916565b16606085015250506060830135608083015263ffffffff6135fe60808501613508565b1660a083015260a0830135601e1984360301811261361b57600080fd5b83016020810190356001600160401b0381111561363757600080fd5b80360382131561364657600080fd5b60c08085015261365a60e08501828461357d565b95945050505050565b634e487b7160e01b600052603160045260246000fd5b600060ff821660ff84168160ff048111821515161561369a5761369a61333c565b02939250505056fea26469706673582212209714c1001d19740a655ea4426b52e9f5d8348f9df38d027a88d1f1095e244e9464736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102275760003560e01c80637ffe93fc11610130578063b8865673116100b8578063dc873d011161007c578063dc873d0114610566578063e78d54bb14610586578063e972f91014610599578063ebc5c093146105ac578063f2fde38b146105bf57600080fd5b8063b8865673146104e5578063c06d5db6146104f8578063c4d66de81461050b578063c7da9aa61461051e578063da5d314b1461055357600080fd5b806384c2ad82116100ff57806384c2ad821461044d5780638c3c9e321461046d5780638da5cb5b1461048e578063aad9a979146104bf578063b1cb1662146104d257600080fd5b80637ffe93fc1461040c578063811a6af71461041f57806381213f22146104325780638456cb591461044557600080fd5b8063436a76f3116101b35780636d7fbb67116101825780636d7fbb67146103a4578063715018a6146103c4578063754b377c146103cc5780637cc920b4146103e65780637cde0fe2146103f957600080fd5b8063436a76f31461033f5780635657f0361461035f5780635c975abb1461038057806364fff83c1461039157600080fd5b80631538ff08116101fa5780631538ff08146102db578063181dfdff146102ee5780632972b0f0146103015780633be1ced7146103145780633f4ba83a1461033757600080fd5b8063011023901461022c57806305b374211461025457806314067f8b1461026957806315027bda146102bb575b600080fd5b61023f61023a366004612932565b6105d2565b60405190151581526020015b60405180910390f35b61026761026236600461296f565b6105e9565b005b6102a6610277366004612932565b6000918252602080805260408084206001600160a01b0393909316845291905290206002015463ffffffff1690565b60405163ffffffff909116815260200161024b565b6102ce6102c9366004612a95565b610669565b60405161024b9190612be4565b6102676102e9366004612ca8565b61075a565b6102676102fc366004612dd2565b61080d565b61023f61030f366004612e45565b6108cd565b610327610322366004612932565b6108e0565b60405161024b9493929190612e61565b6102676109f6565b61035261034d366004612e9e565b610a32565b60405161024b9190612f22565b61037261036d366004612f35565b610ae0565b60405161024b929190612f4e565b60005462010000900460ff1661023f565b61026761039f366004612f9b565b610c65565b6103b76103b2366004612932565b610cd7565b60405161024b9190612fcf565b610267610d8f565b6103d4600381565b60405160ff909116815260200161024b565b6102676103f4366004612fe2565b610dcb565b61026761040736600461305f565b610ea2565b61026761041a366004613092565b610edf565b61026761042d3660046130f8565b610f54565b61023f610440366004612e9e565b611330565b61026761138a565b61046061045b366004612932565b6113c4565b60405161024b9190613163565b61048061047b366004612932565b6113f1565b60405190815260200161024b565b6104a7600054630100000090046001600160a01b031690565b6040516001600160a01b03909116815260200161024b565b6102676104cd36600461296f565b6113fd565b6102676104e0366004612ca8565b611471565b6102676104f3366004613176565b61151f565b6102676105063660046131b9565b6115b4565b6102676105193660046131f2565b6115f2565b6104a761052c366004612932565b6000918252602080805260408084206001600160a01b039384168552909152909120541690565b61023f61056136600461320d565b61170c565b610579610574366004612a95565b611733565b60405161024b9190613230565b610267610594366004613274565b6117f3565b6103d46105a736600461320d565b611867565b6102676105ba3660046132b0565b611888565b6102676105cd3660046131f2565b611ce0565b60006105de8383611d80565b151590505b92915050565b6000546001600160a01b0363010000009091041633146106245760405162461bcd60e51b815260040161061b906132f1565b60405180910390fd5b6106308260ff16611da9565b61063982611dd3565b61065b5760405163eabeadd360e01b815260ff8316600482015260240161061b565b6106658282611dfc565b5050565b6060600083516001600160401b0381111561068657610686612999565b6040519080825280602002602001820160405280156106d757816020015b60408051608081018252600080825260208083018290529282015260608082015282526000199092019101816106a45790505b50905060005b8451811015610752576107228582815181106106fb576106fb613326565b602002602001015185838151811061071557610715613326565b6020026020010151611e5c565b82828151811061073457610734613326565b6020026020010181905250808061074a90613352565b9150506106dd565b509392505050565b6000546001600160a01b03630100000090910416331461078c5760405162461bcd60e51b815260040161061b906132f1565b80518251146107ae57604051636e37235160e11b815260040160405180910390fd5b60005b8251811015610808576107f68382815181106107cf576107cf613326565b60200260200101518383815181106107e9576107e9613326565b60200260200101516105e9565b8061080081613352565b9150506107b1565b505050565b6000546001600160a01b03630100000090910416331461083f5760405162461bcd60e51b815260040161061b906132f1565b60005b81518110156108c7576108b5848284848151811061086257610862613326565b6020026020010151610874919061336b565b85848151811061088657610886613326565b6020026020010151600001518685815181106108a4576108a4613326565b602002602001015160200151611f6b565b806108bf81613352565b915050610842565b50505050565b60006108d9838361220a565b9392505050565b6000828152602080805260408083206001600160a01b038086168552908352818420825160808101845281549092168252600181015493820193909352600283015463ffffffff1691810191909152600382018054849384936060938593919291838601919061094f90613382565b80601f016020809104026020016040519081016040528092919081815260200182805461097b90613382565b80156109c85780601f1061099d576101008083540402835291602001916109c8565b820191906000526020600020905b8154815290600101906020018083116109ab57829003601f168201915b505050919092525050815160208301516040840151606090940151919b909a50929850965090945050505050565b6000546001600160a01b036301000000909104163314610a285760405162461bcd60e51b815260040161061b906132f1565b610a3061222c565b565b6060600082516001600160401b03811115610a4f57610a4f612999565b604051908082528060200260200182016040528015610a78578160200160208202803683370190505b50905060005b835181101561075257610aaa85858381518110610a9d57610a9d613326565b6020026020010151611867565b828281518110610abc57610abc613326565b60ff9092166020928302919091019091015280610ad881613352565b915050610a7e565b6000818152601160205260408120546060918291908080610b00846122c7565b92509250925060008160ff166001600160401b03811115610b2357610b23612999565b604051908082528060200260200182016040528015610b4c578160200160208202803683370190505b50905060008260ff166001600160401b03811115610b6c57610b6c612999565b604051908082528060200260200182016040528015610b95578160200160208202803683370190505b50905060005b8360ff168160ff161015610c565760126000878360ff1681518110610bc257610bc2613326565b602002602001015160ff1660ff16815260200190815260200160002054838260ff1681518110610bf457610bf4613326565b602002602001018181525050848160ff1681518110610c1557610c15613326565b6020026020010151828260ff1681518110610c3257610c32613326565b60ff9092166020928302919091019091015280610c4e816133bc565b915050610b9b565b50909890975095505050505050565b6000546001600160a01b036301000000909104163314610c975760405162461bcd60e51b815260040161061b906132f1565b60005b815181101561066557610cc5828281518110610cb857610cb8613326565b6020026020010151610edf565b80610ccf81613352565b915050610c9a565b6000828152602080805260408083206001600160a01b03851684529091529020600301805460609190610d0990613382565b80601f0160208091040260200160405190810160405280929190818152602001828054610d3590613382565b8015610d825780601f10610d5757610100808354040283529160200191610d82565b820191906000526020600020905b815481529060010190602001808311610d6557829003601f168201915b5050505050905092915050565b6000546001600160a01b036301000000909104163314610dc15760405162461bcd60e51b815260040161061b906132f1565b610a3060006123bc565b6000546001600160a01b036301000000909104163314610dfd5760405162461bcd60e51b815260040161061b906132f1565b81518351141580610e1057508051835114155b15610e2e57604051636e37235160e11b815260040160405180910390fd5b60005b83518110156108c757610e90848281518110610e4f57610e4f613326565b6020026020010151848381518110610e6957610e69613326565b6020026020010151848481518110610e8357610e83613326565b60200260200101516117f3565b80610e9a81613352565b915050610e31565b6000546001600160a01b036301000000909104163314610ed45760405162461bcd60e51b815260040161061b906132f1565b610808838383612419565b6000546001600160a01b036301000000909104163314610f115760405162461bcd60e51b815260040161061b906132f1565b610f1d8160ff16611da9565b610f2681611dd3565b610f485760405163eabeadd360e01b815260ff8216600482015260240161061b565b610f51816124ac565b50565b60005462010000900460ff1615610f7d5760405162461bcd60e51b815260040161061b906133db565b828114610fa55783838383604051638ceb003d60e01b815260040161061b9493929190613405565b3360005b8481101561132857600060206000868685818110610fc957610fc9613326565b9050602002013581526020019081526020016000206000888885818110610ff257610ff2613326565b905060200201602081019061100791906131f2565b6001600160a01b0390811682526020808301939093526040918201600020825160808101845281549092168252600181015493820193909352600283015463ffffffff169181019190915260038201805491929160608401919061106a90613382565b80601f016020809104026020016040519081016040528092919081815260200182805461109690613382565b80156110e35780601f106110b8576101008083540402835291602001916110e3565b820191906000526020600020905b8154815290600101906020018083116110c657829003601f168201915b50505050508152505090506111108386868581811061110457611104613326565b9050602002013561220a565b61115a578285858481811061112757611127613326565b60405163c522f21160e01b81526001600160a01b039094166004850152602002919091013560248301525060440161061b565b6020600086868581811061117057611170613326565b905060200201358152602001908152602001600020600088888581811061119957611199613326565b90506020020160208101906111ae91906131f2565b6001600160a01b031681526020810191909152604001600090812080546001600160a01b03191681556001810182905560028101805463ffffffff19169055906111fb6003830182612843565b505061124c85858481811061121257611212613326565b9050602002013588888581811061122b5761122b613326565b905060200201602081019061124091906131f2565b836020015160006124fb565b7f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b6040518060c0016040528087878681811061128a5761128a613326565b9050602002013581526020018989868181106112a8576112a8613326565b90506020020160208101906112bd91906131f2565b6001600160a01b0316815260200183600001516001600160a01b0316815260200183602001518152602001836040015163ffffffff168152602001836060015181525060405161130d9190613487565b60405180910390a1508061132081613352565b915050610fa9565b505050505050565b6000805b8251811015611380576113608484838151811061135357611353613326565b602002602001015161170c565b61136e5760009150506105e3565b8061137881613352565b915050611334565b5060019392505050565b6000546001600160a01b0363010000009091041633146113bc5760405162461bcd60e51b815260040161061b906132f1565b610a306125ec565b60408051608081018252600080825260208201819052918101919091526060808201526108d98383611e5c565b60006108d98383611d80565b6000546001600160a01b03630100000090910416331461142f5760405162461bcd60e51b815260040161061b906132f1565b61143b8260ff16611da9565b61144482611dd3565b1561146757604051635d04d75160e01b815260ff8316600482015260240161061b565b610665828261264e565b6000546001600160a01b0363010000009091041633146114a35760405162461bcd60e51b815260040161061b906132f1565b80518251146114c557604051636e37235160e11b815260040160405180910390fd5b60005b82518110156108085761150d8382815181106114e6576114e6613326565b602002602001015183838151811061150057611500613326565b60200260200101516113fd565b8061151781613352565b9150506114c8565b6000546001600160a01b0363010000009091041633146115515760405162461bcd60e51b815260040161061b906132f1565b60005b8151811015610808576115a28383838151811061157357611573613326565b60200260200101516000015184848151811061159157611591613326565b602002602001015160200151612419565b806115ac81613352565b915050611554565b6000546001600160a01b0363010000009091041633146115e65760405162461bcd60e51b815260040161061b906132f1565b6108c784848484611f6b565b600054600390610100900460ff16158015611614575060005460ff8083169116105b6116775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161061b565b6000805461ffff191660ff8316176101001781556116a4600054630100000090046001600160a01b031690565b6001600160a01b031614806116b85750303b155b156116c6576116c6826123bc565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b60008281526011602052604081205460006117278285612699565b60ff1611949350505050565b6060600083516001600160401b0381111561175057611750612999565b604051908082528060200260200182016040528015611779578160200160208202803683370190505b50905060005b8451811015610752576117c485828151811061179d5761179d613326565b60200260200101518583815181106117b7576117b7613326565b6020026020010151611d80565b8282815181106117d6576117d6613326565b6020908102919091010152806117eb81613352565b91505061177f565b6000546001600160a01b0363010000009091041633146118255760405162461bcd60e51b815260040161061b906132f1565b6118318260ff16611da9565b61183a82611dd3565b61185c5760405163eabeadd360e01b815260ff8316600482015260240161061b565b6108088383836126be565b6000828152601160205260408120546118808184612699565b949350505050565b60005462010000900460ff16156118b15760405162461bcd60e51b815260040161061b906133db565b3360005b828110156108c7576118eb828585848181106118d3576118d3613326565b90506020028101906118e591906134e8565b3561220a565b61193f578184848381811061190257611902613326565b905060200281019061191491906134e8565b60405163c522f21160e01b81526001600160a01b03909216600483015235602482015260440161061b565b60006020600086868581811061195757611957613326565b905060200281019061196991906134e8565b600001358152602001908152602001600020600086868581811061198f5761198f613326565b90506020028101906119a191906134e8565b6119b29060408101906020016131f2565b6001600160a01b03166001600160a01b0316815260200190815260200160002060010154905060405180608001604052808686858181106119f5576119f5613326565b9050602002810190611a0791906134e8565b611a189060608101906040016131f2565b6001600160a01b03168152602001868685818110611a3857611a38613326565b9050602002810190611a4a91906134e8565b606001358152602001868685818110611a6557611a65613326565b9050602002810190611a7791906134e8565b611a889060a081019060800161351c565b63ffffffff168152602001868685818110611aa557611aa5613326565b9050602002810190611ab791906134e8565b611ac59060a0810190613537565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250602092508890508786818110611b1257611b12613326565b9050602002810190611b2491906134e8565b6000013581526020019081526020016000206000878786818110611b4a57611b4a613326565b9050602002810190611b5c91906134e8565b611b6d9060408101906020016131f2565b6001600160a01b0390811682526020808301939093526040918201600020845181546001600160a01b03191692169190911781558383015160018201559083015160028201805463ffffffff191663ffffffff909216919091179055606083015180519192611be49260038501929091019061287d565b50905050611c73858584818110611bfd57611bfd613326565b9050602002810190611c0f91906134e8565b35868685818110611c2257611c22613326565b9050602002810190611c3491906134e8565b611c459060408101906020016131f2565b83888887818110611c5857611c58613326565b9050602002810190611c6a91906134e8565b606001356124fb565b7f8c20c3acb6b5208b7affea2fd90dabc8d47e77cee9766c855ce42730505cb205858584818110611ca657611ca6613326565b9050602002810190611cb891906134e8565b604051611cc591906135a6565b60405180910390a15080611cd881613352565b9150506118b5565b6000546001600160a01b036301000000909104163314611d125760405162461bcd60e51b815260040161061b906132f1565b6001600160a01b038116611d775760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161061b565b610f51816123bc565b6000918252602080805260408084206001600160a01b0393909316845291905290206001015490565b603f8160ff161115610f515760405163453e14b960e01b815260ff8216600482015260240161061b565b60ff81166000908152601260205260408120548103611df457506000919050565b506001919050565b60ff82166000818152601260209081526040918290208054908590558251938452908301849052908201819052907f0d3d8d66bac9b2a9f0e5c83181a30443294ab849472526080d03fffd7187f7169060600160405180910390a1505050565b60408051608081018252600080825260208201819052918101919091526060808201526000838152602080805260408083206001600160a01b03808716855290835292819020815160808101835281549094168452600181015492840192909252600282015463ffffffff1690830152600381018054606084019190611ee190613382565b80601f0160208091040260200160405190810160405280929190818152602001828054611f0d90613382565b8015611f5a5780601f10611f2f57610100808354040283529160200191611f5a565b820191906000526020600020905b815481529060010190602001808311611f3d57829003601f168201915b505050505081525050905092915050565b6000546001600160a01b036301000000909104163314611f9d5760405162461bcd60e51b815260040161061b906132f1565b6001600160a01b0384166000908152601060205260409020548310611fff576001600160a01b038416600081815260106020526040908190205490516345e388eb60e01b8152600481019290925260248201526044810184905260640161061b565b6001600160a01b038416600090815260106020526040812080548590811061202957612029613326565b600091825260208083206002909202909101546001600160a01b03881683526010909152604082208054919350908690811061206757612067613326565b9060005260206000209060020201600101549050818414158061208a5750808314155b156120d657604051637a4dd76560e01b81526001600160a01b03871660048201526024810186905260448101839052606481018290526084810185905260a4810184905260c40161061b565b6001600160a01b038616600090815260106020526040902080546120fc9060019061336b565b8154811061210c5761210c613326565b906000526020600020906002020160106000886001600160a01b03166001600160a01b03168152602001908152602001600020868154811061215057612150613326565b60009182526020808320845460029093020191825560019384015493909101929092556001600160a01b038816815260109091526040902080548061219757612197613663565b6000828152602080822060026000199490940193840201828155600101919091559155604080516001600160a01b038916815291820186905281018490527f33cff58e54c3a8acae85cad63487b5dcf617521e33bb03f071299f374c29de1f9060600160405180910390a1505050505050565b6001600160a01b03821660009081526010602052604081206108d99083612732565b60005462010000900460ff1661227b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161061b565b6000805462ff0000191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60408051818152610820810182526060918291600091829190602082016108008036833750506040805181815261082081018252929350600092915060208201610800803683370190505090506000805b603f8160ff1610156123ae5760006123308983612699565b905060ff81161561239b5781858460ff168151811061235157612351613326565b602002602001019060ff16908160ff168152505080848460ff168151811061237b5761237b613326565b60ff9092166020928302919091019091015282612397816133bc565b9350505b50806123a6816133bc565b915050612318565b509196909550909350915050565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60408051808201825283815260208082018481526001600160a01b03871660008181526010845285812080546001808201835591835291859020865160029093020191825592519201919091558351908152908101859052918201839052907fe7d6ac0b740347f7f96a97e6a9dc0f20f4f11eca65495315adc009a55b6762f8906060015b60405180910390a150505050565b60ff811660008181526012602090815260408083208054939055805193845290830182905290917feb82955a27e39ea7559b6ec7e7d8b371081ab0d8783c7b0d01597555e7dcadbf9101611700565b8181113060008261250c578561250f565b60005b905060008361251f576000612521565b865b905060008461253957612534868861336b565b612543565b612543878761336b565b604051633885984b60e11b81526001600160a01b03868116600483015285811660248301528481166044830152606482018c9052608482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063710b30969060a401600060405180830381600087803b1580156125c957600080fd5b505af11580156125dd573d6000803e3d6000fd5b50505050505050505050505050565b60005462010000900460ff16156126155760405162461bcd60e51b815260040161061b906133db565b6000805462ff00001916620100001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586122aa3390565b60ff8216600081815260126020908152604091829020849055815192835282018390527f16f0bfe4b02efd5423ef8906906b049c0943f21df8f10347d319fddbc59222079101611700565b600082816126a8846004613679565b60ff1682901c905080600f169250505092915050565b6000838152601160205260409020546126d88184846127c0565b6000858152601160205260409081902091909155517f393b86c90799fa411201ae723a54e105823fcf7c6c8dffa90903fc44c03b4ac79061249e9086908690869092835260ff918216602084015216604082015260600190565b6000805b83548110156127b65783818154811061275157612751613326565b9060005260206000209060020201600001548310158015612795575083818154811061277f5761277f613326565b9060005260206000209060020201600101548311155b156127a45760019150506105e3565b806127ae81613352565b915050612736565b5060009392505050565b60006127cb83611da9565b6127d482612819565b8360006127e2856004613679565b600f60ff919091161b905060001981188281166000612802886004613679565b60ff97881697169690961b17979650505050505050565b600f8160ff161115610f51576040516329afd27b60e21b815260ff8216600482015260240161061b565b50805461284f90613382565b6000825580601f1061285f575050565b601f016020900490600052602060002090810190610f519190612901565b82805461288990613382565b90600052602060002090601f0160209004810192826128ab57600085556128f1565b82601f106128c457805160ff19168380011785556128f1565b828001600101855582156128f1579182015b828111156128f15782518255916020019190600101906128d6565b506128fd929150612901565b5090565b5b808211156128fd5760008155600101612902565b80356001600160a01b038116811461292d57600080fd5b919050565b6000806040838503121561294557600080fd5b8235915061295560208401612916565b90509250929050565b803560ff8116811461292d57600080fd5b6000806040838503121561298257600080fd5b61298b8361295e565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156129d1576129d1612999565b60405290565b604051601f8201601f191681016001600160401b03811182821017156129ff576129ff612999565b604052919050565b60006001600160401b03821115612a2057612a20612999565b5060051b60200190565b600082601f830112612a3b57600080fd5b81356020612a50612a4b83612a07565b6129d7565b82815260059290921b84018101918181019086841115612a6f57600080fd5b8286015b84811015612a8a5780358352918301918301612a73565b509695505050505050565b60008060408385031215612aa857600080fd5b82356001600160401b0380821115612abf57600080fd5b612acb86838701612a2a565b9350602091508185013581811115612ae257600080fd5b85019050601f81018613612af557600080fd5b8035612b03612a4b82612a07565b81815260059190911b82018301908381019088831115612b2257600080fd5b928401925b82841015612b4757612b3884612916565b82529284019290840190612b27565b80955050505050509250929050565b6000815180845260005b81811015612b7c57602081850181015186830182015201612b60565b81811115612b8e576000602083870101525b50601f01601f19169290920160200192915050565b60018060a01b0381511682526020810151602083015263ffffffff604082015116604083015260006060820151608060608501526118806080850182612b56565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015612c3957603f19888603018452612c27858351612ba3565b94509285019290850190600101612c0b565b5092979650505050505050565b600082601f830112612c5757600080fd5b81356020612c67612a4b83612a07565b82815260059290921b84018101918181019086841115612c8657600080fd5b8286015b84811015612a8a57612c9b8161295e565b8352918301918301612c8a565b60008060408385031215612cbb57600080fd5b82356001600160401b0380821115612cd257600080fd5b612cde86838701612c46565b9350602091508185013581811115612cf557600080fd5b85019050601f81018613612d0857600080fd5b8035612d16612a4b82612a07565b81815260059190911b82018301908381019088831115612d3557600080fd5b928401925b82841015612b4757833582529284019290840190612d3a565b600082601f830112612d6457600080fd5b81356020612d74612a4b83612a07565b82815260069290921b84018101918181019086841115612d9357600080fd5b8286015b84811015612a8a5760408189031215612db05760008081fd5b612db86129af565b813581528482013585820152835291830191604001612d97565b600080600060608486031215612de757600080fd5b612df084612916565b925060208401356001600160401b0380821115612e0c57600080fd5b612e1887838801612d53565b93506040860135915080821115612e2e57600080fd5b50612e3b86828701612a2a565b9150509250925092565b60008060408385031215612e5857600080fd5b61298b83612916565b60018060a01b038516815283602082015263ffffffff83166040820152608060608201526000612e946080830184612b56565b9695505050505050565b60008060408385031215612eb157600080fd5b8235915060208301356001600160401b03811115612ece57600080fd5b612eda85828601612c46565b9150509250929050565b600081518084526020808501945080840160005b83811015612f1757815160ff1687529582019590820190600101612ef8565b509495945050505050565b6020815260006108d96020830184612ee4565b600060208284031215612f4757600080fd5b5035919050565b604080825283519082018190526000906020906060840190828701845b82811015612f8757815184529284019290840190600101612f6b565b50505083810382850152612e948186612ee4565b600060208284031215612fad57600080fd5b81356001600160401b03811115612fc357600080fd5b61188084828501612c46565b6020815260006108d96020830184612b56565b600080600060608486031215612ff757600080fd5b83356001600160401b038082111561300e57600080fd5b61301a87838801612a2a565b9450602086013591508082111561303057600080fd5b61303c87838801612c46565b9350604086013591508082111561305257600080fd5b50612e3b86828701612c46565b60008060006060848603121561307457600080fd5b61307d84612916565b95602085013595506040909401359392505050565b6000602082840312156130a457600080fd5b6108d98261295e565b60008083601f8401126130bf57600080fd5b5081356001600160401b038111156130d657600080fd5b6020830191508360208260051b85010111156130f157600080fd5b9250929050565b6000806000806040858703121561310e57600080fd5b84356001600160401b038082111561312557600080fd5b613131888389016130ad565b9096509450602087013591508082111561314a57600080fd5b50613157878288016130ad565b95989497509550505050565b6020815260006108d96020830184612ba3565b6000806040838503121561318957600080fd5b61319283612916565b915060208301356001600160401b038111156131ad57600080fd5b612eda85828601612d53565b600080600080608085870312156131cf57600080fd5b6131d885612916565b966020860135965060408601359560600135945092505050565b60006020828403121561320457600080fd5b6108d982612916565b6000806040838503121561322057600080fd5b823591506129556020840161295e565b6020808252825182820181905260009190848201906040850190845b818110156132685783518352928401929184019160010161324c565b50909695505050505050565b60008060006060848603121561328957600080fd5b833592506132996020850161295e565b91506132a76040850161295e565b90509250925092565b600080602083850312156132c357600080fd5b82356001600160401b038111156132d957600080fd5b6132e5858286016130ad565b90969095509350505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016133645761336461333c565b5060010190565b60008282101561337d5761337d61333c565b500390565b600181811c9082168061339657607f821691505b6020821081036133b657634e487b7160e01b600052602260045260246000fd5b50919050565b600060ff821660ff81036133d2576133d261333c565b60010192915050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6040808252810184905260008560608301825b87811015613446576001600160a01b0361343184612916565b16825260209283019290910190600101613418565b5083810360208501528481526001600160fb1b0385111561346657600080fd5b8460051b915081866020830137600091016020019081529695505050505050565b60208152815160208201526000602083015160018060a01b03808216604085015280604086015116606085015250506060830151608083015263ffffffff60808401511660a083015260a083015160c08084015261188060e0840182612b56565b6000823560be198336030181126134fe57600080fd5b9190910192915050565b803563ffffffff8116811461292d57600080fd5b60006020828403121561352e57600080fd5b6108d982613508565b6000808335601e1984360301811261354e57600080fd5b8301803591506001600160401b0382111561356857600080fd5b6020019150368190038213156130f157600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081528135602082015260006135bf60208401612916565b60018060a01b038082166040850152806135db60408701612916565b16606085015250506060830135608083015263ffffffff6135fe60808501613508565b1660a083015260a0830135601e1984360301811261361b57600080fd5b83016020810190356001600160401b0381111561363757600080fd5b80360382131561364657600080fd5b60c08085015261365a60e08501828461357d565b95945050505050565b634e487b7160e01b600052603160045260246000fd5b600060ff821660ff84168160ff048111821515161561369a5761369a61333c565b02939250505056fea26469706673582212209714c1001d19740a655ea4426b52e9f5d8348f9df38d027a88d1f1095e244e9464736f6c634300080e0033", "devdoc": { "author": "Sismo", "kind": "dev", "methods": { + "attestationsCollectionHasAttribute(uint256,uint8)": { + "details": "Returns whether an attestationsCollection has a specific attribute referenced by its index", + "params": { + "collectionId": "Collection Id of the targeted attestationsCollection", + "index": "Index of the attribute. Can go from 0 to 63." + } + }, "authorizeRange(address,uint256,uint256)": { "details": "Authorize an issuer for a specific range", "params": { @@ -949,6 +1395,13 @@ "owner": "Owner of the contract, has the right to authorize/unauthorize attestations issuers" } }, + "createNewAttribute(uint8,bytes32)": { + "details": "Create a new attribute.", + "params": { + "index": "Index of the attribute. Can go from 0 to 63.", + "name": "Name in bytes32 of the attribute" + } + }, "deleteAttestations(address[],uint256[])": { "details": "Delete function to be called by authorized issuers", "params": { @@ -956,6 +1409,12 @@ "owners": "The owners of the attestations to be deleted" } }, + "deleteAttribute(uint8)": { + "details": "Delete an existing attribute", + "params": { + "index": "Index of the attribute. Can go from 0 to 63. The attribute must already exist" + } + }, "getAttestationData(uint256,address)": { "details": "Getter of the data of a specific attestation", "params": { @@ -1012,6 +1471,19 @@ "owners": "Owners of the targeted attestations" } }, + "getAttributeValueForAttestationsCollection(uint256,uint8)": { + "details": "Returns the attribute's value (from 0 to 15) of an attestationsCollection", + "params": { + "collectionId": "Collection Id of the targeted attestationsCollection", + "index": "Index of the attribute. Can go from 0 to 63." + } + }, + "getAttributesNamesAndValuesForAttestationsCollection(uint256)": { + "details": "Returns all the enabled attributes names and their values for a specific attestationsCollection", + "params": { + "collectionId": "Collection Id of the targeted attestationsCollection" + } + }, "hasAttestation(uint256,address)": { "details": "Returns whether a user has an attestation from a collection", "params": { @@ -1022,7 +1494,7 @@ "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" + "ownerAddress": "Owner of the contract, has the right to authorize/unauthorize attestations issuers" } }, "isAuthorized(address,uint256)": { @@ -1050,6 +1522,14 @@ "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." }, + "setAttributeValueForAttestationsCollection(uint256,uint8,uint8)": { + "details": "Set a value for an attribute of an attestationsCollection. The attribute should already be created.", + "params": { + "collectionId": "Collection Id of the targeted attestationsCollection", + "index": "Index of the attribute (must be between 0 and 63)", + "value": "Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15" + } + }, "transferOwnership(address)": { "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." }, @@ -1071,6 +1551,13 @@ }, "unpause()": { "details": "Unpauses the registry" + }, + "updateAttributeName(uint8,bytes32)": { + "details": "Update the name of an existing attribute", + "params": { + "index": "Index of the attribute. Can go from 0 to 63. The attribute must exist", + "newName": "new name in bytes32 of the attribute" + } } }, "title": "Attestations Registry", @@ -1078,22 +1565,26 @@ }, "userdoc": { "kind": "user", - "methods": {}, + "methods": { + "initialize(address)": { + "notice": "The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization." + } + }, "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": 12107, + "astId": 14389, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "_initialized", "offset": 0, "slot": "0", - "type": "t_bool" + "type": "t_uint8" }, { - "astId": 12109, + "astId": 14391, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "_initializing", "offset": 1, @@ -1101,7 +1592,7 @@ "type": "t_bool" }, { - "astId": 12111, + "astId": 14393, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "_paused", "offset": 2, @@ -1109,7 +1600,7 @@ "type": "t_bool" }, { - "astId": 12113, + "astId": 14395, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "_owner", "offset": 3, @@ -1117,36 +1608,52 @@ "type": "t_address" }, { - "astId": 12117, + "astId": 14399, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", - "label": "_placeHolders", + "label": "_placeHoldersAdmin", "offset": 0, "slot": "1", "type": "t_array(t_uint256)15_storage" }, { - "astId": 12123, + "astId": 14405, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "_authorizedRanges", "offset": 0, "slot": "16", - "type": "t_mapping(t_address,t_array(t_struct(Range)12729_storage)dyn_storage)" + "type": "t_mapping(t_address,t_array(t_struct(Range)15352_storage)dyn_storage)" }, { - "astId": 12127, + "astId": 14409, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", - "label": "_placeHolders2", + "label": "_attestationsCollectionAttributesValuesBitmap", "offset": 0, "slot": "17", - "type": "t_array(t_uint256)15_storage" + "type": "t_mapping(t_uint256,t_uint256)" + }, + { + "astId": 14413, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_attributesNames", + "offset": 0, + "slot": "18", + "type": "t_mapping(t_uint8,t_bytes32)" + }, + { + "astId": 14417, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_placeHoldersConfig", + "offset": 0, + "slot": "19", + "type": "t_array(t_uint256)13_storage" }, { - "astId": 12134, + "astId": 14424, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "_attestationsData", "offset": 0, "slot": "32", - "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(AttestationData)11761_storage))" + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(AttestationData)13388_storage))" } ], "types": { @@ -1155,12 +1662,18 @@ "label": "address", "numberOfBytes": "20" }, - "t_array(t_struct(Range)12729_storage)dyn_storage": { - "base": "t_struct(Range)12729_storage", + "t_array(t_struct(Range)15352_storage)dyn_storage": { + "base": "t_struct(Range)15352_storage", "encoding": "dynamic_array", "label": "struct Range[]", "numberOfBytes": "32" }, + "t_array(t_uint256)13_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[13]", + "numberOfBytes": "416" + }, "t_array(t_uint256)15_storage": { "base": "t_uint256", "encoding": "inplace", @@ -1172,38 +1685,57 @@ "label": "bool", "numberOfBytes": "1" }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, "t_bytes_storage": { "encoding": "bytes", "label": "bytes", "numberOfBytes": "32" }, - "t_mapping(t_address,t_array(t_struct(Range)12729_storage)dyn_storage)": { + "t_mapping(t_address,t_array(t_struct(Range)15352_storage)dyn_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct Range[])", "numberOfBytes": "32", - "value": "t_array(t_struct(Range)12729_storage)dyn_storage" + "value": "t_array(t_struct(Range)15352_storage)dyn_storage" }, - "t_mapping(t_address,t_struct(AttestationData)11761_storage)": { + "t_mapping(t_address,t_struct(AttestationData)13388_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct AttestationData)", "numberOfBytes": "32", - "value": "t_struct(AttestationData)11761_storage" + "value": "t_struct(AttestationData)13388_storage" }, - "t_mapping(t_uint256,t_mapping(t_address,t_struct(AttestationData)11761_storage))": { + "t_mapping(t_uint256,t_mapping(t_address,t_struct(AttestationData)13388_storage))": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => mapping(address => struct AttestationData))", "numberOfBytes": "32", - "value": "t_mapping(t_address,t_struct(AttestationData)11761_storage)" + "value": "t_mapping(t_address,t_struct(AttestationData)13388_storage)" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" }, - "t_struct(AttestationData)11761_storage": { + "t_mapping(t_uint8,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint8", + "label": "mapping(uint8 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_struct(AttestationData)13388_storage": { "encoding": "inplace", "label": "struct AttestationData", "members": [ { - "astId": 11754, + "astId": 13381, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "issuer", "offset": 0, @@ -1211,7 +1743,7 @@ "type": "t_address" }, { - "astId": 11756, + "astId": 13383, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "value", "offset": 0, @@ -1219,7 +1751,7 @@ "type": "t_uint256" }, { - "astId": 11758, + "astId": 13385, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "timestamp", "offset": 0, @@ -1227,7 +1759,7 @@ "type": "t_uint32" }, { - "astId": 11760, + "astId": 13387, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "extraData", "offset": 0, @@ -1237,12 +1769,12 @@ ], "numberOfBytes": "128" }, - "t_struct(Range)12729_storage": { + "t_struct(Range)15352_storage": { "encoding": "inplace", "label": "struct Range", "members": [ { - "astId": 12726, + "astId": 15349, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "min", "offset": 0, @@ -1250,7 +1782,7 @@ "type": "t_uint256" }, { - "astId": 12728, + "astId": 15351, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "max", "offset": 0, @@ -1269,6 +1801,11 @@ "encoding": "inplace", "label": "uint32", "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" } } } diff --git a/deployments/mumbai/AttestationsRegistryImplem.json b/deployments/mumbai/AttestationsRegistryImplem.json index c62e34b..20e9254 100644 --- a/deployments/mumbai/AttestationsRegistryImplem.json +++ b/deployments/mumbai/AttestationsRegistryImplem.json @@ -1,5 +1,5 @@ { - "address": "0xF2cFB43D86aE0D4932888fe51ed6B430222e32e8", + "address": "0x219aEB9920E8528C2664EC673c2df0E55DEEc26E", "abi": [ { "inputs": [ @@ -17,6 +17,11 @@ "stateMutability": "nonpayable", "type": "constructor" }, + { + "inputs": [], + "name": "ArgsLengthDoesNotMatch", + "type": "error" + }, { "inputs": [ { @@ -28,6 +33,28 @@ "name": "AttesterNotFound", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "attributeIndex", + "type": "uint8" + } + ], + "name": "AttributeAlreadyExists", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "attributeIndex", + "type": "uint8" + } + ], + "name": "AttributeDoesNotExist", + "type": "error" + }, { "inputs": [ { @@ -64,6 +91,17 @@ "name": "IdsMismatch", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "index", + "type": "uint8" + } + ], + "name": "IndexOutOfBounds", + "type": "error" + }, { "inputs": [ { @@ -80,6 +118,22 @@ "name": "IssuerNotAuthorized", "type": "error" }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "owners", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "collectionIds", + "type": "uint256[]" + } + ], + "name": "OwnersAndCollectionIdsLengthMismatch", + "type": "error" + }, { "inputs": [ { @@ -101,6 +155,17 @@ "name": "RangeIndexOutOfBounds", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "value", + "type": "uint8" + } + ], + "name": "ValueOutOfBounds", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -191,6 +256,88 @@ "name": "AttestationRecorded", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "attributeIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "attributeValue", + "type": "uint8" + } + ], + "name": "AttestationsCollectionAttributeSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "attributeIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "deletedAttributeName", + "type": "bytes32" + } + ], + "name": "AttributeDeleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "attributeIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "newAttributeName", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "previousAttributeName", + "type": "bytes32" + } + ], + "name": "AttributeNameUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -241,6 +388,25 @@ "name": "IssuerUnauthorized", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "attributeIndex", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "attributeName", + "type": "bytes32" + } + ], + "name": "NewAttributeCreated", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -286,6 +452,67 @@ "name": "Unpaused", "type": "event" }, + { + "inputs": [], + "name": "IMPLEMENTATION_VERSION", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "index", + "type": "uint8" + } + ], + "name": "attestationsCollectionHasAttribute", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "uint8[]", + "name": "indices", + "type": "uint8[]" + } + ], + "name": "attestationsCollectionHasAttributes", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -342,41 +569,50 @@ { "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[]" + "internalType": "uint8", + "name": "index", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "name", + "type": "bytes32" + } + ], + "name": "createNewAttribute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8[]", + "name": "indices", + "type": "uint8[]" + }, + { + "internalType": "bytes32[]", + "name": "names", + "type": "bytes32[]" + } + ], + "name": "createNewAttributes", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "owners", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "collectionIds", + "type": "uint256[]" } ], "name": "deleteAttestations", @@ -384,6 +620,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "index", + "type": "uint8" + } + ], + "name": "deleteAttribute", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8[]", + "name": "indices", + "type": "uint8[]" + } + ], + "name": "deleteAttributes", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -635,6 +897,78 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "index", + "type": "uint8" + } + ], + "name": "getAttributeValueForAttestationsCollection", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + } + ], + "name": "getAttributesNamesAndValuesForAttestationsCollection", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + }, + { + "internalType": "uint8[]", + "name": "", + "type": "uint8[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "uint8[]", + "name": "indices", + "type": "uint8[]" + } + ], + "name": "getAttributesValuesForAttestationsCollection", + "outputs": [ + { + "internalType": "uint8[]", + "name": "", + "type": "uint8[]" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -663,7 +997,7 @@ "inputs": [ { "internalType": "address", - "name": "owner", + "name": "ownerAddress", "type": "address" } ], @@ -781,6 +1115,52 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "collectionId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "index", + "type": "uint8" + }, + { + "internalType": "uint8", + "name": "value", + "type": "uint8" + } + ], + "name": "setAttributeValueForAttestationsCollection", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "collectionIds", + "type": "uint256[]" + }, + { + "internalType": "uint8[]", + "name": "indices", + "type": "uint8[]" + }, + { + "internalType": "uint8[]", + "name": "values", + "type": "uint8[]" + } + ], + "name": "setAttributesValuesForAttestationsCollections", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -863,51 +1243,99 @@ "outputs": [], "stateMutability": "nonpayable", "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "index", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "newName", + "type": "bytes32" + } + ], + "name": "updateAttributeName", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8[]", + "name": "indices", + "type": "uint8[]" + }, + { + "internalType": "bytes32[]", + "name": "newNames", + "type": "bytes32[]" + } + ], + "name": "updateAttributesName", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" } ], - "transactionHash": "0x02e0a88cf5bcdf37530ff84fab1c3fdfd6f9e6ee6875723b19f38b651dd232be", + "transactionHash": "0x23ead6ee5b2b09647afa2e281d6cb93a084f26cc05fb59708bf0b291222cfaf7", "receipt": { "to": null, "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0xF2cFB43D86aE0D4932888fe51ed6B430222e32e8", - "transactionIndex": 49, - "gasUsed": "2207509", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000040000000000000008000002000000000000000000000000000000000000000000000000000800801000000000000040100000000000000000000020000000000000000000800000000000000000080000000000000400000000000000000000000000000000000000010000000000000000000008000200000000000000000000000000000000000000000000000000040000000004000000000000000000001000000000000000000000000000000100000000020001000000000000000000000000000000000000000000000000020000000100000", - "blockHash": "0x1b426f0ae02e4cc34101711cfce23c9aa921c6ade3aa99b5f3e2ee8c6c354378", - "transactionHash": "0x02e0a88cf5bcdf37530ff84fab1c3fdfd6f9e6ee6875723b19f38b651dd232be", + "contractAddress": "0x219aEB9920E8528C2664EC673c2df0E55DEEc26E", + "transactionIndex": 11, + "gasUsed": "3121566", + "logsBloom": "0x00000000000000000000000000020000000000000000000000800000000000000000000000000000000000000000000000008000002000000000000000000000000000000000000000000000000000800001000000000000040100000000000000000000020000000000200000000800002000000000000080000000000000400000000000000000000000000000000000000010000080000000000000008000200000000000000000000000800400000000000000000000000040000000004000000000000000000001000000040000000800000000000000100000000020000000000000000002000000000000000000000000000000000020000000100000", + "blockHash": "0x655bddf3573ec82ece82fb6dc8dfc789151c1afcc549317e790c1eca4dc5568c", + "transactionHash": "0x23ead6ee5b2b09647afa2e281d6cb93a084f26cc05fb59708bf0b291222cfaf7", "logs": [ { - "transactionIndex": 49, - "blockNumber": 28599982, - "transactionHash": "0x02e0a88cf5bcdf37530ff84fab1c3fdfd6f9e6ee6875723b19f38b651dd232be", - "address": "0xF2cFB43D86aE0D4932888fe51ed6B430222e32e8", + "transactionIndex": 11, + "blockNumber": 29540661, + "transactionHash": "0x23ead6ee5b2b09647afa2e281d6cb93a084f26cc05fb59708bf0b291222cfaf7", + "address": "0x219aEB9920E8528C2664EC673c2df0E55DEEc26E", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" ], "data": "0x", - "logIndex": 297, - "blockHash": "0x1b426f0ae02e4cc34101711cfce23c9aa921c6ade3aa99b5f3e2ee8c6c354378" + "logIndex": 32, + "blockHash": "0x655bddf3573ec82ece82fb6dc8dfc789151c1afcc549317e790c1eca4dc5568c" }, { - "transactionIndex": 49, - "blockNumber": 28599982, - "transactionHash": "0x02e0a88cf5bcdf37530ff84fab1c3fdfd6f9e6ee6875723b19f38b651dd232be", - "address": "0xF2cFB43D86aE0D4932888fe51ed6B430222e32e8", + "transactionIndex": 11, + "blockNumber": 29540661, + "transactionHash": "0x23ead6ee5b2b09647afa2e281d6cb93a084f26cc05fb59708bf0b291222cfaf7", + "address": "0x219aEB9920E8528C2664EC673c2df0E55DEEc26E", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + "0x0000000000000000000000004e070e9b85a659f0b7b47cde33152ad6c2f63954" ], "data": "0x", - "logIndex": 298, - "blockHash": "0x1b426f0ae02e4cc34101711cfce23c9aa921c6ade3aa99b5f3e2ee8c6c354378" + "logIndex": 33, + "blockHash": "0x655bddf3573ec82ece82fb6dc8dfc789151c1afcc549317e790c1eca4dc5568c" + }, + { + "transactionIndex": 11, + "blockNumber": 29540661, + "transactionHash": "0x23ead6ee5b2b09647afa2e281d6cb93a084f26cc05fb59708bf0b291222cfaf7", + "address": "0x219aEB9920E8528C2664EC673c2df0E55DEEc26E", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000003", + "logIndex": 34, + "blockHash": "0x655bddf3573ec82ece82fb6dc8dfc789151c1afcc549317e790c1eca4dc5568c" }, { - "transactionIndex": 49, - "blockNumber": 28599982, - "transactionHash": "0x02e0a88cf5bcdf37530ff84fab1c3fdfd6f9e6ee6875723b19f38b651dd232be", + "transactionIndex": 11, + "blockNumber": 29540661, + "transactionHash": "0x23ead6ee5b2b09647afa2e281d6cb93a084f26cc05fb59708bf0b291222cfaf7", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", @@ -915,29 +1343,36 @@ "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" ], - "data": "0x0000000000000000000000000000000000000000000000000012d5afa893cedf000000000000000000000000000000000000000000000000894ad152ee570cbf000000000000000000000000000000000000000000000a08d0e2d8af28157ff80000000000000000000000000000000000000000000000008937fba345c33de0000000000000000000000000000000000000000000000a08d0f5ae5ed0a94ed7", - "logIndex": 299, - "blockHash": "0x1b426f0ae02e4cc34101711cfce23c9aa921c6ade3aa99b5f3e2ee8c6c354378" + "data": "0x000000000000000000000000000000000000000000000000000ed690e9d737dc0000000000000000000000000000000000000000000000007d35c1e8683d9f52000000000000000000000000000000000000000000000b8e6f62240848713dbc0000000000000000000000000000000000000000000000007d26eb577e666776000000000000000000000000000000000000000000000b8e6f70fa9932487598", + "logIndex": 35, + "blockHash": "0x655bddf3573ec82ece82fb6dc8dfc789151c1afcc549317e790c1eca4dc5568c" } ], - "blockNumber": 28599982, - "cumulativeGasUsed": "12020743", + "blockNumber": 29540661, + "cumulativeGasUsed": "4966184", "status": 1, "byzantium": true }, "args": [ - "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "0x4e070E9b85a659F0B7B47cde33152ad6c2F63954", "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", + "numDeployments": 2, + "solcInputHash": "6edb98fea2bf424a369954d0e80655f6", + "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\":[],\"name\":\"ArgsLengthDoesNotMatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"}],\"name\":\"AttesterNotFound\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"attributeIndex\",\"type\":\"uint8\"}],\"name\":\"AttributeAlreadyExists\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"attributeIndex\",\"type\":\"uint8\"}],\"name\":\"AttributeDoesNotExist\",\"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\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"name\":\"IndexOutOfBounds\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"issuer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"}],\"name\":\"IssuerNotAuthorized\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"}],\"name\":\"OwnersAndCollectionIdsLengthMismatch\",\"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\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"value\",\"type\":\"uint8\"}],\"name\":\"ValueOutOfBounds\",\"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\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"attributeIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"attributeValue\",\"type\":\"uint8\"}],\"name\":\"AttestationsCollectionAttributeSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"attributeIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"deletedAttributeName\",\"type\":\"bytes32\"}],\"name\":\"AttributeDeleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"attributeIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"newAttributeName\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"previousAttributeName\",\"type\":\"bytes32\"}],\"name\":\"AttributeNameUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\":false,\"internalType\":\"uint8\",\"name\":\"attributeIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"attributeName\",\"type\":\"bytes32\"}],\"name\":\"NewAttributeCreated\",\"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\":[],\"name\":\"IMPLEMENTATION_VERSION\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"name\":\"attestationsCollectionHasAttribute\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"uint8[]\",\"name\":\"indices\",\"type\":\"uint8[]\"}],\"name\":\"attestationsCollectionHasAttributes\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":[{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"name\",\"type\":\"bytes32\"}],\"name\":\"createNewAttribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8[]\",\"name\":\"indices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"names\",\"type\":\"bytes32[]\"}],\"name\":\"createNewAttributes\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"}],\"name\":\"deleteAttestations\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"name\":\"deleteAttribute\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8[]\",\"name\":\"indices\",\"type\":\"uint8[]\"}],\"name\":\"deleteAttributes\",\"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\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"name\":\"getAttributeValueForAttestationsCollection\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"}],\"name\":\"getAttributesNamesAndValuesForAttestationsCollection\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint8[]\",\"name\":\"\",\"type\":\"uint8[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"uint8[]\",\"name\":\"indices\",\"type\":\"uint8[]\"}],\"name\":\"getAttributesValuesForAttestationsCollection\",\"outputs\":[{\"internalType\":\"uint8[]\",\"name\":\"\",\"type\":\"uint8[]\"}],\"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\":\"ownerAddress\",\"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\":\"uint256\",\"name\":\"collectionId\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"value\",\"type\":\"uint8\"}],\"name\":\"setAttributeValueForAttestationsCollection\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"},{\"internalType\":\"uint8[]\",\"name\":\"indices\",\"type\":\"uint8[]\"},{\"internalType\":\"uint8[]\",\"name\":\"values\",\"type\":\"uint8[]\"}],\"name\":\"setAttributesValuesForAttestationsCollections\",\"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\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"newName\",\"type\":\"bytes32\"}],\"name\":\"updateAttributeName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8[]\",\"name\":\"indices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"newNames\",\"type\":\"bytes32[]\"}],\"name\":\"updateAttributesName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"kind\":\"dev\",\"methods\":{\"attestationsCollectionHasAttribute(uint256,uint8)\":{\"details\":\"Returns whether an attestationsCollection has a specific attribute referenced by its index\",\"params\":{\"collectionId\":\"Collection Id of the targeted attestationsCollection\",\"index\":\"Index of the attribute. Can go from 0 to 63.\"}},\"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\"}},\"createNewAttribute(uint8,bytes32)\":{\"details\":\"Create a new attribute.\",\"params\":{\"index\":\"Index of the attribute. Can go from 0 to 63.\",\"name\":\"Name in bytes32 of the attribute\"}},\"deleteAttestations(address[],uint256[])\":{\"details\":\"Delete function to be called by authorized issuers\",\"params\":{\"collectionIds\":\"The collection ids of the attestations to be deleted\",\"owners\":\"The owners of the attestations to be deleted\"}},\"deleteAttribute(uint8)\":{\"details\":\"Delete an existing attribute\",\"params\":{\"index\":\"Index of the attribute. Can go from 0 to 63. The attribute must already exist\"}},\"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\"}},\"getAttributeValueForAttestationsCollection(uint256,uint8)\":{\"details\":\"Returns the attribute's value (from 0 to 15) of an attestationsCollection\",\"params\":{\"collectionId\":\"Collection Id of the targeted attestationsCollection\",\"index\":\"Index of the attribute. Can go from 0 to 63.\"}},\"getAttributesNamesAndValuesForAttestationsCollection(uint256)\":{\"details\":\"Returns all the enabled attributes names and their values for a specific attestationsCollection\",\"params\":{\"collectionId\":\"Collection Id of the targeted attestationsCollection\"}},\"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\":{\"ownerAddress\":\"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.\"},\"setAttributeValueForAttestationsCollection(uint256,uint8,uint8)\":{\"details\":\"Set a value for an attribute of an attestationsCollection. The attribute should already be created.\",\"params\":{\"collectionId\":\"Collection Id of the targeted attestationsCollection\",\"index\":\"Index of the attribute (must be between 0 and 63)\",\"value\":\"Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15\"}},\"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\"},\"updateAttributeName(uint8,bytes32)\":{\"details\":\"Update the name of an existing attribute\",\"params\":{\"index\":\"Index of the attribute. Can go from 0 to 63. The attribute must exist\",\"newName\":\"new name in bytes32 of the attribute\"}}},\"title\":\"Attestations Registry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"initialize(address)\":{\"notice\":\"The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\"}},\"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 uint8 public constant IMPLEMENTATION_VERSION = 3;\\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 BADGES = IBadges(badgesAddress);\\n initialize(owner);\\n }\\n\\n /**\\n * @dev Initialize function, to be called by the proxy delegating calls to this implementation\\n * @param ownerAddress Owner of the contract, has the right to authorize/unauthorize attestations issuers\\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\n */\\n function initialize(address ownerAddress) public reinitializer(IMPLEMENTATION_VERSION) {\\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\\n if (owner() == address(0) || address(this).code.length == 0) {\\n _transferOwnership(ownerAddress);\\n }\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(\\n address[] calldata owners,\\n uint256[] calldata collectionIds\\n ) external override whenNotPaused {\\n if (owners.length != collectionIds.length)\\n revert OwnersAndCollectionIdsLengthMismatch(owners, collectionIds);\\n\\n address issuer = _msgSender();\\n for (uint256 i = 0; i < owners.length; i++) {\\n AttestationData memory attestationData = _attestationsData[collectionIds[i]][owners[i]];\\n\\n if (!_isAuthorized(issuer, collectionIds[i]))\\n revert IssuerNotAuthorized(issuer, collectionIds[i]);\\n delete _attestationsData[collectionIds[i]][owners[i]];\\n\\n _triggerBadgeTransferEvent(collectionIds[i], owners[i], attestationData.value, 0);\\n\\n emit AttestationDeleted(\\n Attestation(\\n collectionIds[i],\\n owners[i],\\n attestationData.issuer,\\n attestationData.value,\\n attestationData.timestamp,\\n attestationData.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(\\n uint256 collectionId,\\n address owner\\n ) external view override returns (bool) {\\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(\\n uint256 collectionId,\\n address owner\\n ) external view override returns (AttestationData memory) {\\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(\\n uint256 collectionId,\\n address owner\\n ) external view override returns (uint256) {\\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(\\n uint256 collectionId,\\n address owner\\n ) external view override returns (address, uint256, uint32, bytes memory) {\\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(\\n uint256 collectionId,\\n address owner\\n ) external view override returns (bytes memory) {\\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(\\n uint256 collectionId,\\n address owner\\n ) external view override returns (address) {\\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(\\n uint256 collectionId,\\n address owner\\n ) external view override returns (uint32) {\\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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view override returns (AttestationData[] memory) {\\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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view override returns (uint256[] memory) {\\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(\\n uint256 collectionId,\\n address owner\\n ) internal view returns (AttestationData memory) {\\n return (_attestationsData[collectionId][owner]);\\n }\\n\\n function _getAttestationValue(\\n uint256 collectionId,\\n address owner\\n ) internal view returns (uint256) {\\n return _attestationsData[collectionId][owner].value;\\n }\\n}\\n\",\"keccak256\":\"0xc21afe30d8096d2bab3683ca28b2533f99f53fa20a1f2c13aa44f1d46ecb9ae6\",\"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';\\nimport {IAttestationsRegistryConfigLogic} from './IAttestationsRegistryConfigLogic.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry is IAttestationsRegistryConfigLogic {\\n error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view returns (address, uint256, uint32, bytes memory);\\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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view 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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0x0c3af349bcfa545c959f4d9f25aacb73e3ef1ca7cfe62a2eda4a743a6835904f\",\"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 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 error AttributeDoesNotExist(uint8 attributeIndex);\\n error AttributeAlreadyExists(uint8 attributeIndex);\\n error ArgsLengthDoesNotMatch();\\n\\n event NewAttributeCreated(uint8 attributeIndex, bytes32 attributeName);\\n event AttributeNameUpdated(\\n uint8 attributeIndex,\\n bytes32 newAttributeName,\\n bytes32 previousAttributeName\\n );\\n event AttributeDeleted(uint8 attributeIndex, bytes32 deletedAttributeName);\\n\\n event AttestationsCollectionAttributeSet(\\n uint256 collectionId,\\n uint8 attributeIndex,\\n uint8 attributeValue\\n );\\n\\n event IssuerAuthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n event IssuerUnauthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n\\n /**\\n * @dev Returns whether an attestationsCollection has a specific attribute referenced by its index\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute. Can go from 0 to 63.\\n */\\n function attestationsCollectionHasAttribute(\\n uint256 collectionId,\\n uint8 index\\n ) external view returns (bool);\\n\\n function attestationsCollectionHasAttributes(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (bool);\\n\\n /**\\n * @dev Returns the attribute's value (from 1 to 15) of an attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param attributeIndex Index of the attribute. Can go from 0 to 63.\\n */\\n function getAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 attributeIndex\\n ) external view returns (uint8);\\n\\n function getAttributesValuesForAttestationsCollection(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (uint8[] memory);\\n\\n /**\\n * @dev Set a value for an attribute of an attestationsCollection. The attribute should already be created.\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute (must be between 0 and 63)\\n * @param value Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15\\n */\\n function setAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 index,\\n uint8 value\\n ) external;\\n\\n function setAttributesValuesForAttestationsCollections(\\n uint256[] memory collectionIds,\\n uint8[] memory indices,\\n uint8[] memory values\\n ) external;\\n\\n /**\\n * @dev Returns all the enabled attributes names and their values for a specific attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n */\\n function getAttributesNamesAndValuesForAttestationsCollection(\\n uint256 collectionId\\n ) external view returns (bytes32[] memory, uint8[] memory);\\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 /**\\n * @dev Create a new attribute.\\n * @param index Index of the attribute. Can go from 0 to 63.\\n * @param name Name in bytes32 of the attribute\\n */\\n function createNewAttribute(uint8 index, bytes32 name) external;\\n\\n function createNewAttributes(uint8[] memory indices, bytes32[] memory names) external;\\n\\n /**\\n * @dev Update the name of an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n * @param newName new name in bytes32 of the attribute\\n */\\n function updateAttributeName(uint8 index, bytes32 newName) external;\\n\\n function updateAttributesName(uint8[] memory indices, bytes32[] memory names) external;\\n\\n /**\\n * @dev Delete an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n */\\n function deleteAttribute(uint8 index) external;\\n\\n function deleteAttributes(uint8[] memory indices) external;\\n}\\n\",\"keccak256\":\"0x07a1a9e8d2caf1d810ba8fb760a35ce2a0ef60a76814d44881a5aa56162ce26b\",\"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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\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 /**\\n * @dev Getter of the badge issuer\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeIssuer(address account, uint256 id) external view returns (address);\\n\\n /**\\n * @dev Getter of the badge timestamp\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeTimestamp(address account, uint256 id) external view returns (uint32);\\n\\n /**\\n * @dev Getter of the badge extra data (it can store nullifier and burnCount)\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeExtraData(address account, uint256 id) external view returns (bytes memory);\\n\\n /**\\n * @dev Getter of the value of a specific badge attribute\\n * @param id Badge Id to check (= attestationCollectionId)\\n * @param index Index of the attribute\\n */\\n function getAttributeValueForBadge(uint256 id, uint8 index) external view returns (uint8);\\n\\n /**\\n * @dev Getter of all badge attributes and their values for a specific badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getAttributesNamesAndValuesForBadge(\\n uint256 id\\n ) external view returns (bytes32[] memory, uint8[] memory);\\n}\\n\",\"keccak256\":\"0xd6bdfc887ef15ee022eb05d89dbe2e2938ee6c0a55a55f8db527ef650242c6bb\",\"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';\\nimport {Bitmap256Bit} from '../utils/Bitmap256Bit.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 using Bitmap256Bit for uint256;\\n using Bitmap256Bit for uint8;\\n\\n /******************************************\\n *\\n * ATTESTATION REGISTRY WRITE ACCESS MANAGEMENT (ISSUERS)\\n *\\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 /**\\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 *\\n * ATTRIBUTES CONFIG LOGIC\\n *\\n *****************************************/\\n\\n /**\\n * @dev Create a new attribute.\\n * @param index Index of the attribute. Can go from 0 to 63.\\n * @param name Name in bytes32 of the attribute\\n */\\n function createNewAttribute(uint8 index, bytes32 name) public onlyOwner {\\n index._checkIndexIsValid();\\n if (_isAttributeCreated(index)) {\\n revert AttributeAlreadyExists(index);\\n }\\n _createNewAttribute(index, name);\\n }\\n\\n function createNewAttributes(uint8[] memory indices, bytes32[] memory names) external onlyOwner {\\n if (indices.length != names.length) {\\n revert ArgsLengthDoesNotMatch();\\n }\\n\\n for (uint256 i = 0; i < indices.length; i++) {\\n createNewAttribute(indices[i], names[i]);\\n }\\n }\\n\\n /**\\n * @dev Update the name of an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n * @param newName new name in bytes32 of the attribute\\n */\\n function updateAttributeName(uint8 index, bytes32 newName) public onlyOwner {\\n index._checkIndexIsValid();\\n if (!_isAttributeCreated(index)) {\\n revert AttributeDoesNotExist(index);\\n }\\n _updateAttributeName(index, newName);\\n }\\n\\n function updateAttributesName(\\n uint8[] memory indices,\\n bytes32[] memory newNames\\n ) external onlyOwner {\\n if (indices.length != newNames.length) {\\n revert ArgsLengthDoesNotMatch();\\n }\\n\\n for (uint256 i = 0; i < indices.length; i++) {\\n updateAttributeName(indices[i], newNames[i]);\\n }\\n }\\n\\n /**\\n * @dev Delete an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must already exist\\n */\\n function deleteAttribute(uint8 index) public onlyOwner {\\n index._checkIndexIsValid();\\n if (!_isAttributeCreated(index)) {\\n revert AttributeDoesNotExist(index);\\n }\\n _deleteAttribute(index);\\n }\\n\\n function deleteAttributes(uint8[] memory indices) external onlyOwner {\\n for (uint256 i = 0; i < indices.length; i++) {\\n deleteAttribute(indices[i]);\\n }\\n }\\n\\n /**\\n * @dev Set a value for an attribute of an attestationsCollection. The attribute should already be created.\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute (must be between 0 and 63)\\n * @param value Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15\\n */\\n function setAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 index,\\n uint8 value\\n ) public onlyOwner {\\n index._checkIndexIsValid();\\n\\n if (!_isAttributeCreated(index)) {\\n revert AttributeDoesNotExist(index);\\n }\\n\\n _setAttributeForAttestationsCollection(collectionId, index, value);\\n }\\n\\n function setAttributesValuesForAttestationsCollections(\\n uint256[] memory collectionIds,\\n uint8[] memory indices,\\n uint8[] memory values\\n ) external onlyOwner {\\n if (collectionIds.length != indices.length || collectionIds.length != values.length) {\\n revert ArgsLengthDoesNotMatch();\\n }\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n setAttributeValueForAttestationsCollection(collectionIds[i], indices[i], values[i]);\\n }\\n }\\n\\n /**\\n * @dev Returns the attribute's value (from 0 to 15) of an attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute. Can go from 0 to 63.\\n */\\n function getAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 index\\n ) public view returns (uint8) {\\n uint256 currentAttributesValues = _getAttributesValuesBitmapForAttestationsCollection(\\n collectionId\\n );\\n return currentAttributesValues._get(index);\\n }\\n\\n function getAttributesValuesForAttestationsCollection(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (uint8[] memory) {\\n uint8[] memory attributesValues = new uint8[](indices.length);\\n for (uint256 i = 0; i < indices.length; i++) {\\n attributesValues[i] = getAttributeValueForAttestationsCollection(collectionId, indices[i]);\\n }\\n return attributesValues;\\n }\\n\\n /**\\n * @dev Returns whether an attestationsCollection has a specific attribute referenced by its index\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute. Can go from 0 to 63.\\n */\\n function attestationsCollectionHasAttribute(\\n uint256 collectionId,\\n uint8 index\\n ) public view returns (bool) {\\n uint256 currentAttributeValues = _getAttributesValuesBitmapForAttestationsCollection(\\n collectionId\\n );\\n return currentAttributeValues._get(index) > 0;\\n }\\n\\n function attestationsCollectionHasAttributes(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (bool) {\\n for (uint256 i = 0; i < indices.length; i++) {\\n if (!attestationsCollectionHasAttribute(collectionId, indices[i])) {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /**\\n * @dev Returns all the enabled attributes names and their values for a specific attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n */\\n function getAttributesNamesAndValuesForAttestationsCollection(\\n uint256 collectionId\\n ) public view returns (bytes32[] memory, uint8[] memory) {\\n uint256 currentAttributesValues = _getAttributesValuesBitmapForAttestationsCollection(\\n collectionId\\n );\\n\\n (\\n uint8[] memory indices,\\n uint8[] memory values,\\n uint8 nbOfNonZeroValues\\n ) = currentAttributesValues._getAllNonZeroValues();\\n\\n bytes32[] memory attributesNames = new bytes32[](nbOfNonZeroValues);\\n uint8[] memory attributesValues = new uint8[](nbOfNonZeroValues);\\n for (uint8 i = 0; i < nbOfNonZeroValues; i++) {\\n attributesNames[i] = _attributesNames[indices[i]];\\n attributesValues[i] = values[i];\\n }\\n\\n return (attributesNames, attributesValues);\\n }\\n\\n /*****************************\\n *\\n * INTERNAL FUNCTIONS\\n *\\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 function _isAuthorized(address issuer, uint256 collectionId) internal view returns (bool) {\\n return _authorizedRanges[issuer]._includes(collectionId);\\n }\\n\\n function _setAttributeForAttestationsCollection(\\n uint256 collectionId,\\n uint8 index,\\n uint8 value\\n ) internal {\\n uint256 currentAttributes = _getAttributesValuesBitmapForAttestationsCollection(collectionId);\\n\\n _attestationsCollectionAttributesValuesBitmap[collectionId] = currentAttributes._set(\\n index,\\n value\\n );\\n\\n emit AttestationsCollectionAttributeSet(collectionId, index, value);\\n }\\n\\n function _createNewAttribute(uint8 index, bytes32 name) internal {\\n _attributesNames[index] = name;\\n\\n emit NewAttributeCreated(index, name);\\n }\\n\\n function _updateAttributeName(uint8 index, bytes32 newName) internal {\\n bytes32 previousName = _attributesNames[index];\\n\\n _attributesNames[index] = newName;\\n\\n emit AttributeNameUpdated(index, newName, previousName);\\n }\\n\\n function _deleteAttribute(uint8 index) internal {\\n bytes32 deletedName = _attributesNames[index];\\n\\n delete _attributesNames[index];\\n\\n emit AttributeDeleted(index, deletedName);\\n }\\n\\n function _getAttributesValuesBitmapForAttestationsCollection(\\n uint256 collectionId\\n ) internal view returns (uint256) {\\n return _attestationsCollectionAttributesValuesBitmap[collectionId];\\n }\\n\\n function _isAttributeCreated(uint8 index) internal view returns (bool) {\\n if (_attributesNames[index] == 0) {\\n return false;\\n }\\n return true;\\n }\\n}\\n\",\"keccak256\":\"0xa48b3131a3870684389282cb863a34734c67194d7f50d266ed8421114b3d786a\",\"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 /*******************************************************\\n Storage layout:\\n 19 slots for config\\n 4 currently used for _initialized, _initializing, _paused, _owner\\n 15 place holders\\n 16 slots for logic\\n 3 currently used for _authorizedRanges, _attestationsCollectionAttributesValuesBitmap, _attributesNames\\n 13 place holders\\n 1 slot for _attestationsData \\n *******************************************************/\\n\\n // main config\\n // changed `_initialized` from bool to uint8\\n // as we were using OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\\n // and changed to OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n // PR: https://github.com/sismo-core/sismo-protocol/pull/41\\n uint8 internal _initialized;\\n bool internal _initializing;\\n bool internal _paused;\\n address internal _owner;\\n // keeping some space for future\\n uint256[15] private _placeHoldersAdmin;\\n\\n // storing the authorized ranges for each attesters\\n mapping(address => Range[]) internal _authorizedRanges;\\n // Storing the attributes values used for each attestations collection\\n // Each attribute value is an hexadecimal\\n mapping(uint256 => uint256) internal _attestationsCollectionAttributesValuesBitmap;\\n // Storing the attribute name for each attributes index\\n mapping(uint8 => bytes32) internal _attributesNames;\\n // keeping some space for future\\n uint256[13] private _placeHoldersConfig;\\n // storing the data of attestations\\n // =collectionId=> =owner=> attestationData\\n mapping(uint256 => mapping(address => AttestationData)) internal _attestationsData;\\n}\\n\",\"keccak256\":\"0xabd7a629901a128cc32f80102ce06db228a76bd04f27818ccaf54827921eb149\",\"license\":\"MIT\"},\"contracts/core/libs/attestations-registry/InitializableLogic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) ||\\n (!Address.isContract(address(this)) && _initialized == 1),\\n 'Initializable: contract is already initialized'\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(\\n !_initializing && _initialized < version,\\n 'Initializable: contract is already initialized'\\n );\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, 'Initializable: contract is not initializing');\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, 'Initializable: contract is initializing');\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x64d931c5e29318bd4ae2ec44b3be45783ad7ad20431594bbcb9ae4e2014bc5ef\",\"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(\\n address target,\\n bytes memory data\\n ) 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\":\"0xdbca640e165333604a6121b07d206eea2b596dd3c3bb4d62caa436a05ac1d91d\",\"license\":\"MIT\"},\"contracts/core/libs/utils/Bitmap256Bit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\n/*\\n * The 256-bit bitmap is structured in 64 chuncks of 4 bits each.\\n * The 4 bits can encode any value from 0 to 15.\\n\\n chunck63 chunck2 chunck1 chunck0\\n bits bits bits bits \\n \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510 \\u250c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u252c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u252c\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2510\\n \\u2502 1 1 1 1 \\u2502 .... \\u2502 1 0 1 1 \\u2502 0 0 0 0 \\u2502 0 0 0 1 \\u2502\\n \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518 \\u2514\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2534\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2534\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2500\\u2518\\n value 15 value 11 value 0 value 1\\n\\n * A chunck index must be between 0 and 63.\\n * A value must be between 0 and 15.\\n **/\\n\\nlibrary Bitmap256Bit {\\n uint256 constant MAX_INT = 2 ** 256 - 1;\\n\\n error IndexOutOfBounds(uint8 index);\\n error ValueOutOfBounds(uint8 value);\\n\\n /**\\n * @dev Return the value at a given index of a 256-bit bitmap\\n * @param index index where the value can be found. Can be between 0 and 63\\n */\\n function _get(uint256 self, uint8 index) internal pure returns (uint8) {\\n uint256 currentValues = self;\\n // Get the encoded 4-bit value by right shifting to the `index` position\\n uint256 shifted = currentValues >> (4 * index);\\n // Get the value by only masking the last 4 bits with an AND operator\\n return uint8(shifted & (2 ** 4 - 1));\\n }\\n\\n /**\\n * @dev Set a value at a chosen index in a 256-bit bitmap\\n * @param index index where the value will be stored. Can be between 0 and 63\\n * @param value value to store. Can be between 0 and 15\\n */\\n function _set(uint256 self, uint8 index, uint8 value) internal pure returns (uint256) {\\n _checkIndexIsValid(index);\\n _checkValueIsValid(value);\\n\\n uint256 currentValues = self;\\n // 1. first we need to remove the current value for the inputed `index`\\n // Left Shift 4 bits mask (1111 mask) to the `index` position\\n uint256 mask = (2 ** 4 - 1) << (4 * index);\\n // Apply a XOR operation to obtain a mask with all bits set to 1 except the 4 bits that we want to remove\\n uint256 negativeMask = MAX_INT ^ mask;\\n // Apply a AND operation between the current values and the negative mask to remove the wanted bits\\n uint256 newValues = currentValues & negativeMask;\\n\\n // 2. We set the new value wanted at the `index` position\\n // Create the 4 bits encoding the new value and left shift them to the `index` position\\n uint256 newValueMask = uint256(value) << (4 * index);\\n // Apply an OR operation between the current values and the newValueMask to reference new value\\n return newValues | newValueMask;\\n }\\n\\n /**\\n * @dev Get all the non-zero values in a 256-bit bitmap\\n * @param self a 256-bit bitmap\\n */\\n function _getAllNonZeroValues(\\n uint256 self\\n ) internal pure returns (uint8[] memory, uint8[] memory, uint8) {\\n uint8[] memory indices = new uint8[](64);\\n uint8[] memory values = new uint8[](64);\\n uint8 nbOfNonZeroValues = 0;\\n for (uint8 i = 0; i < 63; i++) {\\n uint8 value = _get(self, i);\\n if (value > 0) {\\n indices[nbOfNonZeroValues] = i;\\n values[nbOfNonZeroValues] = value;\\n nbOfNonZeroValues++;\\n }\\n }\\n return (indices, values, nbOfNonZeroValues);\\n }\\n\\n /**\\n * @dev Check if the index is valid (is between 0 and 63)\\n * @param index index of a chunck\\n */\\n function _checkIndexIsValid(uint8 index) internal pure {\\n if (index > 63) {\\n revert IndexOutOfBounds(index);\\n }\\n }\\n\\n /**\\n * @dev Check if the value is valid (is between 0 and 15)\\n * @param value value to encode in a chunck\\n */\\n function _checkValueIsValid(uint8 value) internal pure {\\n if (value > 15) {\\n revert ValueOutOfBounds(value);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xac6ca38e106fb9e999b0c765dba0f8894697c3aead9459ffeab6b32e3560b39e\",\"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": "0x60a06040523480156200001157600080fd5b506040516200393538038062003935833981016040819052620000349162000209565b6200003f336200006b565b6000805462ff0000191690556001600160a01b0381166080526200006382620000c8565b505062000241565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054600390610100900460ff16158015620000eb575060005460ff8083169116105b620001535760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805461ffff191660ff83161761010017815562000181600054630100000090046001600160a01b031690565b6001600160a01b03161480620001965750303b155b15620001a757620001a7826200006b565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b80516001600160a01b03811681146200020457600080fd5b919050565b600080604083850312156200021d57600080fd5b6200022883620001ec565b91506200023860208401620001ec565b90509250929050565b6080516136d86200025d600039600061258301526136d86000f3fe608060405234801561001057600080fd5b50600436106102275760003560e01c80637ffe93fc11610130578063b8865673116100b8578063dc873d011161007c578063dc873d0114610566578063e78d54bb14610586578063e972f91014610599578063ebc5c093146105ac578063f2fde38b146105bf57600080fd5b8063b8865673146104e5578063c06d5db6146104f8578063c4d66de81461050b578063c7da9aa61461051e578063da5d314b1461055357600080fd5b806384c2ad82116100ff57806384c2ad821461044d5780638c3c9e321461046d5780638da5cb5b1461048e578063aad9a979146104bf578063b1cb1662146104d257600080fd5b80637ffe93fc1461040c578063811a6af71461041f57806381213f22146104325780638456cb591461044557600080fd5b8063436a76f3116101b35780636d7fbb67116101825780636d7fbb67146103a4578063715018a6146103c4578063754b377c146103cc5780637cc920b4146103e65780637cde0fe2146103f957600080fd5b8063436a76f31461033f5780635657f0361461035f5780635c975abb1461038057806364fff83c1461039157600080fd5b80631538ff08116101fa5780631538ff08146102db578063181dfdff146102ee5780632972b0f0146103015780633be1ced7146103145780633f4ba83a1461033757600080fd5b8063011023901461022c57806305b374211461025457806314067f8b1461026957806315027bda146102bb575b600080fd5b61023f61023a366004612932565b6105d2565b60405190151581526020015b60405180910390f35b61026761026236600461296f565b6105e9565b005b6102a6610277366004612932565b6000918252602080805260408084206001600160a01b0393909316845291905290206002015463ffffffff1690565b60405163ffffffff909116815260200161024b565b6102ce6102c9366004612a95565b610669565b60405161024b9190612be4565b6102676102e9366004612ca8565b61075a565b6102676102fc366004612dd2565b61080d565b61023f61030f366004612e45565b6108cd565b610327610322366004612932565b6108e0565b60405161024b9493929190612e61565b6102676109f6565b61035261034d366004612e9e565b610a32565b60405161024b9190612f22565b61037261036d366004612f35565b610ae0565b60405161024b929190612f4e565b60005462010000900460ff1661023f565b61026761039f366004612f9b565b610c65565b6103b76103b2366004612932565b610cd7565b60405161024b9190612fcf565b610267610d8f565b6103d4600381565b60405160ff909116815260200161024b565b6102676103f4366004612fe2565b610dcb565b61026761040736600461305f565b610ea2565b61026761041a366004613092565b610edf565b61026761042d3660046130f8565b610f54565b61023f610440366004612e9e565b611330565b61026761138a565b61046061045b366004612932565b6113c4565b60405161024b9190613163565b61048061047b366004612932565b6113f1565b60405190815260200161024b565b6104a7600054630100000090046001600160a01b031690565b6040516001600160a01b03909116815260200161024b565b6102676104cd36600461296f565b6113fd565b6102676104e0366004612ca8565b611471565b6102676104f3366004613176565b61151f565b6102676105063660046131b9565b6115b4565b6102676105193660046131f2565b6115f2565b6104a761052c366004612932565b6000918252602080805260408084206001600160a01b039384168552909152909120541690565b61023f61056136600461320d565b61170c565b610579610574366004612a95565b611733565b60405161024b9190613230565b610267610594366004613274565b6117f3565b6103d46105a736600461320d565b611867565b6102676105ba3660046132b0565b611888565b6102676105cd3660046131f2565b611ce0565b60006105de8383611d80565b151590505b92915050565b6000546001600160a01b0363010000009091041633146106245760405162461bcd60e51b815260040161061b906132f1565b60405180910390fd5b6106308260ff16611da9565b61063982611dd3565b61065b5760405163eabeadd360e01b815260ff8316600482015260240161061b565b6106658282611dfc565b5050565b6060600083516001600160401b0381111561068657610686612999565b6040519080825280602002602001820160405280156106d757816020015b60408051608081018252600080825260208083018290529282015260608082015282526000199092019101816106a45790505b50905060005b8451811015610752576107228582815181106106fb576106fb613326565b602002602001015185838151811061071557610715613326565b6020026020010151611e5c565b82828151811061073457610734613326565b6020026020010181905250808061074a90613352565b9150506106dd565b509392505050565b6000546001600160a01b03630100000090910416331461078c5760405162461bcd60e51b815260040161061b906132f1565b80518251146107ae57604051636e37235160e11b815260040160405180910390fd5b60005b8251811015610808576107f68382815181106107cf576107cf613326565b60200260200101518383815181106107e9576107e9613326565b60200260200101516105e9565b8061080081613352565b9150506107b1565b505050565b6000546001600160a01b03630100000090910416331461083f5760405162461bcd60e51b815260040161061b906132f1565b60005b81518110156108c7576108b5848284848151811061086257610862613326565b6020026020010151610874919061336b565b85848151811061088657610886613326565b6020026020010151600001518685815181106108a4576108a4613326565b602002602001015160200151611f6b565b806108bf81613352565b915050610842565b50505050565b60006108d9838361220a565b9392505050565b6000828152602080805260408083206001600160a01b038086168552908352818420825160808101845281549092168252600181015493820193909352600283015463ffffffff1691810191909152600382018054849384936060938593919291838601919061094f90613382565b80601f016020809104026020016040519081016040528092919081815260200182805461097b90613382565b80156109c85780601f1061099d576101008083540402835291602001916109c8565b820191906000526020600020905b8154815290600101906020018083116109ab57829003601f168201915b505050919092525050815160208301516040840151606090940151919b909a50929850965090945050505050565b6000546001600160a01b036301000000909104163314610a285760405162461bcd60e51b815260040161061b906132f1565b610a3061222c565b565b6060600082516001600160401b03811115610a4f57610a4f612999565b604051908082528060200260200182016040528015610a78578160200160208202803683370190505b50905060005b835181101561075257610aaa85858381518110610a9d57610a9d613326565b6020026020010151611867565b828281518110610abc57610abc613326565b60ff9092166020928302919091019091015280610ad881613352565b915050610a7e565b6000818152601160205260408120546060918291908080610b00846122c7565b92509250925060008160ff166001600160401b03811115610b2357610b23612999565b604051908082528060200260200182016040528015610b4c578160200160208202803683370190505b50905060008260ff166001600160401b03811115610b6c57610b6c612999565b604051908082528060200260200182016040528015610b95578160200160208202803683370190505b50905060005b8360ff168160ff161015610c565760126000878360ff1681518110610bc257610bc2613326565b602002602001015160ff1660ff16815260200190815260200160002054838260ff1681518110610bf457610bf4613326565b602002602001018181525050848160ff1681518110610c1557610c15613326565b6020026020010151828260ff1681518110610c3257610c32613326565b60ff9092166020928302919091019091015280610c4e816133bc565b915050610b9b565b50909890975095505050505050565b6000546001600160a01b036301000000909104163314610c975760405162461bcd60e51b815260040161061b906132f1565b60005b815181101561066557610cc5828281518110610cb857610cb8613326565b6020026020010151610edf565b80610ccf81613352565b915050610c9a565b6000828152602080805260408083206001600160a01b03851684529091529020600301805460609190610d0990613382565b80601f0160208091040260200160405190810160405280929190818152602001828054610d3590613382565b8015610d825780601f10610d5757610100808354040283529160200191610d82565b820191906000526020600020905b815481529060010190602001808311610d6557829003601f168201915b5050505050905092915050565b6000546001600160a01b036301000000909104163314610dc15760405162461bcd60e51b815260040161061b906132f1565b610a3060006123bc565b6000546001600160a01b036301000000909104163314610dfd5760405162461bcd60e51b815260040161061b906132f1565b81518351141580610e1057508051835114155b15610e2e57604051636e37235160e11b815260040160405180910390fd5b60005b83518110156108c757610e90848281518110610e4f57610e4f613326565b6020026020010151848381518110610e6957610e69613326565b6020026020010151848481518110610e8357610e83613326565b60200260200101516117f3565b80610e9a81613352565b915050610e31565b6000546001600160a01b036301000000909104163314610ed45760405162461bcd60e51b815260040161061b906132f1565b610808838383612419565b6000546001600160a01b036301000000909104163314610f115760405162461bcd60e51b815260040161061b906132f1565b610f1d8160ff16611da9565b610f2681611dd3565b610f485760405163eabeadd360e01b815260ff8216600482015260240161061b565b610f51816124ac565b50565b60005462010000900460ff1615610f7d5760405162461bcd60e51b815260040161061b906133db565b828114610fa55783838383604051638ceb003d60e01b815260040161061b9493929190613405565b3360005b8481101561132857600060206000868685818110610fc957610fc9613326565b9050602002013581526020019081526020016000206000888885818110610ff257610ff2613326565b905060200201602081019061100791906131f2565b6001600160a01b0390811682526020808301939093526040918201600020825160808101845281549092168252600181015493820193909352600283015463ffffffff169181019190915260038201805491929160608401919061106a90613382565b80601f016020809104026020016040519081016040528092919081815260200182805461109690613382565b80156110e35780601f106110b8576101008083540402835291602001916110e3565b820191906000526020600020905b8154815290600101906020018083116110c657829003601f168201915b50505050508152505090506111108386868581811061110457611104613326565b9050602002013561220a565b61115a578285858481811061112757611127613326565b60405163c522f21160e01b81526001600160a01b039094166004850152602002919091013560248301525060440161061b565b6020600086868581811061117057611170613326565b905060200201358152602001908152602001600020600088888581811061119957611199613326565b90506020020160208101906111ae91906131f2565b6001600160a01b031681526020810191909152604001600090812080546001600160a01b03191681556001810182905560028101805463ffffffff19169055906111fb6003830182612843565b505061124c85858481811061121257611212613326565b9050602002013588888581811061122b5761122b613326565b905060200201602081019061124091906131f2565b836020015160006124fb565b7f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b6040518060c0016040528087878681811061128a5761128a613326565b9050602002013581526020018989868181106112a8576112a8613326565b90506020020160208101906112bd91906131f2565b6001600160a01b0316815260200183600001516001600160a01b0316815260200183602001518152602001836040015163ffffffff168152602001836060015181525060405161130d9190613487565b60405180910390a1508061132081613352565b915050610fa9565b505050505050565b6000805b8251811015611380576113608484838151811061135357611353613326565b602002602001015161170c565b61136e5760009150506105e3565b8061137881613352565b915050611334565b5060019392505050565b6000546001600160a01b0363010000009091041633146113bc5760405162461bcd60e51b815260040161061b906132f1565b610a306125ec565b60408051608081018252600080825260208201819052918101919091526060808201526108d98383611e5c565b60006108d98383611d80565b6000546001600160a01b03630100000090910416331461142f5760405162461bcd60e51b815260040161061b906132f1565b61143b8260ff16611da9565b61144482611dd3565b1561146757604051635d04d75160e01b815260ff8316600482015260240161061b565b610665828261264e565b6000546001600160a01b0363010000009091041633146114a35760405162461bcd60e51b815260040161061b906132f1565b80518251146114c557604051636e37235160e11b815260040160405180910390fd5b60005b82518110156108085761150d8382815181106114e6576114e6613326565b602002602001015183838151811061150057611500613326565b60200260200101516113fd565b8061151781613352565b9150506114c8565b6000546001600160a01b0363010000009091041633146115515760405162461bcd60e51b815260040161061b906132f1565b60005b8151811015610808576115a28383838151811061157357611573613326565b60200260200101516000015184848151811061159157611591613326565b602002602001015160200151612419565b806115ac81613352565b915050611554565b6000546001600160a01b0363010000009091041633146115e65760405162461bcd60e51b815260040161061b906132f1565b6108c784848484611f6b565b600054600390610100900460ff16158015611614575060005460ff8083169116105b6116775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161061b565b6000805461ffff191660ff8316176101001781556116a4600054630100000090046001600160a01b031690565b6001600160a01b031614806116b85750303b155b156116c6576116c6826123bc565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b60008281526011602052604081205460006117278285612699565b60ff1611949350505050565b6060600083516001600160401b0381111561175057611750612999565b604051908082528060200260200182016040528015611779578160200160208202803683370190505b50905060005b8451811015610752576117c485828151811061179d5761179d613326565b60200260200101518583815181106117b7576117b7613326565b6020026020010151611d80565b8282815181106117d6576117d6613326565b6020908102919091010152806117eb81613352565b91505061177f565b6000546001600160a01b0363010000009091041633146118255760405162461bcd60e51b815260040161061b906132f1565b6118318260ff16611da9565b61183a82611dd3565b61185c5760405163eabeadd360e01b815260ff8316600482015260240161061b565b6108088383836126be565b6000828152601160205260408120546118808184612699565b949350505050565b60005462010000900460ff16156118b15760405162461bcd60e51b815260040161061b906133db565b3360005b828110156108c7576118eb828585848181106118d3576118d3613326565b90506020028101906118e591906134e8565b3561220a565b61193f578184848381811061190257611902613326565b905060200281019061191491906134e8565b60405163c522f21160e01b81526001600160a01b03909216600483015235602482015260440161061b565b60006020600086868581811061195757611957613326565b905060200281019061196991906134e8565b600001358152602001908152602001600020600086868581811061198f5761198f613326565b90506020028101906119a191906134e8565b6119b29060408101906020016131f2565b6001600160a01b03166001600160a01b0316815260200190815260200160002060010154905060405180608001604052808686858181106119f5576119f5613326565b9050602002810190611a0791906134e8565b611a189060608101906040016131f2565b6001600160a01b03168152602001868685818110611a3857611a38613326565b9050602002810190611a4a91906134e8565b606001358152602001868685818110611a6557611a65613326565b9050602002810190611a7791906134e8565b611a889060a081019060800161351c565b63ffffffff168152602001868685818110611aa557611aa5613326565b9050602002810190611ab791906134e8565b611ac59060a0810190613537565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250602092508890508786818110611b1257611b12613326565b9050602002810190611b2491906134e8565b6000013581526020019081526020016000206000878786818110611b4a57611b4a613326565b9050602002810190611b5c91906134e8565b611b6d9060408101906020016131f2565b6001600160a01b0390811682526020808301939093526040918201600020845181546001600160a01b03191692169190911781558383015160018201559083015160028201805463ffffffff191663ffffffff909216919091179055606083015180519192611be49260038501929091019061287d565b50905050611c73858584818110611bfd57611bfd613326565b9050602002810190611c0f91906134e8565b35868685818110611c2257611c22613326565b9050602002810190611c3491906134e8565b611c459060408101906020016131f2565b83888887818110611c5857611c58613326565b9050602002810190611c6a91906134e8565b606001356124fb565b7f8c20c3acb6b5208b7affea2fd90dabc8d47e77cee9766c855ce42730505cb205858584818110611ca657611ca6613326565b9050602002810190611cb891906134e8565b604051611cc591906135a6565b60405180910390a15080611cd881613352565b9150506118b5565b6000546001600160a01b036301000000909104163314611d125760405162461bcd60e51b815260040161061b906132f1565b6001600160a01b038116611d775760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161061b565b610f51816123bc565b6000918252602080805260408084206001600160a01b0393909316845291905290206001015490565b603f8160ff161115610f515760405163453e14b960e01b815260ff8216600482015260240161061b565b60ff81166000908152601260205260408120548103611df457506000919050565b506001919050565b60ff82166000818152601260209081526040918290208054908590558251938452908301849052908201819052907f0d3d8d66bac9b2a9f0e5c83181a30443294ab849472526080d03fffd7187f7169060600160405180910390a1505050565b60408051608081018252600080825260208201819052918101919091526060808201526000838152602080805260408083206001600160a01b03808716855290835292819020815160808101835281549094168452600181015492840192909252600282015463ffffffff1690830152600381018054606084019190611ee190613382565b80601f0160208091040260200160405190810160405280929190818152602001828054611f0d90613382565b8015611f5a5780601f10611f2f57610100808354040283529160200191611f5a565b820191906000526020600020905b815481529060010190602001808311611f3d57829003601f168201915b505050505081525050905092915050565b6000546001600160a01b036301000000909104163314611f9d5760405162461bcd60e51b815260040161061b906132f1565b6001600160a01b0384166000908152601060205260409020548310611fff576001600160a01b038416600081815260106020526040908190205490516345e388eb60e01b8152600481019290925260248201526044810184905260640161061b565b6001600160a01b038416600090815260106020526040812080548590811061202957612029613326565b600091825260208083206002909202909101546001600160a01b03881683526010909152604082208054919350908690811061206757612067613326565b9060005260206000209060020201600101549050818414158061208a5750808314155b156120d657604051637a4dd76560e01b81526001600160a01b03871660048201526024810186905260448101839052606481018290526084810185905260a4810184905260c40161061b565b6001600160a01b038616600090815260106020526040902080546120fc9060019061336b565b8154811061210c5761210c613326565b906000526020600020906002020160106000886001600160a01b03166001600160a01b03168152602001908152602001600020868154811061215057612150613326565b60009182526020808320845460029093020191825560019384015493909101929092556001600160a01b038816815260109091526040902080548061219757612197613663565b6000828152602080822060026000199490940193840201828155600101919091559155604080516001600160a01b038916815291820186905281018490527f33cff58e54c3a8acae85cad63487b5dcf617521e33bb03f071299f374c29de1f9060600160405180910390a1505050505050565b6001600160a01b03821660009081526010602052604081206108d99083612732565b60005462010000900460ff1661227b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161061b565b6000805462ff0000191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60408051818152610820810182526060918291600091829190602082016108008036833750506040805181815261082081018252929350600092915060208201610800803683370190505090506000805b603f8160ff1610156123ae5760006123308983612699565b905060ff81161561239b5781858460ff168151811061235157612351613326565b602002602001019060ff16908160ff168152505080848460ff168151811061237b5761237b613326565b60ff9092166020928302919091019091015282612397816133bc565b9350505b50806123a6816133bc565b915050612318565b509196909550909350915050565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60408051808201825283815260208082018481526001600160a01b03871660008181526010845285812080546001808201835591835291859020865160029093020191825592519201919091558351908152908101859052918201839052907fe7d6ac0b740347f7f96a97e6a9dc0f20f4f11eca65495315adc009a55b6762f8906060015b60405180910390a150505050565b60ff811660008181526012602090815260408083208054939055805193845290830182905290917feb82955a27e39ea7559b6ec7e7d8b371081ab0d8783c7b0d01597555e7dcadbf9101611700565b8181113060008261250c578561250f565b60005b905060008361251f576000612521565b865b905060008461253957612534868861336b565b612543565b612543878761336b565b604051633885984b60e11b81526001600160a01b03868116600483015285811660248301528481166044830152606482018c9052608482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063710b30969060a401600060405180830381600087803b1580156125c957600080fd5b505af11580156125dd573d6000803e3d6000fd5b50505050505050505050505050565b60005462010000900460ff16156126155760405162461bcd60e51b815260040161061b906133db565b6000805462ff00001916620100001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586122aa3390565b60ff8216600081815260126020908152604091829020849055815192835282018390527f16f0bfe4b02efd5423ef8906906b049c0943f21df8f10347d319fddbc59222079101611700565b600082816126a8846004613679565b60ff1682901c905080600f169250505092915050565b6000838152601160205260409020546126d88184846127c0565b6000858152601160205260409081902091909155517f393b86c90799fa411201ae723a54e105823fcf7c6c8dffa90903fc44c03b4ac79061249e9086908690869092835260ff918216602084015216604082015260600190565b6000805b83548110156127b65783818154811061275157612751613326565b9060005260206000209060020201600001548310158015612795575083818154811061277f5761277f613326565b9060005260206000209060020201600101548311155b156127a45760019150506105e3565b806127ae81613352565b915050612736565b5060009392505050565b60006127cb83611da9565b6127d482612819565b8360006127e2856004613679565b600f60ff919091161b905060001981188281166000612802886004613679565b60ff97881697169690961b17979650505050505050565b600f8160ff161115610f51576040516329afd27b60e21b815260ff8216600482015260240161061b565b50805461284f90613382565b6000825580601f1061285f575050565b601f016020900490600052602060002090810190610f519190612901565b82805461288990613382565b90600052602060002090601f0160209004810192826128ab57600085556128f1565b82601f106128c457805160ff19168380011785556128f1565b828001600101855582156128f1579182015b828111156128f15782518255916020019190600101906128d6565b506128fd929150612901565b5090565b5b808211156128fd5760008155600101612902565b80356001600160a01b038116811461292d57600080fd5b919050565b6000806040838503121561294557600080fd5b8235915061295560208401612916565b90509250929050565b803560ff8116811461292d57600080fd5b6000806040838503121561298257600080fd5b61298b8361295e565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156129d1576129d1612999565b60405290565b604051601f8201601f191681016001600160401b03811182821017156129ff576129ff612999565b604052919050565b60006001600160401b03821115612a2057612a20612999565b5060051b60200190565b600082601f830112612a3b57600080fd5b81356020612a50612a4b83612a07565b6129d7565b82815260059290921b84018101918181019086841115612a6f57600080fd5b8286015b84811015612a8a5780358352918301918301612a73565b509695505050505050565b60008060408385031215612aa857600080fd5b82356001600160401b0380821115612abf57600080fd5b612acb86838701612a2a565b9350602091508185013581811115612ae257600080fd5b85019050601f81018613612af557600080fd5b8035612b03612a4b82612a07565b81815260059190911b82018301908381019088831115612b2257600080fd5b928401925b82841015612b4757612b3884612916565b82529284019290840190612b27565b80955050505050509250929050565b6000815180845260005b81811015612b7c57602081850181015186830182015201612b60565b81811115612b8e576000602083870101525b50601f01601f19169290920160200192915050565b60018060a01b0381511682526020810151602083015263ffffffff604082015116604083015260006060820151608060608501526118806080850182612b56565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015612c3957603f19888603018452612c27858351612ba3565b94509285019290850190600101612c0b565b5092979650505050505050565b600082601f830112612c5757600080fd5b81356020612c67612a4b83612a07565b82815260059290921b84018101918181019086841115612c8657600080fd5b8286015b84811015612a8a57612c9b8161295e565b8352918301918301612c8a565b60008060408385031215612cbb57600080fd5b82356001600160401b0380821115612cd257600080fd5b612cde86838701612c46565b9350602091508185013581811115612cf557600080fd5b85019050601f81018613612d0857600080fd5b8035612d16612a4b82612a07565b81815260059190911b82018301908381019088831115612d3557600080fd5b928401925b82841015612b4757833582529284019290840190612d3a565b600082601f830112612d6457600080fd5b81356020612d74612a4b83612a07565b82815260069290921b84018101918181019086841115612d9357600080fd5b8286015b84811015612a8a5760408189031215612db05760008081fd5b612db86129af565b813581528482013585820152835291830191604001612d97565b600080600060608486031215612de757600080fd5b612df084612916565b925060208401356001600160401b0380821115612e0c57600080fd5b612e1887838801612d53565b93506040860135915080821115612e2e57600080fd5b50612e3b86828701612a2a565b9150509250925092565b60008060408385031215612e5857600080fd5b61298b83612916565b60018060a01b038516815283602082015263ffffffff83166040820152608060608201526000612e946080830184612b56565b9695505050505050565b60008060408385031215612eb157600080fd5b8235915060208301356001600160401b03811115612ece57600080fd5b612eda85828601612c46565b9150509250929050565b600081518084526020808501945080840160005b83811015612f1757815160ff1687529582019590820190600101612ef8565b509495945050505050565b6020815260006108d96020830184612ee4565b600060208284031215612f4757600080fd5b5035919050565b604080825283519082018190526000906020906060840190828701845b82811015612f8757815184529284019290840190600101612f6b565b50505083810382850152612e948186612ee4565b600060208284031215612fad57600080fd5b81356001600160401b03811115612fc357600080fd5b61188084828501612c46565b6020815260006108d96020830184612b56565b600080600060608486031215612ff757600080fd5b83356001600160401b038082111561300e57600080fd5b61301a87838801612a2a565b9450602086013591508082111561303057600080fd5b61303c87838801612c46565b9350604086013591508082111561305257600080fd5b50612e3b86828701612c46565b60008060006060848603121561307457600080fd5b61307d84612916565b95602085013595506040909401359392505050565b6000602082840312156130a457600080fd5b6108d98261295e565b60008083601f8401126130bf57600080fd5b5081356001600160401b038111156130d657600080fd5b6020830191508360208260051b85010111156130f157600080fd5b9250929050565b6000806000806040858703121561310e57600080fd5b84356001600160401b038082111561312557600080fd5b613131888389016130ad565b9096509450602087013591508082111561314a57600080fd5b50613157878288016130ad565b95989497509550505050565b6020815260006108d96020830184612ba3565b6000806040838503121561318957600080fd5b61319283612916565b915060208301356001600160401b038111156131ad57600080fd5b612eda85828601612d53565b600080600080608085870312156131cf57600080fd5b6131d885612916565b966020860135965060408601359560600135945092505050565b60006020828403121561320457600080fd5b6108d982612916565b6000806040838503121561322057600080fd5b823591506129556020840161295e565b6020808252825182820181905260009190848201906040850190845b818110156132685783518352928401929184019160010161324c565b50909695505050505050565b60008060006060848603121561328957600080fd5b833592506132996020850161295e565b91506132a76040850161295e565b90509250925092565b600080602083850312156132c357600080fd5b82356001600160401b038111156132d957600080fd5b6132e5858286016130ad565b90969095509350505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016133645761336461333c565b5060010190565b60008282101561337d5761337d61333c565b500390565b600181811c9082168061339657607f821691505b6020821081036133b657634e487b7160e01b600052602260045260246000fd5b50919050565b600060ff821660ff81036133d2576133d261333c565b60010192915050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6040808252810184905260008560608301825b87811015613446576001600160a01b0361343184612916565b16825260209283019290910190600101613418565b5083810360208501528481526001600160fb1b0385111561346657600080fd5b8460051b915081866020830137600091016020019081529695505050505050565b60208152815160208201526000602083015160018060a01b03808216604085015280604086015116606085015250506060830151608083015263ffffffff60808401511660a083015260a083015160c08084015261188060e0840182612b56565b6000823560be198336030181126134fe57600080fd5b9190910192915050565b803563ffffffff8116811461292d57600080fd5b60006020828403121561352e57600080fd5b6108d982613508565b6000808335601e1984360301811261354e57600080fd5b8301803591506001600160401b0382111561356857600080fd5b6020019150368190038213156130f157600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081528135602082015260006135bf60208401612916565b60018060a01b038082166040850152806135db60408701612916565b16606085015250506060830135608083015263ffffffff6135fe60808501613508565b1660a083015260a0830135601e1984360301811261361b57600080fd5b83016020810190356001600160401b0381111561363757600080fd5b80360382131561364657600080fd5b60c08085015261365a60e08501828461357d565b95945050505050565b634e487b7160e01b600052603160045260246000fd5b600060ff821660ff84168160ff048111821515161561369a5761369a61333c565b02939250505056fea26469706673582212209714c1001d19740a655ea4426b52e9f5d8348f9df38d027a88d1f1095e244e9464736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102275760003560e01c80637ffe93fc11610130578063b8865673116100b8578063dc873d011161007c578063dc873d0114610566578063e78d54bb14610586578063e972f91014610599578063ebc5c093146105ac578063f2fde38b146105bf57600080fd5b8063b8865673146104e5578063c06d5db6146104f8578063c4d66de81461050b578063c7da9aa61461051e578063da5d314b1461055357600080fd5b806384c2ad82116100ff57806384c2ad821461044d5780638c3c9e321461046d5780638da5cb5b1461048e578063aad9a979146104bf578063b1cb1662146104d257600080fd5b80637ffe93fc1461040c578063811a6af71461041f57806381213f22146104325780638456cb591461044557600080fd5b8063436a76f3116101b35780636d7fbb67116101825780636d7fbb67146103a4578063715018a6146103c4578063754b377c146103cc5780637cc920b4146103e65780637cde0fe2146103f957600080fd5b8063436a76f31461033f5780635657f0361461035f5780635c975abb1461038057806364fff83c1461039157600080fd5b80631538ff08116101fa5780631538ff08146102db578063181dfdff146102ee5780632972b0f0146103015780633be1ced7146103145780633f4ba83a1461033757600080fd5b8063011023901461022c57806305b374211461025457806314067f8b1461026957806315027bda146102bb575b600080fd5b61023f61023a366004612932565b6105d2565b60405190151581526020015b60405180910390f35b61026761026236600461296f565b6105e9565b005b6102a6610277366004612932565b6000918252602080805260408084206001600160a01b0393909316845291905290206002015463ffffffff1690565b60405163ffffffff909116815260200161024b565b6102ce6102c9366004612a95565b610669565b60405161024b9190612be4565b6102676102e9366004612ca8565b61075a565b6102676102fc366004612dd2565b61080d565b61023f61030f366004612e45565b6108cd565b610327610322366004612932565b6108e0565b60405161024b9493929190612e61565b6102676109f6565b61035261034d366004612e9e565b610a32565b60405161024b9190612f22565b61037261036d366004612f35565b610ae0565b60405161024b929190612f4e565b60005462010000900460ff1661023f565b61026761039f366004612f9b565b610c65565b6103b76103b2366004612932565b610cd7565b60405161024b9190612fcf565b610267610d8f565b6103d4600381565b60405160ff909116815260200161024b565b6102676103f4366004612fe2565b610dcb565b61026761040736600461305f565b610ea2565b61026761041a366004613092565b610edf565b61026761042d3660046130f8565b610f54565b61023f610440366004612e9e565b611330565b61026761138a565b61046061045b366004612932565b6113c4565b60405161024b9190613163565b61048061047b366004612932565b6113f1565b60405190815260200161024b565b6104a7600054630100000090046001600160a01b031690565b6040516001600160a01b03909116815260200161024b565b6102676104cd36600461296f565b6113fd565b6102676104e0366004612ca8565b611471565b6102676104f3366004613176565b61151f565b6102676105063660046131b9565b6115b4565b6102676105193660046131f2565b6115f2565b6104a761052c366004612932565b6000918252602080805260408084206001600160a01b039384168552909152909120541690565b61023f61056136600461320d565b61170c565b610579610574366004612a95565b611733565b60405161024b9190613230565b610267610594366004613274565b6117f3565b6103d46105a736600461320d565b611867565b6102676105ba3660046132b0565b611888565b6102676105cd3660046131f2565b611ce0565b60006105de8383611d80565b151590505b92915050565b6000546001600160a01b0363010000009091041633146106245760405162461bcd60e51b815260040161061b906132f1565b60405180910390fd5b6106308260ff16611da9565b61063982611dd3565b61065b5760405163eabeadd360e01b815260ff8316600482015260240161061b565b6106658282611dfc565b5050565b6060600083516001600160401b0381111561068657610686612999565b6040519080825280602002602001820160405280156106d757816020015b60408051608081018252600080825260208083018290529282015260608082015282526000199092019101816106a45790505b50905060005b8451811015610752576107228582815181106106fb576106fb613326565b602002602001015185838151811061071557610715613326565b6020026020010151611e5c565b82828151811061073457610734613326565b6020026020010181905250808061074a90613352565b9150506106dd565b509392505050565b6000546001600160a01b03630100000090910416331461078c5760405162461bcd60e51b815260040161061b906132f1565b80518251146107ae57604051636e37235160e11b815260040160405180910390fd5b60005b8251811015610808576107f68382815181106107cf576107cf613326565b60200260200101518383815181106107e9576107e9613326565b60200260200101516105e9565b8061080081613352565b9150506107b1565b505050565b6000546001600160a01b03630100000090910416331461083f5760405162461bcd60e51b815260040161061b906132f1565b60005b81518110156108c7576108b5848284848151811061086257610862613326565b6020026020010151610874919061336b565b85848151811061088657610886613326565b6020026020010151600001518685815181106108a4576108a4613326565b602002602001015160200151611f6b565b806108bf81613352565b915050610842565b50505050565b60006108d9838361220a565b9392505050565b6000828152602080805260408083206001600160a01b038086168552908352818420825160808101845281549092168252600181015493820193909352600283015463ffffffff1691810191909152600382018054849384936060938593919291838601919061094f90613382565b80601f016020809104026020016040519081016040528092919081815260200182805461097b90613382565b80156109c85780601f1061099d576101008083540402835291602001916109c8565b820191906000526020600020905b8154815290600101906020018083116109ab57829003601f168201915b505050919092525050815160208301516040840151606090940151919b909a50929850965090945050505050565b6000546001600160a01b036301000000909104163314610a285760405162461bcd60e51b815260040161061b906132f1565b610a3061222c565b565b6060600082516001600160401b03811115610a4f57610a4f612999565b604051908082528060200260200182016040528015610a78578160200160208202803683370190505b50905060005b835181101561075257610aaa85858381518110610a9d57610a9d613326565b6020026020010151611867565b828281518110610abc57610abc613326565b60ff9092166020928302919091019091015280610ad881613352565b915050610a7e565b6000818152601160205260408120546060918291908080610b00846122c7565b92509250925060008160ff166001600160401b03811115610b2357610b23612999565b604051908082528060200260200182016040528015610b4c578160200160208202803683370190505b50905060008260ff166001600160401b03811115610b6c57610b6c612999565b604051908082528060200260200182016040528015610b95578160200160208202803683370190505b50905060005b8360ff168160ff161015610c565760126000878360ff1681518110610bc257610bc2613326565b602002602001015160ff1660ff16815260200190815260200160002054838260ff1681518110610bf457610bf4613326565b602002602001018181525050848160ff1681518110610c1557610c15613326565b6020026020010151828260ff1681518110610c3257610c32613326565b60ff9092166020928302919091019091015280610c4e816133bc565b915050610b9b565b50909890975095505050505050565b6000546001600160a01b036301000000909104163314610c975760405162461bcd60e51b815260040161061b906132f1565b60005b815181101561066557610cc5828281518110610cb857610cb8613326565b6020026020010151610edf565b80610ccf81613352565b915050610c9a565b6000828152602080805260408083206001600160a01b03851684529091529020600301805460609190610d0990613382565b80601f0160208091040260200160405190810160405280929190818152602001828054610d3590613382565b8015610d825780601f10610d5757610100808354040283529160200191610d82565b820191906000526020600020905b815481529060010190602001808311610d6557829003601f168201915b5050505050905092915050565b6000546001600160a01b036301000000909104163314610dc15760405162461bcd60e51b815260040161061b906132f1565b610a3060006123bc565b6000546001600160a01b036301000000909104163314610dfd5760405162461bcd60e51b815260040161061b906132f1565b81518351141580610e1057508051835114155b15610e2e57604051636e37235160e11b815260040160405180910390fd5b60005b83518110156108c757610e90848281518110610e4f57610e4f613326565b6020026020010151848381518110610e6957610e69613326565b6020026020010151848481518110610e8357610e83613326565b60200260200101516117f3565b80610e9a81613352565b915050610e31565b6000546001600160a01b036301000000909104163314610ed45760405162461bcd60e51b815260040161061b906132f1565b610808838383612419565b6000546001600160a01b036301000000909104163314610f115760405162461bcd60e51b815260040161061b906132f1565b610f1d8160ff16611da9565b610f2681611dd3565b610f485760405163eabeadd360e01b815260ff8216600482015260240161061b565b610f51816124ac565b50565b60005462010000900460ff1615610f7d5760405162461bcd60e51b815260040161061b906133db565b828114610fa55783838383604051638ceb003d60e01b815260040161061b9493929190613405565b3360005b8481101561132857600060206000868685818110610fc957610fc9613326565b9050602002013581526020019081526020016000206000888885818110610ff257610ff2613326565b905060200201602081019061100791906131f2565b6001600160a01b0390811682526020808301939093526040918201600020825160808101845281549092168252600181015493820193909352600283015463ffffffff169181019190915260038201805491929160608401919061106a90613382565b80601f016020809104026020016040519081016040528092919081815260200182805461109690613382565b80156110e35780601f106110b8576101008083540402835291602001916110e3565b820191906000526020600020905b8154815290600101906020018083116110c657829003601f168201915b50505050508152505090506111108386868581811061110457611104613326565b9050602002013561220a565b61115a578285858481811061112757611127613326565b60405163c522f21160e01b81526001600160a01b039094166004850152602002919091013560248301525060440161061b565b6020600086868581811061117057611170613326565b905060200201358152602001908152602001600020600088888581811061119957611199613326565b90506020020160208101906111ae91906131f2565b6001600160a01b031681526020810191909152604001600090812080546001600160a01b03191681556001810182905560028101805463ffffffff19169055906111fb6003830182612843565b505061124c85858481811061121257611212613326565b9050602002013588888581811061122b5761122b613326565b905060200201602081019061124091906131f2565b836020015160006124fb565b7f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b6040518060c0016040528087878681811061128a5761128a613326565b9050602002013581526020018989868181106112a8576112a8613326565b90506020020160208101906112bd91906131f2565b6001600160a01b0316815260200183600001516001600160a01b0316815260200183602001518152602001836040015163ffffffff168152602001836060015181525060405161130d9190613487565b60405180910390a1508061132081613352565b915050610fa9565b505050505050565b6000805b8251811015611380576113608484838151811061135357611353613326565b602002602001015161170c565b61136e5760009150506105e3565b8061137881613352565b915050611334565b5060019392505050565b6000546001600160a01b0363010000009091041633146113bc5760405162461bcd60e51b815260040161061b906132f1565b610a306125ec565b60408051608081018252600080825260208201819052918101919091526060808201526108d98383611e5c565b60006108d98383611d80565b6000546001600160a01b03630100000090910416331461142f5760405162461bcd60e51b815260040161061b906132f1565b61143b8260ff16611da9565b61144482611dd3565b1561146757604051635d04d75160e01b815260ff8316600482015260240161061b565b610665828261264e565b6000546001600160a01b0363010000009091041633146114a35760405162461bcd60e51b815260040161061b906132f1565b80518251146114c557604051636e37235160e11b815260040160405180910390fd5b60005b82518110156108085761150d8382815181106114e6576114e6613326565b602002602001015183838151811061150057611500613326565b60200260200101516113fd565b8061151781613352565b9150506114c8565b6000546001600160a01b0363010000009091041633146115515760405162461bcd60e51b815260040161061b906132f1565b60005b8151811015610808576115a28383838151811061157357611573613326565b60200260200101516000015184848151811061159157611591613326565b602002602001015160200151612419565b806115ac81613352565b915050611554565b6000546001600160a01b0363010000009091041633146115e65760405162461bcd60e51b815260040161061b906132f1565b6108c784848484611f6b565b600054600390610100900460ff16158015611614575060005460ff8083169116105b6116775760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161061b565b6000805461ffff191660ff8316176101001781556116a4600054630100000090046001600160a01b031690565b6001600160a01b031614806116b85750303b155b156116c6576116c6826123bc565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b60008281526011602052604081205460006117278285612699565b60ff1611949350505050565b6060600083516001600160401b0381111561175057611750612999565b604051908082528060200260200182016040528015611779578160200160208202803683370190505b50905060005b8451811015610752576117c485828151811061179d5761179d613326565b60200260200101518583815181106117b7576117b7613326565b6020026020010151611d80565b8282815181106117d6576117d6613326565b6020908102919091010152806117eb81613352565b91505061177f565b6000546001600160a01b0363010000009091041633146118255760405162461bcd60e51b815260040161061b906132f1565b6118318260ff16611da9565b61183a82611dd3565b61185c5760405163eabeadd360e01b815260ff8316600482015260240161061b565b6108088383836126be565b6000828152601160205260408120546118808184612699565b949350505050565b60005462010000900460ff16156118b15760405162461bcd60e51b815260040161061b906133db565b3360005b828110156108c7576118eb828585848181106118d3576118d3613326565b90506020028101906118e591906134e8565b3561220a565b61193f578184848381811061190257611902613326565b905060200281019061191491906134e8565b60405163c522f21160e01b81526001600160a01b03909216600483015235602482015260440161061b565b60006020600086868581811061195757611957613326565b905060200281019061196991906134e8565b600001358152602001908152602001600020600086868581811061198f5761198f613326565b90506020028101906119a191906134e8565b6119b29060408101906020016131f2565b6001600160a01b03166001600160a01b0316815260200190815260200160002060010154905060405180608001604052808686858181106119f5576119f5613326565b9050602002810190611a0791906134e8565b611a189060608101906040016131f2565b6001600160a01b03168152602001868685818110611a3857611a38613326565b9050602002810190611a4a91906134e8565b606001358152602001868685818110611a6557611a65613326565b9050602002810190611a7791906134e8565b611a889060a081019060800161351c565b63ffffffff168152602001868685818110611aa557611aa5613326565b9050602002810190611ab791906134e8565b611ac59060a0810190613537565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250602092508890508786818110611b1257611b12613326565b9050602002810190611b2491906134e8565b6000013581526020019081526020016000206000878786818110611b4a57611b4a613326565b9050602002810190611b5c91906134e8565b611b6d9060408101906020016131f2565b6001600160a01b0390811682526020808301939093526040918201600020845181546001600160a01b03191692169190911781558383015160018201559083015160028201805463ffffffff191663ffffffff909216919091179055606083015180519192611be49260038501929091019061287d565b50905050611c73858584818110611bfd57611bfd613326565b9050602002810190611c0f91906134e8565b35868685818110611c2257611c22613326565b9050602002810190611c3491906134e8565b611c459060408101906020016131f2565b83888887818110611c5857611c58613326565b9050602002810190611c6a91906134e8565b606001356124fb565b7f8c20c3acb6b5208b7affea2fd90dabc8d47e77cee9766c855ce42730505cb205858584818110611ca657611ca6613326565b9050602002810190611cb891906134e8565b604051611cc591906135a6565b60405180910390a15080611cd881613352565b9150506118b5565b6000546001600160a01b036301000000909104163314611d125760405162461bcd60e51b815260040161061b906132f1565b6001600160a01b038116611d775760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161061b565b610f51816123bc565b6000918252602080805260408084206001600160a01b0393909316845291905290206001015490565b603f8160ff161115610f515760405163453e14b960e01b815260ff8216600482015260240161061b565b60ff81166000908152601260205260408120548103611df457506000919050565b506001919050565b60ff82166000818152601260209081526040918290208054908590558251938452908301849052908201819052907f0d3d8d66bac9b2a9f0e5c83181a30443294ab849472526080d03fffd7187f7169060600160405180910390a1505050565b60408051608081018252600080825260208201819052918101919091526060808201526000838152602080805260408083206001600160a01b03808716855290835292819020815160808101835281549094168452600181015492840192909252600282015463ffffffff1690830152600381018054606084019190611ee190613382565b80601f0160208091040260200160405190810160405280929190818152602001828054611f0d90613382565b8015611f5a5780601f10611f2f57610100808354040283529160200191611f5a565b820191906000526020600020905b815481529060010190602001808311611f3d57829003601f168201915b505050505081525050905092915050565b6000546001600160a01b036301000000909104163314611f9d5760405162461bcd60e51b815260040161061b906132f1565b6001600160a01b0384166000908152601060205260409020548310611fff576001600160a01b038416600081815260106020526040908190205490516345e388eb60e01b8152600481019290925260248201526044810184905260640161061b565b6001600160a01b038416600090815260106020526040812080548590811061202957612029613326565b600091825260208083206002909202909101546001600160a01b03881683526010909152604082208054919350908690811061206757612067613326565b9060005260206000209060020201600101549050818414158061208a5750808314155b156120d657604051637a4dd76560e01b81526001600160a01b03871660048201526024810186905260448101839052606481018290526084810185905260a4810184905260c40161061b565b6001600160a01b038616600090815260106020526040902080546120fc9060019061336b565b8154811061210c5761210c613326565b906000526020600020906002020160106000886001600160a01b03166001600160a01b03168152602001908152602001600020868154811061215057612150613326565b60009182526020808320845460029093020191825560019384015493909101929092556001600160a01b038816815260109091526040902080548061219757612197613663565b6000828152602080822060026000199490940193840201828155600101919091559155604080516001600160a01b038916815291820186905281018490527f33cff58e54c3a8acae85cad63487b5dcf617521e33bb03f071299f374c29de1f9060600160405180910390a1505050505050565b6001600160a01b03821660009081526010602052604081206108d99083612732565b60005462010000900460ff1661227b5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161061b565b6000805462ff0000191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60408051818152610820810182526060918291600091829190602082016108008036833750506040805181815261082081018252929350600092915060208201610800803683370190505090506000805b603f8160ff1610156123ae5760006123308983612699565b905060ff81161561239b5781858460ff168151811061235157612351613326565b602002602001019060ff16908160ff168152505080848460ff168151811061237b5761237b613326565b60ff9092166020928302919091019091015282612397816133bc565b9350505b50806123a6816133bc565b915050612318565b509196909550909350915050565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60408051808201825283815260208082018481526001600160a01b03871660008181526010845285812080546001808201835591835291859020865160029093020191825592519201919091558351908152908101859052918201839052907fe7d6ac0b740347f7f96a97e6a9dc0f20f4f11eca65495315adc009a55b6762f8906060015b60405180910390a150505050565b60ff811660008181526012602090815260408083208054939055805193845290830182905290917feb82955a27e39ea7559b6ec7e7d8b371081ab0d8783c7b0d01597555e7dcadbf9101611700565b8181113060008261250c578561250f565b60005b905060008361251f576000612521565b865b905060008461253957612534868861336b565b612543565b612543878761336b565b604051633885984b60e11b81526001600160a01b03868116600483015285811660248301528481166044830152606482018c9052608482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063710b30969060a401600060405180830381600087803b1580156125c957600080fd5b505af11580156125dd573d6000803e3d6000fd5b50505050505050505050505050565b60005462010000900460ff16156126155760405162461bcd60e51b815260040161061b906133db565b6000805462ff00001916620100001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586122aa3390565b60ff8216600081815260126020908152604091829020849055815192835282018390527f16f0bfe4b02efd5423ef8906906b049c0943f21df8f10347d319fddbc59222079101611700565b600082816126a8846004613679565b60ff1682901c905080600f169250505092915050565b6000838152601160205260409020546126d88184846127c0565b6000858152601160205260409081902091909155517f393b86c90799fa411201ae723a54e105823fcf7c6c8dffa90903fc44c03b4ac79061249e9086908690869092835260ff918216602084015216604082015260600190565b6000805b83548110156127b65783818154811061275157612751613326565b9060005260206000209060020201600001548310158015612795575083818154811061277f5761277f613326565b9060005260206000209060020201600101548311155b156127a45760019150506105e3565b806127ae81613352565b915050612736565b5060009392505050565b60006127cb83611da9565b6127d482612819565b8360006127e2856004613679565b600f60ff919091161b905060001981188281166000612802886004613679565b60ff97881697169690961b17979650505050505050565b600f8160ff161115610f51576040516329afd27b60e21b815260ff8216600482015260240161061b565b50805461284f90613382565b6000825580601f1061285f575050565b601f016020900490600052602060002090810190610f519190612901565b82805461288990613382565b90600052602060002090601f0160209004810192826128ab57600085556128f1565b82601f106128c457805160ff19168380011785556128f1565b828001600101855582156128f1579182015b828111156128f15782518255916020019190600101906128d6565b506128fd929150612901565b5090565b5b808211156128fd5760008155600101612902565b80356001600160a01b038116811461292d57600080fd5b919050565b6000806040838503121561294557600080fd5b8235915061295560208401612916565b90509250929050565b803560ff8116811461292d57600080fd5b6000806040838503121561298257600080fd5b61298b8361295e565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b03811182821017156129d1576129d1612999565b60405290565b604051601f8201601f191681016001600160401b03811182821017156129ff576129ff612999565b604052919050565b60006001600160401b03821115612a2057612a20612999565b5060051b60200190565b600082601f830112612a3b57600080fd5b81356020612a50612a4b83612a07565b6129d7565b82815260059290921b84018101918181019086841115612a6f57600080fd5b8286015b84811015612a8a5780358352918301918301612a73565b509695505050505050565b60008060408385031215612aa857600080fd5b82356001600160401b0380821115612abf57600080fd5b612acb86838701612a2a565b9350602091508185013581811115612ae257600080fd5b85019050601f81018613612af557600080fd5b8035612b03612a4b82612a07565b81815260059190911b82018301908381019088831115612b2257600080fd5b928401925b82841015612b4757612b3884612916565b82529284019290840190612b27565b80955050505050509250929050565b6000815180845260005b81811015612b7c57602081850181015186830182015201612b60565b81811115612b8e576000602083870101525b50601f01601f19169290920160200192915050565b60018060a01b0381511682526020810151602083015263ffffffff604082015116604083015260006060820151608060608501526118806080850182612b56565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015612c3957603f19888603018452612c27858351612ba3565b94509285019290850190600101612c0b565b5092979650505050505050565b600082601f830112612c5757600080fd5b81356020612c67612a4b83612a07565b82815260059290921b84018101918181019086841115612c8657600080fd5b8286015b84811015612a8a57612c9b8161295e565b8352918301918301612c8a565b60008060408385031215612cbb57600080fd5b82356001600160401b0380821115612cd257600080fd5b612cde86838701612c46565b9350602091508185013581811115612cf557600080fd5b85019050601f81018613612d0857600080fd5b8035612d16612a4b82612a07565b81815260059190911b82018301908381019088831115612d3557600080fd5b928401925b82841015612b4757833582529284019290840190612d3a565b600082601f830112612d6457600080fd5b81356020612d74612a4b83612a07565b82815260069290921b84018101918181019086841115612d9357600080fd5b8286015b84811015612a8a5760408189031215612db05760008081fd5b612db86129af565b813581528482013585820152835291830191604001612d97565b600080600060608486031215612de757600080fd5b612df084612916565b925060208401356001600160401b0380821115612e0c57600080fd5b612e1887838801612d53565b93506040860135915080821115612e2e57600080fd5b50612e3b86828701612a2a565b9150509250925092565b60008060408385031215612e5857600080fd5b61298b83612916565b60018060a01b038516815283602082015263ffffffff83166040820152608060608201526000612e946080830184612b56565b9695505050505050565b60008060408385031215612eb157600080fd5b8235915060208301356001600160401b03811115612ece57600080fd5b612eda85828601612c46565b9150509250929050565b600081518084526020808501945080840160005b83811015612f1757815160ff1687529582019590820190600101612ef8565b509495945050505050565b6020815260006108d96020830184612ee4565b600060208284031215612f4757600080fd5b5035919050565b604080825283519082018190526000906020906060840190828701845b82811015612f8757815184529284019290840190600101612f6b565b50505083810382850152612e948186612ee4565b600060208284031215612fad57600080fd5b81356001600160401b03811115612fc357600080fd5b61188084828501612c46565b6020815260006108d96020830184612b56565b600080600060608486031215612ff757600080fd5b83356001600160401b038082111561300e57600080fd5b61301a87838801612a2a565b9450602086013591508082111561303057600080fd5b61303c87838801612c46565b9350604086013591508082111561305257600080fd5b50612e3b86828701612c46565b60008060006060848603121561307457600080fd5b61307d84612916565b95602085013595506040909401359392505050565b6000602082840312156130a457600080fd5b6108d98261295e565b60008083601f8401126130bf57600080fd5b5081356001600160401b038111156130d657600080fd5b6020830191508360208260051b85010111156130f157600080fd5b9250929050565b6000806000806040858703121561310e57600080fd5b84356001600160401b038082111561312557600080fd5b613131888389016130ad565b9096509450602087013591508082111561314a57600080fd5b50613157878288016130ad565b95989497509550505050565b6020815260006108d96020830184612ba3565b6000806040838503121561318957600080fd5b61319283612916565b915060208301356001600160401b038111156131ad57600080fd5b612eda85828601612d53565b600080600080608085870312156131cf57600080fd5b6131d885612916565b966020860135965060408601359560600135945092505050565b60006020828403121561320457600080fd5b6108d982612916565b6000806040838503121561322057600080fd5b823591506129556020840161295e565b6020808252825182820181905260009190848201906040850190845b818110156132685783518352928401929184019160010161324c565b50909695505050505050565b60008060006060848603121561328957600080fd5b833592506132996020850161295e565b91506132a76040850161295e565b90509250925092565b600080602083850312156132c357600080fd5b82356001600160401b038111156132d957600080fd5b6132e5858286016130ad565b90969095509350505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016133645761336461333c565b5060010190565b60008282101561337d5761337d61333c565b500390565b600181811c9082168061339657607f821691505b6020821081036133b657634e487b7160e01b600052602260045260246000fd5b50919050565b600060ff821660ff81036133d2576133d261333c565b60010192915050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6040808252810184905260008560608301825b87811015613446576001600160a01b0361343184612916565b16825260209283019290910190600101613418565b5083810360208501528481526001600160fb1b0385111561346657600080fd5b8460051b915081866020830137600091016020019081529695505050505050565b60208152815160208201526000602083015160018060a01b03808216604085015280604086015116606085015250506060830151608083015263ffffffff60808401511660a083015260a083015160c08084015261188060e0840182612b56565b6000823560be198336030181126134fe57600080fd5b9190910192915050565b803563ffffffff8116811461292d57600080fd5b60006020828403121561352e57600080fd5b6108d982613508565b6000808335601e1984360301811261354e57600080fd5b8301803591506001600160401b0382111561356857600080fd5b6020019150368190038213156130f157600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b602081528135602082015260006135bf60208401612916565b60018060a01b038082166040850152806135db60408701612916565b16606085015250506060830135608083015263ffffffff6135fe60808501613508565b1660a083015260a0830135601e1984360301811261361b57600080fd5b83016020810190356001600160401b0381111561363757600080fd5b80360382131561364657600080fd5b60c08085015261365a60e08501828461357d565b95945050505050565b634e487b7160e01b600052603160045260246000fd5b600060ff821660ff84168160ff048111821515161561369a5761369a61333c565b02939250505056fea26469706673582212209714c1001d19740a655ea4426b52e9f5d8348f9df38d027a88d1f1095e244e9464736f6c634300080e0033", "devdoc": { "author": "Sismo", "kind": "dev", "methods": { + "attestationsCollectionHasAttribute(uint256,uint8)": { + "details": "Returns whether an attestationsCollection has a specific attribute referenced by its index", + "params": { + "collectionId": "Collection Id of the targeted attestationsCollection", + "index": "Index of the attribute. Can go from 0 to 63." + } + }, "authorizeRange(address,uint256,uint256)": { "details": "Authorize an issuer for a specific range", "params": { @@ -960,10 +1395,24 @@ "owner": "Owner of the contract, has the right to authorize/unauthorize attestations issuers" } }, - "deleteAttestations((uint256,address,address,uint256,uint32,bytes)[])": { + "createNewAttribute(uint8,bytes32)": { + "details": "Create a new attribute.", + "params": { + "index": "Index of the attribute. Can go from 0 to 63.", + "name": "Name in bytes32 of the attribute" + } + }, + "deleteAttestations(address[],uint256[])": { "details": "Delete function to be called by authorized issuers", "params": { - "attestations": "Attestations to be deleted" + "collectionIds": "The collection ids of the attestations to be deleted", + "owners": "The owners of the attestations to be deleted" + } + }, + "deleteAttribute(uint8)": { + "details": "Delete an existing attribute", + "params": { + "index": "Index of the attribute. Can go from 0 to 63. The attribute must already exist" } }, "getAttestationData(uint256,address)": { @@ -1022,6 +1471,19 @@ "owners": "Owners of the targeted attestations" } }, + "getAttributeValueForAttestationsCollection(uint256,uint8)": { + "details": "Returns the attribute's value (from 0 to 15) of an attestationsCollection", + "params": { + "collectionId": "Collection Id of the targeted attestationsCollection", + "index": "Index of the attribute. Can go from 0 to 63." + } + }, + "getAttributesNamesAndValuesForAttestationsCollection(uint256)": { + "details": "Returns all the enabled attributes names and their values for a specific attestationsCollection", + "params": { + "collectionId": "Collection Id of the targeted attestationsCollection" + } + }, "hasAttestation(uint256,address)": { "details": "Returns whether a user has an attestation from a collection", "params": { @@ -1032,7 +1494,7 @@ "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" + "ownerAddress": "Owner of the contract, has the right to authorize/unauthorize attestations issuers" } }, "isAuthorized(address,uint256)": { @@ -1060,6 +1522,14 @@ "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." }, + "setAttributeValueForAttestationsCollection(uint256,uint8,uint8)": { + "details": "Set a value for an attribute of an attestationsCollection. The attribute should already be created.", + "params": { + "collectionId": "Collection Id of the targeted attestationsCollection", + "index": "Index of the attribute (must be between 0 and 63)", + "value": "Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15" + } + }, "transferOwnership(address)": { "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." }, @@ -1081,6 +1551,13 @@ }, "unpause()": { "details": "Unpauses the registry" + }, + "updateAttributeName(uint8,bytes32)": { + "details": "Update the name of an existing attribute", + "params": { + "index": "Index of the attribute. Can go from 0 to 63. The attribute must exist", + "newName": "new name in bytes32 of the attribute" + } } }, "title": "Attestations Registry", @@ -1088,22 +1565,26 @@ }, "userdoc": { "kind": "user", - "methods": {}, + "methods": { + "initialize(address)": { + "notice": "The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization." + } + }, "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, + "astId": 14389, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "_initialized", "offset": 0, "slot": "0", - "type": "t_bool" + "type": "t_uint8" }, { - "astId": 11860, + "astId": 14391, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "_initializing", "offset": 1, @@ -1111,7 +1592,7 @@ "type": "t_bool" }, { - "astId": 11862, + "astId": 14393, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "_paused", "offset": 2, @@ -1119,7 +1600,7 @@ "type": "t_bool" }, { - "astId": 11864, + "astId": 14395, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "_owner", "offset": 3, @@ -1127,36 +1608,52 @@ "type": "t_address" }, { - "astId": 11868, + "astId": 14399, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", - "label": "_placeHolders", + "label": "_placeHoldersAdmin", "offset": 0, "slot": "1", "type": "t_array(t_uint256)15_storage" }, { - "astId": 11874, + "astId": 14405, "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)" + "type": "t_mapping(t_address,t_array(t_struct(Range)15352_storage)dyn_storage)" }, { - "astId": 11878, + "astId": 14409, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", - "label": "_placeHolders2", + "label": "_attestationsCollectionAttributesValuesBitmap", "offset": 0, "slot": "17", - "type": "t_array(t_uint256)15_storage" + "type": "t_mapping(t_uint256,t_uint256)" }, { - "astId": 11885, + "astId": 14413, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_attributesNames", + "offset": 0, + "slot": "18", + "type": "t_mapping(t_uint8,t_bytes32)" + }, + { + "astId": 14417, + "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", + "label": "_placeHoldersConfig", + "offset": 0, + "slot": "19", + "type": "t_array(t_uint256)13_storage" + }, + { + "astId": 14424, "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))" + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(AttestationData)13388_storage))" } ], "types": { @@ -1165,12 +1662,18 @@ "label": "address", "numberOfBytes": "20" }, - "t_array(t_struct(Range)12480_storage)dyn_storage": { - "base": "t_struct(Range)12480_storage", + "t_array(t_struct(Range)15352_storage)dyn_storage": { + "base": "t_struct(Range)15352_storage", "encoding": "dynamic_array", "label": "struct Range[]", "numberOfBytes": "32" }, + "t_array(t_uint256)13_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[13]", + "numberOfBytes": "416" + }, "t_array(t_uint256)15_storage": { "base": "t_uint256", "encoding": "inplace", @@ -1182,38 +1685,57 @@ "label": "bool", "numberOfBytes": "1" }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, "t_bytes_storage": { "encoding": "bytes", "label": "bytes", "numberOfBytes": "32" }, - "t_mapping(t_address,t_array(t_struct(Range)12480_storage)dyn_storage)": { + "t_mapping(t_address,t_array(t_struct(Range)15352_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" + "value": "t_array(t_struct(Range)15352_storage)dyn_storage" }, - "t_mapping(t_address,t_struct(AttestationData)11512_storage)": { + "t_mapping(t_address,t_struct(AttestationData)13388_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct AttestationData)", "numberOfBytes": "32", - "value": "t_struct(AttestationData)11512_storage" + "value": "t_struct(AttestationData)13388_storage" }, - "t_mapping(t_uint256,t_mapping(t_address,t_struct(AttestationData)11512_storage))": { + "t_mapping(t_uint256,t_mapping(t_address,t_struct(AttestationData)13388_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)" + "value": "t_mapping(t_address,t_struct(AttestationData)13388_storage)" + }, + "t_mapping(t_uint256,t_uint256)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" }, - "t_struct(AttestationData)11512_storage": { + "t_mapping(t_uint8,t_bytes32)": { + "encoding": "mapping", + "key": "t_uint8", + "label": "mapping(uint8 => bytes32)", + "numberOfBytes": "32", + "value": "t_bytes32" + }, + "t_struct(AttestationData)13388_storage": { "encoding": "inplace", "label": "struct AttestationData", "members": [ { - "astId": 11505, + "astId": 13381, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "issuer", "offset": 0, @@ -1221,7 +1743,7 @@ "type": "t_address" }, { - "astId": 11507, + "astId": 13383, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "value", "offset": 0, @@ -1229,7 +1751,7 @@ "type": "t_uint256" }, { - "astId": 11509, + "astId": 13385, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "timestamp", "offset": 0, @@ -1237,7 +1759,7 @@ "type": "t_uint32" }, { - "astId": 11511, + "astId": 13387, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "extraData", "offset": 0, @@ -1247,12 +1769,12 @@ ], "numberOfBytes": "128" }, - "t_struct(Range)12480_storage": { + "t_struct(Range)15352_storage": { "encoding": "inplace", "label": "struct Range", "members": [ { - "astId": 12477, + "astId": 15349, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "min", "offset": 0, @@ -1260,7 +1782,7 @@ "type": "t_uint256" }, { - "astId": 12479, + "astId": 15351, "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", "label": "max", "offset": 0, @@ -1279,6 +1801,11 @@ "encoding": "inplace", "label": "uint32", "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" } } } diff --git a/deployments/mumbai/AttestationsRegistryImplemV2.json b/deployments/mumbai/AttestationsRegistryImplemV2.json deleted file mode 100644 index 3745ef7..0000000 --- a/deployments/mumbai/AttestationsRegistryImplemV2.json +++ /dev/null @@ -1,1275 +0,0 @@ -{ - "address": "0x21a3087def6980A695D5390EC5d75D3f52E97D49", - "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": "owners", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "collectionIds", - "type": "uint256[]" - } - ], - "name": "OwnersAndCollectionIdsLengthMismatch", - "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": [ - { - "internalType": "address[]", - "name": "owners", - "type": "address[]" - }, - { - "internalType": "uint256[]", - "name": "collectionIds", - "type": "uint256[]" - } - ], - "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": "0xfc19a49675cb547c8dae170d8a14d4b12d5434f47ef6d48ff4606406bb755c7d", - "receipt": { - "to": null, - "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0x21a3087def6980A695D5390EC5d75D3f52E97D49", - "transactionIndex": 5, - "gasUsed": "2203165", - "logsBloom": "0x00000000100000000000000000020100000000000000000000800000000000000000000000000000000000000000000000008000000000000000000000008000000000000000040000000000000000800001000000000000000100000000000000000000020000000000000000000800002000000000000080000000000000400000000000000000000000000000000000000010000000000000000000008000200000000000000000080000800000000000000000000000000000000000004000000000000000000001000000000100000000000000000000100000000020000000000000000000000000000000000000000000000000000020000000100000", - "blockHash": "0x6b72a4c980e5f86d21d5dd25ad709faf3f03949d86b18effc16facf9dbbc8eb2", - "transactionHash": "0xfc19a49675cb547c8dae170d8a14d4b12d5434f47ef6d48ff4606406bb755c7d", - "logs": [ - { - "transactionIndex": 5, - "blockNumber": 28807620, - "transactionHash": "0xfc19a49675cb547c8dae170d8a14d4b12d5434f47ef6d48ff4606406bb755c7d", - "address": "0x21a3087def6980A695D5390EC5d75D3f52E97D49", - "topics": [ - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" - ], - "data": "0x", - "logIndex": 21, - "blockHash": "0x6b72a4c980e5f86d21d5dd25ad709faf3f03949d86b18effc16facf9dbbc8eb2" - }, - { - "transactionIndex": 5, - "blockNumber": 28807620, - "transactionHash": "0xfc19a49675cb547c8dae170d8a14d4b12d5434f47ef6d48ff4606406bb755c7d", - "address": "0x21a3087def6980A695D5390EC5d75D3f52E97D49", - "topics": [ - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x0000000000000000000000004e070e9b85a659f0b7b47cde33152ad6c2f63954" - ], - "data": "0x", - "logIndex": 22, - "blockHash": "0x6b72a4c980e5f86d21d5dd25ad709faf3f03949d86b18effc16facf9dbbc8eb2" - }, - { - "transactionIndex": 5, - "blockNumber": 28807620, - "transactionHash": "0xfc19a49675cb547c8dae170d8a14d4b12d5434f47ef6d48ff4606406bb755c7d", - "address": "0x0000000000000000000000000000000000001010", - "topics": [ - "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", - "0x0000000000000000000000000000000000000000000000000000000000001010", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x0000000000000000000000003a22c8bc68e98b0faf40f349dd2b2890fae01484" - ], - "data": "0x000000000000000000000000000000000000000000000000001b652f233917000000000000000000000000000000000000000000000000007e0d6a25db838c0e0000000000000000000000000000000000000000000000000163f6fb76d2e23b0000000000000000000000000000000000000000000000007df204f6b84a750e000000000000000000000000000000000000000000000000017f5c2a9a0bf93b", - "logIndex": 23, - "blockHash": "0x6b72a4c980e5f86d21d5dd25ad709faf3f03949d86b18effc16facf9dbbc8eb2" - } - ], - "blockNumber": 28807620, - "cumulativeGasUsed": "3020635", - "status": 1, - "byzantium": true - }, - "args": [ - "0x4e070E9b85a659F0B7B47cde33152ad6c2F63954", - "0x5722fEa81027533721BA161964622271560da1aC" - ], - "numDeployments": 1, - "solcInputHash": "c7c67c4a1ddf53de4ef76f8a114dfc39", - "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\":\"owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"}],\"name\":\"OwnersAndCollectionIdsLengthMismatch\",\"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\":[{\"internalType\":\"address[]\",\"name\":\"owners\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"collectionIds\",\"type\":\"uint256[]\"}],\"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(address[],uint256[])\":{\"details\":\"Delete function to be called by authorized issuers\",\"params\":{\"collectionIds\":\"The collection ids of the attestations to be deleted\",\"owners\":\"The owners of the 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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds)\\n external\\n override\\n whenNotPaused\\n {\\n if (owners.length != collectionIds.length)\\n revert OwnersAndCollectionIdsLengthMismatch(owners, collectionIds);\\n\\n address issuer = _msgSender();\\n for (uint256 i = 0; i < owners.length; i++) {\\n AttestationData memory attestationData = _attestationsData[collectionIds[i]][owners[i]];\\n\\n if (!_isAuthorized(issuer, collectionIds[i]))\\n revert IssuerNotAuthorized(issuer, collectionIds[i]);\\n delete _attestationsData[collectionIds[i]][owners[i]];\\n\\n _triggerBadgeTransferEvent(collectionIds[i], owners[i], attestationData.value, 0);\\n\\n emit AttestationDeleted(\\n Attestation(\\n collectionIds[i],\\n owners[i],\\n attestationData.issuer,\\n attestationData.value,\\n attestationData.timestamp,\\n attestationData.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\":\"0x3a99acc1d7a7ee0c581e1e266233b5b5b7d29f41ab7300d044a8f21188e7bd62\",\"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 error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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\":\"0xcf79a817ec578f5b4d8f23853dd8df0e3b1acfbff2b5a01601fd9a7315862ec9\",\"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 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\":\"0xf6499c0a3d08c2ef84d15c8888b833828141f89a20c2aac96af6c7e66b490807\",\"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": "0x60a06040523480156200001157600080fd5b506040516200287b3803806200287b8339810160408190526200003491620001e4565b6200003f3362000069565b6000805462ff0000191690556200005682620000c6565b6001600160a01b0316608052506200021c565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054610100900460ff16620000e35760005460ff1615620000ed565b620000ed6200019a565b620001555760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801562000178576000805461ffff19166101011790555b620001838262000069565b801562000196576000805461ff00191690555b5050565b6000620001b230620001b860201b620013d31760201c565b15905090565b6001600160a01b03163b151590565b80516001600160a01b0381168114620001df57600080fd5b919050565b60008060408385031215620001f857600080fd5b6200020383620001c7565b91506200021360208401620001c7565b90509250929050565b6080516126436200023860003960006119ed01526126436000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c8063811a6af7116100c3578063c06d5db61161007c578063c06d5db614610326578063c4d66de814610339578063c7da9aa61461034c578063dc873d0114610381578063ebc5c093146103a1578063f2fde38b146103b457600080fd5b8063811a6af71461028b5780638456cb591461029e57806384c2ad82146102a65780638c3c9e32146102c65780638da5cb5b146102e7578063b88656731461031357600080fd5b80633be1ced7116101155780633be1ced7146102145780633f4ba83a146102375780635c975abb1461023f5780636d7fbb6714610250578063715018a6146102705780637cde0fe21461027857600080fd5b8063011023901461015257806314067f8b1461017a57806315027bda146101cc578063181dfdff146101ec5780632972b0f014610201575b600080fd5b610165610160366004611c35565b6103c7565b60405190151581526020015b60405180910390f35b6101b7610188366004611c35565b6000918252602080805260408084206001600160a01b0393909316845291905290206002015463ffffffff1690565b60405163ffffffff9091168152602001610171565b6101df6101da366004611d5d565b6103de565b6040516101719190611eb4565b6101ff6101fa366004611f95565b6104cf565b005b61016561020f366004612008565b610598565b610227610222366004611c35565b6105ab565b6040516101719493929190612032565b6101ff6106c1565b60005462010000900460ff16610165565b61026361025e366004611c35565b6106fd565b604051610171919061206f565b6101ff6107b5565b6101ff610286366004612082565b6107f1565b6101ff610299366004612100565b610833565b6101ff610c0f565b6102b96102b4366004611c35565b610c49565b604051610171919061216b565b6102d96102d4366004611c35565b610c76565b604051908152602001610171565b600054630100000090046001600160a01b03165b6040516001600160a01b039091168152602001610171565b6101ff61032136600461217e565b610c82565b6101ff6103343660046121cb565b610d17565b6101ff610347366004612204565b610d55565b6102fb61035a366004611c35565b6000918252602080805260408084206001600160a01b039384168552909152909120541690565b61039461038f366004611d5d565b610e18565b604051610171919061221f565b6101ff6103af366004612263565b610ed8565b6101ff6103c2366004612204565b611330565b60006103d383836113e2565b151590505b92915050565b6060600083516001600160401b038111156103fb576103fb611c61565b60405190808252806020026020018201604052801561044c57816020015b60408051608081018252600080825260208083018290529282015260608082015282526000199092019101816104195790505b50905060005b84518110156104c757610497858281518110610470576104706122a4565b602002602001015185838151811061048a5761048a6122a4565b602002602001015161140b565b8282815181106104a9576104a96122a4565b602002602001018190525080806104bf906122d0565b915050610452565b509392505050565b6000546001600160a01b03630100000090910416331461050a5760405162461bcd60e51b8152600401610501906122e9565b60405180910390fd5b60005b815181101561059257610580848284848151811061052d5761052d6122a4565b602002602001015161053f919061231e565b858481518110610551576105516122a4565b60200260200101516000015186858151811061056f5761056f6122a4565b60200260200101516020015161151a565b8061058a816122d0565b91505061050d565b50505050565b60006105a483836117b9565b9392505050565b6000828152602080805260408083206001600160a01b038086168552908352818420825160808101845281549092168252600181015493820193909352600283015463ffffffff1691810191909152600382018054849384936060938593919291838601919061061a90612335565b80601f016020809104026020016040519081016040528092919081815260200182805461064690612335565b80156106935780601f1061066857610100808354040283529160200191610693565b820191906000526020600020905b81548152906001019060200180831161067657829003601f168201915b505050919092525050815160208301516040840151606090940151919b909a50929850965090945050505050565b6000546001600160a01b0363010000009091041633146106f35760405162461bcd60e51b8152600401610501906122e9565b6106fb6117db565b565b6000828152602080805260408083206001600160a01b0385168452909152902060030180546060919061072f90612335565b80601f016020809104026020016040519081016040528092919081815260200182805461075b90612335565b80156107a85780601f1061077d576101008083540402835291602001916107a8565b820191906000526020600020905b81548152906001019060200180831161078b57829003601f168201915b5050505050905092915050565b6000546001600160a01b0363010000009091041633146107e75760405162461bcd60e51b8152600401610501906122e9565b6106fb6000611876565b6000546001600160a01b0363010000009091041633146108235760405162461bcd60e51b8152600401610501906122e9565b61082e8383836118d3565b505050565b60005462010000900460ff161561085c5760405162461bcd60e51b81526004016105019061236f565b8281146108845783838383604051638ceb003d60e01b81526004016105019493929190612399565b3360005b84811015610c07576000602060008686858181106108a8576108a86122a4565b90506020020135815260200190815260200160002060008888858181106108d1576108d16122a4565b90506020020160208101906108e69190612204565b6001600160a01b0390811682526020808301939093526040918201600020825160808101845281549092168252600181015493820193909352600283015463ffffffff169181019190915260038201805491929160608401919061094990612335565b80601f016020809104026020016040519081016040528092919081815260200182805461097590612335565b80156109c25780601f10610997576101008083540402835291602001916109c2565b820191906000526020600020905b8154815290600101906020018083116109a557829003601f168201915b50505050508152505090506109ef838686858181106109e3576109e36122a4565b905060200201356117b9565b610a395782858584818110610a0657610a066122a4565b60405163c522f21160e01b81526001600160a01b0390941660048501526020029190910135602483015250604401610501565b60206000868685818110610a4f57610a4f6122a4565b9050602002013581526020019081526020016000206000888885818110610a7857610a786122a4565b9050602002016020810190610a8d9190612204565b6001600160a01b031681526020810191909152604001600090812080546001600160a01b03191681556001810182905560028101805463ffffffff1916905590610ada6003830182611b46565b5050610b2b858584818110610af157610af16122a4565b90506020020135888885818110610b0a57610b0a6122a4565b9050602002016020810190610b1f9190612204565b83602001516000611965565b7f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b6040518060c00160405280878786818110610b6957610b696122a4565b905060200201358152602001898986818110610b8757610b876122a4565b9050602002016020810190610b9c9190612204565b6001600160a01b0316815260200183600001516001600160a01b0316815260200183602001518152602001836040015163ffffffff1681526020018360600151815250604051610bec919061241b565b60405180910390a15080610bff816122d0565b915050610888565b505050505050565b6000546001600160a01b036301000000909104163314610c415760405162461bcd60e51b8152600401610501906122e9565b6106fb611a56565b60408051608081018252600080825260208201819052918101919091526060808201526105a4838361140b565b60006105a483836113e2565b6000546001600160a01b036301000000909104163314610cb45760405162461bcd60e51b8152600401610501906122e9565b60005b815181101561082e57610d0583838381518110610cd657610cd66122a4565b602002602001015160000151848481518110610cf457610cf46122a4565b6020026020010151602001516118d3565b80610d0f816122d0565b915050610cb7565b6000546001600160a01b036301000000909104163314610d495760405162461bcd60e51b8152600401610501906122e9565b6105928484848461151a565b600054610100900460ff16610d705760005460ff1615610d74565b303b155b610dd75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610501565b600054610100900460ff16158015610df9576000805461ffff19166101011790555b610e0282611876565b8015610e14576000805461ff00191690555b5050565b6060600083516001600160401b03811115610e3557610e35611c61565b604051908082528060200260200182016040528015610e5e578160200160208202803683370190505b50905060005b84518110156104c757610ea9858281518110610e8257610e826122a4565b6020026020010151858381518110610e9c57610e9c6122a4565b60200260200101516113e2565b828281518110610ebb57610ebb6122a4565b602090810291909101015280610ed0816122d0565b915050610e64565b60005462010000900460ff1615610f015760405162461bcd60e51b81526004016105019061236f565b3360005b8281101561059257610f3b82858584818110610f2357610f236122a4565b9050602002810190610f35919061247c565b356117b9565b610f8f5781848483818110610f5257610f526122a4565b9050602002810190610f64919061247c565b60405163c522f21160e01b81526001600160a01b039092166004830152356024820152604401610501565b600060206000868685818110610fa757610fa76122a4565b9050602002810190610fb9919061247c565b6000013581526020019081526020016000206000868685818110610fdf57610fdf6122a4565b9050602002810190610ff1919061247c565b611002906040810190602001612204565b6001600160a01b03166001600160a01b031681526020019081526020016000206001015490506040518060800160405280868685818110611045576110456122a4565b9050602002810190611057919061247c565b611068906060810190604001612204565b6001600160a01b03168152602001868685818110611088576110886122a4565b905060200281019061109a919061247c565b6060013581526020018686858181106110b5576110b56122a4565b90506020028101906110c7919061247c565b6110d89060a08101906080016124b0565b63ffffffff1681526020018686858181106110f5576110f56122a4565b9050602002810190611107919061247c565b6111159060a08101906124cb565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250602092508890508786818110611162576111626122a4565b9050602002810190611174919061247c565b600001358152602001908152602001600020600087878681811061119a5761119a6122a4565b90506020028101906111ac919061247c565b6111bd906040810190602001612204565b6001600160a01b0390811682526020808301939093526040918201600020845181546001600160a01b03191692169190911781558383015160018201559083015160028201805463ffffffff191663ffffffff90921691909117905560608301518051919261123492600385019290910190611b80565b509050506112c385858481811061124d5761124d6122a4565b905060200281019061125f919061247c565b35868685818110611272576112726122a4565b9050602002810190611284919061247c565b611295906040810190602001612204565b838888878181106112a8576112a86122a4565b90506020028101906112ba919061247c565b60600135611965565b7f8c20c3acb6b5208b7affea2fd90dabc8d47e77cee9766c855ce42730505cb2058585848181106112f6576112f66122a4565b9050602002810190611308919061247c565b604051611315919061253a565b60405180910390a15080611328816122d0565b915050610f05565b6000546001600160a01b0363010000009091041633146113625760405162461bcd60e51b8152600401610501906122e9565b6001600160a01b0381166113c75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610501565b6113d081611876565b50565b6001600160a01b03163b151590565b6000918252602080805260408084206001600160a01b0393909316845291905290206001015490565b60408051608081018252600080825260208201819052918101919091526060808201526000838152602080805260408083206001600160a01b03808716855290835292819020815160808101835281549094168452600181015492840192909252600282015463ffffffff169083015260038101805460608401919061149090612335565b80601f01602080910402602001604051908101604052809291908181526020018280546114bc90612335565b80156115095780601f106114de57610100808354040283529160200191611509565b820191906000526020600020905b8154815290600101906020018083116114ec57829003601f168201915b505050505081525050905092915050565b6000546001600160a01b03630100000090910416331461154c5760405162461bcd60e51b8152600401610501906122e9565b6001600160a01b03841660009081526010602052604090205483106115ae576001600160a01b038416600081815260106020526040908190205490516345e388eb60e01b81526004810192909252602482015260448101849052606401610501565b6001600160a01b03841660009081526010602052604081208054859081106115d8576115d86122a4565b600091825260208083206002909202909101546001600160a01b038816835260109091526040822080549193509086908110611616576116166122a4565b906000526020600020906002020160010154905081841415806116395750808314155b1561168557604051637a4dd76560e01b81526001600160a01b03871660048201526024810186905260448101839052606481018290526084810185905260a4810184905260c401610501565b6001600160a01b038616600090815260106020526040902080546116ab9060019061231e565b815481106116bb576116bb6122a4565b906000526020600020906002020160106000886001600160a01b03166001600160a01b0316815260200190815260200160002086815481106116ff576116ff6122a4565b60009182526020808320845460029093020191825560019384015493909101929092556001600160a01b0388168152601090915260409020805480611746576117466125f7565b6000828152602080822060026000199490940193840201828155600101919091559155604080516001600160a01b038916815291820186905281018490527f33cff58e54c3a8acae85cad63487b5dcf617521e33bb03f071299f374c29de1f9060600160405180910390a1505050505050565b6001600160a01b03821660009081526010602052604081206105a49083611ab8565b60005462010000900460ff1661182a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610501565b6000805462ff0000191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60408051808201825283815260208082018481526001600160a01b03871660008181526010845285812080546001808201835591835291859020865160029093020191825592519201919091558351908152908101859052918201839052907fe7d6ac0b740347f7f96a97e6a9dc0f20f4f11eca65495315adc009a55b6762f89060600160405180910390a150505050565b818111306000826119765785611979565b60005b905060008361198957600061198b565b865b90506000846119a35761199e868861231e565b6119ad565b6119ad878761231e565b604051633885984b60e11b81526001600160a01b03868116600483015285811660248301528481166044830152606482018c9052608482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063710b30969060a401600060405180830381600087803b158015611a3357600080fd5b505af1158015611a47573d6000803e3d6000fd5b50505050505050505050505050565b60005462010000900460ff1615611a7f5760405162461bcd60e51b81526004016105019061236f565b6000805462ff00001916620100001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586118593390565b6000805b8354811015611b3c57838181548110611ad757611ad76122a4565b9060005260206000209060020201600001548310158015611b1b5750838181548110611b0557611b056122a4565b9060005260206000209060020201600101548311155b15611b2a5760019150506103d8565b80611b34816122d0565b915050611abc565b5060009392505050565b508054611b5290612335565b6000825580601f10611b62575050565b601f0160209004906000526020600020908101906113d09190611c04565b828054611b8c90612335565b90600052602060002090601f016020900481019282611bae5760008555611bf4565b82601f10611bc757805160ff1916838001178555611bf4565b82800160010185558215611bf4579182015b82811115611bf4578251825591602001919060010190611bd9565b50611c00929150611c04565b5090565b5b80821115611c005760008155600101611c05565b80356001600160a01b0381168114611c3057600080fd5b919050565b60008060408385031215611c4857600080fd5b82359150611c5860208401611c19565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715611c9957611c99611c61565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611cc757611cc7611c61565b604052919050565b60006001600160401b03821115611ce857611ce8611c61565b5060051b60200190565b600082601f830112611d0357600080fd5b81356020611d18611d1383611ccf565b611c9f565b82815260059290921b84018101918181019086841115611d3757600080fd5b8286015b84811015611d525780358352918301918301611d3b565b509695505050505050565b60008060408385031215611d7057600080fd5b82356001600160401b0380821115611d8757600080fd5b611d9386838701611cf2565b9350602091508185013581811115611daa57600080fd5b85019050601f81018613611dbd57600080fd5b8035611dcb611d1382611ccf565b81815260059190911b82018301908381019088831115611dea57600080fd5b928401925b82841015611e0f57611e0084611c19565b82529284019290840190611def565b80955050505050509250929050565b6000815180845260005b81811015611e4457602081850181015186830182015201611e28565b81811115611e56576000602083870101525b50601f01601f19169290920160200192915050565b60018060a01b0381511682526020810151602083015263ffffffff60408201511660408301526000606082015160806060850152611eac6080850182611e1e565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611f0957603f19888603018452611ef7858351611e6b565b94509285019290850190600101611edb565b5092979650505050505050565b600082601f830112611f2757600080fd5b81356020611f37611d1383611ccf565b82815260069290921b84018101918181019086841115611f5657600080fd5b8286015b84811015611d525760408189031215611f735760008081fd5b611f7b611c77565b813581528482013585820152835291830191604001611f5a565b600080600060608486031215611faa57600080fd5b611fb384611c19565b925060208401356001600160401b0380821115611fcf57600080fd5b611fdb87838801611f16565b93506040860135915080821115611ff157600080fd5b50611ffe86828701611cf2565b9150509250925092565b6000806040838503121561201b57600080fd5b61202483611c19565b946020939093013593505050565b60018060a01b038516815283602082015263ffffffff831660408201526080606082015260006120656080830184611e1e565b9695505050505050565b6020815260006105a46020830184611e1e565b60008060006060848603121561209757600080fd5b6120a084611c19565b95602085013595506040909401359392505050565b60008083601f8401126120c757600080fd5b5081356001600160401b038111156120de57600080fd5b6020830191508360208260051b85010111156120f957600080fd5b9250929050565b6000806000806040858703121561211657600080fd5b84356001600160401b038082111561212d57600080fd5b612139888389016120b5565b9096509450602087013591508082111561215257600080fd5b5061215f878288016120b5565b95989497509550505050565b6020815260006105a46020830184611e6b565b6000806040838503121561219157600080fd5b61219a83611c19565b915060208301356001600160401b038111156121b557600080fd5b6121c185828601611f16565b9150509250929050565b600080600080608085870312156121e157600080fd5b6121ea85611c19565b966020860135965060408601359560600135945092505050565b60006020828403121561221657600080fd5b6105a482611c19565b6020808252825182820181905260009190848201906040850190845b818110156122575783518352928401929184019160010161223b565b50909695505050505050565b6000806020838503121561227657600080fd5b82356001600160401b0381111561228c57600080fd5b612298858286016120b5565b90969095509350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016122e2576122e26122ba565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600082821015612330576123306122ba565b500390565b600181811c9082168061234957607f821691505b60208210810361236957634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6040808252810184905260008560608301825b878110156123da576001600160a01b036123c584611c19565b168252602092830192909101906001016123ac565b5083810360208501528481526001600160fb1b038511156123fa57600080fd5b8460051b915081866020830137600091016020019081529695505050505050565b60208152815160208201526000602083015160018060a01b03808216604085015280604086015116606085015250506060830151608083015263ffffffff60808401511660a083015260a083015160c080840152611eac60e0840182611e1e565b6000823560be1983360301811261249257600080fd5b9190910192915050565b803563ffffffff81168114611c3057600080fd5b6000602082840312156124c257600080fd5b6105a48261249c565b6000808335601e198436030181126124e257600080fd5b8301803591506001600160401b038211156124fc57600080fd5b6020019150368190038213156120f957600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815281356020820152600061255360208401611c19565b60018060a01b0380821660408501528061256f60408701611c19565b16606085015250506060830135608083015263ffffffff6125926080850161249c565b1660a083015260a0830135601e198436030181126125af57600080fd5b83016020810190356001600160401b038111156125cb57600080fd5b8036038213156125da57600080fd5b60c0808501526125ee60e085018284612511565b95945050505050565b634e487b7160e01b600052603160045260246000fdfea26469706673582212208c8ee55074d6fbc4f64c05512852a1590038e3eed679507bebd8242c2dff3f4564736f6c634300080e0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061014d5760003560e01c8063811a6af7116100c3578063c06d5db61161007c578063c06d5db614610326578063c4d66de814610339578063c7da9aa61461034c578063dc873d0114610381578063ebc5c093146103a1578063f2fde38b146103b457600080fd5b8063811a6af71461028b5780638456cb591461029e57806384c2ad82146102a65780638c3c9e32146102c65780638da5cb5b146102e7578063b88656731461031357600080fd5b80633be1ced7116101155780633be1ced7146102145780633f4ba83a146102375780635c975abb1461023f5780636d7fbb6714610250578063715018a6146102705780637cde0fe21461027857600080fd5b8063011023901461015257806314067f8b1461017a57806315027bda146101cc578063181dfdff146101ec5780632972b0f014610201575b600080fd5b610165610160366004611c35565b6103c7565b60405190151581526020015b60405180910390f35b6101b7610188366004611c35565b6000918252602080805260408084206001600160a01b0393909316845291905290206002015463ffffffff1690565b60405163ffffffff9091168152602001610171565b6101df6101da366004611d5d565b6103de565b6040516101719190611eb4565b6101ff6101fa366004611f95565b6104cf565b005b61016561020f366004612008565b610598565b610227610222366004611c35565b6105ab565b6040516101719493929190612032565b6101ff6106c1565b60005462010000900460ff16610165565b61026361025e366004611c35565b6106fd565b604051610171919061206f565b6101ff6107b5565b6101ff610286366004612082565b6107f1565b6101ff610299366004612100565b610833565b6101ff610c0f565b6102b96102b4366004611c35565b610c49565b604051610171919061216b565b6102d96102d4366004611c35565b610c76565b604051908152602001610171565b600054630100000090046001600160a01b03165b6040516001600160a01b039091168152602001610171565b6101ff61032136600461217e565b610c82565b6101ff6103343660046121cb565b610d17565b6101ff610347366004612204565b610d55565b6102fb61035a366004611c35565b6000918252602080805260408084206001600160a01b039384168552909152909120541690565b61039461038f366004611d5d565b610e18565b604051610171919061221f565b6101ff6103af366004612263565b610ed8565b6101ff6103c2366004612204565b611330565b60006103d383836113e2565b151590505b92915050565b6060600083516001600160401b038111156103fb576103fb611c61565b60405190808252806020026020018201604052801561044c57816020015b60408051608081018252600080825260208083018290529282015260608082015282526000199092019101816104195790505b50905060005b84518110156104c757610497858281518110610470576104706122a4565b602002602001015185838151811061048a5761048a6122a4565b602002602001015161140b565b8282815181106104a9576104a96122a4565b602002602001018190525080806104bf906122d0565b915050610452565b509392505050565b6000546001600160a01b03630100000090910416331461050a5760405162461bcd60e51b8152600401610501906122e9565b60405180910390fd5b60005b815181101561059257610580848284848151811061052d5761052d6122a4565b602002602001015161053f919061231e565b858481518110610551576105516122a4565b60200260200101516000015186858151811061056f5761056f6122a4565b60200260200101516020015161151a565b8061058a816122d0565b91505061050d565b50505050565b60006105a483836117b9565b9392505050565b6000828152602080805260408083206001600160a01b038086168552908352818420825160808101845281549092168252600181015493820193909352600283015463ffffffff1691810191909152600382018054849384936060938593919291838601919061061a90612335565b80601f016020809104026020016040519081016040528092919081815260200182805461064690612335565b80156106935780601f1061066857610100808354040283529160200191610693565b820191906000526020600020905b81548152906001019060200180831161067657829003601f168201915b505050919092525050815160208301516040840151606090940151919b909a50929850965090945050505050565b6000546001600160a01b0363010000009091041633146106f35760405162461bcd60e51b8152600401610501906122e9565b6106fb6117db565b565b6000828152602080805260408083206001600160a01b0385168452909152902060030180546060919061072f90612335565b80601f016020809104026020016040519081016040528092919081815260200182805461075b90612335565b80156107a85780601f1061077d576101008083540402835291602001916107a8565b820191906000526020600020905b81548152906001019060200180831161078b57829003601f168201915b5050505050905092915050565b6000546001600160a01b0363010000009091041633146107e75760405162461bcd60e51b8152600401610501906122e9565b6106fb6000611876565b6000546001600160a01b0363010000009091041633146108235760405162461bcd60e51b8152600401610501906122e9565b61082e8383836118d3565b505050565b60005462010000900460ff161561085c5760405162461bcd60e51b81526004016105019061236f565b8281146108845783838383604051638ceb003d60e01b81526004016105019493929190612399565b3360005b84811015610c07576000602060008686858181106108a8576108a86122a4565b90506020020135815260200190815260200160002060008888858181106108d1576108d16122a4565b90506020020160208101906108e69190612204565b6001600160a01b0390811682526020808301939093526040918201600020825160808101845281549092168252600181015493820193909352600283015463ffffffff169181019190915260038201805491929160608401919061094990612335565b80601f016020809104026020016040519081016040528092919081815260200182805461097590612335565b80156109c25780601f10610997576101008083540402835291602001916109c2565b820191906000526020600020905b8154815290600101906020018083116109a557829003601f168201915b50505050508152505090506109ef838686858181106109e3576109e36122a4565b905060200201356117b9565b610a395782858584818110610a0657610a066122a4565b60405163c522f21160e01b81526001600160a01b0390941660048501526020029190910135602483015250604401610501565b60206000868685818110610a4f57610a4f6122a4565b9050602002013581526020019081526020016000206000888885818110610a7857610a786122a4565b9050602002016020810190610a8d9190612204565b6001600160a01b031681526020810191909152604001600090812080546001600160a01b03191681556001810182905560028101805463ffffffff1916905590610ada6003830182611b46565b5050610b2b858584818110610af157610af16122a4565b90506020020135888885818110610b0a57610b0a6122a4565b9050602002016020810190610b1f9190612204565b83602001516000611965565b7f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b6040518060c00160405280878786818110610b6957610b696122a4565b905060200201358152602001898986818110610b8757610b876122a4565b9050602002016020810190610b9c9190612204565b6001600160a01b0316815260200183600001516001600160a01b0316815260200183602001518152602001836040015163ffffffff1681526020018360600151815250604051610bec919061241b565b60405180910390a15080610bff816122d0565b915050610888565b505050505050565b6000546001600160a01b036301000000909104163314610c415760405162461bcd60e51b8152600401610501906122e9565b6106fb611a56565b60408051608081018252600080825260208201819052918101919091526060808201526105a4838361140b565b60006105a483836113e2565b6000546001600160a01b036301000000909104163314610cb45760405162461bcd60e51b8152600401610501906122e9565b60005b815181101561082e57610d0583838381518110610cd657610cd66122a4565b602002602001015160000151848481518110610cf457610cf46122a4565b6020026020010151602001516118d3565b80610d0f816122d0565b915050610cb7565b6000546001600160a01b036301000000909104163314610d495760405162461bcd60e51b8152600401610501906122e9565b6105928484848461151a565b600054610100900460ff16610d705760005460ff1615610d74565b303b155b610dd75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610501565b600054610100900460ff16158015610df9576000805461ffff19166101011790555b610e0282611876565b8015610e14576000805461ff00191690555b5050565b6060600083516001600160401b03811115610e3557610e35611c61565b604051908082528060200260200182016040528015610e5e578160200160208202803683370190505b50905060005b84518110156104c757610ea9858281518110610e8257610e826122a4565b6020026020010151858381518110610e9c57610e9c6122a4565b60200260200101516113e2565b828281518110610ebb57610ebb6122a4565b602090810291909101015280610ed0816122d0565b915050610e64565b60005462010000900460ff1615610f015760405162461bcd60e51b81526004016105019061236f565b3360005b8281101561059257610f3b82858584818110610f2357610f236122a4565b9050602002810190610f35919061247c565b356117b9565b610f8f5781848483818110610f5257610f526122a4565b9050602002810190610f64919061247c565b60405163c522f21160e01b81526001600160a01b039092166004830152356024820152604401610501565b600060206000868685818110610fa757610fa76122a4565b9050602002810190610fb9919061247c565b6000013581526020019081526020016000206000868685818110610fdf57610fdf6122a4565b9050602002810190610ff1919061247c565b611002906040810190602001612204565b6001600160a01b03166001600160a01b031681526020019081526020016000206001015490506040518060800160405280868685818110611045576110456122a4565b9050602002810190611057919061247c565b611068906060810190604001612204565b6001600160a01b03168152602001868685818110611088576110886122a4565b905060200281019061109a919061247c565b6060013581526020018686858181106110b5576110b56122a4565b90506020028101906110c7919061247c565b6110d89060a08101906080016124b0565b63ffffffff1681526020018686858181106110f5576110f56122a4565b9050602002810190611107919061247c565b6111159060a08101906124cb565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509390945250602092508890508786818110611162576111626122a4565b9050602002810190611174919061247c565b600001358152602001908152602001600020600087878681811061119a5761119a6122a4565b90506020028101906111ac919061247c565b6111bd906040810190602001612204565b6001600160a01b0390811682526020808301939093526040918201600020845181546001600160a01b03191692169190911781558383015160018201559083015160028201805463ffffffff191663ffffffff90921691909117905560608301518051919261123492600385019290910190611b80565b509050506112c385858481811061124d5761124d6122a4565b905060200281019061125f919061247c565b35868685818110611272576112726122a4565b9050602002810190611284919061247c565b611295906040810190602001612204565b838888878181106112a8576112a86122a4565b90506020028101906112ba919061247c565b60600135611965565b7f8c20c3acb6b5208b7affea2fd90dabc8d47e77cee9766c855ce42730505cb2058585848181106112f6576112f66122a4565b9050602002810190611308919061247c565b604051611315919061253a565b60405180910390a15080611328816122d0565b915050610f05565b6000546001600160a01b0363010000009091041633146113625760405162461bcd60e51b8152600401610501906122e9565b6001600160a01b0381166113c75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610501565b6113d081611876565b50565b6001600160a01b03163b151590565b6000918252602080805260408084206001600160a01b0393909316845291905290206001015490565b60408051608081018252600080825260208201819052918101919091526060808201526000838152602080805260408083206001600160a01b03808716855290835292819020815160808101835281549094168452600181015492840192909252600282015463ffffffff169083015260038101805460608401919061149090612335565b80601f01602080910402602001604051908101604052809291908181526020018280546114bc90612335565b80156115095780601f106114de57610100808354040283529160200191611509565b820191906000526020600020905b8154815290600101906020018083116114ec57829003601f168201915b505050505081525050905092915050565b6000546001600160a01b03630100000090910416331461154c5760405162461bcd60e51b8152600401610501906122e9565b6001600160a01b03841660009081526010602052604090205483106115ae576001600160a01b038416600081815260106020526040908190205490516345e388eb60e01b81526004810192909252602482015260448101849052606401610501565b6001600160a01b03841660009081526010602052604081208054859081106115d8576115d86122a4565b600091825260208083206002909202909101546001600160a01b038816835260109091526040822080549193509086908110611616576116166122a4565b906000526020600020906002020160010154905081841415806116395750808314155b1561168557604051637a4dd76560e01b81526001600160a01b03871660048201526024810186905260448101839052606481018290526084810185905260a4810184905260c401610501565b6001600160a01b038616600090815260106020526040902080546116ab9060019061231e565b815481106116bb576116bb6122a4565b906000526020600020906002020160106000886001600160a01b03166001600160a01b0316815260200190815260200160002086815481106116ff576116ff6122a4565b60009182526020808320845460029093020191825560019384015493909101929092556001600160a01b0388168152601090915260409020805480611746576117466125f7565b6000828152602080822060026000199490940193840201828155600101919091559155604080516001600160a01b038916815291820186905281018490527f33cff58e54c3a8acae85cad63487b5dcf617521e33bb03f071299f374c29de1f9060600160405180910390a1505050505050565b6001600160a01b03821660009081526010602052604081206105a49083611ab8565b60005462010000900460ff1661182a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610501565b6000805462ff0000191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b0383811663010000008181026301000000600160b81b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b60408051808201825283815260208082018481526001600160a01b03871660008181526010845285812080546001808201835591835291859020865160029093020191825592519201919091558351908152908101859052918201839052907fe7d6ac0b740347f7f96a97e6a9dc0f20f4f11eca65495315adc009a55b6762f89060600160405180910390a150505050565b818111306000826119765785611979565b60005b905060008361198957600061198b565b865b90506000846119a35761199e868861231e565b6119ad565b6119ad878761231e565b604051633885984b60e11b81526001600160a01b03868116600483015285811660248301528481166044830152606482018c9052608482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063710b30969060a401600060405180830381600087803b158015611a3357600080fd5b505af1158015611a47573d6000803e3d6000fd5b50505050505050505050505050565b60005462010000900460ff1615611a7f5760405162461bcd60e51b81526004016105019061236f565b6000805462ff00001916620100001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586118593390565b6000805b8354811015611b3c57838181548110611ad757611ad76122a4565b9060005260206000209060020201600001548310158015611b1b5750838181548110611b0557611b056122a4565b9060005260206000209060020201600101548311155b15611b2a5760019150506103d8565b80611b34816122d0565b915050611abc565b5060009392505050565b508054611b5290612335565b6000825580601f10611b62575050565b601f0160209004906000526020600020908101906113d09190611c04565b828054611b8c90612335565b90600052602060002090601f016020900481019282611bae5760008555611bf4565b82601f10611bc757805160ff1916838001178555611bf4565b82800160010185558215611bf4579182015b82811115611bf4578251825591602001919060010190611bd9565b50611c00929150611c04565b5090565b5b80821115611c005760008155600101611c05565b80356001600160a01b0381168114611c3057600080fd5b919050565b60008060408385031215611c4857600080fd5b82359150611c5860208401611c19565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715611c9957611c99611c61565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611cc757611cc7611c61565b604052919050565b60006001600160401b03821115611ce857611ce8611c61565b5060051b60200190565b600082601f830112611d0357600080fd5b81356020611d18611d1383611ccf565b611c9f565b82815260059290921b84018101918181019086841115611d3757600080fd5b8286015b84811015611d525780358352918301918301611d3b565b509695505050505050565b60008060408385031215611d7057600080fd5b82356001600160401b0380821115611d8757600080fd5b611d9386838701611cf2565b9350602091508185013581811115611daa57600080fd5b85019050601f81018613611dbd57600080fd5b8035611dcb611d1382611ccf565b81815260059190911b82018301908381019088831115611dea57600080fd5b928401925b82841015611e0f57611e0084611c19565b82529284019290840190611def565b80955050505050509250929050565b6000815180845260005b81811015611e4457602081850181015186830182015201611e28565b81811115611e56576000602083870101525b50601f01601f19169290920160200192915050565b60018060a01b0381511682526020810151602083015263ffffffff60408201511660408301526000606082015160806060850152611eac6080850182611e1e565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611f0957603f19888603018452611ef7858351611e6b565b94509285019290850190600101611edb565b5092979650505050505050565b600082601f830112611f2757600080fd5b81356020611f37611d1383611ccf565b82815260069290921b84018101918181019086841115611f5657600080fd5b8286015b84811015611d525760408189031215611f735760008081fd5b611f7b611c77565b813581528482013585820152835291830191604001611f5a565b600080600060608486031215611faa57600080fd5b611fb384611c19565b925060208401356001600160401b0380821115611fcf57600080fd5b611fdb87838801611f16565b93506040860135915080821115611ff157600080fd5b50611ffe86828701611cf2565b9150509250925092565b6000806040838503121561201b57600080fd5b61202483611c19565b946020939093013593505050565b60018060a01b038516815283602082015263ffffffff831660408201526080606082015260006120656080830184611e1e565b9695505050505050565b6020815260006105a46020830184611e1e565b60008060006060848603121561209757600080fd5b6120a084611c19565b95602085013595506040909401359392505050565b60008083601f8401126120c757600080fd5b5081356001600160401b038111156120de57600080fd5b6020830191508360208260051b85010111156120f957600080fd5b9250929050565b6000806000806040858703121561211657600080fd5b84356001600160401b038082111561212d57600080fd5b612139888389016120b5565b9096509450602087013591508082111561215257600080fd5b5061215f878288016120b5565b95989497509550505050565b6020815260006105a46020830184611e6b565b6000806040838503121561219157600080fd5b61219a83611c19565b915060208301356001600160401b038111156121b557600080fd5b6121c185828601611f16565b9150509250929050565b600080600080608085870312156121e157600080fd5b6121ea85611c19565b966020860135965060408601359560600135945092505050565b60006020828403121561221657600080fd5b6105a482611c19565b6020808252825182820181905260009190848201906040850190845b818110156122575783518352928401929184019160010161223b565b50909695505050505050565b6000806020838503121561227657600080fd5b82356001600160401b0381111561228c57600080fd5b612298858286016120b5565b90969095509350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016122e2576122e26122ba565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600082821015612330576123306122ba565b500390565b600181811c9082168061234957607f821691505b60208210810361236957634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6040808252810184905260008560608301825b878110156123da576001600160a01b036123c584611c19565b168252602092830192909101906001016123ac565b5083810360208501528481526001600160fb1b038511156123fa57600080fd5b8460051b915081866020830137600091016020019081529695505050505050565b60208152815160208201526000602083015160018060a01b03808216604085015280604086015116606085015250506060830151608083015263ffffffff60808401511660a083015260a083015160c080840152611eac60e0840182611e1e565b6000823560be1983360301811261249257600080fd5b9190910192915050565b803563ffffffff81168114611c3057600080fd5b6000602082840312156124c257600080fd5b6105a48261249c565b6000808335601e198436030181126124e257600080fd5b8301803591506001600160401b038211156124fc57600080fd5b6020019150368190038213156120f957600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815281356020820152600061255360208401611c19565b60018060a01b0380821660408501528061256f60408701611c19565b16606085015250506060830135608083015263ffffffff6125926080850161249c565b1660a083015260a0830135601e198436030181126125af57600080fd5b83016020810190356001600160401b038111156125cb57600080fd5b8036038213156125da57600080fd5b60c0808501526125ee60e085018284612511565b95945050505050565b634e487b7160e01b600052603160045260246000fdfea26469706673582212208c8ee55074d6fbc4f64c05512852a1590038e3eed679507bebd8242c2dff3f4564736f6c634300080e0033", - "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(address[],uint256[])": { - "details": "Delete function to be called by authorized issuers", - "params": { - "collectionIds": "The collection ids of the attestations to be deleted", - "owners": "The owners of the 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": 12107, - "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 12109, - "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 12111, - "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", - "label": "_paused", - "offset": 2, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 12113, - "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", - "label": "_owner", - "offset": 3, - "slot": "0", - "type": "t_address" - }, - { - "astId": 12117, - "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", - "label": "_placeHolders", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)15_storage" - }, - { - "astId": 12123, - "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", - "label": "_authorizedRanges", - "offset": 0, - "slot": "16", - "type": "t_mapping(t_address,t_array(t_struct(Range)12729_storage)dyn_storage)" - }, - { - "astId": 12127, - "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", - "label": "_placeHolders2", - "offset": 0, - "slot": "17", - "type": "t_array(t_uint256)15_storage" - }, - { - "astId": 12134, - "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", - "label": "_attestationsData", - "offset": 0, - "slot": "32", - "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(AttestationData)11761_storage))" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Range)12729_storage)dyn_storage": { - "base": "t_struct(Range)12729_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)12729_storage)dyn_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct Range[])", - "numberOfBytes": "32", - "value": "t_array(t_struct(Range)12729_storage)dyn_storage" - }, - "t_mapping(t_address,t_struct(AttestationData)11761_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct AttestationData)", - "numberOfBytes": "32", - "value": "t_struct(AttestationData)11761_storage" - }, - "t_mapping(t_uint256,t_mapping(t_address,t_struct(AttestationData)11761_storage))": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => mapping(address => struct AttestationData))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_struct(AttestationData)11761_storage)" - }, - "t_struct(AttestationData)11761_storage": { - "encoding": "inplace", - "label": "struct AttestationData", - "members": [ - { - "astId": 11754, - "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", - "label": "issuer", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 11756, - "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", - "label": "value", - "offset": 0, - "slot": "1", - "type": "t_uint256" - }, - { - "astId": 11758, - "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", - "label": "timestamp", - "offset": 0, - "slot": "2", - "type": "t_uint32" - }, - { - "astId": 11760, - "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", - "label": "extraData", - "offset": 0, - "slot": "3", - "type": "t_bytes_storage" - } - ], - "numberOfBytes": "128" - }, - "t_struct(Range)12729_storage": { - "encoding": "inplace", - "label": "struct Range", - "members": [ - { - "astId": 12726, - "contract": "contracts/core/AttestationsRegistry.sol:AttestationsRegistry", - "label": "min", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 12728, - "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/AvailableRootsRegistry.json b/deployments/mumbai/AvailableRootsRegistry.json index 95f4088..84e70cd 100644 --- a/deployments/mumbai/AvailableRootsRegistry.json +++ b/deployments/mumbai/AvailableRootsRegistry.json @@ -22,6 +22,19 @@ "name": "CannotUnregisterForZeroAddress", "type": "error" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -105,6 +118,19 @@ "name": "UnregisteredRootForAttester", "type": "event" }, + { + "inputs": [], + "name": "IMPLEMENTATION_VERSION", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -133,7 +159,7 @@ "inputs": [ { "internalType": "address", - "name": "owner", + "name": "ownerAddress", "type": "address" } ], @@ -281,74 +307,86 @@ "type": "function" } ], - "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", + "transactionHash": "0xd4d8bf8963341d8c192d4aba4a53d6fcb53479a76eedb6d5a2bae8e1f866a532", "receipt": { "to": null, "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0x0D12CeBa1e25784731266625c9d5157A9c9B5934", - "transactionIndex": 1, - "gasUsed": "529059", - "logsBloom": "0x000000000000000200000000000000000000000000000000008000000000000000000000000000000000000000000000000080000000000000000000000000000000000008004000000000000000008000010000000000000001000000000000000000000200000000000000000008000000000000000000800000000000004000000000000000000000000000000000000000100000000000000000000080002000000000000000a0000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000000000000000000000000000000000000020000000100000", - "blockHash": "0x6d99ee69f1de7d640e0889da304d25a2564934c3aa1a59fea638b34454fe9b17", - "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", + "contractAddress": "0x376147a7DaBEEF3fDE8d3aa455562121053b496C", + "transactionIndex": 14, + "gasUsed": "508612", + "logsBloom": "0x00000000000000000000000000000000000040000000000000800010000000000000000000000020000000000000000000008000000000010000000000000010000000000000000000000000000000800001000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000400000000000000000000000000000000000000010000080000000000000008000200000000000000000000000000400000000020000000000000000000000004000000000200000000001000000040000000000000000000000100000001020000000000000000000000000000000000000000000000000000020000000100020", + "blockHash": "0xdec0658810259e3963d1be28c01bcc6454e5e7e1cbcc0a24b93c90e16d5e4665", + "transactionHash": "0xd4d8bf8963341d8c192d4aba4a53d6fcb53479a76eedb6d5a2bae8e1f866a532", "logs": [ { - "transactionIndex": 1, - "blockNumber": 28600011, - "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", - "address": "0x0D12CeBa1e25784731266625c9d5157A9c9B5934", + "transactionIndex": 14, + "blockNumber": 29540722, + "transactionHash": "0xd4d8bf8963341d8c192d4aba4a53d6fcb53479a76eedb6d5a2bae8e1f866a532", + "address": "0x376147a7DaBEEF3fDE8d3aa455562121053b496C", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" ], "data": "0x", - "logIndex": 12, - "blockHash": "0x6d99ee69f1de7d640e0889da304d25a2564934c3aa1a59fea638b34454fe9b17" + "logIndex": 76, + "blockHash": "0xdec0658810259e3963d1be28c01bcc6454e5e7e1cbcc0a24b93c90e16d5e4665" }, { - "transactionIndex": 1, - "blockNumber": 28600011, - "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", - "address": "0x0D12CeBa1e25784731266625c9d5157A9c9B5934", + "transactionIndex": 14, + "blockNumber": 29540722, + "transactionHash": "0xd4d8bf8963341d8c192d4aba4a53d6fcb53479a76eedb6d5a2bae8e1f866a532", + "address": "0x376147a7DaBEEF3fDE8d3aa455562121053b496C", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + "0x00000000000000000000000063f08f8f13126b9eadc76dd683902c61c5115138" ], "data": "0x", - "logIndex": 13, - "blockHash": "0x6d99ee69f1de7d640e0889da304d25a2564934c3aa1a59fea638b34454fe9b17" + "logIndex": 77, + "blockHash": "0xdec0658810259e3963d1be28c01bcc6454e5e7e1cbcc0a24b93c90e16d5e4665" + }, + { + "transactionIndex": 14, + "blockNumber": 29540722, + "transactionHash": "0xd4d8bf8963341d8c192d4aba4a53d6fcb53479a76eedb6d5a2bae8e1f866a532", + "address": "0x376147a7DaBEEF3fDE8d3aa455562121053b496C", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 78, + "blockHash": "0xdec0658810259e3963d1be28c01bcc6454e5e7e1cbcc0a24b93c90e16d5e4665" }, { - "transactionIndex": 1, - "blockNumber": 28600011, - "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", + "transactionIndex": 14, + "blockNumber": 29540722, + "transactionHash": "0xd4d8bf8963341d8c192d4aba4a53d6fcb53479a76eedb6d5a2bae8e1f866a532", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", "0x0000000000000000000000000000000000000000000000000000000000001010", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + "0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99" ], - "data": "0x000000000000000000000000000000000000000000000000000dee53b1062d02000000000000000000000000000000000000000000000000869369f29efe28c100000000000000000000000000000000000000000000167a22046d5473d41b2700000000000000000000000000000000000000000000000086857b9eedf7fbbf00000000000000000000000000000000000000000000167a22125ba824da4829", - "logIndex": 14, - "blockHash": "0x6d99ee69f1de7d640e0889da304d25a2564934c3aa1a59fea638b34454fe9b17" + "data": "0x0000000000000000000000000000000000000000000000000002b3ae14c288080000000000000000000000000000000000000000000000007c9d719f120ecb6c00000000000000000000000000000000000000000000093b3d66ff0dd51d08eb0000000000000000000000000000000000000000000000007c9abdf0fd4c436400000000000000000000000000000000000000000000093b3d69b2bbe9df90f3", + "logIndex": 79, + "blockHash": "0xdec0658810259e3963d1be28c01bcc6454e5e7e1cbcc0a24b93c90e16d5e4665" } ], - "blockNumber": 28600011, - "cumulativeGasUsed": "944562", + "blockNumber": 29540722, + "cumulativeGasUsed": "2262216", "status": 1, "byzantium": true }, "args": [ - "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6" + "0x63f08f8f13126b9eadc76dd683902c61c5115138" ], - "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", + "numDeployments": 3, + "solcInputHash": "6edb98fea2bf424a369954d0e80655f6", + "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\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\":\"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\":[],\"name\":\"IMPLEMENTATION_VERSION\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":\"ownerAddress\",\"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\":{\"ownerAddress\":\"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\":{\"initialize(address)\":{\"notice\":\"The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\"}},\"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 (last updated v4.7.0) (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 Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\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 the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\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\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xcee5467d5d873fb75dae6f98c01a8d25dd609f9d0374c7d39217bd5f9539a2d6\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, \\\"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 (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or 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 _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\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 /// @solidity memory-safe-assembly\\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\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"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 uint8 public constant IMPLEMENTATION_VERSION = 2;\\n\\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 ownerAddress Owner of the contract, can update public key and address\\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\n */\\n function initialize(address ownerAddress) public reinitializer(IMPLEMENTATION_VERSION) {\\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\\n if (owner() == address(0) || address(this).code.length == 0) {\\n _transferOwnership(ownerAddress);\\n }\\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\":\"0x3467998cbdb82b0c64aa8627efc5893d2b369f73e66e5d1095305e4609593cc5\",\"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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\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\":\"0x5e882d3091e816f1286837eef92ae17737abf66fdeece1282b752f27ba18492b\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161099538038061099583398101604081905261002f916101be565b61003833610047565b610041816100a2565b506101ee565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054600290610100900460ff161580156100c4575060005460ff8083169116105b61012b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805461ffff191660ff8316176101001781556101576000546201000090046001600160a01b031690565b6001600160a01b0316148061016b5750303b155b156101795761017982610047565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6000602082840312156101d057600080fd5b81516001600160a01b03811681146101e757600080fd5b9392505050565b610798806101fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063be4a605611610071578063be4a605614610170578063c4d66de814610183578063e5e477a014610196578063ebea45cb146101a9578063f2fde38b146101bc578063fe7e7750146101cf57600080fd5b80632f56be56146100b95780634e473f8f146100ce578063715018a6146100f6578063754b377c146100fe57806380b404ce146101185780638da5cb5b14610146575b600080fd5b6100cc6100c7366004610704565b6101e2565b005b6100e16100dc366004610704565b61021f565b60405190151581526020015b60405180910390f35b6100cc610285565b610106600281565b60405160ff90911681526020016100ed565b6100e1610126366004610704565b600160209081526000928352604080842090915290825290205460ff1681565b6000546201000090046001600160a01b03166040516001600160a01b0390911681526020016100ed565b6100cc61017e36600461072e565b610299565b6100cc610191366004610747565b6102af565b6100e16101a436600461072e565b6103ce565b6100cc6101b7366004610704565b61042a565b6100cc6101ca366004610747565b610463565b6100cc6101dd36600461072e565b6104d9565b6101ea6104ec565b6001600160a01b03821661021157604051639e95e88b60e01b815260040160405180910390fd5b61021b828261054d565b5050565b6001600160a01b038216600090815260016020908152604080832084845290915281205460ff168061027e575060008281527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff165b9392505050565b61028d6104ec565b61029760006105ef565b565b6102a16104ec565b6102ac60008261054d565b50565b600054600290610100900460ff161580156102d1575060005460ff8083169116105b6103395760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805461ffff191660ff8316176101001781556103666000546001600160a01b03620100009091041690565b6001600160a01b0316148061037a5750303b155b1561038857610388826105ef565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b33600090815260016020908152604080832084845290915281205460ff1680610424575060008281527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff165b92915050565b6104326104ec565b6001600160a01b03821661045957604051631b25a00160e31b815260040160405180910390fd5b61021b828261064a565b61046b6104ec565b6001600160a01b0381166104d05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610330565b6102ac816105ef565b6104e16104ec565b6102ac60008261064a565b6000546001600160a01b03620100009091041633146102975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610330565b6001600160a01b0382166000818152600160208181526040808420868552909152909120805460ff191690911790556105b0576040518181527f22f0a171f00eeea3af5276d1f77587471dcc3bde32d62560046549b34bacd38a906020016103c2565b604080516001600160a01b0384168152602081018390527f21cdff046578afe71b78f95ac4891306af3a9b9eb71e2f0ef380b35b487d2f1291016103c2565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6001600160a01b03821660008181526001602090815260408083208584529091529020805460ff191690556106a9576040518181527f7261c2abe5e576aac50024de639315f10783f67935bf118bbb49b33c20ef70ef906020016103c2565b604080516001600160a01b0384168152602081018390527fba8195cc62a4086b7cd93d22db90e43ae42d8b5febd8c66b3453771e455b7a3391016103c2565b80356001600160a01b03811681146106ff57600080fd5b919050565b6000806040838503121561071757600080fd5b610720836106e8565b946020939093013593505050565b60006020828403121561074057600080fd5b5035919050565b60006020828403121561075957600080fd5b61027e826106e856fea264697066735822122096da5c8d33677e6203057d911bba2c609059e50119bb896ec169d0349a48641d64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063be4a605611610071578063be4a605614610170578063c4d66de814610183578063e5e477a014610196578063ebea45cb146101a9578063f2fde38b146101bc578063fe7e7750146101cf57600080fd5b80632f56be56146100b95780634e473f8f146100ce578063715018a6146100f6578063754b377c146100fe57806380b404ce146101185780638da5cb5b14610146575b600080fd5b6100cc6100c7366004610704565b6101e2565b005b6100e16100dc366004610704565b61021f565b60405190151581526020015b60405180910390f35b6100cc610285565b610106600281565b60405160ff90911681526020016100ed565b6100e1610126366004610704565b600160209081526000928352604080842090915290825290205460ff1681565b6000546201000090046001600160a01b03166040516001600160a01b0390911681526020016100ed565b6100cc61017e36600461072e565b610299565b6100cc610191366004610747565b6102af565b6100e16101a436600461072e565b6103ce565b6100cc6101b7366004610704565b61042a565b6100cc6101ca366004610747565b610463565b6100cc6101dd36600461072e565b6104d9565b6101ea6104ec565b6001600160a01b03821661021157604051639e95e88b60e01b815260040160405180910390fd5b61021b828261054d565b5050565b6001600160a01b038216600090815260016020908152604080832084845290915281205460ff168061027e575060008281527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff165b9392505050565b61028d6104ec565b61029760006105ef565b565b6102a16104ec565b6102ac60008261054d565b50565b600054600290610100900460ff161580156102d1575060005460ff8083169116105b6103395760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805461ffff191660ff8316176101001781556103666000546001600160a01b03620100009091041690565b6001600160a01b0316148061037a5750303b155b1561038857610388826105ef565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b33600090815260016020908152604080832084845290915281205460ff1680610424575060008281527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff165b92915050565b6104326104ec565b6001600160a01b03821661045957604051631b25a00160e31b815260040160405180910390fd5b61021b828261064a565b61046b6104ec565b6001600160a01b0381166104d05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610330565b6102ac816105ef565b6104e16104ec565b6102ac60008261064a565b6000546001600160a01b03620100009091041633146102975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610330565b6001600160a01b0382166000818152600160208181526040808420868552909152909120805460ff191690911790556105b0576040518181527f22f0a171f00eeea3af5276d1f77587471dcc3bde32d62560046549b34bacd38a906020016103c2565b604080516001600160a01b0384168152602081018390527f21cdff046578afe71b78f95ac4891306af3a9b9eb71e2f0ef380b35b487d2f1291016103c2565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6001600160a01b03821660008181526001602090815260408083208584529091529020805460ff191690556106a9576040518181527f7261c2abe5e576aac50024de639315f10783f67935bf118bbb49b33c20ef70ef906020016103c2565b604080516001600160a01b0384168152602081018390527fba8195cc62a4086b7cd93d22db90e43ae42d8b5febd8c66b3453771e455b7a3391016103c2565b80356001600160a01b03811681146106ff57600080fd5b919050565b6000806040838503121561071757600080fd5b610720836106e8565b946020939093013593505050565b60006020828403121561074057600080fd5b5035919050565b60006020828403121561075957600080fd5b61027e826106e856fea264697066735822122096da5c8d33677e6203057d911bba2c609059e50119bb896ec169d0349a48641d64736f6c634300080e0033", "devdoc": { "author": "Sismo", "kind": "dev", @@ -362,7 +400,7 @@ "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" + "ownerAddress": "Owner of the contract, can update public key and address" } }, "isRootAvailableForAttester(address,uint256)": { @@ -419,22 +457,26 @@ }, "userdoc": { "kind": "user", - "methods": {}, + "methods": { + "initialize(address)": { + "notice": "The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization." + } + }, "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, + "astId": 935, "contract": "contracts/periphery/utils/AvailableRootsRegistry.sol:AvailableRootsRegistry", "label": "_initialized", "offset": 0, "slot": "0", - "type": "t_bool" + "type": "t_uint8" }, { - "astId": 939, + "astId": 938, "contract": "contracts/periphery/utils/AvailableRootsRegistry.sol:AvailableRootsRegistry", "label": "_initializing", "offset": 1, @@ -442,7 +484,7 @@ "type": "t_bool" }, { - "astId": 389, + "astId": 396, "contract": "contracts/periphery/utils/AvailableRootsRegistry.sol:AvailableRootsRegistry", "label": "_owner", "offset": 2, @@ -450,7 +492,7 @@ "type": "t_address" }, { - "astId": 12620, + "astId": 15495, "contract": "contracts/periphery/utils/AvailableRootsRegistry.sol:AvailableRootsRegistry", "label": "_roots", "offset": 0, @@ -487,6 +529,11 @@ "encoding": "inplace", "label": "uint256", "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" } } } diff --git a/deployments/mumbai/AvailableRootsRegistryImplem.json b/deployments/mumbai/AvailableRootsRegistryImplem.json index 342b3a9..2abcf19 100644 --- a/deployments/mumbai/AvailableRootsRegistryImplem.json +++ b/deployments/mumbai/AvailableRootsRegistryImplem.json @@ -1,5 +1,5 @@ { - "address": "0x0D12CeBa1e25784731266625c9d5157A9c9B5934", + "address": "0x376147a7DaBEEF3fDE8d3aa455562121053b496C", "abi": [ { "inputs": [ @@ -22,6 +22,19 @@ "name": "CannotUnregisterForZeroAddress", "type": "error" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -105,6 +118,19 @@ "name": "UnregisteredRootForAttester", "type": "event" }, + { + "inputs": [], + "name": "IMPLEMENTATION_VERSION", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -133,7 +159,7 @@ "inputs": [ { "internalType": "address", - "name": "owner", + "name": "ownerAddress", "type": "address" } ], @@ -281,74 +307,86 @@ "type": "function" } ], - "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", + "transactionHash": "0xd4d8bf8963341d8c192d4aba4a53d6fcb53479a76eedb6d5a2bae8e1f866a532", "receipt": { "to": null, "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0x0D12CeBa1e25784731266625c9d5157A9c9B5934", - "transactionIndex": 1, - "gasUsed": "529059", - "logsBloom": "0x000000000000000200000000000000000000000000000000008000000000000000000000000000000000000000000000000080000000000000000000000000000000000008004000000000000000008000010000000000000001000000000000000000000200000000000000000008000000000000000000800000000000004000000000000000000000000000000000000000100000000000000000000080002000000000000000a0000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000020000000000000000000000000000000000000000000000000000020000000100000", - "blockHash": "0x6d99ee69f1de7d640e0889da304d25a2564934c3aa1a59fea638b34454fe9b17", - "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", + "contractAddress": "0x376147a7DaBEEF3fDE8d3aa455562121053b496C", + "transactionIndex": 14, + "gasUsed": "508612", + "logsBloom": "0x00000000000000000000000000000000000040000000000000800010000000000000000000000020000000000000000000008000000000010000000000000010000000000000000000000000000000800001000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000400000000000000000000000000000000000000010000080000000000000008000200000000000000000000000000400000000020000000000000000000000004000000000200000000001000000040000000000000000000000100000001020000000000000000000000000000000000000000000000000000020000000100020", + "blockHash": "0xdec0658810259e3963d1be28c01bcc6454e5e7e1cbcc0a24b93c90e16d5e4665", + "transactionHash": "0xd4d8bf8963341d8c192d4aba4a53d6fcb53479a76eedb6d5a2bae8e1f866a532", "logs": [ { - "transactionIndex": 1, - "blockNumber": 28600011, - "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", - "address": "0x0D12CeBa1e25784731266625c9d5157A9c9B5934", + "transactionIndex": 14, + "blockNumber": 29540722, + "transactionHash": "0xd4d8bf8963341d8c192d4aba4a53d6fcb53479a76eedb6d5a2bae8e1f866a532", + "address": "0x376147a7DaBEEF3fDE8d3aa455562121053b496C", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" ], "data": "0x", - "logIndex": 12, - "blockHash": "0x6d99ee69f1de7d640e0889da304d25a2564934c3aa1a59fea638b34454fe9b17" + "logIndex": 76, + "blockHash": "0xdec0658810259e3963d1be28c01bcc6454e5e7e1cbcc0a24b93c90e16d5e4665" }, { - "transactionIndex": 1, - "blockNumber": 28600011, - "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", - "address": "0x0D12CeBa1e25784731266625c9d5157A9c9B5934", + "transactionIndex": 14, + "blockNumber": 29540722, + "transactionHash": "0xd4d8bf8963341d8c192d4aba4a53d6fcb53479a76eedb6d5a2bae8e1f866a532", + "address": "0x376147a7DaBEEF3fDE8d3aa455562121053b496C", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + "0x00000000000000000000000063f08f8f13126b9eadc76dd683902c61c5115138" ], "data": "0x", - "logIndex": 13, - "blockHash": "0x6d99ee69f1de7d640e0889da304d25a2564934c3aa1a59fea638b34454fe9b17" + "logIndex": 77, + "blockHash": "0xdec0658810259e3963d1be28c01bcc6454e5e7e1cbcc0a24b93c90e16d5e4665" + }, + { + "transactionIndex": 14, + "blockNumber": 29540722, + "transactionHash": "0xd4d8bf8963341d8c192d4aba4a53d6fcb53479a76eedb6d5a2bae8e1f866a532", + "address": "0x376147a7DaBEEF3fDE8d3aa455562121053b496C", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 78, + "blockHash": "0xdec0658810259e3963d1be28c01bcc6454e5e7e1cbcc0a24b93c90e16d5e4665" }, { - "transactionIndex": 1, - "blockNumber": 28600011, - "transactionHash": "0x5514137161b675046f4311143d21585182cda96201a9464d691e6a54efc3726d", + "transactionIndex": 14, + "blockNumber": 29540722, + "transactionHash": "0xd4d8bf8963341d8c192d4aba4a53d6fcb53479a76eedb6d5a2bae8e1f866a532", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", "0x0000000000000000000000000000000000000000000000000000000000001010", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + "0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99" ], - "data": "0x000000000000000000000000000000000000000000000000000dee53b1062d02000000000000000000000000000000000000000000000000869369f29efe28c100000000000000000000000000000000000000000000167a22046d5473d41b2700000000000000000000000000000000000000000000000086857b9eedf7fbbf00000000000000000000000000000000000000000000167a22125ba824da4829", - "logIndex": 14, - "blockHash": "0x6d99ee69f1de7d640e0889da304d25a2564934c3aa1a59fea638b34454fe9b17" + "data": "0x0000000000000000000000000000000000000000000000000002b3ae14c288080000000000000000000000000000000000000000000000007c9d719f120ecb6c00000000000000000000000000000000000000000000093b3d66ff0dd51d08eb0000000000000000000000000000000000000000000000007c9abdf0fd4c436400000000000000000000000000000000000000000000093b3d69b2bbe9df90f3", + "logIndex": 79, + "blockHash": "0xdec0658810259e3963d1be28c01bcc6454e5e7e1cbcc0a24b93c90e16d5e4665" } ], - "blockNumber": 28600011, - "cumulativeGasUsed": "944562", + "blockNumber": 29540722, + "cumulativeGasUsed": "2262216", "status": 1, "byzantium": true }, "args": [ - "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6" + "0x63f08f8f13126b9eadc76dd683902c61c5115138" ], - "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", + "numDeployments": 2, + "solcInputHash": "6edb98fea2bf424a369954d0e80655f6", + "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\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\":\"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\":[],\"name\":\"IMPLEMENTATION_VERSION\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":\"ownerAddress\",\"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\":{\"ownerAddress\":\"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\":{\"initialize(address)\":{\"notice\":\"The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\"}},\"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 (last updated v4.7.0) (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 Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\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 the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\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\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xcee5467d5d873fb75dae6f98c01a8d25dd609f9d0374c7d39217bd5f9539a2d6\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, \\\"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 (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or 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 _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\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 /// @solidity memory-safe-assembly\\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\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"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 uint8 public constant IMPLEMENTATION_VERSION = 2;\\n\\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 ownerAddress Owner of the contract, can update public key and address\\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\n */\\n function initialize(address ownerAddress) public reinitializer(IMPLEMENTATION_VERSION) {\\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\\n if (owner() == address(0) || address(this).code.length == 0) {\\n _transferOwnership(ownerAddress);\\n }\\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\":\"0x3467998cbdb82b0c64aa8627efc5893d2b369f73e66e5d1095305e4609593cc5\",\"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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\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\":\"0x5e882d3091e816f1286837eef92ae17737abf66fdeece1282b752f27ba18492b\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5060405161099538038061099583398101604081905261002f916101be565b61003833610047565b610041816100a2565b506101ee565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054600290610100900460ff161580156100c4575060005460ff8083169116105b61012b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805461ffff191660ff8316176101001781556101576000546201000090046001600160a01b031690565b6001600160a01b0316148061016b5750303b155b156101795761017982610047565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b6000602082840312156101d057600080fd5b81516001600160a01b03811681146101e757600080fd5b9392505050565b610798806101fd6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063be4a605611610071578063be4a605614610170578063c4d66de814610183578063e5e477a014610196578063ebea45cb146101a9578063f2fde38b146101bc578063fe7e7750146101cf57600080fd5b80632f56be56146100b95780634e473f8f146100ce578063715018a6146100f6578063754b377c146100fe57806380b404ce146101185780638da5cb5b14610146575b600080fd5b6100cc6100c7366004610704565b6101e2565b005b6100e16100dc366004610704565b61021f565b60405190151581526020015b60405180910390f35b6100cc610285565b610106600281565b60405160ff90911681526020016100ed565b6100e1610126366004610704565b600160209081526000928352604080842090915290825290205460ff1681565b6000546201000090046001600160a01b03166040516001600160a01b0390911681526020016100ed565b6100cc61017e36600461072e565b610299565b6100cc610191366004610747565b6102af565b6100e16101a436600461072e565b6103ce565b6100cc6101b7366004610704565b61042a565b6100cc6101ca366004610747565b610463565b6100cc6101dd36600461072e565b6104d9565b6101ea6104ec565b6001600160a01b03821661021157604051639e95e88b60e01b815260040160405180910390fd5b61021b828261054d565b5050565b6001600160a01b038216600090815260016020908152604080832084845290915281205460ff168061027e575060008281527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff165b9392505050565b61028d6104ec565b61029760006105ef565b565b6102a16104ec565b6102ac60008261054d565b50565b600054600290610100900460ff161580156102d1575060005460ff8083169116105b6103395760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805461ffff191660ff8316176101001781556103666000546001600160a01b03620100009091041690565b6001600160a01b0316148061037a5750303b155b1561038857610388826105ef565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b33600090815260016020908152604080832084845290915281205460ff1680610424575060008281527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff165b92915050565b6104326104ec565b6001600160a01b03821661045957604051631b25a00160e31b815260040160405180910390fd5b61021b828261064a565b61046b6104ec565b6001600160a01b0381166104d05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610330565b6102ac816105ef565b6104e16104ec565b6102ac60008261064a565b6000546001600160a01b03620100009091041633146102975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610330565b6001600160a01b0382166000818152600160208181526040808420868552909152909120805460ff191690911790556105b0576040518181527f22f0a171f00eeea3af5276d1f77587471dcc3bde32d62560046549b34bacd38a906020016103c2565b604080516001600160a01b0384168152602081018390527f21cdff046578afe71b78f95ac4891306af3a9b9eb71e2f0ef380b35b487d2f1291016103c2565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6001600160a01b03821660008181526001602090815260408083208584529091529020805460ff191690556106a9576040518181527f7261c2abe5e576aac50024de639315f10783f67935bf118bbb49b33c20ef70ef906020016103c2565b604080516001600160a01b0384168152602081018390527fba8195cc62a4086b7cd93d22db90e43ae42d8b5febd8c66b3453771e455b7a3391016103c2565b80356001600160a01b03811681146106ff57600080fd5b919050565b6000806040838503121561071757600080fd5b610720836106e8565b946020939093013593505050565b60006020828403121561074057600080fd5b5035919050565b60006020828403121561075957600080fd5b61027e826106e856fea264697066735822122096da5c8d33677e6203057d911bba2c609059e50119bb896ec169d0349a48641d64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063be4a605611610071578063be4a605614610170578063c4d66de814610183578063e5e477a014610196578063ebea45cb146101a9578063f2fde38b146101bc578063fe7e7750146101cf57600080fd5b80632f56be56146100b95780634e473f8f146100ce578063715018a6146100f6578063754b377c146100fe57806380b404ce146101185780638da5cb5b14610146575b600080fd5b6100cc6100c7366004610704565b6101e2565b005b6100e16100dc366004610704565b61021f565b60405190151581526020015b60405180910390f35b6100cc610285565b610106600281565b60405160ff90911681526020016100ed565b6100e1610126366004610704565b600160209081526000928352604080842090915290825290205460ff1681565b6000546201000090046001600160a01b03166040516001600160a01b0390911681526020016100ed565b6100cc61017e36600461072e565b610299565b6100cc610191366004610747565b6102af565b6100e16101a436600461072e565b6103ce565b6100cc6101b7366004610704565b61042a565b6100cc6101ca366004610747565b610463565b6100cc6101dd36600461072e565b6104d9565b6101ea6104ec565b6001600160a01b03821661021157604051639e95e88b60e01b815260040160405180910390fd5b61021b828261054d565b5050565b6001600160a01b038216600090815260016020908152604080832084845290915281205460ff168061027e575060008281527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff165b9392505050565b61028d6104ec565b61029760006105ef565b565b6102a16104ec565b6102ac60008261054d565b50565b600054600290610100900460ff161580156102d1575060005460ff8083169116105b6103395760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805461ffff191660ff8316176101001781556103666000546001600160a01b03620100009091041690565b6001600160a01b0316148061037a5750303b155b1561038857610388826105ef565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b33600090815260016020908152604080832084845290915281205460ff1680610424575060008281527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49602052604090205460ff165b92915050565b6104326104ec565b6001600160a01b03821661045957604051631b25a00160e31b815260040160405180910390fd5b61021b828261064a565b61046b6104ec565b6001600160a01b0381166104d05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610330565b6102ac816105ef565b6104e16104ec565b6102ac60008261064a565b6000546001600160a01b03620100009091041633146102975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610330565b6001600160a01b0382166000818152600160208181526040808420868552909152909120805460ff191690911790556105b0576040518181527f22f0a171f00eeea3af5276d1f77587471dcc3bde32d62560046549b34bacd38a906020016103c2565b604080516001600160a01b0384168152602081018390527f21cdff046578afe71b78f95ac4891306af3a9b9eb71e2f0ef380b35b487d2f1291016103c2565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b6001600160a01b03821660008181526001602090815260408083208584529091529020805460ff191690556106a9576040518181527f7261c2abe5e576aac50024de639315f10783f67935bf118bbb49b33c20ef70ef906020016103c2565b604080516001600160a01b0384168152602081018390527fba8195cc62a4086b7cd93d22db90e43ae42d8b5febd8c66b3453771e455b7a3391016103c2565b80356001600160a01b03811681146106ff57600080fd5b919050565b6000806040838503121561071757600080fd5b610720836106e8565b946020939093013593505050565b60006020828403121561074057600080fd5b5035919050565b60006020828403121561075957600080fd5b61027e826106e856fea264697066735822122096da5c8d33677e6203057d911bba2c609059e50119bb896ec169d0349a48641d64736f6c634300080e0033", "devdoc": { "author": "Sismo", "kind": "dev", @@ -362,7 +400,7 @@ "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" + "ownerAddress": "Owner of the contract, can update public key and address" } }, "isRootAvailableForAttester(address,uint256)": { @@ -419,22 +457,26 @@ }, "userdoc": { "kind": "user", - "methods": {}, + "methods": { + "initialize(address)": { + "notice": "The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization." + } + }, "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, + "astId": 935, "contract": "contracts/periphery/utils/AvailableRootsRegistry.sol:AvailableRootsRegistry", "label": "_initialized", "offset": 0, "slot": "0", - "type": "t_bool" + "type": "t_uint8" }, { - "astId": 939, + "astId": 938, "contract": "contracts/periphery/utils/AvailableRootsRegistry.sol:AvailableRootsRegistry", "label": "_initializing", "offset": 1, @@ -442,7 +484,7 @@ "type": "t_bool" }, { - "astId": 389, + "astId": 396, "contract": "contracts/periphery/utils/AvailableRootsRegistry.sol:AvailableRootsRegistry", "label": "_owner", "offset": 2, @@ -450,7 +492,7 @@ "type": "t_address" }, { - "astId": 12620, + "astId": 15495, "contract": "contracts/periphery/utils/AvailableRootsRegistry.sol:AvailableRootsRegistry", "label": "_roots", "offset": 0, @@ -487,6 +529,11 @@ "encoding": "inplace", "label": "uint256", "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" } } } diff --git a/deployments/mumbai/Badges.json b/deployments/mumbai/Badges.json index 88b1628..f62ba40 100644 --- a/deployments/mumbai/Badges.json +++ b/deployments/mumbai/Badges.json @@ -47,6 +47,19 @@ "name": "ApprovalForAll", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -241,6 +254,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "IMPLEMENTATION_VERSION", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -302,6 +328,126 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "index", + "type": "uint8" + } + ], + "name": "getAttributeValueForBadge", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "getAttributesNamesAndValuesForBadge", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + }, + { + "internalType": "uint8[]", + "name": "", + "type": "uint8[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "getBadgeExtraData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "getBadgeIssuer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "getBadgeTimestamp", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -623,22 +769,22 @@ "type": "function" } ], - "transactionHash": "0x1051bc03dbef45e5cae54678ab300e8bb2cc481f724be896650518751b4cb930", + "transactionHash": "0xe6ede11f9bb84c6196c423e8f968bb588de965109953129484ff04390ae68c5e", "receipt": { "to": null, "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0x81760455CD8FC4EA4a5a5fEaa7F3677955d59b59", - "transactionIndex": 10, - "gasUsed": "1777624", - "logsBloom": "0x00000004000000000000000000020000000000000000000000000000000000000000000000000000000000000000000200008000000000000000000000008000000000000000000000000000000000800000000000002000000100000000000000000000020000000000000000000800002000000000000080000000000000000000000000000000000000000000000000000010000000000000000000008000200000000000000000080000800000000000000000000000001000000000004000000000000000000001000000000100000000000000000100100000000020000000000000000000000000000000000000000000000000000020008000100000", - "blockHash": "0x2ba774ac3d2b6f9d8a51517e5cb4caaf508861001ffe7d50250b4fc51228e1f3", - "transactionHash": "0x1051bc03dbef45e5cae54678ab300e8bb2cc481f724be896650518751b4cb930", + "contractAddress": "0x6D102d4FDFFcd6A4eb3E6207a25B2375d453F74A", + "transactionIndex": 14, + "gasUsed": "2131254", + "logsBloom": "0x00000004000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000008000002000000000000000000000000000000000000000000000000000800000000000000000040100000000000000000000220000000000000000000800002000000000000080000000000000000000000000000000000000000000000000000010004080000000000000008000200000000000000000000000800400000000000000000000001040000000004000000000000000000001000000050000000000000000000100100000000020000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0x3c8ffb75f78b8adfadc03d9a578094358edf94c44b22ac3627ab63dd8fb1ec2e", + "transactionHash": "0xe6ede11f9bb84c6196c423e8f968bb588de965109953129484ff04390ae68c5e", "logs": [ { - "transactionIndex": 10, - "blockNumber": 28807645, - "transactionHash": "0x1051bc03dbef45e5cae54678ab300e8bb2cc481f724be896650518751b4cb930", - "address": "0x81760455CD8FC4EA4a5a5fEaa7F3677955d59b59", + "transactionIndex": 14, + "blockNumber": 29540671, + "transactionHash": "0xe6ede11f9bb84c6196c423e8f968bb588de965109953129484ff04390ae68c5e", + "address": "0x6D102d4FDFFcd6A4eb3E6207a25B2375d453F74A", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -647,26 +793,38 @@ ], "data": "0x", "logIndex": 69, - "blockHash": "0x2ba774ac3d2b6f9d8a51517e5cb4caaf508861001ffe7d50250b4fc51228e1f3" + "blockHash": "0x3c8ffb75f78b8adfadc03d9a578094358edf94c44b22ac3627ab63dd8fb1ec2e" + }, + { + "transactionIndex": 14, + "blockNumber": 29540671, + "transactionHash": "0xe6ede11f9bb84c6196c423e8f968bb588de965109953129484ff04390ae68c5e", + "address": "0x6D102d4FDFFcd6A4eb3E6207a25B2375d453F74A", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000003", + "logIndex": 70, + "blockHash": "0x3c8ffb75f78b8adfadc03d9a578094358edf94c44b22ac3627ab63dd8fb1ec2e" }, { - "transactionIndex": 10, - "blockNumber": 28807645, - "transactionHash": "0x1051bc03dbef45e5cae54678ab300e8bb2cc481f724be896650518751b4cb930", + "transactionIndex": 14, + "blockNumber": 29540671, + "transactionHash": "0xe6ede11f9bb84c6196c423e8f968bb588de965109953129484ff04390ae68c5e", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", "0x0000000000000000000000000000000000000000000000000000000000001010", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x0000000000000000000000003a22c8bc68e98b0faf40f349dd2b2890fae01484" + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" ], - "data": "0x00000000000000000000000000000000000000000000000000161a96b0b988000000000000000000000000000000000000000000000000007df204f6b6956d9500000000000000000000000000000000000000000000000005e8090bfc0293a60000000000000000000000000000000000000000000000007ddbea6005dbe59500000000000000000000000000000000000000000000000005fe23a2acbc1ba6", - "logIndex": 70, - "blockHash": "0x2ba774ac3d2b6f9d8a51517e5cb4caaf508861001ffe7d50250b4fc51228e1f3" + "data": "0x0000000000000000000000000000000000000000000000000007ba4e7021eeb40000000000000000000000000000000000000000000000007ce5b243caa744b2000000000000000000000000000000000000000000000b8e71caa1573dbb15c90000000000000000000000000000000000000000000000007cddf7f55a8555fe000000000000000000000000000000000000000000000b8e71d25ba5addd047d", + "logIndex": 71, + "blockHash": "0x3c8ffb75f78b8adfadc03d9a578094358edf94c44b22ac3627ab63dd8fb1ec2e" } ], - "blockNumber": 28807645, - "cumulativeGasUsed": "3960841", + "blockNumber": 29540671, + "cumulativeGasUsed": "4568589", "status": 1, "byzantium": true }, @@ -674,11 +832,11 @@ "https://hub.staging.zikies.io/badges/mumbai/{id}.json", "0x4e070E9b85a659F0B7B47cde33152ad6c2F63954" ], - "numDeployments": 3, - "solcInputHash": "c7c67c4a1ddf53de4ef76f8a114dfc39", - "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\":\"Reverts, this is a non transferable ERC115 contract\"},\"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\":\"Reverts, this is a non transferable ERC115 contract\"},\"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 Reverts, this is a non transferable ERC115 contract\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n revert BadgesNonTransferrable();\\n }\\n\\n /**\\n * @dev Reverts, this is a non transferable ERC115 contract\\n */\\n function isApprovedForAll(address account, address operator)\\n public\\n view\\n virtual\\n override\\n returns (bool)\\n {\\n revert BadgesNonTransferrable();\\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\":\"0x55f7f1bac01e64ac60d1a4efe02bee2270444516a5b5d4719161fb664ff8bcf0\",\"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 error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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\":\"0xcf79a817ec578f5b4d8f23853dd8df0e3b1acfbff2b5a01601fd9a7315862ec9\",\"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": "0x60806040523480156200001157600080fd5b50604051620020e5380380620020e58339810160408190526200003491620002de565b81620000408162000055565b506200004d82826200006e565b50506200040b565b80516200006a90600490602084019062000205565b5050565b600054610100900460ff166200008b5760005460ff161562000095565b6200009562000150565b620000fd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801562000120576000805461ffff19166101011790555b6200012b8362000055565b620001386000836200016e565b80156200014b576000805461ff00191690555b505050565b60006200016830620001f660201b620009511760201c565b15905090565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166200006a5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6001600160a01b03163b151590565b8280546200021390620003cf565b90600052602060002090601f01602090048101928262000237576000855562000282565b82601f106200025257805160ff191683800117855562000282565b8280016001018555821562000282579182015b828111156200028257825182559160200191906001019062000265565b506200029092915062000294565b5090565b5b8082111562000290576000815560010162000295565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b0381168114620002d957600080fd5b919050565b60008060408385031215620002f257600080fd5b82516001600160401b03808211156200030a57600080fd5b818501915085601f8301126200031f57600080fd5b815181811115620003345762000334620002ab565b604051601f8201601f19908116603f011681019083821181831017156200035f576200035f620002ab565b816040528281526020935088848487010111156200037c57600080fd5b600091505b82821015620003a0578482018401518183018501529083019062000381565b82821115620003b25760008484830101525b9550620003c4915050858201620002c1565b925050509250929050565b600181811c90821680620003e457607f821691505b6020821081036200040557634e487b7160e01b600052602260045260246000fd5b50919050565b611cca806200041b6000396000f3fe608060405234801561001057600080fd5b506004361061012b5760003560e01c8063730cb7d5116100ad578063a22cb46511610071578063a22cb465146102ae578063b3c1cb21146102c1578063d547741f146102d4578063e985e9c5146102e7578063f242432a146102fa57600080fd5b8063730cb7d5146102525780637ab4339d1461026d57806391d14854146102805780639b642de114610293578063a217fddf146102a657600080fd5b80632f2ff15d116100f45780632f2ff15d146101d257806336568abe146101e557806344112ed8146101f85780634e1273f41461021f578063710b30961461023f57600080fd5b8062fdd58e1461013057806301ffc9a7146101565780630e89341c14610179578063248a9ca3146101995780632eb2c2d6146101bd575b600080fd5b61014361013e3660046112ee565b61030d565b6040519081526020015b60405180910390f35b610169610164366004611331565b61038a565b604051901515815260200161014d565b61018c61018736600461134e565b61039b565b60405161014d91906113c3565b6101436101a736600461134e565b6000908152600160208190526040909120015490565b6101d06101cb366004611522565b61042f565b005b6101d06101e03660046115cc565b6104cb565b6101d06101f33660046115cc565b6104f7565b6101437fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa481565b61023261022d3660046115f8565b610575565b60405161014d91906116fe565b6101d061024d366004611711565b61069f565b6005546040516001600160a01b03909116815260200161014d565b6101d061027b366004611766565b610732565b61016961028e3660046115cc565b610800565b6101d06102a13660046117ab565b61082b565b610143600081565b6101d06102bc3660046117e8565b610840565b6101d06102cf366004611824565b610859565b6101d06102e23660046115cc565b610888565b6101696102f536600461183f565b6108af565b6101d0610308366004611869565b6108ca565b60055460405163461e4f1960e11b8152600481018390526001600160a01b0384811660248301526000921690638c3c9e3290604401602060405180830381865afa15801561035f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038391906118ce565b9392505050565b600061039582610960565b92915050565b6060600480546103aa906118e7565b80601f01602080910402602001604051908101604052809291908181526020018280546103d6906118e7565b80156104235780601f106103f857610100808354040283529160200191610423565b820191906000526020600020905b81548152906001019060200180831161040657829003601f168201915b50505050509050919050565b6001600160a01b03851633148061044b575061044b85336108af565b6104b75760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084015b60405180910390fd5b6104c485858585856109a0565b5050505050565b600082815260016020819052604090912001546104e88133610b8e565b6104f28383610bf2565b505050565b6001600160a01b03811633146105675760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016104ae565b6105718282610c5d565b5050565b606081518351146105da5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016104ae565b6000835167ffffffffffffffff8111156105f6576105f66113d6565b60405190808252806020026020018201604052801561061f578160200160208202803683370190505b50905060005b84518110156106975761066a85828151811061064357610643611921565b602002602001015185838151811061065d5761065d611921565b602002602001015161030d565b82828151811061067c5761067c611921565b60209081029190910101526106908161194d565b9050610625565b509392505050565b7fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa46106ca8133610b8e565b836001600160a01b0316856001600160a01b0316876001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628686604051610722929190918252602082015260400190565b60405180910390a4505050505050565b600054610100900460ff1661074d5760005460ff1615610751565b303b155b6107b45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104ae565b600054610100900460ff161580156107d6576000805461ffff19166101011790555b6107df83610cc4565b6107ea600083610bf2565b80156104f2576000805461ff0019169055505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60006108378133610b8e565b61057182610cc4565b6040516309a711b960e31b815260040160405180910390fd5b60006108658133610b8e565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260016020819052604090912001546108a58133610b8e565b6104f28383610c5d565b60006040516309a711b960e31b815260040160405180910390fd5b6001600160a01b0385163314806108e657506108e685336108af565b6109445760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016104ae565b6104c48585858585610cd7565b6001600160a01b03163b151590565b60006001600160e01b03198216636cdb3d1360e11b148061099157506001600160e01b031982166303a24d0760e21b145b80610395575061039582610e07565b8151835114610a025760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016104ae565b6001600160a01b038416610a285760405162461bcd60e51b81526004016104ae90611966565b33610a37818787878787610840565b60005b8451811015610b20576000858281518110610a5757610a57611921565b602002602001015190506000858381518110610a7557610a75611921565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610ac65760405162461bcd60e51b81526004016104ae906119ab565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610b059084906119f5565b9250508190555050505080610b199061194d565b9050610a3a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610b70929190611a0d565b60405180910390a4610b86818787878787610e3c565b505050505050565b610b988282610800565b61057157610bb0816001600160a01b03166014610f97565b610bbb836020610f97565b604051602001610bcc929190611a3b565b60408051601f198184030181529082905262461bcd60e51b82526104ae916004016113c3565b610bfc8282610800565b6105715760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610c678282610800565b156105715760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8051610571906004906020840190611239565b6001600160a01b038416610cfd5760405162461bcd60e51b81526004016104ae90611966565b33610d1c818787610d0d88611133565b610d1688611133565b87610840565b60008481526002602090815260408083206001600160a01b038a16845290915290205483811015610d5f5760405162461bcd60e51b81526004016104ae906119ab565b60008581526002602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290610d9e9084906119f5565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610dfe82888888888861117e565b50505050505050565b60006001600160e01b03198216637965db0b60e01b148061039557506301ffc9a760e01b6001600160e01b0319831614610395565b6001600160a01b0384163b15610b865760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190610e809089908990889088908890600401611ab0565b6020604051808303816000875af1925050508015610ebb575060408051601f3d908101601f19168201909252610eb891810190611b0e565b60015b610f6757610ec7611b2b565b806308c379a003610f005750610edb611b47565b80610ee65750610f02565b8060405162461bcd60e51b81526004016104ae91906113c3565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016104ae565b6001600160e01b0319811663bc197c8160e01b14610dfe5760405162461bcd60e51b81526004016104ae90611bd1565b60606000610fa6836002611c19565b610fb19060026119f5565b67ffffffffffffffff811115610fc957610fc96113d6565b6040519080825280601f01601f191660200182016040528015610ff3576020820181803683370190505b509050600360fc1b8160008151811061100e5761100e611921565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061103d5761103d611921565b60200101906001600160f81b031916908160001a9053506000611061846002611c19565b61106c9060016119f5565b90505b60018111156110e4576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106110a0576110a0611921565b1a60f81b8282815181106110b6576110b6611921565b60200101906001600160f81b031916908160001a90535060049490941c936110dd81611c38565b905061106f565b5083156103835760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104ae565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061116d5761116d611921565b602090810291909101015292915050565b6001600160a01b0384163b15610b865760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906111c29089908990889088908890600401611c4f565b6020604051808303816000875af19250505080156111fd575060408051601f3d908101601f191682019092526111fa91810190611b0e565b60015b61120957610ec7611b2b565b6001600160e01b0319811663f23a6e6160e01b14610dfe5760405162461bcd60e51b81526004016104ae90611bd1565b828054611245906118e7565b90600052602060002090601f01602090048101928261126757600085556112ad565b82601f1061128057805160ff19168380011785556112ad565b828001600101855582156112ad579182015b828111156112ad578251825591602001919060010190611292565b506112b99291506112bd565b5090565b5b808211156112b957600081556001016112be565b80356001600160a01b03811681146112e957600080fd5b919050565b6000806040838503121561130157600080fd5b61130a836112d2565b946020939093013593505050565b6001600160e01b03198116811461132e57600080fd5b50565b60006020828403121561134357600080fd5b813561038381611318565b60006020828403121561136057600080fd5b5035919050565b60005b8381101561138257818101518382015260200161136a565b83811115611391576000848401525b50505050565b600081518084526113af816020860160208601611367565b601f01601f19169290920160200192915050565b6020815260006103836020830184611397565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715611412576114126113d6565b6040525050565b600067ffffffffffffffff821115611433576114336113d6565b5060051b60200190565b600082601f83011261144e57600080fd5b8135602061145b82611419565b60405161146882826113ec565b83815260059390931b850182019282810191508684111561148857600080fd5b8286015b848110156114a3578035835291830191830161148c565b509695505050505050565b600082601f8301126114bf57600080fd5b813567ffffffffffffffff8111156114d9576114d96113d6565b6040516114f0601f8301601f1916602001826113ec565b81815284602083860101111561150557600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561153a57600080fd5b611543866112d2565b9450611551602087016112d2565b9350604086013567ffffffffffffffff8082111561156e57600080fd5b61157a89838a0161143d565b9450606088013591508082111561159057600080fd5b61159c89838a0161143d565b935060808801359150808211156115b257600080fd5b506115bf888289016114ae565b9150509295509295909350565b600080604083850312156115df57600080fd5b823591506115ef602084016112d2565b90509250929050565b6000806040838503121561160b57600080fd5b823567ffffffffffffffff8082111561162357600080fd5b818501915085601f83011261163757600080fd5b8135602061164482611419565b60405161165182826113ec565b83815260059390931b850182019282810191508984111561167157600080fd5b948201945b8386101561169657611687866112d2565b82529482019490820190611676565b965050860135925050808211156116ac57600080fd5b506116b98582860161143d565b9150509250929050565b600081518084526020808501945080840160005b838110156116f3578151875295820195908201906001016116d7565b509495945050505050565b60208152600061038360208301846116c3565b600080600080600060a0868803121561172957600080fd5b611732866112d2565b9450611740602087016112d2565b935061174e604087016112d2565b94979396509394606081013594506080013592915050565b6000806040838503121561177957600080fd5b823567ffffffffffffffff81111561179057600080fd5b61179c858286016114ae565b9250506115ef602084016112d2565b6000602082840312156117bd57600080fd5b813567ffffffffffffffff8111156117d457600080fd5b6117e0848285016114ae565b949350505050565b600080604083850312156117fb57600080fd5b611804836112d2565b91506020830135801515811461181957600080fd5b809150509250929050565b60006020828403121561183657600080fd5b610383826112d2565b6000806040838503121561185257600080fd5b61185b836112d2565b91506115ef602084016112d2565b600080600080600060a0868803121561188157600080fd5b61188a866112d2565b9450611898602087016112d2565b93506040860135925060608601359150608086013567ffffffffffffffff8111156118c257600080fd5b6115bf888289016114ae565b6000602082840312156118e057600080fd5b5051919050565b600181811c908216806118fb57607f821691505b60208210810361191b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161195f5761195f611937565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115611a0857611a08611937565b500190565b604081526000611a2060408301856116c3565b8281036020840152611a3281856116c3565b95945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611a73816017850160208801611367565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611aa4816028840160208801611367565b01602801949350505050565b6001600160a01b0386811682528516602082015260a060408201819052600090611adc908301866116c3565b8281036060840152611aee81866116c3565b90508281036080840152611b028185611397565b98975050505050505050565b600060208284031215611b2057600080fd5b815161038381611318565b600060033d1115611b445760046000803e5060005160e01c5b90565b600060443d1015611b555790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611b8557505050505090565b8285019150815181811115611b9d5750505050505090565b843d8701016020828501011115611bb75750505050505090565b611bc6602082860101876113ec565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6000816000190483118215151615611c3357611c33611937565b500290565b600081611c4757611c47611937565b506000190190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611c8990830184611397565b97965050505050505056fea26469706673582212207baaa3a761f1daf84910213f1b2412ab790a7693d59dad05f0ac9bc001378df664736f6c634300080e0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061012b5760003560e01c8063730cb7d5116100ad578063a22cb46511610071578063a22cb465146102ae578063b3c1cb21146102c1578063d547741f146102d4578063e985e9c5146102e7578063f242432a146102fa57600080fd5b8063730cb7d5146102525780637ab4339d1461026d57806391d14854146102805780639b642de114610293578063a217fddf146102a657600080fd5b80632f2ff15d116100f45780632f2ff15d146101d257806336568abe146101e557806344112ed8146101f85780634e1273f41461021f578063710b30961461023f57600080fd5b8062fdd58e1461013057806301ffc9a7146101565780630e89341c14610179578063248a9ca3146101995780632eb2c2d6146101bd575b600080fd5b61014361013e3660046112ee565b61030d565b6040519081526020015b60405180910390f35b610169610164366004611331565b61038a565b604051901515815260200161014d565b61018c61018736600461134e565b61039b565b60405161014d91906113c3565b6101436101a736600461134e565b6000908152600160208190526040909120015490565b6101d06101cb366004611522565b61042f565b005b6101d06101e03660046115cc565b6104cb565b6101d06101f33660046115cc565b6104f7565b6101437fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa481565b61023261022d3660046115f8565b610575565b60405161014d91906116fe565b6101d061024d366004611711565b61069f565b6005546040516001600160a01b03909116815260200161014d565b6101d061027b366004611766565b610732565b61016961028e3660046115cc565b610800565b6101d06102a13660046117ab565b61082b565b610143600081565b6101d06102bc3660046117e8565b610840565b6101d06102cf366004611824565b610859565b6101d06102e23660046115cc565b610888565b6101696102f536600461183f565b6108af565b6101d0610308366004611869565b6108ca565b60055460405163461e4f1960e11b8152600481018390526001600160a01b0384811660248301526000921690638c3c9e3290604401602060405180830381865afa15801561035f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038391906118ce565b9392505050565b600061039582610960565b92915050565b6060600480546103aa906118e7565b80601f01602080910402602001604051908101604052809291908181526020018280546103d6906118e7565b80156104235780601f106103f857610100808354040283529160200191610423565b820191906000526020600020905b81548152906001019060200180831161040657829003601f168201915b50505050509050919050565b6001600160a01b03851633148061044b575061044b85336108af565b6104b75760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084015b60405180910390fd5b6104c485858585856109a0565b5050505050565b600082815260016020819052604090912001546104e88133610b8e565b6104f28383610bf2565b505050565b6001600160a01b03811633146105675760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016104ae565b6105718282610c5d565b5050565b606081518351146105da5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016104ae565b6000835167ffffffffffffffff8111156105f6576105f66113d6565b60405190808252806020026020018201604052801561061f578160200160208202803683370190505b50905060005b84518110156106975761066a85828151811061064357610643611921565b602002602001015185838151811061065d5761065d611921565b602002602001015161030d565b82828151811061067c5761067c611921565b60209081029190910101526106908161194d565b9050610625565b509392505050565b7fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa46106ca8133610b8e565b836001600160a01b0316856001600160a01b0316876001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628686604051610722929190918252602082015260400190565b60405180910390a4505050505050565b600054610100900460ff1661074d5760005460ff1615610751565b303b155b6107b45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104ae565b600054610100900460ff161580156107d6576000805461ffff19166101011790555b6107df83610cc4565b6107ea600083610bf2565b80156104f2576000805461ff0019169055505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60006108378133610b8e565b61057182610cc4565b6040516309a711b960e31b815260040160405180910390fd5b60006108658133610b8e565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260016020819052604090912001546108a58133610b8e565b6104f28383610c5d565b60006040516309a711b960e31b815260040160405180910390fd5b6001600160a01b0385163314806108e657506108e685336108af565b6109445760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016104ae565b6104c48585858585610cd7565b6001600160a01b03163b151590565b60006001600160e01b03198216636cdb3d1360e11b148061099157506001600160e01b031982166303a24d0760e21b145b80610395575061039582610e07565b8151835114610a025760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016104ae565b6001600160a01b038416610a285760405162461bcd60e51b81526004016104ae90611966565b33610a37818787878787610840565b60005b8451811015610b20576000858281518110610a5757610a57611921565b602002602001015190506000858381518110610a7557610a75611921565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610ac65760405162461bcd60e51b81526004016104ae906119ab565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610b059084906119f5565b9250508190555050505080610b199061194d565b9050610a3a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610b70929190611a0d565b60405180910390a4610b86818787878787610e3c565b505050505050565b610b988282610800565b61057157610bb0816001600160a01b03166014610f97565b610bbb836020610f97565b604051602001610bcc929190611a3b565b60408051601f198184030181529082905262461bcd60e51b82526104ae916004016113c3565b610bfc8282610800565b6105715760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610c678282610800565b156105715760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8051610571906004906020840190611239565b6001600160a01b038416610cfd5760405162461bcd60e51b81526004016104ae90611966565b33610d1c818787610d0d88611133565b610d1688611133565b87610840565b60008481526002602090815260408083206001600160a01b038a16845290915290205483811015610d5f5760405162461bcd60e51b81526004016104ae906119ab565b60008581526002602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290610d9e9084906119f5565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610dfe82888888888861117e565b50505050505050565b60006001600160e01b03198216637965db0b60e01b148061039557506301ffc9a760e01b6001600160e01b0319831614610395565b6001600160a01b0384163b15610b865760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190610e809089908990889088908890600401611ab0565b6020604051808303816000875af1925050508015610ebb575060408051601f3d908101601f19168201909252610eb891810190611b0e565b60015b610f6757610ec7611b2b565b806308c379a003610f005750610edb611b47565b80610ee65750610f02565b8060405162461bcd60e51b81526004016104ae91906113c3565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016104ae565b6001600160e01b0319811663bc197c8160e01b14610dfe5760405162461bcd60e51b81526004016104ae90611bd1565b60606000610fa6836002611c19565b610fb19060026119f5565b67ffffffffffffffff811115610fc957610fc96113d6565b6040519080825280601f01601f191660200182016040528015610ff3576020820181803683370190505b509050600360fc1b8160008151811061100e5761100e611921565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061103d5761103d611921565b60200101906001600160f81b031916908160001a9053506000611061846002611c19565b61106c9060016119f5565b90505b60018111156110e4576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106110a0576110a0611921565b1a60f81b8282815181106110b6576110b6611921565b60200101906001600160f81b031916908160001a90535060049490941c936110dd81611c38565b905061106f565b5083156103835760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104ae565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061116d5761116d611921565b602090810291909101015292915050565b6001600160a01b0384163b15610b865760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906111c29089908990889088908890600401611c4f565b6020604051808303816000875af19250505080156111fd575060408051601f3d908101601f191682019092526111fa91810190611b0e565b60015b61120957610ec7611b2b565b6001600160e01b0319811663f23a6e6160e01b14610dfe5760405162461bcd60e51b81526004016104ae90611bd1565b828054611245906118e7565b90600052602060002090601f01602090048101928261126757600085556112ad565b82601f1061128057805160ff19168380011785556112ad565b828001600101855582156112ad579182015b828111156112ad578251825591602001919060010190611292565b506112b99291506112bd565b5090565b5b808211156112b957600081556001016112be565b80356001600160a01b03811681146112e957600080fd5b919050565b6000806040838503121561130157600080fd5b61130a836112d2565b946020939093013593505050565b6001600160e01b03198116811461132e57600080fd5b50565b60006020828403121561134357600080fd5b813561038381611318565b60006020828403121561136057600080fd5b5035919050565b60005b8381101561138257818101518382015260200161136a565b83811115611391576000848401525b50505050565b600081518084526113af816020860160208601611367565b601f01601f19169290920160200192915050565b6020815260006103836020830184611397565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715611412576114126113d6565b6040525050565b600067ffffffffffffffff821115611433576114336113d6565b5060051b60200190565b600082601f83011261144e57600080fd5b8135602061145b82611419565b60405161146882826113ec565b83815260059390931b850182019282810191508684111561148857600080fd5b8286015b848110156114a3578035835291830191830161148c565b509695505050505050565b600082601f8301126114bf57600080fd5b813567ffffffffffffffff8111156114d9576114d96113d6565b6040516114f0601f8301601f1916602001826113ec565b81815284602083860101111561150557600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561153a57600080fd5b611543866112d2565b9450611551602087016112d2565b9350604086013567ffffffffffffffff8082111561156e57600080fd5b61157a89838a0161143d565b9450606088013591508082111561159057600080fd5b61159c89838a0161143d565b935060808801359150808211156115b257600080fd5b506115bf888289016114ae565b9150509295509295909350565b600080604083850312156115df57600080fd5b823591506115ef602084016112d2565b90509250929050565b6000806040838503121561160b57600080fd5b823567ffffffffffffffff8082111561162357600080fd5b818501915085601f83011261163757600080fd5b8135602061164482611419565b60405161165182826113ec565b83815260059390931b850182019282810191508984111561167157600080fd5b948201945b8386101561169657611687866112d2565b82529482019490820190611676565b965050860135925050808211156116ac57600080fd5b506116b98582860161143d565b9150509250929050565b600081518084526020808501945080840160005b838110156116f3578151875295820195908201906001016116d7565b509495945050505050565b60208152600061038360208301846116c3565b600080600080600060a0868803121561172957600080fd5b611732866112d2565b9450611740602087016112d2565b935061174e604087016112d2565b94979396509394606081013594506080013592915050565b6000806040838503121561177957600080fd5b823567ffffffffffffffff81111561179057600080fd5b61179c858286016114ae565b9250506115ef602084016112d2565b6000602082840312156117bd57600080fd5b813567ffffffffffffffff8111156117d457600080fd5b6117e0848285016114ae565b949350505050565b600080604083850312156117fb57600080fd5b611804836112d2565b91506020830135801515811461181957600080fd5b809150509250929050565b60006020828403121561183657600080fd5b610383826112d2565b6000806040838503121561185257600080fd5b61185b836112d2565b91506115ef602084016112d2565b600080600080600060a0868803121561188157600080fd5b61188a866112d2565b9450611898602087016112d2565b93506040860135925060608601359150608086013567ffffffffffffffff8111156118c257600080fd5b6115bf888289016114ae565b6000602082840312156118e057600080fd5b5051919050565b600181811c908216806118fb57607f821691505b60208210810361191b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161195f5761195f611937565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115611a0857611a08611937565b500190565b604081526000611a2060408301856116c3565b8281036020840152611a3281856116c3565b95945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611a73816017850160208801611367565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611aa4816028840160208801611367565b01602801949350505050565b6001600160a01b0386811682528516602082015260a060408201819052600090611adc908301866116c3565b8281036060840152611aee81866116c3565b90508281036080840152611b028185611397565b98975050505050505050565b600060208284031215611b2057600080fd5b815161038381611318565b600060033d1115611b445760046000803e5060005160e01c5b90565b600060443d1015611b555790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611b8557505050505090565b8285019150815181811115611b9d5750505050505090565b843d8701016020828501011115611bb75750505050505090565b611bc6602082860101876113ec565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6000816000190483118215151615611c3357611c33611937565b500290565b600081611c4757611c47611937565b506000190190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611c8990830184611397565b97965050505050505056fea26469706673582212207baaa3a761f1daf84910213f1b2412ab790a7693d59dad05f0ac9bc001378df664736f6c634300080e0033", + "numDeployments": 4, + "solcInputHash": "6edb98fea2bf424a369954d0e80655f6", + "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\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\":[],\"name\":\"IMPLEMENTATION_VERSION\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"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\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"name\":\"getAttributeValueForBadge\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getAttributesNamesAndValuesForBadge\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint8[]\",\"name\":\"\",\"type\":\"uint8[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBadgeExtraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBadgeIssuer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBadgeTimestamp\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"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\"},\"getAttributeValueForBadge(uint256,uint8)\":{\"details\":\"Getter of the value of a specific badge attribute\",\"params\":{\"id\":\"Badge Id to check (= attestationCollectionId)\",\"index\":\"Index of the attribute\"}},\"getAttributesNamesAndValuesForBadge(uint256)\":{\"details\":\"Getter of all badge attributes and their values for a specific badge\",\"params\":{\"id\":\"Badge Id to check (= attestationCollectionId)\"}},\"getBadgeExtraData(address,uint256)\":{\"details\":\"Getter of the badge extra data (it can store nullifier and burnCount)\",\"params\":{\"account\":\"Address that holds the badge\",\"id\":\"Badge Id to check (= attestationCollectionId)\"}},\"getBadgeIssuer(address,uint256)\":{\"details\":\"Getter of the badge issuer\",\"params\":{\"account\":\"Address that holds the badge\",\"id\":\"Badge Id to check (= attestationCollectionId)\"}},\"getBadgeTimestamp(address,uint256)\":{\"details\":\"Getter of the badge timestamp\",\"params\":{\"account\":\"Address that holds the badge\",\"id\":\"Badge Id to check (= attestationCollectionId)\"}},\"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. May emit a {RoleGranted} event.\"},\"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\":\"Reverts, this is a non transferable ERC115 contract\"},\"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`. May emit a {RoleRevoked} event.\"},\"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. May emit a {RoleRevoked} event.\"},\"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\":{\"details\":\"See {IERC1155-safeBatchTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,uint256,bytes)\":{\"details\":\"See {IERC1155-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"Reverts, this is a non transferable ERC115 contract\"},\"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\":{\"initialize(string,address)\":{\"notice\":\"The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\"}},\"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.8.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);\\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 `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\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(account),\\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 * May emit a {RoleGranted} event.\\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 * May emit a {RoleRevoked} event.\\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 * May emit a {RoleRevoked} event.\\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 * May emit a {RoleGranted} event.\\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 * May emit a {RoleGranted} event.\\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 * May emit a {RoleRevoked} event.\\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\":\"0x67e3daf189111d6d5b0464ed09cf9f0605a22c4b965a7fcecd707101faff008a\",\"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.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xcee5467d5d873fb75dae6f98c01a8d25dd609f9d0374c7d39217bd5f9539a2d6\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 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 _requireNotPaused();\\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 _requirePaused();\\n _;\\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 Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\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\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (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: address zero is not a valid owner\\\");\\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 token owner or 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: caller is not token owner or 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 uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, 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 _afterTokenTransfer(operator, from, to, ids, amounts, data);\\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 _afterTokenTransfer(operator, from, to, ids, amounts, data);\\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 uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\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 * 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 _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 _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\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 * Emits a {TransferSingle} event.\\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 uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\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 _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\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 _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {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 `ids` and `amounts` 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 /**\\n * @dev Hook that is called after 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 _afterTokenTransfer(\\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\":\"0xd917747dc87f189c6779b894f367a028f9dca4be930283cccec8f312966af820\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 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\":\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\",\"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.8.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 functionCallWithValue(target, data, 0, \\\"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 (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or 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 _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\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 /// @solidity memory-safe-assembly\\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\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"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 (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\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 unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\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 unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\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] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xa4d1d62251f8574deb032a35fc948386a9b4de74b812d4f545a1ac120486b48a\",\"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\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10**64) {\\n value /= 10**64;\\n result += 64;\\n }\\n if (value >= 10**32) {\\n value /= 10**32;\\n result += 32;\\n }\\n if (value >= 10**16) {\\n value /= 10**16;\\n result += 16;\\n }\\n if (value >= 10**8) {\\n value /= 10**8;\\n result += 8;\\n }\\n if (value >= 10**4) {\\n value /= 10**4;\\n result += 4;\\n }\\n if (value >= 10**2) {\\n value /= 10**2;\\n result += 2;\\n }\\n if (value >= 10**1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa1e8e83cd0087785df04ac79fb395d9f3684caeaf973d9e2c71caef723a3a5d6\",\"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 uint8 public constant IMPLEMENTATION_VERSION = 3;\\n\\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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\n */\\n function initialize(\\n string memory uri,\\n address owner\\n ) public reinitializer(IMPLEMENTATION_VERSION) {\\n // if proxy did not setup uri yet or if called by constructor (for implem setup)\\n if (bytes(ERC1155.uri(0)).length == 0 || address(this).code.length == 0) {\\n _setURI(uri);\\n _grantRole(DEFAULT_ADMIN_ROLE, owner);\\n }\\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(\\n address account,\\n uint256 id\\n ) public view virtual override(ERC1155, IBadges) returns (uint256) {\\n return _attestationsRegistry.getAttestationValue(id, account);\\n }\\n\\n /**\\n * @dev Reverts, this is a non transferable ERC115 contract\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n revert BadgesNonTransferrable();\\n }\\n\\n /**\\n * @dev Reverts, this is a non transferable ERC115 contract\\n */\\n function isApprovedForAll(\\n address account,\\n address operator\\n ) public view virtual override returns (bool) {\\n revert BadgesNonTransferrable();\\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(\\n address attestationsRegistry\\n ) external override onlyRole(DEFAULT_ADMIN_ROLE) {\\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 Getter of the badge issuer\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeIssuer(address account, uint256 id) external view returns (address) {\\n return _attestationsRegistry.getAttestationIssuer(id, account);\\n }\\n\\n /**\\n * @dev Getter of the badge timestamp\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeTimestamp(address account, uint256 id) external view returns (uint32) {\\n return _attestationsRegistry.getAttestationTimestamp(id, account);\\n }\\n\\n /**\\n * @dev Getter of the badge extra data (it can store nullifier and burnCount)\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeExtraData(address account, uint256 id) external view returns (bytes memory) {\\n return _attestationsRegistry.getAttestationExtraData(id, account);\\n }\\n\\n /**\\n * @dev Getter of the value of a specific badge attribute\\n * @param id Badge Id to check (= attestationCollectionId)\\n * @param index Index of the attribute\\n */\\n function getAttributeValueForBadge(uint256 id, uint8 index) external view returns (uint8) {\\n return _attestationsRegistry.getAttributeValueForAttestationsCollection(id, index);\\n }\\n\\n /**\\n * @dev Getter of all badge attributes and their values for a specific badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getAttributesNamesAndValuesForBadge(\\n uint256 id\\n ) external view returns (bytes32[] memory, uint8[] memory) {\\n return _attestationsRegistry.getAttributesNamesAndValuesForAttestationsCollection(id);\\n }\\n\\n /**\\n * @dev ERC165\\n */\\n function supportsInterface(\\n bytes4 interfaceId\\n ) public view virtual override(AccessControl, ERC1155) returns (bool) {\\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\":\"0x9982b753d43f2a4a9edb5987714b09f518b419339d4bf9cd63b600bee442fd01\",\"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';\\nimport {IAttestationsRegistryConfigLogic} from './IAttestationsRegistryConfigLogic.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry is IAttestationsRegistryConfigLogic {\\n error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view returns (address, uint256, uint32, bytes memory);\\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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view 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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0x0c3af349bcfa545c959f4d9f25aacb73e3ef1ca7cfe62a2eda4a743a6835904f\",\"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 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 error AttributeDoesNotExist(uint8 attributeIndex);\\n error AttributeAlreadyExists(uint8 attributeIndex);\\n error ArgsLengthDoesNotMatch();\\n\\n event NewAttributeCreated(uint8 attributeIndex, bytes32 attributeName);\\n event AttributeNameUpdated(\\n uint8 attributeIndex,\\n bytes32 newAttributeName,\\n bytes32 previousAttributeName\\n );\\n event AttributeDeleted(uint8 attributeIndex, bytes32 deletedAttributeName);\\n\\n event AttestationsCollectionAttributeSet(\\n uint256 collectionId,\\n uint8 attributeIndex,\\n uint8 attributeValue\\n );\\n\\n event IssuerAuthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n event IssuerUnauthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n\\n /**\\n * @dev Returns whether an attestationsCollection has a specific attribute referenced by its index\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute. Can go from 0 to 63.\\n */\\n function attestationsCollectionHasAttribute(\\n uint256 collectionId,\\n uint8 index\\n ) external view returns (bool);\\n\\n function attestationsCollectionHasAttributes(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (bool);\\n\\n /**\\n * @dev Returns the attribute's value (from 1 to 15) of an attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param attributeIndex Index of the attribute. Can go from 0 to 63.\\n */\\n function getAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 attributeIndex\\n ) external view returns (uint8);\\n\\n function getAttributesValuesForAttestationsCollection(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (uint8[] memory);\\n\\n /**\\n * @dev Set a value for an attribute of an attestationsCollection. The attribute should already be created.\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute (must be between 0 and 63)\\n * @param value Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15\\n */\\n function setAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 index,\\n uint8 value\\n ) external;\\n\\n function setAttributesValuesForAttestationsCollections(\\n uint256[] memory collectionIds,\\n uint8[] memory indices,\\n uint8[] memory values\\n ) external;\\n\\n /**\\n * @dev Returns all the enabled attributes names and their values for a specific attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n */\\n function getAttributesNamesAndValuesForAttestationsCollection(\\n uint256 collectionId\\n ) external view returns (bytes32[] memory, uint8[] memory);\\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 /**\\n * @dev Create a new attribute.\\n * @param index Index of the attribute. Can go from 0 to 63.\\n * @param name Name in bytes32 of the attribute\\n */\\n function createNewAttribute(uint8 index, bytes32 name) external;\\n\\n function createNewAttributes(uint8[] memory indices, bytes32[] memory names) external;\\n\\n /**\\n * @dev Update the name of an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n * @param newName new name in bytes32 of the attribute\\n */\\n function updateAttributeName(uint8 index, bytes32 newName) external;\\n\\n function updateAttributesName(uint8[] memory indices, bytes32[] memory names) external;\\n\\n /**\\n * @dev Delete an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n */\\n function deleteAttribute(uint8 index) external;\\n\\n function deleteAttributes(uint8[] memory indices) external;\\n}\\n\",\"keccak256\":\"0x07a1a9e8d2caf1d810ba8fb760a35ce2a0ef60a76814d44881a5aa56162ce26b\",\"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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\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 /**\\n * @dev Getter of the badge issuer\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeIssuer(address account, uint256 id) external view returns (address);\\n\\n /**\\n * @dev Getter of the badge timestamp\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeTimestamp(address account, uint256 id) external view returns (uint32);\\n\\n /**\\n * @dev Getter of the badge extra data (it can store nullifier and burnCount)\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeExtraData(address account, uint256 id) external view returns (bytes memory);\\n\\n /**\\n * @dev Getter of the value of a specific badge attribute\\n * @param id Badge Id to check (= attestationCollectionId)\\n * @param index Index of the attribute\\n */\\n function getAttributeValueForBadge(uint256 id, uint8 index) external view returns (uint8);\\n\\n /**\\n * @dev Getter of all badge attributes and their values for a specific badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getAttributesNamesAndValuesForBadge(\\n uint256 id\\n ) external view returns (bytes32[] memory, uint8[] memory);\\n}\\n\",\"keccak256\":\"0xd6bdfc887ef15ee022eb05d89dbe2e2938ee6c0a55a55f8db527ef650242c6bb\",\"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/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": "0x60806040523480156200001157600080fd5b50604051620027eb380380620027eb833981016040819052620000349162000395565b81620000408162000055565b506200004d82826200006e565b5050620004c2565b80516200006a906004906020840190620002bc565b5050565b600054600390610100900460ff1615801562000091575060005460ff8083169116105b620000f95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805461ffff191660ff83161761010017815562000127906200051d62000198602090811b91909117901c565b511580620001345750303b155b156200015257620001458362000055565b6200015260008362000234565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b606060048054620001a99062000486565b80601f0160208091040260200160405190810160405280929190818152602001828054620001d79062000486565b8015620002285780601f10620001fc5761010080835404028352916020019162000228565b820191906000526020600020905b8154815290600101906020018083116200020a57829003601f168201915b50505050509050919050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166200006a5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b828054620002ca9062000486565b90600052602060002090601f016020900481019282620002ee576000855562000339565b82601f106200030957805160ff191683800117855562000339565b8280016001018555821562000339579182015b82811115620003395782518255916020019190600101906200031c565b50620003479291506200034b565b5090565b5b808211156200034757600081556001016200034c565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146200039057600080fd5b919050565b60008060408385031215620003a957600080fd5b82516001600160401b0380821115620003c157600080fd5b818501915085601f830112620003d657600080fd5b815181811115620003eb57620003eb62000362565b604051601f8201601f19908116603f0116810190838211818310171562000416576200041662000362565b816040528281526020935088848487010111156200043357600080fd5b600091505b8282101562000457578482018401518183018501529083019062000438565b82821115620004695760008484830101525b95506200047b91505085820162000378565b925050509250929050565b600181811c908216806200049b57607f821691505b602082108103620004bc57634e487b7160e01b600052602260045260246000fd5b50919050565b61231980620004d26000396000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c8063754b377c116100de578063aed8c6bc11610097578063e37ffe7c11610071578063e37ffe7c146103aa578063e985e9c5146103cb578063f242432a146103de578063ff4468c4146103f157600080fd5b8063aed8c6bc14610371578063b3c1cb2114610384578063d547741f1461039757600080fd5b8063754b377c146103035780637ab4339d1461031d57806391d14854146103305780639b642de114610343578063a217fddf14610356578063a22cb4651461035e57600080fd5b80632f2ff15d1161014b57806344112ed81161012557806344112ed8146102985780634e1273f4146102bf578063710b3096146102df578063730cb7d5146102f257600080fd5b80632f2ff15d1461025f57806336568abe146102725780633e1f3c271461028557600080fd5b8062fdd58e1461019257806301ffc9a7146101b85780630e064366146101db5780630e89341c14610206578063248a9ca3146102265780632eb2c2d61461024a575b600080fd5b6101a56101a0366004611618565b610419565b6040519081526020015b60405180910390f35b6101cb6101c636600461165a565b610496565b60405190151581526020016101af565b6101ee6101e9366004611618565b6104a7565b6040516001600160a01b0390911681526020016101af565b610219610214366004611677565b61051d565b6040516101af91906116ec565b6101a5610234366004611677565b6000908152600160208190526040909120015490565b61025d610258366004611858565b6105b1565b005b61025d61026d366004611905565b610606565b61025d610280366004611905565b610631565b610219610293366004611618565b6106af565b6101a57fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa481565b6102d26102cd366004611935565b610729565b6040516101af9190611a3c565b61025d6102ed366004611a4f565b610852565b6005546001600160a01b03166101ee565b61030b600381565b60405160ff90911681526020016101af565b61025d61032b366004611aaa565b6108e4565b6101cb61033e366004611905565b6109f1565b61025d610351366004611af0565b610a1c565b6101a5600081565b61025d61036c366004611b2c565b610a30565b61030b61037f366004611b6e565b610a49565b61025d610392366004611b93565b610ac0565b61025d6103a5366004611905565b610aee565b6103bd6103b8366004611677565b610b14565b6040516101af929190611bb0565b6101cb6103d9366004611c2e565b610b93565b61025d6103ec366004611c5c565b610bae565b6104046103ff366004611618565b610bf3565b60405163ffffffff90911681526020016101af565b60055460405163461e4f1960e11b8152600481018390526001600160a01b0384811660248301526000921690638c3c9e3290604401602060405180830381865afa15801561046b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f9190611cc4565b9392505050565b60006104a182610c69565b92915050565b6005546040516363ed4d5360e11b8152600481018390526001600160a01b038481166024830152600092169063c7da9aa690604401602060405180830381865afa1580156104f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f9190611cdd565b60606004805461052c90611cfa565b80601f016020809104026020016040519081016040528092919081815260200182805461055890611cfa565b80156105a55780601f1061057a576101008083540402835291602001916105a5565b820191906000526020600020905b81548152906001019060200180831161058857829003601f168201915b50505050509050919050565b6001600160a01b0385163314806105cd57506105cd8533610b93565b6105f25760405162461bcd60e51b81526004016105e990611d34565b60405180910390fd5b6105ff8585858585610ca9565b5050505050565b6000828152600160208190526040909120015461062281610e97565b61062c8383610ea4565b505050565b6001600160a01b03811633146106a15760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105e9565b6106ab8282610f0f565b5050565b600554604051636d7fbb6760e01b8152600481018390526001600160a01b0384811660248301526060921690636d7fbb6790604401600060405180830381865afa158015610701573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261048f9190810190611d82565b6060815183511461078e5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016105e9565b600083516001600160401b038111156107a9576107a96116ff565b6040519080825280602002602001820160405280156107d2578160200160208202803683370190505b50905060005b845181101561084a5761081d8582815181106107f6576107f6611e03565b602002602001015185838151811061081057610810611e03565b6020026020010151610419565b82828151811061082f5761082f611e03565b602090810291909101015261084381611e2f565b90506107d8565b509392505050565b7fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa461087c81610e97565b836001600160a01b0316856001600160a01b0316876001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6286866040516108d4929190918252602082015260400190565b60405180910390a4505050505050565b600054600390610100900460ff16158015610906575060005460ff8083169116105b6109695760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105e9565b6000805461ffff191660ff8316176101001781556109869061051d565b5115806109925750303b155b156109ab576109a083610f76565b6109ab600083610ea4565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000610a2781610e97565b6106ab82610f76565b6040516309a711b960e31b815260040160405180910390fd5b600554604051630e972f9160e41b81526004810184905260ff831660248201526000916001600160a01b03169063e972f91090604401602060405180830381865afa158015610a9c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f9190611e48565b6000610acb81610e97565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526001602081905260409091200154610b0a81610e97565b61062c8383610f0f565b600554604051632b2bf81b60e11b81526004810183905260609182916001600160a01b0390911690635657f03690602401600060405180830381865afa158015610b62573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b8a9190810190611ed4565b91509150915091565b60006040516309a711b960e31b815260040160405180910390fd5b6001600160a01b038516331480610bca5750610bca8533610b93565b610be65760405162461bcd60e51b81526004016105e990611d34565b6105ff8585858585610f89565b6005546040516314067f8b60e01b8152600481018390526001600160a01b03848116602483015260009216906314067f8b90604401602060405180830381865afa158015610c45573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f9190611f90565b60006001600160e01b03198216636cdb3d1360e11b1480610c9a57506001600160e01b031982166303a24d0760e21b145b806104a157506104a1826110c5565b8151835114610d0b5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016105e9565b6001600160a01b038416610d315760405162461bcd60e51b81526004016105e990611fb6565b33610d40818787878787610a30565b60005b8451811015610e29576000858281518110610d6057610d60611e03565b602002602001015190506000858381518110610d7e57610d7e611e03565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610dcf5760405162461bcd60e51b81526004016105e990611ffb565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610e0e908490612045565b9250508190555050505080610e2290611e2f565b9050610d43565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610e7992919061205d565b60405180910390a4610e8f8187878787876110fa565b505050505050565b610ea1813361125e565b50565b610eae82826109f1565b6106ab5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610f1982826109f1565b156106ab5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b80516106ab90600490602084019061156a565b6001600160a01b038416610faf5760405162461bcd60e51b81526004016105e990611fb6565b336000610fbb856112b7565b90506000610fc8856112b7565b9050610fd8838989858589610a30565b60008681526002602090815260408083206001600160a01b038c1684529091529020548581101561101b5760405162461bcd60e51b81526004016105e990611ffb565b60008781526002602090815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061105a908490612045565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46110ba848a8a8a8a8a611302565b505050505050505050565b60006001600160e01b03198216637965db0b60e01b14806104a157506301ffc9a760e01b6001600160e01b03198316146104a1565b6001600160a01b0384163b15610e8f5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061113e908990899088908890889060040161208b565b6020604051808303816000875af1925050508015611179575060408051601f3d908101601f19168201909252611176918101906120e9565b60015b61122557611185612106565b806308c379a0036111be5750611199612122565b806111a457506111c0565b8060405162461bcd60e51b81526004016105e991906116ec565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016105e9565b6001600160e01b0319811663bc197c8160e01b146112555760405162461bcd60e51b81526004016105e9906121ab565b50505050505050565b61126882826109f1565b6106ab57611275816113bd565b6112808360206113cf565b6040516020016112919291906121f3565b60408051601f198184030181529082905262461bcd60e51b82526105e9916004016116ec565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106112f1576112f1611e03565b602090810291909101015292915050565b6001600160a01b0384163b15610e8f5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906113469089908990889088908890600401612268565b6020604051808303816000875af1925050508015611381575060408051601f3d908101601f1916820190925261137e918101906120e9565b60015b61138d57611185612106565b6001600160e01b0319811663f23a6e6160e01b146112555760405162461bcd60e51b81526004016105e9906121ab565b60606104a16001600160a01b03831660145b606060006113de8360026122ad565b6113e9906002612045565b6001600160401b03811115611400576114006116ff565b6040519080825280601f01601f19166020018201604052801561142a576020820181803683370190505b509050600360fc1b8160008151811061144557611445611e03565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061147457611474611e03565b60200101906001600160f81b031916908160001a90535060006114988460026122ad565b6114a3906001612045565b90505b600181111561151b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106114d7576114d7611e03565b1a60f81b8282815181106114ed576114ed611e03565b60200101906001600160f81b031916908160001a90535060049490941c93611514816122cc565b90506114a6565b50831561048f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105e9565b82805461157690611cfa565b90600052602060002090601f01602090048101928261159857600085556115de565b82601f106115b157805160ff19168380011785556115de565b828001600101855582156115de579182015b828111156115de5782518255916020019190600101906115c3565b506115ea9291506115ee565b5090565b5b808211156115ea57600081556001016115ef565b6001600160a01b0381168114610ea157600080fd5b6000806040838503121561162b57600080fd5b823561163681611603565b946020939093013593505050565b6001600160e01b031981168114610ea157600080fd5b60006020828403121561166c57600080fd5b813561048f81611644565b60006020828403121561168957600080fd5b5035919050565b60005b838110156116ab578181015183820152602001611693565b838111156116ba576000848401525b50505050565b600081518084526116d8816020860160208601611690565b601f01601f19169290920160200192915050565b60208152600061048f60208301846116c0565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561173a5761173a6116ff565b6040525050565b60006001600160401b0382111561175a5761175a6116ff565b5060051b60200190565b600082601f83011261177557600080fd5b8135602061178282611741565b60405161178f8282611715565b83815260059390931b85018201928281019150868411156117af57600080fd5b8286015b848110156117ca57803583529183019183016117b3565b509695505050505050565b60006001600160401b038211156117ee576117ee6116ff565b50601f01601f191660200190565b600082601f83011261180d57600080fd5b8135611818816117d5565b6040516118258282611715565b82815285602084870101111561183a57600080fd5b82602086016020830137600092810160200192909252509392505050565b600080600080600060a0868803121561187057600080fd5b853561187b81611603565b9450602086013561188b81611603565b935060408601356001600160401b03808211156118a757600080fd5b6118b389838a01611764565b945060608801359150808211156118c957600080fd5b6118d589838a01611764565b935060808801359150808211156118eb57600080fd5b506118f8888289016117fc565b9150509295509295909350565b6000806040838503121561191857600080fd5b82359150602083013561192a81611603565b809150509250929050565b6000806040838503121561194857600080fd5b82356001600160401b038082111561195f57600080fd5b818501915085601f83011261197357600080fd5b8135602061198082611741565b60405161198d8282611715565b83815260059390931b85018201928281019150898411156119ad57600080fd5b948201945b838610156119d45785356119c581611603565b825294820194908201906119b2565b965050860135925050808211156119ea57600080fd5b506119f785828601611764565b9150509250929050565b600081518084526020808501945080840160005b83811015611a3157815187529582019590820190600101611a15565b509495945050505050565b60208152600061048f6020830184611a01565b600080600080600060a08688031215611a6757600080fd5b8535611a7281611603565b94506020860135611a8281611603565b93506040860135611a9281611603565b94979396509394606081013594506080013592915050565b60008060408385031215611abd57600080fd5b82356001600160401b03811115611ad357600080fd5b611adf858286016117fc565b925050602083013561192a81611603565b600060208284031215611b0257600080fd5b81356001600160401b03811115611b1857600080fd5b611b24848285016117fc565b949350505050565b60008060408385031215611b3f57600080fd5b8235611b4a81611603565b91506020830135801515811461192a57600080fd5b60ff81168114610ea157600080fd5b60008060408385031215611b8157600080fd5b82359150602083013561192a81611b5f565b600060208284031215611ba557600080fd5b813561048f81611603565b604080825283519082018190526000906020906060840190828701845b82811015611be957815184529284019290840190600101611bcd565b5050508381038285015284518082528583019183019060005b81811015611c2157835160ff1683529284019291840191600101611c02565b5090979650505050505050565b60008060408385031215611c4157600080fd5b8235611c4c81611603565b9150602083013561192a81611603565b600080600080600060a08688031215611c7457600080fd5b8535611c7f81611603565b94506020860135611c8f81611603565b9350604086013592506060860135915060808601356001600160401b03811115611cb857600080fd5b6118f8888289016117fc565b600060208284031215611cd657600080fd5b5051919050565b600060208284031215611cef57600080fd5b815161048f81611603565b600181811c90821680611d0e57607f821691505b602082108103611d2e57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b600060208284031215611d9457600080fd5b81516001600160401b03811115611daa57600080fd5b8201601f81018413611dbb57600080fd5b8051611dc6816117d5565b604051611dd38282611715565b828152866020848601011115611de857600080fd5b611df9836020830160208701611690565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611e4157611e41611e19565b5060010190565b600060208284031215611e5a57600080fd5b815161048f81611b5f565b600082601f830112611e7657600080fd5b81516020611e8382611741565b604051611e908282611715565b83815260059390931b8501820192828101915086841115611eb057600080fd5b8286015b848110156117ca578051611ec781611b5f565b8352918301918301611eb4565b60008060408385031215611ee757600080fd5b82516001600160401b0380821115611efe57600080fd5b818501915085601f830112611f1257600080fd5b81516020611f1f82611741565b604051611f2c8282611715565b83815260059390931b8501820192828101915089841115611f4c57600080fd5b948201945b83861015611f6a57855182529482019490820190611f51565b91880151919650909350505080821115611f8357600080fd5b506119f785828601611e65565b600060208284031215611fa257600080fd5b815163ffffffff8116811461048f57600080fd5b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6000821982111561205857612058611e19565b500190565b6040815260006120706040830185611a01565b82810360208401526120828185611a01565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906120b790830186611a01565b82810360608401526120c98186611a01565b905082810360808401526120dd81856116c0565b98975050505050505050565b6000602082840312156120fb57600080fd5b815161048f81611644565b600060033d111561211f5760046000803e5060005160e01c5b90565b600060443d10156121305790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561215f57505050505090565b82850191508151818111156121775750505050505090565b843d87010160208285010111156121915750505050505090565b6121a060208286010187611715565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161222b816017850160208801611690565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161225c816028840160208801611690565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906122a2908301846116c0565b979650505050505050565b60008160001904831182151516156122c7576122c7611e19565b500290565b6000816122db576122db611e19565b50600019019056fea26469706673582212209e33646a1ed2d51fcc749870e94aa69546c518fc5bfee43d37014ebc54dd767864736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061018d5760003560e01c8063754b377c116100de578063aed8c6bc11610097578063e37ffe7c11610071578063e37ffe7c146103aa578063e985e9c5146103cb578063f242432a146103de578063ff4468c4146103f157600080fd5b8063aed8c6bc14610371578063b3c1cb2114610384578063d547741f1461039757600080fd5b8063754b377c146103035780637ab4339d1461031d57806391d14854146103305780639b642de114610343578063a217fddf14610356578063a22cb4651461035e57600080fd5b80632f2ff15d1161014b57806344112ed81161012557806344112ed8146102985780634e1273f4146102bf578063710b3096146102df578063730cb7d5146102f257600080fd5b80632f2ff15d1461025f57806336568abe146102725780633e1f3c271461028557600080fd5b8062fdd58e1461019257806301ffc9a7146101b85780630e064366146101db5780630e89341c14610206578063248a9ca3146102265780632eb2c2d61461024a575b600080fd5b6101a56101a0366004611618565b610419565b6040519081526020015b60405180910390f35b6101cb6101c636600461165a565b610496565b60405190151581526020016101af565b6101ee6101e9366004611618565b6104a7565b6040516001600160a01b0390911681526020016101af565b610219610214366004611677565b61051d565b6040516101af91906116ec565b6101a5610234366004611677565b6000908152600160208190526040909120015490565b61025d610258366004611858565b6105b1565b005b61025d61026d366004611905565b610606565b61025d610280366004611905565b610631565b610219610293366004611618565b6106af565b6101a57fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa481565b6102d26102cd366004611935565b610729565b6040516101af9190611a3c565b61025d6102ed366004611a4f565b610852565b6005546001600160a01b03166101ee565b61030b600381565b60405160ff90911681526020016101af565b61025d61032b366004611aaa565b6108e4565b6101cb61033e366004611905565b6109f1565b61025d610351366004611af0565b610a1c565b6101a5600081565b61025d61036c366004611b2c565b610a30565b61030b61037f366004611b6e565b610a49565b61025d610392366004611b93565b610ac0565b61025d6103a5366004611905565b610aee565b6103bd6103b8366004611677565b610b14565b6040516101af929190611bb0565b6101cb6103d9366004611c2e565b610b93565b61025d6103ec366004611c5c565b610bae565b6104046103ff366004611618565b610bf3565b60405163ffffffff90911681526020016101af565b60055460405163461e4f1960e11b8152600481018390526001600160a01b0384811660248301526000921690638c3c9e3290604401602060405180830381865afa15801561046b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f9190611cc4565b9392505050565b60006104a182610c69565b92915050565b6005546040516363ed4d5360e11b8152600481018390526001600160a01b038481166024830152600092169063c7da9aa690604401602060405180830381865afa1580156104f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f9190611cdd565b60606004805461052c90611cfa565b80601f016020809104026020016040519081016040528092919081815260200182805461055890611cfa565b80156105a55780601f1061057a576101008083540402835291602001916105a5565b820191906000526020600020905b81548152906001019060200180831161058857829003601f168201915b50505050509050919050565b6001600160a01b0385163314806105cd57506105cd8533610b93565b6105f25760405162461bcd60e51b81526004016105e990611d34565b60405180910390fd5b6105ff8585858585610ca9565b5050505050565b6000828152600160208190526040909120015461062281610e97565b61062c8383610ea4565b505050565b6001600160a01b03811633146106a15760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105e9565b6106ab8282610f0f565b5050565b600554604051636d7fbb6760e01b8152600481018390526001600160a01b0384811660248301526060921690636d7fbb6790604401600060405180830381865afa158015610701573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261048f9190810190611d82565b6060815183511461078e5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016105e9565b600083516001600160401b038111156107a9576107a96116ff565b6040519080825280602002602001820160405280156107d2578160200160208202803683370190505b50905060005b845181101561084a5761081d8582815181106107f6576107f6611e03565b602002602001015185838151811061081057610810611e03565b6020026020010151610419565b82828151811061082f5761082f611e03565b602090810291909101015261084381611e2f565b90506107d8565b509392505050565b7fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa461087c81610e97565b836001600160a01b0316856001600160a01b0316876001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6286866040516108d4929190918252602082015260400190565b60405180910390a4505050505050565b600054600390610100900460ff16158015610906575060005460ff8083169116105b6109695760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105e9565b6000805461ffff191660ff8316176101001781556109869061051d565b5115806109925750303b155b156109ab576109a083610f76565b6109ab600083610ea4565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000610a2781610e97565b6106ab82610f76565b6040516309a711b960e31b815260040160405180910390fd5b600554604051630e972f9160e41b81526004810184905260ff831660248201526000916001600160a01b03169063e972f91090604401602060405180830381865afa158015610a9c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f9190611e48565b6000610acb81610e97565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526001602081905260409091200154610b0a81610e97565b61062c8383610f0f565b600554604051632b2bf81b60e11b81526004810183905260609182916001600160a01b0390911690635657f03690602401600060405180830381865afa158015610b62573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b8a9190810190611ed4565b91509150915091565b60006040516309a711b960e31b815260040160405180910390fd5b6001600160a01b038516331480610bca5750610bca8533610b93565b610be65760405162461bcd60e51b81526004016105e990611d34565b6105ff8585858585610f89565b6005546040516314067f8b60e01b8152600481018390526001600160a01b03848116602483015260009216906314067f8b90604401602060405180830381865afa158015610c45573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f9190611f90565b60006001600160e01b03198216636cdb3d1360e11b1480610c9a57506001600160e01b031982166303a24d0760e21b145b806104a157506104a1826110c5565b8151835114610d0b5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016105e9565b6001600160a01b038416610d315760405162461bcd60e51b81526004016105e990611fb6565b33610d40818787878787610a30565b60005b8451811015610e29576000858281518110610d6057610d60611e03565b602002602001015190506000858381518110610d7e57610d7e611e03565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610dcf5760405162461bcd60e51b81526004016105e990611ffb565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610e0e908490612045565b9250508190555050505080610e2290611e2f565b9050610d43565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610e7992919061205d565b60405180910390a4610e8f8187878787876110fa565b505050505050565b610ea1813361125e565b50565b610eae82826109f1565b6106ab5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610f1982826109f1565b156106ab5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b80516106ab90600490602084019061156a565b6001600160a01b038416610faf5760405162461bcd60e51b81526004016105e990611fb6565b336000610fbb856112b7565b90506000610fc8856112b7565b9050610fd8838989858589610a30565b60008681526002602090815260408083206001600160a01b038c1684529091529020548581101561101b5760405162461bcd60e51b81526004016105e990611ffb565b60008781526002602090815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061105a908490612045565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46110ba848a8a8a8a8a611302565b505050505050505050565b60006001600160e01b03198216637965db0b60e01b14806104a157506301ffc9a760e01b6001600160e01b03198316146104a1565b6001600160a01b0384163b15610e8f5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061113e908990899088908890889060040161208b565b6020604051808303816000875af1925050508015611179575060408051601f3d908101601f19168201909252611176918101906120e9565b60015b61122557611185612106565b806308c379a0036111be5750611199612122565b806111a457506111c0565b8060405162461bcd60e51b81526004016105e991906116ec565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016105e9565b6001600160e01b0319811663bc197c8160e01b146112555760405162461bcd60e51b81526004016105e9906121ab565b50505050505050565b61126882826109f1565b6106ab57611275816113bd565b6112808360206113cf565b6040516020016112919291906121f3565b60408051601f198184030181529082905262461bcd60e51b82526105e9916004016116ec565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106112f1576112f1611e03565b602090810291909101015292915050565b6001600160a01b0384163b15610e8f5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906113469089908990889088908890600401612268565b6020604051808303816000875af1925050508015611381575060408051601f3d908101601f1916820190925261137e918101906120e9565b60015b61138d57611185612106565b6001600160e01b0319811663f23a6e6160e01b146112555760405162461bcd60e51b81526004016105e9906121ab565b60606104a16001600160a01b03831660145b606060006113de8360026122ad565b6113e9906002612045565b6001600160401b03811115611400576114006116ff565b6040519080825280601f01601f19166020018201604052801561142a576020820181803683370190505b509050600360fc1b8160008151811061144557611445611e03565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061147457611474611e03565b60200101906001600160f81b031916908160001a90535060006114988460026122ad565b6114a3906001612045565b90505b600181111561151b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106114d7576114d7611e03565b1a60f81b8282815181106114ed576114ed611e03565b60200101906001600160f81b031916908160001a90535060049490941c93611514816122cc565b90506114a6565b50831561048f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105e9565b82805461157690611cfa565b90600052602060002090601f01602090048101928261159857600085556115de565b82601f106115b157805160ff19168380011785556115de565b828001600101855582156115de579182015b828111156115de5782518255916020019190600101906115c3565b506115ea9291506115ee565b5090565b5b808211156115ea57600081556001016115ef565b6001600160a01b0381168114610ea157600080fd5b6000806040838503121561162b57600080fd5b823561163681611603565b946020939093013593505050565b6001600160e01b031981168114610ea157600080fd5b60006020828403121561166c57600080fd5b813561048f81611644565b60006020828403121561168957600080fd5b5035919050565b60005b838110156116ab578181015183820152602001611693565b838111156116ba576000848401525b50505050565b600081518084526116d8816020860160208601611690565b601f01601f19169290920160200192915050565b60208152600061048f60208301846116c0565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561173a5761173a6116ff565b6040525050565b60006001600160401b0382111561175a5761175a6116ff565b5060051b60200190565b600082601f83011261177557600080fd5b8135602061178282611741565b60405161178f8282611715565b83815260059390931b85018201928281019150868411156117af57600080fd5b8286015b848110156117ca57803583529183019183016117b3565b509695505050505050565b60006001600160401b038211156117ee576117ee6116ff565b50601f01601f191660200190565b600082601f83011261180d57600080fd5b8135611818816117d5565b6040516118258282611715565b82815285602084870101111561183a57600080fd5b82602086016020830137600092810160200192909252509392505050565b600080600080600060a0868803121561187057600080fd5b853561187b81611603565b9450602086013561188b81611603565b935060408601356001600160401b03808211156118a757600080fd5b6118b389838a01611764565b945060608801359150808211156118c957600080fd5b6118d589838a01611764565b935060808801359150808211156118eb57600080fd5b506118f8888289016117fc565b9150509295509295909350565b6000806040838503121561191857600080fd5b82359150602083013561192a81611603565b809150509250929050565b6000806040838503121561194857600080fd5b82356001600160401b038082111561195f57600080fd5b818501915085601f83011261197357600080fd5b8135602061198082611741565b60405161198d8282611715565b83815260059390931b85018201928281019150898411156119ad57600080fd5b948201945b838610156119d45785356119c581611603565b825294820194908201906119b2565b965050860135925050808211156119ea57600080fd5b506119f785828601611764565b9150509250929050565b600081518084526020808501945080840160005b83811015611a3157815187529582019590820190600101611a15565b509495945050505050565b60208152600061048f6020830184611a01565b600080600080600060a08688031215611a6757600080fd5b8535611a7281611603565b94506020860135611a8281611603565b93506040860135611a9281611603565b94979396509394606081013594506080013592915050565b60008060408385031215611abd57600080fd5b82356001600160401b03811115611ad357600080fd5b611adf858286016117fc565b925050602083013561192a81611603565b600060208284031215611b0257600080fd5b81356001600160401b03811115611b1857600080fd5b611b24848285016117fc565b949350505050565b60008060408385031215611b3f57600080fd5b8235611b4a81611603565b91506020830135801515811461192a57600080fd5b60ff81168114610ea157600080fd5b60008060408385031215611b8157600080fd5b82359150602083013561192a81611b5f565b600060208284031215611ba557600080fd5b813561048f81611603565b604080825283519082018190526000906020906060840190828701845b82811015611be957815184529284019290840190600101611bcd565b5050508381038285015284518082528583019183019060005b81811015611c2157835160ff1683529284019291840191600101611c02565b5090979650505050505050565b60008060408385031215611c4157600080fd5b8235611c4c81611603565b9150602083013561192a81611603565b600080600080600060a08688031215611c7457600080fd5b8535611c7f81611603565b94506020860135611c8f81611603565b9350604086013592506060860135915060808601356001600160401b03811115611cb857600080fd5b6118f8888289016117fc565b600060208284031215611cd657600080fd5b5051919050565b600060208284031215611cef57600080fd5b815161048f81611603565b600181811c90821680611d0e57607f821691505b602082108103611d2e57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b600060208284031215611d9457600080fd5b81516001600160401b03811115611daa57600080fd5b8201601f81018413611dbb57600080fd5b8051611dc6816117d5565b604051611dd38282611715565b828152866020848601011115611de857600080fd5b611df9836020830160208701611690565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611e4157611e41611e19565b5060010190565b600060208284031215611e5a57600080fd5b815161048f81611b5f565b600082601f830112611e7657600080fd5b81516020611e8382611741565b604051611e908282611715565b83815260059390931b8501820192828101915086841115611eb057600080fd5b8286015b848110156117ca578051611ec781611b5f565b8352918301918301611eb4565b60008060408385031215611ee757600080fd5b82516001600160401b0380821115611efe57600080fd5b818501915085601f830112611f1257600080fd5b81516020611f1f82611741565b604051611f2c8282611715565b83815260059390931b8501820192828101915089841115611f4c57600080fd5b948201945b83861015611f6a57855182529482019490820190611f51565b91880151919650909350505080821115611f8357600080fd5b506119f785828601611e65565b600060208284031215611fa257600080fd5b815163ffffffff8116811461048f57600080fd5b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6000821982111561205857612058611e19565b500190565b6040815260006120706040830185611a01565b82810360208401526120828185611a01565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906120b790830186611a01565b82810360608401526120c98186611a01565b905082810360808401526120dd81856116c0565b98975050505050505050565b6000602082840312156120fb57600080fd5b815161048f81611644565b600060033d111561211f5760046000803e5060005160e01c5b90565b600060443d10156121305790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561215f57505050505090565b82850191508151818111156121775750505050505090565b843d87010160208285010111156121915750505050505090565b6121a060208286010187611715565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161222b816017850160208801611690565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161225c816028840160208801611690565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906122a2908301846116c0565b979650505050505050565b60008160001904831182151516156122c7576122c7611e19565b500290565b6000816122db576122db611e19565b50600019019056fea26469706673582212209e33646a1ed2d51fcc749870e94aa69546c518fc5bfee43d37014ebc54dd767864736f6c634300080e0033", "devdoc": { "author": "Sismo", "kind": "dev", @@ -703,11 +861,45 @@ "getAttestationsRegistry()": { "details": "Getter of the attestations registry" }, + "getAttributeValueForBadge(uint256,uint8)": { + "details": "Getter of the value of a specific badge attribute", + "params": { + "id": "Badge Id to check (= attestationCollectionId)", + "index": "Index of the attribute" + } + }, + "getAttributesNamesAndValuesForBadge(uint256)": { + "details": "Getter of all badge attributes and their values for a specific badge", + "params": { + "id": "Badge Id to check (= attestationCollectionId)" + } + }, + "getBadgeExtraData(address,uint256)": { + "details": "Getter of the badge extra data (it can store nullifier and burnCount)", + "params": { + "account": "Address that holds the badge", + "id": "Badge Id to check (= attestationCollectionId)" + } + }, + "getBadgeIssuer(address,uint256)": { + "details": "Getter of the badge issuer", + "params": { + "account": "Address that holds the badge", + "id": "Badge Id to check (= attestationCollectionId)" + } + }, + "getBadgeTimestamp(address,uint256)": { + "details": "Getter of the badge timestamp", + "params": { + "account": "Address that holds the badge", + "id": "Badge Id to check (= attestationCollectionId)" + } + }, "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." + "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. May emit a {RoleGranted} event." }, "hasRole(bytes32,address)": { "details": "Returns `true` if `account` has been granted `role`." @@ -723,10 +915,10 @@ "details": "Reverts, this is a non transferable ERC115 contract" }, "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`." + "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`. May emit a {RoleRevoked} event." }, "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." + "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." }, "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": { "details": "See {IERC1155-safeBatchTransferFrom}." @@ -771,22 +963,26 @@ }, "userdoc": { "kind": "user", - "methods": {}, + "methods": { + "initialize(string,address)": { + "notice": "The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization." + } + }, "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, + "astId": 935, "contract": "contracts/core/Badges.sol:Badges", "label": "_initialized", "offset": 0, "slot": "0", - "type": "t_bool" + "type": "t_uint8" }, { - "astId": 939, + "astId": 938, "contract": "contracts/core/Badges.sol:Badges", "label": "_initializing", "offset": 1, @@ -802,7 +998,7 @@ "type": "t_mapping(t_bytes32,t_struct(RoleData)19_storage)" }, { - "astId": 1121, + "astId": 1231, "contract": "contracts/core/Badges.sol:Badges", "label": "_balances", "offset": 0, @@ -810,7 +1006,7 @@ "type": "t_mapping(t_uint256,t_mapping(t_address,t_uint256))" }, { - "astId": 1127, + "astId": 1237, "contract": "contracts/core/Badges.sol:Badges", "label": "_operatorApprovals", "offset": 0, @@ -818,7 +1014,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" }, { - "astId": 1129, + "astId": 1239, "contract": "contracts/core/Badges.sol:Badges", "label": "_uri", "offset": 0, @@ -826,12 +1022,12 @@ "type": "t_string_storage" }, { - "astId": 10686, + "astId": 11990, "contract": "contracts/core/Badges.sol:Badges", "label": "_attestationsRegistry", "offset": 0, "slot": "5", - "type": "t_contract(IAttestationsRegistry)11406" + "type": "t_contract(IAttestationsRegistry)12822" } ], "types": { @@ -850,7 +1046,7 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(IAttestationsRegistry)11406": { + "t_contract(IAttestationsRegistry)12822": { "encoding": "inplace", "label": "contract IAttestationsRegistry", "numberOfBytes": "20" @@ -922,6 +1118,11 @@ "encoding": "inplace", "label": "uint256", "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" } } } diff --git a/deployments/mumbai/BadgesImplem.json b/deployments/mumbai/BadgesImplem.json index 072a898..2577f02 100644 --- a/deployments/mumbai/BadgesImplem.json +++ b/deployments/mumbai/BadgesImplem.json @@ -1,5 +1,5 @@ { - "address": "0xcA9EF6c891B3f045bd4a200029FCC1C38B65CCe3", + "address": "0x6D102d4FDFFcd6A4eb3E6207a25B2375d453F74A", "abi": [ { "inputs": [ @@ -47,6 +47,19 @@ "name": "ApprovalForAll", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -241,6 +254,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "IMPLEMENTATION_VERSION", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -302,6 +328,126 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "index", + "type": "uint8" + } + ], + "name": "getAttributeValueForBadge", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "getAttributesNamesAndValuesForBadge", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + }, + { + "internalType": "uint8[]", + "name": "", + "type": "uint8[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "getBadgeExtraData", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "getBadgeIssuer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "getBadgeTimestamp", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -623,36 +769,48 @@ "type": "function" } ], - "transactionHash": "0x0d3279adfb61568ba781a5f7bccd57f2cf84159f78b3f970e75b70c7ea4b1cfa", + "transactionHash": "0xe6ede11f9bb84c6196c423e8f968bb588de965109953129484ff04390ae68c5e", "receipt": { "to": null, "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0xcA9EF6c891B3f045bd4a200029FCC1C38B65CCe3", - "transactionIndex": 4, - "gasUsed": "1831487", - "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000002000000000000000000000000000000000000000000000000000800000000000000000040100000000000001008000020000000000000000000800000000000000000080000000000000800000000000000000000000000000000000000010000000000000000000008000200000000000000000000000000000000000000000000000001040000000004000000000000000000001000000000000000000000000000100100000000020000000000000000000000000000000000000000000000000000020000000100000", - "blockHash": "0x0af9a2dd68761829661b873d097ede6ced3d615512bdb4f50198cf22c0405cef", - "transactionHash": "0x0d3279adfb61568ba781a5f7bccd57f2cf84159f78b3f970e75b70c7ea4b1cfa", + "contractAddress": "0x6D102d4FDFFcd6A4eb3E6207a25B2375d453F74A", + "transactionIndex": 14, + "gasUsed": "2131254", + "logsBloom": "0x00000004000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000008000002000000000000000000000000000000000000000000000000000800000000000000000040100000000000000000000220000000000000000000800002000000000000080000000000000000000000000000000000000000000000000000010004080000000000000008000200000000000000000000000800400000000000000000000001040000000004000000000000000000001000000050000000000000000000100100000000020000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0x3c8ffb75f78b8adfadc03d9a578094358edf94c44b22ac3627ab63dd8fb1ec2e", + "transactionHash": "0xe6ede11f9bb84c6196c423e8f968bb588de965109953129484ff04390ae68c5e", "logs": [ { - "transactionIndex": 4, - "blockNumber": 28599969, - "transactionHash": "0x0d3279adfb61568ba781a5f7bccd57f2cf84159f78b3f970e75b70c7ea4b1cfa", - "address": "0xcA9EF6c891B3f045bd4a200029FCC1C38B65CCe3", + "transactionIndex": 14, + "blockNumber": 29540671, + "transactionHash": "0xe6ede11f9bb84c6196c423e8f968bb588de965109953129484ff04390ae68c5e", + "address": "0x6D102d4FDFFcd6A4eb3E6207a25B2375d453F74A", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x0000000000000000000000004e070e9b85a659f0b7b47cde33152ad6c2f63954", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" ], "data": "0x", - "logIndex": 21, - "blockHash": "0x0af9a2dd68761829661b873d097ede6ced3d615512bdb4f50198cf22c0405cef" + "logIndex": 69, + "blockHash": "0x3c8ffb75f78b8adfadc03d9a578094358edf94c44b22ac3627ab63dd8fb1ec2e" }, { - "transactionIndex": 4, - "blockNumber": 28599969, - "transactionHash": "0x0d3279adfb61568ba781a5f7bccd57f2cf84159f78b3f970e75b70c7ea4b1cfa", + "transactionIndex": 14, + "blockNumber": 29540671, + "transactionHash": "0xe6ede11f9bb84c6196c423e8f968bb588de965109953129484ff04390ae68c5e", + "address": "0x6D102d4FDFFcd6A4eb3E6207a25B2375d453F74A", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000003", + "logIndex": 70, + "blockHash": "0x3c8ffb75f78b8adfadc03d9a578094358edf94c44b22ac3627ab63dd8fb1ec2e" + }, + { + "transactionIndex": 14, + "blockNumber": 29540671, + "transactionHash": "0xe6ede11f9bb84c6196c423e8f968bb588de965109953129484ff04390ae68c5e", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", @@ -660,25 +818,25 @@ "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" ], - "data": "0x0000000000000000000000000000000000000000000000000009c297721191000000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000000a08c4f0661f207b8ec10000000000000000000000000000000000000000000000008abd606d17d66f00000000000000000000000000000000000000000000000a08c4fa28b6928d1fc1", - "logIndex": 22, - "blockHash": "0x0af9a2dd68761829661b873d097ede6ced3d615512bdb4f50198cf22c0405cef" + "data": "0x0000000000000000000000000000000000000000000000000007ba4e7021eeb40000000000000000000000000000000000000000000000007ce5b243caa744b2000000000000000000000000000000000000000000000b8e71caa1573dbb15c90000000000000000000000000000000000000000000000007cddf7f55a8555fe000000000000000000000000000000000000000000000b8e71d25ba5addd047d", + "logIndex": 71, + "blockHash": "0x3c8ffb75f78b8adfadc03d9a578094358edf94c44b22ac3627ab63dd8fb1ec2e" } ], - "blockNumber": 28599969, - "cumulativeGasUsed": "2577496", + "blockNumber": 29540671, + "cumulativeGasUsed": "4568589", "status": 1, "byzantium": true }, "args": [ "https://hub.staging.zikies.io/badges/mumbai/{id}.json", - "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6" + "0x4e070E9b85a659F0B7B47cde33152ad6c2F63954" ], - "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", + "numDeployments": 2, + "solcInputHash": "6edb98fea2bf424a369954d0e80655f6", + "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\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\":[],\"name\":\"IMPLEMENTATION_VERSION\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"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\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"index\",\"type\":\"uint8\"}],\"name\":\"getAttributeValueForBadge\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getAttributesNamesAndValuesForBadge\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint8[]\",\"name\":\"\",\"type\":\"uint8[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBadgeExtraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBadgeIssuer\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getBadgeTimestamp\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"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\"},\"getAttributeValueForBadge(uint256,uint8)\":{\"details\":\"Getter of the value of a specific badge attribute\",\"params\":{\"id\":\"Badge Id to check (= attestationCollectionId)\",\"index\":\"Index of the attribute\"}},\"getAttributesNamesAndValuesForBadge(uint256)\":{\"details\":\"Getter of all badge attributes and their values for a specific badge\",\"params\":{\"id\":\"Badge Id to check (= attestationCollectionId)\"}},\"getBadgeExtraData(address,uint256)\":{\"details\":\"Getter of the badge extra data (it can store nullifier and burnCount)\",\"params\":{\"account\":\"Address that holds the badge\",\"id\":\"Badge Id to check (= attestationCollectionId)\"}},\"getBadgeIssuer(address,uint256)\":{\"details\":\"Getter of the badge issuer\",\"params\":{\"account\":\"Address that holds the badge\",\"id\":\"Badge Id to check (= attestationCollectionId)\"}},\"getBadgeTimestamp(address,uint256)\":{\"details\":\"Getter of the badge timestamp\",\"params\":{\"account\":\"Address that holds the badge\",\"id\":\"Badge Id to check (= attestationCollectionId)\"}},\"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. May emit a {RoleGranted} event.\"},\"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\":\"Reverts, this is a non transferable ERC115 contract\"},\"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`. May emit a {RoleRevoked} event.\"},\"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. May emit a {RoleRevoked} event.\"},\"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\":{\"details\":\"See {IERC1155-safeBatchTransferFrom}.\"},\"safeTransferFrom(address,address,uint256,uint256,bytes)\":{\"details\":\"See {IERC1155-safeTransferFrom}.\"},\"setApprovalForAll(address,bool)\":{\"details\":\"Reverts, this is a non transferable ERC115 contract\"},\"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\":{\"initialize(string,address)\":{\"notice\":\"The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\"}},\"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.8.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);\\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 `_msgSender()` is missing `role`.\\n * Overriding this function changes the behavior of the {onlyRole} modifier.\\n *\\n * Format of the revert message is described in {_checkRole}.\\n *\\n * _Available since v4.6._\\n */\\n function _checkRole(bytes32 role) internal view virtual {\\n _checkRole(role, _msgSender());\\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(account),\\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 * May emit a {RoleGranted} event.\\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 * May emit a {RoleRevoked} event.\\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 * May emit a {RoleRevoked} event.\\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 * May emit a {RoleGranted} event.\\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 * May emit a {RoleGranted} event.\\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 * May emit a {RoleRevoked} event.\\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\":\"0x67e3daf189111d6d5b0464ed09cf9f0605a22c4b965a7fcecd707101faff008a\",\"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.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xcee5467d5d873fb75dae6f98c01a8d25dd609f9d0374c7d39217bd5f9539a2d6\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 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 _requireNotPaused();\\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 _requirePaused();\\n _;\\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 Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\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\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (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: address zero is not a valid owner\\\");\\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 token owner or 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: caller is not token owner or 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 uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, to, ids, amounts, 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 _afterTokenTransfer(operator, from, to, ids, amounts, data);\\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 _afterTokenTransfer(operator, from, to, ids, amounts, data);\\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 uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n _balances[id][to] += amount;\\n emit TransferSingle(operator, address(0), to, id, amount);\\n\\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\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 * 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 _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 _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\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 * Emits a {TransferSingle} event.\\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 uint256[] memory ids = _asSingletonArray(id);\\n uint256[] memory amounts = _asSingletonArray(amount);\\n\\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\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 _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n *\\n * Emits a {TransferBatch} event.\\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 _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n }\\n\\n /**\\n * @dev Approve `operator` to operate on all of `owner` tokens\\n *\\n * Emits an {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 `ids` and `amounts` 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 /**\\n * @dev Hook that is called after 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 _afterTokenTransfer(\\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\":\"0xd917747dc87f189c6779b894f367a028f9dca4be930283cccec8f312966af820\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (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 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\":\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\",\"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.8.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 functionCallWithValue(target, data, 0, \\\"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 (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or 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 _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\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 /// @solidity memory-safe-assembly\\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\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"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 (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\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 unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\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 unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\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] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xa4d1d62251f8574deb032a35fc948386a9b4de74b812d4f545a1ac120486b48a\",\"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\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n enum Rounding {\\n Down, // Toward negative infinity\\n Up, // Toward infinity\\n Zero // Toward zero\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds up instead\\n * of rounding down.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n * with further edits by Uniswap Labs also under MIT license.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator\\n ) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod0 := mul(x, y)\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n require(denominator > prod1);\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n // See https://cs.stackexchange.com/q/138556/92363.\\n\\n // Does not overflow because the denominator cannot be zero at this stage in the function.\\n uint256 twos = denominator & (~denominator + 1);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n // in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(\\n uint256 x,\\n uint256 y,\\n uint256 denominator,\\n Rounding rounding\\n ) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10**64) {\\n value /= 10**64;\\n result += 64;\\n }\\n if (value >= 10**32) {\\n value /= 10**32;\\n result += 32;\\n }\\n if (value >= 10**16) {\\n value /= 10**16;\\n result += 16;\\n }\\n if (value >= 10**8) {\\n value /= 10**8;\\n result += 8;\\n }\\n if (value >= 10**4) {\\n value /= 10**4;\\n result += 4;\\n }\\n if (value >= 10**2) {\\n value /= 10**2;\\n result += 2;\\n }\\n if (value >= 10**1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256, rounded down, of a positive value.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa1e8e83cd0087785df04ac79fb395d9f3684caeaf973d9e2c71caef723a3a5d6\",\"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 uint8 public constant IMPLEMENTATION_VERSION = 3;\\n\\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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\n */\\n function initialize(\\n string memory uri,\\n address owner\\n ) public reinitializer(IMPLEMENTATION_VERSION) {\\n // if proxy did not setup uri yet or if called by constructor (for implem setup)\\n if (bytes(ERC1155.uri(0)).length == 0 || address(this).code.length == 0) {\\n _setURI(uri);\\n _grantRole(DEFAULT_ADMIN_ROLE, owner);\\n }\\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(\\n address account,\\n uint256 id\\n ) public view virtual override(ERC1155, IBadges) returns (uint256) {\\n return _attestationsRegistry.getAttestationValue(id, account);\\n }\\n\\n /**\\n * @dev Reverts, this is a non transferable ERC115 contract\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n revert BadgesNonTransferrable();\\n }\\n\\n /**\\n * @dev Reverts, this is a non transferable ERC115 contract\\n */\\n function isApprovedForAll(\\n address account,\\n address operator\\n ) public view virtual override returns (bool) {\\n revert BadgesNonTransferrable();\\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(\\n address attestationsRegistry\\n ) external override onlyRole(DEFAULT_ADMIN_ROLE) {\\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 Getter of the badge issuer\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeIssuer(address account, uint256 id) external view returns (address) {\\n return _attestationsRegistry.getAttestationIssuer(id, account);\\n }\\n\\n /**\\n * @dev Getter of the badge timestamp\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeTimestamp(address account, uint256 id) external view returns (uint32) {\\n return _attestationsRegistry.getAttestationTimestamp(id, account);\\n }\\n\\n /**\\n * @dev Getter of the badge extra data (it can store nullifier and burnCount)\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeExtraData(address account, uint256 id) external view returns (bytes memory) {\\n return _attestationsRegistry.getAttestationExtraData(id, account);\\n }\\n\\n /**\\n * @dev Getter of the value of a specific badge attribute\\n * @param id Badge Id to check (= attestationCollectionId)\\n * @param index Index of the attribute\\n */\\n function getAttributeValueForBadge(uint256 id, uint8 index) external view returns (uint8) {\\n return _attestationsRegistry.getAttributeValueForAttestationsCollection(id, index);\\n }\\n\\n /**\\n * @dev Getter of all badge attributes and their values for a specific badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getAttributesNamesAndValuesForBadge(\\n uint256 id\\n ) external view returns (bytes32[] memory, uint8[] memory) {\\n return _attestationsRegistry.getAttributesNamesAndValuesForAttestationsCollection(id);\\n }\\n\\n /**\\n * @dev ERC165\\n */\\n function supportsInterface(\\n bytes4 interfaceId\\n ) public view virtual override(AccessControl, ERC1155) returns (bool) {\\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\":\"0x9982b753d43f2a4a9edb5987714b09f518b419339d4bf9cd63b600bee442fd01\",\"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';\\nimport {IAttestationsRegistryConfigLogic} from './IAttestationsRegistryConfigLogic.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry is IAttestationsRegistryConfigLogic {\\n error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view returns (address, uint256, uint32, bytes memory);\\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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view 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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0x0c3af349bcfa545c959f4d9f25aacb73e3ef1ca7cfe62a2eda4a743a6835904f\",\"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 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 error AttributeDoesNotExist(uint8 attributeIndex);\\n error AttributeAlreadyExists(uint8 attributeIndex);\\n error ArgsLengthDoesNotMatch();\\n\\n event NewAttributeCreated(uint8 attributeIndex, bytes32 attributeName);\\n event AttributeNameUpdated(\\n uint8 attributeIndex,\\n bytes32 newAttributeName,\\n bytes32 previousAttributeName\\n );\\n event AttributeDeleted(uint8 attributeIndex, bytes32 deletedAttributeName);\\n\\n event AttestationsCollectionAttributeSet(\\n uint256 collectionId,\\n uint8 attributeIndex,\\n uint8 attributeValue\\n );\\n\\n event IssuerAuthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n event IssuerUnauthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n\\n /**\\n * @dev Returns whether an attestationsCollection has a specific attribute referenced by its index\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute. Can go from 0 to 63.\\n */\\n function attestationsCollectionHasAttribute(\\n uint256 collectionId,\\n uint8 index\\n ) external view returns (bool);\\n\\n function attestationsCollectionHasAttributes(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (bool);\\n\\n /**\\n * @dev Returns the attribute's value (from 1 to 15) of an attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param attributeIndex Index of the attribute. Can go from 0 to 63.\\n */\\n function getAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 attributeIndex\\n ) external view returns (uint8);\\n\\n function getAttributesValuesForAttestationsCollection(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (uint8[] memory);\\n\\n /**\\n * @dev Set a value for an attribute of an attestationsCollection. The attribute should already be created.\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute (must be between 0 and 63)\\n * @param value Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15\\n */\\n function setAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 index,\\n uint8 value\\n ) external;\\n\\n function setAttributesValuesForAttestationsCollections(\\n uint256[] memory collectionIds,\\n uint8[] memory indices,\\n uint8[] memory values\\n ) external;\\n\\n /**\\n * @dev Returns all the enabled attributes names and their values for a specific attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n */\\n function getAttributesNamesAndValuesForAttestationsCollection(\\n uint256 collectionId\\n ) external view returns (bytes32[] memory, uint8[] memory);\\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 /**\\n * @dev Create a new attribute.\\n * @param index Index of the attribute. Can go from 0 to 63.\\n * @param name Name in bytes32 of the attribute\\n */\\n function createNewAttribute(uint8 index, bytes32 name) external;\\n\\n function createNewAttributes(uint8[] memory indices, bytes32[] memory names) external;\\n\\n /**\\n * @dev Update the name of an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n * @param newName new name in bytes32 of the attribute\\n */\\n function updateAttributeName(uint8 index, bytes32 newName) external;\\n\\n function updateAttributesName(uint8[] memory indices, bytes32[] memory names) external;\\n\\n /**\\n * @dev Delete an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n */\\n function deleteAttribute(uint8 index) external;\\n\\n function deleteAttributes(uint8[] memory indices) external;\\n}\\n\",\"keccak256\":\"0x07a1a9e8d2caf1d810ba8fb760a35ce2a0ef60a76814d44881a5aa56162ce26b\",\"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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\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 /**\\n * @dev Getter of the badge issuer\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeIssuer(address account, uint256 id) external view returns (address);\\n\\n /**\\n * @dev Getter of the badge timestamp\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeTimestamp(address account, uint256 id) external view returns (uint32);\\n\\n /**\\n * @dev Getter of the badge extra data (it can store nullifier and burnCount)\\n * @param account Address that holds the badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getBadgeExtraData(address account, uint256 id) external view returns (bytes memory);\\n\\n /**\\n * @dev Getter of the value of a specific badge attribute\\n * @param id Badge Id to check (= attestationCollectionId)\\n * @param index Index of the attribute\\n */\\n function getAttributeValueForBadge(uint256 id, uint8 index) external view returns (uint8);\\n\\n /**\\n * @dev Getter of all badge attributes and their values for a specific badge\\n * @param id Badge Id to check (= attestationCollectionId)\\n */\\n function getAttributesNamesAndValuesForBadge(\\n uint256 id\\n ) external view returns (bytes32[] memory, uint8[] memory);\\n}\\n\",\"keccak256\":\"0xd6bdfc887ef15ee022eb05d89dbe2e2938ee6c0a55a55f8db527ef650242c6bb\",\"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/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": "0x60806040523480156200001157600080fd5b50604051620027eb380380620027eb833981016040819052620000349162000395565b81620000408162000055565b506200004d82826200006e565b5050620004c2565b80516200006a906004906020840190620002bc565b5050565b600054600390610100900460ff1615801562000091575060005460ff8083169116105b620000f95760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805461ffff191660ff83161761010017815562000127906200051d62000198602090811b91909117901c565b511580620001345750303b155b156200015257620001458362000055565b6200015260008362000234565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b606060048054620001a99062000486565b80601f0160208091040260200160405190810160405280929190818152602001828054620001d79062000486565b8015620002285780601f10620001fc5761010080835404028352916020019162000228565b820191906000526020600020905b8154815290600101906020018083116200020a57829003601f168201915b50505050509050919050565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166200006a5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b828054620002ca9062000486565b90600052602060002090601f016020900481019282620002ee576000855562000339565b82601f106200030957805160ff191683800117855562000339565b8280016001018555821562000339579182015b82811115620003395782518255916020019190600101906200031c565b50620003479291506200034b565b5090565b5b808211156200034757600081556001016200034c565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b03811681146200039057600080fd5b919050565b60008060408385031215620003a957600080fd5b82516001600160401b0380821115620003c157600080fd5b818501915085601f830112620003d657600080fd5b815181811115620003eb57620003eb62000362565b604051601f8201601f19908116603f0116810190838211818310171562000416576200041662000362565b816040528281526020935088848487010111156200043357600080fd5b600091505b8282101562000457578482018401518183018501529083019062000438565b82821115620004695760008484830101525b95506200047b91505085820162000378565b925050509250929050565b600181811c908216806200049b57607f821691505b602082108103620004bc57634e487b7160e01b600052602260045260246000fd5b50919050565b61231980620004d26000396000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c8063754b377c116100de578063aed8c6bc11610097578063e37ffe7c11610071578063e37ffe7c146103aa578063e985e9c5146103cb578063f242432a146103de578063ff4468c4146103f157600080fd5b8063aed8c6bc14610371578063b3c1cb2114610384578063d547741f1461039757600080fd5b8063754b377c146103035780637ab4339d1461031d57806391d14854146103305780639b642de114610343578063a217fddf14610356578063a22cb4651461035e57600080fd5b80632f2ff15d1161014b57806344112ed81161012557806344112ed8146102985780634e1273f4146102bf578063710b3096146102df578063730cb7d5146102f257600080fd5b80632f2ff15d1461025f57806336568abe146102725780633e1f3c271461028557600080fd5b8062fdd58e1461019257806301ffc9a7146101b85780630e064366146101db5780630e89341c14610206578063248a9ca3146102265780632eb2c2d61461024a575b600080fd5b6101a56101a0366004611618565b610419565b6040519081526020015b60405180910390f35b6101cb6101c636600461165a565b610496565b60405190151581526020016101af565b6101ee6101e9366004611618565b6104a7565b6040516001600160a01b0390911681526020016101af565b610219610214366004611677565b61051d565b6040516101af91906116ec565b6101a5610234366004611677565b6000908152600160208190526040909120015490565b61025d610258366004611858565b6105b1565b005b61025d61026d366004611905565b610606565b61025d610280366004611905565b610631565b610219610293366004611618565b6106af565b6101a57fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa481565b6102d26102cd366004611935565b610729565b6040516101af9190611a3c565b61025d6102ed366004611a4f565b610852565b6005546001600160a01b03166101ee565b61030b600381565b60405160ff90911681526020016101af565b61025d61032b366004611aaa565b6108e4565b6101cb61033e366004611905565b6109f1565b61025d610351366004611af0565b610a1c565b6101a5600081565b61025d61036c366004611b2c565b610a30565b61030b61037f366004611b6e565b610a49565b61025d610392366004611b93565b610ac0565b61025d6103a5366004611905565b610aee565b6103bd6103b8366004611677565b610b14565b6040516101af929190611bb0565b6101cb6103d9366004611c2e565b610b93565b61025d6103ec366004611c5c565b610bae565b6104046103ff366004611618565b610bf3565b60405163ffffffff90911681526020016101af565b60055460405163461e4f1960e11b8152600481018390526001600160a01b0384811660248301526000921690638c3c9e3290604401602060405180830381865afa15801561046b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f9190611cc4565b9392505050565b60006104a182610c69565b92915050565b6005546040516363ed4d5360e11b8152600481018390526001600160a01b038481166024830152600092169063c7da9aa690604401602060405180830381865afa1580156104f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f9190611cdd565b60606004805461052c90611cfa565b80601f016020809104026020016040519081016040528092919081815260200182805461055890611cfa565b80156105a55780601f1061057a576101008083540402835291602001916105a5565b820191906000526020600020905b81548152906001019060200180831161058857829003601f168201915b50505050509050919050565b6001600160a01b0385163314806105cd57506105cd8533610b93565b6105f25760405162461bcd60e51b81526004016105e990611d34565b60405180910390fd5b6105ff8585858585610ca9565b5050505050565b6000828152600160208190526040909120015461062281610e97565b61062c8383610ea4565b505050565b6001600160a01b03811633146106a15760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105e9565b6106ab8282610f0f565b5050565b600554604051636d7fbb6760e01b8152600481018390526001600160a01b0384811660248301526060921690636d7fbb6790604401600060405180830381865afa158015610701573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261048f9190810190611d82565b6060815183511461078e5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016105e9565b600083516001600160401b038111156107a9576107a96116ff565b6040519080825280602002602001820160405280156107d2578160200160208202803683370190505b50905060005b845181101561084a5761081d8582815181106107f6576107f6611e03565b602002602001015185838151811061081057610810611e03565b6020026020010151610419565b82828151811061082f5761082f611e03565b602090810291909101015261084381611e2f565b90506107d8565b509392505050565b7fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa461087c81610e97565b836001600160a01b0316856001600160a01b0316876001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6286866040516108d4929190918252602082015260400190565b60405180910390a4505050505050565b600054600390610100900460ff16158015610906575060005460ff8083169116105b6109695760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105e9565b6000805461ffff191660ff8316176101001781556109869061051d565b5115806109925750303b155b156109ab576109a083610f76565b6109ab600083610ea4565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000610a2781610e97565b6106ab82610f76565b6040516309a711b960e31b815260040160405180910390fd5b600554604051630e972f9160e41b81526004810184905260ff831660248201526000916001600160a01b03169063e972f91090604401602060405180830381865afa158015610a9c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f9190611e48565b6000610acb81610e97565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526001602081905260409091200154610b0a81610e97565b61062c8383610f0f565b600554604051632b2bf81b60e11b81526004810183905260609182916001600160a01b0390911690635657f03690602401600060405180830381865afa158015610b62573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b8a9190810190611ed4565b91509150915091565b60006040516309a711b960e31b815260040160405180910390fd5b6001600160a01b038516331480610bca5750610bca8533610b93565b610be65760405162461bcd60e51b81526004016105e990611d34565b6105ff8585858585610f89565b6005546040516314067f8b60e01b8152600481018390526001600160a01b03848116602483015260009216906314067f8b90604401602060405180830381865afa158015610c45573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f9190611f90565b60006001600160e01b03198216636cdb3d1360e11b1480610c9a57506001600160e01b031982166303a24d0760e21b145b806104a157506104a1826110c5565b8151835114610d0b5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016105e9565b6001600160a01b038416610d315760405162461bcd60e51b81526004016105e990611fb6565b33610d40818787878787610a30565b60005b8451811015610e29576000858281518110610d6057610d60611e03565b602002602001015190506000858381518110610d7e57610d7e611e03565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610dcf5760405162461bcd60e51b81526004016105e990611ffb565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610e0e908490612045565b9250508190555050505080610e2290611e2f565b9050610d43565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610e7992919061205d565b60405180910390a4610e8f8187878787876110fa565b505050505050565b610ea1813361125e565b50565b610eae82826109f1565b6106ab5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610f1982826109f1565b156106ab5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b80516106ab90600490602084019061156a565b6001600160a01b038416610faf5760405162461bcd60e51b81526004016105e990611fb6565b336000610fbb856112b7565b90506000610fc8856112b7565b9050610fd8838989858589610a30565b60008681526002602090815260408083206001600160a01b038c1684529091529020548581101561101b5760405162461bcd60e51b81526004016105e990611ffb565b60008781526002602090815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061105a908490612045565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46110ba848a8a8a8a8a611302565b505050505050505050565b60006001600160e01b03198216637965db0b60e01b14806104a157506301ffc9a760e01b6001600160e01b03198316146104a1565b6001600160a01b0384163b15610e8f5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061113e908990899088908890889060040161208b565b6020604051808303816000875af1925050508015611179575060408051601f3d908101601f19168201909252611176918101906120e9565b60015b61122557611185612106565b806308c379a0036111be5750611199612122565b806111a457506111c0565b8060405162461bcd60e51b81526004016105e991906116ec565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016105e9565b6001600160e01b0319811663bc197c8160e01b146112555760405162461bcd60e51b81526004016105e9906121ab565b50505050505050565b61126882826109f1565b6106ab57611275816113bd565b6112808360206113cf565b6040516020016112919291906121f3565b60408051601f198184030181529082905262461bcd60e51b82526105e9916004016116ec565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106112f1576112f1611e03565b602090810291909101015292915050565b6001600160a01b0384163b15610e8f5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906113469089908990889088908890600401612268565b6020604051808303816000875af1925050508015611381575060408051601f3d908101601f1916820190925261137e918101906120e9565b60015b61138d57611185612106565b6001600160e01b0319811663f23a6e6160e01b146112555760405162461bcd60e51b81526004016105e9906121ab565b60606104a16001600160a01b03831660145b606060006113de8360026122ad565b6113e9906002612045565b6001600160401b03811115611400576114006116ff565b6040519080825280601f01601f19166020018201604052801561142a576020820181803683370190505b509050600360fc1b8160008151811061144557611445611e03565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061147457611474611e03565b60200101906001600160f81b031916908160001a90535060006114988460026122ad565b6114a3906001612045565b90505b600181111561151b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106114d7576114d7611e03565b1a60f81b8282815181106114ed576114ed611e03565b60200101906001600160f81b031916908160001a90535060049490941c93611514816122cc565b90506114a6565b50831561048f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105e9565b82805461157690611cfa565b90600052602060002090601f01602090048101928261159857600085556115de565b82601f106115b157805160ff19168380011785556115de565b828001600101855582156115de579182015b828111156115de5782518255916020019190600101906115c3565b506115ea9291506115ee565b5090565b5b808211156115ea57600081556001016115ef565b6001600160a01b0381168114610ea157600080fd5b6000806040838503121561162b57600080fd5b823561163681611603565b946020939093013593505050565b6001600160e01b031981168114610ea157600080fd5b60006020828403121561166c57600080fd5b813561048f81611644565b60006020828403121561168957600080fd5b5035919050565b60005b838110156116ab578181015183820152602001611693565b838111156116ba576000848401525b50505050565b600081518084526116d8816020860160208601611690565b601f01601f19169290920160200192915050565b60208152600061048f60208301846116c0565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561173a5761173a6116ff565b6040525050565b60006001600160401b0382111561175a5761175a6116ff565b5060051b60200190565b600082601f83011261177557600080fd5b8135602061178282611741565b60405161178f8282611715565b83815260059390931b85018201928281019150868411156117af57600080fd5b8286015b848110156117ca57803583529183019183016117b3565b509695505050505050565b60006001600160401b038211156117ee576117ee6116ff565b50601f01601f191660200190565b600082601f83011261180d57600080fd5b8135611818816117d5565b6040516118258282611715565b82815285602084870101111561183a57600080fd5b82602086016020830137600092810160200192909252509392505050565b600080600080600060a0868803121561187057600080fd5b853561187b81611603565b9450602086013561188b81611603565b935060408601356001600160401b03808211156118a757600080fd5b6118b389838a01611764565b945060608801359150808211156118c957600080fd5b6118d589838a01611764565b935060808801359150808211156118eb57600080fd5b506118f8888289016117fc565b9150509295509295909350565b6000806040838503121561191857600080fd5b82359150602083013561192a81611603565b809150509250929050565b6000806040838503121561194857600080fd5b82356001600160401b038082111561195f57600080fd5b818501915085601f83011261197357600080fd5b8135602061198082611741565b60405161198d8282611715565b83815260059390931b85018201928281019150898411156119ad57600080fd5b948201945b838610156119d45785356119c581611603565b825294820194908201906119b2565b965050860135925050808211156119ea57600080fd5b506119f785828601611764565b9150509250929050565b600081518084526020808501945080840160005b83811015611a3157815187529582019590820190600101611a15565b509495945050505050565b60208152600061048f6020830184611a01565b600080600080600060a08688031215611a6757600080fd5b8535611a7281611603565b94506020860135611a8281611603565b93506040860135611a9281611603565b94979396509394606081013594506080013592915050565b60008060408385031215611abd57600080fd5b82356001600160401b03811115611ad357600080fd5b611adf858286016117fc565b925050602083013561192a81611603565b600060208284031215611b0257600080fd5b81356001600160401b03811115611b1857600080fd5b611b24848285016117fc565b949350505050565b60008060408385031215611b3f57600080fd5b8235611b4a81611603565b91506020830135801515811461192a57600080fd5b60ff81168114610ea157600080fd5b60008060408385031215611b8157600080fd5b82359150602083013561192a81611b5f565b600060208284031215611ba557600080fd5b813561048f81611603565b604080825283519082018190526000906020906060840190828701845b82811015611be957815184529284019290840190600101611bcd565b5050508381038285015284518082528583019183019060005b81811015611c2157835160ff1683529284019291840191600101611c02565b5090979650505050505050565b60008060408385031215611c4157600080fd5b8235611c4c81611603565b9150602083013561192a81611603565b600080600080600060a08688031215611c7457600080fd5b8535611c7f81611603565b94506020860135611c8f81611603565b9350604086013592506060860135915060808601356001600160401b03811115611cb857600080fd5b6118f8888289016117fc565b600060208284031215611cd657600080fd5b5051919050565b600060208284031215611cef57600080fd5b815161048f81611603565b600181811c90821680611d0e57607f821691505b602082108103611d2e57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b600060208284031215611d9457600080fd5b81516001600160401b03811115611daa57600080fd5b8201601f81018413611dbb57600080fd5b8051611dc6816117d5565b604051611dd38282611715565b828152866020848601011115611de857600080fd5b611df9836020830160208701611690565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611e4157611e41611e19565b5060010190565b600060208284031215611e5a57600080fd5b815161048f81611b5f565b600082601f830112611e7657600080fd5b81516020611e8382611741565b604051611e908282611715565b83815260059390931b8501820192828101915086841115611eb057600080fd5b8286015b848110156117ca578051611ec781611b5f565b8352918301918301611eb4565b60008060408385031215611ee757600080fd5b82516001600160401b0380821115611efe57600080fd5b818501915085601f830112611f1257600080fd5b81516020611f1f82611741565b604051611f2c8282611715565b83815260059390931b8501820192828101915089841115611f4c57600080fd5b948201945b83861015611f6a57855182529482019490820190611f51565b91880151919650909350505080821115611f8357600080fd5b506119f785828601611e65565b600060208284031215611fa257600080fd5b815163ffffffff8116811461048f57600080fd5b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6000821982111561205857612058611e19565b500190565b6040815260006120706040830185611a01565b82810360208401526120828185611a01565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906120b790830186611a01565b82810360608401526120c98186611a01565b905082810360808401526120dd81856116c0565b98975050505050505050565b6000602082840312156120fb57600080fd5b815161048f81611644565b600060033d111561211f5760046000803e5060005160e01c5b90565b600060443d10156121305790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561215f57505050505090565b82850191508151818111156121775750505050505090565b843d87010160208285010111156121915750505050505090565b6121a060208286010187611715565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161222b816017850160208801611690565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161225c816028840160208801611690565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906122a2908301846116c0565b979650505050505050565b60008160001904831182151516156122c7576122c7611e19565b500290565b6000816122db576122db611e19565b50600019019056fea26469706673582212209e33646a1ed2d51fcc749870e94aa69546c518fc5bfee43d37014ebc54dd767864736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061018d5760003560e01c8063754b377c116100de578063aed8c6bc11610097578063e37ffe7c11610071578063e37ffe7c146103aa578063e985e9c5146103cb578063f242432a146103de578063ff4468c4146103f157600080fd5b8063aed8c6bc14610371578063b3c1cb2114610384578063d547741f1461039757600080fd5b8063754b377c146103035780637ab4339d1461031d57806391d14854146103305780639b642de114610343578063a217fddf14610356578063a22cb4651461035e57600080fd5b80632f2ff15d1161014b57806344112ed81161012557806344112ed8146102985780634e1273f4146102bf578063710b3096146102df578063730cb7d5146102f257600080fd5b80632f2ff15d1461025f57806336568abe146102725780633e1f3c271461028557600080fd5b8062fdd58e1461019257806301ffc9a7146101b85780630e064366146101db5780630e89341c14610206578063248a9ca3146102265780632eb2c2d61461024a575b600080fd5b6101a56101a0366004611618565b610419565b6040519081526020015b60405180910390f35b6101cb6101c636600461165a565b610496565b60405190151581526020016101af565b6101ee6101e9366004611618565b6104a7565b6040516001600160a01b0390911681526020016101af565b610219610214366004611677565b61051d565b6040516101af91906116ec565b6101a5610234366004611677565b6000908152600160208190526040909120015490565b61025d610258366004611858565b6105b1565b005b61025d61026d366004611905565b610606565b61025d610280366004611905565b610631565b610219610293366004611618565b6106af565b6101a57fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa481565b6102d26102cd366004611935565b610729565b6040516101af9190611a3c565b61025d6102ed366004611a4f565b610852565b6005546001600160a01b03166101ee565b61030b600381565b60405160ff90911681526020016101af565b61025d61032b366004611aaa565b6108e4565b6101cb61033e366004611905565b6109f1565b61025d610351366004611af0565b610a1c565b6101a5600081565b61025d61036c366004611b2c565b610a30565b61030b61037f366004611b6e565b610a49565b61025d610392366004611b93565b610ac0565b61025d6103a5366004611905565b610aee565b6103bd6103b8366004611677565b610b14565b6040516101af929190611bb0565b6101cb6103d9366004611c2e565b610b93565b61025d6103ec366004611c5c565b610bae565b6104046103ff366004611618565b610bf3565b60405163ffffffff90911681526020016101af565b60055460405163461e4f1960e11b8152600481018390526001600160a01b0384811660248301526000921690638c3c9e3290604401602060405180830381865afa15801561046b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f9190611cc4565b9392505050565b60006104a182610c69565b92915050565b6005546040516363ed4d5360e11b8152600481018390526001600160a01b038481166024830152600092169063c7da9aa690604401602060405180830381865afa1580156104f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f9190611cdd565b60606004805461052c90611cfa565b80601f016020809104026020016040519081016040528092919081815260200182805461055890611cfa565b80156105a55780601f1061057a576101008083540402835291602001916105a5565b820191906000526020600020905b81548152906001019060200180831161058857829003601f168201915b50505050509050919050565b6001600160a01b0385163314806105cd57506105cd8533610b93565b6105f25760405162461bcd60e51b81526004016105e990611d34565b60405180910390fd5b6105ff8585858585610ca9565b5050505050565b6000828152600160208190526040909120015461062281610e97565b61062c8383610ea4565b505050565b6001600160a01b03811633146106a15760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016105e9565b6106ab8282610f0f565b5050565b600554604051636d7fbb6760e01b8152600481018390526001600160a01b0384811660248301526060921690636d7fbb6790604401600060405180830381865afa158015610701573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261048f9190810190611d82565b6060815183511461078e5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016105e9565b600083516001600160401b038111156107a9576107a96116ff565b6040519080825280602002602001820160405280156107d2578160200160208202803683370190505b50905060005b845181101561084a5761081d8582815181106107f6576107f6611e03565b602002602001015185838151811061081057610810611e03565b6020026020010151610419565b82828151811061082f5761082f611e03565b602090810291909101015261084381611e2f565b90506107d8565b509392505050565b7fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa461087c81610e97565b836001600160a01b0316856001600160a01b0316876001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6286866040516108d4929190918252602082015260400190565b60405180910390a4505050505050565b600054600390610100900460ff16158015610906575060005460ff8083169116105b6109695760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105e9565b6000805461ffff191660ff8316176101001781556109869061051d565b5115806109925750303b155b156109ab576109a083610f76565b6109ab600083610ea4565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6000610a2781610e97565b6106ab82610f76565b6040516309a711b960e31b815260040160405180910390fd5b600554604051630e972f9160e41b81526004810184905260ff831660248201526000916001600160a01b03169063e972f91090604401602060405180830381865afa158015610a9c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f9190611e48565b6000610acb81610e97565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526001602081905260409091200154610b0a81610e97565b61062c8383610f0f565b600554604051632b2bf81b60e11b81526004810183905260609182916001600160a01b0390911690635657f03690602401600060405180830381865afa158015610b62573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b8a9190810190611ed4565b91509150915091565b60006040516309a711b960e31b815260040160405180910390fd5b6001600160a01b038516331480610bca5750610bca8533610b93565b610be65760405162461bcd60e51b81526004016105e990611d34565b6105ff8585858585610f89565b6005546040516314067f8b60e01b8152600481018390526001600160a01b03848116602483015260009216906314067f8b90604401602060405180830381865afa158015610c45573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061048f9190611f90565b60006001600160e01b03198216636cdb3d1360e11b1480610c9a57506001600160e01b031982166303a24d0760e21b145b806104a157506104a1826110c5565b8151835114610d0b5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016105e9565b6001600160a01b038416610d315760405162461bcd60e51b81526004016105e990611fb6565b33610d40818787878787610a30565b60005b8451811015610e29576000858281518110610d6057610d60611e03565b602002602001015190506000858381518110610d7e57610d7e611e03565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610dcf5760405162461bcd60e51b81526004016105e990611ffb565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610e0e908490612045565b9250508190555050505080610e2290611e2f565b9050610d43565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610e7992919061205d565b60405180910390a4610e8f8187878787876110fa565b505050505050565b610ea1813361125e565b50565b610eae82826109f1565b6106ab5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610f1982826109f1565b156106ab5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b80516106ab90600490602084019061156a565b6001600160a01b038416610faf5760405162461bcd60e51b81526004016105e990611fb6565b336000610fbb856112b7565b90506000610fc8856112b7565b9050610fd8838989858589610a30565b60008681526002602090815260408083206001600160a01b038c1684529091529020548581101561101b5760405162461bcd60e51b81526004016105e990611ffb565b60008781526002602090815260408083206001600160a01b038d8116855292528083208985039055908a1682528120805488929061105a908490612045565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46110ba848a8a8a8a8a611302565b505050505050505050565b60006001600160e01b03198216637965db0b60e01b14806104a157506301ffc9a760e01b6001600160e01b03198316146104a1565b6001600160a01b0384163b15610e8f5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061113e908990899088908890889060040161208b565b6020604051808303816000875af1925050508015611179575060408051601f3d908101601f19168201909252611176918101906120e9565b60015b61122557611185612106565b806308c379a0036111be5750611199612122565b806111a457506111c0565b8060405162461bcd60e51b81526004016105e991906116ec565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016105e9565b6001600160e01b0319811663bc197c8160e01b146112555760405162461bcd60e51b81526004016105e9906121ab565b50505050505050565b61126882826109f1565b6106ab57611275816113bd565b6112808360206113cf565b6040516020016112919291906121f3565b60408051601f198184030181529082905262461bcd60e51b82526105e9916004016116ec565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106112f1576112f1611e03565b602090810291909101015292915050565b6001600160a01b0384163b15610e8f5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906113469089908990889088908890600401612268565b6020604051808303816000875af1925050508015611381575060408051601f3d908101601f1916820190925261137e918101906120e9565b60015b61138d57611185612106565b6001600160e01b0319811663f23a6e6160e01b146112555760405162461bcd60e51b81526004016105e9906121ab565b60606104a16001600160a01b03831660145b606060006113de8360026122ad565b6113e9906002612045565b6001600160401b03811115611400576114006116ff565b6040519080825280601f01601f19166020018201604052801561142a576020820181803683370190505b509050600360fc1b8160008151811061144557611445611e03565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061147457611474611e03565b60200101906001600160f81b031916908160001a90535060006114988460026122ad565b6114a3906001612045565b90505b600181111561151b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106114d7576114d7611e03565b1a60f81b8282815181106114ed576114ed611e03565b60200101906001600160f81b031916908160001a90535060049490941c93611514816122cc565b90506114a6565b50831561048f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105e9565b82805461157690611cfa565b90600052602060002090601f01602090048101928261159857600085556115de565b82601f106115b157805160ff19168380011785556115de565b828001600101855582156115de579182015b828111156115de5782518255916020019190600101906115c3565b506115ea9291506115ee565b5090565b5b808211156115ea57600081556001016115ef565b6001600160a01b0381168114610ea157600080fd5b6000806040838503121561162b57600080fd5b823561163681611603565b946020939093013593505050565b6001600160e01b031981168114610ea157600080fd5b60006020828403121561166c57600080fd5b813561048f81611644565b60006020828403121561168957600080fd5b5035919050565b60005b838110156116ab578181015183820152602001611693565b838111156116ba576000848401525b50505050565b600081518084526116d8816020860160208601611690565b601f01601f19169290920160200192915050565b60208152600061048f60208301846116c0565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b038111828210171561173a5761173a6116ff565b6040525050565b60006001600160401b0382111561175a5761175a6116ff565b5060051b60200190565b600082601f83011261177557600080fd5b8135602061178282611741565b60405161178f8282611715565b83815260059390931b85018201928281019150868411156117af57600080fd5b8286015b848110156117ca57803583529183019183016117b3565b509695505050505050565b60006001600160401b038211156117ee576117ee6116ff565b50601f01601f191660200190565b600082601f83011261180d57600080fd5b8135611818816117d5565b6040516118258282611715565b82815285602084870101111561183a57600080fd5b82602086016020830137600092810160200192909252509392505050565b600080600080600060a0868803121561187057600080fd5b853561187b81611603565b9450602086013561188b81611603565b935060408601356001600160401b03808211156118a757600080fd5b6118b389838a01611764565b945060608801359150808211156118c957600080fd5b6118d589838a01611764565b935060808801359150808211156118eb57600080fd5b506118f8888289016117fc565b9150509295509295909350565b6000806040838503121561191857600080fd5b82359150602083013561192a81611603565b809150509250929050565b6000806040838503121561194857600080fd5b82356001600160401b038082111561195f57600080fd5b818501915085601f83011261197357600080fd5b8135602061198082611741565b60405161198d8282611715565b83815260059390931b85018201928281019150898411156119ad57600080fd5b948201945b838610156119d45785356119c581611603565b825294820194908201906119b2565b965050860135925050808211156119ea57600080fd5b506119f785828601611764565b9150509250929050565b600081518084526020808501945080840160005b83811015611a3157815187529582019590820190600101611a15565b509495945050505050565b60208152600061048f6020830184611a01565b600080600080600060a08688031215611a6757600080fd5b8535611a7281611603565b94506020860135611a8281611603565b93506040860135611a9281611603565b94979396509394606081013594506080013592915050565b60008060408385031215611abd57600080fd5b82356001600160401b03811115611ad357600080fd5b611adf858286016117fc565b925050602083013561192a81611603565b600060208284031215611b0257600080fd5b81356001600160401b03811115611b1857600080fd5b611b24848285016117fc565b949350505050565b60008060408385031215611b3f57600080fd5b8235611b4a81611603565b91506020830135801515811461192a57600080fd5b60ff81168114610ea157600080fd5b60008060408385031215611b8157600080fd5b82359150602083013561192a81611b5f565b600060208284031215611ba557600080fd5b813561048f81611603565b604080825283519082018190526000906020906060840190828701845b82811015611be957815184529284019290840190600101611bcd565b5050508381038285015284518082528583019183019060005b81811015611c2157835160ff1683529284019291840191600101611c02565b5090979650505050505050565b60008060408385031215611c4157600080fd5b8235611c4c81611603565b9150602083013561192a81611603565b600080600080600060a08688031215611c7457600080fd5b8535611c7f81611603565b94506020860135611c8f81611603565b9350604086013592506060860135915060808601356001600160401b03811115611cb857600080fd5b6118f8888289016117fc565b600060208284031215611cd657600080fd5b5051919050565b600060208284031215611cef57600080fd5b815161048f81611603565b600181811c90821680611d0e57607f821691505b602082108103611d2e57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b600060208284031215611d9457600080fd5b81516001600160401b03811115611daa57600080fd5b8201601f81018413611dbb57600080fd5b8051611dc6816117d5565b604051611dd38282611715565b828152866020848601011115611de857600080fd5b611df9836020830160208701611690565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611e4157611e41611e19565b5060010190565b600060208284031215611e5a57600080fd5b815161048f81611b5f565b600082601f830112611e7657600080fd5b81516020611e8382611741565b604051611e908282611715565b83815260059390931b8501820192828101915086841115611eb057600080fd5b8286015b848110156117ca578051611ec781611b5f565b8352918301918301611eb4565b60008060408385031215611ee757600080fd5b82516001600160401b0380821115611efe57600080fd5b818501915085601f830112611f1257600080fd5b81516020611f1f82611741565b604051611f2c8282611715565b83815260059390931b8501820192828101915089841115611f4c57600080fd5b948201945b83861015611f6a57855182529482019490820190611f51565b91880151919650909350505080821115611f8357600080fd5b506119f785828601611e65565b600060208284031215611fa257600080fd5b815163ffffffff8116811461048f57600080fd5b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6000821982111561205857612058611e19565b500190565b6040815260006120706040830185611a01565b82810360208401526120828185611a01565b95945050505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906120b790830186611a01565b82810360608401526120c98186611a01565b905082810360808401526120dd81856116c0565b98975050505050505050565b6000602082840312156120fb57600080fd5b815161048f81611644565b600060033d111561211f5760046000803e5060005160e01c5b90565b600060443d10156121305790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561215f57505050505090565b82850191508151818111156121775750505050505090565b843d87010160208285010111156121915750505050505090565b6121a060208286010187611715565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161222b816017850160208801611690565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161225c816028840160208801611690565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906122a2908301846116c0565b979650505050505050565b60008160001904831182151516156122c7576122c7611e19565b500290565b6000816122db576122db611e19565b50600019019056fea26469706673582212209e33646a1ed2d51fcc749870e94aa69546c518fc5bfee43d37014ebc54dd767864736f6c634300080e0033", "devdoc": { "author": "Sismo", "kind": "dev", @@ -703,11 +861,45 @@ "getAttestationsRegistry()": { "details": "Getter of the attestations registry" }, + "getAttributeValueForBadge(uint256,uint8)": { + "details": "Getter of the value of a specific badge attribute", + "params": { + "id": "Badge Id to check (= attestationCollectionId)", + "index": "Index of the attribute" + } + }, + "getAttributesNamesAndValuesForBadge(uint256)": { + "details": "Getter of all badge attributes and their values for a specific badge", + "params": { + "id": "Badge Id to check (= attestationCollectionId)" + } + }, + "getBadgeExtraData(address,uint256)": { + "details": "Getter of the badge extra data (it can store nullifier and burnCount)", + "params": { + "account": "Address that holds the badge", + "id": "Badge Id to check (= attestationCollectionId)" + } + }, + "getBadgeIssuer(address,uint256)": { + "details": "Getter of the badge issuer", + "params": { + "account": "Address that holds the badge", + "id": "Badge Id to check (= attestationCollectionId)" + } + }, + "getBadgeTimestamp(address,uint256)": { + "details": "Getter of the badge timestamp", + "params": { + "account": "Address that holds the badge", + "id": "Badge Id to check (= attestationCollectionId)" + } + }, "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." + "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. May emit a {RoleGranted} event." }, "hasRole(bytes32,address)": { "details": "Returns `true` if `account` has been granted `role`." @@ -720,13 +912,13 @@ } }, "isApprovedForAll(address,address)": { - "details": "See {IERC1155-isApprovedForAll}." + "details": "Reverts, this is a non transferable ERC115 contract" }, "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`." + "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`. May emit a {RoleRevoked} event." }, "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." + "details": "Revokes `role` from `account`. If `account` had been granted `role`, emits a {RoleRevoked} event. Requirements: - the caller must have ``role``'s admin role. May emit a {RoleRevoked} event." }, "safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)": { "details": "See {IERC1155-safeBatchTransferFrom}." @@ -735,7 +927,7 @@ "details": "See {IERC1155-safeTransferFrom}." }, "setApprovalForAll(address,bool)": { - "details": "See {IERC1155-setApprovalForAll}." + "details": "Reverts, this is a non transferable ERC115 contract" }, "setAttestationsRegistry(address)": { "details": "Set the attestations registry address. Can only be called by owner (default admin)", @@ -771,22 +963,26 @@ }, "userdoc": { "kind": "user", - "methods": {}, + "methods": { + "initialize(string,address)": { + "notice": "The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization." + } + }, "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, + "astId": 935, "contract": "contracts/core/Badges.sol:Badges", "label": "_initialized", "offset": 0, "slot": "0", - "type": "t_bool" + "type": "t_uint8" }, { - "astId": 939, + "astId": 938, "contract": "contracts/core/Badges.sol:Badges", "label": "_initializing", "offset": 1, @@ -802,7 +998,7 @@ "type": "t_mapping(t_bytes32,t_struct(RoleData)19_storage)" }, { - "astId": 1121, + "astId": 1231, "contract": "contracts/core/Badges.sol:Badges", "label": "_balances", "offset": 0, @@ -810,7 +1006,7 @@ "type": "t_mapping(t_uint256,t_mapping(t_address,t_uint256))" }, { - "astId": 1127, + "astId": 1237, "contract": "contracts/core/Badges.sol:Badges", "label": "_operatorApprovals", "offset": 0, @@ -818,7 +1014,7 @@ "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" }, { - "astId": 1129, + "astId": 1239, "contract": "contracts/core/Badges.sol:Badges", "label": "_uri", "offset": 0, @@ -826,12 +1022,12 @@ "type": "t_string_storage" }, { - "astId": 10475, + "astId": 11990, "contract": "contracts/core/Badges.sol:Badges", "label": "_attestationsRegistry", "offset": 0, "slot": "5", - "type": "t_contract(IAttestationsRegistry)11151" + "type": "t_contract(IAttestationsRegistry)12822" } ], "types": { @@ -850,7 +1046,7 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(IAttestationsRegistry)11151": { + "t_contract(IAttestationsRegistry)12822": { "encoding": "inplace", "label": "contract IAttestationsRegistry", "numberOfBytes": "20" @@ -922,6 +1118,11 @@ "encoding": "inplace", "label": "uint256", "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" } } } diff --git a/deployments/mumbai/BadgesImplemV2.json b/deployments/mumbai/BadgesImplemV2.json deleted file mode 100644 index b16ad27..0000000 --- a/deployments/mumbai/BadgesImplemV2.json +++ /dev/null @@ -1,928 +0,0 @@ -{ - "address": "0x81760455CD8FC4EA4a5a5fEaa7F3677955d59b59", - "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": "0x1051bc03dbef45e5cae54678ab300e8bb2cc481f724be896650518751b4cb930", - "receipt": { - "to": null, - "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0x81760455CD8FC4EA4a5a5fEaa7F3677955d59b59", - "transactionIndex": 10, - "gasUsed": "1777624", - "logsBloom": "0x00000004000000000000000000020000000000000000000000000000000000000000000000000000000000000000000200008000000000000000000000008000000000000000000000000000000000800000000000002000000100000000000000000000020000000000000000000800002000000000000080000000000000000000000000000000000000000000000000000010000000000000000000008000200000000000000000080000800000000000000000000000001000000000004000000000000000000001000000000100000000000000000100100000000020000000000000000000000000000000000000000000000000000020008000100000", - "blockHash": "0x2ba774ac3d2b6f9d8a51517e5cb4caaf508861001ffe7d50250b4fc51228e1f3", - "transactionHash": "0x1051bc03dbef45e5cae54678ab300e8bb2cc481f724be896650518751b4cb930", - "logs": [ - { - "transactionIndex": 10, - "blockNumber": 28807645, - "transactionHash": "0x1051bc03dbef45e5cae54678ab300e8bb2cc481f724be896650518751b4cb930", - "address": "0x81760455CD8FC4EA4a5a5fEaa7F3677955d59b59", - "topics": [ - "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x0000000000000000000000004e070e9b85a659f0b7b47cde33152ad6c2f63954", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" - ], - "data": "0x", - "logIndex": 69, - "blockHash": "0x2ba774ac3d2b6f9d8a51517e5cb4caaf508861001ffe7d50250b4fc51228e1f3" - }, - { - "transactionIndex": 10, - "blockNumber": 28807645, - "transactionHash": "0x1051bc03dbef45e5cae54678ab300e8bb2cc481f724be896650518751b4cb930", - "address": "0x0000000000000000000000000000000000001010", - "topics": [ - "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", - "0x0000000000000000000000000000000000000000000000000000000000001010", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x0000000000000000000000003a22c8bc68e98b0faf40f349dd2b2890fae01484" - ], - "data": "0x00000000000000000000000000000000000000000000000000161a96b0b988000000000000000000000000000000000000000000000000007df204f6b6956d9500000000000000000000000000000000000000000000000005e8090bfc0293a60000000000000000000000000000000000000000000000007ddbea6005dbe59500000000000000000000000000000000000000000000000005fe23a2acbc1ba6", - "logIndex": 70, - "blockHash": "0x2ba774ac3d2b6f9d8a51517e5cb4caaf508861001ffe7d50250b4fc51228e1f3" - } - ], - "blockNumber": 28807645, - "cumulativeGasUsed": "3960841", - "status": 1, - "byzantium": true - }, - "args": [ - "https://hub.staging.zikies.io/badges/mumbai/{id}.json", - "0x4e070E9b85a659F0B7B47cde33152ad6c2F63954" - ], - "numDeployments": 1, - "solcInputHash": "c7c67c4a1ddf53de4ef76f8a114dfc39", - "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\":\"Reverts, this is a non transferable ERC115 contract\"},\"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\":\"Reverts, this is a non transferable ERC115 contract\"},\"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 Reverts, this is a non transferable ERC115 contract\\n */\\n function setApprovalForAll(address operator, bool approved) public virtual override {\\n revert BadgesNonTransferrable();\\n }\\n\\n /**\\n * @dev Reverts, this is a non transferable ERC115 contract\\n */\\n function isApprovedForAll(address account, address operator)\\n public\\n view\\n virtual\\n override\\n returns (bool)\\n {\\n revert BadgesNonTransferrable();\\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\":\"0x55f7f1bac01e64ac60d1a4efe02bee2270444516a5b5d4719161fb664ff8bcf0\",\"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 error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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\":\"0xcf79a817ec578f5b4d8f23853dd8df0e3b1acfbff2b5a01601fd9a7315862ec9\",\"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": "0x60806040523480156200001157600080fd5b50604051620020e5380380620020e58339810160408190526200003491620002de565b81620000408162000055565b506200004d82826200006e565b50506200040b565b80516200006a90600490602084019062000205565b5050565b600054610100900460ff166200008b5760005460ff161562000095565b6200009562000150565b620000fd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801562000120576000805461ffff19166101011790555b6200012b8362000055565b620001386000836200016e565b80156200014b576000805461ff00191690555b505050565b60006200016830620001f660201b620009511760201c565b15905090565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff166200006a5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b6001600160a01b03163b151590565b8280546200021390620003cf565b90600052602060002090601f01602090048101928262000237576000855562000282565b82601f106200025257805160ff191683800117855562000282565b8280016001018555821562000282579182015b828111156200028257825182559160200191906001019062000265565b506200029092915062000294565b5090565b5b8082111562000290576000815560010162000295565b634e487b7160e01b600052604160045260246000fd5b80516001600160a01b0381168114620002d957600080fd5b919050565b60008060408385031215620002f257600080fd5b82516001600160401b03808211156200030a57600080fd5b818501915085601f8301126200031f57600080fd5b815181811115620003345762000334620002ab565b604051601f8201601f19908116603f011681019083821181831017156200035f576200035f620002ab565b816040528281526020935088848487010111156200037c57600080fd5b600091505b82821015620003a0578482018401518183018501529083019062000381565b82821115620003b25760008484830101525b9550620003c4915050858201620002c1565b925050509250929050565b600181811c90821680620003e457607f821691505b6020821081036200040557634e487b7160e01b600052602260045260246000fd5b50919050565b611cca806200041b6000396000f3fe608060405234801561001057600080fd5b506004361061012b5760003560e01c8063730cb7d5116100ad578063a22cb46511610071578063a22cb465146102ae578063b3c1cb21146102c1578063d547741f146102d4578063e985e9c5146102e7578063f242432a146102fa57600080fd5b8063730cb7d5146102525780637ab4339d1461026d57806391d14854146102805780639b642de114610293578063a217fddf146102a657600080fd5b80632f2ff15d116100f45780632f2ff15d146101d257806336568abe146101e557806344112ed8146101f85780634e1273f41461021f578063710b30961461023f57600080fd5b8062fdd58e1461013057806301ffc9a7146101565780630e89341c14610179578063248a9ca3146101995780632eb2c2d6146101bd575b600080fd5b61014361013e3660046112ee565b61030d565b6040519081526020015b60405180910390f35b610169610164366004611331565b61038a565b604051901515815260200161014d565b61018c61018736600461134e565b61039b565b60405161014d91906113c3565b6101436101a736600461134e565b6000908152600160208190526040909120015490565b6101d06101cb366004611522565b61042f565b005b6101d06101e03660046115cc565b6104cb565b6101d06101f33660046115cc565b6104f7565b6101437fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa481565b61023261022d3660046115f8565b610575565b60405161014d91906116fe565b6101d061024d366004611711565b61069f565b6005546040516001600160a01b03909116815260200161014d565b6101d061027b366004611766565b610732565b61016961028e3660046115cc565b610800565b6101d06102a13660046117ab565b61082b565b610143600081565b6101d06102bc3660046117e8565b610840565b6101d06102cf366004611824565b610859565b6101d06102e23660046115cc565b610888565b6101696102f536600461183f565b6108af565b6101d0610308366004611869565b6108ca565b60055460405163461e4f1960e11b8152600481018390526001600160a01b0384811660248301526000921690638c3c9e3290604401602060405180830381865afa15801561035f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038391906118ce565b9392505050565b600061039582610960565b92915050565b6060600480546103aa906118e7565b80601f01602080910402602001604051908101604052809291908181526020018280546103d6906118e7565b80156104235780601f106103f857610100808354040283529160200191610423565b820191906000526020600020905b81548152906001019060200180831161040657829003601f168201915b50505050509050919050565b6001600160a01b03851633148061044b575061044b85336108af565b6104b75760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084015b60405180910390fd5b6104c485858585856109a0565b5050505050565b600082815260016020819052604090912001546104e88133610b8e565b6104f28383610bf2565b505050565b6001600160a01b03811633146105675760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016104ae565b6105718282610c5d565b5050565b606081518351146105da5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016104ae565b6000835167ffffffffffffffff8111156105f6576105f66113d6565b60405190808252806020026020018201604052801561061f578160200160208202803683370190505b50905060005b84518110156106975761066a85828151811061064357610643611921565b602002602001015185838151811061065d5761065d611921565b602002602001015161030d565b82828151811061067c5761067c611921565b60209081029190910101526106908161194d565b9050610625565b509392505050565b7fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa46106ca8133610b8e565b836001600160a01b0316856001600160a01b0316876001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628686604051610722929190918252602082015260400190565b60405180910390a4505050505050565b600054610100900460ff1661074d5760005460ff1615610751565b303b155b6107b45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104ae565b600054610100900460ff161580156107d6576000805461ffff19166101011790555b6107df83610cc4565b6107ea600083610bf2565b80156104f2576000805461ff0019169055505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60006108378133610b8e565b61057182610cc4565b6040516309a711b960e31b815260040160405180910390fd5b60006108658133610b8e565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260016020819052604090912001546108a58133610b8e565b6104f28383610c5d565b60006040516309a711b960e31b815260040160405180910390fd5b6001600160a01b0385163314806108e657506108e685336108af565b6109445760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016104ae565b6104c48585858585610cd7565b6001600160a01b03163b151590565b60006001600160e01b03198216636cdb3d1360e11b148061099157506001600160e01b031982166303a24d0760e21b145b80610395575061039582610e07565b8151835114610a025760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016104ae565b6001600160a01b038416610a285760405162461bcd60e51b81526004016104ae90611966565b33610a37818787878787610840565b60005b8451811015610b20576000858281518110610a5757610a57611921565b602002602001015190506000858381518110610a7557610a75611921565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610ac65760405162461bcd60e51b81526004016104ae906119ab565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610b059084906119f5565b9250508190555050505080610b199061194d565b9050610a3a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610b70929190611a0d565b60405180910390a4610b86818787878787610e3c565b505050505050565b610b988282610800565b61057157610bb0816001600160a01b03166014610f97565b610bbb836020610f97565b604051602001610bcc929190611a3b565b60408051601f198184030181529082905262461bcd60e51b82526104ae916004016113c3565b610bfc8282610800565b6105715760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610c678282610800565b156105715760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8051610571906004906020840190611239565b6001600160a01b038416610cfd5760405162461bcd60e51b81526004016104ae90611966565b33610d1c818787610d0d88611133565b610d1688611133565b87610840565b60008481526002602090815260408083206001600160a01b038a16845290915290205483811015610d5f5760405162461bcd60e51b81526004016104ae906119ab565b60008581526002602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290610d9e9084906119f5565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610dfe82888888888861117e565b50505050505050565b60006001600160e01b03198216637965db0b60e01b148061039557506301ffc9a760e01b6001600160e01b0319831614610395565b6001600160a01b0384163b15610b865760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190610e809089908990889088908890600401611ab0565b6020604051808303816000875af1925050508015610ebb575060408051601f3d908101601f19168201909252610eb891810190611b0e565b60015b610f6757610ec7611b2b565b806308c379a003610f005750610edb611b47565b80610ee65750610f02565b8060405162461bcd60e51b81526004016104ae91906113c3565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016104ae565b6001600160e01b0319811663bc197c8160e01b14610dfe5760405162461bcd60e51b81526004016104ae90611bd1565b60606000610fa6836002611c19565b610fb19060026119f5565b67ffffffffffffffff811115610fc957610fc96113d6565b6040519080825280601f01601f191660200182016040528015610ff3576020820181803683370190505b509050600360fc1b8160008151811061100e5761100e611921565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061103d5761103d611921565b60200101906001600160f81b031916908160001a9053506000611061846002611c19565b61106c9060016119f5565b90505b60018111156110e4576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106110a0576110a0611921565b1a60f81b8282815181106110b6576110b6611921565b60200101906001600160f81b031916908160001a90535060049490941c936110dd81611c38565b905061106f565b5083156103835760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104ae565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061116d5761116d611921565b602090810291909101015292915050565b6001600160a01b0384163b15610b865760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906111c29089908990889088908890600401611c4f565b6020604051808303816000875af19250505080156111fd575060408051601f3d908101601f191682019092526111fa91810190611b0e565b60015b61120957610ec7611b2b565b6001600160e01b0319811663f23a6e6160e01b14610dfe5760405162461bcd60e51b81526004016104ae90611bd1565b828054611245906118e7565b90600052602060002090601f01602090048101928261126757600085556112ad565b82601f1061128057805160ff19168380011785556112ad565b828001600101855582156112ad579182015b828111156112ad578251825591602001919060010190611292565b506112b99291506112bd565b5090565b5b808211156112b957600081556001016112be565b80356001600160a01b03811681146112e957600080fd5b919050565b6000806040838503121561130157600080fd5b61130a836112d2565b946020939093013593505050565b6001600160e01b03198116811461132e57600080fd5b50565b60006020828403121561134357600080fd5b813561038381611318565b60006020828403121561136057600080fd5b5035919050565b60005b8381101561138257818101518382015260200161136a565b83811115611391576000848401525b50505050565b600081518084526113af816020860160208601611367565b601f01601f19169290920160200192915050565b6020815260006103836020830184611397565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715611412576114126113d6565b6040525050565b600067ffffffffffffffff821115611433576114336113d6565b5060051b60200190565b600082601f83011261144e57600080fd5b8135602061145b82611419565b60405161146882826113ec565b83815260059390931b850182019282810191508684111561148857600080fd5b8286015b848110156114a3578035835291830191830161148c565b509695505050505050565b600082601f8301126114bf57600080fd5b813567ffffffffffffffff8111156114d9576114d96113d6565b6040516114f0601f8301601f1916602001826113ec565b81815284602083860101111561150557600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561153a57600080fd5b611543866112d2565b9450611551602087016112d2565b9350604086013567ffffffffffffffff8082111561156e57600080fd5b61157a89838a0161143d565b9450606088013591508082111561159057600080fd5b61159c89838a0161143d565b935060808801359150808211156115b257600080fd5b506115bf888289016114ae565b9150509295509295909350565b600080604083850312156115df57600080fd5b823591506115ef602084016112d2565b90509250929050565b6000806040838503121561160b57600080fd5b823567ffffffffffffffff8082111561162357600080fd5b818501915085601f83011261163757600080fd5b8135602061164482611419565b60405161165182826113ec565b83815260059390931b850182019282810191508984111561167157600080fd5b948201945b8386101561169657611687866112d2565b82529482019490820190611676565b965050860135925050808211156116ac57600080fd5b506116b98582860161143d565b9150509250929050565b600081518084526020808501945080840160005b838110156116f3578151875295820195908201906001016116d7565b509495945050505050565b60208152600061038360208301846116c3565b600080600080600060a0868803121561172957600080fd5b611732866112d2565b9450611740602087016112d2565b935061174e604087016112d2565b94979396509394606081013594506080013592915050565b6000806040838503121561177957600080fd5b823567ffffffffffffffff81111561179057600080fd5b61179c858286016114ae565b9250506115ef602084016112d2565b6000602082840312156117bd57600080fd5b813567ffffffffffffffff8111156117d457600080fd5b6117e0848285016114ae565b949350505050565b600080604083850312156117fb57600080fd5b611804836112d2565b91506020830135801515811461181957600080fd5b809150509250929050565b60006020828403121561183657600080fd5b610383826112d2565b6000806040838503121561185257600080fd5b61185b836112d2565b91506115ef602084016112d2565b600080600080600060a0868803121561188157600080fd5b61188a866112d2565b9450611898602087016112d2565b93506040860135925060608601359150608086013567ffffffffffffffff8111156118c257600080fd5b6115bf888289016114ae565b6000602082840312156118e057600080fd5b5051919050565b600181811c908216806118fb57607f821691505b60208210810361191b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161195f5761195f611937565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115611a0857611a08611937565b500190565b604081526000611a2060408301856116c3565b8281036020840152611a3281856116c3565b95945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611a73816017850160208801611367565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611aa4816028840160208801611367565b01602801949350505050565b6001600160a01b0386811682528516602082015260a060408201819052600090611adc908301866116c3565b8281036060840152611aee81866116c3565b90508281036080840152611b028185611397565b98975050505050505050565b600060208284031215611b2057600080fd5b815161038381611318565b600060033d1115611b445760046000803e5060005160e01c5b90565b600060443d1015611b555790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611b8557505050505090565b8285019150815181811115611b9d5750505050505090565b843d8701016020828501011115611bb75750505050505090565b611bc6602082860101876113ec565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6000816000190483118215151615611c3357611c33611937565b500290565b600081611c4757611c47611937565b506000190190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611c8990830184611397565b97965050505050505056fea26469706673582212207baaa3a761f1daf84910213f1b2412ab790a7693d59dad05f0ac9bc001378df664736f6c634300080e0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061012b5760003560e01c8063730cb7d5116100ad578063a22cb46511610071578063a22cb465146102ae578063b3c1cb21146102c1578063d547741f146102d4578063e985e9c5146102e7578063f242432a146102fa57600080fd5b8063730cb7d5146102525780637ab4339d1461026d57806391d14854146102805780639b642de114610293578063a217fddf146102a657600080fd5b80632f2ff15d116100f45780632f2ff15d146101d257806336568abe146101e557806344112ed8146101f85780634e1273f41461021f578063710b30961461023f57600080fd5b8062fdd58e1461013057806301ffc9a7146101565780630e89341c14610179578063248a9ca3146101995780632eb2c2d6146101bd575b600080fd5b61014361013e3660046112ee565b61030d565b6040519081526020015b60405180910390f35b610169610164366004611331565b61038a565b604051901515815260200161014d565b61018c61018736600461134e565b61039b565b60405161014d91906113c3565b6101436101a736600461134e565b6000908152600160208190526040909120015490565b6101d06101cb366004611522565b61042f565b005b6101d06101e03660046115cc565b6104cb565b6101d06101f33660046115cc565b6104f7565b6101437fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa481565b61023261022d3660046115f8565b610575565b60405161014d91906116fe565b6101d061024d366004611711565b61069f565b6005546040516001600160a01b03909116815260200161014d565b6101d061027b366004611766565b610732565b61016961028e3660046115cc565b610800565b6101d06102a13660046117ab565b61082b565b610143600081565b6101d06102bc3660046117e8565b610840565b6101d06102cf366004611824565b610859565b6101d06102e23660046115cc565b610888565b6101696102f536600461183f565b6108af565b6101d0610308366004611869565b6108ca565b60055460405163461e4f1960e11b8152600481018390526001600160a01b0384811660248301526000921690638c3c9e3290604401602060405180830381865afa15801561035f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038391906118ce565b9392505050565b600061039582610960565b92915050565b6060600480546103aa906118e7565b80601f01602080910402602001604051908101604052809291908181526020018280546103d6906118e7565b80156104235780601f106103f857610100808354040283529160200191610423565b820191906000526020600020905b81548152906001019060200180831161040657829003601f168201915b50505050509050919050565b6001600160a01b03851633148061044b575061044b85336108af565b6104b75760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084015b60405180910390fd5b6104c485858585856109a0565b5050505050565b600082815260016020819052604090912001546104e88133610b8e565b6104f28383610bf2565b505050565b6001600160a01b03811633146105675760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016104ae565b6105718282610c5d565b5050565b606081518351146105da5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016104ae565b6000835167ffffffffffffffff8111156105f6576105f66113d6565b60405190808252806020026020018201604052801561061f578160200160208202803683370190505b50905060005b84518110156106975761066a85828151811061064357610643611921565b602002602001015185838151811061065d5761065d611921565b602002602001015161030d565b82828151811061067c5761067c611921565b60209081029190910101526106908161194d565b9050610625565b509392505050565b7fe6cd5415a09470f57cb652d653ef635ecd9a997fef2537decaf18eb7545b7fa46106ca8133610b8e565b836001600160a01b0316856001600160a01b0316876001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628686604051610722929190918252602082015260400190565b60405180910390a4505050505050565b600054610100900460ff1661074d5760005460ff1615610751565b303b155b6107b45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016104ae565b600054610100900460ff161580156107d6576000805461ffff19166101011790555b6107df83610cc4565b6107ea600083610bf2565b80156104f2576000805461ff0019169055505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60006108378133610b8e565b61057182610cc4565b6040516309a711b960e31b815260040160405180910390fd5b60006108658133610b8e565b50600580546001600160a01b0319166001600160a01b0392909216919091179055565b600082815260016020819052604090912001546108a58133610b8e565b6104f28383610c5d565b60006040516309a711b960e31b815260040160405180910390fd5b6001600160a01b0385163314806108e657506108e685336108af565b6109445760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016104ae565b6104c48585858585610cd7565b6001600160a01b03163b151590565b60006001600160e01b03198216636cdb3d1360e11b148061099157506001600160e01b031982166303a24d0760e21b145b80610395575061039582610e07565b8151835114610a025760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016104ae565b6001600160a01b038416610a285760405162461bcd60e51b81526004016104ae90611966565b33610a37818787878787610840565b60005b8451811015610b20576000858281518110610a5757610a57611921565b602002602001015190506000858381518110610a7557610a75611921565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015610ac65760405162461bcd60e51b81526004016104ae906119ab565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610b059084906119f5565b9250508190555050505080610b199061194d565b9050610a3a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610b70929190611a0d565b60405180910390a4610b86818787878787610e3c565b505050505050565b610b988282610800565b61057157610bb0816001600160a01b03166014610f97565b610bbb836020610f97565b604051602001610bcc929190611a3b565b60408051601f198184030181529082905262461bcd60e51b82526104ae916004016113c3565b610bfc8282610800565b6105715760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b610c678282610800565b156105715760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8051610571906004906020840190611239565b6001600160a01b038416610cfd5760405162461bcd60e51b81526004016104ae90611966565b33610d1c818787610d0d88611133565b610d1688611133565b87610840565b60008481526002602090815260408083206001600160a01b038a16845290915290205483811015610d5f5760405162461bcd60e51b81526004016104ae906119ab565b60008581526002602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290610d9e9084906119f5565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610dfe82888888888861117e565b50505050505050565b60006001600160e01b03198216637965db0b60e01b148061039557506301ffc9a760e01b6001600160e01b0319831614610395565b6001600160a01b0384163b15610b865760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190610e809089908990889088908890600401611ab0565b6020604051808303816000875af1925050508015610ebb575060408051601f3d908101601f19168201909252610eb891810190611b0e565b60015b610f6757610ec7611b2b565b806308c379a003610f005750610edb611b47565b80610ee65750610f02565b8060405162461bcd60e51b81526004016104ae91906113c3565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016104ae565b6001600160e01b0319811663bc197c8160e01b14610dfe5760405162461bcd60e51b81526004016104ae90611bd1565b60606000610fa6836002611c19565b610fb19060026119f5565b67ffffffffffffffff811115610fc957610fc96113d6565b6040519080825280601f01601f191660200182016040528015610ff3576020820181803683370190505b509050600360fc1b8160008151811061100e5761100e611921565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061103d5761103d611921565b60200101906001600160f81b031916908160001a9053506000611061846002611c19565b61106c9060016119f5565b90505b60018111156110e4576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106110a0576110a0611921565b1a60f81b8282815181106110b6576110b6611921565b60200101906001600160f81b031916908160001a90535060049490941c936110dd81611c38565b905061106f565b5083156103835760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104ae565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061116d5761116d611921565b602090810291909101015292915050565b6001600160a01b0384163b15610b865760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906111c29089908990889088908890600401611c4f565b6020604051808303816000875af19250505080156111fd575060408051601f3d908101601f191682019092526111fa91810190611b0e565b60015b61120957610ec7611b2b565b6001600160e01b0319811663f23a6e6160e01b14610dfe5760405162461bcd60e51b81526004016104ae90611bd1565b828054611245906118e7565b90600052602060002090601f01602090048101928261126757600085556112ad565b82601f1061128057805160ff19168380011785556112ad565b828001600101855582156112ad579182015b828111156112ad578251825591602001919060010190611292565b506112b99291506112bd565b5090565b5b808211156112b957600081556001016112be565b80356001600160a01b03811681146112e957600080fd5b919050565b6000806040838503121561130157600080fd5b61130a836112d2565b946020939093013593505050565b6001600160e01b03198116811461132e57600080fd5b50565b60006020828403121561134357600080fd5b813561038381611318565b60006020828403121561136057600080fd5b5035919050565b60005b8381101561138257818101518382015260200161136a565b83811115611391576000848401525b50505050565b600081518084526113af816020860160208601611367565b601f01601f19169290920160200192915050565b6020815260006103836020830184611397565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715611412576114126113d6565b6040525050565b600067ffffffffffffffff821115611433576114336113d6565b5060051b60200190565b600082601f83011261144e57600080fd5b8135602061145b82611419565b60405161146882826113ec565b83815260059390931b850182019282810191508684111561148857600080fd5b8286015b848110156114a3578035835291830191830161148c565b509695505050505050565b600082601f8301126114bf57600080fd5b813567ffffffffffffffff8111156114d9576114d96113d6565b6040516114f0601f8301601f1916602001826113ec565b81815284602083860101111561150557600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a0868803121561153a57600080fd5b611543866112d2565b9450611551602087016112d2565b9350604086013567ffffffffffffffff8082111561156e57600080fd5b61157a89838a0161143d565b9450606088013591508082111561159057600080fd5b61159c89838a0161143d565b935060808801359150808211156115b257600080fd5b506115bf888289016114ae565b9150509295509295909350565b600080604083850312156115df57600080fd5b823591506115ef602084016112d2565b90509250929050565b6000806040838503121561160b57600080fd5b823567ffffffffffffffff8082111561162357600080fd5b818501915085601f83011261163757600080fd5b8135602061164482611419565b60405161165182826113ec565b83815260059390931b850182019282810191508984111561167157600080fd5b948201945b8386101561169657611687866112d2565b82529482019490820190611676565b965050860135925050808211156116ac57600080fd5b506116b98582860161143d565b9150509250929050565b600081518084526020808501945080840160005b838110156116f3578151875295820195908201906001016116d7565b509495945050505050565b60208152600061038360208301846116c3565b600080600080600060a0868803121561172957600080fd5b611732866112d2565b9450611740602087016112d2565b935061174e604087016112d2565b94979396509394606081013594506080013592915050565b6000806040838503121561177957600080fd5b823567ffffffffffffffff81111561179057600080fd5b61179c858286016114ae565b9250506115ef602084016112d2565b6000602082840312156117bd57600080fd5b813567ffffffffffffffff8111156117d457600080fd5b6117e0848285016114ae565b949350505050565b600080604083850312156117fb57600080fd5b611804836112d2565b91506020830135801515811461181957600080fd5b809150509250929050565b60006020828403121561183657600080fd5b610383826112d2565b6000806040838503121561185257600080fd5b61185b836112d2565b91506115ef602084016112d2565b600080600080600060a0868803121561188157600080fd5b61188a866112d2565b9450611898602087016112d2565b93506040860135925060608601359150608086013567ffffffffffffffff8111156118c257600080fd5b6115bf888289016114ae565b6000602082840312156118e057600080fd5b5051919050565b600181811c908216806118fb57607f821691505b60208210810361191b57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161195f5761195f611937565b5060010190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60008219821115611a0857611a08611937565b500190565b604081526000611a2060408301856116c3565b8281036020840152611a3281856116c3565b95945050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611a73816017850160208801611367565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611aa4816028840160208801611367565b01602801949350505050565b6001600160a01b0386811682528516602082015260a060408201819052600090611adc908301866116c3565b8281036060840152611aee81866116c3565b90508281036080840152611b028185611397565b98975050505050505050565b600060208284031215611b2057600080fd5b815161038381611318565b600060033d1115611b445760046000803e5060005160e01c5b90565b600060443d1015611b555790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611b8557505050505090565b8285019150815181811115611b9d5750505050505090565b843d8701016020828501011115611bb75750505050505090565b611bc6602082860101876113ec565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6000816000190483118215151615611c3357611c33611937565b500290565b600081611c4757611c47611937565b506000190190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611c8990830184611397565b97965050505050505056fea26469706673582212207baaa3a761f1daf84910213f1b2412ab790a7693d59dad05f0ac9bc001378df664736f6c634300080e0033", - "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": "Reverts, this is a non transferable ERC115 contract" - }, - "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": "Reverts, this is a non transferable ERC115 contract" - }, - "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": 10686, - "contract": "contracts/core/Badges.sol:Badges", - "label": "_attestationsRegistry", - "offset": 0, - "slot": "5", - "type": "t_contract(IAttestationsRegistry)11406" - } - ], - "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)11406": { - "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/CommitmentMapperRegistry.json b/deployments/mumbai/CommitmentMapperRegistry.json index 85f4eca..f9c2d45 100644 --- a/deployments/mumbai/CommitmentMapperRegistry.json +++ b/deployments/mumbai/CommitmentMapperRegistry.json @@ -33,6 +33,19 @@ "name": "PubKeyNotValid", "type": "error" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -78,6 +91,19 @@ "name": "UpdatedCommitmentMapperEdDSAPubKey", "type": "event" }, + { + "inputs": [], + "name": "IMPLEMENTATION_VERSION", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "getAddress", @@ -108,7 +134,7 @@ "inputs": [ { "internalType": "address", - "name": "owner", + "name": "ownerAddress", "type": "address" }, { @@ -187,103 +213,115 @@ "type": "function" } ], - "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "transactionHash": "0xf3eba93abc7d8f2daa265d0f13551306b343444c3a53762c6edc78a0d1878ce0", "receipt": { "to": null, "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", - "transactionIndex": 35, - "gasUsed": "521898", - "logsBloom": "0x00000000000000020000002000000000000000000000000000800000000000000000000000000000000000000000000000008000000000000000000004000000000000000000008000000000000400800001000000000000000100000000000000000000020000000000000000000800000000000000000084000010000000400000000000000000000000000000000000000010000000000000000000008000200000000000000020000000000000000001000000000000000000000000004000000004000000080001000000000000000000000000000000100000000020000000100000000000000000000000000000000000000000000020000000100000", - "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5", - "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "contractAddress": "0x542930ff08acEe13a54c0F46F32890d9B7f2E4A2", + "transactionIndex": 14, + "gasUsed": "520392", + "logsBloom": "0x00000000000000000000000000020000000000000000000000800000000000000000000000000000000000000000000000008000000000000000000004000000000000000000008002000010000400800801000000000000000100000000004000000000020000000000000000000800002000000000000084000000000000400000000000000000000000000000000000000010000080000000000000008000200000000000000000000000800400000000000000000000000000000000004000000004000000000001000000040000000000000000000000100040000020000000100000000000000000000000000000000000000000000020000000100000", + "blockHash": "0xc6b9da4b24eb2020ed01fd996150d75046257832efe3f20c881d5855cc25373a", + "transactionHash": "0xf3eba93abc7d8f2daa265d0f13551306b343444c3a53762c6edc78a0d1878ce0", "logs": [ { - "transactionIndex": 35, - "blockNumber": 28600020, - "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", - "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "transactionIndex": 14, + "blockNumber": 29540743, + "transactionHash": "0xf3eba93abc7d8f2daa265d0f13551306b343444c3a53762c6edc78a0d1878ce0", + "address": "0x542930ff08acEe13a54c0F46F32890d9B7f2E4A2", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" ], "data": "0x", - "logIndex": 165, - "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + "logIndex": 70, + "blockHash": "0xc6b9da4b24eb2020ed01fd996150d75046257832efe3f20c881d5855cc25373a" }, { - "transactionIndex": 35, - "blockNumber": 28600020, - "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", - "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "transactionIndex": 14, + "blockNumber": 29540743, + "transactionHash": "0xf3eba93abc7d8f2daa265d0f13551306b343444c3a53762c6edc78a0d1878ce0", + "address": "0x542930ff08acEe13a54c0F46F32890d9B7f2E4A2", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + "0x0000000000000000000000004e070e9b85a659f0b7b47cde33152ad6c2f63954" ], "data": "0x", - "logIndex": 166, - "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + "logIndex": 71, + "blockHash": "0xc6b9da4b24eb2020ed01fd996150d75046257832efe3f20c881d5855cc25373a" }, { - "transactionIndex": 35, - "blockNumber": 28600020, - "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", - "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "transactionIndex": 14, + "blockNumber": 29540743, + "transactionHash": "0xf3eba93abc7d8f2daa265d0f13551306b343444c3a53762c6edc78a0d1878ce0", + "address": "0x542930ff08acEe13a54c0F46F32890d9B7f2E4A2", "topics": [ "0x9d99ec80e15298d9dae698493e9c61daaae3977b0f131ded44fc6b0f7766ab15" ], "data": "0x1e468ad0fcde4edec429cd41eb28a0e78d4f31fa2c25172ef677468b2b38a9dc2b6e9a8e3b8ed419cca51e2e2ee7ae07d2902454deca17d7da7b00ae4a798add", - "logIndex": 167, - "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + "logIndex": 72, + "blockHash": "0xc6b9da4b24eb2020ed01fd996150d75046257832efe3f20c881d5855cc25373a" }, { - "transactionIndex": 35, - "blockNumber": 28600020, - "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", - "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "transactionIndex": 14, + "blockNumber": 29540743, + "transactionHash": "0xf3eba93abc7d8f2daa265d0f13551306b343444c3a53762c6edc78a0d1878ce0", + "address": "0x542930ff08acEe13a54c0F46F32890d9B7f2E4A2", "topics": [ "0xa37a473be736ea014730a555941f412164222d9d1b07f5a0a61932a1b3c3f2f4" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 168, - "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + "logIndex": 73, + "blockHash": "0xc6b9da4b24eb2020ed01fd996150d75046257832efe3f20c881d5855cc25373a" }, { - "transactionIndex": 35, - "blockNumber": 28600020, - "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "transactionIndex": 14, + "blockNumber": 29540743, + "transactionHash": "0xf3eba93abc7d8f2daa265d0f13551306b343444c3a53762c6edc78a0d1878ce0", + "address": "0x542930ff08acEe13a54c0F46F32890d9B7f2E4A2", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 74, + "blockHash": "0xc6b9da4b24eb2020ed01fd996150d75046257832efe3f20c881d5855cc25373a" + }, + { + "transactionIndex": 14, + "blockNumber": 29540743, + "transactionHash": "0xf3eba93abc7d8f2daa265d0f13551306b343444c3a53762c6edc78a0d1878ce0", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", "0x0000000000000000000000000000000000000000000000000000000000001010", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + "0x000000000000000000000000be188d6641e8b680743a4815dfa0f6208038960f" ], - "data": "0x00000000000000000000000000000000000000000000000000058d4aa2dbb57c00000000000000000000000000000000000000000000000085e8bdd5fc99fc5f00000000000000000000000000000000000000000000167a284071f4cc356e2700000000000000000000000000000000000000000000000085e3308b59be46e300000000000000000000000000000000000000000000167a2845ff3f6f1123a3", - "logIndex": 169, - "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + "data": "0x00000000000000000000000000000000000000000000000000025d1c42f841380000000000000000000000000000000000000000000000007c94dbc2373dffa400000000000000000000000000000000000000000000280a3a35dd50f9a0c3ba0000000000000000000000000000000000000000000000007c927ea5f445be6c00000000000000000000000000000000000000000000280a3a383a6d3c9904f2", + "logIndex": 75, + "blockHash": "0xc6b9da4b24eb2020ed01fd996150d75046257832efe3f20c881d5855cc25373a" } ], - "blockNumber": 28600020, - "cumulativeGasUsed": "6296149", + "blockNumber": 29540743, + "cumulativeGasUsed": "3150337", "status": 1, "byzantium": true }, "args": [ - "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "0x4e070E9b85a659F0B7B47cde33152ad6c2F63954", [ "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", + "numDeployments": 3, + "solcInputHash": "6edb98fea2bf424a369954d0e80655f6", + "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\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\":\"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\":\"IMPLEMENTATION_VERSION\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":\"ownerAddress\",\"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\",\"ownerAddress\":\"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\":{\"initialize(address,uint256[2],address)\":{\"notice\":\"The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\"}},\"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 (last updated v4.7.0) (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 Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\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 the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\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\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xcee5467d5d873fb75dae6f98c01a8d25dd609f9d0374c7d39217bd5f9539a2d6\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, \\\"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 (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or 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 _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\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 /// @solidity memory-safe-assembly\\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\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"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 uint8 public constant IMPLEMENTATION_VERSION = 2;\\n\\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 ownerAddress 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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\n */\\n function initialize(\\n address ownerAddress,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) public reinitializer(IMPLEMENTATION_VERSION) {\\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\\n if (owner() == address(0) || address(this).code.length == 0) {\\n _transferOwnership(ownerAddress);\\n _updateCommitmentMapperEdDSAPubKey(commitmentMapperEdDSAPubKey);\\n _updateCommitmentMapperAddress(commitmentMapperAddress);\\n }\\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\":\"0x1b6ab7a4ba266f3da2c7f6ba3de93e3ab89f389dbd6db14514b43cbdcbe9fe09\",\"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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\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\":\"0xcb419cf389baad6f38de28625718f64f551d2669339c1b4e1887e11d62484469\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000abe38038062000abe833981016040819052620000349162000313565b6200003f3362000055565b6200004c838383620000b0565b505050620003ef565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054600290610100900460ff16158015620000d3575060005460ff8083169116105b6200013b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805461ffff191660ff831617610100178155620001686000546201000090046001600160a01b031690565b6001600160a01b031614806200017d5750303b155b15620001a4576200018e8462000055565b6200019983620001eb565b620001a48262000237565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b620001fa600182600262000286565b507f9d99ec80e15298d9dae698493e9c61daaae3977b0f131ded44fc6b0f7766ab15816040516200022c9190620003bc565b60405180910390a150565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fa37a473be736ea014730a555941f412164222d9d1b07f5a0a61932a1b3c3f2f4906020016200022c565b8260028101928215620002b7579160200282015b82811115620002b75782518255916020019190600101906200029a565b50620002c5929150620002c9565b5090565b5b80821115620002c55760008155600101620002ca565b80516001600160a01b0381168114620002f857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806000608084860312156200032957600080fd5b6200033484620002e0565b9250602085603f8601126200034857600080fd5b604080519081016001600160401b03811182821017156200036d576200036d620002fd565b6040528060608701888111156200038357600080fd5b8388015b81811015620003a0578051835291840191840162000387565b50829550620003af81620002e0565b9450505050509250925092565b60408101818360005b6002811015620003e6578151835260209283019290910190600101620003c5565b50505092915050565b6106bf80620003ff6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063727b2d5c11610066578063727b2d5c146100f4578063754b377c1461010757806378cf75d7146101215780638da5cb5b14610134578063f2fde38b1461014b57600080fd5b806338cc48311461009857806359a80d0d146100c25780637098a5f4146100d7578063715018a6146100ec575b600080fd5b6003546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b6100ca61015e565b6040516100b9919061053c565b6100ea6100e53660046105eb565b610198565b005b6100ea6101ac565b6100ea61010236600461062a565b6101c0565b61010f600281565b60405160ff90911681526020016100b9565b6100ea61012f366004610645565b6101d1565b6000546201000090046001600160a01b03166100a5565b6100ea61015936600461062a565b610303565b6101666104cb565b60408051808201918290529060019060029082845b81548152602001906001019080831161017b575050505050905090565b6101a0610379565b6101a9816103da565b50565b6101b4610379565b6101be6000610422565b565b6101c8610379565b6101a98161047d565b600054600290610100900460ff161580156101f3575060005460ff8083169116105b61025b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805461ffff191660ff8316176101001781556102886000546001600160a01b03620100009091041690565b6001600160a01b0316148061029c5750303b155b156102bc576102aa84610422565b6102b3836103da565b6102bc8261047d565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b61030b610379565b6001600160a01b0381166103705760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610252565b6101a981610422565b6000546001600160a01b03620100009091041633146101be5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610252565b6103e760018260026104e9565b507f9d99ec80e15298d9dae698493e9c61daaae3977b0f131ded44fc6b0f7766ab1581604051610417919061053c565b60405180910390a150565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fa37a473be736ea014730a555941f412164222d9d1b07f5a0a61932a1b3c3f2f490602001610417565b60405180604001604052806002906020820280368337509192915050565b8260028101928215610517579160200282015b828111156105175782518255916020019190600101906104fc565b50610523929150610527565b5090565b5b808211156105235760008155600101610528565b60408101818360005b6002811015610564578151835260209283019290910190600101610545565b50505092915050565b600082601f83011261057e57600080fd5b6040516040810181811067ffffffffffffffff821117156105af57634e487b7160e01b600052604160045260246000fd5b80604052508060408401858111156105c657600080fd5b845b818110156105e05780358352602092830192016105c8565b509195945050505050565b6000604082840312156105fd57600080fd5b610607838361056d565b9392505050565b80356001600160a01b038116811461062557600080fd5b919050565b60006020828403121561063c57600080fd5b6106078261060e565b60008060006080848603121561065a57600080fd5b6106638461060e565b9250610672856020860161056d565b91506106806060850161060e565b9050925092509256fea2646970667358221220d4b69e1f79868deff972c669c62c01ccfa63a6b030214293debea10ed567f04f64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063727b2d5c11610066578063727b2d5c146100f4578063754b377c1461010757806378cf75d7146101215780638da5cb5b14610134578063f2fde38b1461014b57600080fd5b806338cc48311461009857806359a80d0d146100c25780637098a5f4146100d7578063715018a6146100ec575b600080fd5b6003546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b6100ca61015e565b6040516100b9919061053c565b6100ea6100e53660046105eb565b610198565b005b6100ea6101ac565b6100ea61010236600461062a565b6101c0565b61010f600281565b60405160ff90911681526020016100b9565b6100ea61012f366004610645565b6101d1565b6000546201000090046001600160a01b03166100a5565b6100ea61015936600461062a565b610303565b6101666104cb565b60408051808201918290529060019060029082845b81548152602001906001019080831161017b575050505050905090565b6101a0610379565b6101a9816103da565b50565b6101b4610379565b6101be6000610422565b565b6101c8610379565b6101a98161047d565b600054600290610100900460ff161580156101f3575060005460ff8083169116105b61025b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805461ffff191660ff8316176101001781556102886000546001600160a01b03620100009091041690565b6001600160a01b0316148061029c5750303b155b156102bc576102aa84610422565b6102b3836103da565b6102bc8261047d565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b61030b610379565b6001600160a01b0381166103705760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610252565b6101a981610422565b6000546001600160a01b03620100009091041633146101be5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610252565b6103e760018260026104e9565b507f9d99ec80e15298d9dae698493e9c61daaae3977b0f131ded44fc6b0f7766ab1581604051610417919061053c565b60405180910390a150565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fa37a473be736ea014730a555941f412164222d9d1b07f5a0a61932a1b3c3f2f490602001610417565b60405180604001604052806002906020820280368337509192915050565b8260028101928215610517579160200282015b828111156105175782518255916020019190600101906104fc565b50610523929150610527565b5090565b5b808211156105235760008155600101610528565b60408101818360005b6002811015610564578151835260209283019290910190600101610545565b50505092915050565b600082601f83011261057e57600080fd5b6040516040810181811067ffffffffffffffff821117156105af57634e487b7160e01b600052604160045260246000fd5b80604052508060408401858111156105c657600080fd5b845b818110156105e05780358352602092830192016105c8565b509195945050505050565b6000604082840312156105fd57600080fd5b610607838361056d565b9392505050565b80356001600160a01b038116811461062557600080fd5b919050565b60006020828403121561063c57600080fd5b6106078261060e565b60008060006080848603121561065a57600080fd5b6106638461060e565b9250610672856020860161056d565b91506106806060850161060e565b9050925092509256fea2646970667358221220d4b69e1f79868deff972c669c62c01ccfa63a6b030214293debea10ed567f04f64736f6c634300080e0033", "devdoc": { "author": "Sismo", "kind": "dev", @@ -307,7 +345,7 @@ "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" + "ownerAddress": "Owner of the contract, can update public key and address" } }, "owner()": { @@ -337,22 +375,26 @@ }, "userdoc": { "kind": "user", - "methods": {}, + "methods": { + "initialize(address,uint256[2],address)": { + "notice": "The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization." + } + }, "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, + "astId": 935, "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", "label": "_initialized", "offset": 0, "slot": "0", - "type": "t_bool" + "type": "t_uint8" }, { - "astId": 939, + "astId": 938, "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", "label": "_initializing", "offset": 1, @@ -360,7 +402,7 @@ "type": "t_bool" }, { - "astId": 389, + "astId": 396, "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", "label": "_owner", "offset": 2, @@ -368,7 +410,7 @@ "type": "t_address" }, { - "astId": 12869, + "astId": 15766, "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", "label": "_commitmentMapperPubKey", "offset": 0, @@ -376,7 +418,7 @@ "type": "t_array(t_uint256)2_storage" }, { - "astId": 12871, + "astId": 15768, "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", "label": "_commitmentMapperAddress", "offset": 0, @@ -405,6 +447,11 @@ "encoding": "inplace", "label": "uint256", "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" } } } diff --git a/deployments/mumbai/CommitmentMapperRegistryImplem.json b/deployments/mumbai/CommitmentMapperRegistryImplem.json index 1eb43ea..2aec9ba 100644 --- a/deployments/mumbai/CommitmentMapperRegistryImplem.json +++ b/deployments/mumbai/CommitmentMapperRegistryImplem.json @@ -1,5 +1,5 @@ { - "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "address": "0x542930ff08acEe13a54c0F46F32890d9B7f2E4A2", "abi": [ { "inputs": [ @@ -33,6 +33,19 @@ "name": "PubKeyNotValid", "type": "error" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -78,6 +91,19 @@ "name": "UpdatedCommitmentMapperEdDSAPubKey", "type": "event" }, + { + "inputs": [], + "name": "IMPLEMENTATION_VERSION", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "getAddress", @@ -108,7 +134,7 @@ "inputs": [ { "internalType": "address", - "name": "owner", + "name": "ownerAddress", "type": "address" }, { @@ -187,103 +213,115 @@ "type": "function" } ], - "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "transactionHash": "0xf3eba93abc7d8f2daa265d0f13551306b343444c3a53762c6edc78a0d1878ce0", "receipt": { "to": null, "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", - "transactionIndex": 35, - "gasUsed": "521898", - "logsBloom": "0x00000000000000020000002000000000000000000000000000800000000000000000000000000000000000000000000000008000000000000000000004000000000000000000008000000000000400800001000000000000000100000000000000000000020000000000000000000800000000000000000084000010000000400000000000000000000000000000000000000010000000000000000000008000200000000000000020000000000000000001000000000000000000000000004000000004000000080001000000000000000000000000000000100000000020000000100000000000000000000000000000000000000000000020000000100000", - "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5", - "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "contractAddress": "0x542930ff08acEe13a54c0F46F32890d9B7f2E4A2", + "transactionIndex": 14, + "gasUsed": "520392", + "logsBloom": "0x00000000000000000000000000020000000000000000000000800000000000000000000000000000000000000000000000008000000000000000000004000000000000000000008002000010000400800801000000000000000100000000004000000000020000000000000000000800002000000000000084000000000000400000000000000000000000000000000000000010000080000000000000008000200000000000000000000000800400000000000000000000000000000000004000000004000000000001000000040000000000000000000000100040000020000000100000000000000000000000000000000000000000000020000000100000", + "blockHash": "0xc6b9da4b24eb2020ed01fd996150d75046257832efe3f20c881d5855cc25373a", + "transactionHash": "0xf3eba93abc7d8f2daa265d0f13551306b343444c3a53762c6edc78a0d1878ce0", "logs": [ { - "transactionIndex": 35, - "blockNumber": 28600020, - "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", - "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "transactionIndex": 14, + "blockNumber": 29540743, + "transactionHash": "0xf3eba93abc7d8f2daa265d0f13551306b343444c3a53762c6edc78a0d1878ce0", + "address": "0x542930ff08acEe13a54c0F46F32890d9B7f2E4A2", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" ], "data": "0x", - "logIndex": 165, - "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + "logIndex": 70, + "blockHash": "0xc6b9da4b24eb2020ed01fd996150d75046257832efe3f20c881d5855cc25373a" }, { - "transactionIndex": 35, - "blockNumber": 28600020, - "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", - "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "transactionIndex": 14, + "blockNumber": 29540743, + "transactionHash": "0xf3eba93abc7d8f2daa265d0f13551306b343444c3a53762c6edc78a0d1878ce0", + "address": "0x542930ff08acEe13a54c0F46F32890d9B7f2E4A2", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + "0x0000000000000000000000004e070e9b85a659f0b7b47cde33152ad6c2f63954" ], "data": "0x", - "logIndex": 166, - "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + "logIndex": 71, + "blockHash": "0xc6b9da4b24eb2020ed01fd996150d75046257832efe3f20c881d5855cc25373a" }, { - "transactionIndex": 35, - "blockNumber": 28600020, - "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", - "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "transactionIndex": 14, + "blockNumber": 29540743, + "transactionHash": "0xf3eba93abc7d8f2daa265d0f13551306b343444c3a53762c6edc78a0d1878ce0", + "address": "0x542930ff08acEe13a54c0F46F32890d9B7f2E4A2", "topics": [ "0x9d99ec80e15298d9dae698493e9c61daaae3977b0f131ded44fc6b0f7766ab15" ], "data": "0x1e468ad0fcde4edec429cd41eb28a0e78d4f31fa2c25172ef677468b2b38a9dc2b6e9a8e3b8ed419cca51e2e2ee7ae07d2902454deca17d7da7b00ae4a798add", - "logIndex": 167, - "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + "logIndex": 72, + "blockHash": "0xc6b9da4b24eb2020ed01fd996150d75046257832efe3f20c881d5855cc25373a" }, { - "transactionIndex": 35, - "blockNumber": 28600020, - "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", - "address": "0x8C1E3E8B767369Cb9C173dBC66E441CFEF37283c", + "transactionIndex": 14, + "blockNumber": 29540743, + "transactionHash": "0xf3eba93abc7d8f2daa265d0f13551306b343444c3a53762c6edc78a0d1878ce0", + "address": "0x542930ff08acEe13a54c0F46F32890d9B7f2E4A2", "topics": [ "0xa37a473be736ea014730a555941f412164222d9d1b07f5a0a61932a1b3c3f2f4" ], "data": "0x0000000000000000000000000000000000000000000000000000000000000000", - "logIndex": 168, - "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + "logIndex": 73, + "blockHash": "0xc6b9da4b24eb2020ed01fd996150d75046257832efe3f20c881d5855cc25373a" }, { - "transactionIndex": 35, - "blockNumber": 28600020, - "transactionHash": "0xda03b5be9ec00c71991010922468449b33c4523d192ac84afef1e330281562a5", + "transactionIndex": 14, + "blockNumber": 29540743, + "transactionHash": "0xf3eba93abc7d8f2daa265d0f13551306b343444c3a53762c6edc78a0d1878ce0", + "address": "0x542930ff08acEe13a54c0F46F32890d9B7f2E4A2", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000002", + "logIndex": 74, + "blockHash": "0xc6b9da4b24eb2020ed01fd996150d75046257832efe3f20c881d5855cc25373a" + }, + { + "transactionIndex": 14, + "blockNumber": 29540743, + "transactionHash": "0xf3eba93abc7d8f2daa265d0f13551306b343444c3a53762c6edc78a0d1878ce0", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", "0x0000000000000000000000000000000000000000000000000000000000001010", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" + "0x000000000000000000000000be188d6641e8b680743a4815dfa0f6208038960f" ], - "data": "0x00000000000000000000000000000000000000000000000000058d4aa2dbb57c00000000000000000000000000000000000000000000000085e8bdd5fc99fc5f00000000000000000000000000000000000000000000167a284071f4cc356e2700000000000000000000000000000000000000000000000085e3308b59be46e300000000000000000000000000000000000000000000167a2845ff3f6f1123a3", - "logIndex": 169, - "blockHash": "0x10569be68f2687af05f6e81980aa2ecd4e4d2b597397b226ba3b4790f32994c5" + "data": "0x00000000000000000000000000000000000000000000000000025d1c42f841380000000000000000000000000000000000000000000000007c94dbc2373dffa400000000000000000000000000000000000000000000280a3a35dd50f9a0c3ba0000000000000000000000000000000000000000000000007c927ea5f445be6c00000000000000000000000000000000000000000000280a3a383a6d3c9904f2", + "logIndex": 75, + "blockHash": "0xc6b9da4b24eb2020ed01fd996150d75046257832efe3f20c881d5855cc25373a" } ], - "blockNumber": 28600020, - "cumulativeGasUsed": "6296149", + "blockNumber": 29540743, + "cumulativeGasUsed": "3150337", "status": 1, "byzantium": true }, "args": [ - "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "0x4e070E9b85a659F0B7B47cde33152ad6c2F63954", [ "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", + "numDeployments": 2, + "solcInputHash": "6edb98fea2bf424a369954d0e80655f6", + "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\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\":\"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\":\"IMPLEMENTATION_VERSION\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"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\":\"ownerAddress\",\"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\",\"ownerAddress\":\"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\":{\"initialize(address,uint256[2],address)\":{\"notice\":\"The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\"}},\"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 (last updated v4.7.0) (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 Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\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 the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\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\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xcee5467d5d873fb75dae6f98c01a8d25dd609f9d0374c7d39217bd5f9539a2d6\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, \\\"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 (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or 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 _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\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 /// @solidity memory-safe-assembly\\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\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"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 uint8 public constant IMPLEMENTATION_VERSION = 2;\\n\\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 ownerAddress 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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\n */\\n function initialize(\\n address ownerAddress,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) public reinitializer(IMPLEMENTATION_VERSION) {\\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\\n if (owner() == address(0) || address(this).code.length == 0) {\\n _transferOwnership(ownerAddress);\\n _updateCommitmentMapperEdDSAPubKey(commitmentMapperEdDSAPubKey);\\n _updateCommitmentMapperAddress(commitmentMapperAddress);\\n }\\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\":\"0x1b6ab7a4ba266f3da2c7f6ba3de93e3ab89f389dbd6db14514b43cbdcbe9fe09\",\"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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\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\":\"0xcb419cf389baad6f38de28625718f64f551d2669339c1b4e1887e11d62484469\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b5060405162000abe38038062000abe833981016040819052620000349162000313565b6200003f3362000055565b6200004c838383620000b0565b505050620003ef565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054600290610100900460ff16158015620000d3575060005460ff8083169116105b6200013b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805461ffff191660ff831617610100178155620001686000546201000090046001600160a01b031690565b6001600160a01b031614806200017d5750303b155b15620001a4576200018e8462000055565b6200019983620001eb565b620001a48262000237565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b620001fa600182600262000286565b507f9d99ec80e15298d9dae698493e9c61daaae3977b0f131ded44fc6b0f7766ab15816040516200022c9190620003bc565b60405180910390a150565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fa37a473be736ea014730a555941f412164222d9d1b07f5a0a61932a1b3c3f2f4906020016200022c565b8260028101928215620002b7579160200282015b82811115620002b75782518255916020019190600101906200029a565b50620002c5929150620002c9565b5090565b5b80821115620002c55760008155600101620002ca565b80516001600160a01b0381168114620002f857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806000608084860312156200032957600080fd5b6200033484620002e0565b9250602085603f8601126200034857600080fd5b604080519081016001600160401b03811182821017156200036d576200036d620002fd565b6040528060608701888111156200038357600080fd5b8388015b81811015620003a0578051835291840191840162000387565b50829550620003af81620002e0565b9450505050509250925092565b60408101818360005b6002811015620003e6578151835260209283019290910190600101620003c5565b50505092915050565b6106bf80620003ff6000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063727b2d5c11610066578063727b2d5c146100f4578063754b377c1461010757806378cf75d7146101215780638da5cb5b14610134578063f2fde38b1461014b57600080fd5b806338cc48311461009857806359a80d0d146100c25780637098a5f4146100d7578063715018a6146100ec575b600080fd5b6003546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b6100ca61015e565b6040516100b9919061053c565b6100ea6100e53660046105eb565b610198565b005b6100ea6101ac565b6100ea61010236600461062a565b6101c0565b61010f600281565b60405160ff90911681526020016100b9565b6100ea61012f366004610645565b6101d1565b6000546201000090046001600160a01b03166100a5565b6100ea61015936600461062a565b610303565b6101666104cb565b60408051808201918290529060019060029082845b81548152602001906001019080831161017b575050505050905090565b6101a0610379565b6101a9816103da565b50565b6101b4610379565b6101be6000610422565b565b6101c8610379565b6101a98161047d565b600054600290610100900460ff161580156101f3575060005460ff8083169116105b61025b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805461ffff191660ff8316176101001781556102886000546001600160a01b03620100009091041690565b6001600160a01b0316148061029c5750303b155b156102bc576102aa84610422565b6102b3836103da565b6102bc8261047d565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b61030b610379565b6001600160a01b0381166103705760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610252565b6101a981610422565b6000546001600160a01b03620100009091041633146101be5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610252565b6103e760018260026104e9565b507f9d99ec80e15298d9dae698493e9c61daaae3977b0f131ded44fc6b0f7766ab1581604051610417919061053c565b60405180910390a150565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fa37a473be736ea014730a555941f412164222d9d1b07f5a0a61932a1b3c3f2f490602001610417565b60405180604001604052806002906020820280368337509192915050565b8260028101928215610517579160200282015b828111156105175782518255916020019190600101906104fc565b50610523929150610527565b5090565b5b808211156105235760008155600101610528565b60408101818360005b6002811015610564578151835260209283019290910190600101610545565b50505092915050565b600082601f83011261057e57600080fd5b6040516040810181811067ffffffffffffffff821117156105af57634e487b7160e01b600052604160045260246000fd5b80604052508060408401858111156105c657600080fd5b845b818110156105e05780358352602092830192016105c8565b509195945050505050565b6000604082840312156105fd57600080fd5b610607838361056d565b9392505050565b80356001600160a01b038116811461062557600080fd5b919050565b60006020828403121561063c57600080fd5b6106078261060e565b60008060006080848603121561065a57600080fd5b6106638461060e565b9250610672856020860161056d565b91506106806060850161060e565b9050925092509256fea2646970667358221220d4b69e1f79868deff972c669c62c01ccfa63a6b030214293debea10ed567f04f64736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063727b2d5c11610066578063727b2d5c146100f4578063754b377c1461010757806378cf75d7146101215780638da5cb5b14610134578063f2fde38b1461014b57600080fd5b806338cc48311461009857806359a80d0d146100c25780637098a5f4146100d7578063715018a6146100ec575b600080fd5b6003546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b6100ca61015e565b6040516100b9919061053c565b6100ea6100e53660046105eb565b610198565b005b6100ea6101ac565b6100ea61010236600461062a565b6101c0565b61010f600281565b60405160ff90911681526020016100b9565b6100ea61012f366004610645565b6101d1565b6000546201000090046001600160a01b03166100a5565b6100ea61015936600461062a565b610303565b6101666104cb565b60408051808201918290529060019060029082845b81548152602001906001019080831161017b575050505050905090565b6101a0610379565b6101a9816103da565b50565b6101b4610379565b6101be6000610422565b565b6101c8610379565b6101a98161047d565b600054600290610100900460ff161580156101f3575060005460ff8083169116105b61025b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805461ffff191660ff8316176101001781556102886000546001600160a01b03620100009091041690565b6001600160a01b0316148061029c5750303b155b156102bc576102aa84610422565b6102b3836103da565b6102bc8261047d565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050565b61030b610379565b6001600160a01b0381166103705760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610252565b6101a981610422565b6000546001600160a01b03620100009091041633146101be5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610252565b6103e760018260026104e9565b507f9d99ec80e15298d9dae698493e9c61daaae3977b0f131ded44fc6b0f7766ab1581604051610417919061053c565b60405180910390a150565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fa37a473be736ea014730a555941f412164222d9d1b07f5a0a61932a1b3c3f2f490602001610417565b60405180604001604052806002906020820280368337509192915050565b8260028101928215610517579160200282015b828111156105175782518255916020019190600101906104fc565b50610523929150610527565b5090565b5b808211156105235760008155600101610528565b60408101818360005b6002811015610564578151835260209283019290910190600101610545565b50505092915050565b600082601f83011261057e57600080fd5b6040516040810181811067ffffffffffffffff821117156105af57634e487b7160e01b600052604160045260246000fd5b80604052508060408401858111156105c657600080fd5b845b818110156105e05780358352602092830192016105c8565b509195945050505050565b6000604082840312156105fd57600080fd5b610607838361056d565b9392505050565b80356001600160a01b038116811461062557600080fd5b919050565b60006020828403121561063c57600080fd5b6106078261060e565b60008060006080848603121561065a57600080fd5b6106638461060e565b9250610672856020860161056d565b91506106806060850161060e565b9050925092509256fea2646970667358221220d4b69e1f79868deff972c669c62c01ccfa63a6b030214293debea10ed567f04f64736f6c634300080e0033", "devdoc": { "author": "Sismo", "kind": "dev", @@ -307,7 +345,7 @@ "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" + "ownerAddress": "Owner of the contract, can update public key and address" } }, "owner()": { @@ -337,22 +375,26 @@ }, "userdoc": { "kind": "user", - "methods": {}, + "methods": { + "initialize(address,uint256[2],address)": { + "notice": "The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization." + } + }, "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, + "astId": 935, "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", "label": "_initialized", "offset": 0, "slot": "0", - "type": "t_bool" + "type": "t_uint8" }, { - "astId": 939, + "astId": 938, "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", "label": "_initializing", "offset": 1, @@ -360,7 +402,7 @@ "type": "t_bool" }, { - "astId": 389, + "astId": 396, "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", "label": "_owner", "offset": 2, @@ -368,7 +410,7 @@ "type": "t_address" }, { - "astId": 12869, + "astId": 15766, "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", "label": "_commitmentMapperPubKey", "offset": 0, @@ -376,7 +418,7 @@ "type": "t_array(t_uint256)2_storage" }, { - "astId": 12871, + "astId": 15768, "contract": "contracts/periphery/utils/CommitmentMapperRegistry.sol:CommitmentMapperRegistry", "label": "_commitmentMapperAddress", "offset": 0, @@ -405,6 +447,11 @@ "encoding": "inplace", "label": "uint256", "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" } } } diff --git a/deployments/mumbai/HydraS1AccountboundAttester.json b/deployments/mumbai/HydraS1AccountboundAttester.json index 8c53f28..a63d770 100644 --- a/deployments/mumbai/HydraS1AccountboundAttester.json +++ b/deployments/mumbai/HydraS1AccountboundAttester.json @@ -1,5 +1,5 @@ { - "address": "0x76D8Ed0e34555dEF84c2bfff9be85446e8E9fa2A", + "address": "0x069e6B99f4DA543156f66274FC6673442803C587", "abi": [ { "inputs": [ @@ -32,6 +32,11 @@ "internalType": "uint256", "name": "collectionIdLast", "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" } ], "stateMutability": "nonpayable", @@ -122,6 +127,17 @@ "name": "CommitmentMapperPubKeyMismatch", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + } + ], + "name": "CooldownDurationNotSetForGroupIndex", + "type": "error" + }, { "inputs": [ { @@ -138,6 +154,22 @@ "name": "DestinationMismatch", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedExternalNullifier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "externalNullifier", + "type": "uint256" + } + ], + "name": "ExternalNullifierMismatch", + "type": "error" + }, { "inputs": [ { @@ -185,60 +217,48 @@ "inputs": [ { "internalType": "uint256", - "name": "inputRoot", + "name": "nullifier", "type": "uint256" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "internalType": "uint16", + "name": "burnCount", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "cooldownStart", + "type": "uint32" } ], - "name": "RegistryRootMismatch", + "name": "NullifierOnCooldown", "type": "error" }, { "inputs": [ { "internalType": "uint256", - "name": "expectedTicketIdentifier", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "ticketIdentifier", + "name": "nullifier", "type": "uint256" } ], - "name": "TicketIdentifierMismatch", + "name": "NullifierUsed", "type": "error" }, { "inputs": [ { - "components": [ - { - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "internalType": "uint32", - "name": "cooldownStart", - "type": "uint32" - }, - { - "internalType": "uint16", - "name": "burnCount", - "type": "uint16" - } - ], - "internalType": "struct IHydraS1AccountboundAttester.TicketData", - "name": "ticketData", - "type": "tuple" - }, - { - "internalType": "uint32", - "name": "cooldownDuration", - "type": "uint32" + "internalType": "uint256", + "name": "inputRoot", + "type": "uint256" } ], - "name": "TicketOnCooldown", + "name": "RegistryRootMismatch", "type": "error" }, { @@ -347,13 +367,45 @@ "name": "AttestationGenerated", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "cooldownDuration", + "type": "uint32" + } + ], + "name": "CooldownDurationSetForGroupIndex", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", - "name": "ticket", + "name": "nullifier", "type": "uint256" }, { @@ -363,16 +415,16 @@ "type": "address" } ], - "name": "TicketDestinationUpdated", + "name": "NullifierDestinationUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "uint256", - "name": "ticket", + "name": "nullifier", "type": "uint256" }, { @@ -382,7 +434,26 @@ "type": "uint16" } ], - "name": "TicketSetOnCooldown", + "name": "NullifierSetOnCooldown", + "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" }, { @@ -411,6 +482,43 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "IMPLEMENTATION_VERSION", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "nullifier", + "type": "uint256" + }, + { + "internalType": "address", + "name": "claimDestination", + "type": "address" + } + ], + "name": "_getNextBurnCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -668,6 +776,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "getBurnCountFromExtraData", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, { "inputs": [], "name": "getCommitmentMapperRegistry", @@ -685,11 +812,30 @@ "inputs": [ { "internalType": "uint256", - "name": "userTicket", + "name": "groupIndex", "type": "uint256" } ], - "name": "getDestinationOfTicket", + "name": "getCooldownDurationForGroupIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "nullifier", + "type": "uint256" + } + ], + "name": "getDestinationOfNullifier", "outputs": [ { "internalType": "address", @@ -704,38 +850,59 @@ "inputs": [ { "internalType": "uint256", - "name": "userTicket", + "name": "nullifier", "type": "uint256" } ], - "name": "getTicketData", + "name": "getNullifierBurnCount", "outputs": [ { - "components": [ - { - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "internalType": "uint32", - "name": "cooldownStart", - "type": "uint32" - }, - { - "internalType": "uint16", - "name": "burnCount", - "type": "uint16" - } - ], - "internalType": "struct IHydraS1AccountboundAttester.TicketData", + "internalType": "uint16", "name": "", - "type": "tuple" + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "nullifier", + "type": "uint256" + } + ], + "name": "getNullifierCooldownStart", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" } ], "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "getNullifierFromExtraData", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, { "inputs": [], "name": "getVerifier", @@ -748,53 +915,158 @@ ], "stateMutability": "view", "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "ownerAddress", + "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": "uint256", + "name": "groupIndex", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "cooldownDuration", + "type": "uint32" + } + ], + "name": "setCooldownDurationForGroupIndex", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" } ], - "transactionHash": "0x8ed447ebeabab996d91a141b1b0c660f4daad0afdf85d26932e1e3785e364d79", + "transactionHash": "0x1367c8d1f64f3987113f6cafe1e0929b836f4ee62ef2fb65fdd6b2833394d238", "receipt": { "to": null, "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0x6a7E6A85ea2744C1c033BE4Da315636EBD95f054", - "transactionIndex": 7, - "gasUsed": "2081575", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000008000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000010000000000000000000008000200000000000000000080000000000000000000000000000000000000000004000000000000000000001000000000100000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000100000", - "blockHash": "0x18316abd9c1a3779b8cdf16e8790f49ee9891169c82f57427559f47cec5c8968", - "transactionHash": "0x8ed447ebeabab996d91a141b1b0c660f4daad0afdf85d26932e1e3785e364d79", + "contractAddress": "0xa723D0b8D0e816BE0f4BbE839163655BD85E14FC", + "transactionIndex": 31, + "gasUsed": "2322582", + "logsBloom": "0x00000000000000000000000000020000000000000000000000800000000000000000000000000000020000000000000000008000102000000000000000000000000000000000000000000000000000800001000000000000040100000000000000000000020000000000000000000800002000000000000080000000000000400000000000000000000000002000000000000010000080000000000000008000200000000000000000000000800400000000000000000000000040000000004000000000000000000001000000040000000000000000000000100000000020000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0x2b4a8cf2d29028afa58dd99b710997cc288b1d5d7c951447f5d5886bc45606fa", + "transactionHash": "0x1367c8d1f64f3987113f6cafe1e0929b836f4ee62ef2fb65fdd6b2833394d238", "logs": [ { - "transactionIndex": 7, - "blockNumber": 28807660, - "transactionHash": "0x8ed447ebeabab996d91a141b1b0c660f4daad0afdf85d26932e1e3785e364d79", + "transactionIndex": 31, + "blockNumber": 29540611, + "transactionHash": "0x1367c8d1f64f3987113f6cafe1e0929b836f4ee62ef2fb65fdd6b2833394d238", + "address": "0xa723D0b8D0e816BE0f4BbE839163655BD85E14FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 95, + "blockHash": "0x2b4a8cf2d29028afa58dd99b710997cc288b1d5d7c951447f5d5886bc45606fa" + }, + { + "transactionIndex": 31, + "blockNumber": 29540611, + "transactionHash": "0x1367c8d1f64f3987113f6cafe1e0929b836f4ee62ef2fb65fdd6b2833394d238", + "address": "0xa723D0b8D0e816BE0f4BbE839163655BD85E14FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x0000000000000000000000004e070e9b85a659f0b7b47cde33152ad6c2f63954" + ], + "data": "0x", + "logIndex": 96, + "blockHash": "0x2b4a8cf2d29028afa58dd99b710997cc288b1d5d7c951447f5d5886bc45606fa" + }, + { + "transactionIndex": 31, + "blockNumber": 29540611, + "transactionHash": "0x1367c8d1f64f3987113f6cafe1e0929b836f4ee62ef2fb65fdd6b2833394d238", + "address": "0xa723D0b8D0e816BE0f4BbE839163655BD85E14FC", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 97, + "blockHash": "0x2b4a8cf2d29028afa58dd99b710997cc288b1d5d7c951447f5d5886bc45606fa" + }, + { + "transactionIndex": 31, + "blockNumber": 29540611, + "transactionHash": "0x1367c8d1f64f3987113f6cafe1e0929b836f4ee62ef2fb65fdd6b2833394d238", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", "0x0000000000000000000000000000000000000000000000000000000000001010", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x0000000000000000000000003a22c8bc68e98b0faf40f349dd2b2890fae01484" + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" ], - "data": "0x0000000000000000000000000000000000000000000000000019e2229091b5000000000000000000000000000000000000000000000000007dae8f6c776df53500000000000000000000000000000000000000000000000006d5a73a10eb46bc0000000000000000000000000000000000000000000000007d94ad49e6dc403500000000000000000000000000000000000000000000000006ef895ca17cfbbc", - "logIndex": 42, - "blockHash": "0x18316abd9c1a3779b8cdf16e8790f49ee9891169c82f57427559f47cec5c8968" + "data": "0x000000000000000000000000000000000000000000000000000fe87ffbf4efa40000000000000000000000000000000000000000000000007d5a488854524ff8000000000000000000000000000000000000000000000b8e591ef8f4fa5d33c70000000000000000000000000000000000000000000000007d4a6008585d6054000000000000000000000000000000000000000000000b8e592ee174f652236b", + "logIndex": 98, + "blockHash": "0x2b4a8cf2d29028afa58dd99b710997cc288b1d5d7c951447f5d5886bc45606fa" } ], - "blockNumber": 28807660, - "cumulativeGasUsed": "3924267", + "blockNumber": 29540611, + "cumulativeGasUsed": "11747422", "status": 1, "byzantium": true }, "args": [ "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", - "0x34e3CcCF4fF2E297be22465b85F03E5E6D27b41B", + "0xCBB1032416EB875D94Da8a447D73471E4C51998E", "0x2c17e335d131dfd21238475Dd545B9B29Fb5A27D", "0x82B54988e4E3a2850501F91AC06CEA82bdb014D3", - "20000001", - "30000000" + "10000001", + "20000000", + "0x4e070E9b85a659F0B7B47cde33152ad6c2F63954" ], - "numDeployments": 1, - "solcInputHash": "c7c67c4a1ddf53de4ef76f8a114dfc39", - "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\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"cooldownStart\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"burnCount\",\"type\":\"uint16\"}],\"internalType\":\"struct IHydraS1AccountboundAttester.TicketData\",\"name\":\"ticketData\",\"type\":\"tuple\"},{\"internalType\":\"uint32\",\"name\":\"cooldownDuration\",\"type\":\"uint32\"}],\"name\":\"TicketOnCooldown\",\"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\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"burnCount\",\"type\":\"uint16\"}],\"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\":[{\"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\":\"uint16\",\"name\":\"burnCount\",\"type\":\"uint16\"}],\"internalType\":\"struct IHydraS1AccountboundAttester.TicketData\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVerifier\",\"outputs\":[{\"internalType\":\"contract HydraS1Verifier\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"errors\":{\"CollectionIdOutOfBound(uint256)\":[{\"details\":\"Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST*\"}],\"TicketOnCooldown((address,uint32,uint16),uint32)\":[{\"details\":\"Error when the userTicket is on cooldown. The user have to wait the cooldownDuration before being able to change again the destination address.*\"}]},\"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\"}},\"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 Accountbound 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) - Accountbound (with cooldown period) Users can choose to delete or generate attestations to a new destination using their source account. The attestation is \\\"Accountbound\\\" to the source account. 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/HydraS1AccountboundAttester.sol\":\"HydraS1AccountboundAttester\"},\"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 the following:\\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 **/\\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\":\"0xdcc036e3178c26e71c5dfdb601f09139ce8919db220acdbb2ad2bad6cc5c4857\",\"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/**\\n * @title Hydra-S1 Base Interface\\n * @author Sismo\\n * @notice Interface 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 errors and method specific of the Hydra-S1 attesters family and the Hydra-S1 ZK Proving Scheme\\n * We invite readers to refer to the following:\\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 **/\\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\":\"0x33e77f2249293295d1ef95a4d979cad95719bacb216c467f685bdc0b08908bea\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/interfaces/IHydraS1AccountboundAttester.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/**\\n * @title Hydra-S1 Accountbound Interface\\n * @author Sismo\\n * @notice Interface with the errors, events and methods specific to the HydraS1AcountboundAttester.\\n **/\\ninterface IHydraS1AccountboundAttester is IHydraS1Base, IAttester {\\n struct TicketData {\\n address destination;\\n uint32 cooldownStart;\\n uint16 burnCount;\\n }\\n\\n /**\\n * @dev Error when the userTicket is on cooldown. The user have to wait the cooldownDuration\\n * before being able to change again the destination address.\\n **/\\n error TicketOnCooldown(TicketData ticketData, uint32 cooldownDuration);\\n\\n /**\\n * @dev Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST\\n **/\\n error CollectionIdOutOfBound(uint256 collectionId);\\n\\n /**\\n * @dev Event emitted when the userTicket (or nullifierHash) is associated to a destination address.\\n **/\\n event TicketDestinationUpdated(uint256 ticket, address newOwner);\\n\\n /**\\n * @dev Event emitted when the userTicket has been set on cooldown. This happens when the\\n * attestation destination of a ticket has been changed\\n **/\\n event TicketSetOnCooldown(uint256 ticket, uint16 burnCount);\\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\",\"keccak256\":\"0x39e9e5eb7c27a603c62ecacf8c12acdc2ec378bde4ccc2084b3c8103405987f9\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/libs/HydraS1AccountboundLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Claim, Request} from '../../../core/libs/Structs.sol';\\nimport {HydraS1Lib, HydraS1Claim, HydraS1GroupProperties} from './HydraS1Lib.sol';\\n\\n// user Hydra-S1 claim retrieved form his request\\nstruct HydraS1AccountboundClaim {\\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 HydraS1AccountboundGroupProperties groupProperties; // user claims the group has the following properties\\n}\\n\\nstruct HydraS1AccountboundGroupProperties {\\n uint128 groupIndex;\\n uint32 generationTimestamp;\\n uint32 cooldownDuration;\\n bool isScore;\\n}\\n\\nlibrary HydraS1AccountboundLib {\\n error GroupIdAndPropertiesMismatch(uint256 expectedGroupId, uint256 groupId);\\n\\n function _hydraS1claim(Request memory self) internal pure returns (HydraS1Claim memory) {\\n Claim memory claim = self.claims[0];\\n _validateClaim(claim);\\n\\n HydraS1AccountboundGroupProperties memory groupProperties = abi.decode(\\n claim.extraData,\\n (HydraS1AccountboundGroupProperties)\\n );\\n\\n HydraS1GroupProperties memory hydraS1GroupProperties = HydraS1GroupProperties(\\n groupProperties.groupIndex,\\n groupProperties.generationTimestamp,\\n groupProperties.isScore\\n );\\n\\n return (\\n HydraS1Claim(claim.groupId, claim.claimedValue, self.destination, hydraS1GroupProperties)\\n );\\n }\\n\\n function _hydraS1Accountboundclaim(Request memory self)\\n internal\\n pure\\n returns (HydraS1AccountboundClaim memory)\\n {\\n Claim memory claim = self.claims[0];\\n _validateClaim(claim);\\n\\n HydraS1AccountboundGroupProperties memory hydraS1AccountboundGroupProperties = abi.decode(\\n claim.extraData,\\n (HydraS1AccountboundGroupProperties)\\n );\\n\\n return (\\n HydraS1AccountboundClaim(\\n claim.groupId,\\n claim.claimedValue,\\n self.destination,\\n hydraS1AccountboundGroupProperties\\n )\\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 _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\":\"0xb9bc9f27f5a193ffde403809d29c4b99b5100ebd3a07b10bfd2e2dc74abc86e1\",\"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/HydraS1AccountboundAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {IHydraS1AccountboundAttester} from '../interfaces/IHydraS1AccountboundAttester.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';\\nimport {HydraS1AccountboundLib, HydraS1AccountboundClaim} from '../libs/HydraS1AccountboundLib.sol';\\n\\n/**\\n * @title Hydra-S1 Accountbound 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 * - Accountbound (with cooldown period)\\n * Users can choose to delete or generate attestations to a new destination using their source account.\\n * The attestation is \\\"Accountbound\\\" to the source account.\\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 HydraS1AccountboundAttester is IHydraS1AccountboundAttester, HydraS1Base, Attester {\\n using HydraS1Lib for HydraS1ProofData;\\n using HydraS1Lib for bytes;\\n using HydraS1AccountboundLib 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\\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 )\\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 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._hydraS1claim();\\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 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 HydraS1AccountboundClaim memory claim = request._hydraS1Accountboundclaim();\\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 TicketData memory userTicketData = _userTicketsData[userTicket];\\n\\n uint16 burnCount = userTicketData.burnCount;\\n // If the attestation is minted on a new destination address\\n // the burnCount encoded in the extraData of the Attestation should be incremented\\n if (\\n userTicketData.destination != address(0) && userTicketData.destination != request.destination\\n ) {\\n burnCount += 1;\\n }\\n\\n attestations[0] = Attestation(\\n attestationCollectionId,\\n request.destination,\\n issuer,\\n claim.claimedValue,\\n claim.groupProperties.generationTimestamp,\\n abi.encode(userTicket, burnCount)\\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 HydraS1AccountboundClaim memory claim = request._hydraS1Accountboundclaim();\\n if (_isOnCooldown(userTicketData, claim.groupProperties.cooldownDuration))\\n revert TicketOnCooldown(userTicketData, claim.groupProperties.cooldownDuration);\\n\\n // Delete the old Attestation on the account before recording the new one\\n address[] memory attestationOwners = new address[](1);\\n uint256[] memory attestationCollectionIds = new uint256[](1);\\n\\n attestationOwners[0] = userTicketData.destination;\\n attestationCollectionIds[0] =\\n AUTHORIZED_COLLECTION_ID_FIRST +\\n claim.groupProperties.groupIndex;\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\\n\\n emit AttestationDeleted(\\n Attestation(\\n AUTHORIZED_COLLECTION_ID_FIRST + claim.groupProperties.groupIndex,\\n userTicketData.destination,\\n address(this),\\n claim.claimedValue,\\n claim.groupProperties.generationTimestamp,\\n abi.encode(userTicket, userTicketData.burnCount)\\n )\\n );\\n _setTicketOnCooldown(userTicket);\\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 /**\\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 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 _userTicketsData[userTicket].burnCount += 1;\\n emit TicketSetOnCooldown(userTicket, _userTicketsData[userTicket].burnCount);\\n }\\n\\n function _getDestinationOfTicket(uint256 userTicket) internal view returns (address) {\\n return _userTicketsData[userTicket].destination;\\n }\\n\\n function _isOnCooldown(TicketData memory userTicketData, uint32 cooldownDuration)\\n internal\\n view\\n returns (bool)\\n {\\n return userTicketData.cooldownStart + cooldownDuration > 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\":\"0xcb82307b61a4c2d566e006e82840af1dfb8ccb3d94c7519e0b88a97a316d7d53\",\"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 address[] memory attestationOwners = new address[](collectionIds.length);\\n\\n uint256[] memory attestationCollectionIds = new uint256[](collectionIds.length);\\n\\n Attestation[] memory attestations = new Attestation[](collectionIds.length);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n // fetch attestations from the registry\\n (\\n address issuer,\\n uint256 attestationValue,\\n uint32 timestamp,\\n bytes memory extraData\\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\\n\\n attestationOwners[i] = attestationsOwner;\\n attestationCollectionIds[i] = collectionIds[i];\\n\\n attestations[i] = (\\n Attestation(\\n collectionIds[i],\\n attestationsOwner,\\n issuer,\\n attestationValue,\\n timestamp,\\n extraData\\n )\\n );\\n }\\n\\n _verifyAttestationsDeletionRequest(attestations, proofData);\\n\\n _beforeDeleteAttestations(attestations, proofData);\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\\n\\n _afterDeleteAttestations(attestations, proofData);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n emit AttestationDeleted(attestations[i]);\\n }\\n return attestations;\\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\":\"0xcab4865f46f442ae11ea0689f63eb7fa0763fcfe86522aa67521a548171cb8e0\",\"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 error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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\":\"0xcf79a817ec578f5b4d8f23853dd8df0e3b1acfbff2b5a01601fd9a7315862ec9\",\"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": "0x6101406040523480156200001257600080fd5b506040516200263638038062002636833981016040819052620000359162000081565b6001600160a01b0394851660805292841660c05290831660a0529190921660e0526101005261012052620000f0565b80516001600160a01b03811681146200007c57600080fd5b919050565b60008060008060008060c087890312156200009b57600080fd5b620000a68762000064565b9550620000b66020880162000064565b9450620000c66040880162000064565b9350620000d66060880162000064565b92506080870151915060a087015190509295509295509295565b60805160a05160c05160e05161010051610120516124ab6200018b6000396000818161016001526102e0015260008181610118015281816102b801528181610cca0152610dcc0152600081816101ca0152818161058001528181610761015281816109000152610d2301526000818161018401526111c801526000818160b0015261126401526000818160ef01526113c501526124ab6000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063918447af11610071578063918447af14610182578063af411a30146101a8578063bfa66585146101c8578063c776adde146101ee578063d9895e6a14610201578063e60f999f1461022157600080fd5b80632254f98e146100ae57806346657fe9146100ed57806354846d7a1461011357806363e4afc2146101485780637000b0511461015b575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006100d0565b61013a7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100e4565b6100d0610156366004611908565b610234565b61013a7f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006100d0565b6101bb6101b6366004611969565b610253565b6040516100e49190611a94565b7f00000000000000000000000000000000000000000000000000000000000000006100d0565b6101bb6101fc366004611b1b565b610489565b61021461020f366004611908565b610844565b6040516100e49190611bcc565b6101bb61022f366004611969565b6108c2565b6000818152600160205260408120546001600160a01b03165b92915050565b6060600061026861026386611cad565b6109de565b60408051600180825281830190925291925060009190816020015b61028b6117e2565b8152602001906001900390816102835750506060830151519091506000906102dc906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611e3c565b90507f000000000000000000000000000000000000000000000000000000000000000081111561032757604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b3060006103348888610aa2565b600081815260016020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820463ffffffff1693830193909352600160c01b900461ffff16928101839052929350158015906103b8575061039e60408c0160208d01611e54565b6001600160a01b031682600001516001600160a01b031614155b156103cb576103c8600182611e71565b90505b6040518060c001604052808681526020018c60200160208101906103ef9190611e54565b6001600160a01b03168152602001856001600160a01b031681526020018860200151815260200188606001516020015163ffffffff168152602001848360405160200161044a92919091825261ffff16602082015260400190565b6040516020818303038152906040528152508660008151811061046f5761046f611e97565b602090810291909101015250939998505050505050505050565b60606000856001600160401b038111156104a5576104a5611c00565b6040519080825280602002602001820160405280156104ce578160200160208202803683370190505b5090506000866001600160401b038111156104eb576104eb611c00565b604051908082528060200260200182016040528015610514578160200160208202803683370190505b5090506000876001600160401b0381111561053157610531611c00565b60405190808252806020026020018201604052801561056a57816020015b6105576117e2565b81526020019060019003908161054f5790505b50905060005b8881101561073e576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f888181106105bf576105bf611e97565b905060200201358e6040518363ffffffff1660e01b81526004016105f69291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610613573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261063b9190810190611ec1565b93509350935093508b88868151811061065657610656611e97565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061068857610688611e97565b905060200201358786815181106106a1576106a1611e97565b6020026020010181815250506040518060c001604052808f8f888181106106ca576106ca611e97565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061071c5761071c611e97565b602002602001018190525050505050808061073690611f70565b915050610570565b5061074a818787610ac7565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af7906107989086908690600401611f89565b600060405180830381600087803b1580156107b257600080fd5b505af11580156107c6573d6000803e3d6000fd5b5050505060005b88811015610837577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061080857610808611e97565b602002602001015160405161081d919061200d565b60405180910390a18061082f81611f70565b9150506107cd565b5098975050505050505050565b604080516060808201835260008083526020808401829052838501829052845180840186528281528082018390528501829052858252600181529084902084519283018552546001600160a01b0381168352600160a01b810463ffffffff1691830191909152600160c01b900461ffff16928101929092529061024d565b60606108cf848484610ae0565b60006108dc858585610253565b90506108e9858585610b2d565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c09390610935908490600401611a94565b600060405180830381600087803b15801561094f57600080fd5b505af1158015610963573d6000803e3d6000fd5b5050505060005b81518110156109d5577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc8282815181106109a6576109a6611e97565b60200260200101516040516109bb919061200d565b60405180910390a1806109cd81611f70565b91505061096a565b50949350505050565b610a25604080516080808201835260008083526020808401829052838501829052845192830185528183528201819052928101839052606081810193909352909182015290565b60008260000151600081518110610a3e57610a3e611e97565b60200260200101519050610a5181610eb3565b60008160400151806020019051810190610a6b9190612030565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b600080610ab183850185612170565b90506000610abe82610ef7565b95945050505050565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610aee82840184612170565b90506000610afb82610f0d565b90506000610b10610b0b87611cad565b610fb7565b9050610b1c818361106a565b610b258361139b565b505050505050565b6000610b398383610aa2565b600081815260016020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820463ffffffff1693830193909352600160c01b900461ffff16928101929092529192509015801590610bbf5750610ba56040860160208701611e54565b6001600160a01b031681600001516001600160a01b031614155b15610e90576000610bd261026387611cad565b9050610be682826060015160400151611534565b15610c40576060810151604090810151815163070cb88560e31b815284516001600160a01b03166004820152602085015163ffffffff90811660248301529285015161ffff1660448201529116606482015260840161031e565b604080516001808252818301909252600091602080830190803683375050604080516001808252818301909252929350600092915060208083019080368337019050509050836000015182600081518110610c9d57610c9d611e97565b6001600160a01b0390921660209283029190910190910152606083015151610cee906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611e3c565b81600081518110610d0157610d01611e97565b602090810291909101015260405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af790610d5a9085908590600401611f89565b600060405180830381600087803b158015610d7457600080fd5b505af1158015610d88573d6000803e3d6000fd5b505050507f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b6040518060c001604052808560600151600001516001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000610df59190611e3c565b815260200186600001516001600160a01b03168152602001306001600160a01b031681526020018560200151815260200185606001516020015163ffffffff168152602001878760400151604051602001610e5e92919091825261ffff16602082015260400190565b60408051601f19818403018152918152915251610e7b919061200d565b60405180910390a1610e8c85611555565b5050505b610ea982610ea46040880160208901611e54565b61160d565b5050505050565b50565b6000610ec28260400151611673565b82519091508114610ef35781516040516337e3d1ab60e01b815261031e918391600401918252602082015260400190565b5050565b602081015160009060065b602002015192915050565b610f15611835565b604051806101200160405280610f2a846116a8565b6001600160a01b03168152602001610f41846116b6565b8152602001610f4f846116c5565b8152602001610f5d846116d4565b8152602001610f6b84610ef7565b8152602001610f79846116e3565b8152602001610f87846116f2565b8152602001610f9f8460200151610120015160011490565b15158152602001610faf84611701565b905292915050565b610fbf61188c565b60008260000151600081518110610fd857610fd8611e97565b60200260200101519050610feb81610eb3565b600081604001518060200190518101906110059190612030565b604080516060808201835283516001600160801b0316825260208085015163ffffffff168184015293810151151582840152825160808101845286518152958401518685015296909201516001600160a01b0316908401529382019390935292915050565b815160c08201511461109f57815160c082015160405163fe405c7760e01b81526004810192909252602482015260440161031e565b81606001516040015115158160e001511515036110ea57606082015160409081015160e08301519151634629f1b560e11b81529015156004820152901515602482015260440161031e565b81604001516001600160a01b031681600001516001600160a01b03161461113e57604082810151825191516370a8d99b60e11b81526001600160a01b0391821660048201529116602482015260440161031e565b46816020015114611171576020810151604051630432cec160e31b8152466004820152602481019190915260440161031e565b81602001518160a00151146111ac57602082015160a0820151604051630626ade360e41b81526004810192909252602482015260440161031e565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015611217573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123b9190612241565b61126057806040015160405163cbfe7bc360e01b815260040161031e91815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa1580156112bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e3919061225c565b80516101008401515191925014158061130a57506020808201516101008401519091015114155b15611354578051602080830151610100850151805192015160405163318d812b60e01b8152600481019490945260248401919091526044830191909152606482015260840161031e565b600061135f84611759565b9050808360600151146113955760608301516040516377bb6d2760e11b815261031e918391600401918252602082015260400190565b50505050565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f6946113fe949093929091906004016122d8565b602060405180830381865afa925050508015611437575060408051601f3d908101601f1916820190925261143491810190612241565b60015b61150d5761144361235c565b806308c379a00361147c5750611457612378565b8061146257506114bb565b8060405162dd577760e81b815260040161031e9190612401565b634e487b71036114bb5761148e612414565b9061149957506114bb565b60405162dd577760e81b8152602060048201526000602482015260440161031e565b3d8080156114e5576040519150601f19603f3d011682016040523d82523d6000602084013e6114ea565b606091505b5060405162dd577760e81b8152602060048201526000602482015260440161031e565b80610ef35760405162dd577760e81b8152602060048201526000602482015260440161031e565b6000428284602001516115479190612434565b63ffffffff16119392505050565b6000818152600160208190526040909120805463ffffffff60a01b1916600160a01b4263ffffffff16021780825560189061159c908490600160c01b900461ffff16611e71565b82546101009290920a61ffff818102199093169183160217909155600083815260016020908152604091829020548251868152600160c01b909104909316908301527f80c694309c3b71041ff73c728020871b4f851f0f6a739eb4f265e7ffb988d91f92500160405180910390a150565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b8051602082012060009061024d907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190612453565b602081015160009081610f02565b60208101516000906001610f02565b60208101516000906004610f02565b60208101516000906005610f02565b60208101516000906007610f02565b60208101516000906008610f02565b6117096118ea565b604051806040016040528083602001516002600a811061172b5761172b611e97565b6020020151815260200183602001516003600a811061174c5761174c611e97565b6020020151905292915050565b600080611777308460600151600001516001600160801b031661177e565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6117779190612453565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b905290565b60405180610120016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016118306118ea565b6040518060800160405280600081526020016000815260200160006001600160a01b03168152602001611830604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b60405180604001604052806002906020820280368337509192915050565b60006020828403121561191a57600080fd5b5035919050565b60008083601f84011261193357600080fd5b5081356001600160401b0381111561194a57600080fd5b60208301915083602082850101111561196257600080fd5b9250929050565b60008060006040848603121561197e57600080fd5b83356001600160401b038082111561199557600080fd5b90850190604082880312156119a957600080fd5b909350602085013590808211156119bf57600080fd5b506119cc86828701611921565b9497909650939450505050565b60005b838110156119f45781810151838201526020016119dc565b838111156113955750506000910152565b60008151808452611a1d8160208601602086016119d9565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a0850152611a8c60c0850182611a05565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611ae957603f19888603018452611ad7858351611a31565b94509285019290850190600101611abb565b5092979650505050505050565b6001600160a01b0381168114610eb057600080fd5b8035611b1681611af6565b919050565b600080600080600060608688031215611b3357600080fd5b85356001600160401b0380821115611b4a57600080fd5b818801915088601f830112611b5e57600080fd5b813581811115611b6d57600080fd5b8960208260051b8501011115611b8257600080fd5b60208301975080965050611b9860208901611b0b565b94506040880135915080821115611bae57600080fd5b50611bbb88828901611921565b969995985093965092949392505050565b81516001600160a01b0316815260208083015163ffffffff169082015260408083015161ffff16908201526060810161024d565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b0382111715611c3557611c35611c00565b60405250565b606081018181106001600160401b0382111715611c3557611c35611c00565b601f8201601f191681016001600160401b0381118282101715611c7f57611c7f611c00565b6040525050565b60006001600160401b03821115611c9f57611c9f611c00565b50601f01601f191660200190565b60006040808336031215611cc057600080fd5b8051611ccb81611c16565b83356001600160401b0380821115611ce257600080fd5b9085019036601f830112611cf557600080fd5b8135602082821115611d0957611d09611c00565b8160051b8651611d1b83830182611c5a565b92835284810182019282810136851115611d3457600080fd5b83870192505b84831015611e0857823586811115611d525760008081fd5b8701606036829003601f1901811315611d6b5760008081fd5b8a51611d7681611c3b565b8287013581528b83013581880152908201359088821115611d975760008081fd5b9181019136603f840112611dad57600091508182fd5b868301359150611dbc82611c86565b8c51611dc88282611c5a565b838152368e858701011115611ddf57600091508182fd5b838e86018a830137600093810189019390935250808c0191909152825250918301918301611d3a565b50865250611e17888201611b0b565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611e4f57611e4f611e26565b500190565b600060208284031215611e6657600080fd5b813561177781611af6565b600061ffff808316818516808303821115611e8e57611e8e611e26565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b805163ffffffff81168114611b1657600080fd5b60008060008060808587031215611ed757600080fd5b8451611ee281611af6565b60208601519094509250611ef860408601611ead565b915060608501516001600160401b03811115611f1357600080fd5b8501601f81018713611f2457600080fd5b8051611f2f81611c86565b604051611f3c8282611c5a565b828152896020848601011115611f5157600080fd5b611f628360208301602087016119d9565b969995985093965050505050565b600060018201611f8257611f82611e26565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015611fcb5781516001600160a01b031684529284019290840190600101611fa6565b5050508381038285015284518082528583019183019060005b8181101561200057835183529284019291840191600101611fe4565b5090979650505050505050565b6020815260006117776020830184611a31565b80518015158114611b1657600080fd5b60006080828403121561204257600080fd5b604051608081018181106001600160401b038211171561206457612064611c00565b60405282516001600160801b038116811461207e57600080fd5b815261208c60208401611ead565b602082015261209d60408401611ead565b60408201526120ae60608401612020565b60608201529392505050565b600082601f8301126120cb57600080fd5b6040516120d781611c16565b8060408401858111156120e957600080fd5b845b818110156121035780358352602092830192016120eb565b509195945050505050565b600082601f83011261211f57600080fd5b6040516101408082018281106001600160401b038211171561214357612143611c00565b6040528301818582111561215657600080fd5b845b82811015612103578035825260209182019101612158565b600081830361024081121561218457600080fd5b6040805161219181611c16565b610100808412156121a157600080fd5b825193506121ae84611c3b565b6121b887876120ba565b845286605f8701126121c957600080fd5b82516121d481611c16565b8060c08801898111156121e657600080fd5b8589015b8181101561220b576121fc8b826120ba565b835260209092019186016121ea565b5082602088015261221c8a826120ba565b868801525050508382526122328782880161210e565b60208301525095945050505050565b60006020828403121561225357600080fd5b61177782612020565b60006040828403121561226e57600080fd5b82601f83011261227d57600080fd5b60405161228981611c16565b80604084018581111561229b57600080fd5b845b8181101561210357805183526020928301920161229d565b8060005b60028110156113955781518452602093840193909101906001016122b9565b61024081016122e782876122b5565b60408083018660005b6002811015612317576123048383516122b5565b91830191602091909101906001016122f0565b5050505061232860c08301856122b5565b61010082018360005b600a811015612350578151835260209283019290910190600101612331565b50505095945050505050565b600060033d11156123755760046000803e5060005160e01c5b90565b600060443d10156123865790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156123b557505050505090565b82850191508151818111156123cd5750505050505090565b843d87010160208285010111156123e75750505050505090565b6123f660208286010187611c5a565b509095945050505050565b6020815260006117776020830184611a05565b60008060233d1115612430576020600460003e50506000516001905b9091565b600063ffffffff808316818516808303821115611e8e57611e8e611e26565b60008261247057634e487b7160e01b600052601260045260246000fd5b50069056fea264697066735822122022a4655f370ec5e42b58cf5e3cccb6dfe9971f6ee9d1bcd673be0f009e86a94364736f6c634300080e0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063918447af11610071578063918447af14610182578063af411a30146101a8578063bfa66585146101c8578063c776adde146101ee578063d9895e6a14610201578063e60f999f1461022157600080fd5b80632254f98e146100ae57806346657fe9146100ed57806354846d7a1461011357806363e4afc2146101485780637000b0511461015b575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006100d0565b61013a7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100e4565b6100d0610156366004611908565b610234565b61013a7f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006100d0565b6101bb6101b6366004611969565b610253565b6040516100e49190611a94565b7f00000000000000000000000000000000000000000000000000000000000000006100d0565b6101bb6101fc366004611b1b565b610489565b61021461020f366004611908565b610844565b6040516100e49190611bcc565b6101bb61022f366004611969565b6108c2565b6000818152600160205260408120546001600160a01b03165b92915050565b6060600061026861026386611cad565b6109de565b60408051600180825281830190925291925060009190816020015b61028b6117e2565b8152602001906001900390816102835750506060830151519091506000906102dc906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611e3c565b90507f000000000000000000000000000000000000000000000000000000000000000081111561032757604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b3060006103348888610aa2565b600081815260016020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820463ffffffff1693830193909352600160c01b900461ffff16928101839052929350158015906103b8575061039e60408c0160208d01611e54565b6001600160a01b031682600001516001600160a01b031614155b156103cb576103c8600182611e71565b90505b6040518060c001604052808681526020018c60200160208101906103ef9190611e54565b6001600160a01b03168152602001856001600160a01b031681526020018860200151815260200188606001516020015163ffffffff168152602001848360405160200161044a92919091825261ffff16602082015260400190565b6040516020818303038152906040528152508660008151811061046f5761046f611e97565b602090810291909101015250939998505050505050505050565b60606000856001600160401b038111156104a5576104a5611c00565b6040519080825280602002602001820160405280156104ce578160200160208202803683370190505b5090506000866001600160401b038111156104eb576104eb611c00565b604051908082528060200260200182016040528015610514578160200160208202803683370190505b5090506000876001600160401b0381111561053157610531611c00565b60405190808252806020026020018201604052801561056a57816020015b6105576117e2565b81526020019060019003908161054f5790505b50905060005b8881101561073e576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f888181106105bf576105bf611e97565b905060200201358e6040518363ffffffff1660e01b81526004016105f69291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610613573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261063b9190810190611ec1565b93509350935093508b88868151811061065657610656611e97565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061068857610688611e97565b905060200201358786815181106106a1576106a1611e97565b6020026020010181815250506040518060c001604052808f8f888181106106ca576106ca611e97565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061071c5761071c611e97565b602002602001018190525050505050808061073690611f70565b915050610570565b5061074a818787610ac7565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af7906107989086908690600401611f89565b600060405180830381600087803b1580156107b257600080fd5b505af11580156107c6573d6000803e3d6000fd5b5050505060005b88811015610837577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061080857610808611e97565b602002602001015160405161081d919061200d565b60405180910390a18061082f81611f70565b9150506107cd565b5098975050505050505050565b604080516060808201835260008083526020808401829052838501829052845180840186528281528082018390528501829052858252600181529084902084519283018552546001600160a01b0381168352600160a01b810463ffffffff1691830191909152600160c01b900461ffff16928101929092529061024d565b60606108cf848484610ae0565b60006108dc858585610253565b90506108e9858585610b2d565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c09390610935908490600401611a94565b600060405180830381600087803b15801561094f57600080fd5b505af1158015610963573d6000803e3d6000fd5b5050505060005b81518110156109d5577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc8282815181106109a6576109a6611e97565b60200260200101516040516109bb919061200d565b60405180910390a1806109cd81611f70565b91505061096a565b50949350505050565b610a25604080516080808201835260008083526020808401829052838501829052845192830185528183528201819052928101839052606081810193909352909182015290565b60008260000151600081518110610a3e57610a3e611e97565b60200260200101519050610a5181610eb3565b60008160400151806020019051810190610a6b9190612030565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b600080610ab183850185612170565b90506000610abe82610ef7565b95945050505050565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610aee82840184612170565b90506000610afb82610f0d565b90506000610b10610b0b87611cad565b610fb7565b9050610b1c818361106a565b610b258361139b565b505050505050565b6000610b398383610aa2565b600081815260016020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820463ffffffff1693830193909352600160c01b900461ffff16928101929092529192509015801590610bbf5750610ba56040860160208701611e54565b6001600160a01b031681600001516001600160a01b031614155b15610e90576000610bd261026387611cad565b9050610be682826060015160400151611534565b15610c40576060810151604090810151815163070cb88560e31b815284516001600160a01b03166004820152602085015163ffffffff90811660248301529285015161ffff1660448201529116606482015260840161031e565b604080516001808252818301909252600091602080830190803683375050604080516001808252818301909252929350600092915060208083019080368337019050509050836000015182600081518110610c9d57610c9d611e97565b6001600160a01b0390921660209283029190910190910152606083015151610cee906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611e3c565b81600081518110610d0157610d01611e97565b602090810291909101015260405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af790610d5a9085908590600401611f89565b600060405180830381600087803b158015610d7457600080fd5b505af1158015610d88573d6000803e3d6000fd5b505050507f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b6040518060c001604052808560600151600001516001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000610df59190611e3c565b815260200186600001516001600160a01b03168152602001306001600160a01b031681526020018560200151815260200185606001516020015163ffffffff168152602001878760400151604051602001610e5e92919091825261ffff16602082015260400190565b60408051601f19818403018152918152915251610e7b919061200d565b60405180910390a1610e8c85611555565b5050505b610ea982610ea46040880160208901611e54565b61160d565b5050505050565b50565b6000610ec28260400151611673565b82519091508114610ef35781516040516337e3d1ab60e01b815261031e918391600401918252602082015260400190565b5050565b602081015160009060065b602002015192915050565b610f15611835565b604051806101200160405280610f2a846116a8565b6001600160a01b03168152602001610f41846116b6565b8152602001610f4f846116c5565b8152602001610f5d846116d4565b8152602001610f6b84610ef7565b8152602001610f79846116e3565b8152602001610f87846116f2565b8152602001610f9f8460200151610120015160011490565b15158152602001610faf84611701565b905292915050565b610fbf61188c565b60008260000151600081518110610fd857610fd8611e97565b60200260200101519050610feb81610eb3565b600081604001518060200190518101906110059190612030565b604080516060808201835283516001600160801b0316825260208085015163ffffffff168184015293810151151582840152825160808101845286518152958401518685015296909201516001600160a01b0316908401529382019390935292915050565b815160c08201511461109f57815160c082015160405163fe405c7760e01b81526004810192909252602482015260440161031e565b81606001516040015115158160e001511515036110ea57606082015160409081015160e08301519151634629f1b560e11b81529015156004820152901515602482015260440161031e565b81604001516001600160a01b031681600001516001600160a01b03161461113e57604082810151825191516370a8d99b60e11b81526001600160a01b0391821660048201529116602482015260440161031e565b46816020015114611171576020810151604051630432cec160e31b8152466004820152602481019190915260440161031e565b81602001518160a00151146111ac57602082015160a0820151604051630626ade360e41b81526004810192909252602482015260440161031e565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015611217573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123b9190612241565b61126057806040015160405163cbfe7bc360e01b815260040161031e91815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa1580156112bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e3919061225c565b80516101008401515191925014158061130a57506020808201516101008401519091015114155b15611354578051602080830151610100850151805192015160405163318d812b60e01b8152600481019490945260248401919091526044830191909152606482015260840161031e565b600061135f84611759565b9050808360600151146113955760608301516040516377bb6d2760e11b815261031e918391600401918252602082015260400190565b50505050565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f6946113fe949093929091906004016122d8565b602060405180830381865afa925050508015611437575060408051601f3d908101601f1916820190925261143491810190612241565b60015b61150d5761144361235c565b806308c379a00361147c5750611457612378565b8061146257506114bb565b8060405162dd577760e81b815260040161031e9190612401565b634e487b71036114bb5761148e612414565b9061149957506114bb565b60405162dd577760e81b8152602060048201526000602482015260440161031e565b3d8080156114e5576040519150601f19603f3d011682016040523d82523d6000602084013e6114ea565b606091505b5060405162dd577760e81b8152602060048201526000602482015260440161031e565b80610ef35760405162dd577760e81b8152602060048201526000602482015260440161031e565b6000428284602001516115479190612434565b63ffffffff16119392505050565b6000818152600160208190526040909120805463ffffffff60a01b1916600160a01b4263ffffffff16021780825560189061159c908490600160c01b900461ffff16611e71565b82546101009290920a61ffff818102199093169183160217909155600083815260016020908152604091829020548251868152600160c01b909104909316908301527f80c694309c3b71041ff73c728020871b4f851f0f6a739eb4f265e7ffb988d91f92500160405180910390a150565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b8051602082012060009061024d907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190612453565b602081015160009081610f02565b60208101516000906001610f02565b60208101516000906004610f02565b60208101516000906005610f02565b60208101516000906007610f02565b60208101516000906008610f02565b6117096118ea565b604051806040016040528083602001516002600a811061172b5761172b611e97565b6020020151815260200183602001516003600a811061174c5761174c611e97565b6020020151905292915050565b600080611777308460600151600001516001600160801b031661177e565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6117779190612453565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b905290565b60405180610120016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016118306118ea565b6040518060800160405280600081526020016000815260200160006001600160a01b03168152602001611830604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b60405180604001604052806002906020820280368337509192915050565b60006020828403121561191a57600080fd5b5035919050565b60008083601f84011261193357600080fd5b5081356001600160401b0381111561194a57600080fd5b60208301915083602082850101111561196257600080fd5b9250929050565b60008060006040848603121561197e57600080fd5b83356001600160401b038082111561199557600080fd5b90850190604082880312156119a957600080fd5b909350602085013590808211156119bf57600080fd5b506119cc86828701611921565b9497909650939450505050565b60005b838110156119f45781810151838201526020016119dc565b838111156113955750506000910152565b60008151808452611a1d8160208601602086016119d9565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a0850152611a8c60c0850182611a05565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611ae957603f19888603018452611ad7858351611a31565b94509285019290850190600101611abb565b5092979650505050505050565b6001600160a01b0381168114610eb057600080fd5b8035611b1681611af6565b919050565b600080600080600060608688031215611b3357600080fd5b85356001600160401b0380821115611b4a57600080fd5b818801915088601f830112611b5e57600080fd5b813581811115611b6d57600080fd5b8960208260051b8501011115611b8257600080fd5b60208301975080965050611b9860208901611b0b565b94506040880135915080821115611bae57600080fd5b50611bbb88828901611921565b969995985093965092949392505050565b81516001600160a01b0316815260208083015163ffffffff169082015260408083015161ffff16908201526060810161024d565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b0382111715611c3557611c35611c00565b60405250565b606081018181106001600160401b0382111715611c3557611c35611c00565b601f8201601f191681016001600160401b0381118282101715611c7f57611c7f611c00565b6040525050565b60006001600160401b03821115611c9f57611c9f611c00565b50601f01601f191660200190565b60006040808336031215611cc057600080fd5b8051611ccb81611c16565b83356001600160401b0380821115611ce257600080fd5b9085019036601f830112611cf557600080fd5b8135602082821115611d0957611d09611c00565b8160051b8651611d1b83830182611c5a565b92835284810182019282810136851115611d3457600080fd5b83870192505b84831015611e0857823586811115611d525760008081fd5b8701606036829003601f1901811315611d6b5760008081fd5b8a51611d7681611c3b565b8287013581528b83013581880152908201359088821115611d975760008081fd5b9181019136603f840112611dad57600091508182fd5b868301359150611dbc82611c86565b8c51611dc88282611c5a565b838152368e858701011115611ddf57600091508182fd5b838e86018a830137600093810189019390935250808c0191909152825250918301918301611d3a565b50865250611e17888201611b0b565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611e4f57611e4f611e26565b500190565b600060208284031215611e6657600080fd5b813561177781611af6565b600061ffff808316818516808303821115611e8e57611e8e611e26565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b805163ffffffff81168114611b1657600080fd5b60008060008060808587031215611ed757600080fd5b8451611ee281611af6565b60208601519094509250611ef860408601611ead565b915060608501516001600160401b03811115611f1357600080fd5b8501601f81018713611f2457600080fd5b8051611f2f81611c86565b604051611f3c8282611c5a565b828152896020848601011115611f5157600080fd5b611f628360208301602087016119d9565b969995985093965050505050565b600060018201611f8257611f82611e26565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015611fcb5781516001600160a01b031684529284019290840190600101611fa6565b5050508381038285015284518082528583019183019060005b8181101561200057835183529284019291840191600101611fe4565b5090979650505050505050565b6020815260006117776020830184611a31565b80518015158114611b1657600080fd5b60006080828403121561204257600080fd5b604051608081018181106001600160401b038211171561206457612064611c00565b60405282516001600160801b038116811461207e57600080fd5b815261208c60208401611ead565b602082015261209d60408401611ead565b60408201526120ae60608401612020565b60608201529392505050565b600082601f8301126120cb57600080fd5b6040516120d781611c16565b8060408401858111156120e957600080fd5b845b818110156121035780358352602092830192016120eb565b509195945050505050565b600082601f83011261211f57600080fd5b6040516101408082018281106001600160401b038211171561214357612143611c00565b6040528301818582111561215657600080fd5b845b82811015612103578035825260209182019101612158565b600081830361024081121561218457600080fd5b6040805161219181611c16565b610100808412156121a157600080fd5b825193506121ae84611c3b565b6121b887876120ba565b845286605f8701126121c957600080fd5b82516121d481611c16565b8060c08801898111156121e657600080fd5b8589015b8181101561220b576121fc8b826120ba565b835260209092019186016121ea565b5082602088015261221c8a826120ba565b868801525050508382526122328782880161210e565b60208301525095945050505050565b60006020828403121561225357600080fd5b61177782612020565b60006040828403121561226e57600080fd5b82601f83011261227d57600080fd5b60405161228981611c16565b80604084018581111561229b57600080fd5b845b8181101561210357805183526020928301920161229d565b8060005b60028110156113955781518452602093840193909101906001016122b9565b61024081016122e782876122b5565b60408083018660005b6002811015612317576123048383516122b5565b91830191602091909101906001016122f0565b5050505061232860c08301856122b5565b61010082018360005b600a811015612350578151835260209283019290910190600101612331565b50505095945050505050565b600060033d11156123755760046000803e5060005160e01c5b90565b600060443d10156123865790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156123b557505050505090565b82850191508151818111156123cd5750505050505090565b843d87010160208285010111156123e75750505050505090565b6123f660208286010187611c5a565b509095945050505050565b6020815260006117776020830184611a05565b60008060233d1115612430576020600460003e50506000516001905b9091565b600063ffffffff808316818516808303821115611e8e57611e8e611e26565b60008261247057634e487b7160e01b600052601260045260246000fd5b50069056fea264697066735822122022a4655f370ec5e42b58cf5e3cccb6dfe9971f6ee9d1bcd673be0f009e86a94364736f6c634300080e0033", + "numDeployments": 2, + "solcInputHash": "6edb98fea2bf424a369954d0e80655f6", + "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\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"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\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"}],\"name\":\"CooldownDurationNotSetForGroupIndex\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"expectedDestination\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"inputDestination\",\"type\":\"address\"}],\"name\":\"DestinationMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedExternalNullifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"externalNullifier\",\"type\":\"uint256\"}],\"name\":\"ExternalNullifierMismatch\",\"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\":\"nullifier\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"burnCount\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"cooldownStart\",\"type\":\"uint32\"}],\"name\":\"NullifierOnCooldown\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nullifier\",\"type\":\"uint256\"}],\"name\":\"NullifierUsed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"inputRoot\",\"type\":\"uint256\"}],\"name\":\"RegistryRootMismatch\",\"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\":true,\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"cooldownDuration\",\"type\":\"uint32\"}],\"name\":\"CooldownDurationSetForGroupIndex\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nullifier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"NullifierDestinationUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nullifier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"burnCount\",\"type\":\"uint16\"}],\"name\":\"NullifierSetOnCooldown\",\"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\"},{\"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\":\"IMPLEMENTATION_VERSION\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nullifier\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"claimDestination\",\"type\":\"address\"}],\"name\":\"_getNextBurnCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"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\":[{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"getBurnCountFromExtraData\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCommitmentMapperRegistry\",\"outputs\":[{\"internalType\":\"contract ICommitmentMapperRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"}],\"name\":\"getCooldownDurationForGroupIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nullifier\",\"type\":\"uint256\"}],\"name\":\"getDestinationOfNullifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nullifier\",\"type\":\"uint256\"}],\"name\":\"getNullifierBurnCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nullifier\",\"type\":\"uint256\"}],\"name\":\"getNullifierCooldownStart\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"getNullifierFromExtraData\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVerifier\",\"outputs\":[{\"internalType\":\"contract HydraS1Verifier\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"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\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"cooldownDuration\",\"type\":\"uint32\"}],\"name\":\"setCooldownDurationForGroupIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"errors\":{\"CollectionIdOutOfBound(uint256)\":[{\"details\":\"Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST*\"}],\"CooldownDurationNotSetForGroupIndex(uint256)\":[{\"details\":\"Error when the cooldown duration for a given groupIndex is equal to zero. The HydraS1AccountboundAttester behaves like the HydraS1SimpleAttester.*\"}],\"NullifierOnCooldown(uint256,address,uint16,uint32)\":[{\"details\":\"Error when the nullifier is on cooldown. The user have to wait the cooldownDuration before being able to change again the destination address.*\"}],\"NullifierUsed(uint256)\":[{\"details\":\"Error when the nullifier is already used for a destination address*\"}]},\"kind\":\"dev\",\"methods\":{\"_getNextBurnCount(uint256,address)\":{\"details\":\"returns burn count or burn count + 1 if new burn will happen\",\"params\":{\"claimDestination\":\"destination referenced in the user claim\",\"nullifier\":\"user nullifier\"}},\"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 attestation collection in which the attester is supposed to record\",\"collectionIdLast\":\"Id of the last attestation collection in which the attester is supposed to record\",\"commitmentMapperAddress\":\"commitment mapper's public key registry\",\"hydraS1VerifierAddress\":\"ZK Snark Hydra-S1 Verifier contract\",\"owner\":\"Address of attester's owner\"}},\"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\"},\"getBurnCountFromExtraData(bytes)\":{\"details\":\"Returns the burn count for a given extraData\",\"params\":{\"extraData\":\"bytes where the burnCount is encoded\"}},\"getCommitmentMapperRegistry()\":{\"details\":\"Getter of Commitment Mapper Registry contract\"},\"getCooldownDurationForGroupIndex(uint256)\":{\"details\":\"Getter, get the cooldown duration of a groupIndex\",\"params\":{\"groupIndex\":\"internal collection id*\"}},\"getDestinationOfNullifier(uint256)\":{\"details\":\"Getter, returns the last attestation destination of a nullifier\",\"params\":{\"nullifier\":\"nullifier used*\"}},\"getNullifierBurnCount(uint256)\":{\"details\":\"Getter, returns the burnCount of a nullifier\",\"params\":{\"nullifier\":\"nullifier used*\"}},\"getNullifierCooldownStart(uint256)\":{\"details\":\"Getter, returns the cooldown start of a nullifier\",\"params\":{\"nullifier\":\"nullifier used*\"}},\"getNullifierFromExtraData(bytes)\":{\"details\":\"returns the nullifier for a given extraData\",\"params\":{\"extraData\":\"bytes where the nullifier is encoded\"}},\"getVerifier()\":{\"details\":\"Getter of Hydra-S1 Verifier contract\"},\"initialize(address)\":{\"details\":\"Initialize function, to be called by the proxy delegating calls to this implementation\",\"params\":{\"ownerAddress\":\"Owner of the contract, has the right to authorize/unauthorize attestations issuers\"}},\"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.\"},\"setCooldownDurationForGroupIndex(uint256,uint32)\":{\"details\":\"Setter, sets the cooldown duration of a groupIndex\",\"params\":{\"cooldownDuration\":\"cooldown duration we want to set for the groupIndex*\",\"groupIndex\":\"internal collection id\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"Hydra-S1 Accountbound Attester\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getCooldownDurationForGroupIndex(uint256)\":{\"notice\":\"returns 0 when the accountbound feature is deactivated for this group\"},\"initialize(address)\":{\"notice\":\"The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\"},\"setCooldownDurationForGroupIndex(uint256,uint32)\":{\"notice\":\"set to 0 to deactivate the accountbound feature for this group\"}},\"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 Simple Attester contract is inherited and holds the complex Hydra S1 verification logic. Request verification alongside proof verification is already implemented in the inherited HydraS1SimpleAttester, along with the buildAttestations logic. However, we override the buildAttestations function to encode the nullifier and its burn count in the user attestation. The _beforeRecordAttestations is also overriden to fit the Accountbound 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 - Nullified Each source account gets one nullifier per claim (i.e only one attestation per source account per claim) While semaphore/ tornado cash are using the following notations: nullifierHash = hash(IdNullifier, externalNullifier) We prefered to use the naming 'nullifier' instead of 'nullifierHash' in our contracts and documentation. We also renamed 'IdNullifier' in 'sourceSecret' (the secret tied to a source account) and we kept the 'externalNullifier' notation. Finally, here is our notations at Sismo: nullifier = hash(sourceSecret, externalNullifier) - Accountbound (opt-in, with cooldown period) The owner of this attester can set a cooldown duration for a specific group, activating the accountbound feature for this group. Users can update their attestation's destination by providing a new Hydra-S1 ZK proof It means the attestation is bound to the source account, stored on an updatable destination account. When deleting/ sending to a new destination, the nullifier will enter a cooldown period, so it remains occasional. A group that has its cooldown duration set to 0 means it has been configured to not feature accountbound attestations, attestations can not be transferred One can however know that the former and the new destinations were created using the same nullifier, thus creating a link between those two destinations. - Renewable A nullifier 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/HydraS1AccountboundAttester.sol\":\"HydraS1AccountboundAttester\"},\"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 (last updated v4.7.0) (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 Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\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 the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\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\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xcee5467d5d873fb75dae6f98c01a8d25dd609f9d0374c7d39217bd5f9539a2d6\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, \\\"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 (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or 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 _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\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 /// @solidity memory-safe-assembly\\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\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"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 [8609986746108439658545470593166889256314951959466775818870246174320018498804,\\n 6848251127850009101372611262053374737897586140140607384018397707035108265914],\\n [21367916863936594568281095443965096905143705300114190558130516981138584550504,\\n 13327705762185115653848159709412003423932761899188342359583872691135383932883]\\n );\\n vk.IC = new Pairing.G1Point[](11);\\n \\n vk.IC[0] = Pairing.G1Point( \\n 19965766170734310004645394427613286415565755728797065894668054116047682895204,\\n 6952067612339183672227137101423582097916038093373585908267153974352032944482\\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 13987716160490730015463796942940452666334097189904948795214986996497499925899,\\n 5336810094802209074340875836312868429276540870324469349093948627126061524544\\n ); \\n \\n vk.IC[4] = Pairing.G1Point( \\n 14931593253473978964215343699995811275378324235306358485461293343370969283966,\\n 564306919152089917957316877787764763278299990971316475606280877961553231205\\n ); \\n \\n vk.IC[5] = Pairing.G1Point( \\n 11591267743733991434114686002448165336885445656808796470854638278338319268343,\\n 11495219763417990955889652410266075210402006084183208750635660647824890013350\\n ); \\n \\n vk.IC[6] = Pairing.G1Point( \\n 8183184532870222270700473518157259944911700429689031755853536692005688965081,\\n 9121077094104828462137861111631978599019724423614716723152060153405564278301\\n ); \\n \\n vk.IC[7] = Pairing.G1Point( \\n 4314095526093128699362232919686741372014146055311239687202926853002748112330,\\n 11665330391505820654128458332883010598817535082070674418723503440883598640597\\n ); \\n \\n vk.IC[8] = Pairing.G1Point( \\n 19602244162575575785636531633124796303002902053486919698240132790672698216585,\\n 181057165072599074288983745076121344893296348827576905983079816835912241514\\n ); \\n \\n vk.IC[9] = Pairing.G1Point( \\n 18925967077785550270509493111690046951994174908254476036944536825999614778001,\\n 4990629719417206796668074534812314525340851981015724652256935997545282642849\\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\":\"0x120f0b311a61cabc9d42ef740c19e5f20b4c8ba400d9a6378e33c76dd54f5c42\",\"license\":\"GPL-3.0\"},\"contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\n\\nimport {IHydraS1AccountboundAttester} from './interfaces/IHydraS1AccountboundAttester.sol';\\n\\n// Core protocol Protocol imports\\nimport {Request, Attestation, Claim} from '../../core/libs/Structs.sol';\\n\\n// Imports related to Hydra-S1\\nimport {HydraS1SimpleAttester, IAttester, HydraS1Lib, HydraS1ProofData, HydraS1Claim} from './HydraS1SimpleAttester.sol';\\n\\n/**\\n * @title Hydra-S1 Accountbound 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 Simple Attester contract is inherited and holds the complex Hydra S1 verification logic.\\n * Request verification alongside proof verification is already implemented in the inherited HydraS1SimpleAttester, along with the buildAttestations logic.\\n * However, we override the buildAttestations function to encode the nullifier and its burn count in the user attestation.\\n * The _beforeRecordAttestations is also overriden to fit the Accountbound 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 * - Nullified\\n * Each source account gets one nullifier per claim (i.e only one attestation per source account per claim)\\n * While semaphore/ tornado cash are using the following notations: nullifierHash = hash(IdNullifier, externalNullifier)\\n * We prefered to use the naming 'nullifier' instead of 'nullifierHash' in our contracts and documentation.\\n * We also renamed 'IdNullifier' in 'sourceSecret' (the secret tied to a source account) and we kept the 'externalNullifier' notation.\\n * Finally, here is our notations at Sismo: nullifier = hash(sourceSecret, externalNullifier)\\n\\n * - Accountbound (opt-in, with cooldown period)\\n * The owner of this attester can set a cooldown duration for a specific group, activating the accountbound feature for this group.\\n * Users can update their attestation's destination by providing a new Hydra-S1 ZK proof \\n * It means the attestation is bound to the source account, stored on an updatable destination account.\\n * When deleting/ sending to a new destination, the nullifier will enter a cooldown period, so it remains occasional.\\n * A group that has its cooldown duration set to 0 means it has been configured to not feature accountbound attestations, attestations can not be transferred\\n * One can however know that the former and the new destinations were created using the same nullifier, thus creating a link between those two destinations.\\n \\n * - Renewable\\n * A nullifier 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 **/\\n\\ncontract HydraS1AccountboundAttester is\\n IHydraS1AccountboundAttester,\\n HydraS1SimpleAttester,\\n Ownable\\n{\\n using HydraS1Lib for HydraS1ProofData;\\n using HydraS1Lib for bytes;\\n using HydraS1Lib for Request;\\n\\n uint8 public constant IMPLEMENTATION_VERSION = 4;\\n\\n /*******************************************************\\n Storage layout:\\n 20 slots between HydraS1SimpleAttester and HydraS1AccountboundAttester\\n 1 currently used by Ownable\\n 19 place holders\\n 2O for config\\n 1 currently used\\n 19 place holders\\n 20 for logic\\n 2 currently used\\n 18 place holders\\n *******************************************************/\\n\\n // keeping some space for future config logics\\n uint256[19] private _placeHolderBeforeHydraS1Accountbound;\\n\\n // cooldown durations for each groupIndex\\n mapping(uint256 => uint32) internal _cooldownDurations;\\n\\n // keeping some space for future config logics\\n uint256[19] private _placeHoldersHydraS1AccountboundConfig;\\n\\n mapping(uint256 => uint32) internal _nullifiersCooldownStart;\\n mapping(uint256 => uint16) internal _nullifiersBurnCount;\\n\\n // keeping some space for future config logics\\n uint256[18] private _placeHoldersHydraS1AccountboundLogic;\\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 attestation collection in which the attester is supposed to record\\n * @param collectionIdLast Id of the last attestation collection in which the attester is supposed to record\\n * @param owner Address of attester's owner\\n */\\n constructor(\\n address attestationsRegistryAddress,\\n address hydraS1VerifierAddress,\\n address availableRootsRegistryAddress,\\n address commitmentMapperAddress,\\n uint256 collectionIdFirst,\\n uint256 collectionIdLast,\\n address owner\\n )\\n HydraS1SimpleAttester(\\n attestationsRegistryAddress,\\n hydraS1VerifierAddress,\\n availableRootsRegistryAddress,\\n commitmentMapperAddress,\\n collectionIdFirst,\\n collectionIdLast\\n )\\n {\\n initialize(owner);\\n }\\n\\n /**\\n * @dev Initialize function, to be called by the proxy delegating calls to this implementation\\n * @param ownerAddress Owner of the contract, has the right to authorize/unauthorize attestations issuers\\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\n */\\n function initialize(address ownerAddress) public reinitializer(IMPLEMENTATION_VERSION) {\\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\\n if (owner() == address(0) || address(this).code.length == 0) {\\n _transferOwnership(ownerAddress);\\n }\\n }\\n\\n /*******************************************************\\n MANDATORY FUNCTIONS TO OVERRIDE FROM ATTESTER.SOL\\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(\\n Request calldata request,\\n bytes calldata proofData\\n ) public view virtual override(IAttester, HydraS1SimpleAttester) returns (Attestation[] memory) {\\n Attestation[] memory attestations = super.buildAttestations(request, proofData);\\n\\n uint256 nullifier = proofData._getNullifier();\\n attestations[0].extraData = abi.encode(\\n attestations[0].extraData, // nullifier, from HydraS1 Simple\\n _getNextBurnCount(nullifier, attestations[0].owner) // BurnCount\\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 nullifier already used, not a renewal, and nullifier 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(\\n Request calldata request,\\n bytes calldata proofData\\n ) internal virtual override {\\n uint256 nullifier = proofData._getNullifier();\\n address previousNullifierDestination = _getDestinationOfNullifier(nullifier);\\n\\n HydraS1Claim memory claim = request._claim();\\n\\n // check if the nullifier has already been used previously, if so it may be on cooldown\\n if (\\n previousNullifierDestination != address(0) &&\\n previousNullifierDestination != claim.destination\\n ) {\\n uint32 cooldownDuration = _getCooldownDurationForGroupIndex(claim.groupProperties.groupIndex);\\n if (cooldownDuration == 0) {\\n revert CooldownDurationNotSetForGroupIndex(claim.groupProperties.groupIndex);\\n }\\n if (_isOnCooldown(nullifier, cooldownDuration)) {\\n uint16 burnCount = _getNullifierBurnCount(nullifier);\\n revert NullifierOnCooldown(\\n nullifier,\\n previousNullifierDestination,\\n burnCount,\\n cooldownDuration\\n );\\n }\\n\\n // Delete the old Attestation linked to the nullifier before recording the new one (accountbound feature)\\n _deletePreviousAttestation(claim, previousNullifierDestination);\\n\\n _setNullifierOnCooldownAndIncrementBurnCount(nullifier);\\n }\\n _setDestinationForNullifier(nullifier, request.destination);\\n }\\n\\n /*******************************************************\\n LOGIC FUNCTIONS RELATED TO ACCOUNTBOUND FEATURE\\n *******************************************************/\\n\\n /**\\n * @dev Getter, returns the burnCount of a nullifier\\n * @param nullifier nullifier used\\n **/\\n function getNullifierBurnCount(uint256 nullifier) external view returns (uint16) {\\n return _getNullifierBurnCount(nullifier);\\n }\\n\\n /**\\n * @dev Getter, returns the cooldown start of a nullifier\\n * @param nullifier nullifier used\\n **/\\n function getNullifierCooldownStart(uint256 nullifier) external view returns (uint32) {\\n return _getNullifierCooldownStart(nullifier);\\n }\\n\\n /**\\n * @dev returns the nullifier for a given extraData\\n * @param extraData bytes where the nullifier is encoded\\n */\\n function getNullifierFromExtraData(\\n bytes memory extraData\\n ) external pure override(HydraS1SimpleAttester, IHydraS1AccountboundAttester) returns (uint256) {\\n (uint256 nullifier, ) = abi.decode(extraData, (uint256, uint16));\\n\\n return nullifier;\\n }\\n\\n /**\\n * @dev Returns the burn count for a given extraData\\n * @param extraData bytes where the burnCount is encoded\\n */\\n function getBurnCountFromExtraData(bytes memory extraData) external pure returns (uint16) {\\n (, uint16 burnCount) = abi.decode(extraData, (uint256, uint16));\\n\\n return burnCount;\\n }\\n\\n /**\\n * @dev Checks if a nullifier is on cooldown\\n * @param nullifier user nullifier\\n * @param cooldownDuration waiting time before the user can change its badge destination\\n */\\n function _isOnCooldown(uint256 nullifier, uint32 cooldownDuration) internal view returns (bool) {\\n return _getNullifierCooldownStart(nullifier) + cooldownDuration > block.timestamp;\\n }\\n\\n /**\\n * @dev Delete the previous attestation created with this nullifier\\n * @param claim user claim\\n * @param previousNullifierDestination previous destination chosen for this user nullifier\\n */\\n function _deletePreviousAttestation(\\n HydraS1Claim memory claim,\\n address previousNullifierDestination\\n ) internal {\\n address[] memory attestationOwners = new address[](1);\\n uint256[] memory attestationCollectionIds = new uint256[](1);\\n\\n attestationOwners[0] = previousNullifierDestination;\\n attestationCollectionIds[0] = AUTHORIZED_COLLECTION_ID_FIRST + claim.groupProperties.groupIndex;\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\\n }\\n\\n function _setNullifierOnCooldownAndIncrementBurnCount(uint256 nullifier) internal {\\n _nullifiersCooldownStart[nullifier] = uint32(block.timestamp);\\n _nullifiersBurnCount[nullifier] += 1;\\n emit NullifierSetOnCooldown(nullifier, _nullifiersBurnCount[nullifier]);\\n }\\n\\n function _getNullifierCooldownStart(uint256 nullifier) internal view returns (uint32) {\\n return _nullifiersCooldownStart[nullifier];\\n }\\n\\n function _getNullifierBurnCount(uint256 nullifier) internal view returns (uint16) {\\n return _nullifiersBurnCount[nullifier];\\n }\\n\\n /**\\n * @dev returns burn count or burn count + 1 if new burn will happen\\n * @param nullifier user nullifier\\n * @param claimDestination destination referenced in the user claim\\n */\\n function _getNextBurnCount(\\n uint256 nullifier,\\n address claimDestination\\n ) public view virtual returns (uint16) {\\n address previousNullifierDestination = _getDestinationOfNullifier(nullifier);\\n uint16 burnCount = _getNullifierBurnCount(nullifier);\\n // If the attestation is minted on a new destination address\\n // the burnCount that will be encoded in the extraData of the Attestation should be incremented\\n if (\\n previousNullifierDestination != address(0) && previousNullifierDestination != claimDestination\\n ) {\\n burnCount += 1;\\n }\\n return burnCount;\\n }\\n\\n /*******************************************************\\n GROUP CONFIGURATION LOGIC\\n *******************************************************/\\n\\n /**\\n * @dev Setter, sets the cooldown duration of a groupIndex\\n * @notice set to 0 to deactivate the accountbound feature for this group\\n * @param groupIndex internal collection id\\n * @param cooldownDuration cooldown duration we want to set for the groupIndex\\n **/\\n function setCooldownDurationForGroupIndex(\\n uint256 groupIndex,\\n uint32 cooldownDuration\\n ) external onlyOwner {\\n _cooldownDurations[groupIndex] = cooldownDuration;\\n emit CooldownDurationSetForGroupIndex(groupIndex, cooldownDuration);\\n }\\n\\n /**\\n * @dev Getter, get the cooldown duration of a groupIndex\\n * @notice returns 0 when the accountbound feature is deactivated for this group\\n * @param groupIndex internal collection id\\n **/\\n function getCooldownDurationForGroupIndex(uint256 groupIndex) external view returns (uint32) {\\n return _getCooldownDurationForGroupIndex(groupIndex);\\n }\\n\\n // = 0 means that the accountbound feature is deactivated for this group\\n function _getCooldownDurationForGroupIndex(uint256 groupIndex) internal view returns (uint32) {\\n return _cooldownDurations[groupIndex];\\n }\\n}\\n\",\"keccak256\":\"0x4c391f4bbfdd1b22039fdc7b43f12d7933deca89cc6ae9e5a2b5afa8c427762c\",\"license\":\"MIT\"},\"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';\\nimport {IHydraS1Base} from './base/IHydraS1Base.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 * - Nullified\\n * Each source account gets one nullifier per claim (i.e only one attestation per source account per claim)\\n * For people used to semaphore/ tornado cash people:\\n * nullifier = hash(sourceSecret, externalNullifier) <=> nullifierHash = hash(IdNullifier, externalNullifier)\\n \\n * - Renewable\\n * A nullifier 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 {\\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 /*******************************************************\\n Storage layout:\\n 20 slots for HydraS1\\n 1 slot used\\n 19 place holders\\n *******************************************************/\\n\\n mapping(uint256 => address) internal _nullifiersDestinations;\\n\\n // keeping some space for future\\n uint256[19] private _placeHoldersHydraS1Simple;\\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(\\n Request calldata request,\\n bytes calldata proofData\\n ) internal virtual override {\\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(\\n Request calldata request,\\n bytes calldata proofData\\n ) public view virtual override(IAttester, Attester) returns (Attestation[] memory) {\\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 uint256 nullifier = proofData._getNullifier();\\n\\n attestations[0] = Attestation(\\n attestationCollectionId,\\n claim.destination,\\n issuer,\\n claim.claimedValue,\\n claim.groupProperties.generationTimestamp,\\n abi.encode(nullifier)\\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 nullifier 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(\\n Request calldata request,\\n bytes calldata proofData\\n ) internal virtual override {\\n // we get the nullifier used from the snark input in the data provided\\n uint256 nullifier = proofData._getNullifier();\\n address currentDestination = _getDestinationOfNullifier(nullifier);\\n\\n if (currentDestination != address(0) && currentDestination != request.destination) {\\n revert NullifierUsed(nullifier);\\n }\\n\\n _setDestinationForNullifier(nullifier, request.destination);\\n }\\n\\n /*******************************************************\\n Hydra-S1 MANDATORY FUNCTIONS FROM Hydra-S1 Base Attester\\n *******************************************************/\\n\\n /**\\n * @dev Returns the external nullifier from a user claim\\n * @param claim user Hydra-S1 claim = have an account with a specific value in a specific group\\n * nullifier = hash(sourceSecretHash, externalNullifier), which is verified inside the snark\\n * users bring sourceSecretHash as private input in snark which guarantees privacy\\n \\n * Here we chose externalNullifier = hash(attesterAddress, claim.GroupId)\\n * Creates one nullifier per group, per user and makes sure no collision with other attester's nullifiers\\n **/\\n function _getExternalNullifierOfClaim(\\n HydraS1Claim memory claim\\n ) internal view override returns (uint256) {\\n uint256 externalNullifier = _encodeInSnarkField(\\n address(this),\\n claim.groupProperties.groupIndex\\n );\\n return externalNullifier;\\n }\\n\\n /**\\n * @dev returns the nullifier for a given extraData\\n * @param extraData bytes where the nullifier is encoded\\n */\\n function getNullifierFromExtraData(\\n bytes memory extraData\\n ) external pure virtual override(IHydraS1Base, HydraS1Base) returns (uint256) {\\n return abi.decode(extraData, (uint256));\\n }\\n\\n /*******************************************************\\n Hydra-S1 Attester Specific Functions\\n *******************************************************/\\n\\n /**\\n * @dev Getter, returns the last attestation destination of a nullifier\\n * @param nullifier nullifier used\\n **/\\n function getDestinationOfNullifier(uint256 nullifier) external view override returns (address) {\\n return _getDestinationOfNullifier(nullifier);\\n }\\n\\n function _setDestinationForNullifier(uint256 nullifier, address destination) internal virtual {\\n _nullifiersDestinations[nullifier] = destination;\\n emit NullifierDestinationUpdated(nullifier, destination);\\n }\\n\\n function _getDestinationOfNullifier(uint256 nullifier) internal view returns (address) {\\n return _nullifiersDestinations[nullifier];\\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\":\"0x7bb2f154f8b33d4c536ebe7828baeb25853d9c288d85b75f0f9d4c3a8e01e735\",\"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 {Attester} from '../../../core/Attester.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 the following:\\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 */\\nabstract contract HydraS1Base is IHydraS1Base, Attester, 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 /**\\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 nullifier from an attestation extraData\\n * @dev Getter of a nullifier encoded in extraData\\n * @notice Must be implemented by the inheriting contracts\\n * @param extraData extraData where nullifier can be encoded\\n */\\n function getNullifierFromExtraData(\\n bytes memory extraData\\n ) external view virtual returns (uint256);\\n\\n /**\\n * @dev MANDATORY: must be implemented to return the external nullifier from a user request\\n * so it can be checked against snark input\\n * nullifier = hash(sourceSecretHash, externalNullifier), 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 external nullifiers\\n *\\n * Do they get one external nullifier per claim?\\n * Do they get 2 external nullifiers per claim?\\n * Do they get 1 external nullifier 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 _getExternalNullifierOfClaim(\\n HydraS1Claim memory claim\\n ) internal view virtual 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(\\n HydraS1Claim memory claim,\\n HydraS1ProofInput memory input\\n ) internal view virtual {\\n if (input.accountsTreeValue != claim.groupId) {\\n revert AccountsTreeValueMismatch(claim.groupId, input.accountsTreeValue);\\n }\\n\\n if (input.isStrict == claim.groupProperties.isScore) {\\n revert IsStrictMismatch(claim.groupProperties.isScore, input.isStrict);\\n }\\n\\n if (input.destination != claim.destination) {\\n revert DestinationMismatch(claim.destination, input.destination);\\n }\\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\\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\\n uint256 externalNullifier = _getExternalNullifierOfClaim(claim);\\n\\n if (input.externalNullifier != externalNullifier) {\\n revert ExternalNullifierMismatch(externalNullifier, input.externalNullifier);\\n }\\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(uint256 /*errorCode*/) {\\n revert InvalidGroth16Proof('');\\n } catch (bytes memory /*lowLevelData*/) {\\n revert InvalidGroth16Proof('');\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8614a04a2a58649b4434fab39ca30e3ff0d94d09998355dbd9fa5bf762b3c845\",\"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 {IAttester} from '../../../core/interfaces/IAttester.sol';\\nimport {HydraS1Verifier, HydraS1Lib, HydraS1ProofData} 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 Interface\\n * @author Sismo\\n * @notice Interface 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 errors and method specific of the Hydra-S1 attesters family and the Hydra-S1 ZK Proving Scheme\\n * We invite readers to refer to the following:\\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 **/\\ninterface IHydraS1Base is IAttester {\\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 ExternalNullifierMismatch(uint256 expectedExternalNullifier, uint256 externalNullifier);\\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 function getNullifierFromExtraData(bytes memory extraData) external view returns (uint256);\\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\":\"0x65b9966e5cf43975edb64c742057153058ee31bea1beadf4456577e9d5dbc76d\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/interfaces/IHydraS1AccountboundAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {IHydraS1SimpleAttester} from '././IHydraS1SimpleAttester.sol';\\n\\n/**\\n * @title Hydra-S1 Accountbound Interface\\n * @author Sismo\\n * @notice Interface of the HydraS1AccountboundAttester contract which inherits from the errors, events and methods specific to the HydraS1SimpleAttester interface.\\n **/\\ninterface IHydraS1AccountboundAttester is IHydraS1SimpleAttester {\\n /**\\n * @dev Event emitted when the duration of the cooldown duration for a group index (internal collection id) has been set\\n * @param groupIndex internal collection id\\n * @param cooldownDuration the duration of the cooldown period\\n **/\\n event CooldownDurationSetForGroupIndex(uint256 indexed groupIndex, uint32 cooldownDuration);\\n\\n /**\\n * @dev Event emitted when the nullifier has been set on cooldown. This happens when the\\n * attestation destination of a nullifier has been changed\\n * @param nullifier user nullifier\\n * @param burnCount the number of times the attestation destination of a nullifier has been changed\\n **/\\n event NullifierSetOnCooldown(uint256 indexed nullifier, uint16 burnCount);\\n\\n /**\\n * @dev Error when the nullifier is on cooldown. The user have to wait the cooldownDuration\\n * before being able to change again the destination address.\\n **/\\n error NullifierOnCooldown(\\n uint256 nullifier,\\n address destination,\\n uint16 burnCount,\\n uint32 cooldownStart\\n );\\n\\n /**\\n * @dev Error when the cooldown duration for a given groupIndex is equal to zero.\\n * The HydraS1AccountboundAttester behaves like the HydraS1SimpleAttester.\\n **/\\n error CooldownDurationNotSetForGroupIndex(uint256 groupIndex);\\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 returns the nullifier for a given extraData\\n * @param extraData bytes where the nullifier is encoded\\n */\\n function getNullifierFromExtraData(bytes memory extraData) external pure returns (uint256);\\n\\n /**\\n * @dev Returns the burn count for a given extraData\\n * @param extraData bytes where the burnCount is encoded\\n */\\n function getBurnCountFromExtraData(bytes memory extraData) external pure returns (uint16);\\n\\n /**\\n * @dev Getter, returns the cooldown start of a nullifier\\n * @param nullifier nullifier used\\n **/\\n function getNullifierCooldownStart(uint256 nullifier) external view returns (uint32);\\n\\n /**\\n * @dev Getter, returns the burnCount of a nullifier\\n * @param nullifier nullifier used\\n **/\\n function getNullifierBurnCount(uint256 nullifier) external view returns (uint16);\\n\\n /**\\n * @dev Setter, sets the cooldown duration of a groupIndex\\n * @param groupIndex internal collection id\\n * @param cooldownDuration cooldown duration we want to set for the groupIndex\\n **/\\n function setCooldownDurationForGroupIndex(uint256 groupIndex, uint32 cooldownDuration) external;\\n\\n /*/**\\n * @dev Getter, get the cooldown duration of a groupIndex\\n * @notice returns 0 when the accountbound feature is deactivated for this group\\n * @param groupIndex internal collection id\\n **/\\n function getCooldownDurationForGroupIndex(uint256 groupIndex) external view returns (uint32);\\n}\\n\",\"keccak256\":\"0x69293ce8ee200e3ce8b34478b5dde62d934e32c4f82d173314a4ed72731b3663\",\"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 {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/**\\n * @title Hydra-S1 Accountbound Interface\\n * @author Sismo\\n * @notice Interface with errors, events and methods specific to the HydraS1SimpleAttester.\\n **/\\ninterface IHydraS1SimpleAttester is IHydraS1Base {\\n /**\\n * @dev Error when the nullifier is already used for a destination address\\n **/\\n error NullifierUsed(uint256 nullifier);\\n\\n /**\\n * @dev Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST\\n **/\\n error CollectionIdOutOfBound(uint256 collectionId);\\n\\n /**\\n * @dev Event emitted when the nullifier is associated to a destination address.\\n **/\\n event NullifierDestinationUpdated(uint256 nullifier, address newOwner);\\n\\n /**\\n * @dev Getter, returns the last attestation destination of a nullifier\\n * @param nullifier nullifier used\\n **/\\n function getDestinationOfNullifier(uint256 nullifier) 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\":\"0x8222c187e8314c931121c7632965316f079322b076501a5443d3102a0891a8d5\",\"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 // externalNullifier\\n // nullifier\\n // claimedValue\\n // accountsTreeValue\\n // isStrict\\n}\\n\\nstruct HydraS1ProofInput {\\n address destination;\\n uint256 chainId;\\n uint256 registryRoot;\\n uint256 externalNullifier;\\n uint256 nullifier;\\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 _getNullifier(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(\\n HydraS1ProofData memory self\\n )\\n internal\\n pure\\n returns (uint256[2] memory, uint256[2][2] memory, uint256[2] memory, uint256[10] memory)\\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(\\n HydraS1ProofData memory self\\n ) internal pure returns (uint256[2] memory) {\\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(\\n HydraS1ProofData memory self\\n ) internal pure returns (uint256) {\\n return self.input[5];\\n }\\n\\n function _getNullifier(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 _getNullifier(bytes calldata self) internal pure returns (uint256) {\\n HydraS1ProofData memory snarkProofData = abi.decode(self, (HydraS1ProofData));\\n uint256 nullifier = uint256(_getNullifier(snarkProofData));\\n return nullifier;\\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(\\n bytes memory encodedProperties\\n ) internal pure returns (uint256) {\\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\":\"0xa484f046e44f6c77177ba6f165573dc3ee90680a057dff7d3de46d67a29c462a\",\"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(\\n Request calldata request,\\n bytes calldata proofData\\n ) external override returns (Attestation[] memory) {\\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 address[] memory attestationOwners = new address[](collectionIds.length);\\n\\n uint256[] memory attestationCollectionIds = new uint256[](collectionIds.length);\\n\\n Attestation[] memory attestations = new Attestation[](collectionIds.length);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n // fetch attestations from the registry\\n (\\n address issuer,\\n uint256 attestationValue,\\n uint32 timestamp,\\n bytes memory extraData\\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\\n\\n attestationOwners[i] = attestationsOwner;\\n attestationCollectionIds[i] = collectionIds[i];\\n\\n attestations[i] = (\\n Attestation(\\n collectionIds[i],\\n attestationsOwner,\\n issuer,\\n attestationValue,\\n timestamp,\\n extraData\\n )\\n );\\n }\\n\\n _verifyAttestationsDeletionRequest(attestations, proofData);\\n\\n _beforeDeleteAttestations(attestations, proofData);\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\\n\\n _afterDeleteAttestations(attestations, proofData);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n emit AttestationDeleted(attestations[i]);\\n }\\n return attestations;\\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(\\n Request calldata request,\\n bytes calldata proofData\\n ) public view virtual 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(\\n Request calldata request,\\n bytes calldata proofData\\n ) internal virtual {}\\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(\\n Attestation[] memory attestations,\\n bytes calldata proofData\\n ) internal virtual {}\\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(\\n Attestation[] memory attestations,\\n bytes calldata proofData\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x7743f02ed07e1b40a2ff45f5a45b5fe87d765326cce3528676cbd36c3d08ba37\",\"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';\\nimport {IAttestationsRegistryConfigLogic} from './IAttestationsRegistryConfigLogic.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry is IAttestationsRegistryConfigLogic {\\n error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view returns (address, uint256, uint32, bytes memory);\\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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view 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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0x0c3af349bcfa545c959f4d9f25aacb73e3ef1ca7cfe62a2eda4a743a6835904f\",\"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 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 error AttributeDoesNotExist(uint8 attributeIndex);\\n error AttributeAlreadyExists(uint8 attributeIndex);\\n error ArgsLengthDoesNotMatch();\\n\\n event NewAttributeCreated(uint8 attributeIndex, bytes32 attributeName);\\n event AttributeNameUpdated(\\n uint8 attributeIndex,\\n bytes32 newAttributeName,\\n bytes32 previousAttributeName\\n );\\n event AttributeDeleted(uint8 attributeIndex, bytes32 deletedAttributeName);\\n\\n event AttestationsCollectionAttributeSet(\\n uint256 collectionId,\\n uint8 attributeIndex,\\n uint8 attributeValue\\n );\\n\\n event IssuerAuthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n event IssuerUnauthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n\\n /**\\n * @dev Returns whether an attestationsCollection has a specific attribute referenced by its index\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute. Can go from 0 to 63.\\n */\\n function attestationsCollectionHasAttribute(\\n uint256 collectionId,\\n uint8 index\\n ) external view returns (bool);\\n\\n function attestationsCollectionHasAttributes(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (bool);\\n\\n /**\\n * @dev Returns the attribute's value (from 1 to 15) of an attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param attributeIndex Index of the attribute. Can go from 0 to 63.\\n */\\n function getAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 attributeIndex\\n ) external view returns (uint8);\\n\\n function getAttributesValuesForAttestationsCollection(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (uint8[] memory);\\n\\n /**\\n * @dev Set a value for an attribute of an attestationsCollection. The attribute should already be created.\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute (must be between 0 and 63)\\n * @param value Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15\\n */\\n function setAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 index,\\n uint8 value\\n ) external;\\n\\n function setAttributesValuesForAttestationsCollections(\\n uint256[] memory collectionIds,\\n uint8[] memory indices,\\n uint8[] memory values\\n ) external;\\n\\n /**\\n * @dev Returns all the enabled attributes names and their values for a specific attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n */\\n function getAttributesNamesAndValuesForAttestationsCollection(\\n uint256 collectionId\\n ) external view returns (bytes32[] memory, uint8[] memory);\\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 /**\\n * @dev Create a new attribute.\\n * @param index Index of the attribute. Can go from 0 to 63.\\n * @param name Name in bytes32 of the attribute\\n */\\n function createNewAttribute(uint8 index, bytes32 name) external;\\n\\n function createNewAttributes(uint8[] memory indices, bytes32[] memory names) external;\\n\\n /**\\n * @dev Update the name of an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n * @param newName new name in bytes32 of the attribute\\n */\\n function updateAttributeName(uint8 index, bytes32 newName) external;\\n\\n function updateAttributesName(uint8[] memory indices, bytes32[] memory names) external;\\n\\n /**\\n * @dev Delete an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n */\\n function deleteAttribute(uint8 index) external;\\n\\n function deleteAttributes(uint8[] memory indices) external;\\n}\\n\",\"keccak256\":\"0x07a1a9e8d2caf1d810ba8fb760a35ce2a0ef60a76814d44881a5aa56162ce26b\",\"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(\\n Request calldata request,\\n bytes calldata proofData\\n ) external 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(\\n Request calldata request,\\n bytes calldata proofData\\n ) external view 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\":\"0x2d5faf5df56dfe1294202e89180846a1d4a5f938699619ee73b60c7314a97dfe\",\"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/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\"},\"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 uint8 public constant IMPLEMENTATION_VERSION = 2;\\n\\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 ownerAddress Owner of the contract, can update public key and address\\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\n */\\n function initialize(address ownerAddress) public reinitializer(IMPLEMENTATION_VERSION) {\\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\\n if (owner() == address(0) || address(this).code.length == 0) {\\n _transferOwnership(ownerAddress);\\n }\\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\":\"0x3467998cbdb82b0c64aa8627efc5893d2b369f73e66e5d1095305e4609593cc5\",\"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 uint8 public constant IMPLEMENTATION_VERSION = 2;\\n\\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 ownerAddress 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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\n */\\n function initialize(\\n address ownerAddress,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) public reinitializer(IMPLEMENTATION_VERSION) {\\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\\n if (owner() == address(0) || address(this).code.length == 0) {\\n _transferOwnership(ownerAddress);\\n _updateCommitmentMapperEdDSAPubKey(commitmentMapperEdDSAPubKey);\\n _updateCommitmentMapperAddress(commitmentMapperAddress);\\n }\\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\":\"0x1b6ab7a4ba266f3da2c7f6ba3de93e3ab89f389dbd6db14514b43cbdcbe9fe09\",\"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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\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\":\"0x5e882d3091e816f1286837eef92ae17737abf66fdeece1282b752f27ba18492b\",\"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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\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\":\"0xcb419cf389baad6f38de28625718f64f551d2669339c1b4e1887e11d62484469\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101406040523480156200001257600080fd5b5060405162002b2738038062002b2783398101604081905262000035916200020f565b6001600160a01b0387811660805286811660a05285811660e052841660c0526101008390526101208290526200006b3362000083565b6200007681620000d5565b5050505050505062000292565b601580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054600490610100900460ff16158015620000f8575060005460ff8083169116105b620001605760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805461ffff191660ff831617610100178155620001876015546001600160a01b031690565b6001600160a01b031614806200019c5750303b155b15620001ad57620001ad8262000083565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b80516001600160a01b03811681146200020a57600080fd5b919050565b600080600080600080600060e0888a0312156200022b57600080fd5b6200023688620001f2565b96506200024660208901620001f2565b95506200025660408901620001f2565b94506200026660608901620001f2565b93506080880151925060a088015191506200028460c08901620001f2565b905092959891949750929550565b60805160a05160c05160e05161010051610120516127ff620003286000396000818161025e0152610d9201526000818161023701528181610d6a01526117200152600081816102dd01526112fa01526000818161017901526113960152600081816101f901526114f7015260008181610323015281816107820152818161096301528181610ae8015261177901526127ff6000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80638b159099116100b8578063c4d66de81161007c578063c4d66de814610347578063c776adde1461035a578063ca1cc6461461036d578063e60f999f14610380578063f2fde38b14610393578063f7e420b3146103a657600080fd5b80638b159099146102a25780638da5cb5b146102ca578063918447af146102db578063af411a3014610301578063bfa665851461032157600080fd5b806346657fe91161010a57806346657fe9146101f7578063524a32481461021d57806354846d7a146102325780637000b05114610259578063715018a614610280578063754b377c1461028857600080fd5b8063063599db146101475780632254f98e14610177578063345dd9891461019d5780633800a4b9146101be5780633c4a9854146101e4575b600080fd5b61015a610155366004611bbf565b6103b9565b6040516001600160a01b0390911681526020015b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000061015a565b6101b06101ab366004611ce1565b6103d8565b60405190815260200161016e565b6101d16101cc366004611bbf565b6103f7565b60405161ffff909116815260200161016e565b6101d16101f2366004611ce1565b61040f565b7f000000000000000000000000000000000000000000000000000000000000000061015a565b61023061022b366004611d27565b61042e565b005b6101b07f000000000000000000000000000000000000000000000000000000000000000081565b6101b07f000000000000000000000000000000000000000000000000000000000000000081565b610230610494565b610290600481565b60405160ff909116815260200161016e565b6102b56102b0366004611bbf565b6104a8565b60405163ffffffff909116815260200161016e565b6015546001600160a01b031661015a565b7f000000000000000000000000000000000000000000000000000000000000000061015a565b61031461030f366004611d9f565b6104c2565b60405161016e9190611ec2565b7f000000000000000000000000000000000000000000000000000000000000000061015a565b610230610355366004611f49565b610573565b610314610368366004611f66565b61068b565b6101d161037b366004612017565b610a46565b61031461038e366004611d9f565b610aaa565b6102306103a1366004611f49565b610bc6565b6102b56103b4366004611bbf565b610c3f565b6000818152600160205260408120546001600160a01b03165b92915050565b600080828060200190518101906103ef919061203c565b509392505050565b6000818152603e602052604081205461ffff166103d2565b60008082806020019051810190610426919061203c565b949350505050565b610436610c59565b600082815260296020908152604091829020805463ffffffff191663ffffffff8516908117909155915191825283917f893e2a4c394b497c1a2b041d18acc02d05deb2cc7ae3ea0f85d001aa93dff48b910160405180910390a25050565b61049c610c59565b6104a66000610cb3565b565b60008181526029602052604081205463ffffffff166103d2565b606060006104d1858585610d05565b905060006104df8585610e84565b9050816000815181106104f4576104f4612068565b602002602001015160a00151610528828460008151811061051757610517612068565b602002602001015160200151610a46565b60405160200161053992919061207e565b6040516020818303038152906040528260008151811061055b5761055b612068565b602090810291909101015160a0015250949350505050565b600054600490610100900460ff16158015610595575060005460ff8083169116105b6105fd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805461ffff191660ff8316176101001781556106236015546001600160a01b031690565b6001600160a01b031614806106375750303b155b156106455761064582610cb3565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b60606000856001600160401b038111156106a7576106a7611bd8565b6040519080825280602002602001820160405280156106d0578160200160208202803683370190505b5090506000866001600160401b038111156106ed576106ed611bd8565b604051908082528060200260200182016040528015610716578160200160208202803683370190505b5090506000876001600160401b0381111561073357610733611bd8565b60405190808252806020026020018201604052801561076c57816020015b610759611a9d565b8152602001906001900390816107515790505b50905060005b88811015610940576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f888181106107c1576107c1612068565b905060200201358e6040518363ffffffff1660e01b81526004016107f89291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610815573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261083d91908101906120a4565b93509350935093508b88868151811061085857610858612068565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061088a5761088a612068565b905060200201358786815181106108a3576108a3612068565b6020026020010181815250506040518060c001604052808f8f888181106108cc576108cc612068565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061091e5761091e612068565b60200260200101819052505050505080806109389061216c565b915050610772565b5061094c818787610ea0565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af79061099a9086908690600401612185565b600060405180830381600087803b1580156109b457600080fd5b505af11580156109c8573d6000803e3d6000fd5b5050505060005b88811015610a39577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b828281518110610a0a57610a0a612068565b6020026020010151604051610a1f9190612209565b60405180910390a180610a318161216c565b9150506109cf565b5098975050505050505050565b600082815260016020908152604080832054603e9092528220546001600160a01b039091169061ffff168115801590610a915750836001600160a01b0316826001600160a01b031614155b1561042657610aa160018261221c565b95945050505050565b6060610ab7848484610eb9565b6000610ac48585856104c2565b9050610ad1858585610f01565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c09390610b1d908490600401611ec2565b600060405180830381600087803b158015610b3757600080fd5b505af1158015610b4b573d6000803e3d6000fd5b5050505060005b8151811015610bbd577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc828281518110610b8e57610b8e612068565b6020026020010151604051610ba39190612209565b60405180910390a180610bb58161216c565b915050610b52565b50949350505050565b610bce610c59565b6001600160a01b038116610c335760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105f4565b610c3c81610cb3565b50565b6000818152603d602052604081205463ffffffff166103d2565b6015546001600160a01b031633146104a65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105f4565b601580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606000610d1a610d1586612242565b611057565b60408051600180825281830190925291925060009190816020015b610d3d611a9d565b815260200190600190039081610d35575050606083015151909150600090610d8e906001600160801b03167f000000000000000000000000000000000000000000000000000000000000000061236b565b90507f0000000000000000000000000000000000000000000000000000000000000000811115610dd457604051637bbf29e360e01b8152600481018290526024016105f4565b306000610de18888610e84565b90506040518060c0016040528084815260200186604001516001600160a01b03168152602001836001600160a01b031681526020018660200151815260200186606001516020015163ffffffff16815260200182604051602001610e4791815260200190565b60405160208183030381529060405281525084600081518110610e6c57610e6c612068565b60209081029190910101525091979650505050505050565b600080610e9383850185612439565b90506000610aa1826110dc565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610ec782840184612439565b90506000610ed4826110f2565b90506000610ee4610d1587612242565b9050610ef0818361119c565b610ef9836114cd565b505050505050565b6000610f0d8383610e84565b6000818152600160205260408120549192506001600160a01b0390911690610f37610d1587612242565b90506001600160a01b03821615801590610f67575080604001516001600160a01b0316826001600160a01b031614155b1561103e576060810151516001600160801b031660009081526029602052604081205463ffffffff1690819003610fc35760608201515160405163065ef5f360e01b81526001600160801b0390911660048201526024016105f4565b610fcd848261166a565b15611029576000848152603e602052604081205461ffff16604051630d16862d60e11b8152600481018790526001600160a01b038616602482015261ffff8216604482015263ffffffff841660648201529091506084016105f4565b611033828461169a565b61103c846117e8565b505b610ef9836110526040890160208a01611f49565b61188f565b61105f611aeb565b6000826000015160008151811061107857611078612068565b6020026020010151905061108b816118ee565b600081604001518060200190518101906110a5919061251a565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b602081015160009060065b602002015192915050565b6110fa611b4e565b60405180610120016040528061110f8461192e565b6001600160a01b031681526020016111268461193c565b81526020016111348461194b565b81526020016111428461195a565b8152602001611150846110dc565b815260200161115e84611969565b815260200161116c84611978565b81526020016111848460200151610120015160011490565b1515815260200161119484611987565b905292915050565b815160c0820151146111d157815160c082015160405163fe405c7760e01b8152600481019290925260248201526044016105f4565b81606001516040015115158160e0015115150361121c57606082015160409081015160e08301519151634629f1b560e11b8152901515600482015290151560248201526044016105f4565b81604001516001600160a01b031681600001516001600160a01b03161461127057604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016105f4565b468160200151146112a3576020810151604051630432cec160e31b815246600482015260248101919091526044016105f4565b81602001518160a00151146112de57602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016105f4565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015611349573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136d9190612595565b61139257806040015160405163cbfe7bc360e01b81526004016105f491815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa1580156113f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141591906125b0565b80516101008401515191925014158061143c57506020808201516101008401519091015114155b15611486578051602080830151610100850151805192015160405163318d812b60e01b815260048101949094526024840191909152604483019190915260648201526084016105f4565b6000611491846119df565b9050808360600151146114c7576060830151604051630e6efbdd60e21b81526105f4918391600401918252602082015260400190565b50505050565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f6946115309490939290919060040161262c565b602060405180830381865afa925050508015611569575060408051601f3d908101601f1916820190925261156691810190612595565b60015b61163f576115756126b0565b806308c379a0036115ae57506115896126cc565b8061159457506115ed565b8060405162dd577760e81b81526004016105f49190612755565b634e487b71036115ed576115c0612768565b906115cb57506115ed565b60405162dd577760e81b815260206004820152600060248201526044016105f4565b3d808015611617576040519150601f19603f3d011682016040523d82523d6000602084013e61161c565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016105f4565b806116665760405162dd577760e81b815260206004820152600060248201526044016105f4565b5050565b6000828152603d6020526040812054429061168c90849063ffffffff16612788565b63ffffffff16119392505050565b60408051600180825281830190925260009160208083019080368337505060408051600180825281830190925292935060009291506020808301908036833701905050905082826000815181106116f3576116f3612068565b6001600160a01b0390921660209283029190910190910152606084015151611744906001600160801b03167f000000000000000000000000000000000000000000000000000000000000000061236b565b8160008151811061175757611757612068565b602090810291909101015260405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af7906117b09085908590600401612185565b600060405180830381600087803b1580156117ca57600080fd5b505af11580156117de573d6000803e3d6000fd5b5050505050505050565b6000818152603d60209081526040808320805463ffffffff19164263ffffffff16179055603e909152812080546001929061182890849061ffff1661221c565b82546101009290920a61ffff8181021990931691831602179091556000838152603e60209081526040918290205491519190921681528392507f85183f8abad8891335fb845d2e6b4f84a9c7f7409f242f4e5ec138a84abffacf910160405180910390a250565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f0c5a122814a29e22d1363dacdd6f7c95345b70890f97e65eacb5565da28116ac910161067f565b60006118fd8260400151611a04565b825190915081146116665781516040516337e3d1ab60e01b81526105f4918391600401918252602082015260400190565b6020810151600090816110e7565b602081015160009060016110e7565b602081015160009060046110e7565b602081015160009060056110e7565b602081015160009060076110e7565b602081015160009060086110e7565b61198f611ba1565b604051806040016040528083602001516002600a81106119b1576119b1612068565b6020020151815260200183602001516003600a81106119d2576119d2612068565b6020020151905292915050565b6000806119fd308460600151600001516001600160801b0316611a39565b9392505050565b805160208201206000906103d2907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906127a7565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6119fd91906127a7565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b6040518060800160405280600081526020016000815260200160006001600160a01b03168152602001611b49604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b905290565b60405180610120016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600015158152602001611b495b60405180604001604052806002906020820280368337509192915050565b600060208284031215611bd157600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b0382111715611c0d57611c0d611bd8565b60405250565b606081018181106001600160401b0382111715611c0d57611c0d611bd8565b601f8201601f191681016001600160401b0381118282101715611c5757611c57611bd8565b6040525050565b60006001600160401b03821115611c7757611c77611bd8565b50601f01601f191660200190565b600082601f830112611c9657600080fd5b8135611ca181611c5e565b604051611cae8282611c32565b828152856020848701011115611cc357600080fd5b82602086016020830137600092810160200192909252509392505050565b600060208284031215611cf357600080fd5b81356001600160401b03811115611d0957600080fd5b61042684828501611c85565b63ffffffff81168114610c3c57600080fd5b60008060408385031215611d3a57600080fd5b823591506020830135611d4c81611d15565b809150509250929050565b60008083601f840112611d6957600080fd5b5081356001600160401b03811115611d8057600080fd5b602083019150836020828501011115611d9857600080fd5b9250929050565b600080600060408486031215611db457600080fd5b83356001600160401b0380821115611dcb57600080fd5b9085019060408288031215611ddf57600080fd5b90935060208501359080821115611df557600080fd5b50611e0286828701611d57565b9497909650939450505050565b60005b83811015611e2a578181015183820152602001611e12565b838111156114c75750506000910152565b60008151808452611e53816020860160208601611e0f565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261042660c0850182611e3b565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611f1757603f19888603018452611f05858351611e67565b94509285019290850190600101611ee9565b5092979650505050505050565b6001600160a01b0381168114610c3c57600080fd5b8035611f4481611f24565b919050565b600060208284031215611f5b57600080fd5b81356119fd81611f24565b600080600080600060608688031215611f7e57600080fd5b85356001600160401b0380821115611f9557600080fd5b818801915088601f830112611fa957600080fd5b813581811115611fb857600080fd5b8960208260051b8501011115611fcd57600080fd5b60208301975080965050611fe360208901611f39565b94506040880135915080821115611ff957600080fd5b5061200688828901611d57565b969995985093965092949392505050565b6000806040838503121561202a57600080fd5b823591506020830135611d4c81611f24565b6000806040838503121561204f57600080fd5b82519150602083015161ffff81168114611d4c57600080fd5b634e487b7160e01b600052603260045260246000fd5b6040815260006120916040830185611e3b565b905061ffff831660208301529392505050565b600080600080608085870312156120ba57600080fd5b84516120c581611f24565b6020860151604087015191955093506120dd81611d15565b60608601519092506001600160401b038111156120f957600080fd5b8501601f8101871361210a57600080fd5b805161211581611c5e565b6040516121228282611c32565b82815289602084860101111561213757600080fd5b612148836020830160208701611e0f565b969995985093965050505050565b634e487b7160e01b600052601160045260246000fd5b60006001820161217e5761217e612156565b5060010190565b604080825283519082018190526000906020906060840190828701845b828110156121c75781516001600160a01b0316845292840192908401906001016121a2565b5050508381038285015284518082528583019183019060005b818110156121fc578351835292840192918401916001016121e0565b5090979650505050505050565b6020815260006119fd6020830184611e67565b600061ffff80831681851680830382111561223957612239612156565b01949350505050565b6000604080833603121561225557600080fd5b805161226081611bee565b83356001600160401b038082111561227757600080fd5b9085019036601f83011261228a57600080fd5b813560208282111561229e5761229e611bd8565b8160051b86516122b083830182611c32565b928352848101820192828101368511156122c957600080fd5b83870192505b8483101561234d578235868111156122e75760008081fd5b8701606036829003601f19018113156123005760008081fd5b8a5161230b81611c13565b8287013581528b8301358188015290820135908882111561232c5760008081fd5b61233a368884860101611c85565b818d0152835250509183019183016122cf565b5086525061235c888201611f39565b90850152509195945050505050565b6000821982111561237e5761237e612156565b500190565b600082601f83011261239457600080fd5b6040516123a081611bee565b8060408401858111156123b257600080fd5b845b818110156123cc5780358352602092830192016123b4565b509195945050505050565b600082601f8301126123e857600080fd5b6040516101408082018281106001600160401b038211171561240c5761240c611bd8565b6040528301818582111561241f57600080fd5b845b828110156123cc578035825260209182019101612421565b600081830361024081121561244d57600080fd5b6040805161245a81611bee565b6101008084121561246a57600080fd5b8251935061247784611c13565b6124818787612383565b845286605f87011261249257600080fd5b825161249d81611bee565b8060c08801898111156124af57600080fd5b8589015b818110156124d4576124c58b82612383565b835260209092019186016124b3565b508260208801526124e58a82612383565b868801525050508382526124fb878288016123d7565b60208301525095945050505050565b80518015158114611f4457600080fd5b60006060828403121561252c57600080fd5b604051606081018181106001600160401b038211171561254e5761254e611bd8565b60405282516001600160801b038116811461256857600080fd5b8152602083015161257881611d15565b60208201526125896040840161250a565b60408201529392505050565b6000602082840312156125a757600080fd5b6119fd8261250a565b6000604082840312156125c257600080fd5b82601f8301126125d157600080fd5b6040516125dd81611bee565b8060408401858111156125ef57600080fd5b845b818110156123cc5780518352602092830192016125f1565b8060005b60028110156114c757815184526020938401939091019060010161260d565b610240810161263b8287612609565b60408083018660005b600281101561266b57612658838351612609565b9183019160209190910190600101612644565b5050505061267c60c0830185612609565b61010082018360005b600a8110156126a4578151835260209283019290910190600101612685565b50505095945050505050565b600060033d11156126c95760046000803e5060005160e01c5b90565b600060443d10156126da5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561270957505050505090565b82850191508151818111156127215750505050505090565b843d870101602082850101111561273b5750505050505090565b61274a60208286010187611c32565b509095945050505050565b6020815260006119fd6020830184611e3b565b60008060233d1115612784576020600460003e50506000516001905b9091565b600063ffffffff80831681851680830382111561223957612239612156565b6000826127c457634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220202a9a70b259c56940b27ba667618cafc46cd9a9f1eb7ea03e8803b68fee4b3964736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101425760003560e01c80638b159099116100b8578063c4d66de81161007c578063c4d66de814610347578063c776adde1461035a578063ca1cc6461461036d578063e60f999f14610380578063f2fde38b14610393578063f7e420b3146103a657600080fd5b80638b159099146102a25780638da5cb5b146102ca578063918447af146102db578063af411a3014610301578063bfa665851461032157600080fd5b806346657fe91161010a57806346657fe9146101f7578063524a32481461021d57806354846d7a146102325780637000b05114610259578063715018a614610280578063754b377c1461028857600080fd5b8063063599db146101475780632254f98e14610177578063345dd9891461019d5780633800a4b9146101be5780633c4a9854146101e4575b600080fd5b61015a610155366004611bbf565b6103b9565b6040516001600160a01b0390911681526020015b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000061015a565b6101b06101ab366004611ce1565b6103d8565b60405190815260200161016e565b6101d16101cc366004611bbf565b6103f7565b60405161ffff909116815260200161016e565b6101d16101f2366004611ce1565b61040f565b7f000000000000000000000000000000000000000000000000000000000000000061015a565b61023061022b366004611d27565b61042e565b005b6101b07f000000000000000000000000000000000000000000000000000000000000000081565b6101b07f000000000000000000000000000000000000000000000000000000000000000081565b610230610494565b610290600481565b60405160ff909116815260200161016e565b6102b56102b0366004611bbf565b6104a8565b60405163ffffffff909116815260200161016e565b6015546001600160a01b031661015a565b7f000000000000000000000000000000000000000000000000000000000000000061015a565b61031461030f366004611d9f565b6104c2565b60405161016e9190611ec2565b7f000000000000000000000000000000000000000000000000000000000000000061015a565b610230610355366004611f49565b610573565b610314610368366004611f66565b61068b565b6101d161037b366004612017565b610a46565b61031461038e366004611d9f565b610aaa565b6102306103a1366004611f49565b610bc6565b6102b56103b4366004611bbf565b610c3f565b6000818152600160205260408120546001600160a01b03165b92915050565b600080828060200190518101906103ef919061203c565b509392505050565b6000818152603e602052604081205461ffff166103d2565b60008082806020019051810190610426919061203c565b949350505050565b610436610c59565b600082815260296020908152604091829020805463ffffffff191663ffffffff8516908117909155915191825283917f893e2a4c394b497c1a2b041d18acc02d05deb2cc7ae3ea0f85d001aa93dff48b910160405180910390a25050565b61049c610c59565b6104a66000610cb3565b565b60008181526029602052604081205463ffffffff166103d2565b606060006104d1858585610d05565b905060006104df8585610e84565b9050816000815181106104f4576104f4612068565b602002602001015160a00151610528828460008151811061051757610517612068565b602002602001015160200151610a46565b60405160200161053992919061207e565b6040516020818303038152906040528260008151811061055b5761055b612068565b602090810291909101015160a0015250949350505050565b600054600490610100900460ff16158015610595575060005460ff8083169116105b6105fd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805461ffff191660ff8316176101001781556106236015546001600160a01b031690565b6001600160a01b031614806106375750303b155b156106455761064582610cb3565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b60606000856001600160401b038111156106a7576106a7611bd8565b6040519080825280602002602001820160405280156106d0578160200160208202803683370190505b5090506000866001600160401b038111156106ed576106ed611bd8565b604051908082528060200260200182016040528015610716578160200160208202803683370190505b5090506000876001600160401b0381111561073357610733611bd8565b60405190808252806020026020018201604052801561076c57816020015b610759611a9d565b8152602001906001900390816107515790505b50905060005b88811015610940576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f888181106107c1576107c1612068565b905060200201358e6040518363ffffffff1660e01b81526004016107f89291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610815573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261083d91908101906120a4565b93509350935093508b88868151811061085857610858612068565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061088a5761088a612068565b905060200201358786815181106108a3576108a3612068565b6020026020010181815250506040518060c001604052808f8f888181106108cc576108cc612068565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061091e5761091e612068565b60200260200101819052505050505080806109389061216c565b915050610772565b5061094c818787610ea0565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af79061099a9086908690600401612185565b600060405180830381600087803b1580156109b457600080fd5b505af11580156109c8573d6000803e3d6000fd5b5050505060005b88811015610a39577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b828281518110610a0a57610a0a612068565b6020026020010151604051610a1f9190612209565b60405180910390a180610a318161216c565b9150506109cf565b5098975050505050505050565b600082815260016020908152604080832054603e9092528220546001600160a01b039091169061ffff168115801590610a915750836001600160a01b0316826001600160a01b031614155b1561042657610aa160018261221c565b95945050505050565b6060610ab7848484610eb9565b6000610ac48585856104c2565b9050610ad1858585610f01565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c09390610b1d908490600401611ec2565b600060405180830381600087803b158015610b3757600080fd5b505af1158015610b4b573d6000803e3d6000fd5b5050505060005b8151811015610bbd577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc828281518110610b8e57610b8e612068565b6020026020010151604051610ba39190612209565b60405180910390a180610bb58161216c565b915050610b52565b50949350505050565b610bce610c59565b6001600160a01b038116610c335760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105f4565b610c3c81610cb3565b50565b6000818152603d602052604081205463ffffffff166103d2565b6015546001600160a01b031633146104a65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105f4565b601580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606000610d1a610d1586612242565b611057565b60408051600180825281830190925291925060009190816020015b610d3d611a9d565b815260200190600190039081610d35575050606083015151909150600090610d8e906001600160801b03167f000000000000000000000000000000000000000000000000000000000000000061236b565b90507f0000000000000000000000000000000000000000000000000000000000000000811115610dd457604051637bbf29e360e01b8152600481018290526024016105f4565b306000610de18888610e84565b90506040518060c0016040528084815260200186604001516001600160a01b03168152602001836001600160a01b031681526020018660200151815260200186606001516020015163ffffffff16815260200182604051602001610e4791815260200190565b60405160208183030381529060405281525084600081518110610e6c57610e6c612068565b60209081029190910101525091979650505050505050565b600080610e9383850185612439565b90506000610aa1826110dc565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610ec782840184612439565b90506000610ed4826110f2565b90506000610ee4610d1587612242565b9050610ef0818361119c565b610ef9836114cd565b505050505050565b6000610f0d8383610e84565b6000818152600160205260408120549192506001600160a01b0390911690610f37610d1587612242565b90506001600160a01b03821615801590610f67575080604001516001600160a01b0316826001600160a01b031614155b1561103e576060810151516001600160801b031660009081526029602052604081205463ffffffff1690819003610fc35760608201515160405163065ef5f360e01b81526001600160801b0390911660048201526024016105f4565b610fcd848261166a565b15611029576000848152603e602052604081205461ffff16604051630d16862d60e11b8152600481018790526001600160a01b038616602482015261ffff8216604482015263ffffffff841660648201529091506084016105f4565b611033828461169a565b61103c846117e8565b505b610ef9836110526040890160208a01611f49565b61188f565b61105f611aeb565b6000826000015160008151811061107857611078612068565b6020026020010151905061108b816118ee565b600081604001518060200190518101906110a5919061251a565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b602081015160009060065b602002015192915050565b6110fa611b4e565b60405180610120016040528061110f8461192e565b6001600160a01b031681526020016111268461193c565b81526020016111348461194b565b81526020016111428461195a565b8152602001611150846110dc565b815260200161115e84611969565b815260200161116c84611978565b81526020016111848460200151610120015160011490565b1515815260200161119484611987565b905292915050565b815160c0820151146111d157815160c082015160405163fe405c7760e01b8152600481019290925260248201526044016105f4565b81606001516040015115158160e0015115150361121c57606082015160409081015160e08301519151634629f1b560e11b8152901515600482015290151560248201526044016105f4565b81604001516001600160a01b031681600001516001600160a01b03161461127057604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016105f4565b468160200151146112a3576020810151604051630432cec160e31b815246600482015260248101919091526044016105f4565b81602001518160a00151146112de57602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016105f4565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015611349573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136d9190612595565b61139257806040015160405163cbfe7bc360e01b81526004016105f491815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa1580156113f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141591906125b0565b80516101008401515191925014158061143c57506020808201516101008401519091015114155b15611486578051602080830151610100850151805192015160405163318d812b60e01b815260048101949094526024840191909152604483019190915260648201526084016105f4565b6000611491846119df565b9050808360600151146114c7576060830151604051630e6efbdd60e21b81526105f4918391600401918252602082015260400190565b50505050565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f6946115309490939290919060040161262c565b602060405180830381865afa925050508015611569575060408051601f3d908101601f1916820190925261156691810190612595565b60015b61163f576115756126b0565b806308c379a0036115ae57506115896126cc565b8061159457506115ed565b8060405162dd577760e81b81526004016105f49190612755565b634e487b71036115ed576115c0612768565b906115cb57506115ed565b60405162dd577760e81b815260206004820152600060248201526044016105f4565b3d808015611617576040519150601f19603f3d011682016040523d82523d6000602084013e61161c565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016105f4565b806116665760405162dd577760e81b815260206004820152600060248201526044016105f4565b5050565b6000828152603d6020526040812054429061168c90849063ffffffff16612788565b63ffffffff16119392505050565b60408051600180825281830190925260009160208083019080368337505060408051600180825281830190925292935060009291506020808301908036833701905050905082826000815181106116f3576116f3612068565b6001600160a01b0390921660209283029190910190910152606084015151611744906001600160801b03167f000000000000000000000000000000000000000000000000000000000000000061236b565b8160008151811061175757611757612068565b602090810291909101015260405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af7906117b09085908590600401612185565b600060405180830381600087803b1580156117ca57600080fd5b505af11580156117de573d6000803e3d6000fd5b5050505050505050565b6000818152603d60209081526040808320805463ffffffff19164263ffffffff16179055603e909152812080546001929061182890849061ffff1661221c565b82546101009290920a61ffff8181021990931691831602179091556000838152603e60209081526040918290205491519190921681528392507f85183f8abad8891335fb845d2e6b4f84a9c7f7409f242f4e5ec138a84abffacf910160405180910390a250565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f0c5a122814a29e22d1363dacdd6f7c95345b70890f97e65eacb5565da28116ac910161067f565b60006118fd8260400151611a04565b825190915081146116665781516040516337e3d1ab60e01b81526105f4918391600401918252602082015260400190565b6020810151600090816110e7565b602081015160009060016110e7565b602081015160009060046110e7565b602081015160009060056110e7565b602081015160009060076110e7565b602081015160009060086110e7565b61198f611ba1565b604051806040016040528083602001516002600a81106119b1576119b1612068565b6020020151815260200183602001516003600a81106119d2576119d2612068565b6020020151905292915050565b6000806119fd308460600151600001516001600160801b0316611a39565b9392505050565b805160208201206000906103d2907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906127a7565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6119fd91906127a7565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b6040518060800160405280600081526020016000815260200160006001600160a01b03168152602001611b49604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b905290565b60405180610120016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600015158152602001611b495b60405180604001604052806002906020820280368337509192915050565b600060208284031215611bd157600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b0382111715611c0d57611c0d611bd8565b60405250565b606081018181106001600160401b0382111715611c0d57611c0d611bd8565b601f8201601f191681016001600160401b0381118282101715611c5757611c57611bd8565b6040525050565b60006001600160401b03821115611c7757611c77611bd8565b50601f01601f191660200190565b600082601f830112611c9657600080fd5b8135611ca181611c5e565b604051611cae8282611c32565b828152856020848701011115611cc357600080fd5b82602086016020830137600092810160200192909252509392505050565b600060208284031215611cf357600080fd5b81356001600160401b03811115611d0957600080fd5b61042684828501611c85565b63ffffffff81168114610c3c57600080fd5b60008060408385031215611d3a57600080fd5b823591506020830135611d4c81611d15565b809150509250929050565b60008083601f840112611d6957600080fd5b5081356001600160401b03811115611d8057600080fd5b602083019150836020828501011115611d9857600080fd5b9250929050565b600080600060408486031215611db457600080fd5b83356001600160401b0380821115611dcb57600080fd5b9085019060408288031215611ddf57600080fd5b90935060208501359080821115611df557600080fd5b50611e0286828701611d57565b9497909650939450505050565b60005b83811015611e2a578181015183820152602001611e12565b838111156114c75750506000910152565b60008151808452611e53816020860160208601611e0f565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261042660c0850182611e3b565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611f1757603f19888603018452611f05858351611e67565b94509285019290850190600101611ee9565b5092979650505050505050565b6001600160a01b0381168114610c3c57600080fd5b8035611f4481611f24565b919050565b600060208284031215611f5b57600080fd5b81356119fd81611f24565b600080600080600060608688031215611f7e57600080fd5b85356001600160401b0380821115611f9557600080fd5b818801915088601f830112611fa957600080fd5b813581811115611fb857600080fd5b8960208260051b8501011115611fcd57600080fd5b60208301975080965050611fe360208901611f39565b94506040880135915080821115611ff957600080fd5b5061200688828901611d57565b969995985093965092949392505050565b6000806040838503121561202a57600080fd5b823591506020830135611d4c81611f24565b6000806040838503121561204f57600080fd5b82519150602083015161ffff81168114611d4c57600080fd5b634e487b7160e01b600052603260045260246000fd5b6040815260006120916040830185611e3b565b905061ffff831660208301529392505050565b600080600080608085870312156120ba57600080fd5b84516120c581611f24565b6020860151604087015191955093506120dd81611d15565b60608601519092506001600160401b038111156120f957600080fd5b8501601f8101871361210a57600080fd5b805161211581611c5e565b6040516121228282611c32565b82815289602084860101111561213757600080fd5b612148836020830160208701611e0f565b969995985093965050505050565b634e487b7160e01b600052601160045260246000fd5b60006001820161217e5761217e612156565b5060010190565b604080825283519082018190526000906020906060840190828701845b828110156121c75781516001600160a01b0316845292840192908401906001016121a2565b5050508381038285015284518082528583019183019060005b818110156121fc578351835292840192918401916001016121e0565b5090979650505050505050565b6020815260006119fd6020830184611e67565b600061ffff80831681851680830382111561223957612239612156565b01949350505050565b6000604080833603121561225557600080fd5b805161226081611bee565b83356001600160401b038082111561227757600080fd5b9085019036601f83011261228a57600080fd5b813560208282111561229e5761229e611bd8565b8160051b86516122b083830182611c32565b928352848101820192828101368511156122c957600080fd5b83870192505b8483101561234d578235868111156122e75760008081fd5b8701606036829003601f19018113156123005760008081fd5b8a5161230b81611c13565b8287013581528b8301358188015290820135908882111561232c5760008081fd5b61233a368884860101611c85565b818d0152835250509183019183016122cf565b5086525061235c888201611f39565b90850152509195945050505050565b6000821982111561237e5761237e612156565b500190565b600082601f83011261239457600080fd5b6040516123a081611bee565b8060408401858111156123b257600080fd5b845b818110156123cc5780358352602092830192016123b4565b509195945050505050565b600082601f8301126123e857600080fd5b6040516101408082018281106001600160401b038211171561240c5761240c611bd8565b6040528301818582111561241f57600080fd5b845b828110156123cc578035825260209182019101612421565b600081830361024081121561244d57600080fd5b6040805161245a81611bee565b6101008084121561246a57600080fd5b8251935061247784611c13565b6124818787612383565b845286605f87011261249257600080fd5b825161249d81611bee565b8060c08801898111156124af57600080fd5b8589015b818110156124d4576124c58b82612383565b835260209092019186016124b3565b508260208801526124e58a82612383565b868801525050508382526124fb878288016123d7565b60208301525095945050505050565b80518015158114611f4457600080fd5b60006060828403121561252c57600080fd5b604051606081018181106001600160401b038211171561254e5761254e611bd8565b60405282516001600160801b038116811461256857600080fd5b8152602083015161257881611d15565b60208201526125896040840161250a565b60408201529392505050565b6000602082840312156125a757600080fd5b6119fd8261250a565b6000604082840312156125c257600080fd5b82601f8301126125d157600080fd5b6040516125dd81611bee565b8060408401858111156125ef57600080fd5b845b818110156123cc5780518352602092830192016125f1565b8060005b60028110156114c757815184526020938401939091019060010161260d565b610240810161263b8287612609565b60408083018660005b600281101561266b57612658838351612609565b9183019160209190910190600101612644565b5050505061267c60c0830185612609565b61010082018360005b600a8110156126a4578151835260209283019290910190600101612685565b50505095945050505050565b600060033d11156126c95760046000803e5060005160e01c5b90565b600060443d10156126da5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561270957505050505090565b82850191508151818111156127215750505050505090565b843d870101602082850101111561273b5750505050505090565b61274a60208286010187611c32565b509095945050505050565b6020815260006119fd6020830184611e3b565b60008060233d1115612784576020600460003e50506000516001905b9091565b600063ffffffff80831681851680830382111561223957612239612156565b6000826127c457634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220202a9a70b259c56940b27ba667618cafc46cd9a9f1eb7ea03e8803b68fee4b3964736f6c634300080e0033", "devdoc": { "author": "Sismo", "errors": { @@ -803,14 +1075,31 @@ "details": "Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST*" } ], - "TicketOnCooldown((address,uint32,uint16),uint32)": [ + "CooldownDurationNotSetForGroupIndex(uint256)": [ + { + "details": "Error when the cooldown duration for a given groupIndex is equal to zero. The HydraS1AccountboundAttester behaves like the HydraS1SimpleAttester.*" + } + ], + "NullifierOnCooldown(uint256,address,uint16,uint32)": [ { - "details": "Error when the userTicket is on cooldown. The user have to wait the cooldownDuration before being able to change again the destination address.*" + "details": "Error when the nullifier is on cooldown. The user have to wait the cooldownDuration before being able to change again the destination address.*" + } + ], + "NullifierUsed(uint256)": [ + { + "details": "Error when the nullifier is already used for a destination address*" } ] }, "kind": "dev", "methods": { + "_getNextBurnCount(uint256,address)": { + "details": "returns burn count or burn count + 1 if new burn will happen", + "params": { + "claimDestination": "destination referenced in the user claim", + "nullifier": "user nullifier" + } + }, "buildAttestations(((uint256,uint256,bytes)[],address),bytes)": { "details": "Returns the actual attestations constructed from the user request", "params": { @@ -823,10 +1112,11 @@ "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", + "collectionIdFirst": "Id of the first attestation collection in which the attester is supposed to record", + "collectionIdLast": "Id of the last attestation collection in which the attester is supposed to record", "commitmentMapperAddress": "commitment mapper's public key registry", - "hydraS1VerifierAddress": "ZK Snark Hydra-S1 Verifier contract" + "hydraS1VerifierAddress": "ZK Snark Hydra-S1 Verifier contract", + "owner": "Address of attester's owner" } }, "deleteAttestations(uint256[],address,bytes)": { @@ -859,31 +1149,69 @@ "getAvailableRootsRegistry()": { "details": "Getter of Roots Registry Contract" }, + "getBurnCountFromExtraData(bytes)": { + "details": "Returns the burn count for a given extraData", + "params": { + "extraData": "bytes where the burnCount is encoded" + } + }, "getCommitmentMapperRegistry()": { "details": "Getter of Commitment Mapper Registry contract" }, - "getDestinationOfTicket(uint256)": { - "details": "Getter, returns the last attestation destination of a ticket", + "getCooldownDurationForGroupIndex(uint256)": { + "details": "Getter, get the cooldown duration of a groupIndex", + "params": { + "groupIndex": "internal collection id*" + } + }, + "getDestinationOfNullifier(uint256)": { + "details": "Getter, returns the last attestation destination of a nullifier", + "params": { + "nullifier": "nullifier used*" + } + }, + "getNullifierBurnCount(uint256)": { + "details": "Getter, returns the burnCount of a nullifier", + "params": { + "nullifier": "nullifier used*" + } + }, + "getNullifierCooldownStart(uint256)": { + "details": "Getter, returns the cooldown start of a nullifier", "params": { - "userTicket": "ticket used*" + "nullifier": "nullifier used*" } }, - "getTicketData(uint256)": { - "details": "Getter, returns the data linked to a ticket", + "getNullifierFromExtraData(bytes)": { + "details": "returns the nullifier for a given extraData", "params": { - "userTicket": "ticket used*" + "extraData": "bytes where the nullifier is encoded" } }, "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*" + "initialize(address)": { + "details": "Initialize function, to be called by the proxy delegating calls to this implementation", + "params": { + "ownerAddress": "Owner of the contract, has the right to authorize/unauthorize attestations issuers" + } + }, + "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." + }, + "setCooldownDurationForGroupIndex(uint256,uint32)": { + "details": "Setter, sets the cooldown duration of a groupIndex", + "params": { + "cooldownDuration": "cooldown duration we want to set for the groupIndex*", + "groupIndex": "internal collection id" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." } }, "title": "Hydra-S1 Accountbound Attester", @@ -891,35 +1219,109 @@ }, "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) - Accountbound (with cooldown period) Users can choose to delete or generate attestations to a new destination using their source account. The attestation is \"Accountbound\" to the source account. 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*", + "methods": { + "getCooldownDurationForGroupIndex(uint256)": { + "notice": "returns 0 when the accountbound feature is deactivated for this group" + }, + "initialize(address)": { + "notice": "The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization." + }, + "setCooldownDurationForGroupIndex(uint256,uint32)": { + "notice": "set to 0 to deactivate the accountbound feature for this group" + } + }, + "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 Simple Attester contract is inherited and holds the complex Hydra S1 verification logic. Request verification alongside proof verification is already implemented in the inherited HydraS1SimpleAttester, along with the buildAttestations logic. However, we override the buildAttestations function to encode the nullifier and its burn count in the user attestation. The _beforeRecordAttestations is also overriden to fit the Accountbound 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 - Nullified Each source account gets one nullifier per claim (i.e only one attestation per source account per claim) While semaphore/ tornado cash are using the following notations: nullifierHash = hash(IdNullifier, externalNullifier) We prefered to use the naming 'nullifier' instead of 'nullifierHash' in our contracts and documentation. We also renamed 'IdNullifier' in 'sourceSecret' (the secret tied to a source account) and we kept the 'externalNullifier' notation. Finally, here is our notations at Sismo: nullifier = hash(sourceSecret, externalNullifier) - Accountbound (opt-in, with cooldown period) The owner of this attester can set a cooldown duration for a specific group, activating the accountbound feature for this group. Users can update their attestation's destination by providing a new Hydra-S1 ZK proof It means the attestation is bound to the source account, stored on an updatable destination account. When deleting/ sending to a new destination, the nullifier will enter a cooldown period, so it remains occasional. A group that has its cooldown duration set to 0 means it has been configured to not feature accountbound attestations, attestations can not be transferred One can however know that the former and the new destinations were created using the same nullifier, thus creating a link between those two destinations. - Renewable A nullifier 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/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "astId": 935, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", "label": "_initialized", "offset": 0, "slot": "0", - "type": "t_bool" + "type": "t_uint8" }, { - "astId": 939, - "contract": "contracts/attesters/hydra-s1/variants/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "astId": 938, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", "label": "_initializing", "offset": 1, "slot": "0", "type": "t_bool" }, { - "astId": 7872, - "contract": "contracts/attesters/hydra-s1/variants/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", - "label": "_userTicketsData", + "astId": 8093, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_nullifiersDestinations", "offset": 0, "slot": "1", - "type": "t_mapping(t_uint256,t_struct(TicketData)7076_storage)" + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 8097, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_placeHoldersHydraS1Simple", + "offset": 0, + "slot": "2", + "type": "t_array(t_uint256)19_storage" + }, + { + "astId": 396, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_owner", + "offset": 0, + "slot": "21", + "type": "t_address" + }, + { + "astId": 7520, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_placeHolderBeforeHydraS1Accountbound", + "offset": 0, + "slot": "22", + "type": "t_array(t_uint256)19_storage" + }, + { + "astId": 7524, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_cooldownDurations", + "offset": 0, + "slot": "41", + "type": "t_mapping(t_uint256,t_uint32)" + }, + { + "astId": 7528, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_placeHoldersHydraS1AccountboundConfig", + "offset": 0, + "slot": "42", + "type": "t_array(t_uint256)19_storage" + }, + { + "astId": 7532, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_nullifiersCooldownStart", + "offset": 0, + "slot": "61", + "type": "t_mapping(t_uint256,t_uint32)" + }, + { + "astId": 7536, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_nullifiersBurnCount", + "offset": 0, + "slot": "62", + "type": "t_mapping(t_uint256,t_uint16)" + }, + { + "astId": 7540, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_placeHoldersHydraS1AccountboundLogic", + "offset": 0, + "slot": "63", + "type": "t_array(t_uint256)18_storage" } ], "types": { @@ -928,48 +1330,43 @@ "label": "address", "numberOfBytes": "20" }, + "t_array(t_uint256)18_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[18]", + "numberOfBytes": "576" + }, + "t_array(t_uint256)19_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[19]", + "numberOfBytes": "608" + }, "t_bool": { "encoding": "inplace", "label": "bool", "numberOfBytes": "1" }, - "t_mapping(t_uint256,t_struct(TicketData)7076_storage)": { + "t_mapping(t_uint256,t_address)": { "encoding": "mapping", "key": "t_uint256", - "label": "mapping(uint256 => struct IHydraS1AccountboundAttester.TicketData)", + "label": "mapping(uint256 => address)", "numberOfBytes": "32", - "value": "t_struct(TicketData)7076_storage" + "value": "t_address" }, - "t_struct(TicketData)7076_storage": { - "encoding": "inplace", - "label": "struct IHydraS1AccountboundAttester.TicketData", - "members": [ - { - "astId": 7071, - "contract": "contracts/attesters/hydra-s1/variants/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", - "label": "destination", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 7073, - "contract": "contracts/attesters/hydra-s1/variants/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", - "label": "cooldownStart", - "offset": 20, - "slot": "0", - "type": "t_uint32" - }, - { - "astId": 7075, - "contract": "contracts/attesters/hydra-s1/variants/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", - "label": "burnCount", - "offset": 24, - "slot": "0", - "type": "t_uint16" - } - ], - "numberOfBytes": "32" + "t_mapping(t_uint256,t_uint16)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint16)", + "numberOfBytes": "32", + "value": "t_uint16" + }, + "t_mapping(t_uint256,t_uint32)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint32)", + "numberOfBytes": "32", + "value": "t_uint32" }, "t_uint16": { "encoding": "inplace", @@ -985,6 +1382,11 @@ "encoding": "inplace", "label": "uint32", "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" } } } diff --git a/deployments/mumbai/HydraS1AccountboundAttesterImplem.json b/deployments/mumbai/HydraS1AccountboundAttesterImplem.json new file mode 100644 index 0000000..f49b0bd --- /dev/null +++ b/deployments/mumbai/HydraS1AccountboundAttesterImplem.json @@ -0,0 +1,1393 @@ +{ + "address": "0xa723D0b8D0e816BE0f4BbE839163655BD85E14FC", + "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": "address", + "name": "owner", + "type": "address" + } + ], + "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": "uint256", + "name": "groupIndex", + "type": "uint256" + } + ], + "name": "CooldownDurationNotSetForGroupIndex", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expectedDestination", + "type": "address" + }, + { + "internalType": "address", + "name": "inputDestination", + "type": "address" + } + ], + "name": "DestinationMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "expectedExternalNullifier", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "externalNullifier", + "type": "uint256" + } + ], + "name": "ExternalNullifierMismatch", + "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": "nullifier", + "type": "uint256" + }, + { + "internalType": "address", + "name": "destination", + "type": "address" + }, + { + "internalType": "uint16", + "name": "burnCount", + "type": "uint16" + }, + { + "internalType": "uint32", + "name": "cooldownStart", + "type": "uint32" + } + ], + "name": "NullifierOnCooldown", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "nullifier", + "type": "uint256" + } + ], + "name": "NullifierUsed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "inputRoot", + "type": "uint256" + } + ], + "name": "RegistryRootMismatch", + "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": true, + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "cooldownDuration", + "type": "uint32" + } + ], + "name": "CooldownDurationSetForGroupIndex", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "nullifier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "NullifierDestinationUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "nullifier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "burnCount", + "type": "uint16" + } + ], + "name": "NullifierSetOnCooldown", + "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" + }, + { + "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": "IMPLEMENTATION_VERSION", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "nullifier", + "type": "uint256" + }, + { + "internalType": "address", + "name": "claimDestination", + "type": "address" + } + ], + "name": "_getNextBurnCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "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": [ + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "getBurnCountFromExtraData", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getCommitmentMapperRegistry", + "outputs": [ + { + "internalType": "contract ICommitmentMapperRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "groupIndex", + "type": "uint256" + } + ], + "name": "getCooldownDurationForGroupIndex", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "nullifier", + "type": "uint256" + } + ], + "name": "getDestinationOfNullifier", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "nullifier", + "type": "uint256" + } + ], + "name": "getNullifierBurnCount", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "nullifier", + "type": "uint256" + } + ], + "name": "getNullifierCooldownStart", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "getNullifierFromExtraData", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "getVerifier", + "outputs": [ + { + "internalType": "contract HydraS1Verifier", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "ownerAddress", + "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": "uint256", + "name": "groupIndex", + "type": "uint256" + }, + { + "internalType": "uint32", + "name": "cooldownDuration", + "type": "uint32" + } + ], + "name": "setCooldownDurationForGroupIndex", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x1367c8d1f64f3987113f6cafe1e0929b836f4ee62ef2fb65fdd6b2833394d238", + "receipt": { + "to": null, + "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", + "contractAddress": "0xa723D0b8D0e816BE0f4BbE839163655BD85E14FC", + "transactionIndex": 31, + "gasUsed": "2322582", + "logsBloom": "0x00000000000000000000000000020000000000000000000000800000000000000000000000000000020000000000000000008000102000000000000000000000000000000000000000000000000000800001000000000000040100000000000000000000020000000000000000000800002000000000000080000000000000400000000000000000000000002000000000000010000080000000000000008000200000000000000000000000800400000000000000000000000040000000004000000000000000000001000000040000000000000000000000100000000020000000000000000000000000000000000000000000000000000020000000100000", + "blockHash": "0x2b4a8cf2d29028afa58dd99b710997cc288b1d5d7c951447f5d5886bc45606fa", + "transactionHash": "0x1367c8d1f64f3987113f6cafe1e0929b836f4ee62ef2fb65fdd6b2833394d238", + "logs": [ + { + "transactionIndex": 31, + "blockNumber": 29540611, + "transactionHash": "0x1367c8d1f64f3987113f6cafe1e0929b836f4ee62ef2fb65fdd6b2833394d238", + "address": "0xa723D0b8D0e816BE0f4BbE839163655BD85E14FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + ], + "data": "0x", + "logIndex": 95, + "blockHash": "0x2b4a8cf2d29028afa58dd99b710997cc288b1d5d7c951447f5d5886bc45606fa" + }, + { + "transactionIndex": 31, + "blockNumber": 29540611, + "transactionHash": "0x1367c8d1f64f3987113f6cafe1e0929b836f4ee62ef2fb65fdd6b2833394d238", + "address": "0xa723D0b8D0e816BE0f4BbE839163655BD85E14FC", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x0000000000000000000000004e070e9b85a659f0b7b47cde33152ad6c2f63954" + ], + "data": "0x", + "logIndex": 96, + "blockHash": "0x2b4a8cf2d29028afa58dd99b710997cc288b1d5d7c951447f5d5886bc45606fa" + }, + { + "transactionIndex": 31, + "blockNumber": 29540611, + "transactionHash": "0x1367c8d1f64f3987113f6cafe1e0929b836f4ee62ef2fb65fdd6b2833394d238", + "address": "0xa723D0b8D0e816BE0f4BbE839163655BD85E14FC", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000004", + "logIndex": 97, + "blockHash": "0x2b4a8cf2d29028afa58dd99b710997cc288b1d5d7c951447f5d5886bc45606fa" + }, + { + "transactionIndex": 31, + "blockNumber": 29540611, + "transactionHash": "0x1367c8d1f64f3987113f6cafe1e0929b836f4ee62ef2fb65fdd6b2833394d238", + "address": "0x0000000000000000000000000000000000001010", + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", + "0x000000000000000000000000c275dc8be39f50d12f66b6a63629c39da5bae5bd" + ], + "data": "0x000000000000000000000000000000000000000000000000000fe87ffbf4efa40000000000000000000000000000000000000000000000007d5a488854524ff8000000000000000000000000000000000000000000000b8e591ef8f4fa5d33c70000000000000000000000000000000000000000000000007d4a6008585d6054000000000000000000000000000000000000000000000b8e592ee174f652236b", + "logIndex": 98, + "blockHash": "0x2b4a8cf2d29028afa58dd99b710997cc288b1d5d7c951447f5d5886bc45606fa" + } + ], + "blockNumber": 29540611, + "cumulativeGasUsed": "11747422", + "status": 1, + "byzantium": true + }, + "args": [ + "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", + "0xCBB1032416EB875D94Da8a447D73471E4C51998E", + "0x2c17e335d131dfd21238475Dd545B9B29Fb5A27D", + "0x82B54988e4E3a2850501F91AC06CEA82bdb014D3", + "10000001", + "20000000", + "0x4e070E9b85a659F0B7B47cde33152ad6c2F63954" + ], + "numDeployments": 2, + "solcInputHash": "6edb98fea2bf424a369954d0e80655f6", + "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\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"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\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"}],\"name\":\"CooldownDurationNotSetForGroupIndex\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"expectedDestination\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"inputDestination\",\"type\":\"address\"}],\"name\":\"DestinationMismatch\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expectedExternalNullifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"externalNullifier\",\"type\":\"uint256\"}],\"name\":\"ExternalNullifierMismatch\",\"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\":\"nullifier\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"burnCount\",\"type\":\"uint16\"},{\"internalType\":\"uint32\",\"name\":\"cooldownStart\",\"type\":\"uint32\"}],\"name\":\"NullifierOnCooldown\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nullifier\",\"type\":\"uint256\"}],\"name\":\"NullifierUsed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"inputRoot\",\"type\":\"uint256\"}],\"name\":\"RegistryRootMismatch\",\"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\":true,\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"cooldownDuration\",\"type\":\"uint32\"}],\"name\":\"CooldownDurationSetForGroupIndex\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nullifier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"NullifierDestinationUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"nullifier\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"burnCount\",\"type\":\"uint16\"}],\"name\":\"NullifierSetOnCooldown\",\"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\"},{\"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\":\"IMPLEMENTATION_VERSION\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nullifier\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"claimDestination\",\"type\":\"address\"}],\"name\":\"_getNextBurnCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"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\":[{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"getBurnCountFromExtraData\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCommitmentMapperRegistry\",\"outputs\":[{\"internalType\":\"contract ICommitmentMapperRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"}],\"name\":\"getCooldownDurationForGroupIndex\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nullifier\",\"type\":\"uint256\"}],\"name\":\"getDestinationOfNullifier\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nullifier\",\"type\":\"uint256\"}],\"name\":\"getNullifierBurnCount\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"nullifier\",\"type\":\"uint256\"}],\"name\":\"getNullifierCooldownStart\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"extraData\",\"type\":\"bytes\"}],\"name\":\"getNullifierFromExtraData\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVerifier\",\"outputs\":[{\"internalType\":\"contract HydraS1Verifier\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"ownerAddress\",\"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\":\"uint256\",\"name\":\"groupIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"cooldownDuration\",\"type\":\"uint32\"}],\"name\":\"setCooldownDurationForGroupIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"errors\":{\"CollectionIdOutOfBound(uint256)\":[{\"details\":\"Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST*\"}],\"CooldownDurationNotSetForGroupIndex(uint256)\":[{\"details\":\"Error when the cooldown duration for a given groupIndex is equal to zero. The HydraS1AccountboundAttester behaves like the HydraS1SimpleAttester.*\"}],\"NullifierOnCooldown(uint256,address,uint16,uint32)\":[{\"details\":\"Error when the nullifier is on cooldown. The user have to wait the cooldownDuration before being able to change again the destination address.*\"}],\"NullifierUsed(uint256)\":[{\"details\":\"Error when the nullifier is already used for a destination address*\"}]},\"kind\":\"dev\",\"methods\":{\"_getNextBurnCount(uint256,address)\":{\"details\":\"returns burn count or burn count + 1 if new burn will happen\",\"params\":{\"claimDestination\":\"destination referenced in the user claim\",\"nullifier\":\"user nullifier\"}},\"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 attestation collection in which the attester is supposed to record\",\"collectionIdLast\":\"Id of the last attestation collection in which the attester is supposed to record\",\"commitmentMapperAddress\":\"commitment mapper's public key registry\",\"hydraS1VerifierAddress\":\"ZK Snark Hydra-S1 Verifier contract\",\"owner\":\"Address of attester's owner\"}},\"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\"},\"getBurnCountFromExtraData(bytes)\":{\"details\":\"Returns the burn count for a given extraData\",\"params\":{\"extraData\":\"bytes where the burnCount is encoded\"}},\"getCommitmentMapperRegistry()\":{\"details\":\"Getter of Commitment Mapper Registry contract\"},\"getCooldownDurationForGroupIndex(uint256)\":{\"details\":\"Getter, get the cooldown duration of a groupIndex\",\"params\":{\"groupIndex\":\"internal collection id*\"}},\"getDestinationOfNullifier(uint256)\":{\"details\":\"Getter, returns the last attestation destination of a nullifier\",\"params\":{\"nullifier\":\"nullifier used*\"}},\"getNullifierBurnCount(uint256)\":{\"details\":\"Getter, returns the burnCount of a nullifier\",\"params\":{\"nullifier\":\"nullifier used*\"}},\"getNullifierCooldownStart(uint256)\":{\"details\":\"Getter, returns the cooldown start of a nullifier\",\"params\":{\"nullifier\":\"nullifier used*\"}},\"getNullifierFromExtraData(bytes)\":{\"details\":\"returns the nullifier for a given extraData\",\"params\":{\"extraData\":\"bytes where the nullifier is encoded\"}},\"getVerifier()\":{\"details\":\"Getter of Hydra-S1 Verifier contract\"},\"initialize(address)\":{\"details\":\"Initialize function, to be called by the proxy delegating calls to this implementation\",\"params\":{\"ownerAddress\":\"Owner of the contract, has the right to authorize/unauthorize attestations issuers\"}},\"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.\"},\"setCooldownDurationForGroupIndex(uint256,uint32)\":{\"details\":\"Setter, sets the cooldown duration of a groupIndex\",\"params\":{\"cooldownDuration\":\"cooldown duration we want to set for the groupIndex*\",\"groupIndex\":\"internal collection id\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"Hydra-S1 Accountbound Attester\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getCooldownDurationForGroupIndex(uint256)\":{\"notice\":\"returns 0 when the accountbound feature is deactivated for this group\"},\"initialize(address)\":{\"notice\":\"The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\"},\"setCooldownDurationForGroupIndex(uint256,uint32)\":{\"notice\":\"set to 0 to deactivate the accountbound feature for this group\"}},\"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 Simple Attester contract is inherited and holds the complex Hydra S1 verification logic. Request verification alongside proof verification is already implemented in the inherited HydraS1SimpleAttester, along with the buildAttestations logic. However, we override the buildAttestations function to encode the nullifier and its burn count in the user attestation. The _beforeRecordAttestations is also overriden to fit the Accountbound 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 - Nullified Each source account gets one nullifier per claim (i.e only one attestation per source account per claim) While semaphore/ tornado cash are using the following notations: nullifierHash = hash(IdNullifier, externalNullifier) We prefered to use the naming 'nullifier' instead of 'nullifierHash' in our contracts and documentation. We also renamed 'IdNullifier' in 'sourceSecret' (the secret tied to a source account) and we kept the 'externalNullifier' notation. Finally, here is our notations at Sismo: nullifier = hash(sourceSecret, externalNullifier) - Accountbound (opt-in, with cooldown period) The owner of this attester can set a cooldown duration for a specific group, activating the accountbound feature for this group. Users can update their attestation's destination by providing a new Hydra-S1 ZK proof It means the attestation is bound to the source account, stored on an updatable destination account. When deleting/ sending to a new destination, the nullifier will enter a cooldown period, so it remains occasional. A group that has its cooldown duration set to 0 means it has been configured to not feature accountbound attestations, attestations can not be transferred One can however know that the former and the new destinations were created using the same nullifier, thus creating a link between those two destinations. - Renewable A nullifier 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/HydraS1AccountboundAttester.sol\":\"HydraS1AccountboundAttester\"},\"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 (last updated v4.7.0) (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 Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\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 the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\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\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xcee5467d5d873fb75dae6f98c01a8d25dd609f9d0374c7d39217bd5f9539a2d6\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, \\\"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 (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or 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 _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\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 /// @solidity memory-safe-assembly\\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\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"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 [8609986746108439658545470593166889256314951959466775818870246174320018498804,\\n 6848251127850009101372611262053374737897586140140607384018397707035108265914],\\n [21367916863936594568281095443965096905143705300114190558130516981138584550504,\\n 13327705762185115653848159709412003423932761899188342359583872691135383932883]\\n );\\n vk.IC = new Pairing.G1Point[](11);\\n \\n vk.IC[0] = Pairing.G1Point( \\n 19965766170734310004645394427613286415565755728797065894668054116047682895204,\\n 6952067612339183672227137101423582097916038093373585908267153974352032944482\\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 13987716160490730015463796942940452666334097189904948795214986996497499925899,\\n 5336810094802209074340875836312868429276540870324469349093948627126061524544\\n ); \\n \\n vk.IC[4] = Pairing.G1Point( \\n 14931593253473978964215343699995811275378324235306358485461293343370969283966,\\n 564306919152089917957316877787764763278299990971316475606280877961553231205\\n ); \\n \\n vk.IC[5] = Pairing.G1Point( \\n 11591267743733991434114686002448165336885445656808796470854638278338319268343,\\n 11495219763417990955889652410266075210402006084183208750635660647824890013350\\n ); \\n \\n vk.IC[6] = Pairing.G1Point( \\n 8183184532870222270700473518157259944911700429689031755853536692005688965081,\\n 9121077094104828462137861111631978599019724423614716723152060153405564278301\\n ); \\n \\n vk.IC[7] = Pairing.G1Point( \\n 4314095526093128699362232919686741372014146055311239687202926853002748112330,\\n 11665330391505820654128458332883010598817535082070674418723503440883598640597\\n ); \\n \\n vk.IC[8] = Pairing.G1Point( \\n 19602244162575575785636531633124796303002902053486919698240132790672698216585,\\n 181057165072599074288983745076121344893296348827576905983079816835912241514\\n ); \\n \\n vk.IC[9] = Pairing.G1Point( \\n 18925967077785550270509493111690046951994174908254476036944536825999614778001,\\n 4990629719417206796668074534812314525340851981015724652256935997545282642849\\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\":\"0x120f0b311a61cabc9d42ef740c19e5f20b4c8ba400d9a6378e33c76dd54f5c42\",\"license\":\"GPL-3.0\"},\"contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\\n\\nimport {IHydraS1AccountboundAttester} from './interfaces/IHydraS1AccountboundAttester.sol';\\n\\n// Core protocol Protocol imports\\nimport {Request, Attestation, Claim} from '../../core/libs/Structs.sol';\\n\\n// Imports related to Hydra-S1\\nimport {HydraS1SimpleAttester, IAttester, HydraS1Lib, HydraS1ProofData, HydraS1Claim} from './HydraS1SimpleAttester.sol';\\n\\n/**\\n * @title Hydra-S1 Accountbound 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 Simple Attester contract is inherited and holds the complex Hydra S1 verification logic.\\n * Request verification alongside proof verification is already implemented in the inherited HydraS1SimpleAttester, along with the buildAttestations logic.\\n * However, we override the buildAttestations function to encode the nullifier and its burn count in the user attestation.\\n * The _beforeRecordAttestations is also overriden to fit the Accountbound 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 * - Nullified\\n * Each source account gets one nullifier per claim (i.e only one attestation per source account per claim)\\n * While semaphore/ tornado cash are using the following notations: nullifierHash = hash(IdNullifier, externalNullifier)\\n * We prefered to use the naming 'nullifier' instead of 'nullifierHash' in our contracts and documentation.\\n * We also renamed 'IdNullifier' in 'sourceSecret' (the secret tied to a source account) and we kept the 'externalNullifier' notation.\\n * Finally, here is our notations at Sismo: nullifier = hash(sourceSecret, externalNullifier)\\n\\n * - Accountbound (opt-in, with cooldown period)\\n * The owner of this attester can set a cooldown duration for a specific group, activating the accountbound feature for this group.\\n * Users can update their attestation's destination by providing a new Hydra-S1 ZK proof \\n * It means the attestation is bound to the source account, stored on an updatable destination account.\\n * When deleting/ sending to a new destination, the nullifier will enter a cooldown period, so it remains occasional.\\n * A group that has its cooldown duration set to 0 means it has been configured to not feature accountbound attestations, attestations can not be transferred\\n * One can however know that the former and the new destinations were created using the same nullifier, thus creating a link between those two destinations.\\n \\n * - Renewable\\n * A nullifier 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 **/\\n\\ncontract HydraS1AccountboundAttester is\\n IHydraS1AccountboundAttester,\\n HydraS1SimpleAttester,\\n Ownable\\n{\\n using HydraS1Lib for HydraS1ProofData;\\n using HydraS1Lib for bytes;\\n using HydraS1Lib for Request;\\n\\n uint8 public constant IMPLEMENTATION_VERSION = 4;\\n\\n /*******************************************************\\n Storage layout:\\n 20 slots between HydraS1SimpleAttester and HydraS1AccountboundAttester\\n 1 currently used by Ownable\\n 19 place holders\\n 2O for config\\n 1 currently used\\n 19 place holders\\n 20 for logic\\n 2 currently used\\n 18 place holders\\n *******************************************************/\\n\\n // keeping some space for future config logics\\n uint256[19] private _placeHolderBeforeHydraS1Accountbound;\\n\\n // cooldown durations for each groupIndex\\n mapping(uint256 => uint32) internal _cooldownDurations;\\n\\n // keeping some space for future config logics\\n uint256[19] private _placeHoldersHydraS1AccountboundConfig;\\n\\n mapping(uint256 => uint32) internal _nullifiersCooldownStart;\\n mapping(uint256 => uint16) internal _nullifiersBurnCount;\\n\\n // keeping some space for future config logics\\n uint256[18] private _placeHoldersHydraS1AccountboundLogic;\\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 attestation collection in which the attester is supposed to record\\n * @param collectionIdLast Id of the last attestation collection in which the attester is supposed to record\\n * @param owner Address of attester's owner\\n */\\n constructor(\\n address attestationsRegistryAddress,\\n address hydraS1VerifierAddress,\\n address availableRootsRegistryAddress,\\n address commitmentMapperAddress,\\n uint256 collectionIdFirst,\\n uint256 collectionIdLast,\\n address owner\\n )\\n HydraS1SimpleAttester(\\n attestationsRegistryAddress,\\n hydraS1VerifierAddress,\\n availableRootsRegistryAddress,\\n commitmentMapperAddress,\\n collectionIdFirst,\\n collectionIdLast\\n )\\n {\\n initialize(owner);\\n }\\n\\n /**\\n * @dev Initialize function, to be called by the proxy delegating calls to this implementation\\n * @param ownerAddress Owner of the contract, has the right to authorize/unauthorize attestations issuers\\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\n */\\n function initialize(address ownerAddress) public reinitializer(IMPLEMENTATION_VERSION) {\\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\\n if (owner() == address(0) || address(this).code.length == 0) {\\n _transferOwnership(ownerAddress);\\n }\\n }\\n\\n /*******************************************************\\n MANDATORY FUNCTIONS TO OVERRIDE FROM ATTESTER.SOL\\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(\\n Request calldata request,\\n bytes calldata proofData\\n ) public view virtual override(IAttester, HydraS1SimpleAttester) returns (Attestation[] memory) {\\n Attestation[] memory attestations = super.buildAttestations(request, proofData);\\n\\n uint256 nullifier = proofData._getNullifier();\\n attestations[0].extraData = abi.encode(\\n attestations[0].extraData, // nullifier, from HydraS1 Simple\\n _getNextBurnCount(nullifier, attestations[0].owner) // BurnCount\\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 nullifier already used, not a renewal, and nullifier 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(\\n Request calldata request,\\n bytes calldata proofData\\n ) internal virtual override {\\n uint256 nullifier = proofData._getNullifier();\\n address previousNullifierDestination = _getDestinationOfNullifier(nullifier);\\n\\n HydraS1Claim memory claim = request._claim();\\n\\n // check if the nullifier has already been used previously, if so it may be on cooldown\\n if (\\n previousNullifierDestination != address(0) &&\\n previousNullifierDestination != claim.destination\\n ) {\\n uint32 cooldownDuration = _getCooldownDurationForGroupIndex(claim.groupProperties.groupIndex);\\n if (cooldownDuration == 0) {\\n revert CooldownDurationNotSetForGroupIndex(claim.groupProperties.groupIndex);\\n }\\n if (_isOnCooldown(nullifier, cooldownDuration)) {\\n uint16 burnCount = _getNullifierBurnCount(nullifier);\\n revert NullifierOnCooldown(\\n nullifier,\\n previousNullifierDestination,\\n burnCount,\\n cooldownDuration\\n );\\n }\\n\\n // Delete the old Attestation linked to the nullifier before recording the new one (accountbound feature)\\n _deletePreviousAttestation(claim, previousNullifierDestination);\\n\\n _setNullifierOnCooldownAndIncrementBurnCount(nullifier);\\n }\\n _setDestinationForNullifier(nullifier, request.destination);\\n }\\n\\n /*******************************************************\\n LOGIC FUNCTIONS RELATED TO ACCOUNTBOUND FEATURE\\n *******************************************************/\\n\\n /**\\n * @dev Getter, returns the burnCount of a nullifier\\n * @param nullifier nullifier used\\n **/\\n function getNullifierBurnCount(uint256 nullifier) external view returns (uint16) {\\n return _getNullifierBurnCount(nullifier);\\n }\\n\\n /**\\n * @dev Getter, returns the cooldown start of a nullifier\\n * @param nullifier nullifier used\\n **/\\n function getNullifierCooldownStart(uint256 nullifier) external view returns (uint32) {\\n return _getNullifierCooldownStart(nullifier);\\n }\\n\\n /**\\n * @dev returns the nullifier for a given extraData\\n * @param extraData bytes where the nullifier is encoded\\n */\\n function getNullifierFromExtraData(\\n bytes memory extraData\\n ) external pure override(HydraS1SimpleAttester, IHydraS1AccountboundAttester) returns (uint256) {\\n (uint256 nullifier, ) = abi.decode(extraData, (uint256, uint16));\\n\\n return nullifier;\\n }\\n\\n /**\\n * @dev Returns the burn count for a given extraData\\n * @param extraData bytes where the burnCount is encoded\\n */\\n function getBurnCountFromExtraData(bytes memory extraData) external pure returns (uint16) {\\n (, uint16 burnCount) = abi.decode(extraData, (uint256, uint16));\\n\\n return burnCount;\\n }\\n\\n /**\\n * @dev Checks if a nullifier is on cooldown\\n * @param nullifier user nullifier\\n * @param cooldownDuration waiting time before the user can change its badge destination\\n */\\n function _isOnCooldown(uint256 nullifier, uint32 cooldownDuration) internal view returns (bool) {\\n return _getNullifierCooldownStart(nullifier) + cooldownDuration > block.timestamp;\\n }\\n\\n /**\\n * @dev Delete the previous attestation created with this nullifier\\n * @param claim user claim\\n * @param previousNullifierDestination previous destination chosen for this user nullifier\\n */\\n function _deletePreviousAttestation(\\n HydraS1Claim memory claim,\\n address previousNullifierDestination\\n ) internal {\\n address[] memory attestationOwners = new address[](1);\\n uint256[] memory attestationCollectionIds = new uint256[](1);\\n\\n attestationOwners[0] = previousNullifierDestination;\\n attestationCollectionIds[0] = AUTHORIZED_COLLECTION_ID_FIRST + claim.groupProperties.groupIndex;\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\\n }\\n\\n function _setNullifierOnCooldownAndIncrementBurnCount(uint256 nullifier) internal {\\n _nullifiersCooldownStart[nullifier] = uint32(block.timestamp);\\n _nullifiersBurnCount[nullifier] += 1;\\n emit NullifierSetOnCooldown(nullifier, _nullifiersBurnCount[nullifier]);\\n }\\n\\n function _getNullifierCooldownStart(uint256 nullifier) internal view returns (uint32) {\\n return _nullifiersCooldownStart[nullifier];\\n }\\n\\n function _getNullifierBurnCount(uint256 nullifier) internal view returns (uint16) {\\n return _nullifiersBurnCount[nullifier];\\n }\\n\\n /**\\n * @dev returns burn count or burn count + 1 if new burn will happen\\n * @param nullifier user nullifier\\n * @param claimDestination destination referenced in the user claim\\n */\\n function _getNextBurnCount(\\n uint256 nullifier,\\n address claimDestination\\n ) public view virtual returns (uint16) {\\n address previousNullifierDestination = _getDestinationOfNullifier(nullifier);\\n uint16 burnCount = _getNullifierBurnCount(nullifier);\\n // If the attestation is minted on a new destination address\\n // the burnCount that will be encoded in the extraData of the Attestation should be incremented\\n if (\\n previousNullifierDestination != address(0) && previousNullifierDestination != claimDestination\\n ) {\\n burnCount += 1;\\n }\\n return burnCount;\\n }\\n\\n /*******************************************************\\n GROUP CONFIGURATION LOGIC\\n *******************************************************/\\n\\n /**\\n * @dev Setter, sets the cooldown duration of a groupIndex\\n * @notice set to 0 to deactivate the accountbound feature for this group\\n * @param groupIndex internal collection id\\n * @param cooldownDuration cooldown duration we want to set for the groupIndex\\n **/\\n function setCooldownDurationForGroupIndex(\\n uint256 groupIndex,\\n uint32 cooldownDuration\\n ) external onlyOwner {\\n _cooldownDurations[groupIndex] = cooldownDuration;\\n emit CooldownDurationSetForGroupIndex(groupIndex, cooldownDuration);\\n }\\n\\n /**\\n * @dev Getter, get the cooldown duration of a groupIndex\\n * @notice returns 0 when the accountbound feature is deactivated for this group\\n * @param groupIndex internal collection id\\n **/\\n function getCooldownDurationForGroupIndex(uint256 groupIndex) external view returns (uint32) {\\n return _getCooldownDurationForGroupIndex(groupIndex);\\n }\\n\\n // = 0 means that the accountbound feature is deactivated for this group\\n function _getCooldownDurationForGroupIndex(uint256 groupIndex) internal view returns (uint32) {\\n return _cooldownDurations[groupIndex];\\n }\\n}\\n\",\"keccak256\":\"0x4c391f4bbfdd1b22039fdc7b43f12d7933deca89cc6ae9e5a2b5afa8c427762c\",\"license\":\"MIT\"},\"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';\\nimport {IHydraS1Base} from './base/IHydraS1Base.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 * - Nullified\\n * Each source account gets one nullifier per claim (i.e only one attestation per source account per claim)\\n * For people used to semaphore/ tornado cash people:\\n * nullifier = hash(sourceSecret, externalNullifier) <=> nullifierHash = hash(IdNullifier, externalNullifier)\\n \\n * - Renewable\\n * A nullifier 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 {\\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 /*******************************************************\\n Storage layout:\\n 20 slots for HydraS1\\n 1 slot used\\n 19 place holders\\n *******************************************************/\\n\\n mapping(uint256 => address) internal _nullifiersDestinations;\\n\\n // keeping some space for future\\n uint256[19] private _placeHoldersHydraS1Simple;\\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(\\n Request calldata request,\\n bytes calldata proofData\\n ) internal virtual override {\\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(\\n Request calldata request,\\n bytes calldata proofData\\n ) public view virtual override(IAttester, Attester) returns (Attestation[] memory) {\\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 uint256 nullifier = proofData._getNullifier();\\n\\n attestations[0] = Attestation(\\n attestationCollectionId,\\n claim.destination,\\n issuer,\\n claim.claimedValue,\\n claim.groupProperties.generationTimestamp,\\n abi.encode(nullifier)\\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 nullifier 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(\\n Request calldata request,\\n bytes calldata proofData\\n ) internal virtual override {\\n // we get the nullifier used from the snark input in the data provided\\n uint256 nullifier = proofData._getNullifier();\\n address currentDestination = _getDestinationOfNullifier(nullifier);\\n\\n if (currentDestination != address(0) && currentDestination != request.destination) {\\n revert NullifierUsed(nullifier);\\n }\\n\\n _setDestinationForNullifier(nullifier, request.destination);\\n }\\n\\n /*******************************************************\\n Hydra-S1 MANDATORY FUNCTIONS FROM Hydra-S1 Base Attester\\n *******************************************************/\\n\\n /**\\n * @dev Returns the external nullifier from a user claim\\n * @param claim user Hydra-S1 claim = have an account with a specific value in a specific group\\n * nullifier = hash(sourceSecretHash, externalNullifier), which is verified inside the snark\\n * users bring sourceSecretHash as private input in snark which guarantees privacy\\n \\n * Here we chose externalNullifier = hash(attesterAddress, claim.GroupId)\\n * Creates one nullifier per group, per user and makes sure no collision with other attester's nullifiers\\n **/\\n function _getExternalNullifierOfClaim(\\n HydraS1Claim memory claim\\n ) internal view override returns (uint256) {\\n uint256 externalNullifier = _encodeInSnarkField(\\n address(this),\\n claim.groupProperties.groupIndex\\n );\\n return externalNullifier;\\n }\\n\\n /**\\n * @dev returns the nullifier for a given extraData\\n * @param extraData bytes where the nullifier is encoded\\n */\\n function getNullifierFromExtraData(\\n bytes memory extraData\\n ) external pure virtual override(IHydraS1Base, HydraS1Base) returns (uint256) {\\n return abi.decode(extraData, (uint256));\\n }\\n\\n /*******************************************************\\n Hydra-S1 Attester Specific Functions\\n *******************************************************/\\n\\n /**\\n * @dev Getter, returns the last attestation destination of a nullifier\\n * @param nullifier nullifier used\\n **/\\n function getDestinationOfNullifier(uint256 nullifier) external view override returns (address) {\\n return _getDestinationOfNullifier(nullifier);\\n }\\n\\n function _setDestinationForNullifier(uint256 nullifier, address destination) internal virtual {\\n _nullifiersDestinations[nullifier] = destination;\\n emit NullifierDestinationUpdated(nullifier, destination);\\n }\\n\\n function _getDestinationOfNullifier(uint256 nullifier) internal view returns (address) {\\n return _nullifiersDestinations[nullifier];\\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\":\"0x7bb2f154f8b33d4c536ebe7828baeb25853d9c288d85b75f0f9d4c3a8e01e735\",\"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 {Attester} from '../../../core/Attester.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 the following:\\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 */\\nabstract contract HydraS1Base is IHydraS1Base, Attester, 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 /**\\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 nullifier from an attestation extraData\\n * @dev Getter of a nullifier encoded in extraData\\n * @notice Must be implemented by the inheriting contracts\\n * @param extraData extraData where nullifier can be encoded\\n */\\n function getNullifierFromExtraData(\\n bytes memory extraData\\n ) external view virtual returns (uint256);\\n\\n /**\\n * @dev MANDATORY: must be implemented to return the external nullifier from a user request\\n * so it can be checked against snark input\\n * nullifier = hash(sourceSecretHash, externalNullifier), 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 external nullifiers\\n *\\n * Do they get one external nullifier per claim?\\n * Do they get 2 external nullifiers per claim?\\n * Do they get 1 external nullifier 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 _getExternalNullifierOfClaim(\\n HydraS1Claim memory claim\\n ) internal view virtual 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(\\n HydraS1Claim memory claim,\\n HydraS1ProofInput memory input\\n ) internal view virtual {\\n if (input.accountsTreeValue != claim.groupId) {\\n revert AccountsTreeValueMismatch(claim.groupId, input.accountsTreeValue);\\n }\\n\\n if (input.isStrict == claim.groupProperties.isScore) {\\n revert IsStrictMismatch(claim.groupProperties.isScore, input.isStrict);\\n }\\n\\n if (input.destination != claim.destination) {\\n revert DestinationMismatch(claim.destination, input.destination);\\n }\\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\\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\\n uint256 externalNullifier = _getExternalNullifierOfClaim(claim);\\n\\n if (input.externalNullifier != externalNullifier) {\\n revert ExternalNullifierMismatch(externalNullifier, input.externalNullifier);\\n }\\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(uint256 /*errorCode*/) {\\n revert InvalidGroth16Proof('');\\n } catch (bytes memory /*lowLevelData*/) {\\n revert InvalidGroth16Proof('');\\n }\\n }\\n}\\n\",\"keccak256\":\"0x8614a04a2a58649b4434fab39ca30e3ff0d94d09998355dbd9fa5bf762b3c845\",\"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 {IAttester} from '../../../core/interfaces/IAttester.sol';\\nimport {HydraS1Verifier, HydraS1Lib, HydraS1ProofData} 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 Interface\\n * @author Sismo\\n * @notice Interface 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 errors and method specific of the Hydra-S1 attesters family and the Hydra-S1 ZK Proving Scheme\\n * We invite readers to refer to the following:\\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 **/\\ninterface IHydraS1Base is IAttester {\\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 ExternalNullifierMismatch(uint256 expectedExternalNullifier, uint256 externalNullifier);\\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 function getNullifierFromExtraData(bytes memory extraData) external view returns (uint256);\\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\":\"0x65b9966e5cf43975edb64c742057153058ee31bea1beadf4456577e9d5dbc76d\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/interfaces/IHydraS1AccountboundAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {IHydraS1SimpleAttester} from '././IHydraS1SimpleAttester.sol';\\n\\n/**\\n * @title Hydra-S1 Accountbound Interface\\n * @author Sismo\\n * @notice Interface of the HydraS1AccountboundAttester contract which inherits from the errors, events and methods specific to the HydraS1SimpleAttester interface.\\n **/\\ninterface IHydraS1AccountboundAttester is IHydraS1SimpleAttester {\\n /**\\n * @dev Event emitted when the duration of the cooldown duration for a group index (internal collection id) has been set\\n * @param groupIndex internal collection id\\n * @param cooldownDuration the duration of the cooldown period\\n **/\\n event CooldownDurationSetForGroupIndex(uint256 indexed groupIndex, uint32 cooldownDuration);\\n\\n /**\\n * @dev Event emitted when the nullifier has been set on cooldown. This happens when the\\n * attestation destination of a nullifier has been changed\\n * @param nullifier user nullifier\\n * @param burnCount the number of times the attestation destination of a nullifier has been changed\\n **/\\n event NullifierSetOnCooldown(uint256 indexed nullifier, uint16 burnCount);\\n\\n /**\\n * @dev Error when the nullifier is on cooldown. The user have to wait the cooldownDuration\\n * before being able to change again the destination address.\\n **/\\n error NullifierOnCooldown(\\n uint256 nullifier,\\n address destination,\\n uint16 burnCount,\\n uint32 cooldownStart\\n );\\n\\n /**\\n * @dev Error when the cooldown duration for a given groupIndex is equal to zero.\\n * The HydraS1AccountboundAttester behaves like the HydraS1SimpleAttester.\\n **/\\n error CooldownDurationNotSetForGroupIndex(uint256 groupIndex);\\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 returns the nullifier for a given extraData\\n * @param extraData bytes where the nullifier is encoded\\n */\\n function getNullifierFromExtraData(bytes memory extraData) external pure returns (uint256);\\n\\n /**\\n * @dev Returns the burn count for a given extraData\\n * @param extraData bytes where the burnCount is encoded\\n */\\n function getBurnCountFromExtraData(bytes memory extraData) external pure returns (uint16);\\n\\n /**\\n * @dev Getter, returns the cooldown start of a nullifier\\n * @param nullifier nullifier used\\n **/\\n function getNullifierCooldownStart(uint256 nullifier) external view returns (uint32);\\n\\n /**\\n * @dev Getter, returns the burnCount of a nullifier\\n * @param nullifier nullifier used\\n **/\\n function getNullifierBurnCount(uint256 nullifier) external view returns (uint16);\\n\\n /**\\n * @dev Setter, sets the cooldown duration of a groupIndex\\n * @param groupIndex internal collection id\\n * @param cooldownDuration cooldown duration we want to set for the groupIndex\\n **/\\n function setCooldownDurationForGroupIndex(uint256 groupIndex, uint32 cooldownDuration) external;\\n\\n /*/**\\n * @dev Getter, get the cooldown duration of a groupIndex\\n * @notice returns 0 when the accountbound feature is deactivated for this group\\n * @param groupIndex internal collection id\\n **/\\n function getCooldownDurationForGroupIndex(uint256 groupIndex) external view returns (uint32);\\n}\\n\",\"keccak256\":\"0x69293ce8ee200e3ce8b34478b5dde62d934e32c4f82d173314a4ed72731b3663\",\"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 {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/**\\n * @title Hydra-S1 Accountbound Interface\\n * @author Sismo\\n * @notice Interface with errors, events and methods specific to the HydraS1SimpleAttester.\\n **/\\ninterface IHydraS1SimpleAttester is IHydraS1Base {\\n /**\\n * @dev Error when the nullifier is already used for a destination address\\n **/\\n error NullifierUsed(uint256 nullifier);\\n\\n /**\\n * @dev Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST\\n **/\\n error CollectionIdOutOfBound(uint256 collectionId);\\n\\n /**\\n * @dev Event emitted when the nullifier is associated to a destination address.\\n **/\\n event NullifierDestinationUpdated(uint256 nullifier, address newOwner);\\n\\n /**\\n * @dev Getter, returns the last attestation destination of a nullifier\\n * @param nullifier nullifier used\\n **/\\n function getDestinationOfNullifier(uint256 nullifier) 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\":\"0x8222c187e8314c931121c7632965316f079322b076501a5443d3102a0891a8d5\",\"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 // externalNullifier\\n // nullifier\\n // claimedValue\\n // accountsTreeValue\\n // isStrict\\n}\\n\\nstruct HydraS1ProofInput {\\n address destination;\\n uint256 chainId;\\n uint256 registryRoot;\\n uint256 externalNullifier;\\n uint256 nullifier;\\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 _getNullifier(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(\\n HydraS1ProofData memory self\\n )\\n internal\\n pure\\n returns (uint256[2] memory, uint256[2][2] memory, uint256[2] memory, uint256[10] memory)\\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(\\n HydraS1ProofData memory self\\n ) internal pure returns (uint256[2] memory) {\\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(\\n HydraS1ProofData memory self\\n ) internal pure returns (uint256) {\\n return self.input[5];\\n }\\n\\n function _getNullifier(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 _getNullifier(bytes calldata self) internal pure returns (uint256) {\\n HydraS1ProofData memory snarkProofData = abi.decode(self, (HydraS1ProofData));\\n uint256 nullifier = uint256(_getNullifier(snarkProofData));\\n return nullifier;\\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(\\n bytes memory encodedProperties\\n ) internal pure returns (uint256) {\\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\":\"0xa484f046e44f6c77177ba6f165573dc3ee90680a057dff7d3de46d67a29c462a\",\"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(\\n Request calldata request,\\n bytes calldata proofData\\n ) external override returns (Attestation[] memory) {\\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 address[] memory attestationOwners = new address[](collectionIds.length);\\n\\n uint256[] memory attestationCollectionIds = new uint256[](collectionIds.length);\\n\\n Attestation[] memory attestations = new Attestation[](collectionIds.length);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n // fetch attestations from the registry\\n (\\n address issuer,\\n uint256 attestationValue,\\n uint32 timestamp,\\n bytes memory extraData\\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\\n\\n attestationOwners[i] = attestationsOwner;\\n attestationCollectionIds[i] = collectionIds[i];\\n\\n attestations[i] = (\\n Attestation(\\n collectionIds[i],\\n attestationsOwner,\\n issuer,\\n attestationValue,\\n timestamp,\\n extraData\\n )\\n );\\n }\\n\\n _verifyAttestationsDeletionRequest(attestations, proofData);\\n\\n _beforeDeleteAttestations(attestations, proofData);\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\\n\\n _afterDeleteAttestations(attestations, proofData);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n emit AttestationDeleted(attestations[i]);\\n }\\n return attestations;\\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(\\n Request calldata request,\\n bytes calldata proofData\\n ) public view virtual 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(\\n Request calldata request,\\n bytes calldata proofData\\n ) internal virtual {}\\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(\\n Attestation[] memory attestations,\\n bytes calldata proofData\\n ) internal virtual {}\\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(\\n Attestation[] memory attestations,\\n bytes calldata proofData\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x7743f02ed07e1b40a2ff45f5a45b5fe87d765326cce3528676cbd36c3d08ba37\",\"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';\\nimport {IAttestationsRegistryConfigLogic} from './IAttestationsRegistryConfigLogic.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry is IAttestationsRegistryConfigLogic {\\n error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view returns (address, uint256, uint32, bytes memory);\\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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view 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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0x0c3af349bcfa545c959f4d9f25aacb73e3ef1ca7cfe62a2eda4a743a6835904f\",\"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 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 error AttributeDoesNotExist(uint8 attributeIndex);\\n error AttributeAlreadyExists(uint8 attributeIndex);\\n error ArgsLengthDoesNotMatch();\\n\\n event NewAttributeCreated(uint8 attributeIndex, bytes32 attributeName);\\n event AttributeNameUpdated(\\n uint8 attributeIndex,\\n bytes32 newAttributeName,\\n bytes32 previousAttributeName\\n );\\n event AttributeDeleted(uint8 attributeIndex, bytes32 deletedAttributeName);\\n\\n event AttestationsCollectionAttributeSet(\\n uint256 collectionId,\\n uint8 attributeIndex,\\n uint8 attributeValue\\n );\\n\\n event IssuerAuthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n event IssuerUnauthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n\\n /**\\n * @dev Returns whether an attestationsCollection has a specific attribute referenced by its index\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute. Can go from 0 to 63.\\n */\\n function attestationsCollectionHasAttribute(\\n uint256 collectionId,\\n uint8 index\\n ) external view returns (bool);\\n\\n function attestationsCollectionHasAttributes(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (bool);\\n\\n /**\\n * @dev Returns the attribute's value (from 1 to 15) of an attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param attributeIndex Index of the attribute. Can go from 0 to 63.\\n */\\n function getAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 attributeIndex\\n ) external view returns (uint8);\\n\\n function getAttributesValuesForAttestationsCollection(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (uint8[] memory);\\n\\n /**\\n * @dev Set a value for an attribute of an attestationsCollection. The attribute should already be created.\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute (must be between 0 and 63)\\n * @param value Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15\\n */\\n function setAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 index,\\n uint8 value\\n ) external;\\n\\n function setAttributesValuesForAttestationsCollections(\\n uint256[] memory collectionIds,\\n uint8[] memory indices,\\n uint8[] memory values\\n ) external;\\n\\n /**\\n * @dev Returns all the enabled attributes names and their values for a specific attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n */\\n function getAttributesNamesAndValuesForAttestationsCollection(\\n uint256 collectionId\\n ) external view returns (bytes32[] memory, uint8[] memory);\\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 /**\\n * @dev Create a new attribute.\\n * @param index Index of the attribute. Can go from 0 to 63.\\n * @param name Name in bytes32 of the attribute\\n */\\n function createNewAttribute(uint8 index, bytes32 name) external;\\n\\n function createNewAttributes(uint8[] memory indices, bytes32[] memory names) external;\\n\\n /**\\n * @dev Update the name of an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n * @param newName new name in bytes32 of the attribute\\n */\\n function updateAttributeName(uint8 index, bytes32 newName) external;\\n\\n function updateAttributesName(uint8[] memory indices, bytes32[] memory names) external;\\n\\n /**\\n * @dev Delete an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n */\\n function deleteAttribute(uint8 index) external;\\n\\n function deleteAttributes(uint8[] memory indices) external;\\n}\\n\",\"keccak256\":\"0x07a1a9e8d2caf1d810ba8fb760a35ce2a0ef60a76814d44881a5aa56162ce26b\",\"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(\\n Request calldata request,\\n bytes calldata proofData\\n ) external 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(\\n Request calldata request,\\n bytes calldata proofData\\n ) external view 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\":\"0x2d5faf5df56dfe1294202e89180846a1d4a5f938699619ee73b60c7314a97dfe\",\"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/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\"},\"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 uint8 public constant IMPLEMENTATION_VERSION = 2;\\n\\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 ownerAddress Owner of the contract, can update public key and address\\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\n */\\n function initialize(address ownerAddress) public reinitializer(IMPLEMENTATION_VERSION) {\\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\\n if (owner() == address(0) || address(this).code.length == 0) {\\n _transferOwnership(ownerAddress);\\n }\\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\":\"0x3467998cbdb82b0c64aa8627efc5893d2b369f73e66e5d1095305e4609593cc5\",\"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 uint8 public constant IMPLEMENTATION_VERSION = 2;\\n\\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 ownerAddress 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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\n */\\n function initialize(\\n address ownerAddress,\\n uint256[2] memory commitmentMapperEdDSAPubKey,\\n address commitmentMapperAddress\\n ) public reinitializer(IMPLEMENTATION_VERSION) {\\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\\n if (owner() == address(0) || address(this).code.length == 0) {\\n _transferOwnership(ownerAddress);\\n _updateCommitmentMapperEdDSAPubKey(commitmentMapperEdDSAPubKey);\\n _updateCommitmentMapperAddress(commitmentMapperAddress);\\n }\\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\":\"0x1b6ab7a4ba266f3da2c7f6ba3de93e3ab89f389dbd6db14514b43cbdcbe9fe09\",\"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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\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\":\"0x5e882d3091e816f1286837eef92ae17737abf66fdeece1282b752f27ba18492b\",\"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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\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\":\"0xcb419cf389baad6f38de28625718f64f551d2669339c1b4e1887e11d62484469\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101406040523480156200001257600080fd5b5060405162002b2738038062002b2783398101604081905262000035916200020f565b6001600160a01b0387811660805286811660a05285811660e052841660c0526101008390526101208290526200006b3362000083565b6200007681620000d5565b5050505050505062000292565b601580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054600490610100900460ff16158015620000f8575060005460ff8083169116105b620001605760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805461ffff191660ff831617610100178155620001876015546001600160a01b031690565b6001600160a01b031614806200019c5750303b155b15620001ad57620001ad8262000083565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b80516001600160a01b03811681146200020a57600080fd5b919050565b600080600080600080600060e0888a0312156200022b57600080fd5b6200023688620001f2565b96506200024660208901620001f2565b95506200025660408901620001f2565b94506200026660608901620001f2565b93506080880151925060a088015191506200028460c08901620001f2565b905092959891949750929550565b60805160a05160c05160e05161010051610120516127ff620003286000396000818161025e0152610d9201526000818161023701528181610d6a01526117200152600081816102dd01526112fa01526000818161017901526113960152600081816101f901526114f7015260008181610323015281816107820152818161096301528181610ae8015261177901526127ff6000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80638b159099116100b8578063c4d66de81161007c578063c4d66de814610347578063c776adde1461035a578063ca1cc6461461036d578063e60f999f14610380578063f2fde38b14610393578063f7e420b3146103a657600080fd5b80638b159099146102a25780638da5cb5b146102ca578063918447af146102db578063af411a3014610301578063bfa665851461032157600080fd5b806346657fe91161010a57806346657fe9146101f7578063524a32481461021d57806354846d7a146102325780637000b05114610259578063715018a614610280578063754b377c1461028857600080fd5b8063063599db146101475780632254f98e14610177578063345dd9891461019d5780633800a4b9146101be5780633c4a9854146101e4575b600080fd5b61015a610155366004611bbf565b6103b9565b6040516001600160a01b0390911681526020015b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000061015a565b6101b06101ab366004611ce1565b6103d8565b60405190815260200161016e565b6101d16101cc366004611bbf565b6103f7565b60405161ffff909116815260200161016e565b6101d16101f2366004611ce1565b61040f565b7f000000000000000000000000000000000000000000000000000000000000000061015a565b61023061022b366004611d27565b61042e565b005b6101b07f000000000000000000000000000000000000000000000000000000000000000081565b6101b07f000000000000000000000000000000000000000000000000000000000000000081565b610230610494565b610290600481565b60405160ff909116815260200161016e565b6102b56102b0366004611bbf565b6104a8565b60405163ffffffff909116815260200161016e565b6015546001600160a01b031661015a565b7f000000000000000000000000000000000000000000000000000000000000000061015a565b61031461030f366004611d9f565b6104c2565b60405161016e9190611ec2565b7f000000000000000000000000000000000000000000000000000000000000000061015a565b610230610355366004611f49565b610573565b610314610368366004611f66565b61068b565b6101d161037b366004612017565b610a46565b61031461038e366004611d9f565b610aaa565b6102306103a1366004611f49565b610bc6565b6102b56103b4366004611bbf565b610c3f565b6000818152600160205260408120546001600160a01b03165b92915050565b600080828060200190518101906103ef919061203c565b509392505050565b6000818152603e602052604081205461ffff166103d2565b60008082806020019051810190610426919061203c565b949350505050565b610436610c59565b600082815260296020908152604091829020805463ffffffff191663ffffffff8516908117909155915191825283917f893e2a4c394b497c1a2b041d18acc02d05deb2cc7ae3ea0f85d001aa93dff48b910160405180910390a25050565b61049c610c59565b6104a66000610cb3565b565b60008181526029602052604081205463ffffffff166103d2565b606060006104d1858585610d05565b905060006104df8585610e84565b9050816000815181106104f4576104f4612068565b602002602001015160a00151610528828460008151811061051757610517612068565b602002602001015160200151610a46565b60405160200161053992919061207e565b6040516020818303038152906040528260008151811061055b5761055b612068565b602090810291909101015160a0015250949350505050565b600054600490610100900460ff16158015610595575060005460ff8083169116105b6105fd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805461ffff191660ff8316176101001781556106236015546001600160a01b031690565b6001600160a01b031614806106375750303b155b156106455761064582610cb3565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b60606000856001600160401b038111156106a7576106a7611bd8565b6040519080825280602002602001820160405280156106d0578160200160208202803683370190505b5090506000866001600160401b038111156106ed576106ed611bd8565b604051908082528060200260200182016040528015610716578160200160208202803683370190505b5090506000876001600160401b0381111561073357610733611bd8565b60405190808252806020026020018201604052801561076c57816020015b610759611a9d565b8152602001906001900390816107515790505b50905060005b88811015610940576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f888181106107c1576107c1612068565b905060200201358e6040518363ffffffff1660e01b81526004016107f89291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610815573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261083d91908101906120a4565b93509350935093508b88868151811061085857610858612068565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061088a5761088a612068565b905060200201358786815181106108a3576108a3612068565b6020026020010181815250506040518060c001604052808f8f888181106108cc576108cc612068565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061091e5761091e612068565b60200260200101819052505050505080806109389061216c565b915050610772565b5061094c818787610ea0565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af79061099a9086908690600401612185565b600060405180830381600087803b1580156109b457600080fd5b505af11580156109c8573d6000803e3d6000fd5b5050505060005b88811015610a39577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b828281518110610a0a57610a0a612068565b6020026020010151604051610a1f9190612209565b60405180910390a180610a318161216c565b9150506109cf565b5098975050505050505050565b600082815260016020908152604080832054603e9092528220546001600160a01b039091169061ffff168115801590610a915750836001600160a01b0316826001600160a01b031614155b1561042657610aa160018261221c565b95945050505050565b6060610ab7848484610eb9565b6000610ac48585856104c2565b9050610ad1858585610f01565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c09390610b1d908490600401611ec2565b600060405180830381600087803b158015610b3757600080fd5b505af1158015610b4b573d6000803e3d6000fd5b5050505060005b8151811015610bbd577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc828281518110610b8e57610b8e612068565b6020026020010151604051610ba39190612209565b60405180910390a180610bb58161216c565b915050610b52565b50949350505050565b610bce610c59565b6001600160a01b038116610c335760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105f4565b610c3c81610cb3565b50565b6000818152603d602052604081205463ffffffff166103d2565b6015546001600160a01b031633146104a65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105f4565b601580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606000610d1a610d1586612242565b611057565b60408051600180825281830190925291925060009190816020015b610d3d611a9d565b815260200190600190039081610d35575050606083015151909150600090610d8e906001600160801b03167f000000000000000000000000000000000000000000000000000000000000000061236b565b90507f0000000000000000000000000000000000000000000000000000000000000000811115610dd457604051637bbf29e360e01b8152600481018290526024016105f4565b306000610de18888610e84565b90506040518060c0016040528084815260200186604001516001600160a01b03168152602001836001600160a01b031681526020018660200151815260200186606001516020015163ffffffff16815260200182604051602001610e4791815260200190565b60405160208183030381529060405281525084600081518110610e6c57610e6c612068565b60209081029190910101525091979650505050505050565b600080610e9383850185612439565b90506000610aa1826110dc565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610ec782840184612439565b90506000610ed4826110f2565b90506000610ee4610d1587612242565b9050610ef0818361119c565b610ef9836114cd565b505050505050565b6000610f0d8383610e84565b6000818152600160205260408120549192506001600160a01b0390911690610f37610d1587612242565b90506001600160a01b03821615801590610f67575080604001516001600160a01b0316826001600160a01b031614155b1561103e576060810151516001600160801b031660009081526029602052604081205463ffffffff1690819003610fc35760608201515160405163065ef5f360e01b81526001600160801b0390911660048201526024016105f4565b610fcd848261166a565b15611029576000848152603e602052604081205461ffff16604051630d16862d60e11b8152600481018790526001600160a01b038616602482015261ffff8216604482015263ffffffff841660648201529091506084016105f4565b611033828461169a565b61103c846117e8565b505b610ef9836110526040890160208a01611f49565b61188f565b61105f611aeb565b6000826000015160008151811061107857611078612068565b6020026020010151905061108b816118ee565b600081604001518060200190518101906110a5919061251a565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b602081015160009060065b602002015192915050565b6110fa611b4e565b60405180610120016040528061110f8461192e565b6001600160a01b031681526020016111268461193c565b81526020016111348461194b565b81526020016111428461195a565b8152602001611150846110dc565b815260200161115e84611969565b815260200161116c84611978565b81526020016111848460200151610120015160011490565b1515815260200161119484611987565b905292915050565b815160c0820151146111d157815160c082015160405163fe405c7760e01b8152600481019290925260248201526044016105f4565b81606001516040015115158160e0015115150361121c57606082015160409081015160e08301519151634629f1b560e11b8152901515600482015290151560248201526044016105f4565b81604001516001600160a01b031681600001516001600160a01b03161461127057604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016105f4565b468160200151146112a3576020810151604051630432cec160e31b815246600482015260248101919091526044016105f4565b81602001518160a00151146112de57602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016105f4565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015611349573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136d9190612595565b61139257806040015160405163cbfe7bc360e01b81526004016105f491815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa1580156113f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141591906125b0565b80516101008401515191925014158061143c57506020808201516101008401519091015114155b15611486578051602080830151610100850151805192015160405163318d812b60e01b815260048101949094526024840191909152604483019190915260648201526084016105f4565b6000611491846119df565b9050808360600151146114c7576060830151604051630e6efbdd60e21b81526105f4918391600401918252602082015260400190565b50505050565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f6946115309490939290919060040161262c565b602060405180830381865afa925050508015611569575060408051601f3d908101601f1916820190925261156691810190612595565b60015b61163f576115756126b0565b806308c379a0036115ae57506115896126cc565b8061159457506115ed565b8060405162dd577760e81b81526004016105f49190612755565b634e487b71036115ed576115c0612768565b906115cb57506115ed565b60405162dd577760e81b815260206004820152600060248201526044016105f4565b3d808015611617576040519150601f19603f3d011682016040523d82523d6000602084013e61161c565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016105f4565b806116665760405162dd577760e81b815260206004820152600060248201526044016105f4565b5050565b6000828152603d6020526040812054429061168c90849063ffffffff16612788565b63ffffffff16119392505050565b60408051600180825281830190925260009160208083019080368337505060408051600180825281830190925292935060009291506020808301908036833701905050905082826000815181106116f3576116f3612068565b6001600160a01b0390921660209283029190910190910152606084015151611744906001600160801b03167f000000000000000000000000000000000000000000000000000000000000000061236b565b8160008151811061175757611757612068565b602090810291909101015260405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af7906117b09085908590600401612185565b600060405180830381600087803b1580156117ca57600080fd5b505af11580156117de573d6000803e3d6000fd5b5050505050505050565b6000818152603d60209081526040808320805463ffffffff19164263ffffffff16179055603e909152812080546001929061182890849061ffff1661221c565b82546101009290920a61ffff8181021990931691831602179091556000838152603e60209081526040918290205491519190921681528392507f85183f8abad8891335fb845d2e6b4f84a9c7f7409f242f4e5ec138a84abffacf910160405180910390a250565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f0c5a122814a29e22d1363dacdd6f7c95345b70890f97e65eacb5565da28116ac910161067f565b60006118fd8260400151611a04565b825190915081146116665781516040516337e3d1ab60e01b81526105f4918391600401918252602082015260400190565b6020810151600090816110e7565b602081015160009060016110e7565b602081015160009060046110e7565b602081015160009060056110e7565b602081015160009060076110e7565b602081015160009060086110e7565b61198f611ba1565b604051806040016040528083602001516002600a81106119b1576119b1612068565b6020020151815260200183602001516003600a81106119d2576119d2612068565b6020020151905292915050565b6000806119fd308460600151600001516001600160801b0316611a39565b9392505050565b805160208201206000906103d2907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906127a7565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6119fd91906127a7565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b6040518060800160405280600081526020016000815260200160006001600160a01b03168152602001611b49604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b905290565b60405180610120016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600015158152602001611b495b60405180604001604052806002906020820280368337509192915050565b600060208284031215611bd157600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b0382111715611c0d57611c0d611bd8565b60405250565b606081018181106001600160401b0382111715611c0d57611c0d611bd8565b601f8201601f191681016001600160401b0381118282101715611c5757611c57611bd8565b6040525050565b60006001600160401b03821115611c7757611c77611bd8565b50601f01601f191660200190565b600082601f830112611c9657600080fd5b8135611ca181611c5e565b604051611cae8282611c32565b828152856020848701011115611cc357600080fd5b82602086016020830137600092810160200192909252509392505050565b600060208284031215611cf357600080fd5b81356001600160401b03811115611d0957600080fd5b61042684828501611c85565b63ffffffff81168114610c3c57600080fd5b60008060408385031215611d3a57600080fd5b823591506020830135611d4c81611d15565b809150509250929050565b60008083601f840112611d6957600080fd5b5081356001600160401b03811115611d8057600080fd5b602083019150836020828501011115611d9857600080fd5b9250929050565b600080600060408486031215611db457600080fd5b83356001600160401b0380821115611dcb57600080fd5b9085019060408288031215611ddf57600080fd5b90935060208501359080821115611df557600080fd5b50611e0286828701611d57565b9497909650939450505050565b60005b83811015611e2a578181015183820152602001611e12565b838111156114c75750506000910152565b60008151808452611e53816020860160208601611e0f565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261042660c0850182611e3b565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611f1757603f19888603018452611f05858351611e67565b94509285019290850190600101611ee9565b5092979650505050505050565b6001600160a01b0381168114610c3c57600080fd5b8035611f4481611f24565b919050565b600060208284031215611f5b57600080fd5b81356119fd81611f24565b600080600080600060608688031215611f7e57600080fd5b85356001600160401b0380821115611f9557600080fd5b818801915088601f830112611fa957600080fd5b813581811115611fb857600080fd5b8960208260051b8501011115611fcd57600080fd5b60208301975080965050611fe360208901611f39565b94506040880135915080821115611ff957600080fd5b5061200688828901611d57565b969995985093965092949392505050565b6000806040838503121561202a57600080fd5b823591506020830135611d4c81611f24565b6000806040838503121561204f57600080fd5b82519150602083015161ffff81168114611d4c57600080fd5b634e487b7160e01b600052603260045260246000fd5b6040815260006120916040830185611e3b565b905061ffff831660208301529392505050565b600080600080608085870312156120ba57600080fd5b84516120c581611f24565b6020860151604087015191955093506120dd81611d15565b60608601519092506001600160401b038111156120f957600080fd5b8501601f8101871361210a57600080fd5b805161211581611c5e565b6040516121228282611c32565b82815289602084860101111561213757600080fd5b612148836020830160208701611e0f565b969995985093965050505050565b634e487b7160e01b600052601160045260246000fd5b60006001820161217e5761217e612156565b5060010190565b604080825283519082018190526000906020906060840190828701845b828110156121c75781516001600160a01b0316845292840192908401906001016121a2565b5050508381038285015284518082528583019183019060005b818110156121fc578351835292840192918401916001016121e0565b5090979650505050505050565b6020815260006119fd6020830184611e67565b600061ffff80831681851680830382111561223957612239612156565b01949350505050565b6000604080833603121561225557600080fd5b805161226081611bee565b83356001600160401b038082111561227757600080fd5b9085019036601f83011261228a57600080fd5b813560208282111561229e5761229e611bd8565b8160051b86516122b083830182611c32565b928352848101820192828101368511156122c957600080fd5b83870192505b8483101561234d578235868111156122e75760008081fd5b8701606036829003601f19018113156123005760008081fd5b8a5161230b81611c13565b8287013581528b8301358188015290820135908882111561232c5760008081fd5b61233a368884860101611c85565b818d0152835250509183019183016122cf565b5086525061235c888201611f39565b90850152509195945050505050565b6000821982111561237e5761237e612156565b500190565b600082601f83011261239457600080fd5b6040516123a081611bee565b8060408401858111156123b257600080fd5b845b818110156123cc5780358352602092830192016123b4565b509195945050505050565b600082601f8301126123e857600080fd5b6040516101408082018281106001600160401b038211171561240c5761240c611bd8565b6040528301818582111561241f57600080fd5b845b828110156123cc578035825260209182019101612421565b600081830361024081121561244d57600080fd5b6040805161245a81611bee565b6101008084121561246a57600080fd5b8251935061247784611c13565b6124818787612383565b845286605f87011261249257600080fd5b825161249d81611bee565b8060c08801898111156124af57600080fd5b8589015b818110156124d4576124c58b82612383565b835260209092019186016124b3565b508260208801526124e58a82612383565b868801525050508382526124fb878288016123d7565b60208301525095945050505050565b80518015158114611f4457600080fd5b60006060828403121561252c57600080fd5b604051606081018181106001600160401b038211171561254e5761254e611bd8565b60405282516001600160801b038116811461256857600080fd5b8152602083015161257881611d15565b60208201526125896040840161250a565b60408201529392505050565b6000602082840312156125a757600080fd5b6119fd8261250a565b6000604082840312156125c257600080fd5b82601f8301126125d157600080fd5b6040516125dd81611bee565b8060408401858111156125ef57600080fd5b845b818110156123cc5780518352602092830192016125f1565b8060005b60028110156114c757815184526020938401939091019060010161260d565b610240810161263b8287612609565b60408083018660005b600281101561266b57612658838351612609565b9183019160209190910190600101612644565b5050505061267c60c0830185612609565b61010082018360005b600a8110156126a4578151835260209283019290910190600101612685565b50505095945050505050565b600060033d11156126c95760046000803e5060005160e01c5b90565b600060443d10156126da5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561270957505050505090565b82850191508151818111156127215750505050505090565b843d870101602082850101111561273b5750505050505090565b61274a60208286010187611c32565b509095945050505050565b6020815260006119fd6020830184611e3b565b60008060233d1115612784576020600460003e50506000516001905b9091565b600063ffffffff80831681851680830382111561223957612239612156565b6000826127c457634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220202a9a70b259c56940b27ba667618cafc46cd9a9f1eb7ea03e8803b68fee4b3964736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101425760003560e01c80638b159099116100b8578063c4d66de81161007c578063c4d66de814610347578063c776adde1461035a578063ca1cc6461461036d578063e60f999f14610380578063f2fde38b14610393578063f7e420b3146103a657600080fd5b80638b159099146102a25780638da5cb5b146102ca578063918447af146102db578063af411a3014610301578063bfa665851461032157600080fd5b806346657fe91161010a57806346657fe9146101f7578063524a32481461021d57806354846d7a146102325780637000b05114610259578063715018a614610280578063754b377c1461028857600080fd5b8063063599db146101475780632254f98e14610177578063345dd9891461019d5780633800a4b9146101be5780633c4a9854146101e4575b600080fd5b61015a610155366004611bbf565b6103b9565b6040516001600160a01b0390911681526020015b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000061015a565b6101b06101ab366004611ce1565b6103d8565b60405190815260200161016e565b6101d16101cc366004611bbf565b6103f7565b60405161ffff909116815260200161016e565b6101d16101f2366004611ce1565b61040f565b7f000000000000000000000000000000000000000000000000000000000000000061015a565b61023061022b366004611d27565b61042e565b005b6101b07f000000000000000000000000000000000000000000000000000000000000000081565b6101b07f000000000000000000000000000000000000000000000000000000000000000081565b610230610494565b610290600481565b60405160ff909116815260200161016e565b6102b56102b0366004611bbf565b6104a8565b60405163ffffffff909116815260200161016e565b6015546001600160a01b031661015a565b7f000000000000000000000000000000000000000000000000000000000000000061015a565b61031461030f366004611d9f565b6104c2565b60405161016e9190611ec2565b7f000000000000000000000000000000000000000000000000000000000000000061015a565b610230610355366004611f49565b610573565b610314610368366004611f66565b61068b565b6101d161037b366004612017565b610a46565b61031461038e366004611d9f565b610aaa565b6102306103a1366004611f49565b610bc6565b6102b56103b4366004611bbf565b610c3f565b6000818152600160205260408120546001600160a01b03165b92915050565b600080828060200190518101906103ef919061203c565b509392505050565b6000818152603e602052604081205461ffff166103d2565b60008082806020019051810190610426919061203c565b949350505050565b610436610c59565b600082815260296020908152604091829020805463ffffffff191663ffffffff8516908117909155915191825283917f893e2a4c394b497c1a2b041d18acc02d05deb2cc7ae3ea0f85d001aa93dff48b910160405180910390a25050565b61049c610c59565b6104a66000610cb3565b565b60008181526029602052604081205463ffffffff166103d2565b606060006104d1858585610d05565b905060006104df8585610e84565b9050816000815181106104f4576104f4612068565b602002602001015160a00151610528828460008151811061051757610517612068565b602002602001015160200151610a46565b60405160200161053992919061207e565b6040516020818303038152906040528260008151811061055b5761055b612068565b602090810291909101015160a0015250949350505050565b600054600490610100900460ff16158015610595575060005460ff8083169116105b6105fd5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6000805461ffff191660ff8316176101001781556106236015546001600160a01b031690565b6001600160a01b031614806106375750303b155b156106455761064582610cb3565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15050565b60606000856001600160401b038111156106a7576106a7611bd8565b6040519080825280602002602001820160405280156106d0578160200160208202803683370190505b5090506000866001600160401b038111156106ed576106ed611bd8565b604051908082528060200260200182016040528015610716578160200160208202803683370190505b5090506000876001600160401b0381111561073357610733611bd8565b60405190808252806020026020018201604052801561076c57816020015b610759611a9d565b8152602001906001900390816107515790505b50905060005b88811015610940576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f888181106107c1576107c1612068565b905060200201358e6040518363ffffffff1660e01b81526004016107f89291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610815573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261083d91908101906120a4565b93509350935093508b88868151811061085857610858612068565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061088a5761088a612068565b905060200201358786815181106108a3576108a3612068565b6020026020010181815250506040518060c001604052808f8f888181106108cc576108cc612068565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061091e5761091e612068565b60200260200101819052505050505080806109389061216c565b915050610772565b5061094c818787610ea0565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af79061099a9086908690600401612185565b600060405180830381600087803b1580156109b457600080fd5b505af11580156109c8573d6000803e3d6000fd5b5050505060005b88811015610a39577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b828281518110610a0a57610a0a612068565b6020026020010151604051610a1f9190612209565b60405180910390a180610a318161216c565b9150506109cf565b5098975050505050505050565b600082815260016020908152604080832054603e9092528220546001600160a01b039091169061ffff168115801590610a915750836001600160a01b0316826001600160a01b031614155b1561042657610aa160018261221c565b95945050505050565b6060610ab7848484610eb9565b6000610ac48585856104c2565b9050610ad1858585610f01565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c09390610b1d908490600401611ec2565b600060405180830381600087803b158015610b3757600080fd5b505af1158015610b4b573d6000803e3d6000fd5b5050505060005b8151811015610bbd577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc828281518110610b8e57610b8e612068565b6020026020010151604051610ba39190612209565b60405180910390a180610bb58161216c565b915050610b52565b50949350505050565b610bce610c59565b6001600160a01b038116610c335760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105f4565b610c3c81610cb3565b50565b6000818152603d602052604081205463ffffffff166103d2565b6015546001600160a01b031633146104a65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105f4565b601580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606000610d1a610d1586612242565b611057565b60408051600180825281830190925291925060009190816020015b610d3d611a9d565b815260200190600190039081610d35575050606083015151909150600090610d8e906001600160801b03167f000000000000000000000000000000000000000000000000000000000000000061236b565b90507f0000000000000000000000000000000000000000000000000000000000000000811115610dd457604051637bbf29e360e01b8152600481018290526024016105f4565b306000610de18888610e84565b90506040518060c0016040528084815260200186604001516001600160a01b03168152602001836001600160a01b031681526020018660200151815260200186606001516020015163ffffffff16815260200182604051602001610e4791815260200190565b60405160208183030381529060405281525084600081518110610e6c57610e6c612068565b60209081029190910101525091979650505050505050565b600080610e9383850185612439565b90506000610aa1826110dc565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610ec782840184612439565b90506000610ed4826110f2565b90506000610ee4610d1587612242565b9050610ef0818361119c565b610ef9836114cd565b505050505050565b6000610f0d8383610e84565b6000818152600160205260408120549192506001600160a01b0390911690610f37610d1587612242565b90506001600160a01b03821615801590610f67575080604001516001600160a01b0316826001600160a01b031614155b1561103e576060810151516001600160801b031660009081526029602052604081205463ffffffff1690819003610fc35760608201515160405163065ef5f360e01b81526001600160801b0390911660048201526024016105f4565b610fcd848261166a565b15611029576000848152603e602052604081205461ffff16604051630d16862d60e11b8152600481018790526001600160a01b038616602482015261ffff8216604482015263ffffffff841660648201529091506084016105f4565b611033828461169a565b61103c846117e8565b505b610ef9836110526040890160208a01611f49565b61188f565b61105f611aeb565b6000826000015160008151811061107857611078612068565b6020026020010151905061108b816118ee565b600081604001518060200190518101906110a5919061251a565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b602081015160009060065b602002015192915050565b6110fa611b4e565b60405180610120016040528061110f8461192e565b6001600160a01b031681526020016111268461193c565b81526020016111348461194b565b81526020016111428461195a565b8152602001611150846110dc565b815260200161115e84611969565b815260200161116c84611978565b81526020016111848460200151610120015160011490565b1515815260200161119484611987565b905292915050565b815160c0820151146111d157815160c082015160405163fe405c7760e01b8152600481019290925260248201526044016105f4565b81606001516040015115158160e0015115150361121c57606082015160409081015160e08301519151634629f1b560e11b8152901515600482015290151560248201526044016105f4565b81604001516001600160a01b031681600001516001600160a01b03161461127057604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016105f4565b468160200151146112a3576020810151604051630432cec160e31b815246600482015260248101919091526044016105f4565b81602001518160a00151146112de57602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016105f4565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015611349573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136d9190612595565b61139257806040015160405163cbfe7bc360e01b81526004016105f491815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa1580156113f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141591906125b0565b80516101008401515191925014158061143c57506020808201516101008401519091015114155b15611486578051602080830151610100850151805192015160405163318d812b60e01b815260048101949094526024840191909152604483019190915260648201526084016105f4565b6000611491846119df565b9050808360600151146114c7576060830151604051630e6efbdd60e21b81526105f4918391600401918252602082015260400190565b50505050565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f6946115309490939290919060040161262c565b602060405180830381865afa925050508015611569575060408051601f3d908101601f1916820190925261156691810190612595565b60015b61163f576115756126b0565b806308c379a0036115ae57506115896126cc565b8061159457506115ed565b8060405162dd577760e81b81526004016105f49190612755565b634e487b71036115ed576115c0612768565b906115cb57506115ed565b60405162dd577760e81b815260206004820152600060248201526044016105f4565b3d808015611617576040519150601f19603f3d011682016040523d82523d6000602084013e61161c565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016105f4565b806116665760405162dd577760e81b815260206004820152600060248201526044016105f4565b5050565b6000828152603d6020526040812054429061168c90849063ffffffff16612788565b63ffffffff16119392505050565b60408051600180825281830190925260009160208083019080368337505060408051600180825281830190925292935060009291506020808301908036833701905050905082826000815181106116f3576116f3612068565b6001600160a01b0390921660209283029190910190910152606084015151611744906001600160801b03167f000000000000000000000000000000000000000000000000000000000000000061236b565b8160008151811061175757611757612068565b602090810291909101015260405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af7906117b09085908590600401612185565b600060405180830381600087803b1580156117ca57600080fd5b505af11580156117de573d6000803e3d6000fd5b5050505050505050565b6000818152603d60209081526040808320805463ffffffff19164263ffffffff16179055603e909152812080546001929061182890849061ffff1661221c565b82546101009290920a61ffff8181021990931691831602179091556000838152603e60209081526040918290205491519190921681528392507f85183f8abad8891335fb845d2e6b4f84a9c7f7409f242f4e5ec138a84abffacf910160405180910390a250565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f0c5a122814a29e22d1363dacdd6f7c95345b70890f97e65eacb5565da28116ac910161067f565b60006118fd8260400151611a04565b825190915081146116665781516040516337e3d1ab60e01b81526105f4918391600401918252602082015260400190565b6020810151600090816110e7565b602081015160009060016110e7565b602081015160009060046110e7565b602081015160009060056110e7565b602081015160009060076110e7565b602081015160009060086110e7565b61198f611ba1565b604051806040016040528083602001516002600a81106119b1576119b1612068565b6020020151815260200183602001516003600a81106119d2576119d2612068565b6020020151905292915050565b6000806119fd308460600151600001516001600160801b0316611a39565b9392505050565b805160208201206000906103d2907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906127a7565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6119fd91906127a7565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b6040518060800160405280600081526020016000815260200160006001600160a01b03168152602001611b49604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b905290565b60405180610120016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600015158152602001611b495b60405180604001604052806002906020820280368337509192915050565b600060208284031215611bd157600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b0382111715611c0d57611c0d611bd8565b60405250565b606081018181106001600160401b0382111715611c0d57611c0d611bd8565b601f8201601f191681016001600160401b0381118282101715611c5757611c57611bd8565b6040525050565b60006001600160401b03821115611c7757611c77611bd8565b50601f01601f191660200190565b600082601f830112611c9657600080fd5b8135611ca181611c5e565b604051611cae8282611c32565b828152856020848701011115611cc357600080fd5b82602086016020830137600092810160200192909252509392505050565b600060208284031215611cf357600080fd5b81356001600160401b03811115611d0957600080fd5b61042684828501611c85565b63ffffffff81168114610c3c57600080fd5b60008060408385031215611d3a57600080fd5b823591506020830135611d4c81611d15565b809150509250929050565b60008083601f840112611d6957600080fd5b5081356001600160401b03811115611d8057600080fd5b602083019150836020828501011115611d9857600080fd5b9250929050565b600080600060408486031215611db457600080fd5b83356001600160401b0380821115611dcb57600080fd5b9085019060408288031215611ddf57600080fd5b90935060208501359080821115611df557600080fd5b50611e0286828701611d57565b9497909650939450505050565b60005b83811015611e2a578181015183820152602001611e12565b838111156114c75750506000910152565b60008151808452611e53816020860160208601611e0f565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261042660c0850182611e3b565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611f1757603f19888603018452611f05858351611e67565b94509285019290850190600101611ee9565b5092979650505050505050565b6001600160a01b0381168114610c3c57600080fd5b8035611f4481611f24565b919050565b600060208284031215611f5b57600080fd5b81356119fd81611f24565b600080600080600060608688031215611f7e57600080fd5b85356001600160401b0380821115611f9557600080fd5b818801915088601f830112611fa957600080fd5b813581811115611fb857600080fd5b8960208260051b8501011115611fcd57600080fd5b60208301975080965050611fe360208901611f39565b94506040880135915080821115611ff957600080fd5b5061200688828901611d57565b969995985093965092949392505050565b6000806040838503121561202a57600080fd5b823591506020830135611d4c81611f24565b6000806040838503121561204f57600080fd5b82519150602083015161ffff81168114611d4c57600080fd5b634e487b7160e01b600052603260045260246000fd5b6040815260006120916040830185611e3b565b905061ffff831660208301529392505050565b600080600080608085870312156120ba57600080fd5b84516120c581611f24565b6020860151604087015191955093506120dd81611d15565b60608601519092506001600160401b038111156120f957600080fd5b8501601f8101871361210a57600080fd5b805161211581611c5e565b6040516121228282611c32565b82815289602084860101111561213757600080fd5b612148836020830160208701611e0f565b969995985093965050505050565b634e487b7160e01b600052601160045260246000fd5b60006001820161217e5761217e612156565b5060010190565b604080825283519082018190526000906020906060840190828701845b828110156121c75781516001600160a01b0316845292840192908401906001016121a2565b5050508381038285015284518082528583019183019060005b818110156121fc578351835292840192918401916001016121e0565b5090979650505050505050565b6020815260006119fd6020830184611e67565b600061ffff80831681851680830382111561223957612239612156565b01949350505050565b6000604080833603121561225557600080fd5b805161226081611bee565b83356001600160401b038082111561227757600080fd5b9085019036601f83011261228a57600080fd5b813560208282111561229e5761229e611bd8565b8160051b86516122b083830182611c32565b928352848101820192828101368511156122c957600080fd5b83870192505b8483101561234d578235868111156122e75760008081fd5b8701606036829003601f19018113156123005760008081fd5b8a5161230b81611c13565b8287013581528b8301358188015290820135908882111561232c5760008081fd5b61233a368884860101611c85565b818d0152835250509183019183016122cf565b5086525061235c888201611f39565b90850152509195945050505050565b6000821982111561237e5761237e612156565b500190565b600082601f83011261239457600080fd5b6040516123a081611bee565b8060408401858111156123b257600080fd5b845b818110156123cc5780358352602092830192016123b4565b509195945050505050565b600082601f8301126123e857600080fd5b6040516101408082018281106001600160401b038211171561240c5761240c611bd8565b6040528301818582111561241f57600080fd5b845b828110156123cc578035825260209182019101612421565b600081830361024081121561244d57600080fd5b6040805161245a81611bee565b6101008084121561246a57600080fd5b8251935061247784611c13565b6124818787612383565b845286605f87011261249257600080fd5b825161249d81611bee565b8060c08801898111156124af57600080fd5b8589015b818110156124d4576124c58b82612383565b835260209092019186016124b3565b508260208801526124e58a82612383565b868801525050508382526124fb878288016123d7565b60208301525095945050505050565b80518015158114611f4457600080fd5b60006060828403121561252c57600080fd5b604051606081018181106001600160401b038211171561254e5761254e611bd8565b60405282516001600160801b038116811461256857600080fd5b8152602083015161257881611d15565b60208201526125896040840161250a565b60408201529392505050565b6000602082840312156125a757600080fd5b6119fd8261250a565b6000604082840312156125c257600080fd5b82601f8301126125d157600080fd5b6040516125dd81611bee565b8060408401858111156125ef57600080fd5b845b818110156123cc5780518352602092830192016125f1565b8060005b60028110156114c757815184526020938401939091019060010161260d565b610240810161263b8287612609565b60408083018660005b600281101561266b57612658838351612609565b9183019160209190910190600101612644565b5050505061267c60c0830185612609565b61010082018360005b600a8110156126a4578151835260209283019290910190600101612685565b50505095945050505050565b600060033d11156126c95760046000803e5060005160e01c5b90565b600060443d10156126da5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561270957505050505090565b82850191508151818111156127215750505050505090565b843d870101602082850101111561273b5750505050505090565b61274a60208286010187611c32565b509095945050505050565b6020815260006119fd6020830184611e3b565b60008060233d1115612784576020600460003e50506000516001905b9091565b600063ffffffff80831681851680830382111561223957612239612156565b6000826127c457634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220202a9a70b259c56940b27ba667618cafc46cd9a9f1eb7ea03e8803b68fee4b3964736f6c634300080e0033", + "devdoc": { + "author": "Sismo", + "errors": { + "CollectionIdOutOfBound(uint256)": [ + { + "details": "Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST*" + } + ], + "CooldownDurationNotSetForGroupIndex(uint256)": [ + { + "details": "Error when the cooldown duration for a given groupIndex is equal to zero. The HydraS1AccountboundAttester behaves like the HydraS1SimpleAttester.*" + } + ], + "NullifierOnCooldown(uint256,address,uint16,uint32)": [ + { + "details": "Error when the nullifier is on cooldown. The user have to wait the cooldownDuration before being able to change again the destination address.*" + } + ], + "NullifierUsed(uint256)": [ + { + "details": "Error when the nullifier is already used for a destination address*" + } + ] + }, + "kind": "dev", + "methods": { + "_getNextBurnCount(uint256,address)": { + "details": "returns burn count or burn count + 1 if new burn will happen", + "params": { + "claimDestination": "destination referenced in the user claim", + "nullifier": "user nullifier" + } + }, + "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 attestation collection in which the attester is supposed to record", + "collectionIdLast": "Id of the last attestation collection in which the attester is supposed to record", + "commitmentMapperAddress": "commitment mapper's public key registry", + "hydraS1VerifierAddress": "ZK Snark Hydra-S1 Verifier contract", + "owner": "Address of attester's owner" + } + }, + "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" + }, + "getBurnCountFromExtraData(bytes)": { + "details": "Returns the burn count for a given extraData", + "params": { + "extraData": "bytes where the burnCount is encoded" + } + }, + "getCommitmentMapperRegistry()": { + "details": "Getter of Commitment Mapper Registry contract" + }, + "getCooldownDurationForGroupIndex(uint256)": { + "details": "Getter, get the cooldown duration of a groupIndex", + "params": { + "groupIndex": "internal collection id*" + } + }, + "getDestinationOfNullifier(uint256)": { + "details": "Getter, returns the last attestation destination of a nullifier", + "params": { + "nullifier": "nullifier used*" + } + }, + "getNullifierBurnCount(uint256)": { + "details": "Getter, returns the burnCount of a nullifier", + "params": { + "nullifier": "nullifier used*" + } + }, + "getNullifierCooldownStart(uint256)": { + "details": "Getter, returns the cooldown start of a nullifier", + "params": { + "nullifier": "nullifier used*" + } + }, + "getNullifierFromExtraData(bytes)": { + "details": "returns the nullifier for a given extraData", + "params": { + "extraData": "bytes where the nullifier is encoded" + } + }, + "getVerifier()": { + "details": "Getter of Hydra-S1 Verifier contract" + }, + "initialize(address)": { + "details": "Initialize function, to be called by the proxy delegating calls to this implementation", + "params": { + "ownerAddress": "Owner of the contract, has the right to authorize/unauthorize attestations issuers" + } + }, + "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." + }, + "setCooldownDurationForGroupIndex(uint256,uint32)": { + "details": "Setter, sets the cooldown duration of a groupIndex", + "params": { + "cooldownDuration": "cooldown duration we want to set for the groupIndex*", + "groupIndex": "internal collection id" + } + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + } + }, + "title": "Hydra-S1 Accountbound Attester", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "getCooldownDurationForGroupIndex(uint256)": { + "notice": "returns 0 when the accountbound feature is deactivated for this group" + }, + "initialize(address)": { + "notice": "The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization." + }, + "setCooldownDurationForGroupIndex(uint256,uint32)": { + "notice": "set to 0 to deactivate the accountbound feature for this group" + } + }, + "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 Simple Attester contract is inherited and holds the complex Hydra S1 verification logic. Request verification alongside proof verification is already implemented in the inherited HydraS1SimpleAttester, along with the buildAttestations logic. However, we override the buildAttestations function to encode the nullifier and its burn count in the user attestation. The _beforeRecordAttestations is also overriden to fit the Accountbound 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 - Nullified Each source account gets one nullifier per claim (i.e only one attestation per source account per claim) While semaphore/ tornado cash are using the following notations: nullifierHash = hash(IdNullifier, externalNullifier) We prefered to use the naming 'nullifier' instead of 'nullifierHash' in our contracts and documentation. We also renamed 'IdNullifier' in 'sourceSecret' (the secret tied to a source account) and we kept the 'externalNullifier' notation. Finally, here is our notations at Sismo: nullifier = hash(sourceSecret, externalNullifier) - Accountbound (opt-in, with cooldown period) The owner of this attester can set a cooldown duration for a specific group, activating the accountbound feature for this group. Users can update their attestation's destination by providing a new Hydra-S1 ZK proof It means the attestation is bound to the source account, stored on an updatable destination account. When deleting/ sending to a new destination, the nullifier will enter a cooldown period, so it remains occasional. A group that has its cooldown duration set to 0 means it has been configured to not feature accountbound attestations, attestations can not be transferred One can however know that the former and the new destinations were created using the same nullifier, thus creating a link between those two destinations. - Renewable A nullifier 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": 935, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8" + }, + { + "astId": 938, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 8093, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_nullifiersDestinations", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_uint256,t_address)" + }, + { + "astId": 8097, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_placeHoldersHydraS1Simple", + "offset": 0, + "slot": "2", + "type": "t_array(t_uint256)19_storage" + }, + { + "astId": 396, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_owner", + "offset": 0, + "slot": "21", + "type": "t_address" + }, + { + "astId": 7520, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_placeHolderBeforeHydraS1Accountbound", + "offset": 0, + "slot": "22", + "type": "t_array(t_uint256)19_storage" + }, + { + "astId": 7524, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_cooldownDurations", + "offset": 0, + "slot": "41", + "type": "t_mapping(t_uint256,t_uint32)" + }, + { + "astId": 7528, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_placeHoldersHydraS1AccountboundConfig", + "offset": 0, + "slot": "42", + "type": "t_array(t_uint256)19_storage" + }, + { + "astId": 7532, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_nullifiersCooldownStart", + "offset": 0, + "slot": "61", + "type": "t_mapping(t_uint256,t_uint32)" + }, + { + "astId": 7536, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_nullifiersBurnCount", + "offset": 0, + "slot": "62", + "type": "t_mapping(t_uint256,t_uint16)" + }, + { + "astId": 7540, + "contract": "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", + "label": "_placeHoldersHydraS1AccountboundLogic", + "offset": 0, + "slot": "63", + "type": "t_array(t_uint256)18_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)18_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[18]", + "numberOfBytes": "576" + }, + "t_array(t_uint256)19_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[19]", + "numberOfBytes": "608" + }, + "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_mapping(t_uint256,t_uint16)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint16)", + "numberOfBytes": "32", + "value": "t_uint16" + }, + "t_mapping(t_uint256,t_uint32)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => uint32)", + "numberOfBytes": "32", + "value": "t_uint32" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "encoding": "inplace", + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/HydraS1AccountboundAttesterImplemV3.json b/deployments/mumbai/HydraS1AccountboundAttesterImplemV3.json deleted file mode 100644 index 9c15786..0000000 --- a/deployments/mumbai/HydraS1AccountboundAttesterImplemV3.json +++ /dev/null @@ -1,991 +0,0 @@ -{ - "address": "0x6a7E6A85ea2744C1c033BE4Da315636EBD95f054", - "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": [ - { - "components": [ - { - "internalType": "address", - "name": "destination", - "type": "address" - }, - { - "internalType": "uint32", - "name": "cooldownStart", - "type": "uint32" - }, - { - "internalType": "uint16", - "name": "burnCount", - "type": "uint16" - } - ], - "internalType": "struct IHydraS1AccountboundAttester.TicketData", - "name": "ticketData", - "type": "tuple" - }, - { - "internalType": "uint32", - "name": "cooldownDuration", - "type": "uint32" - } - ], - "name": "TicketOnCooldown", - "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" - }, - { - "indexed": false, - "internalType": "uint16", - "name": "burnCount", - "type": "uint16" - } - ], - "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": [ - { - "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": "uint16", - "name": "burnCount", - "type": "uint16" - } - ], - "internalType": "struct IHydraS1AccountboundAttester.TicketData", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getVerifier", - "outputs": [ - { - "internalType": "contract HydraS1Verifier", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ], - "transactionHash": "0x8ed447ebeabab996d91a141b1b0c660f4daad0afdf85d26932e1e3785e364d79", - "receipt": { - "to": null, - "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0x6a7E6A85ea2744C1c033BE4Da315636EBD95f054", - "transactionIndex": 7, - "gasUsed": "2081575", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000008000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000010000000000000000000008000200000000000000000080000000000000000000000000000000000000000004000000000000000000001000000000100000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000100000", - "blockHash": "0x18316abd9c1a3779b8cdf16e8790f49ee9891169c82f57427559f47cec5c8968", - "transactionHash": "0x8ed447ebeabab996d91a141b1b0c660f4daad0afdf85d26932e1e3785e364d79", - "logs": [ - { - "transactionIndex": 7, - "blockNumber": 28807660, - "transactionHash": "0x8ed447ebeabab996d91a141b1b0c660f4daad0afdf85d26932e1e3785e364d79", - "address": "0x0000000000000000000000000000000000001010", - "topics": [ - "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", - "0x0000000000000000000000000000000000000000000000000000000000001010", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x0000000000000000000000003a22c8bc68e98b0faf40f349dd2b2890fae01484" - ], - "data": "0x0000000000000000000000000000000000000000000000000019e2229091b5000000000000000000000000000000000000000000000000007dae8f6c776df53500000000000000000000000000000000000000000000000006d5a73a10eb46bc0000000000000000000000000000000000000000000000007d94ad49e6dc403500000000000000000000000000000000000000000000000006ef895ca17cfbbc", - "logIndex": 42, - "blockHash": "0x18316abd9c1a3779b8cdf16e8790f49ee9891169c82f57427559f47cec5c8968" - } - ], - "blockNumber": 28807660, - "cumulativeGasUsed": "3924267", - "status": 1, - "byzantium": true - }, - "args": [ - "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", - "0x34e3CcCF4fF2E297be22465b85F03E5E6D27b41B", - "0x2c17e335d131dfd21238475Dd545B9B29Fb5A27D", - "0x82B54988e4E3a2850501F91AC06CEA82bdb014D3", - "20000001", - "30000000" - ], - "numDeployments": 1, - "solcInputHash": "c7c67c4a1ddf53de4ef76f8a114dfc39", - "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\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"cooldownStart\",\"type\":\"uint32\"},{\"internalType\":\"uint16\",\"name\":\"burnCount\",\"type\":\"uint16\"}],\"internalType\":\"struct IHydraS1AccountboundAttester.TicketData\",\"name\":\"ticketData\",\"type\":\"tuple\"},{\"internalType\":\"uint32\",\"name\":\"cooldownDuration\",\"type\":\"uint32\"}],\"name\":\"TicketOnCooldown\",\"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\"},{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"burnCount\",\"type\":\"uint16\"}],\"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\":[{\"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\":\"uint16\",\"name\":\"burnCount\",\"type\":\"uint16\"}],\"internalType\":\"struct IHydraS1AccountboundAttester.TicketData\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVerifier\",\"outputs\":[{\"internalType\":\"contract HydraS1Verifier\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Sismo\",\"errors\":{\"CollectionIdOutOfBound(uint256)\":[{\"details\":\"Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST*\"}],\"TicketOnCooldown((address,uint32,uint16),uint32)\":[{\"details\":\"Error when the userTicket is on cooldown. The user have to wait the cooldownDuration before being able to change again the destination address.*\"}]},\"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\"}},\"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 Accountbound 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) - Accountbound (with cooldown period) Users can choose to delete or generate attestations to a new destination using their source account. The attestation is \\\"Accountbound\\\" to the source account. 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/HydraS1AccountboundAttester.sol\":\"HydraS1AccountboundAttester\"},\"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 the following:\\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 **/\\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\":\"0xdcc036e3178c26e71c5dfdb601f09139ce8919db220acdbb2ad2bad6cc5c4857\",\"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/**\\n * @title Hydra-S1 Base Interface\\n * @author Sismo\\n * @notice Interface 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 errors and method specific of the Hydra-S1 attesters family and the Hydra-S1 ZK Proving Scheme\\n * We invite readers to refer to the following:\\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 **/\\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\":\"0x33e77f2249293295d1ef95a4d979cad95719bacb216c467f685bdc0b08908bea\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/interfaces/IHydraS1AccountboundAttester.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/**\\n * @title Hydra-S1 Accountbound Interface\\n * @author Sismo\\n * @notice Interface with the errors, events and methods specific to the HydraS1AcountboundAttester.\\n **/\\ninterface IHydraS1AccountboundAttester is IHydraS1Base, IAttester {\\n struct TicketData {\\n address destination;\\n uint32 cooldownStart;\\n uint16 burnCount;\\n }\\n\\n /**\\n * @dev Error when the userTicket is on cooldown. The user have to wait the cooldownDuration\\n * before being able to change again the destination address.\\n **/\\n error TicketOnCooldown(TicketData ticketData, uint32 cooldownDuration);\\n\\n /**\\n * @dev Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST\\n **/\\n error CollectionIdOutOfBound(uint256 collectionId);\\n\\n /**\\n * @dev Event emitted when the userTicket (or nullifierHash) is associated to a destination address.\\n **/\\n event TicketDestinationUpdated(uint256 ticket, address newOwner);\\n\\n /**\\n * @dev Event emitted when the userTicket has been set on cooldown. This happens when the\\n * attestation destination of a ticket has been changed\\n **/\\n event TicketSetOnCooldown(uint256 ticket, uint16 burnCount);\\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\",\"keccak256\":\"0x39e9e5eb7c27a603c62ecacf8c12acdc2ec378bde4ccc2084b3c8103405987f9\",\"license\":\"MIT\"},\"contracts/attesters/hydra-s1/libs/HydraS1AccountboundLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.14;\\n\\nimport {Claim, Request} from '../../../core/libs/Structs.sol';\\nimport {HydraS1Lib, HydraS1Claim, HydraS1GroupProperties} from './HydraS1Lib.sol';\\n\\n// user Hydra-S1 claim retrieved form his request\\nstruct HydraS1AccountboundClaim {\\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 HydraS1AccountboundGroupProperties groupProperties; // user claims the group has the following properties\\n}\\n\\nstruct HydraS1AccountboundGroupProperties {\\n uint128 groupIndex;\\n uint32 generationTimestamp;\\n uint32 cooldownDuration;\\n bool isScore;\\n}\\n\\nlibrary HydraS1AccountboundLib {\\n error GroupIdAndPropertiesMismatch(uint256 expectedGroupId, uint256 groupId);\\n\\n function _hydraS1claim(Request memory self) internal pure returns (HydraS1Claim memory) {\\n Claim memory claim = self.claims[0];\\n _validateClaim(claim);\\n\\n HydraS1AccountboundGroupProperties memory groupProperties = abi.decode(\\n claim.extraData,\\n (HydraS1AccountboundGroupProperties)\\n );\\n\\n HydraS1GroupProperties memory hydraS1GroupProperties = HydraS1GroupProperties(\\n groupProperties.groupIndex,\\n groupProperties.generationTimestamp,\\n groupProperties.isScore\\n );\\n\\n return (\\n HydraS1Claim(claim.groupId, claim.claimedValue, self.destination, hydraS1GroupProperties)\\n );\\n }\\n\\n function _hydraS1Accountboundclaim(Request memory self)\\n internal\\n pure\\n returns (HydraS1AccountboundClaim memory)\\n {\\n Claim memory claim = self.claims[0];\\n _validateClaim(claim);\\n\\n HydraS1AccountboundGroupProperties memory hydraS1AccountboundGroupProperties = abi.decode(\\n claim.extraData,\\n (HydraS1AccountboundGroupProperties)\\n );\\n\\n return (\\n HydraS1AccountboundClaim(\\n claim.groupId,\\n claim.claimedValue,\\n self.destination,\\n hydraS1AccountboundGroupProperties\\n )\\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 _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\":\"0xb9bc9f27f5a193ffde403809d29c4b99b5100ebd3a07b10bfd2e2dc74abc86e1\",\"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/HydraS1AccountboundAttester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.14;\\npragma experimental ABIEncoderV2;\\n\\nimport {IHydraS1AccountboundAttester} from '../interfaces/IHydraS1AccountboundAttester.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';\\nimport {HydraS1AccountboundLib, HydraS1AccountboundClaim} from '../libs/HydraS1AccountboundLib.sol';\\n\\n/**\\n * @title Hydra-S1 Accountbound 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 * - Accountbound (with cooldown period)\\n * Users can choose to delete or generate attestations to a new destination using their source account.\\n * The attestation is \\\"Accountbound\\\" to the source account.\\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 HydraS1AccountboundAttester is IHydraS1AccountboundAttester, HydraS1Base, Attester {\\n using HydraS1Lib for HydraS1ProofData;\\n using HydraS1Lib for bytes;\\n using HydraS1AccountboundLib 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\\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 )\\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 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._hydraS1claim();\\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 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 HydraS1AccountboundClaim memory claim = request._hydraS1Accountboundclaim();\\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 TicketData memory userTicketData = _userTicketsData[userTicket];\\n\\n uint16 burnCount = userTicketData.burnCount;\\n // If the attestation is minted on a new destination address\\n // the burnCount encoded in the extraData of the Attestation should be incremented\\n if (\\n userTicketData.destination != address(0) && userTicketData.destination != request.destination\\n ) {\\n burnCount += 1;\\n }\\n\\n attestations[0] = Attestation(\\n attestationCollectionId,\\n request.destination,\\n issuer,\\n claim.claimedValue,\\n claim.groupProperties.generationTimestamp,\\n abi.encode(userTicket, burnCount)\\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 HydraS1AccountboundClaim memory claim = request._hydraS1Accountboundclaim();\\n if (_isOnCooldown(userTicketData, claim.groupProperties.cooldownDuration))\\n revert TicketOnCooldown(userTicketData, claim.groupProperties.cooldownDuration);\\n\\n // Delete the old Attestation on the account before recording the new one\\n address[] memory attestationOwners = new address[](1);\\n uint256[] memory attestationCollectionIds = new uint256[](1);\\n\\n attestationOwners[0] = userTicketData.destination;\\n attestationCollectionIds[0] =\\n AUTHORIZED_COLLECTION_ID_FIRST +\\n claim.groupProperties.groupIndex;\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\\n\\n emit AttestationDeleted(\\n Attestation(\\n AUTHORIZED_COLLECTION_ID_FIRST + claim.groupProperties.groupIndex,\\n userTicketData.destination,\\n address(this),\\n claim.claimedValue,\\n claim.groupProperties.generationTimestamp,\\n abi.encode(userTicket, userTicketData.burnCount)\\n )\\n );\\n _setTicketOnCooldown(userTicket);\\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 /**\\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 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 _userTicketsData[userTicket].burnCount += 1;\\n emit TicketSetOnCooldown(userTicket, _userTicketsData[userTicket].burnCount);\\n }\\n\\n function _getDestinationOfTicket(uint256 userTicket) internal view returns (address) {\\n return _userTicketsData[userTicket].destination;\\n }\\n\\n function _isOnCooldown(TicketData memory userTicketData, uint32 cooldownDuration)\\n internal\\n view\\n returns (bool)\\n {\\n return userTicketData.cooldownStart + cooldownDuration > 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\":\"0xcb82307b61a4c2d566e006e82840af1dfb8ccb3d94c7519e0b88a97a316d7d53\",\"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 address[] memory attestationOwners = new address[](collectionIds.length);\\n\\n uint256[] memory attestationCollectionIds = new uint256[](collectionIds.length);\\n\\n Attestation[] memory attestations = new Attestation[](collectionIds.length);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n // fetch attestations from the registry\\n (\\n address issuer,\\n uint256 attestationValue,\\n uint32 timestamp,\\n bytes memory extraData\\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\\n\\n attestationOwners[i] = attestationsOwner;\\n attestationCollectionIds[i] = collectionIds[i];\\n\\n attestations[i] = (\\n Attestation(\\n collectionIds[i],\\n attestationsOwner,\\n issuer,\\n attestationValue,\\n timestamp,\\n extraData\\n )\\n );\\n }\\n\\n _verifyAttestationsDeletionRequest(attestations, proofData);\\n\\n _beforeDeleteAttestations(attestations, proofData);\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\\n\\n _afterDeleteAttestations(attestations, proofData);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n emit AttestationDeleted(attestations[i]);\\n }\\n return attestations;\\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\":\"0xcab4865f46f442ae11ea0689f63eb7fa0763fcfe86522aa67521a548171cb8e0\",\"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 error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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\":\"0xcf79a817ec578f5b4d8f23853dd8df0e3b1acfbff2b5a01601fd9a7315862ec9\",\"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": "0x6101406040523480156200001257600080fd5b506040516200263638038062002636833981016040819052620000359162000081565b6001600160a01b0394851660805292841660c05290831660a0529190921660e0526101005261012052620000f0565b80516001600160a01b03811681146200007c57600080fd5b919050565b60008060008060008060c087890312156200009b57600080fd5b620000a68762000064565b9550620000b66020880162000064565b9450620000c66040880162000064565b9350620000d66060880162000064565b92506080870151915060a087015190509295509295509295565b60805160a05160c05160e05161010051610120516124ab6200018b6000396000818161016001526102e0015260008181610118015281816102b801528181610cca0152610dcc0152600081816101ca0152818161058001528181610761015281816109000152610d2301526000818161018401526111c801526000818160b0015261126401526000818160ef01526113c501526124ab6000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063918447af11610071578063918447af14610182578063af411a30146101a8578063bfa66585146101c8578063c776adde146101ee578063d9895e6a14610201578063e60f999f1461022157600080fd5b80632254f98e146100ae57806346657fe9146100ed57806354846d7a1461011357806363e4afc2146101485780637000b0511461015b575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006100d0565b61013a7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100e4565b6100d0610156366004611908565b610234565b61013a7f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006100d0565b6101bb6101b6366004611969565b610253565b6040516100e49190611a94565b7f00000000000000000000000000000000000000000000000000000000000000006100d0565b6101bb6101fc366004611b1b565b610489565b61021461020f366004611908565b610844565b6040516100e49190611bcc565b6101bb61022f366004611969565b6108c2565b6000818152600160205260408120546001600160a01b03165b92915050565b6060600061026861026386611cad565b6109de565b60408051600180825281830190925291925060009190816020015b61028b6117e2565b8152602001906001900390816102835750506060830151519091506000906102dc906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611e3c565b90507f000000000000000000000000000000000000000000000000000000000000000081111561032757604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b3060006103348888610aa2565b600081815260016020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820463ffffffff1693830193909352600160c01b900461ffff16928101839052929350158015906103b8575061039e60408c0160208d01611e54565b6001600160a01b031682600001516001600160a01b031614155b156103cb576103c8600182611e71565b90505b6040518060c001604052808681526020018c60200160208101906103ef9190611e54565b6001600160a01b03168152602001856001600160a01b031681526020018860200151815260200188606001516020015163ffffffff168152602001848360405160200161044a92919091825261ffff16602082015260400190565b6040516020818303038152906040528152508660008151811061046f5761046f611e97565b602090810291909101015250939998505050505050505050565b60606000856001600160401b038111156104a5576104a5611c00565b6040519080825280602002602001820160405280156104ce578160200160208202803683370190505b5090506000866001600160401b038111156104eb576104eb611c00565b604051908082528060200260200182016040528015610514578160200160208202803683370190505b5090506000876001600160401b0381111561053157610531611c00565b60405190808252806020026020018201604052801561056a57816020015b6105576117e2565b81526020019060019003908161054f5790505b50905060005b8881101561073e576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f888181106105bf576105bf611e97565b905060200201358e6040518363ffffffff1660e01b81526004016105f69291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610613573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261063b9190810190611ec1565b93509350935093508b88868151811061065657610656611e97565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061068857610688611e97565b905060200201358786815181106106a1576106a1611e97565b6020026020010181815250506040518060c001604052808f8f888181106106ca576106ca611e97565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061071c5761071c611e97565b602002602001018190525050505050808061073690611f70565b915050610570565b5061074a818787610ac7565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af7906107989086908690600401611f89565b600060405180830381600087803b1580156107b257600080fd5b505af11580156107c6573d6000803e3d6000fd5b5050505060005b88811015610837577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061080857610808611e97565b602002602001015160405161081d919061200d565b60405180910390a18061082f81611f70565b9150506107cd565b5098975050505050505050565b604080516060808201835260008083526020808401829052838501829052845180840186528281528082018390528501829052858252600181529084902084519283018552546001600160a01b0381168352600160a01b810463ffffffff1691830191909152600160c01b900461ffff16928101929092529061024d565b60606108cf848484610ae0565b60006108dc858585610253565b90506108e9858585610b2d565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c09390610935908490600401611a94565b600060405180830381600087803b15801561094f57600080fd5b505af1158015610963573d6000803e3d6000fd5b5050505060005b81518110156109d5577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc8282815181106109a6576109a6611e97565b60200260200101516040516109bb919061200d565b60405180910390a1806109cd81611f70565b91505061096a565b50949350505050565b610a25604080516080808201835260008083526020808401829052838501829052845192830185528183528201819052928101839052606081810193909352909182015290565b60008260000151600081518110610a3e57610a3e611e97565b60200260200101519050610a5181610eb3565b60008160400151806020019051810190610a6b9190612030565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b600080610ab183850185612170565b90506000610abe82610ef7565b95945050505050565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610aee82840184612170565b90506000610afb82610f0d565b90506000610b10610b0b87611cad565b610fb7565b9050610b1c818361106a565b610b258361139b565b505050505050565b6000610b398383610aa2565b600081815260016020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820463ffffffff1693830193909352600160c01b900461ffff16928101929092529192509015801590610bbf5750610ba56040860160208701611e54565b6001600160a01b031681600001516001600160a01b031614155b15610e90576000610bd261026387611cad565b9050610be682826060015160400151611534565b15610c40576060810151604090810151815163070cb88560e31b815284516001600160a01b03166004820152602085015163ffffffff90811660248301529285015161ffff1660448201529116606482015260840161031e565b604080516001808252818301909252600091602080830190803683375050604080516001808252818301909252929350600092915060208083019080368337019050509050836000015182600081518110610c9d57610c9d611e97565b6001600160a01b0390921660209283029190910190910152606083015151610cee906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611e3c565b81600081518110610d0157610d01611e97565b602090810291909101015260405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af790610d5a9085908590600401611f89565b600060405180830381600087803b158015610d7457600080fd5b505af1158015610d88573d6000803e3d6000fd5b505050507f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b6040518060c001604052808560600151600001516001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000610df59190611e3c565b815260200186600001516001600160a01b03168152602001306001600160a01b031681526020018560200151815260200185606001516020015163ffffffff168152602001878760400151604051602001610e5e92919091825261ffff16602082015260400190565b60408051601f19818403018152918152915251610e7b919061200d565b60405180910390a1610e8c85611555565b5050505b610ea982610ea46040880160208901611e54565b61160d565b5050505050565b50565b6000610ec28260400151611673565b82519091508114610ef35781516040516337e3d1ab60e01b815261031e918391600401918252602082015260400190565b5050565b602081015160009060065b602002015192915050565b610f15611835565b604051806101200160405280610f2a846116a8565b6001600160a01b03168152602001610f41846116b6565b8152602001610f4f846116c5565b8152602001610f5d846116d4565b8152602001610f6b84610ef7565b8152602001610f79846116e3565b8152602001610f87846116f2565b8152602001610f9f8460200151610120015160011490565b15158152602001610faf84611701565b905292915050565b610fbf61188c565b60008260000151600081518110610fd857610fd8611e97565b60200260200101519050610feb81610eb3565b600081604001518060200190518101906110059190612030565b604080516060808201835283516001600160801b0316825260208085015163ffffffff168184015293810151151582840152825160808101845286518152958401518685015296909201516001600160a01b0316908401529382019390935292915050565b815160c08201511461109f57815160c082015160405163fe405c7760e01b81526004810192909252602482015260440161031e565b81606001516040015115158160e001511515036110ea57606082015160409081015160e08301519151634629f1b560e11b81529015156004820152901515602482015260440161031e565b81604001516001600160a01b031681600001516001600160a01b03161461113e57604082810151825191516370a8d99b60e11b81526001600160a01b0391821660048201529116602482015260440161031e565b46816020015114611171576020810151604051630432cec160e31b8152466004820152602481019190915260440161031e565b81602001518160a00151146111ac57602082015160a0820151604051630626ade360e41b81526004810192909252602482015260440161031e565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015611217573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123b9190612241565b61126057806040015160405163cbfe7bc360e01b815260040161031e91815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa1580156112bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e3919061225c565b80516101008401515191925014158061130a57506020808201516101008401519091015114155b15611354578051602080830151610100850151805192015160405163318d812b60e01b8152600481019490945260248401919091526044830191909152606482015260840161031e565b600061135f84611759565b9050808360600151146113955760608301516040516377bb6d2760e11b815261031e918391600401918252602082015260400190565b50505050565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f6946113fe949093929091906004016122d8565b602060405180830381865afa925050508015611437575060408051601f3d908101601f1916820190925261143491810190612241565b60015b61150d5761144361235c565b806308c379a00361147c5750611457612378565b8061146257506114bb565b8060405162dd577760e81b815260040161031e9190612401565b634e487b71036114bb5761148e612414565b9061149957506114bb565b60405162dd577760e81b8152602060048201526000602482015260440161031e565b3d8080156114e5576040519150601f19603f3d011682016040523d82523d6000602084013e6114ea565b606091505b5060405162dd577760e81b8152602060048201526000602482015260440161031e565b80610ef35760405162dd577760e81b8152602060048201526000602482015260440161031e565b6000428284602001516115479190612434565b63ffffffff16119392505050565b6000818152600160208190526040909120805463ffffffff60a01b1916600160a01b4263ffffffff16021780825560189061159c908490600160c01b900461ffff16611e71565b82546101009290920a61ffff818102199093169183160217909155600083815260016020908152604091829020548251868152600160c01b909104909316908301527f80c694309c3b71041ff73c728020871b4f851f0f6a739eb4f265e7ffb988d91f92500160405180910390a150565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b8051602082012060009061024d907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190612453565b602081015160009081610f02565b60208101516000906001610f02565b60208101516000906004610f02565b60208101516000906005610f02565b60208101516000906007610f02565b60208101516000906008610f02565b6117096118ea565b604051806040016040528083602001516002600a811061172b5761172b611e97565b6020020151815260200183602001516003600a811061174c5761174c611e97565b6020020151905292915050565b600080611777308460600151600001516001600160801b031661177e565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6117779190612453565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b905290565b60405180610120016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016118306118ea565b6040518060800160405280600081526020016000815260200160006001600160a01b03168152602001611830604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b60405180604001604052806002906020820280368337509192915050565b60006020828403121561191a57600080fd5b5035919050565b60008083601f84011261193357600080fd5b5081356001600160401b0381111561194a57600080fd5b60208301915083602082850101111561196257600080fd5b9250929050565b60008060006040848603121561197e57600080fd5b83356001600160401b038082111561199557600080fd5b90850190604082880312156119a957600080fd5b909350602085013590808211156119bf57600080fd5b506119cc86828701611921565b9497909650939450505050565b60005b838110156119f45781810151838201526020016119dc565b838111156113955750506000910152565b60008151808452611a1d8160208601602086016119d9565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a0850152611a8c60c0850182611a05565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611ae957603f19888603018452611ad7858351611a31565b94509285019290850190600101611abb565b5092979650505050505050565b6001600160a01b0381168114610eb057600080fd5b8035611b1681611af6565b919050565b600080600080600060608688031215611b3357600080fd5b85356001600160401b0380821115611b4a57600080fd5b818801915088601f830112611b5e57600080fd5b813581811115611b6d57600080fd5b8960208260051b8501011115611b8257600080fd5b60208301975080965050611b9860208901611b0b565b94506040880135915080821115611bae57600080fd5b50611bbb88828901611921565b969995985093965092949392505050565b81516001600160a01b0316815260208083015163ffffffff169082015260408083015161ffff16908201526060810161024d565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b0382111715611c3557611c35611c00565b60405250565b606081018181106001600160401b0382111715611c3557611c35611c00565b601f8201601f191681016001600160401b0381118282101715611c7f57611c7f611c00565b6040525050565b60006001600160401b03821115611c9f57611c9f611c00565b50601f01601f191660200190565b60006040808336031215611cc057600080fd5b8051611ccb81611c16565b83356001600160401b0380821115611ce257600080fd5b9085019036601f830112611cf557600080fd5b8135602082821115611d0957611d09611c00565b8160051b8651611d1b83830182611c5a565b92835284810182019282810136851115611d3457600080fd5b83870192505b84831015611e0857823586811115611d525760008081fd5b8701606036829003601f1901811315611d6b5760008081fd5b8a51611d7681611c3b565b8287013581528b83013581880152908201359088821115611d975760008081fd5b9181019136603f840112611dad57600091508182fd5b868301359150611dbc82611c86565b8c51611dc88282611c5a565b838152368e858701011115611ddf57600091508182fd5b838e86018a830137600093810189019390935250808c0191909152825250918301918301611d3a565b50865250611e17888201611b0b565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611e4f57611e4f611e26565b500190565b600060208284031215611e6657600080fd5b813561177781611af6565b600061ffff808316818516808303821115611e8e57611e8e611e26565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b805163ffffffff81168114611b1657600080fd5b60008060008060808587031215611ed757600080fd5b8451611ee281611af6565b60208601519094509250611ef860408601611ead565b915060608501516001600160401b03811115611f1357600080fd5b8501601f81018713611f2457600080fd5b8051611f2f81611c86565b604051611f3c8282611c5a565b828152896020848601011115611f5157600080fd5b611f628360208301602087016119d9565b969995985093965050505050565b600060018201611f8257611f82611e26565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015611fcb5781516001600160a01b031684529284019290840190600101611fa6565b5050508381038285015284518082528583019183019060005b8181101561200057835183529284019291840191600101611fe4565b5090979650505050505050565b6020815260006117776020830184611a31565b80518015158114611b1657600080fd5b60006080828403121561204257600080fd5b604051608081018181106001600160401b038211171561206457612064611c00565b60405282516001600160801b038116811461207e57600080fd5b815261208c60208401611ead565b602082015261209d60408401611ead565b60408201526120ae60608401612020565b60608201529392505050565b600082601f8301126120cb57600080fd5b6040516120d781611c16565b8060408401858111156120e957600080fd5b845b818110156121035780358352602092830192016120eb565b509195945050505050565b600082601f83011261211f57600080fd5b6040516101408082018281106001600160401b038211171561214357612143611c00565b6040528301818582111561215657600080fd5b845b82811015612103578035825260209182019101612158565b600081830361024081121561218457600080fd5b6040805161219181611c16565b610100808412156121a157600080fd5b825193506121ae84611c3b565b6121b887876120ba565b845286605f8701126121c957600080fd5b82516121d481611c16565b8060c08801898111156121e657600080fd5b8589015b8181101561220b576121fc8b826120ba565b835260209092019186016121ea565b5082602088015261221c8a826120ba565b868801525050508382526122328782880161210e565b60208301525095945050505050565b60006020828403121561225357600080fd5b61177782612020565b60006040828403121561226e57600080fd5b82601f83011261227d57600080fd5b60405161228981611c16565b80604084018581111561229b57600080fd5b845b8181101561210357805183526020928301920161229d565b8060005b60028110156113955781518452602093840193909101906001016122b9565b61024081016122e782876122b5565b60408083018660005b6002811015612317576123048383516122b5565b91830191602091909101906001016122f0565b5050505061232860c08301856122b5565b61010082018360005b600a811015612350578151835260209283019290910190600101612331565b50505095945050505050565b600060033d11156123755760046000803e5060005160e01c5b90565b600060443d10156123865790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156123b557505050505090565b82850191508151818111156123cd5750505050505090565b843d87010160208285010111156123e75750505050505090565b6123f660208286010187611c5a565b509095945050505050565b6020815260006117776020830184611a05565b60008060233d1115612430576020600460003e50506000516001905b9091565b600063ffffffff808316818516808303821115611e8e57611e8e611e26565b60008261247057634e487b7160e01b600052601260045260246000fd5b50069056fea264697066735822122022a4655f370ec5e42b58cf5e3cccb6dfe9971f6ee9d1bcd673be0f009e86a94364736f6c634300080e0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063918447af11610071578063918447af14610182578063af411a30146101a8578063bfa66585146101c8578063c776adde146101ee578063d9895e6a14610201578063e60f999f1461022157600080fd5b80632254f98e146100ae57806346657fe9146100ed57806354846d7a1461011357806363e4afc2146101485780637000b0511461015b575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006100d0565b61013a7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100e4565b6100d0610156366004611908565b610234565b61013a7f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006100d0565b6101bb6101b6366004611969565b610253565b6040516100e49190611a94565b7f00000000000000000000000000000000000000000000000000000000000000006100d0565b6101bb6101fc366004611b1b565b610489565b61021461020f366004611908565b610844565b6040516100e49190611bcc565b6101bb61022f366004611969565b6108c2565b6000818152600160205260408120546001600160a01b03165b92915050565b6060600061026861026386611cad565b6109de565b60408051600180825281830190925291925060009190816020015b61028b6117e2565b8152602001906001900390816102835750506060830151519091506000906102dc906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611e3c565b90507f000000000000000000000000000000000000000000000000000000000000000081111561032757604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b3060006103348888610aa2565b600081815260016020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820463ffffffff1693830193909352600160c01b900461ffff16928101839052929350158015906103b8575061039e60408c0160208d01611e54565b6001600160a01b031682600001516001600160a01b031614155b156103cb576103c8600182611e71565b90505b6040518060c001604052808681526020018c60200160208101906103ef9190611e54565b6001600160a01b03168152602001856001600160a01b031681526020018860200151815260200188606001516020015163ffffffff168152602001848360405160200161044a92919091825261ffff16602082015260400190565b6040516020818303038152906040528152508660008151811061046f5761046f611e97565b602090810291909101015250939998505050505050505050565b60606000856001600160401b038111156104a5576104a5611c00565b6040519080825280602002602001820160405280156104ce578160200160208202803683370190505b5090506000866001600160401b038111156104eb576104eb611c00565b604051908082528060200260200182016040528015610514578160200160208202803683370190505b5090506000876001600160401b0381111561053157610531611c00565b60405190808252806020026020018201604052801561056a57816020015b6105576117e2565b81526020019060019003908161054f5790505b50905060005b8881101561073e576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f888181106105bf576105bf611e97565b905060200201358e6040518363ffffffff1660e01b81526004016105f69291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610613573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261063b9190810190611ec1565b93509350935093508b88868151811061065657610656611e97565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061068857610688611e97565b905060200201358786815181106106a1576106a1611e97565b6020026020010181815250506040518060c001604052808f8f888181106106ca576106ca611e97565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061071c5761071c611e97565b602002602001018190525050505050808061073690611f70565b915050610570565b5061074a818787610ac7565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af7906107989086908690600401611f89565b600060405180830381600087803b1580156107b257600080fd5b505af11580156107c6573d6000803e3d6000fd5b5050505060005b88811015610837577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061080857610808611e97565b602002602001015160405161081d919061200d565b60405180910390a18061082f81611f70565b9150506107cd565b5098975050505050505050565b604080516060808201835260008083526020808401829052838501829052845180840186528281528082018390528501829052858252600181529084902084519283018552546001600160a01b0381168352600160a01b810463ffffffff1691830191909152600160c01b900461ffff16928101929092529061024d565b60606108cf848484610ae0565b60006108dc858585610253565b90506108e9858585610b2d565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c09390610935908490600401611a94565b600060405180830381600087803b15801561094f57600080fd5b505af1158015610963573d6000803e3d6000fd5b5050505060005b81518110156109d5577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc8282815181106109a6576109a6611e97565b60200260200101516040516109bb919061200d565b60405180910390a1806109cd81611f70565b91505061096a565b50949350505050565b610a25604080516080808201835260008083526020808401829052838501829052845192830185528183528201819052928101839052606081810193909352909182015290565b60008260000151600081518110610a3e57610a3e611e97565b60200260200101519050610a5181610eb3565b60008160400151806020019051810190610a6b9190612030565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b600080610ab183850185612170565b90506000610abe82610ef7565b95945050505050565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610aee82840184612170565b90506000610afb82610f0d565b90506000610b10610b0b87611cad565b610fb7565b9050610b1c818361106a565b610b258361139b565b505050505050565b6000610b398383610aa2565b600081815260016020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820463ffffffff1693830193909352600160c01b900461ffff16928101929092529192509015801590610bbf5750610ba56040860160208701611e54565b6001600160a01b031681600001516001600160a01b031614155b15610e90576000610bd261026387611cad565b9050610be682826060015160400151611534565b15610c40576060810151604090810151815163070cb88560e31b815284516001600160a01b03166004820152602085015163ffffffff90811660248301529285015161ffff1660448201529116606482015260840161031e565b604080516001808252818301909252600091602080830190803683375050604080516001808252818301909252929350600092915060208083019080368337019050509050836000015182600081518110610c9d57610c9d611e97565b6001600160a01b0390921660209283029190910190910152606083015151610cee906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611e3c565b81600081518110610d0157610d01611e97565b602090810291909101015260405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af790610d5a9085908590600401611f89565b600060405180830381600087803b158015610d7457600080fd5b505af1158015610d88573d6000803e3d6000fd5b505050507f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b6040518060c001604052808560600151600001516001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000610df59190611e3c565b815260200186600001516001600160a01b03168152602001306001600160a01b031681526020018560200151815260200185606001516020015163ffffffff168152602001878760400151604051602001610e5e92919091825261ffff16602082015260400190565b60408051601f19818403018152918152915251610e7b919061200d565b60405180910390a1610e8c85611555565b5050505b610ea982610ea46040880160208901611e54565b61160d565b5050505050565b50565b6000610ec28260400151611673565b82519091508114610ef35781516040516337e3d1ab60e01b815261031e918391600401918252602082015260400190565b5050565b602081015160009060065b602002015192915050565b610f15611835565b604051806101200160405280610f2a846116a8565b6001600160a01b03168152602001610f41846116b6565b8152602001610f4f846116c5565b8152602001610f5d846116d4565b8152602001610f6b84610ef7565b8152602001610f79846116e3565b8152602001610f87846116f2565b8152602001610f9f8460200151610120015160011490565b15158152602001610faf84611701565b905292915050565b610fbf61188c565b60008260000151600081518110610fd857610fd8611e97565b60200260200101519050610feb81610eb3565b600081604001518060200190518101906110059190612030565b604080516060808201835283516001600160801b0316825260208085015163ffffffff168184015293810151151582840152825160808101845286518152958401518685015296909201516001600160a01b0316908401529382019390935292915050565b815160c08201511461109f57815160c082015160405163fe405c7760e01b81526004810192909252602482015260440161031e565b81606001516040015115158160e001511515036110ea57606082015160409081015160e08301519151634629f1b560e11b81529015156004820152901515602482015260440161031e565b81604001516001600160a01b031681600001516001600160a01b03161461113e57604082810151825191516370a8d99b60e11b81526001600160a01b0391821660048201529116602482015260440161031e565b46816020015114611171576020810151604051630432cec160e31b8152466004820152602481019190915260440161031e565b81602001518160a00151146111ac57602082015160a0820151604051630626ade360e41b81526004810192909252602482015260440161031e565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015611217573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061123b9190612241565b61126057806040015160405163cbfe7bc360e01b815260040161031e91815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa1580156112bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e3919061225c565b80516101008401515191925014158061130a57506020808201516101008401519091015114155b15611354578051602080830151610100850151805192015160405163318d812b60e01b8152600481019490945260248401919091526044830191909152606482015260840161031e565b600061135f84611759565b9050808360600151146113955760608301516040516377bb6d2760e11b815261031e918391600401918252602082015260400190565b50505050565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f6946113fe949093929091906004016122d8565b602060405180830381865afa925050508015611437575060408051601f3d908101601f1916820190925261143491810190612241565b60015b61150d5761144361235c565b806308c379a00361147c5750611457612378565b8061146257506114bb565b8060405162dd577760e81b815260040161031e9190612401565b634e487b71036114bb5761148e612414565b9061149957506114bb565b60405162dd577760e81b8152602060048201526000602482015260440161031e565b3d8080156114e5576040519150601f19603f3d011682016040523d82523d6000602084013e6114ea565b606091505b5060405162dd577760e81b8152602060048201526000602482015260440161031e565b80610ef35760405162dd577760e81b8152602060048201526000602482015260440161031e565b6000428284602001516115479190612434565b63ffffffff16119392505050565b6000818152600160208190526040909120805463ffffffff60a01b1916600160a01b4263ffffffff16021780825560189061159c908490600160c01b900461ffff16611e71565b82546101009290920a61ffff818102199093169183160217909155600083815260016020908152604091829020548251868152600160c01b909104909316908301527f80c694309c3b71041ff73c728020871b4f851f0f6a739eb4f265e7ffb988d91f92500160405180910390a150565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b8051602082012060009061024d907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190612453565b602081015160009081610f02565b60208101516000906001610f02565b60208101516000906004610f02565b60208101516000906005610f02565b60208101516000906007610f02565b60208101516000906008610f02565b6117096118ea565b604051806040016040528083602001516002600a811061172b5761172b611e97565b6020020151815260200183602001516003600a811061174c5761174c611e97565b6020020151905292915050565b600080611777308460600151600001516001600160801b031661177e565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6117779190612453565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b905290565b60405180610120016040528060006001600160a01b031681526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016118306118ea565b6040518060800160405280600081526020016000815260200160006001600160a01b03168152602001611830604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b60405180604001604052806002906020820280368337509192915050565b60006020828403121561191a57600080fd5b5035919050565b60008083601f84011261193357600080fd5b5081356001600160401b0381111561194a57600080fd5b60208301915083602082850101111561196257600080fd5b9250929050565b60008060006040848603121561197e57600080fd5b83356001600160401b038082111561199557600080fd5b90850190604082880312156119a957600080fd5b909350602085013590808211156119bf57600080fd5b506119cc86828701611921565b9497909650939450505050565b60005b838110156119f45781810151838201526020016119dc565b838111156113955750506000910152565b60008151808452611a1d8160208601602086016119d9565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a0850152611a8c60c0850182611a05565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015611ae957603f19888603018452611ad7858351611a31565b94509285019290850190600101611abb565b5092979650505050505050565b6001600160a01b0381168114610eb057600080fd5b8035611b1681611af6565b919050565b600080600080600060608688031215611b3357600080fd5b85356001600160401b0380821115611b4a57600080fd5b818801915088601f830112611b5e57600080fd5b813581811115611b6d57600080fd5b8960208260051b8501011115611b8257600080fd5b60208301975080965050611b9860208901611b0b565b94506040880135915080821115611bae57600080fd5b50611bbb88828901611921565b969995985093965092949392505050565b81516001600160a01b0316815260208083015163ffffffff169082015260408083015161ffff16908201526060810161024d565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b0382111715611c3557611c35611c00565b60405250565b606081018181106001600160401b0382111715611c3557611c35611c00565b601f8201601f191681016001600160401b0381118282101715611c7f57611c7f611c00565b6040525050565b60006001600160401b03821115611c9f57611c9f611c00565b50601f01601f191660200190565b60006040808336031215611cc057600080fd5b8051611ccb81611c16565b83356001600160401b0380821115611ce257600080fd5b9085019036601f830112611cf557600080fd5b8135602082821115611d0957611d09611c00565b8160051b8651611d1b83830182611c5a565b92835284810182019282810136851115611d3457600080fd5b83870192505b84831015611e0857823586811115611d525760008081fd5b8701606036829003601f1901811315611d6b5760008081fd5b8a51611d7681611c3b565b8287013581528b83013581880152908201359088821115611d975760008081fd5b9181019136603f840112611dad57600091508182fd5b868301359150611dbc82611c86565b8c51611dc88282611c5a565b838152368e858701011115611ddf57600091508182fd5b838e86018a830137600093810189019390935250808c0191909152825250918301918301611d3a565b50865250611e17888201611b0b565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611e4f57611e4f611e26565b500190565b600060208284031215611e6657600080fd5b813561177781611af6565b600061ffff808316818516808303821115611e8e57611e8e611e26565b01949350505050565b634e487b7160e01b600052603260045260246000fd5b805163ffffffff81168114611b1657600080fd5b60008060008060808587031215611ed757600080fd5b8451611ee281611af6565b60208601519094509250611ef860408601611ead565b915060608501516001600160401b03811115611f1357600080fd5b8501601f81018713611f2457600080fd5b8051611f2f81611c86565b604051611f3c8282611c5a565b828152896020848601011115611f5157600080fd5b611f628360208301602087016119d9565b969995985093965050505050565b600060018201611f8257611f82611e26565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015611fcb5781516001600160a01b031684529284019290840190600101611fa6565b5050508381038285015284518082528583019183019060005b8181101561200057835183529284019291840191600101611fe4565b5090979650505050505050565b6020815260006117776020830184611a31565b80518015158114611b1657600080fd5b60006080828403121561204257600080fd5b604051608081018181106001600160401b038211171561206457612064611c00565b60405282516001600160801b038116811461207e57600080fd5b815261208c60208401611ead565b602082015261209d60408401611ead565b60408201526120ae60608401612020565b60608201529392505050565b600082601f8301126120cb57600080fd5b6040516120d781611c16565b8060408401858111156120e957600080fd5b845b818110156121035780358352602092830192016120eb565b509195945050505050565b600082601f83011261211f57600080fd5b6040516101408082018281106001600160401b038211171561214357612143611c00565b6040528301818582111561215657600080fd5b845b82811015612103578035825260209182019101612158565b600081830361024081121561218457600080fd5b6040805161219181611c16565b610100808412156121a157600080fd5b825193506121ae84611c3b565b6121b887876120ba565b845286605f8701126121c957600080fd5b82516121d481611c16565b8060c08801898111156121e657600080fd5b8589015b8181101561220b576121fc8b826120ba565b835260209092019186016121ea565b5082602088015261221c8a826120ba565b868801525050508382526122328782880161210e565b60208301525095945050505050565b60006020828403121561225357600080fd5b61177782612020565b60006040828403121561226e57600080fd5b82601f83011261227d57600080fd5b60405161228981611c16565b80604084018581111561229b57600080fd5b845b8181101561210357805183526020928301920161229d565b8060005b60028110156113955781518452602093840193909101906001016122b9565b61024081016122e782876122b5565b60408083018660005b6002811015612317576123048383516122b5565b91830191602091909101906001016122f0565b5050505061232860c08301856122b5565b61010082018360005b600a811015612350578151835260209283019290910190600101612331565b50505095945050505050565b600060033d11156123755760046000803e5060005160e01c5b90565b600060443d10156123865790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156123b557505050505090565b82850191508151818111156123cd5750505050505090565b843d87010160208285010111156123e75750505050505090565b6123f660208286010187611c5a565b509095945050505050565b6020815260006117776020830184611a05565b60008060233d1115612430576020600460003e50506000516001905b9091565b600063ffffffff808316818516808303821115611e8e57611e8e611e26565b60008261247057634e487b7160e01b600052601260045260246000fd5b50069056fea264697066735822122022a4655f370ec5e42b58cf5e3cccb6dfe9971f6ee9d1bcd673be0f009e86a94364736f6c634300080e0033", - "devdoc": { - "author": "Sismo", - "errors": { - "CollectionIdOutOfBound(uint256)": [ - { - "details": "Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST*" - } - ], - "TicketOnCooldown((address,uint32,uint16),uint32)": [ - { - "details": "Error when the userTicket is on cooldown. The user have to wait the cooldownDuration before being able to change again the destination address.*" - } - ] - }, - "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" - } - }, - "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 Accountbound 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) - Accountbound (with cooldown period) Users can choose to delete or generate attestations to a new destination using their source account. The attestation is \"Accountbound\" to the source account. 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/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", - "label": "_initialized", - "offset": 0, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 939, - "contract": "contracts/attesters/hydra-s1/variants/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", - "label": "_initializing", - "offset": 1, - "slot": "0", - "type": "t_bool" - }, - { - "astId": 7872, - "contract": "contracts/attesters/hydra-s1/variants/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", - "label": "_userTicketsData", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_uint256,t_struct(TicketData)7076_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)7076_storage)": { - "encoding": "mapping", - "key": "t_uint256", - "label": "mapping(uint256 => struct IHydraS1AccountboundAttester.TicketData)", - "numberOfBytes": "32", - "value": "t_struct(TicketData)7076_storage" - }, - "t_struct(TicketData)7076_storage": { - "encoding": "inplace", - "label": "struct IHydraS1AccountboundAttester.TicketData", - "members": [ - { - "astId": 7071, - "contract": "contracts/attesters/hydra-s1/variants/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", - "label": "destination", - "offset": 0, - "slot": "0", - "type": "t_address" - }, - { - "astId": 7073, - "contract": "contracts/attesters/hydra-s1/variants/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", - "label": "cooldownStart", - "offset": 20, - "slot": "0", - "type": "t_uint32" - }, - { - "astId": 7075, - "contract": "contracts/attesters/hydra-s1/variants/HydraS1AccountboundAttester.sol:HydraS1AccountboundAttester", - "label": "burnCount", - "offset": 24, - "slot": "0", - "type": "t_uint16" - } - ], - "numberOfBytes": "32" - }, - "t_uint16": { - "encoding": "inplace", - "label": "uint16", - "numberOfBytes": "2" - }, - "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/HydraS1SimpleAttester.json b/deployments/mumbai/HydraS1SimpleAttester.json deleted file mode 100644 index 8e3f7c5..0000000 --- a/deployments/mumbai/HydraS1SimpleAttester.json +++ /dev/null @@ -1,866 +0,0 @@ -{ - "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": "0x6dfc8f7d6fbcfbebd77d440465a41e2b12a3ed0ff624aae1cbd1f728ea8afc65", - "receipt": { - "to": null, - "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0x2Da7837f88f253D450073C494C51c1528aeB36C5", - "transactionIndex": 2, - "gasUsed": "1708910", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000008000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000010000000000000000000008000200000000000000000080000000000000000000000000000000000000000004000000000000000000001000000000100000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000100000", - "blockHash": "0x692859ff28119271d22989e2a14ff5f034383fe82b4c4228b17dd90217c90f5c", - "transactionHash": "0x6dfc8f7d6fbcfbebd77d440465a41e2b12a3ed0ff624aae1cbd1f728ea8afc65", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 28807650, - "transactionHash": "0x6dfc8f7d6fbcfbebd77d440465a41e2b12a3ed0ff624aae1cbd1f728ea8afc65", - "address": "0x0000000000000000000000000000000000001010", - "topics": [ - "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", - "0x0000000000000000000000000000000000000000000000000000000000001010", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x0000000000000000000000003a22c8bc68e98b0faf40f349dd2b2890fae01484" - ], - "data": "0x00000000000000000000000000000000000000000000000000153fdb2742ca000000000000000000000000000000000000000000000000007ddbea60049667750000000000000000000000000000000000000000000000000420be9e5feea2360000000000000000000000000000000000000000000000007dc6aa84dd539d750000000000000000000000000000000000000000000000000435fe7987316c36", - "logIndex": 6, - "blockHash": "0x692859ff28119271d22989e2a14ff5f034383fe82b4c4228b17dd90217c90f5c" - } - ], - "blockNumber": 28807650, - "cumulativeGasUsed": "2004188", - "status": 1, - "byzantium": true - }, - "args": [ - "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", - "0x34e3CcCF4fF2E297be22465b85F03E5E6D27b41B", - "0x2c17e335d131dfd21238475Dd545B9B29Fb5A27D", - "0x82B54988e4E3a2850501F91AC06CEA82bdb014D3", - "10000001", - "20000000" - ], - "numDeployments": 3, - "solcInputHash": "c7c67c4a1ddf53de4ef76f8a114dfc39", - "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\",\"errors\":{\"CollectionIdOutOfBound(uint256)\":[{\"details\":\"Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST*\"}],\"TicketUsed(uint256)\":[{\"details\":\"Error when the userTicket (or nullifierHash) is already used for a destination address*\"}]},\"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 the following:\\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 **/\\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\":\"0xdcc036e3178c26e71c5dfdb601f09139ce8919db220acdbb2ad2bad6cc5c4857\",\"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/**\\n * @title Hydra-S1 Base Interface\\n * @author Sismo\\n * @notice Interface 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 errors and method specific of the Hydra-S1 attesters family and the Hydra-S1 ZK Proving Scheme\\n * We invite readers to refer to the following:\\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 **/\\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\":\"0x33e77f2249293295d1ef95a4d979cad95719bacb216c467f685bdc0b08908bea\",\"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/**\\n * @title Hydra-S1 Accountbound Interface\\n * @author Sismo\\n * @notice Interface with errors, events and methods specific to the HydraS1SimpleAttester.\\n **/\\ninterface IHydraS1SimpleAttester is IHydraS1Base, IAttester {\\n /**\\n * @dev Error when the userTicket (or nullifierHash) is already used for a destination address\\n **/\\n error TicketUsed(uint256 userTicket);\\n\\n /**\\n * @dev Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST\\n **/\\n error CollectionIdOutOfBound(uint256 collectionId);\\n\\n /**\\n * @dev Event emitted when the userTicket (or nullifierHash) is associated to a destination address.\\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\":\"0xc8bc2a17b743f7cc8b71d0c1c08cc7973639eb7d1593a14b1cd67b41eb78a632\",\"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 address[] memory attestationOwners = new address[](collectionIds.length);\\n\\n uint256[] memory attestationCollectionIds = new uint256[](collectionIds.length);\\n\\n Attestation[] memory attestations = new Attestation[](collectionIds.length);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n // fetch attestations from the registry\\n (\\n address issuer,\\n uint256 attestationValue,\\n uint32 timestamp,\\n bytes memory extraData\\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\\n\\n attestationOwners[i] = attestationsOwner;\\n attestationCollectionIds[i] = collectionIds[i];\\n\\n attestations[i] = (\\n Attestation(\\n collectionIds[i],\\n attestationsOwner,\\n issuer,\\n attestationValue,\\n timestamp,\\n extraData\\n )\\n );\\n }\\n\\n _verifyAttestationsDeletionRequest(attestations, proofData);\\n\\n _beforeDeleteAttestations(attestations, proofData);\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\\n\\n _afterDeleteAttestations(attestations, proofData);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n emit AttestationDeleted(attestations[i]);\\n }\\n return attestations;\\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\":\"0xcab4865f46f442ae11ea0689f63eb7fa0763fcfe86522aa67521a548171cb8e0\",\"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 error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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\":\"0xcf79a817ec578f5b4d8f23853dd8df0e3b1acfbff2b5a01601fd9a7315862ec9\",\"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": "0x6101406040523480156200001257600080fd5b5060405162001f6038038062001f60833981016040819052620000359162000081565b6001600160a01b0394851660805292841660c05290831660a0529190921660e0526101005261012052620000f0565b80516001600160a01b03811681146200007c57600080fd5b919050565b60008060008060008060c087890312156200009b57600080fd5b620000a68762000064565b9550620000b66020880162000064565b9450620000c66040880162000064565b9350620000d66060880162000064565b92506080870151915060a087015190509295509295509295565b60805160a05160c05160e0516101005161012051611dea620001766000396000818161015501526102b501526000818161010d015261028d0152600081816101bf015281816104860152818161066701526107880152600081816101790152610c3301526000818160a50152610ccf01526000818160e40152610e300152611dea6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063918447af11610066578063918447af14610177578063af411a301461019d578063bfa66585146101bd578063c776adde146101e3578063e60f999f146101f657600080fd5b80632254f98e146100a357806346657fe9146100e257806354846d7a1461010857806363e4afc21461013d5780637000b05114610150575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b61012f7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100d9565b6100c561014b3660046112d1565b610209565b61012f7f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b6101b06101ab366004611332565b610228565b6040516100d9919061145d565b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b6101b06101f13660046114e4565b61038f565b6101b0610204366004611332565b61074a565b6000818152600160205260408120546001600160a01b03165b92915050565b6060600061023d61023886611642565b610866565b60408051600180825281830190925291925060009190816020015b6102606111af565b8152602001906001900390816102585750506060830151519091506000906102b1906001600160801b03167f00000000000000000000000000000000000000000000000000000000000000006117d1565b90507f00000000000000000000000000000000000000000000000000000000000000008111156102fc57604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b031681526020018560200151815260200185606001516020015163ffffffff1681526020016040518060200160405280600081525081525083600081518110610378576103786117e9565b602090810291909101015250909695505050505050565b60606000856001600160401b038111156103ab576103ab611595565b6040519080825280602002602001820160405280156103d4578160200160208202803683370190505b5090506000866001600160401b038111156103f1576103f1611595565b60405190808252806020026020018201604052801561041a578160200160208202803683370190505b5090506000876001600160401b0381111561043757610437611595565b60405190808252806020026020018201604052801561047057816020015b61045d6111af565b8152602001906001900390816104555790505b50905060005b88811015610644576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f888181106104c5576104c56117e9565b905060200201358e6040518363ffffffff1660e01b81526004016104fc9291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610519573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105419190810190611813565b93509350935093508b88868151811061055c5761055c6117e9565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061058e5761058e6117e9565b905060200201358786815181106105a7576105a76117e9565b6020026020010181815250506040518060c001604052808f8f888181106105d0576105d06117e9565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff16815260200182815250868681518110610622576106226117e9565b602002602001018190525050505050808061063c906118c2565b915050610476565b506106508187876108eb565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af79061069e90869086906004016118db565b600060405180830381600087803b1580156106b857600080fd5b505af11580156106cc573d6000803e3d6000fd5b5050505060005b8881101561073d577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061070e5761070e6117e9565b6020026020010151604051610723919061195f565b60405180910390a180610735816118c2565b9150506106d3565b5098975050505050505050565b6060610757848484610904565b6000610764858585610228565b905061077185858561094c565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906107bd90849060040161145d565b600060405180830381600087803b1580156107d757600080fd5b505af11580156107eb573d6000803e3d6000fd5b5050505060005b815181101561085d577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc82828151811061082e5761082e6117e9565b6020026020010151604051610843919061195f565b60405180910390a180610855816118c2565b9150506107f2565b50949350505050565b61086e6111fd565b60008260000151600081518110610887576108876117e9565b6020026020010151905061089a816109e7565b600081604001518060200190518101906108b49190611982565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b600061091282840184611ab1565b9050600061091f82610a2b565b9050600061092f61023887611642565b905061093b8183610ad5565b61094483610e06565b505050505050565b60006109588383610f9f565b6000818152600160205260409020549091506001600160a01b031680158015906109a3575061098d6040860160208701611b82565b6001600160a01b0316816001600160a01b031614155b156109c457604051631f5d53e360e01b8152600481018390526024016102f3565b6109dd826109d86040880160208901611b82565b610fc4565b5050505050565b50565b60006109f6826040015161102a565b82519091508114610a275781516040516337e3d1ab60e01b81526102f3918391600401918252602082015260400190565b5050565b610a33611260565b604051806101200160405280610a488461105f565b6001600160a01b03168152602001610a5f84611074565b8152602001610a6d84611083565b8152602001610a7b84611092565b8152602001610a89846110a1565b8152602001610a97846110b0565b8152602001610aa5846110bf565b8152602001610abd8460200151610120015160011490565b15158152602001610acd846110ce565b905292915050565b815160c082015114610b0a57815160c082015160405163fe405c7760e01b8152600481019290925260248201526044016102f3565b81606001516040015115158160e00151151503610b5557606082015160409081015160e08301519151634629f1b560e11b8152901515600482015290151560248201526044016102f3565b81604001516001600160a01b031681600001516001600160a01b031614610ba957604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016102f3565b46816020015114610bdc576020810151604051630432cec160e31b815246600482015260248101919091526044016102f3565b81602001518160a0015114610c1757602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016102f3565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015610c82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca69190611b9f565b610ccb57806040015160405163cbfe7bc360e01b81526004016102f391815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa158015610d2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4e9190611bba565b805161010084015151919250141580610d7557506020808201516101008401519091015114155b15610dbf578051602080830151610100850151805192015160405163318d812b60e01b815260048101949094526024840191909152604483019190915260648201526084016102f3565b6000610dca84611126565b905080836060015114610e005760608301516040516377bb6d2760e11b81526102f3918391600401918252602082015260400190565b50505050565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f694610e6994909392909190600401611c36565b602060405180830381865afa925050508015610ea2575060408051601f3d908101601f19168201909252610e9f91810190611b9f565b60015b610f7857610eae611cba565b806308c379a003610ee75750610ec2611cd6565b80610ecd5750610f26565b8060405162dd577760e81b81526004016102f39190611d5f565b634e487b7103610f2657610ef9611d72565b90610f045750610f26565b60405162dd577760e81b815260206004820152600060248201526044016102f3565b3d808015610f50576040519150601f19603f3d011682016040523d82523d6000602084013e610f55565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016102f3565b80610a275760405162dd577760e81b815260206004820152600060248201526044016102f3565b600080610fae83850185611ab1565b90506000610fbb826110a1565b95945050505050565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b80516020820120600090610222907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190611d92565b6020810151600090815b602002015192915050565b60208101516000906001611069565b60208101516000906004611069565b60208101516000906005611069565b60208101516000906006611069565b60208101516000906007611069565b60208101516000906008611069565b6110d66112b3565b604051806040016040528083602001516002600a81106110f8576110f86117e9565b6020020151815260200183602001516003600a8110611119576111196117e9565b6020020151905292915050565b600080611144308460600151600001516001600160801b031661114b565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6111449190611d92565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b6040518060800160405280600081526020016000815260200160006001600160a01b0316815260200161125b604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b905290565b60405180610120016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200161125b5b60405180604001604052806002906020820280368337509192915050565b6000602082840312156112e357600080fd5b5035919050565b60008083601f8401126112fc57600080fd5b5081356001600160401b0381111561131357600080fd5b60208301915083602082850101111561132b57600080fd5b9250929050565b60008060006040848603121561134757600080fd5b83356001600160401b038082111561135e57600080fd5b908501906040828803121561137257600080fd5b9093506020850135908082111561138857600080fd5b50611395868287016112ea565b9497909650939450505050565b60005b838110156113bd5781810151838201526020016113a5565b83811115610e005750506000910152565b600081518084526113e68160208601602086016113a2565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261145560c08501826113ce565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156114b257603f198886030184526114a08583516113fa565b94509285019290850190600101611484565b5092979650505050505050565b6001600160a01b03811681146109e457600080fd5b80356114df816114bf565b919050565b6000806000806000606086880312156114fc57600080fd5b85356001600160401b038082111561151357600080fd5b818801915088601f83011261152757600080fd5b81358181111561153657600080fd5b8960208260051b850101111561154b57600080fd5b60208301975080965050611561602089016114d4565b9450604088013591508082111561157757600080fd5b50611584888289016112ea565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b03821117156115ca576115ca611595565b60405250565b606081018181106001600160401b03821117156115ca576115ca611595565b601f8201601f191681016001600160401b038111828210171561161457611614611595565b6040525050565b60006001600160401b0382111561163457611634611595565b50601f01601f191660200190565b6000604080833603121561165557600080fd5b8051611660816115ab565b83356001600160401b038082111561167757600080fd5b9085019036601f83011261168a57600080fd5b813560208282111561169e5761169e611595565b8160051b86516116b0838301826115ef565b928352848101820192828101368511156116c957600080fd5b83870192505b8483101561179d578235868111156116e75760008081fd5b8701606036829003601f19018113156117005760008081fd5b8a5161170b816115d0565b8287013581528b8301358188015290820135908882111561172c5760008081fd5b9181019136603f84011261174257600091508182fd5b8683013591506117518261161b565b8c5161175d82826115ef565b838152368e85870101111561177457600091508182fd5b838e86018a830137600093810189019390935250808c01919091528252509183019183016116cf565b508652506117ac8882016114d4565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b600082198211156117e4576117e46117bb565b500190565b634e487b7160e01b600052603260045260246000fd5b805163ffffffff811681146114df57600080fd5b6000806000806080858703121561182957600080fd5b8451611834816114bf565b6020860151909450925061184a604086016117ff565b915060608501516001600160401b0381111561186557600080fd5b8501601f8101871361187657600080fd5b80516118818161161b565b60405161188e82826115ef565b8281528960208486010111156118a357600080fd5b6118b48360208301602087016113a2565b969995985093965050505050565b6000600182016118d4576118d46117bb565b5060010190565b604080825283519082018190526000906020906060840190828701845b8281101561191d5781516001600160a01b0316845292840192908401906001016118f8565b5050508381038285015284518082528583019183019060005b8181101561195257835183529284019291840191600101611936565b5090979650505050505050565b60208152600061114460208301846113fa565b805180151581146114df57600080fd5b60006060828403121561199457600080fd5b604051606081018181106001600160401b03821117156119b6576119b6611595565b60405282516001600160801b03811681146119d057600080fd5b81526119de602084016117ff565b60208201526119ef60408401611972565b60408201529392505050565b600082601f830112611a0c57600080fd5b604051611a18816115ab565b806040840185811115611a2a57600080fd5b845b81811015611a44578035835260209283019201611a2c565b509195945050505050565b600082601f830112611a6057600080fd5b6040516101408082018281106001600160401b0382111715611a8457611a84611595565b60405283018185821115611a9757600080fd5b845b82811015611a44578035825260209182019101611a99565b6000818303610240811215611ac557600080fd5b60408051611ad2816115ab565b61010080841215611ae257600080fd5b82519350611aef846115d0565b611af987876119fb565b845286605f870112611b0a57600080fd5b8251611b15816115ab565b8060c0880189811115611b2757600080fd5b8589015b81811015611b4c57611b3d8b826119fb565b83526020909201918601611b2b565b50826020880152611b5d8a826119fb565b86880152505050838252611b7387828801611a4f565b60208301525095945050505050565b600060208284031215611b9457600080fd5b8135611144816114bf565b600060208284031215611bb157600080fd5b61114482611972565b600060408284031215611bcc57600080fd5b82601f830112611bdb57600080fd5b604051611be7816115ab565b806040840185811115611bf957600080fd5b845b81811015611a44578051835260209283019201611bfb565b8060005b6002811015610e00578151845260209384019390910190600101611c17565b6102408101611c458287611c13565b60408083018660005b6002811015611c7557611c62838351611c13565b9183019160209190910190600101611c4e565b50505050611c8660c0830185611c13565b61010082018360005b600a811015611cae578151835260209283019290910190600101611c8f565b50505095945050505050565b600060033d1115611cd35760046000803e5060005160e01c5b90565b600060443d1015611ce45790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715611d1357505050505090565b8285019150815181811115611d2b5750505050505090565b843d8701016020828501011115611d455750505050505090565b611d54602082860101876115ef565b509095945050505050565b60208152600061114460208301846113ce565b60008060233d1115611d8e576020600460003e50506000516001905b9091565b600082611daf57634e487b7160e01b600052601260045260246000fd5b50069056fea26469706673582212206f25f22d1700579027a3b154c953a64f2dd7c5743b363da74b5173ab9c3e655764736f6c634300080e0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063918447af11610066578063918447af14610177578063af411a301461019d578063bfa66585146101bd578063c776adde146101e3578063e60f999f146101f657600080fd5b80632254f98e146100a357806346657fe9146100e257806354846d7a1461010857806363e4afc21461013d5780637000b05114610150575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b61012f7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100d9565b6100c561014b3660046112d1565b610209565b61012f7f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b6101b06101ab366004611332565b610228565b6040516100d9919061145d565b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b6101b06101f13660046114e4565b61038f565b6101b0610204366004611332565b61074a565b6000818152600160205260408120546001600160a01b03165b92915050565b6060600061023d61023886611642565b610866565b60408051600180825281830190925291925060009190816020015b6102606111af565b8152602001906001900390816102585750506060830151519091506000906102b1906001600160801b03167f00000000000000000000000000000000000000000000000000000000000000006117d1565b90507f00000000000000000000000000000000000000000000000000000000000000008111156102fc57604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b031681526020018560200151815260200185606001516020015163ffffffff1681526020016040518060200160405280600081525081525083600081518110610378576103786117e9565b602090810291909101015250909695505050505050565b60606000856001600160401b038111156103ab576103ab611595565b6040519080825280602002602001820160405280156103d4578160200160208202803683370190505b5090506000866001600160401b038111156103f1576103f1611595565b60405190808252806020026020018201604052801561041a578160200160208202803683370190505b5090506000876001600160401b0381111561043757610437611595565b60405190808252806020026020018201604052801561047057816020015b61045d6111af565b8152602001906001900390816104555790505b50905060005b88811015610644576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f888181106104c5576104c56117e9565b905060200201358e6040518363ffffffff1660e01b81526004016104fc9291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610519573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105419190810190611813565b93509350935093508b88868151811061055c5761055c6117e9565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061058e5761058e6117e9565b905060200201358786815181106105a7576105a76117e9565b6020026020010181815250506040518060c001604052808f8f888181106105d0576105d06117e9565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff16815260200182815250868681518110610622576106226117e9565b602002602001018190525050505050808061063c906118c2565b915050610476565b506106508187876108eb565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af79061069e90869086906004016118db565b600060405180830381600087803b1580156106b857600080fd5b505af11580156106cc573d6000803e3d6000fd5b5050505060005b8881101561073d577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061070e5761070e6117e9565b6020026020010151604051610723919061195f565b60405180910390a180610735816118c2565b9150506106d3565b5098975050505050505050565b6060610757848484610904565b6000610764858585610228565b905061077185858561094c565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906107bd90849060040161145d565b600060405180830381600087803b1580156107d757600080fd5b505af11580156107eb573d6000803e3d6000fd5b5050505060005b815181101561085d577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc82828151811061082e5761082e6117e9565b6020026020010151604051610843919061195f565b60405180910390a180610855816118c2565b9150506107f2565b50949350505050565b61086e6111fd565b60008260000151600081518110610887576108876117e9565b6020026020010151905061089a816109e7565b600081604001518060200190518101906108b49190611982565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b600061091282840184611ab1565b9050600061091f82610a2b565b9050600061092f61023887611642565b905061093b8183610ad5565b61094483610e06565b505050505050565b60006109588383610f9f565b6000818152600160205260409020549091506001600160a01b031680158015906109a3575061098d6040860160208701611b82565b6001600160a01b0316816001600160a01b031614155b156109c457604051631f5d53e360e01b8152600481018390526024016102f3565b6109dd826109d86040880160208901611b82565b610fc4565b5050505050565b50565b60006109f6826040015161102a565b82519091508114610a275781516040516337e3d1ab60e01b81526102f3918391600401918252602082015260400190565b5050565b610a33611260565b604051806101200160405280610a488461105f565b6001600160a01b03168152602001610a5f84611074565b8152602001610a6d84611083565b8152602001610a7b84611092565b8152602001610a89846110a1565b8152602001610a97846110b0565b8152602001610aa5846110bf565b8152602001610abd8460200151610120015160011490565b15158152602001610acd846110ce565b905292915050565b815160c082015114610b0a57815160c082015160405163fe405c7760e01b8152600481019290925260248201526044016102f3565b81606001516040015115158160e00151151503610b5557606082015160409081015160e08301519151634629f1b560e11b8152901515600482015290151560248201526044016102f3565b81604001516001600160a01b031681600001516001600160a01b031614610ba957604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016102f3565b46816020015114610bdc576020810151604051630432cec160e31b815246600482015260248101919091526044016102f3565b81602001518160a0015114610c1757602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016102f3565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015610c82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca69190611b9f565b610ccb57806040015160405163cbfe7bc360e01b81526004016102f391815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa158015610d2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4e9190611bba565b805161010084015151919250141580610d7557506020808201516101008401519091015114155b15610dbf578051602080830151610100850151805192015160405163318d812b60e01b815260048101949094526024840191909152604483019190915260648201526084016102f3565b6000610dca84611126565b905080836060015114610e005760608301516040516377bb6d2760e11b81526102f3918391600401918252602082015260400190565b50505050565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f694610e6994909392909190600401611c36565b602060405180830381865afa925050508015610ea2575060408051601f3d908101601f19168201909252610e9f91810190611b9f565b60015b610f7857610eae611cba565b806308c379a003610ee75750610ec2611cd6565b80610ecd5750610f26565b8060405162dd577760e81b81526004016102f39190611d5f565b634e487b7103610f2657610ef9611d72565b90610f045750610f26565b60405162dd577760e81b815260206004820152600060248201526044016102f3565b3d808015610f50576040519150601f19603f3d011682016040523d82523d6000602084013e610f55565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016102f3565b80610a275760405162dd577760e81b815260206004820152600060248201526044016102f3565b600080610fae83850185611ab1565b90506000610fbb826110a1565b95945050505050565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b80516020820120600090610222907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190611d92565b6020810151600090815b602002015192915050565b60208101516000906001611069565b60208101516000906004611069565b60208101516000906005611069565b60208101516000906006611069565b60208101516000906007611069565b60208101516000906008611069565b6110d66112b3565b604051806040016040528083602001516002600a81106110f8576110f86117e9565b6020020151815260200183602001516003600a8110611119576111196117e9565b6020020151905292915050565b600080611144308460600151600001516001600160801b031661114b565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6111449190611d92565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b6040518060800160405280600081526020016000815260200160006001600160a01b0316815260200161125b604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b905290565b60405180610120016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200161125b5b60405180604001604052806002906020820280368337509192915050565b6000602082840312156112e357600080fd5b5035919050565b60008083601f8401126112fc57600080fd5b5081356001600160401b0381111561131357600080fd5b60208301915083602082850101111561132b57600080fd5b9250929050565b60008060006040848603121561134757600080fd5b83356001600160401b038082111561135e57600080fd5b908501906040828803121561137257600080fd5b9093506020850135908082111561138857600080fd5b50611395868287016112ea565b9497909650939450505050565b60005b838110156113bd5781810151838201526020016113a5565b83811115610e005750506000910152565b600081518084526113e68160208601602086016113a2565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261145560c08501826113ce565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156114b257603f198886030184526114a08583516113fa565b94509285019290850190600101611484565b5092979650505050505050565b6001600160a01b03811681146109e457600080fd5b80356114df816114bf565b919050565b6000806000806000606086880312156114fc57600080fd5b85356001600160401b038082111561151357600080fd5b818801915088601f83011261152757600080fd5b81358181111561153657600080fd5b8960208260051b850101111561154b57600080fd5b60208301975080965050611561602089016114d4565b9450604088013591508082111561157757600080fd5b50611584888289016112ea565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b03821117156115ca576115ca611595565b60405250565b606081018181106001600160401b03821117156115ca576115ca611595565b601f8201601f191681016001600160401b038111828210171561161457611614611595565b6040525050565b60006001600160401b0382111561163457611634611595565b50601f01601f191660200190565b6000604080833603121561165557600080fd5b8051611660816115ab565b83356001600160401b038082111561167757600080fd5b9085019036601f83011261168a57600080fd5b813560208282111561169e5761169e611595565b8160051b86516116b0838301826115ef565b928352848101820192828101368511156116c957600080fd5b83870192505b8483101561179d578235868111156116e75760008081fd5b8701606036829003601f19018113156117005760008081fd5b8a5161170b816115d0565b8287013581528b8301358188015290820135908882111561172c5760008081fd5b9181019136603f84011261174257600091508182fd5b8683013591506117518261161b565b8c5161175d82826115ef565b838152368e85870101111561177457600091508182fd5b838e86018a830137600093810189019390935250808c01919091528252509183019183016116cf565b508652506117ac8882016114d4565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b600082198211156117e4576117e46117bb565b500190565b634e487b7160e01b600052603260045260246000fd5b805163ffffffff811681146114df57600080fd5b6000806000806080858703121561182957600080fd5b8451611834816114bf565b6020860151909450925061184a604086016117ff565b915060608501516001600160401b0381111561186557600080fd5b8501601f8101871361187657600080fd5b80516118818161161b565b60405161188e82826115ef565b8281528960208486010111156118a357600080fd5b6118b48360208301602087016113a2565b969995985093965050505050565b6000600182016118d4576118d46117bb565b5060010190565b604080825283519082018190526000906020906060840190828701845b8281101561191d5781516001600160a01b0316845292840192908401906001016118f8565b5050508381038285015284518082528583019183019060005b8181101561195257835183529284019291840191600101611936565b5090979650505050505050565b60208152600061114460208301846113fa565b805180151581146114df57600080fd5b60006060828403121561199457600080fd5b604051606081018181106001600160401b03821117156119b6576119b6611595565b60405282516001600160801b03811681146119d057600080fd5b81526119de602084016117ff565b60208201526119ef60408401611972565b60408201529392505050565b600082601f830112611a0c57600080fd5b604051611a18816115ab565b806040840185811115611a2a57600080fd5b845b81811015611a44578035835260209283019201611a2c565b509195945050505050565b600082601f830112611a6057600080fd5b6040516101408082018281106001600160401b0382111715611a8457611a84611595565b60405283018185821115611a9757600080fd5b845b82811015611a44578035825260209182019101611a99565b6000818303610240811215611ac557600080fd5b60408051611ad2816115ab565b61010080841215611ae257600080fd5b82519350611aef846115d0565b611af987876119fb565b845286605f870112611b0a57600080fd5b8251611b15816115ab565b8060c0880189811115611b2757600080fd5b8589015b81811015611b4c57611b3d8b826119fb565b83526020909201918601611b2b565b50826020880152611b5d8a826119fb565b86880152505050838252611b7387828801611a4f565b60208301525095945050505050565b600060208284031215611b9457600080fd5b8135611144816114bf565b600060208284031215611bb157600080fd5b61114482611972565b600060408284031215611bcc57600080fd5b82601f830112611bdb57600080fd5b604051611be7816115ab565b806040840185811115611bf957600080fd5b845b81811015611a44578051835260209283019201611bfb565b8060005b6002811015610e00578151845260209384019390910190600101611c17565b6102408101611c458287611c13565b60408083018660005b6002811015611c7557611c62838351611c13565b9183019160209190910190600101611c4e565b50505050611c8660c0830185611c13565b61010082018360005b600a811015611cae578151835260209283019290910190600101611c8f565b50505095945050505050565b600060033d1115611cd35760046000803e5060005160e01c5b90565b600060443d1015611ce45790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715611d1357505050505090565b8285019150815181811115611d2b5750505050505090565b843d8701016020828501011115611d455750505050505090565b611d54602082860101876115ef565b509095945050505050565b60208152600061114460208301846113ce565b60008060233d1115611d8e576020600460003e50506000516001905b9091565b600082611daf57634e487b7160e01b600052601260045260246000fd5b50069056fea26469706673582212206f25f22d1700579027a3b154c953a64f2dd7c5743b363da74b5173ab9c3e655764736f6c634300080e0033", - "devdoc": { - "author": "Sismo", - "errors": { - "CollectionIdOutOfBound(uint256)": [ - { - "details": "Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST*" - } - ], - "TicketUsed(uint256)": [ - { - "details": "Error when the userTicket (or nullifierHash) is already used for a destination address*" - } - ] - }, - "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 deleted file mode 100644 index 027f7be..0000000 --- a/deployments/mumbai/HydraS1SimpleAttesterImplem.json +++ /dev/null @@ -1,854 +0,0 @@ -{ - "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/HydraS1SimpleAttesterImplemV3.json b/deployments/mumbai/HydraS1SimpleAttesterImplemV3.json deleted file mode 100644 index 02b186d..0000000 --- a/deployments/mumbai/HydraS1SimpleAttesterImplemV3.json +++ /dev/null @@ -1,866 +0,0 @@ -{ - "address": "0x2Da7837f88f253D450073C494C51c1528aeB36C5", - "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": "0x6dfc8f7d6fbcfbebd77d440465a41e2b12a3ed0ff624aae1cbd1f728ea8afc65", - "receipt": { - "to": null, - "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0x2Da7837f88f253D450073C494C51c1528aeB36C5", - "transactionIndex": 2, - "gasUsed": "1708910", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000008000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000010000000000000000000008000200000000000000000080000000000000000000000000000000000000000004000000000000000000001000000000100000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000100000", - "blockHash": "0x692859ff28119271d22989e2a14ff5f034383fe82b4c4228b17dd90217c90f5c", - "transactionHash": "0x6dfc8f7d6fbcfbebd77d440465a41e2b12a3ed0ff624aae1cbd1f728ea8afc65", - "logs": [ - { - "transactionIndex": 2, - "blockNumber": 28807650, - "transactionHash": "0x6dfc8f7d6fbcfbebd77d440465a41e2b12a3ed0ff624aae1cbd1f728ea8afc65", - "address": "0x0000000000000000000000000000000000001010", - "topics": [ - "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", - "0x0000000000000000000000000000000000000000000000000000000000001010", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x0000000000000000000000003a22c8bc68e98b0faf40f349dd2b2890fae01484" - ], - "data": "0x00000000000000000000000000000000000000000000000000153fdb2742ca000000000000000000000000000000000000000000000000007ddbea60049667750000000000000000000000000000000000000000000000000420be9e5feea2360000000000000000000000000000000000000000000000007dc6aa84dd539d750000000000000000000000000000000000000000000000000435fe7987316c36", - "logIndex": 6, - "blockHash": "0x692859ff28119271d22989e2a14ff5f034383fe82b4c4228b17dd90217c90f5c" - } - ], - "blockNumber": 28807650, - "cumulativeGasUsed": "2004188", - "status": 1, - "byzantium": true - }, - "args": [ - "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", - "0x34e3CcCF4fF2E297be22465b85F03E5E6D27b41B", - "0x2c17e335d131dfd21238475Dd545B9B29Fb5A27D", - "0x82B54988e4E3a2850501F91AC06CEA82bdb014D3", - "10000001", - "20000000" - ], - "numDeployments": 1, - "solcInputHash": "c7c67c4a1ddf53de4ef76f8a114dfc39", - "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\",\"errors\":{\"CollectionIdOutOfBound(uint256)\":[{\"details\":\"Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST*\"}],\"TicketUsed(uint256)\":[{\"details\":\"Error when the userTicket (or nullifierHash) is already used for a destination address*\"}]},\"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 the following:\\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 **/\\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\":\"0xdcc036e3178c26e71c5dfdb601f09139ce8919db220acdbb2ad2bad6cc5c4857\",\"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/**\\n * @title Hydra-S1 Base Interface\\n * @author Sismo\\n * @notice Interface 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 errors and method specific of the Hydra-S1 attesters family and the Hydra-S1 ZK Proving Scheme\\n * We invite readers to refer to the following:\\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 **/\\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\":\"0x33e77f2249293295d1ef95a4d979cad95719bacb216c467f685bdc0b08908bea\",\"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/**\\n * @title Hydra-S1 Accountbound Interface\\n * @author Sismo\\n * @notice Interface with errors, events and methods specific to the HydraS1SimpleAttester.\\n **/\\ninterface IHydraS1SimpleAttester is IHydraS1Base, IAttester {\\n /**\\n * @dev Error when the userTicket (or nullifierHash) is already used for a destination address\\n **/\\n error TicketUsed(uint256 userTicket);\\n\\n /**\\n * @dev Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST\\n **/\\n error CollectionIdOutOfBound(uint256 collectionId);\\n\\n /**\\n * @dev Event emitted when the userTicket (or nullifierHash) is associated to a destination address.\\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\":\"0xc8bc2a17b743f7cc8b71d0c1c08cc7973639eb7d1593a14b1cd67b41eb78a632\",\"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 address[] memory attestationOwners = new address[](collectionIds.length);\\n\\n uint256[] memory attestationCollectionIds = new uint256[](collectionIds.length);\\n\\n Attestation[] memory attestations = new Attestation[](collectionIds.length);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n // fetch attestations from the registry\\n (\\n address issuer,\\n uint256 attestationValue,\\n uint32 timestamp,\\n bytes memory extraData\\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\\n\\n attestationOwners[i] = attestationsOwner;\\n attestationCollectionIds[i] = collectionIds[i];\\n\\n attestations[i] = (\\n Attestation(\\n collectionIds[i],\\n attestationsOwner,\\n issuer,\\n attestationValue,\\n timestamp,\\n extraData\\n )\\n );\\n }\\n\\n _verifyAttestationsDeletionRequest(attestations, proofData);\\n\\n _beforeDeleteAttestations(attestations, proofData);\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\\n\\n _afterDeleteAttestations(attestations, proofData);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n emit AttestationDeleted(attestations[i]);\\n }\\n return attestations;\\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\":\"0xcab4865f46f442ae11ea0689f63eb7fa0763fcfe86522aa67521a548171cb8e0\",\"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 error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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\":\"0xcf79a817ec578f5b4d8f23853dd8df0e3b1acfbff2b5a01601fd9a7315862ec9\",\"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": "0x6101406040523480156200001257600080fd5b5060405162001f6038038062001f60833981016040819052620000359162000081565b6001600160a01b0394851660805292841660c05290831660a0529190921660e0526101005261012052620000f0565b80516001600160a01b03811681146200007c57600080fd5b919050565b60008060008060008060c087890312156200009b57600080fd5b620000a68762000064565b9550620000b66020880162000064565b9450620000c66040880162000064565b9350620000d66060880162000064565b92506080870151915060a087015190509295509295509295565b60805160a05160c05160e0516101005161012051611dea620001766000396000818161015501526102b501526000818161010d015261028d0152600081816101bf015281816104860152818161066701526107880152600081816101790152610c3301526000818160a50152610ccf01526000818160e40152610e300152611dea6000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063918447af11610066578063918447af14610177578063af411a301461019d578063bfa66585146101bd578063c776adde146101e3578063e60f999f146101f657600080fd5b80632254f98e146100a357806346657fe9146100e257806354846d7a1461010857806363e4afc21461013d5780637000b05114610150575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b61012f7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100d9565b6100c561014b3660046112d1565b610209565b61012f7f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b6101b06101ab366004611332565b610228565b6040516100d9919061145d565b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b6101b06101f13660046114e4565b61038f565b6101b0610204366004611332565b61074a565b6000818152600160205260408120546001600160a01b03165b92915050565b6060600061023d61023886611642565b610866565b60408051600180825281830190925291925060009190816020015b6102606111af565b8152602001906001900390816102585750506060830151519091506000906102b1906001600160801b03167f00000000000000000000000000000000000000000000000000000000000000006117d1565b90507f00000000000000000000000000000000000000000000000000000000000000008111156102fc57604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b031681526020018560200151815260200185606001516020015163ffffffff1681526020016040518060200160405280600081525081525083600081518110610378576103786117e9565b602090810291909101015250909695505050505050565b60606000856001600160401b038111156103ab576103ab611595565b6040519080825280602002602001820160405280156103d4578160200160208202803683370190505b5090506000866001600160401b038111156103f1576103f1611595565b60405190808252806020026020018201604052801561041a578160200160208202803683370190505b5090506000876001600160401b0381111561043757610437611595565b60405190808252806020026020018201604052801561047057816020015b61045d6111af565b8152602001906001900390816104555790505b50905060005b88811015610644576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f888181106104c5576104c56117e9565b905060200201358e6040518363ffffffff1660e01b81526004016104fc9291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610519573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105419190810190611813565b93509350935093508b88868151811061055c5761055c6117e9565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061058e5761058e6117e9565b905060200201358786815181106105a7576105a76117e9565b6020026020010181815250506040518060c001604052808f8f888181106105d0576105d06117e9565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff16815260200182815250868681518110610622576106226117e9565b602002602001018190525050505050808061063c906118c2565b915050610476565b506106508187876108eb565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af79061069e90869086906004016118db565b600060405180830381600087803b1580156106b857600080fd5b505af11580156106cc573d6000803e3d6000fd5b5050505060005b8881101561073d577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061070e5761070e6117e9565b6020026020010151604051610723919061195f565b60405180910390a180610735816118c2565b9150506106d3565b5098975050505050505050565b6060610757848484610904565b6000610764858585610228565b905061077185858561094c565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906107bd90849060040161145d565b600060405180830381600087803b1580156107d757600080fd5b505af11580156107eb573d6000803e3d6000fd5b5050505060005b815181101561085d577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc82828151811061082e5761082e6117e9565b6020026020010151604051610843919061195f565b60405180910390a180610855816118c2565b9150506107f2565b50949350505050565b61086e6111fd565b60008260000151600081518110610887576108876117e9565b6020026020010151905061089a816109e7565b600081604001518060200190518101906108b49190611982565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b600061091282840184611ab1565b9050600061091f82610a2b565b9050600061092f61023887611642565b905061093b8183610ad5565b61094483610e06565b505050505050565b60006109588383610f9f565b6000818152600160205260409020549091506001600160a01b031680158015906109a3575061098d6040860160208701611b82565b6001600160a01b0316816001600160a01b031614155b156109c457604051631f5d53e360e01b8152600481018390526024016102f3565b6109dd826109d86040880160208901611b82565b610fc4565b5050505050565b50565b60006109f6826040015161102a565b82519091508114610a275781516040516337e3d1ab60e01b81526102f3918391600401918252602082015260400190565b5050565b610a33611260565b604051806101200160405280610a488461105f565b6001600160a01b03168152602001610a5f84611074565b8152602001610a6d84611083565b8152602001610a7b84611092565b8152602001610a89846110a1565b8152602001610a97846110b0565b8152602001610aa5846110bf565b8152602001610abd8460200151610120015160011490565b15158152602001610acd846110ce565b905292915050565b815160c082015114610b0a57815160c082015160405163fe405c7760e01b8152600481019290925260248201526044016102f3565b81606001516040015115158160e00151151503610b5557606082015160409081015160e08301519151634629f1b560e11b8152901515600482015290151560248201526044016102f3565b81604001516001600160a01b031681600001516001600160a01b031614610ba957604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016102f3565b46816020015114610bdc576020810151604051630432cec160e31b815246600482015260248101919091526044016102f3565b81602001518160a0015114610c1757602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016102f3565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015610c82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca69190611b9f565b610ccb57806040015160405163cbfe7bc360e01b81526004016102f391815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa158015610d2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4e9190611bba565b805161010084015151919250141580610d7557506020808201516101008401519091015114155b15610dbf578051602080830151610100850151805192015160405163318d812b60e01b815260048101949094526024840191909152604483019190915260648201526084016102f3565b6000610dca84611126565b905080836060015114610e005760608301516040516377bb6d2760e11b81526102f3918391600401918252602082015260400190565b50505050565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f694610e6994909392909190600401611c36565b602060405180830381865afa925050508015610ea2575060408051601f3d908101601f19168201909252610e9f91810190611b9f565b60015b610f7857610eae611cba565b806308c379a003610ee75750610ec2611cd6565b80610ecd5750610f26565b8060405162dd577760e81b81526004016102f39190611d5f565b634e487b7103610f2657610ef9611d72565b90610f045750610f26565b60405162dd577760e81b815260206004820152600060248201526044016102f3565b3d808015610f50576040519150601f19603f3d011682016040523d82523d6000602084013e610f55565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016102f3565b80610a275760405162dd577760e81b815260206004820152600060248201526044016102f3565b600080610fae83850185611ab1565b90506000610fbb826110a1565b95945050505050565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b80516020820120600090610222907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190611d92565b6020810151600090815b602002015192915050565b60208101516000906001611069565b60208101516000906004611069565b60208101516000906005611069565b60208101516000906006611069565b60208101516000906007611069565b60208101516000906008611069565b6110d66112b3565b604051806040016040528083602001516002600a81106110f8576110f86117e9565b6020020151815260200183602001516003600a8110611119576111196117e9565b6020020151905292915050565b600080611144308460600151600001516001600160801b031661114b565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6111449190611d92565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b6040518060800160405280600081526020016000815260200160006001600160a01b0316815260200161125b604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b905290565b60405180610120016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200161125b5b60405180604001604052806002906020820280368337509192915050565b6000602082840312156112e357600080fd5b5035919050565b60008083601f8401126112fc57600080fd5b5081356001600160401b0381111561131357600080fd5b60208301915083602082850101111561132b57600080fd5b9250929050565b60008060006040848603121561134757600080fd5b83356001600160401b038082111561135e57600080fd5b908501906040828803121561137257600080fd5b9093506020850135908082111561138857600080fd5b50611395868287016112ea565b9497909650939450505050565b60005b838110156113bd5781810151838201526020016113a5565b83811115610e005750506000910152565b600081518084526113e68160208601602086016113a2565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261145560c08501826113ce565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156114b257603f198886030184526114a08583516113fa565b94509285019290850190600101611484565b5092979650505050505050565b6001600160a01b03811681146109e457600080fd5b80356114df816114bf565b919050565b6000806000806000606086880312156114fc57600080fd5b85356001600160401b038082111561151357600080fd5b818801915088601f83011261152757600080fd5b81358181111561153657600080fd5b8960208260051b850101111561154b57600080fd5b60208301975080965050611561602089016114d4565b9450604088013591508082111561157757600080fd5b50611584888289016112ea565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b03821117156115ca576115ca611595565b60405250565b606081018181106001600160401b03821117156115ca576115ca611595565b601f8201601f191681016001600160401b038111828210171561161457611614611595565b6040525050565b60006001600160401b0382111561163457611634611595565b50601f01601f191660200190565b6000604080833603121561165557600080fd5b8051611660816115ab565b83356001600160401b038082111561167757600080fd5b9085019036601f83011261168a57600080fd5b813560208282111561169e5761169e611595565b8160051b86516116b0838301826115ef565b928352848101820192828101368511156116c957600080fd5b83870192505b8483101561179d578235868111156116e75760008081fd5b8701606036829003601f19018113156117005760008081fd5b8a5161170b816115d0565b8287013581528b8301358188015290820135908882111561172c5760008081fd5b9181019136603f84011261174257600091508182fd5b8683013591506117518261161b565b8c5161175d82826115ef565b838152368e85870101111561177457600091508182fd5b838e86018a830137600093810189019390935250808c01919091528252509183019183016116cf565b508652506117ac8882016114d4565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b600082198211156117e4576117e46117bb565b500190565b634e487b7160e01b600052603260045260246000fd5b805163ffffffff811681146114df57600080fd5b6000806000806080858703121561182957600080fd5b8451611834816114bf565b6020860151909450925061184a604086016117ff565b915060608501516001600160401b0381111561186557600080fd5b8501601f8101871361187657600080fd5b80516118818161161b565b60405161188e82826115ef565b8281528960208486010111156118a357600080fd5b6118b48360208301602087016113a2565b969995985093965050505050565b6000600182016118d4576118d46117bb565b5060010190565b604080825283519082018190526000906020906060840190828701845b8281101561191d5781516001600160a01b0316845292840192908401906001016118f8565b5050508381038285015284518082528583019183019060005b8181101561195257835183529284019291840191600101611936565b5090979650505050505050565b60208152600061114460208301846113fa565b805180151581146114df57600080fd5b60006060828403121561199457600080fd5b604051606081018181106001600160401b03821117156119b6576119b6611595565b60405282516001600160801b03811681146119d057600080fd5b81526119de602084016117ff565b60208201526119ef60408401611972565b60408201529392505050565b600082601f830112611a0c57600080fd5b604051611a18816115ab565b806040840185811115611a2a57600080fd5b845b81811015611a44578035835260209283019201611a2c565b509195945050505050565b600082601f830112611a6057600080fd5b6040516101408082018281106001600160401b0382111715611a8457611a84611595565b60405283018185821115611a9757600080fd5b845b82811015611a44578035825260209182019101611a99565b6000818303610240811215611ac557600080fd5b60408051611ad2816115ab565b61010080841215611ae257600080fd5b82519350611aef846115d0565b611af987876119fb565b845286605f870112611b0a57600080fd5b8251611b15816115ab565b8060c0880189811115611b2757600080fd5b8589015b81811015611b4c57611b3d8b826119fb565b83526020909201918601611b2b565b50826020880152611b5d8a826119fb565b86880152505050838252611b7387828801611a4f565b60208301525095945050505050565b600060208284031215611b9457600080fd5b8135611144816114bf565b600060208284031215611bb157600080fd5b61114482611972565b600060408284031215611bcc57600080fd5b82601f830112611bdb57600080fd5b604051611be7816115ab565b806040840185811115611bf957600080fd5b845b81811015611a44578051835260209283019201611bfb565b8060005b6002811015610e00578151845260209384019390910190600101611c17565b6102408101611c458287611c13565b60408083018660005b6002811015611c7557611c62838351611c13565b9183019160209190910190600101611c4e565b50505050611c8660c0830185611c13565b61010082018360005b600a811015611cae578151835260209283019290910190600101611c8f565b50505095945050505050565b600060033d1115611cd35760046000803e5060005160e01c5b90565b600060443d1015611ce45790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715611d1357505050505090565b8285019150815181811115611d2b5750505050505090565b843d8701016020828501011115611d455750505050505090565b611d54602082860101876115ef565b509095945050505050565b60208152600061114460208301846113ce565b60008060233d1115611d8e576020600460003e50506000516001905b9091565b600082611daf57634e487b7160e01b600052601260045260246000fd5b50069056fea26469706673582212206f25f22d1700579027a3b154c953a64f2dd7c5743b363da74b5173ab9c3e655764736f6c634300080e0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063918447af11610066578063918447af14610177578063af411a301461019d578063bfa66585146101bd578063c776adde146101e3578063e60f999f146101f657600080fd5b80632254f98e146100a357806346657fe9146100e257806354846d7a1461010857806363e4afc21461013d5780637000b05114610150575b600080fd5b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020015b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b61012f7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100d9565b6100c561014b3660046112d1565b610209565b61012f7f000000000000000000000000000000000000000000000000000000000000000081565b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b6101b06101ab366004611332565b610228565b6040516100d9919061145d565b7f00000000000000000000000000000000000000000000000000000000000000006100c5565b6101b06101f13660046114e4565b61038f565b6101b0610204366004611332565b61074a565b6000818152600160205260408120546001600160a01b03165b92915050565b6060600061023d61023886611642565b610866565b60408051600180825281830190925291925060009190816020015b6102606111af565b8152602001906001900390816102585750506060830151519091506000906102b1906001600160801b03167f00000000000000000000000000000000000000000000000000000000000000006117d1565b90507f00000000000000000000000000000000000000000000000000000000000000008111156102fc57604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b031681526020018560200151815260200185606001516020015163ffffffff1681526020016040518060200160405280600081525081525083600081518110610378576103786117e9565b602090810291909101015250909695505050505050565b60606000856001600160401b038111156103ab576103ab611595565b6040519080825280602002602001820160405280156103d4578160200160208202803683370190505b5090506000866001600160401b038111156103f1576103f1611595565b60405190808252806020026020018201604052801561041a578160200160208202803683370190505b5090506000876001600160401b0381111561043757610437611595565b60405190808252806020026020018201604052801561047057816020015b61045d6111af565b8152602001906001900390816104555790505b50905060005b88811015610644576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f888181106104c5576104c56117e9565b905060200201358e6040518363ffffffff1660e01b81526004016104fc9291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610519573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105419190810190611813565b93509350935093508b88868151811061055c5761055c6117e9565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061058e5761058e6117e9565b905060200201358786815181106105a7576105a76117e9565b6020026020010181815250506040518060c001604052808f8f888181106105d0576105d06117e9565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff16815260200182815250868681518110610622576106226117e9565b602002602001018190525050505050808061063c906118c2565b915050610476565b506106508187876108eb565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af79061069e90869086906004016118db565b600060405180830381600087803b1580156106b857600080fd5b505af11580156106cc573d6000803e3d6000fd5b5050505060005b8881101561073d577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061070e5761070e6117e9565b6020026020010151604051610723919061195f565b60405180910390a180610735816118c2565b9150506106d3565b5098975050505050505050565b6060610757848484610904565b6000610764858585610228565b905061077185858561094c565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906107bd90849060040161145d565b600060405180830381600087803b1580156107d757600080fd5b505af11580156107eb573d6000803e3d6000fd5b5050505060005b815181101561085d577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc82828151811061082e5761082e6117e9565b6020026020010151604051610843919061195f565b60405180910390a180610855816118c2565b9150506107f2565b50949350505050565b61086e6111fd565b60008260000151600081518110610887576108876117e9565b6020026020010151905061089a816109e7565b600081604001518060200190518101906108b49190611982565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b600061091282840184611ab1565b9050600061091f82610a2b565b9050600061092f61023887611642565b905061093b8183610ad5565b61094483610e06565b505050505050565b60006109588383610f9f565b6000818152600160205260409020549091506001600160a01b031680158015906109a3575061098d6040860160208701611b82565b6001600160a01b0316816001600160a01b031614155b156109c457604051631f5d53e360e01b8152600481018390526024016102f3565b6109dd826109d86040880160208901611b82565b610fc4565b5050505050565b50565b60006109f6826040015161102a565b82519091508114610a275781516040516337e3d1ab60e01b81526102f3918391600401918252602082015260400190565b5050565b610a33611260565b604051806101200160405280610a488461105f565b6001600160a01b03168152602001610a5f84611074565b8152602001610a6d84611083565b8152602001610a7b84611092565b8152602001610a89846110a1565b8152602001610a97846110b0565b8152602001610aa5846110bf565b8152602001610abd8460200151610120015160011490565b15158152602001610acd846110ce565b905292915050565b815160c082015114610b0a57815160c082015160405163fe405c7760e01b8152600481019290925260248201526044016102f3565b81606001516040015115158160e00151151503610b5557606082015160409081015160e08301519151634629f1b560e11b8152901515600482015290151560248201526044016102f3565b81604001516001600160a01b031681600001516001600160a01b031614610ba957604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016102f3565b46816020015114610bdc576020810151604051630432cec160e31b815246600482015260248101919091526044016102f3565b81602001518160a0015114610c1757602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016102f3565b604081810151905163072f23bd60e51b815260048101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e5e477a090602401602060405180830381865afa158015610c82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca69190611b9f565b610ccb57806040015160405163cbfe7bc360e01b81526004016102f391815260200190565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166359a80d0d6040518163ffffffff1660e01b81526004016040805180830381865afa158015610d2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4e9190611bba565b805161010084015151919250141580610d7557506020808201516101008401519091015114155b15610dbf578051602080830151610100850151805192015160405163318d812b60e01b815260048101949094526024840191909152604483019190915260648201526084016102f3565b6000610dca84611126565b905080836060015114610e005760608301516040516377bb6d2760e11b81526102f3918391600401918252602082015260400190565b50505050565b805180516020808301516040938401519185015193516379ddb87b60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463f3bb70f694610e6994909392909190600401611c36565b602060405180830381865afa925050508015610ea2575060408051601f3d908101601f19168201909252610e9f91810190611b9f565b60015b610f7857610eae611cba565b806308c379a003610ee75750610ec2611cd6565b80610ecd5750610f26565b8060405162dd577760e81b81526004016102f39190611d5f565b634e487b7103610f2657610ef9611d72565b90610f045750610f26565b60405162dd577760e81b815260206004820152600060248201526044016102f3565b3d808015610f50576040519150601f19603f3d011682016040523d82523d6000602084013e610f55565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016102f3565b80610a275760405162dd577760e81b815260206004820152600060248201526044016102f3565b600080610fae83850185611ab1565b90506000610fbb826110a1565b95945050505050565b60008281526001602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b80516020820120600090610222907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190611d92565b6020810151600090815b602002015192915050565b60208101516000906001611069565b60208101516000906004611069565b60208101516000906005611069565b60208101516000906006611069565b60208101516000906007611069565b60208101516000906008611069565b6110d66112b3565b604051806040016040528083602001516002600a81106110f8576110f86117e9565b6020020151815260200183602001516003600a8110611119576111196117e9565b6020020151905292915050565b600080611144308460600151600001516001600160801b031661114b565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6111449190611d92565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b6040518060800160405280600081526020016000815260200160006001600160a01b0316815260200161125b604051806060016040528060006001600160801b03168152602001600063ffffffff1681526020016000151581525090565b905290565b60405180610120016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200161125b5b60405180604001604052806002906020820280368337509192915050565b6000602082840312156112e357600080fd5b5035919050565b60008083601f8401126112fc57600080fd5b5081356001600160401b0381111561131357600080fd5b60208301915083602082850101111561132b57600080fd5b9250929050565b60008060006040848603121561134757600080fd5b83356001600160401b038082111561135e57600080fd5b908501906040828803121561137257600080fd5b9093506020850135908082111561138857600080fd5b50611395868287016112ea565b9497909650939450505050565b60005b838110156113bd5781810151838201526020016113a5565b83811115610e005750506000910152565b600081518084526113e68160208601602086016113a2565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261145560c08501826113ce565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156114b257603f198886030184526114a08583516113fa565b94509285019290850190600101611484565b5092979650505050505050565b6001600160a01b03811681146109e457600080fd5b80356114df816114bf565b919050565b6000806000806000606086880312156114fc57600080fd5b85356001600160401b038082111561151357600080fd5b818801915088601f83011261152757600080fd5b81358181111561153657600080fd5b8960208260051b850101111561154b57600080fd5b60208301975080965050611561602089016114d4565b9450604088013591508082111561157757600080fd5b50611584888289016112ea565b969995985093965092949392505050565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b03821117156115ca576115ca611595565b60405250565b606081018181106001600160401b03821117156115ca576115ca611595565b601f8201601f191681016001600160401b038111828210171561161457611614611595565b6040525050565b60006001600160401b0382111561163457611634611595565b50601f01601f191660200190565b6000604080833603121561165557600080fd5b8051611660816115ab565b83356001600160401b038082111561167757600080fd5b9085019036601f83011261168a57600080fd5b813560208282111561169e5761169e611595565b8160051b86516116b0838301826115ef565b928352848101820192828101368511156116c957600080fd5b83870192505b8483101561179d578235868111156116e75760008081fd5b8701606036829003601f19018113156117005760008081fd5b8a5161170b816115d0565b8287013581528b8301358188015290820135908882111561172c5760008081fd5b9181019136603f84011261174257600091508182fd5b8683013591506117518261161b565b8c5161175d82826115ef565b838152368e85870101111561177457600091508182fd5b838e86018a830137600093810189019390935250808c01919091528252509183019183016116cf565b508652506117ac8882016114d4565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b600082198211156117e4576117e46117bb565b500190565b634e487b7160e01b600052603260045260246000fd5b805163ffffffff811681146114df57600080fd5b6000806000806080858703121561182957600080fd5b8451611834816114bf565b6020860151909450925061184a604086016117ff565b915060608501516001600160401b0381111561186557600080fd5b8501601f8101871361187657600080fd5b80516118818161161b565b60405161188e82826115ef565b8281528960208486010111156118a357600080fd5b6118b48360208301602087016113a2565b969995985093965050505050565b6000600182016118d4576118d46117bb565b5060010190565b604080825283519082018190526000906020906060840190828701845b8281101561191d5781516001600160a01b0316845292840192908401906001016118f8565b5050508381038285015284518082528583019183019060005b8181101561195257835183529284019291840191600101611936565b5090979650505050505050565b60208152600061114460208301846113fa565b805180151581146114df57600080fd5b60006060828403121561199457600080fd5b604051606081018181106001600160401b03821117156119b6576119b6611595565b60405282516001600160801b03811681146119d057600080fd5b81526119de602084016117ff565b60208201526119ef60408401611972565b60408201529392505050565b600082601f830112611a0c57600080fd5b604051611a18816115ab565b806040840185811115611a2a57600080fd5b845b81811015611a44578035835260209283019201611a2c565b509195945050505050565b600082601f830112611a6057600080fd5b6040516101408082018281106001600160401b0382111715611a8457611a84611595565b60405283018185821115611a9757600080fd5b845b82811015611a44578035825260209182019101611a99565b6000818303610240811215611ac557600080fd5b60408051611ad2816115ab565b61010080841215611ae257600080fd5b82519350611aef846115d0565b611af987876119fb565b845286605f870112611b0a57600080fd5b8251611b15816115ab565b8060c0880189811115611b2757600080fd5b8589015b81811015611b4c57611b3d8b826119fb565b83526020909201918601611b2b565b50826020880152611b5d8a826119fb565b86880152505050838252611b7387828801611a4f565b60208301525095945050505050565b600060208284031215611b9457600080fd5b8135611144816114bf565b600060208284031215611bb157600080fd5b61114482611972565b600060408284031215611bcc57600080fd5b82601f830112611bdb57600080fd5b604051611be7816115ab565b806040840185811115611bf957600080fd5b845b81811015611a44578051835260209283019201611bfb565b8060005b6002811015610e00578151845260209384019390910190600101611c17565b6102408101611c458287611c13565b60408083018660005b6002811015611c7557611c62838351611c13565b9183019160209190910190600101611c4e565b50505050611c8660c0830185611c13565b61010082018360005b600a811015611cae578151835260209283019290910190600101611c8f565b50505095945050505050565b600060033d1115611cd35760046000803e5060005160e01c5b90565b600060443d1015611ce45790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715611d1357505050505090565b8285019150815181811115611d2b5750505050505090565b843d8701016020828501011115611d455750505050505090565b611d54602082860101876115ef565b509095945050505050565b60208152600061114460208301846113ce565b60008060233d1115611d8e576020600460003e50506000516001905b9091565b600082611daf57634e487b7160e01b600052601260045260246000fd5b50069056fea26469706673582212206f25f22d1700579027a3b154c953a64f2dd7c5743b363da74b5173ab9c3e655764736f6c634300080e0033", - "devdoc": { - "author": "Sismo", - "errors": { - "CollectionIdOutOfBound(uint256)": [ - { - "details": "Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST*" - } - ], - "TicketUsed(uint256)": [ - { - "details": "Error when the userTicket (or nullifierHash) is already used for a destination address*" - } - ] - }, - "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 deleted file mode 100644 index 317b0ff..0000000 --- a/deployments/mumbai/HydraS1SimpleAttesterProxy.json +++ /dev/null @@ -1,250 +0,0 @@ -{ - "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/HydraS1Verifier.json b/deployments/mumbai/HydraS1Verifier.json index d949473..2b9b579 100644 --- a/deployments/mumbai/HydraS1Verifier.json +++ b/deployments/mumbai/HydraS1Verifier.json @@ -1,5 +1,5 @@ { - "address": "0x34e3CcCF4fF2E297be22465b85F03E5E6D27b41B", + "address": "0xCBB1032416EB875D94Da8a447D73471E4C51998E", "abi": [ { "inputs": [ @@ -36,21 +36,21 @@ "type": "function" } ], - "transactionHash": "0xe014dc2f684e0ea6fb465c893377c297968ee215f697e47d04c455d4cdd2314f", + "transactionHash": "0xe3c3bf8a6b7bc22131d5ad86b4dce525318bcd677ae484d395463a139ed33ed8", "receipt": { "to": null, "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0x34e3CcCF4fF2E297be22465b85F03E5E6D27b41B", - "transactionIndex": 3, - "gasUsed": "1247423", + "contractAddress": "0xCBB1032416EB875D94Da8a447D73471E4C51998E", + "transactionIndex": 14, + "gasUsed": "1247435", "logsBloom": "0x00000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000010000000000000000000008000200000000000000020000000000000000001000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000100000", - "blockHash": "0xc2dc6f6303a4b047fad6406e8d9d6518fd83937fb6872d933d5051a81473b68b", - "transactionHash": "0xe014dc2f684e0ea6fb465c893377c297968ee215f697e47d04c455d4cdd2314f", + "blockHash": "0xcf4a827897c2fe128fb7be483551fb3cacdd2e7860a16a33e07d967c0daf891f", + "transactionHash": "0xe3c3bf8a6b7bc22131d5ad86b4dce525318bcd677ae484d395463a139ed33ed8", "logs": [ { - "transactionIndex": 3, - "blockNumber": 28600026, - "transactionHash": "0xe014dc2f684e0ea6fb465c893377c297968ee215f697e47d04c455d4cdd2314f", + "transactionIndex": 14, + "blockNumber": 29540603, + "transactionHash": "0xe3c3bf8a6b7bc22131d5ad86b4dce525318bcd677ae484d395463a139ed33ed8", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", @@ -58,22 +58,22 @@ "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", "0x000000000000000000000000c26880a0af2ea0c7e8130e6ec47af756465452e8" ], - "data": "0x000000000000000000000000000000000000000000000000000d3280231e45e7000000000000000000000000000000000000000000000000852b987ff9dca96100000000000000000000000000000000000000000000167a2ba1291d2b16eb32000000000000000000000000000000000000000000000000851e65ffd6be637a00000000000000000000000000000000000000000000167a2bae5b9d4e353119", - "logIndex": 4, - "blockHash": "0xc2dc6f6303a4b047fad6406e8d9d6518fd83937fb6872d933d5051a81473b68b" + "data": "0x000000000000000000000000000000000000000000000000000a4e725ac3070b0000000000000000000000000000000000000000000000007d747ab63928298a00000000000000000000000000000000000000000000181f39a1f6e4ece51d0d0000000000000000000000000000000000000000000000007d6a2c43de65227f00000000000000000000000000000000000000000000181f39ac455747a82418", + "logIndex": 75, + "blockHash": "0xcf4a827897c2fe128fb7be483551fb3cacdd2e7860a16a33e07d967c0daf891f" } ], - "blockNumber": 28600026, - "cumulativeGasUsed": "1648632", + "blockNumber": 29540603, + "cumulativeGasUsed": "4230694", "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", + "numDeployments": 2, + "solcInputHash": "6edb98fea2bf424a369954d0e80655f6", + "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 [8609986746108439658545470593166889256314951959466775818870246174320018498804,\\n 6848251127850009101372611262053374737897586140140607384018397707035108265914],\\n [21367916863936594568281095443965096905143705300114190558130516981138584550504,\\n 13327705762185115653848159709412003423932761899188342359583872691135383932883]\\n );\\n vk.IC = new Pairing.G1Point[](11);\\n \\n vk.IC[0] = Pairing.G1Point( \\n 19965766170734310004645394427613286415565755728797065894668054116047682895204,\\n 6952067612339183672227137101423582097916038093373585908267153974352032944482\\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 13987716160490730015463796942940452666334097189904948795214986996497499925899,\\n 5336810094802209074340875836312868429276540870324469349093948627126061524544\\n ); \\n \\n vk.IC[4] = Pairing.G1Point( \\n 14931593253473978964215343699995811275378324235306358485461293343370969283966,\\n 564306919152089917957316877787764763278299990971316475606280877961553231205\\n ); \\n \\n vk.IC[5] = Pairing.G1Point( \\n 11591267743733991434114686002448165336885445656808796470854638278338319268343,\\n 11495219763417990955889652410266075210402006084183208750635660647824890013350\\n ); \\n \\n vk.IC[6] = Pairing.G1Point( \\n 8183184532870222270700473518157259944911700429689031755853536692005688965081,\\n 9121077094104828462137861111631978599019724423614716723152060153405564278301\\n ); \\n \\n vk.IC[7] = Pairing.G1Point( \\n 4314095526093128699362232919686741372014146055311239687202926853002748112330,\\n 11665330391505820654128458332883010598817535082070674418723503440883598640597\\n ); \\n \\n vk.IC[8] = Pairing.G1Point( \\n 19602244162575575785636531633124796303002902053486919698240132790672698216585,\\n 181057165072599074288983745076121344893296348827576905983079816835912241514\\n ); \\n \\n vk.IC[9] = Pairing.G1Point( \\n 18925967077785550270509493111690046951994174908254476036944536825999614778001,\\n 4990629719417206796668074534812314525340851981015724652256935997545282642849\\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\":\"0x120f0b311a61cabc9d42ef740c19e5f20b4c8ba400d9a6378e33c76dd54f5c42\",\"license\":\"GPL-3.0\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50611597806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063f3bb70f614610030575b600080fd5b61004361003e3660046113ce565b610057565b604051901515815260200160405180910390f35b60006100616111e1565b604080518082018252875181526020808901518183015290835281516080810183528751518184019081528851830151606083015281528251808401845288830180515182525183015181840152818301528382015281518083018352865181528682015181830152838301528151600a8082526101608201909352600092909182016101408036833701905050905060005b600a811015610143578481600a811061010f5761010f6114ac565b6020020151828281518110610126576101266114ac565b60209081029190910101528061013b816114d8565b9150506100f4565b5061014e818361016f565b60000361016057600192505050610167565b6000925050505b949350505050565b60007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018161019b610366565b9050806080015151855160016101b191906114f1565b146101f85760405162461bcd60e51b81526020600482015260126024820152711d995c9a599a595c8b5898590b5a5b9c1d5d60721b60448201526064015b60405180910390fd5b604080518082019091526000808252602082018190525b86518110156102e9578387828151811061022b5761022b6114ac565b6020026020010151106102805760405162461bcd60e51b815260206004820152601f60248201527f76657269666965722d6774652d736e61726b2d7363616c61722d6669656c640060448201526064016101ef565b6102d5826102d0856080015184600161029991906114f1565b815181106102a9576102a96114ac565b60200260200101518a85815181106102c3576102c36114ac565b6020026020010151610b30565b610bc6565b9150806102e1816114d8565b91505061020f565b50610312818360800151600081518110610305576103056114ac565b6020026020010151610bc6565b90506103486103248660000151610c5f565b8660200151846000015185602001518587604001518b604001518960600151610cfe565b6103585760019350505050610360565b600093505050505b92915050565b61036e611232565b6040805180820182527f2d4d9aa7e302d9df41749d5507949d05dbea33fbb16c643b22f599a2be6df2e281527f14bedd503c37ceb061d8ec60209fe345ce89830a19230301f076caff004d19266020808301919091529083528151608080820184527f0967032fcbf776d1afc985f88877f182d38480a653f2decaa9794cbc3bf3060c8285019081527f0e187847ad4c798374d0d6732bf501847dd68bc0e071241e0213bc7fc13db7ab606080850191909152908352845180860186527f304cfbd1e08a704a99f5e847d93f8c3caafddec46b7a0d379da69a4d112346a781527f1739c1b1a457a8c7313123d24d2f9192f896b7c63eea05a9d57f06547ad0cec8818601528385015285840192909252835180820185527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28186019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed828501528152845180860186527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b81527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa818601528185015285850152835190810184527f1309146df5c443e5db6a7a6e809d782667e59deebf9e8a8e6e622196119ea4f48185019081527f0f23f9080c79c8259f4b3d2442e88c6c1f5a3721f82c1bd3cf33912f4c554fba828401528152835180850185527f2f3dcff69745f046c2bfa13f9c4c81083c41a209f287fa0afb44391b5070bc6881527f1d7736d1e061cab0da0b28c319361de25abd329672d1bec1e29f6fdc604d0fd38185015281840152908401528151600b8082526101808201909352919082015b60408051808201909152600080825260208201528152602001906001900390816105ea57505060808201908152604080518082019091527f2c243922d634f38b0cfa04897932397d47699289aed9b414760d4e729b797d6481527f0f5ebb177a11bce83029d6c7ca0aa97d4f6085fc0fffbc63127ba724e33dd16260208201529051805160009061067d5761067d6114ac565b602002602001018190525060405180604001604052807f084d1b300a1ecc4c0d892345551e790b2d49fe22a1b71fbcd94d0be8931871bb81526020017f24861196b6282d728048cae2ec60fbc8496829a8dfbb4273f731b2b726b0f62881525081608001516001815181106106f4576106f46114ac565b602002602001018190525060405180604001604052807f209369983ced02fe1bdfed53e6c88a12bd3efd860515daa6a398aa73bbb09c7181526020017f28e41e5609c0e714afa30a906663b8ee61baecd274f9d30fd36f9c426ff9e593815250816080015160028151811061076b5761076b6114ac565b602002602001018190525060405180604001604052807f1eecc44c2a661c3f66ae217ec542b70f38b6313e8be081e2a8f95f64c881ad8b81526020017f0bcc87084972fb8309ff46ca4afa1b2934755fb38cff3bdf374c4ab7bda6664081525081608001516003815181106107e2576107e26114ac565b602002602001018190525060405180604001604052807f2102fb775a7dfc364bf6a014da09f86e9144e3239534ab25d3bbd48e4a0afd7e81526020017f013f62eaf435acc457bd2a3d8315dab277c802f0bda44517845768371935bd658152508160800151600481518110610859576108596114ac565b602002602001018190525060405180604001604052807f19a06cd017ddcf6192f42073758c82a6eda2adc572c9be2901c15d6e54b0b9f781526020017f196a10567feeb5a9a1903009034de556585c8ea06b30a73e9b4e88da620026a681525081608001516005815181106108d0576108d06114ac565b602002602001018190525060405180604001604052807f121784b003ec4655b1f312d2011a2117a113d4051e94ce94db805d3d99f5f7d981526020017f142a58c0955ecd67ea19afbcbd0347632d515e9979fcb7d6818de26dbff0561d8152508160800151600681518110610947576109476114ac565b602002602001018190525060405180604001604052807f0989b10899b251f5f04f11415d3d4521b5153f7f4a6d4ac9891d95669f162dca81526020017f19ca57d06136d58c9da48f9bb1aa31eea7d60b19dccdd80b224dd9900afa45d581525081608001516007815181106109be576109be6114ac565b602002602001018190525060405180604001604052807f2b567a1e26a932fa728a650315371e9f9df455a5b0c1c0886bd80d6060a9908981526020017e66798780cd5512ad9f5a2373f1fb64535a8e3c4ad8c33ddc8bd18fc441116a8152508160800151600881518110610a3457610a346114ac565b602002602001018190525060405180604001604052807f29d7b7beed21dea04e4e86841f7ecae70b9af771dd1a05fd97c28240207b9a9181526020017f0b0898a882ba7215368d58cb476b23aa95278245216c92c1823fd2ab7cb5a3a18152508160800151600981518110610aab57610aab6114ac565b602002602001018190525060405180604001604052807f102f5e9ec24f58ddf1d39e018b5367ef9ea173301e98cdd899627bd14762ee6981526020017f068105d1e3d4238ec4274b68a5177670d700a905e46fd5c6779ef83d6916c4f18152508160800151600a81518110610b2257610b226114ac565b602002602001018190525090565b6040805180820190915260008082526020820152610b4c611283565b835181526020808501519082015260408101839052600060608360808460076107d05a03fa90508080610b7b57fe5b5080610bbe5760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5b5d5b0b59985a5b195960721b60448201526064016101ef565b505092915050565b6040805180820190915260008082526020820152610be26112a1565b8351815260208085015181830152835160408301528301516060808301919091526000908360c08460066107d05a03fa90508080610c1c57fe5b5080610bbe5760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5859190b59985a5b195960721b60448201526064016101ef565b604080518082019091526000808252602082015281517f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4790158015610ca657506020830151155b15610cc65750506040805180820190915260008082526020820152919050565b604051806040016040528084600001518152602001828560200151610ceb9190611509565b610cf5908461152b565b90529392505050565b60408051600480825260a08201909252600091829190816020015b6040805180820190915260008082526020820152815260200190600190039081610d1957505060408051600480825260a0820190925291925060009190602082015b610d636112bf565b815260200190600190039081610d5b5790505090508a82600081518110610d8c57610d8c6114ac565b60200260200101819052508882600181518110610dab57610dab6114ac565b60200260200101819052508682600281518110610dca57610dca6114ac565b60200260200101819052508482600381518110610de957610de96114ac565b60200260200101819052508981600081518110610e0857610e086114ac565b60200260200101819052508781600181518110610e2757610e276114ac565b60200260200101819052508581600281518110610e4657610e466114ac565b60200260200101819052508381600381518110610e6557610e656114ac565b6020026020010181905250610e7a8282610e89565b9b9a5050505050505050505050565b60008151835114610ed55760405162461bcd60e51b81526020600482015260166024820152751c185a5c9a5b99cb5b195b99dd1a1ccb59985a5b195960521b60448201526064016101ef565b82516000610ee4826006611542565b905060008167ffffffffffffffff811115610f0157610f0161131b565b604051908082528060200260200182016040528015610f2a578160200160208202803683370190505b50905060005b8381101561116557868181518110610f4a57610f4a6114ac565b60200260200101516000015182826006610f649190611542565b610f6f9060006114f1565b81518110610f7f57610f7f6114ac565b602002602001018181525050868181518110610f9d57610f9d6114ac565b60200260200101516020015182826006610fb79190611542565b610fc29060016114f1565b81518110610fd257610fd26114ac565b602002602001018181525050858181518110610ff057610ff06114ac565b6020908102919091010151515182611009836006611542565b6110149060026114f1565b81518110611024576110246114ac565b602002602001018181525050858181518110611042576110426114ac565b6020908102919091018101515101518261105d836006611542565b6110689060036114f1565b81518110611078576110786114ac565b602002602001018181525050858181518110611096576110966114ac565b6020026020010151602001516000600281106110b4576110b46114ac565b6020020151826110c5836006611542565b6110d09060046114f1565b815181106110e0576110e06114ac565b6020026020010181815250508581815181106110fe576110fe6114ac565b60200260200101516020015160016002811061111c5761111c6114ac565b60200201518261112d836006611542565b6111389060056114f1565b81518110611148576111486114ac565b60209081029190910101528061115d816114d8565b915050610f30565b5061116e6112df565b6000602082602086026020860160086107d05a03fa9050808061118d57fe5b50806111d35760405162461bcd60e51b81526020600482015260156024820152741c185a5c9a5b99cb5bdc18dbd9194b59985a5b1959605a1b60448201526064016101ef565b505115159695505050505050565b6040805160a08101909152600060608201818152608083019190915281526020810161120b6112bf565b815260200161122d604051806040016040528060008152602001600081525090565b905290565b6040805160e08101909152600060a0820181815260c083019190915281526020810161125c6112bf565b81526020016112696112bf565b81526020016112766112bf565b8152602001606081525090565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b60405180604001604052806112d26112fd565b815260200161122d6112fd565b60405180602001604052806001906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156113545761135461131b565b60405290565b604051610140810167ffffffffffffffff811182821017156113545761135461131b565b600082601f83011261138f57600080fd5b611397611331565b8060408401858111156113a957600080fd5b845b818110156113c35780358452602093840193016113ab565b509095945050505050565b6000806000806102408086880312156113e657600080fd5b6113f0878761137e565b9450604087605f88011261140357600080fd5b61140b611331565b8060c089018a81111561141d57600080fd5b838a015b81811015611442576114338c8261137e565b84526020909301928401611421565b508197506114508b8261137e565b9650505050508661011f87011261146657600080fd5b61146e61135a565b90860190808883111561148057600080fd5b61010088015b8381101561149e578035835260209283019201611486565b509598949750929550505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016114ea576114ea6114c2565b5060010190565b60008219821115611504576115046114c2565b500190565b60008261152657634e487b7160e01b600052601260045260246000fd5b500690565b60008282101561153d5761153d6114c2565b500390565b600081600019048311821515161561155c5761155c6114c2565b50029056fea264697066735822122032bcacece0452dcb73e92b9569837e33c48751c237fdb79a212c6dfad1fb31b364736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063f3bb70f614610030575b600080fd5b61004361003e3660046113ce565b610057565b604051901515815260200160405180910390f35b60006100616111e1565b604080518082018252875181526020808901518183015290835281516080810183528751518184019081528851830151606083015281528251808401845288830180515182525183015181840152818301528382015281518083018352865181528682015181830152838301528151600a8082526101608201909352600092909182016101408036833701905050905060005b600a811015610143578481600a811061010f5761010f6114ac565b6020020151828281518110610126576101266114ac565b60209081029190910101528061013b816114d8565b9150506100f4565b5061014e818361016f565b60000361016057600192505050610167565b6000925050505b949350505050565b60007f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000018161019b610366565b9050806080015151855160016101b191906114f1565b146101f85760405162461bcd60e51b81526020600482015260126024820152711d995c9a599a595c8b5898590b5a5b9c1d5d60721b60448201526064015b60405180910390fd5b604080518082019091526000808252602082018190525b86518110156102e9578387828151811061022b5761022b6114ac565b6020026020010151106102805760405162461bcd60e51b815260206004820152601f60248201527f76657269666965722d6774652d736e61726b2d7363616c61722d6669656c640060448201526064016101ef565b6102d5826102d0856080015184600161029991906114f1565b815181106102a9576102a96114ac565b60200260200101518a85815181106102c3576102c36114ac565b6020026020010151610b30565b610bc6565b9150806102e1816114d8565b91505061020f565b50610312818360800151600081518110610305576103056114ac565b6020026020010151610bc6565b90506103486103248660000151610c5f565b8660200151846000015185602001518587604001518b604001518960600151610cfe565b6103585760019350505050610360565b600093505050505b92915050565b61036e611232565b6040805180820182527f2d4d9aa7e302d9df41749d5507949d05dbea33fbb16c643b22f599a2be6df2e281527f14bedd503c37ceb061d8ec60209fe345ce89830a19230301f076caff004d19266020808301919091529083528151608080820184527f0967032fcbf776d1afc985f88877f182d38480a653f2decaa9794cbc3bf3060c8285019081527f0e187847ad4c798374d0d6732bf501847dd68bc0e071241e0213bc7fc13db7ab606080850191909152908352845180860186527f304cfbd1e08a704a99f5e847d93f8c3caafddec46b7a0d379da69a4d112346a781527f1739c1b1a457a8c7313123d24d2f9192f896b7c63eea05a9d57f06547ad0cec8818601528385015285840192909252835180820185527f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c28186019081527f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed828501528152845180860186527f090689d0585ff075ec9e99ad690c3395bc4b313370b38ef355acdadcd122975b81527f12c85ea5db8c6deb4aab71808dcb408fe3d1e7690c43d37b4ce6cc0166fa7daa818601528185015285850152835190810184527f1309146df5c443e5db6a7a6e809d782667e59deebf9e8a8e6e622196119ea4f48185019081527f0f23f9080c79c8259f4b3d2442e88c6c1f5a3721f82c1bd3cf33912f4c554fba828401528152835180850185527f2f3dcff69745f046c2bfa13f9c4c81083c41a209f287fa0afb44391b5070bc6881527f1d7736d1e061cab0da0b28c319361de25abd329672d1bec1e29f6fdc604d0fd38185015281840152908401528151600b8082526101808201909352919082015b60408051808201909152600080825260208201528152602001906001900390816105ea57505060808201908152604080518082019091527f2c243922d634f38b0cfa04897932397d47699289aed9b414760d4e729b797d6481527f0f5ebb177a11bce83029d6c7ca0aa97d4f6085fc0fffbc63127ba724e33dd16260208201529051805160009061067d5761067d6114ac565b602002602001018190525060405180604001604052807f084d1b300a1ecc4c0d892345551e790b2d49fe22a1b71fbcd94d0be8931871bb81526020017f24861196b6282d728048cae2ec60fbc8496829a8dfbb4273f731b2b726b0f62881525081608001516001815181106106f4576106f46114ac565b602002602001018190525060405180604001604052807f209369983ced02fe1bdfed53e6c88a12bd3efd860515daa6a398aa73bbb09c7181526020017f28e41e5609c0e714afa30a906663b8ee61baecd274f9d30fd36f9c426ff9e593815250816080015160028151811061076b5761076b6114ac565b602002602001018190525060405180604001604052807f1eecc44c2a661c3f66ae217ec542b70f38b6313e8be081e2a8f95f64c881ad8b81526020017f0bcc87084972fb8309ff46ca4afa1b2934755fb38cff3bdf374c4ab7bda6664081525081608001516003815181106107e2576107e26114ac565b602002602001018190525060405180604001604052807f2102fb775a7dfc364bf6a014da09f86e9144e3239534ab25d3bbd48e4a0afd7e81526020017f013f62eaf435acc457bd2a3d8315dab277c802f0bda44517845768371935bd658152508160800151600481518110610859576108596114ac565b602002602001018190525060405180604001604052807f19a06cd017ddcf6192f42073758c82a6eda2adc572c9be2901c15d6e54b0b9f781526020017f196a10567feeb5a9a1903009034de556585c8ea06b30a73e9b4e88da620026a681525081608001516005815181106108d0576108d06114ac565b602002602001018190525060405180604001604052807f121784b003ec4655b1f312d2011a2117a113d4051e94ce94db805d3d99f5f7d981526020017f142a58c0955ecd67ea19afbcbd0347632d515e9979fcb7d6818de26dbff0561d8152508160800151600681518110610947576109476114ac565b602002602001018190525060405180604001604052807f0989b10899b251f5f04f11415d3d4521b5153f7f4a6d4ac9891d95669f162dca81526020017f19ca57d06136d58c9da48f9bb1aa31eea7d60b19dccdd80b224dd9900afa45d581525081608001516007815181106109be576109be6114ac565b602002602001018190525060405180604001604052807f2b567a1e26a932fa728a650315371e9f9df455a5b0c1c0886bd80d6060a9908981526020017e66798780cd5512ad9f5a2373f1fb64535a8e3c4ad8c33ddc8bd18fc441116a8152508160800151600881518110610a3457610a346114ac565b602002602001018190525060405180604001604052807f29d7b7beed21dea04e4e86841f7ecae70b9af771dd1a05fd97c28240207b9a9181526020017f0b0898a882ba7215368d58cb476b23aa95278245216c92c1823fd2ab7cb5a3a18152508160800151600981518110610aab57610aab6114ac565b602002602001018190525060405180604001604052807f102f5e9ec24f58ddf1d39e018b5367ef9ea173301e98cdd899627bd14762ee6981526020017f068105d1e3d4238ec4274b68a5177670d700a905e46fd5c6779ef83d6916c4f18152508160800151600a81518110610b2257610b226114ac565b602002602001018190525090565b6040805180820190915260008082526020820152610b4c611283565b835181526020808501519082015260408101839052600060608360808460076107d05a03fa90508080610b7b57fe5b5080610bbe5760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5b5d5b0b59985a5b195960721b60448201526064016101ef565b505092915050565b6040805180820190915260008082526020820152610be26112a1565b8351815260208085015181830152835160408301528301516060808301919091526000908360c08460066107d05a03fa90508080610c1c57fe5b5080610bbe5760405162461bcd60e51b81526020600482015260126024820152711c185a5c9a5b99cb5859190b59985a5b195960721b60448201526064016101ef565b604080518082019091526000808252602082015281517f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4790158015610ca657506020830151155b15610cc65750506040805180820190915260008082526020820152919050565b604051806040016040528084600001518152602001828560200151610ceb9190611509565b610cf5908461152b565b90529392505050565b60408051600480825260a08201909252600091829190816020015b6040805180820190915260008082526020820152815260200190600190039081610d1957505060408051600480825260a0820190925291925060009190602082015b610d636112bf565b815260200190600190039081610d5b5790505090508a82600081518110610d8c57610d8c6114ac565b60200260200101819052508882600181518110610dab57610dab6114ac565b60200260200101819052508682600281518110610dca57610dca6114ac565b60200260200101819052508482600381518110610de957610de96114ac565b60200260200101819052508981600081518110610e0857610e086114ac565b60200260200101819052508781600181518110610e2757610e276114ac565b60200260200101819052508581600281518110610e4657610e466114ac565b60200260200101819052508381600381518110610e6557610e656114ac565b6020026020010181905250610e7a8282610e89565b9b9a5050505050505050505050565b60008151835114610ed55760405162461bcd60e51b81526020600482015260166024820152751c185a5c9a5b99cb5b195b99dd1a1ccb59985a5b195960521b60448201526064016101ef565b82516000610ee4826006611542565b905060008167ffffffffffffffff811115610f0157610f0161131b565b604051908082528060200260200182016040528015610f2a578160200160208202803683370190505b50905060005b8381101561116557868181518110610f4a57610f4a6114ac565b60200260200101516000015182826006610f649190611542565b610f6f9060006114f1565b81518110610f7f57610f7f6114ac565b602002602001018181525050868181518110610f9d57610f9d6114ac565b60200260200101516020015182826006610fb79190611542565b610fc29060016114f1565b81518110610fd257610fd26114ac565b602002602001018181525050858181518110610ff057610ff06114ac565b6020908102919091010151515182611009836006611542565b6110149060026114f1565b81518110611024576110246114ac565b602002602001018181525050858181518110611042576110426114ac565b6020908102919091018101515101518261105d836006611542565b6110689060036114f1565b81518110611078576110786114ac565b602002602001018181525050858181518110611096576110966114ac565b6020026020010151602001516000600281106110b4576110b46114ac565b6020020151826110c5836006611542565b6110d09060046114f1565b815181106110e0576110e06114ac565b6020026020010181815250508581815181106110fe576110fe6114ac565b60200260200101516020015160016002811061111c5761111c6114ac565b60200201518261112d836006611542565b6111389060056114f1565b81518110611148576111486114ac565b60209081029190910101528061115d816114d8565b915050610f30565b5061116e6112df565b6000602082602086026020860160086107d05a03fa9050808061118d57fe5b50806111d35760405162461bcd60e51b81526020600482015260156024820152741c185a5c9a5b99cb5bdc18dbd9194b59985a5b1959605a1b60448201526064016101ef565b505115159695505050505050565b6040805160a08101909152600060608201818152608083019190915281526020810161120b6112bf565b815260200161122d604051806040016040528060008152602001600081525090565b905290565b6040805160e08101909152600060a0820181815260c083019190915281526020810161125c6112bf565b81526020016112696112bf565b81526020016112766112bf565b8152602001606081525090565b60405180606001604052806003906020820280368337509192915050565b60405180608001604052806004906020820280368337509192915050565b60405180604001604052806112d26112fd565b815260200161122d6112fd565b60405180602001604052806001906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff811182821017156113545761135461131b565b60405290565b604051610140810167ffffffffffffffff811182821017156113545761135461131b565b600082601f83011261138f57600080fd5b611397611331565b8060408401858111156113a957600080fd5b845b818110156113c35780358452602093840193016113ab565b509095945050505050565b6000806000806102408086880312156113e657600080fd5b6113f0878761137e565b9450604087605f88011261140357600080fd5b61140b611331565b8060c089018a81111561141d57600080fd5b838a015b81811015611442576114338c8261137e565b84526020909301928401611421565b508197506114508b8261137e565b9650505050508661011f87011261146657600080fd5b61146e61135a565b90860190808883111561148057600080fd5b61010088015b8381101561149e578035835260209283019201611486565b509598949750929550505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016114ea576114ea6114c2565b5060010190565b60008219821115611504576115046114c2565b500190565b60008261152657634e487b7160e01b600052601260045260246000fd5b500690565b60008282101561153d5761153d6114c2565b500390565b600081600019048311821515161561155c5761155c6114c2565b50029056fea264697066735822122032bcacece0452dcb73e92b9569837e33c48751c237fdb79a212c6dfad1fb31b364736f6c634300080e0033", "devdoc": { "kind": "dev", "methods": { diff --git a/deployments/mumbai/Pythia1SimpleAttester.json b/deployments/mumbai/Pythia1SimpleAttester.json index a68e88c..a6cbc2f 100644 --- a/deployments/mumbai/Pythia1SimpleAttester.json +++ b/deployments/mumbai/Pythia1SimpleAttester.json @@ -332,6 +332,19 @@ "name": "CommitmentSignerPubKeyUpdated", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -396,6 +409,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "IMPLEMENTATION_VERSION", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -694,7 +720,7 @@ }, { "internalType": "address", - "name": "owner", + "name": "ownerAddress", "type": "address" } ], @@ -750,75 +776,87 @@ "type": "function" } ], - "transactionHash": "0x5445e69c2d005ddb9d33087dd1e9146f8b0f920b3780f93b8b6fee8160858ded", + "transactionHash": "0x7757d7b590e85f889004b3d89b9bbe8bfd1795b460382bb17de6ed1dde0088a0", "receipt": { "to": null, "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0x268669Ac1bAb63ea492F47428b778514F08508a8", - "transactionIndex": 9, - "gasUsed": "1938626", - "logsBloom": "0x00000000000000000000000000020000000000000000000000800000000000000000000000000000000000000000000000008000000040000000000000008000000000000000000000000000000000800001000000000000000100000000000000000000020000000000000000000800002000000000000080000000000000400000000000008000200000000000000000000010000000000000000000008000200000000000000000280000800000000000000000000000000000000000004000000000000000000001000000000100000000000040000000100000000020000000000000000000000000000000000000000200000000000020000000100000", - "blockHash": "0x3d1905558064932433f98c996d83e67c004af47553c140a69b564485ffc2acbe", - "transactionHash": "0x5445e69c2d005ddb9d33087dd1e9146f8b0f920b3780f93b8b6fee8160858ded", + "contractAddress": "0x5CE8544C05F6Ed9Dc626071505795C3c4E1EB559", + "transactionIndex": 23, + "gasUsed": "1945946", + "logsBloom": "0x00000000000000000000000000020000000000000000000000800010000000000000000000000020000000000000000000008000000040000000000000000000000000000000000000000000000000800001000000000000000100000000000000000000020000000000000000000800002000000200000080000000000000400000000000000000008000000000000000000010000080000000000000008000200000000000000000200000800400000000000000000000000000000000004000000000000000000001000000040000000000000000000000100000001020000000000000000000000000000000000000002200000000000020000000100000", + "blockHash": "0xcdd137365ec23546d2267ad15968428470503f9c792d3f666ac25fcb94a9f2f4", + "transactionHash": "0x7757d7b590e85f889004b3d89b9bbe8bfd1795b460382bb17de6ed1dde0088a0", "logs": [ { - "transactionIndex": 9, - "blockNumber": 28807655, - "transactionHash": "0x5445e69c2d005ddb9d33087dd1e9146f8b0f920b3780f93b8b6fee8160858ded", - "address": "0x268669Ac1bAb63ea492F47428b778514F08508a8", + "transactionIndex": 23, + "blockNumber": 29540709, + "transactionHash": "0x7757d7b590e85f889004b3d89b9bbe8bfd1795b460382bb17de6ed1dde0088a0", + "address": "0x5CE8544C05F6Ed9Dc626071505795C3c4E1EB559", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" ], "data": "0x", - "logIndex": 50, - "blockHash": "0x3d1905558064932433f98c996d83e67c004af47553c140a69b564485ffc2acbe" + "logIndex": 101, + "blockHash": "0xcdd137365ec23546d2267ad15968428470503f9c792d3f666ac25fcb94a9f2f4" }, { - "transactionIndex": 9, - "blockNumber": 28807655, - "transactionHash": "0x5445e69c2d005ddb9d33087dd1e9146f8b0f920b3780f93b8b6fee8160858ded", - "address": "0x268669Ac1bAb63ea492F47428b778514F08508a8", + "transactionIndex": 23, + "blockNumber": 29540709, + "transactionHash": "0x7757d7b590e85f889004b3d89b9bbe8bfd1795b460382bb17de6ed1dde0088a0", + "address": "0x5CE8544C05F6Ed9Dc626071505795C3c4E1EB559", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", "0x0000000000000000000000004e070e9b85a659f0b7b47cde33152ad6c2f63954" ], "data": "0x", - "logIndex": 51, - "blockHash": "0x3d1905558064932433f98c996d83e67c004af47553c140a69b564485ffc2acbe" + "logIndex": 102, + "blockHash": "0xcdd137365ec23546d2267ad15968428470503f9c792d3f666ac25fcb94a9f2f4" }, { - "transactionIndex": 9, - "blockNumber": 28807655, - "transactionHash": "0x5445e69c2d005ddb9d33087dd1e9146f8b0f920b3780f93b8b6fee8160858ded", - "address": "0x268669Ac1bAb63ea492F47428b778514F08508a8", + "transactionIndex": 23, + "blockNumber": 29540709, + "transactionHash": "0x7757d7b590e85f889004b3d89b9bbe8bfd1795b460382bb17de6ed1dde0088a0", + "address": "0x5CE8544C05F6Ed9Dc626071505795C3c4E1EB559", "topics": [ "0xda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df" ], "data": "0x038d3d596875c66eb90608bbe04e4e238607fd32ad61f4278bdaf47aadc28d601b46b55a0ce3f35d6025cdd4554aaac1fc7180b14d51b0f15aa51a6929bdb952", - "logIndex": 52, - "blockHash": "0x3d1905558064932433f98c996d83e67c004af47553c140a69b564485ffc2acbe" + "logIndex": 103, + "blockHash": "0xcdd137365ec23546d2267ad15968428470503f9c792d3f666ac25fcb94a9f2f4" + }, + { + "transactionIndex": 23, + "blockNumber": 29540709, + "transactionHash": "0x7757d7b590e85f889004b3d89b9bbe8bfd1795b460382bb17de6ed1dde0088a0", + "address": "0x5CE8544C05F6Ed9Dc626071505795C3c4E1EB559", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000003", + "logIndex": 104, + "blockHash": "0xcdd137365ec23546d2267ad15968428470503f9c792d3f666ac25fcb94a9f2f4" }, { - "transactionIndex": 9, - "blockNumber": 28807655, - "transactionHash": "0x5445e69c2d005ddb9d33087dd1e9146f8b0f920b3780f93b8b6fee8160858ded", + "transactionIndex": 23, + "blockNumber": 29540709, + "transactionHash": "0x7757d7b590e85f889004b3d89b9bbe8bfd1795b460382bb17de6ed1dde0088a0", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", "0x0000000000000000000000000000000000000000000000000000000000001010", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x0000000000000000000000003a22c8bc68e98b0faf40f349dd2b2890fae01484" + "0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99" ], - "data": "0x00000000000000000000000000000000000000000000000000181b186349c6000000000000000000000000000000000000000000000000007dc6aa84dc1ab44d0000000000000000000000000000000000000000000000000583e3a5ef509bb00000000000000000000000000000000000000000000000007dae8f6c78d0ee4d000000000000000000000000000000000000000000000000059bfebe529a61b0", - "logIndex": 53, - "blockHash": "0x3d1905558064932433f98c996d83e67c004af47553c140a69b564485ffc2acbe" + "data": "0x000000000000000000000000000000000000000000000000000af11b618dcada0000000000000000000000000000000000000000000000007cc03a6b555a767600000000000000000000000000000000000000000000093b286bfaaecb33a9440000000000000000000000000000000000000000000000007cb5494ff3ccab9c00000000000000000000000000000000000000000000093b2876ebca2cc1741e", + "logIndex": 105, + "blockHash": "0xcdd137365ec23546d2267ad15968428470503f9c792d3f666ac25fcb94a9f2f4" } ], - "blockNumber": 28807655, - "cumulativeGasUsed": "3547860", + "blockNumber": 29540709, + "cumulativeGasUsed": "7737931", "status": 1, "byzantium": true }, @@ -833,11 +871,11 @@ ], "0x4e070E9b85a659F0B7B47cde33152ad6c2F63954" ], - "numDeployments": 2, - "solcInputHash": "c7c67c4a1ddf53de4ef76f8a114dfc39", - "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 address[] memory attestationOwners = new address[](collectionIds.length);\\n\\n uint256[] memory attestationCollectionIds = new uint256[](collectionIds.length);\\n\\n Attestation[] memory attestations = new Attestation[](collectionIds.length);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n // fetch attestations from the registry\\n (\\n address issuer,\\n uint256 attestationValue,\\n uint32 timestamp,\\n bytes memory extraData\\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\\n\\n attestationOwners[i] = attestationsOwner;\\n attestationCollectionIds[i] = collectionIds[i];\\n\\n attestations[i] = (\\n Attestation(\\n collectionIds[i],\\n attestationsOwner,\\n issuer,\\n attestationValue,\\n timestamp,\\n extraData\\n )\\n );\\n }\\n\\n _verifyAttestationsDeletionRequest(attestations, proofData);\\n\\n _beforeDeleteAttestations(attestations, proofData);\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\\n\\n _afterDeleteAttestations(attestations, proofData);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n emit AttestationDeleted(attestations[i]);\\n }\\n return attestations;\\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\":\"0xcab4865f46f442ae11ea0689f63eb7fa0763fcfe86522aa67521a548171cb8e0\",\"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 error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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\":\"0xcf79a817ec578f5b4d8f23853dd8df0e3b1acfbff2b5a01601fd9a7315862ec9\",\"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": "0x6101006040523480156200001257600080fd5b50604051620024a2380380620024a28339810160408190526200003591620002b6565b6001600160a01b03838116608052861660a052620000533362000075565b60c085905260e0849052620000698282620000d0565b505050505050620003b7565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054610100900460ff16620000ed5760005460ff1615620000f7565b620000f7620001b0565b6200015f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801562000182576000805461ffff19166101011790555b6200018d8262000075565b6200019883620001ce565b8015620001ab576000805461ff00191690555b505050565b6000620001c8306200021a60201b62000ad01760201c565b15905090565b620001dd600182600262000229565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df816040516200020f919062000384565b60405180910390a150565b6001600160a01b03163b151590565b82600281019282156200025a579160200282015b828111156200025a5782518255916020019190600101906200023d565b50620002689291506200026c565b5090565b5b808211156200026857600081556001016200026d565b80516001600160a01b03811681146200029b57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060e08789031215620002d057600080fd5b620002db8762000283565b9550602080880151955060408801519450620002fa6060890162000283565b935088609f8901126200030c57600080fd5b604080519081016001600160401b0381118282101715620003315762000331620002a0565b6040528060c08a018b8111156200034757600080fd5b60808b015b818110156200036557805183529184019184016200034c565b50829550620003748162000283565b9450505050509295509295509295565b60408101818360005b6002811015620003ae5781518352602092830192909101906001016200038d565b50505092915050565b60805160a05160c05160e0516120876200041b600039600081816101a901526103c0015260008181610161015261039801526000818161020c01528181610584015281816107650152610953015260008181610124015261108701526120876000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063c776adde11610066578063c776adde14610230578063c9cdef0414610243578063e60f999f14610256578063f2fde38b1461026957600080fd5b80638da5cb5b146101d3578063af411a30146101ea578063bfa665851461020a57600080fd5b806354846d7a116100c857806354846d7a1461015c57806363e4afc2146101915780637000b051146101a4578063715018a6146101cb57600080fd5b8063124d7199146100ef5780632785e3221461010457806346657fe914610122575b600080fd5b6101026100fd366004611600565b61027c565b005b61010c6102c2565b604051610119919061163f565b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610119565b6101837f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610119565b61014461019f36600461164d565b6102d7565b6101837f000000000000000000000000000000000000000000000000000000000000000081565b6101026102f6565b6000546201000090046001600160a01b0316610144565b6101fd6101f83660046116ae565b610333565b60405161011991906117d9565b7f0000000000000000000000000000000000000000000000000000000000000000610144565b6101fd61023e366004611860565b61048d565b610102610251366004611911565b610848565b6101fd6102643660046116ae565b610915565b610102610277366004611949565b610a31565b6000546001600160a01b03620100009091041633146102b65760405162461bcd60e51b81526004016102ad90611966565b60405180910390fd5b6102bf81610adf565b50565b6102ca6113f7565b6102d2610b27565b905090565b6000818152600360205260408120546001600160a01b03165b92915050565b6000546001600160a01b03620100009091041633146103275760405162461bcd60e51b81526004016102ad90611966565b6103316000610b61565b565b60606000610348610343866119c2565b610bbc565b60408051600180825281830190925291925060009190816020015b61036b611415565b8152602001906001900390816103635750506060830151519091506000906103bc906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611b51565b90507f000000000000000000000000000000000000000000000000000000000000000081111561040257604051637bbf29e360e01b8152600481018290526024016102ad565b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b03168152602001856020015181526020014263ffffffff168152602001604051806020016040528060008152508152508360008151811061047657610476611b69565b602090810291909101015250909695505050505050565b60606000856001600160401b038111156104a9576104a961150b565b6040519080825280602002602001820160405280156104d2578160200160208202803683370190505b5090506000866001600160401b038111156104ef576104ef61150b565b604051908082528060200260200182016040528015610518578160200160208202803683370190505b5090506000876001600160401b038111156105355761053561150b565b60405190808252806020026020018201604052801561056e57816020015b61055b611415565b8152602001906001900390816105535790505b50905060005b88811015610742576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f888181106105c3576105c3611b69565b905060200201358e6040518363ffffffff1660e01b81526004016105fa9291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610617573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261063f9190810190611b7f565b93509350935093508b88868151811061065a5761065a611b69565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061068c5761068c611b69565b905060200201358786815181106106a5576106a5611b69565b6020026020010181815250506040518060c001604052808f8f888181106106ce576106ce611b69565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061072057610720611b69565b602002602001018190525050505050808061073a90611c3a565b915050610574565b5061074e818787610c70565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af79061079c9086908690600401611c53565b600060405180830381600087803b1580156107b657600080fd5b505af11580156107ca573d6000803e3d6000fd5b5050505060005b8881101561083b577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061080c5761080c611b69565b60200260200101516040516108219190611cd7565b60405180910390a18061083381611c3a565b9150506107d1565b5098975050505050505050565b600054610100900460ff166108635760005460ff1615610867565b303b155b6108ca5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102ad565b600054610100900460ff161580156108ec576000805461ffff19166101011790555b6108f582610b61565b6108fe83610adf565b8015610910576000805461ff00191690555b505050565b6060610922848484610c89565b600061092f858585610333565b905061093c858585610cd1565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906109889084906004016117d9565b600060405180830381600087803b1580156109a257600080fd5b505af11580156109b6573d6000803e3d6000fd5b5050505060005b8151811015610a28577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc8282815181106109f9576109f9611b69565b6020026020010151604051610a0e9190611cd7565b60405180910390a180610a2081611c3a565b9150506109bd565b50949350505050565b6000546001600160a01b0362010000909104163314610a625760405162461bcd60e51b81526004016102ad90611966565b6001600160a01b038116610ac75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ad565b6102bf81610b61565b6001600160a01b03163b151590565b610aec6001826002611463565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df81604051610b1c919061163f565b60405180910390a150565b610b2f6113f7565b60408051808201918290529060019060029082845b815481526020019060010190808311610b44575050505050905090565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b610bf36040805160808101825260008082526020808301829052828401829052835180850190945281845283015290606082015290565b60008260000151600081518110610c0c57610c0c611b69565b60200260200101519050610c1f81610d3a565b60008160400151806020019051810190610c399190611cfa565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610c9782840184611dc4565b90506000610ca482610d7e565b90506000610cb4610343876119c2565b9050610cc08183610e1a565b610cc98361105d565b505050505050565b6000610cdd83836111f6565b6000818152600360205260409020549091506001600160a01b03168015610d1a57604051631f5d53e360e01b8152600481018390526024016102ad565b610d3382610d2e6040880160208901611949565b61121b565b5050505050565b6000610d498260400151611281565b82519091508114610d7a5781516040516337e3d1ab60e01b81526102ad918391600401918252602082015260400190565b5050565b610d866114a6565b604051806101000160405280610d9b846112b6565b6001600160a01b03168152602001610db2846112cb565b8152602001610dc0846112da565b8152602001610dce846112e9565b8152602001610ddc846112f8565b8152602001610dea84611307565b8152602001610e028460200151610100015160011490565b15158152602001610e1284611316565b905292915050565b8151604082015114610e4f57815160408281015190516347a9715d60e01b8152600481019290925260248201526044016102ad565b81606001516020015115158160c00151151503610e985760608201516020015160c0820151604051634629f1b560e11b81529115156004830152151560248201526044016102ad565b81604001516001600160a01b031681600001516001600160a01b031614610eec57604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016102ad565b60408201516001600160a01b03163314610f30576040808301519051632bfa317f60e11b81523360048201526001600160a01b0390911660248201526044016102ad565b46816020015114610f63576020810151604051630432cec160e31b815246600482015260248101919091526044016102ad565b81602001518160a0015114610f9e57602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016102ad565b6000610fa8610b27565b805160e084015151919250141580610fcd575060208082015160e08401519091015114155b1561101657805160208083015160e0850151805192015160405163f71cb0f760e01b815260048101949094526024840191909152604483019190915260648201526084016102ad565b60006110218461136e565b9050808360600151146110575760608301516040516377bb6d2760e11b81526102ad918391600401918252602082015260400190565b50505050565b8051805160208083015160409384015191850151935163c542c93b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463c542c93b946110c094909392909190600401611e95565b602060405180830381865afa9250505080156110f9575060408051601f3d908101601f191682019092526110f691810190611f3c565b60015b6111cf57611105611f57565b806308c379a00361113e5750611119611f73565b80611124575061117d565b8060405162dd577760e81b81526004016102ad9190611ffc565b634e487b710361117d5761115061200f565b9061115b575061117d565b60405162dd577760e81b815260206004820152600060248201526044016102ad565b3d8080156111a7576040519150601f19603f3d011682016040523d82523d6000602084013e6111ac565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016102ad565b80610d7a5760405162dd577760e81b815260206004820152600060248201526044016102ad565b60008061120583850185611dc4565b90506000611212826112f8565b95945050505050565b60008281526003602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b805160208201206000906102f0907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019061202f565b6020810151600090815b602002015192915050565b602081015160009060016112c0565b602081015160009060046112c0565b602081015160009060056112c0565b602081015160009060066112c0565b602081015160009060076112c0565b61131e6113f7565b6040518060400160405280836020015160026009811061134057611340611b69565b60200201518152602001836020015160036009811061136157611361611b69565b6020020151905292915050565b60008061138c308460600151600001516001600160801b0316611393565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c61138c919061202f565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b8260028101928215611491579160200282015b82811115611491578251825591602001919060010190611476565b5061149d9291506114f6565b5090565b905290565b60405180610100016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016114a16113f7565b5b8082111561149d57600081556001016114f7565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b03821117156115405761154061150b565b60405250565b606081018181106001600160401b03821117156115405761154061150b565b601f8201601f191681016001600160401b038111828210171561158a5761158a61150b565b6040525050565b600082601f8301126115a257600080fd5b604051604081018181106001600160401b03821117156115c4576115c461150b565b80604052508060408401858111156115db57600080fd5b845b818110156115f55780358352602092830192016115dd565b509195945050505050565b60006040828403121561161257600080fd5b61138c8383611591565b8060005b6002811015611057578151845260209384019390910190600101611620565b604081016102f0828461161c565b60006020828403121561165f57600080fd5b5035919050565b60008083601f84011261167857600080fd5b5081356001600160401b0381111561168f57600080fd5b6020830191508360208285010111156116a757600080fd5b9250929050565b6000806000604084860312156116c357600080fd5b83356001600160401b03808211156116da57600080fd5b90850190604082880312156116ee57600080fd5b9093506020850135908082111561170457600080fd5b5061171186828701611666565b9497909650939450505050565b60005b83811015611739578181015183820152602001611721565b838111156110575750506000910152565b6000815180845261176281602086016020860161171e565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a08501526117d160c085018261174a565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561182e57603f1988860301845261181c858351611776565b94509285019290850190600101611800565b5092979650505050505050565b6001600160a01b03811681146102bf57600080fd5b803561185b8161183b565b919050565b60008060008060006060868803121561187857600080fd5b85356001600160401b038082111561188f57600080fd5b818801915088601f8301126118a357600080fd5b8135818111156118b257600080fd5b8960208260051b85010111156118c757600080fd5b602083019750809650506118dd60208901611850565b945060408801359150808211156118f357600080fd5b5061190088828901611666565b969995985093965092949392505050565b6000806060838503121561192457600080fd5b61192e8484611591565b9150604083013561193e8161183b565b809150509250929050565b60006020828403121561195b57600080fd5b813561138c8161183b565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006001600160401b038211156119b4576119b461150b565b50601f01601f191660200190565b600060408083360312156119d557600080fd5b80516119e081611521565b83356001600160401b03808211156119f757600080fd5b9085019036601f830112611a0a57600080fd5b8135602082821115611a1e57611a1e61150b565b8160051b8651611a3083830182611565565b92835284810182019282810136851115611a4957600080fd5b83870192505b84831015611b1d57823586811115611a675760008081fd5b8701606036829003601f1901811315611a805760008081fd5b8a51611a8b81611546565b8287013581528b83013581880152908201359088821115611aac5760008081fd5b9181019136603f840112611ac257600091508182fd5b868301359150611ad18261199b565b8c51611add8282611565565b838152368e858701011115611af457600091508182fd5b838e86018a830137600093810189019390935250808c0191909152825250918301918301611a4f565b50865250611b2c888201611850565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611b6457611b64611b3b565b500190565b634e487b7160e01b600052603260045260246000fd5b60008060008060808587031215611b9557600080fd5b8451611ba08161183b565b60208601516040870151919550935063ffffffff81168114611bc157600080fd5b60608601519092506001600160401b03811115611bdd57600080fd5b8501601f81018713611bee57600080fd5b8051611bf98161199b565b604051611c068282611565565b828152896020848601011115611c1b57600080fd5b611c2c83602083016020870161171e565b969995985093965050505050565b600060018201611c4c57611c4c611b3b565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015611c955781516001600160a01b031684529284019290840190600101611c70565b5050508381038285015284518082528583019183019060005b81811015611cca57835183529284019291840191600101611cae565b5090979650505050505050565b60208152600061138c6020830184611776565b8051801515811461185b57600080fd5b600060408284031215611d0c57600080fd5b604051604081018181106001600160401b0382111715611d2e57611d2e61150b565b60405282516001600160801b0381168114611d4857600080fd5b8152611d5660208401611cea565b60208201529392505050565b600082601f830112611d7357600080fd5b6040516101208082018281106001600160401b0382111715611d9757611d9761150b565b60405283018185821115611daa57600080fd5b845b828110156115f5578035825260209182019101611dac565b6000818303610220811215611dd857600080fd5b60408051611de581611521565b61010080841215611df557600080fd5b82519350611e0284611546565b611e0c8787611591565b845286605f870112611e1d57600080fd5b8251611e2881611521565b8060c0880189811115611e3a57600080fd5b8589015b81811015611e5f57611e508b82611591565b83526020909201918601611e3e565b50826020880152611e708a82611591565b86880152505050838252611e8687828801611d62565b60208301525095945050505050565b6102208101611ea4828761161c565b60408083018660005b6002808210611ebc5750611ef7565b82518460005b83811015611ee0578251825260209283019290910190600101611ec2565b505050928401925060209190910190600101611ead565b50505050611f0860c083018561161c565b61010082018360005b6009811015611f30578151835260209283019290910190600101611f11565b50505095945050505050565b600060208284031215611f4e57600080fd5b61138c82611cea565b600060033d1115611f705760046000803e5060005160e01c5b90565b600060443d1015611f815790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715611fb057505050505090565b8285019150815181811115611fc85750505050505090565b843d8701016020828501011115611fe25750505050505090565b611ff160208286010187611565565b509095945050505050565b60208152600061138c602083018461174a565b60008060233d111561202b576020600460003e50506000516001905b9091565b60008261204c57634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220202c7874d91a345d5d1d262476c8976188ed40687e181d4b647f63471e63576b64736f6c634300080e0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063c776adde11610066578063c776adde14610230578063c9cdef0414610243578063e60f999f14610256578063f2fde38b1461026957600080fd5b80638da5cb5b146101d3578063af411a30146101ea578063bfa665851461020a57600080fd5b806354846d7a116100c857806354846d7a1461015c57806363e4afc2146101915780637000b051146101a4578063715018a6146101cb57600080fd5b8063124d7199146100ef5780632785e3221461010457806346657fe914610122575b600080fd5b6101026100fd366004611600565b61027c565b005b61010c6102c2565b604051610119919061163f565b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610119565b6101837f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610119565b61014461019f36600461164d565b6102d7565b6101837f000000000000000000000000000000000000000000000000000000000000000081565b6101026102f6565b6000546201000090046001600160a01b0316610144565b6101fd6101f83660046116ae565b610333565b60405161011991906117d9565b7f0000000000000000000000000000000000000000000000000000000000000000610144565b6101fd61023e366004611860565b61048d565b610102610251366004611911565b610848565b6101fd6102643660046116ae565b610915565b610102610277366004611949565b610a31565b6000546001600160a01b03620100009091041633146102b65760405162461bcd60e51b81526004016102ad90611966565b60405180910390fd5b6102bf81610adf565b50565b6102ca6113f7565b6102d2610b27565b905090565b6000818152600360205260408120546001600160a01b03165b92915050565b6000546001600160a01b03620100009091041633146103275760405162461bcd60e51b81526004016102ad90611966565b6103316000610b61565b565b60606000610348610343866119c2565b610bbc565b60408051600180825281830190925291925060009190816020015b61036b611415565b8152602001906001900390816103635750506060830151519091506000906103bc906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611b51565b90507f000000000000000000000000000000000000000000000000000000000000000081111561040257604051637bbf29e360e01b8152600481018290526024016102ad565b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b03168152602001856020015181526020014263ffffffff168152602001604051806020016040528060008152508152508360008151811061047657610476611b69565b602090810291909101015250909695505050505050565b60606000856001600160401b038111156104a9576104a961150b565b6040519080825280602002602001820160405280156104d2578160200160208202803683370190505b5090506000866001600160401b038111156104ef576104ef61150b565b604051908082528060200260200182016040528015610518578160200160208202803683370190505b5090506000876001600160401b038111156105355761053561150b565b60405190808252806020026020018201604052801561056e57816020015b61055b611415565b8152602001906001900390816105535790505b50905060005b88811015610742576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f888181106105c3576105c3611b69565b905060200201358e6040518363ffffffff1660e01b81526004016105fa9291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610617573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261063f9190810190611b7f565b93509350935093508b88868151811061065a5761065a611b69565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061068c5761068c611b69565b905060200201358786815181106106a5576106a5611b69565b6020026020010181815250506040518060c001604052808f8f888181106106ce576106ce611b69565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061072057610720611b69565b602002602001018190525050505050808061073a90611c3a565b915050610574565b5061074e818787610c70565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af79061079c9086908690600401611c53565b600060405180830381600087803b1580156107b657600080fd5b505af11580156107ca573d6000803e3d6000fd5b5050505060005b8881101561083b577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061080c5761080c611b69565b60200260200101516040516108219190611cd7565b60405180910390a18061083381611c3a565b9150506107d1565b5098975050505050505050565b600054610100900460ff166108635760005460ff1615610867565b303b155b6108ca5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102ad565b600054610100900460ff161580156108ec576000805461ffff19166101011790555b6108f582610b61565b6108fe83610adf565b8015610910576000805461ff00191690555b505050565b6060610922848484610c89565b600061092f858585610333565b905061093c858585610cd1565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906109889084906004016117d9565b600060405180830381600087803b1580156109a257600080fd5b505af11580156109b6573d6000803e3d6000fd5b5050505060005b8151811015610a28577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc8282815181106109f9576109f9611b69565b6020026020010151604051610a0e9190611cd7565b60405180910390a180610a2081611c3a565b9150506109bd565b50949350505050565b6000546001600160a01b0362010000909104163314610a625760405162461bcd60e51b81526004016102ad90611966565b6001600160a01b038116610ac75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ad565b6102bf81610b61565b6001600160a01b03163b151590565b610aec6001826002611463565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df81604051610b1c919061163f565b60405180910390a150565b610b2f6113f7565b60408051808201918290529060019060029082845b815481526020019060010190808311610b44575050505050905090565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b610bf36040805160808101825260008082526020808301829052828401829052835180850190945281845283015290606082015290565b60008260000151600081518110610c0c57610c0c611b69565b60200260200101519050610c1f81610d3a565b60008160400151806020019051810190610c399190611cfa565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610c9782840184611dc4565b90506000610ca482610d7e565b90506000610cb4610343876119c2565b9050610cc08183610e1a565b610cc98361105d565b505050505050565b6000610cdd83836111f6565b6000818152600360205260409020549091506001600160a01b03168015610d1a57604051631f5d53e360e01b8152600481018390526024016102ad565b610d3382610d2e6040880160208901611949565b61121b565b5050505050565b6000610d498260400151611281565b82519091508114610d7a5781516040516337e3d1ab60e01b81526102ad918391600401918252602082015260400190565b5050565b610d866114a6565b604051806101000160405280610d9b846112b6565b6001600160a01b03168152602001610db2846112cb565b8152602001610dc0846112da565b8152602001610dce846112e9565b8152602001610ddc846112f8565b8152602001610dea84611307565b8152602001610e028460200151610100015160011490565b15158152602001610e1284611316565b905292915050565b8151604082015114610e4f57815160408281015190516347a9715d60e01b8152600481019290925260248201526044016102ad565b81606001516020015115158160c00151151503610e985760608201516020015160c0820151604051634629f1b560e11b81529115156004830152151560248201526044016102ad565b81604001516001600160a01b031681600001516001600160a01b031614610eec57604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016102ad565b60408201516001600160a01b03163314610f30576040808301519051632bfa317f60e11b81523360048201526001600160a01b0390911660248201526044016102ad565b46816020015114610f63576020810151604051630432cec160e31b815246600482015260248101919091526044016102ad565b81602001518160a0015114610f9e57602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016102ad565b6000610fa8610b27565b805160e084015151919250141580610fcd575060208082015160e08401519091015114155b1561101657805160208083015160e0850151805192015160405163f71cb0f760e01b815260048101949094526024840191909152604483019190915260648201526084016102ad565b60006110218461136e565b9050808360600151146110575760608301516040516377bb6d2760e11b81526102ad918391600401918252602082015260400190565b50505050565b8051805160208083015160409384015191850151935163c542c93b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463c542c93b946110c094909392909190600401611e95565b602060405180830381865afa9250505080156110f9575060408051601f3d908101601f191682019092526110f691810190611f3c565b60015b6111cf57611105611f57565b806308c379a00361113e5750611119611f73565b80611124575061117d565b8060405162dd577760e81b81526004016102ad9190611ffc565b634e487b710361117d5761115061200f565b9061115b575061117d565b60405162dd577760e81b815260206004820152600060248201526044016102ad565b3d8080156111a7576040519150601f19603f3d011682016040523d82523d6000602084013e6111ac565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016102ad565b80610d7a5760405162dd577760e81b815260206004820152600060248201526044016102ad565b60008061120583850185611dc4565b90506000611212826112f8565b95945050505050565b60008281526003602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b805160208201206000906102f0907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019061202f565b6020810151600090815b602002015192915050565b602081015160009060016112c0565b602081015160009060046112c0565b602081015160009060056112c0565b602081015160009060066112c0565b602081015160009060076112c0565b61131e6113f7565b6040518060400160405280836020015160026009811061134057611340611b69565b60200201518152602001836020015160036009811061136157611361611b69565b6020020151905292915050565b60008061138c308460600151600001516001600160801b0316611393565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c61138c919061202f565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b8260028101928215611491579160200282015b82811115611491578251825591602001919060010190611476565b5061149d9291506114f6565b5090565b905290565b60405180610100016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016114a16113f7565b5b8082111561149d57600081556001016114f7565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b03821117156115405761154061150b565b60405250565b606081018181106001600160401b03821117156115405761154061150b565b601f8201601f191681016001600160401b038111828210171561158a5761158a61150b565b6040525050565b600082601f8301126115a257600080fd5b604051604081018181106001600160401b03821117156115c4576115c461150b565b80604052508060408401858111156115db57600080fd5b845b818110156115f55780358352602092830192016115dd565b509195945050505050565b60006040828403121561161257600080fd5b61138c8383611591565b8060005b6002811015611057578151845260209384019390910190600101611620565b604081016102f0828461161c565b60006020828403121561165f57600080fd5b5035919050565b60008083601f84011261167857600080fd5b5081356001600160401b0381111561168f57600080fd5b6020830191508360208285010111156116a757600080fd5b9250929050565b6000806000604084860312156116c357600080fd5b83356001600160401b03808211156116da57600080fd5b90850190604082880312156116ee57600080fd5b9093506020850135908082111561170457600080fd5b5061171186828701611666565b9497909650939450505050565b60005b83811015611739578181015183820152602001611721565b838111156110575750506000910152565b6000815180845261176281602086016020860161171e565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a08501526117d160c085018261174a565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561182e57603f1988860301845261181c858351611776565b94509285019290850190600101611800565b5092979650505050505050565b6001600160a01b03811681146102bf57600080fd5b803561185b8161183b565b919050565b60008060008060006060868803121561187857600080fd5b85356001600160401b038082111561188f57600080fd5b818801915088601f8301126118a357600080fd5b8135818111156118b257600080fd5b8960208260051b85010111156118c757600080fd5b602083019750809650506118dd60208901611850565b945060408801359150808211156118f357600080fd5b5061190088828901611666565b969995985093965092949392505050565b6000806060838503121561192457600080fd5b61192e8484611591565b9150604083013561193e8161183b565b809150509250929050565b60006020828403121561195b57600080fd5b813561138c8161183b565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006001600160401b038211156119b4576119b461150b565b50601f01601f191660200190565b600060408083360312156119d557600080fd5b80516119e081611521565b83356001600160401b03808211156119f757600080fd5b9085019036601f830112611a0a57600080fd5b8135602082821115611a1e57611a1e61150b565b8160051b8651611a3083830182611565565b92835284810182019282810136851115611a4957600080fd5b83870192505b84831015611b1d57823586811115611a675760008081fd5b8701606036829003601f1901811315611a805760008081fd5b8a51611a8b81611546565b8287013581528b83013581880152908201359088821115611aac5760008081fd5b9181019136603f840112611ac257600091508182fd5b868301359150611ad18261199b565b8c51611add8282611565565b838152368e858701011115611af457600091508182fd5b838e86018a830137600093810189019390935250808c0191909152825250918301918301611a4f565b50865250611b2c888201611850565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611b6457611b64611b3b565b500190565b634e487b7160e01b600052603260045260246000fd5b60008060008060808587031215611b9557600080fd5b8451611ba08161183b565b60208601516040870151919550935063ffffffff81168114611bc157600080fd5b60608601519092506001600160401b03811115611bdd57600080fd5b8501601f81018713611bee57600080fd5b8051611bf98161199b565b604051611c068282611565565b828152896020848601011115611c1b57600080fd5b611c2c83602083016020870161171e565b969995985093965050505050565b600060018201611c4c57611c4c611b3b565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015611c955781516001600160a01b031684529284019290840190600101611c70565b5050508381038285015284518082528583019183019060005b81811015611cca57835183529284019291840191600101611cae565b5090979650505050505050565b60208152600061138c6020830184611776565b8051801515811461185b57600080fd5b600060408284031215611d0c57600080fd5b604051604081018181106001600160401b0382111715611d2e57611d2e61150b565b60405282516001600160801b0381168114611d4857600080fd5b8152611d5660208401611cea565b60208201529392505050565b600082601f830112611d7357600080fd5b6040516101208082018281106001600160401b0382111715611d9757611d9761150b565b60405283018185821115611daa57600080fd5b845b828110156115f5578035825260209182019101611dac565b6000818303610220811215611dd857600080fd5b60408051611de581611521565b61010080841215611df557600080fd5b82519350611e0284611546565b611e0c8787611591565b845286605f870112611e1d57600080fd5b8251611e2881611521565b8060c0880189811115611e3a57600080fd5b8589015b81811015611e5f57611e508b82611591565b83526020909201918601611e3e565b50826020880152611e708a82611591565b86880152505050838252611e8687828801611d62565b60208301525095945050505050565b6102208101611ea4828761161c565b60408083018660005b6002808210611ebc5750611ef7565b82518460005b83811015611ee0578251825260209283019290910190600101611ec2565b505050928401925060209190910190600101611ead565b50505050611f0860c083018561161c565b61010082018360005b6009811015611f30578151835260209283019290910190600101611f11565b50505095945050505050565b600060208284031215611f4e57600080fd5b61138c82611cea565b600060033d1115611f705760046000803e5060005160e01c5b90565b600060443d1015611f815790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715611fb057505050505090565b8285019150815181811115611fc85750505050505090565b843d8701016020828501011115611fe25750505050505090565b611ff160208286010187611565565b509095945050505050565b60208152600061138c602083018461174a565b60008060233d111561202b576020600460003e50506000516001905b9091565b60008261204c57634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220202c7874d91a345d5d1d262476c8976188ed40687e181d4b647f63471e63576b64736f6c634300080e0033", + "numDeployments": 3, + "solcInputHash": "6edb98fea2bf424a369954d0e80655f6", + "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\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\":[],\"name\":\"IMPLEMENTATION_VERSION\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"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\":\"ownerAddress\",\"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\",\"ownerAddress\":\"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\":{\"initialize(uint256[2],address)\":{\"notice\":\"The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\"}},\"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 (last updated v4.7.0) (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 Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\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 the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\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\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xcee5467d5d873fb75dae6f98c01a8d25dd609f9d0374c7d39217bd5f9539a2d6\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, \\\"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 (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or 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 _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\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 /// @solidity memory-safe-assembly\\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\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"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 uint8 public constant IMPLEMENTATION_VERSION = 3;\\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 ownerAddress Owner of the contract, can update public key and address\\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\n */\\n function initialize(\\n uint256[2] memory commitmentSignerPubKey,\\n address ownerAddress\\n ) public reinitializer(IMPLEMENTATION_VERSION) {\\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\\n if (owner() == address(0) || address(this).code.length == 0) {\\n _transferOwnership(ownerAddress);\\n _updateCommitmentSignerPubKey(commitmentSignerPubKey);\\n }\\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(\\n Request calldata request,\\n bytes calldata proofData\\n ) internal virtual override {\\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(\\n Request calldata request,\\n bytes calldata\\n ) public view virtual override(IAttester, Attester) returns (Attestation[] memory) {\\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(\\n Request calldata request,\\n bytes calldata proofData\\n ) internal virtual override {\\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(\\n Pythia1Claim memory claim\\n ) internal view override returns (uint256) {\\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(\\n uint256[2] memory commitmentSignerPubKey\\n ) external onlyOwner {\\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\":\"0x22a505a2f8a3246ad46cf6fdd5eeab1a58b7fcb08982d03ff742f48aec063b82\",\"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(\\n Pythia1Claim memory claim\\n ) internal view virtual 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(\\n Pythia1Claim memory claim,\\n Pythia1ProofInput memory input\\n ) internal view virtual {\\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(uint256 /*errorCode*/) {\\n revert InvalidGroth16Proof('');\\n } catch (bytes memory /*lowLevelData*/) {\\n revert InvalidGroth16Proof('');\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc15ec9f4ae345d96e52465049836e9294a37a45a4c219211264b1d7d15779285\",\"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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\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\":\"0xa727568cccc2689a13e843d64003ffd6868537c73220e1dc94b86827c8e445d4\",\"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(\\n Pythia1ProofData memory self\\n )\\n internal\\n pure\\n returns (uint256[2] memory, uint256[2][2] memory, uint256[2] memory, uint256[9] memory)\\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(\\n Pythia1ProofData memory self\\n ) internal pure returns (uint256[2] memory) {\\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(\\n Pythia1ProofData memory self\\n ) internal pure returns (uint256) {\\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(\\n uint128 internalCollectionId,\\n bool isScore\\n ) internal pure returns (uint256) {\\n return\\n _generateGroupIdFromEncodedProperties(_encodeGroupProperties(internalCollectionId, isScore));\\n }\\n\\n function _generateGroupIdFromEncodedProperties(\\n bytes memory encodedProperties\\n ) internal pure returns (uint256) {\\n return uint256(keccak256(encodedProperties)) % Pythia1Lib.SNARK_FIELD;\\n }\\n\\n function _encodeGroupProperties(\\n uint128 internalCollectionId,\\n bool isScore\\n ) internal pure returns (bytes memory) {\\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\":\"0x9f50e72124764619442a1d9ad876661b56bc0abb330bc2ffe7536a1c65eb0d0e\",\"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(\\n Request calldata request,\\n bytes calldata proofData\\n ) external override returns (Attestation[] memory) {\\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 address[] memory attestationOwners = new address[](collectionIds.length);\\n\\n uint256[] memory attestationCollectionIds = new uint256[](collectionIds.length);\\n\\n Attestation[] memory attestations = new Attestation[](collectionIds.length);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n // fetch attestations from the registry\\n (\\n address issuer,\\n uint256 attestationValue,\\n uint32 timestamp,\\n bytes memory extraData\\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\\n\\n attestationOwners[i] = attestationsOwner;\\n attestationCollectionIds[i] = collectionIds[i];\\n\\n attestations[i] = (\\n Attestation(\\n collectionIds[i],\\n attestationsOwner,\\n issuer,\\n attestationValue,\\n timestamp,\\n extraData\\n )\\n );\\n }\\n\\n _verifyAttestationsDeletionRequest(attestations, proofData);\\n\\n _beforeDeleteAttestations(attestations, proofData);\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\\n\\n _afterDeleteAttestations(attestations, proofData);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n emit AttestationDeleted(attestations[i]);\\n }\\n return attestations;\\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(\\n Request calldata request,\\n bytes calldata proofData\\n ) public view virtual 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(\\n Request calldata request,\\n bytes calldata proofData\\n ) internal virtual {}\\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(\\n Attestation[] memory attestations,\\n bytes calldata proofData\\n ) internal virtual {}\\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(\\n Attestation[] memory attestations,\\n bytes calldata proofData\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x7743f02ed07e1b40a2ff45f5a45b5fe87d765326cce3528676cbd36c3d08ba37\",\"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';\\nimport {IAttestationsRegistryConfigLogic} from './IAttestationsRegistryConfigLogic.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry is IAttestationsRegistryConfigLogic {\\n error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view returns (address, uint256, uint32, bytes memory);\\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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view 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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0x0c3af349bcfa545c959f4d9f25aacb73e3ef1ca7cfe62a2eda4a743a6835904f\",\"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 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 error AttributeDoesNotExist(uint8 attributeIndex);\\n error AttributeAlreadyExists(uint8 attributeIndex);\\n error ArgsLengthDoesNotMatch();\\n\\n event NewAttributeCreated(uint8 attributeIndex, bytes32 attributeName);\\n event AttributeNameUpdated(\\n uint8 attributeIndex,\\n bytes32 newAttributeName,\\n bytes32 previousAttributeName\\n );\\n event AttributeDeleted(uint8 attributeIndex, bytes32 deletedAttributeName);\\n\\n event AttestationsCollectionAttributeSet(\\n uint256 collectionId,\\n uint8 attributeIndex,\\n uint8 attributeValue\\n );\\n\\n event IssuerAuthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n event IssuerUnauthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n\\n /**\\n * @dev Returns whether an attestationsCollection has a specific attribute referenced by its index\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute. Can go from 0 to 63.\\n */\\n function attestationsCollectionHasAttribute(\\n uint256 collectionId,\\n uint8 index\\n ) external view returns (bool);\\n\\n function attestationsCollectionHasAttributes(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (bool);\\n\\n /**\\n * @dev Returns the attribute's value (from 1 to 15) of an attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param attributeIndex Index of the attribute. Can go from 0 to 63.\\n */\\n function getAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 attributeIndex\\n ) external view returns (uint8);\\n\\n function getAttributesValuesForAttestationsCollection(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (uint8[] memory);\\n\\n /**\\n * @dev Set a value for an attribute of an attestationsCollection. The attribute should already be created.\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute (must be between 0 and 63)\\n * @param value Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15\\n */\\n function setAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 index,\\n uint8 value\\n ) external;\\n\\n function setAttributesValuesForAttestationsCollections(\\n uint256[] memory collectionIds,\\n uint8[] memory indices,\\n uint8[] memory values\\n ) external;\\n\\n /**\\n * @dev Returns all the enabled attributes names and their values for a specific attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n */\\n function getAttributesNamesAndValuesForAttestationsCollection(\\n uint256 collectionId\\n ) external view returns (bytes32[] memory, uint8[] memory);\\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 /**\\n * @dev Create a new attribute.\\n * @param index Index of the attribute. Can go from 0 to 63.\\n * @param name Name in bytes32 of the attribute\\n */\\n function createNewAttribute(uint8 index, bytes32 name) external;\\n\\n function createNewAttributes(uint8[] memory indices, bytes32[] memory names) external;\\n\\n /**\\n * @dev Update the name of an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n * @param newName new name in bytes32 of the attribute\\n */\\n function updateAttributeName(uint8 index, bytes32 newName) external;\\n\\n function updateAttributesName(uint8[] memory indices, bytes32[] memory names) external;\\n\\n /**\\n * @dev Delete an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n */\\n function deleteAttribute(uint8 index) external;\\n\\n function deleteAttributes(uint8[] memory indices) external;\\n}\\n\",\"keccak256\":\"0x07a1a9e8d2caf1d810ba8fb760a35ce2a0ef60a76814d44881a5aa56162ce26b\",\"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(\\n Request calldata request,\\n bytes calldata proofData\\n ) external 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(\\n Request calldata request,\\n bytes calldata proofData\\n ) external view 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\":\"0x2d5faf5df56dfe1294202e89180846a1d4a5f938699619ee73b60c7314a97dfe\",\"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/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": "0x6101006040523480156200001257600080fd5b50604051620024dd380380620024dd8339810160408190526200003591620002d8565b6001600160a01b03838116608052861660a052620000533362000075565b60c085905260e0849052620000698282620000d0565b505050505050620003d9565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054600390610100900460ff16158015620000f3575060005460ff8083169116105b6200015b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805461ffff191660ff831617610100178155620001886000546201000090046001600160a01b031690565b6001600160a01b031614806200019d5750303b155b15620001b957620001ae8262000075565b620001b983620001ff565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b6200020e60018260026200024b565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df81604051620002409190620003a6565b60405180910390a150565b82600281019282156200027c579160200282015b828111156200027c5782518255916020019190600101906200025f565b506200028a9291506200028e565b5090565b5b808211156200028a57600081556001016200028f565b80516001600160a01b0381168114620002bd57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060e08789031215620002f257600080fd5b620002fd87620002a5565b95506020808801519550604088015194506200031c60608901620002a5565b935088609f8901126200032e57600080fd5b604080519081016001600160401b0381118282101715620003535762000353620002c2565b6040528060c08a018b8111156200036957600080fd5b60808b015b818110156200038757805183529184019184016200036e565b508295506200039681620002a5565b9450505050509295509295509295565b60408101818360005b6002811015620003d0578151835260209283019290910190600101620003af565b50505092915050565b60805160a05160c05160e0516120a06200043d600039600081816101b4015261038a01526000818161016c01526103620152600081816102310152818161055301528181610734015261097801526000818161012f01526110d501526120a06000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063754b377c11610097578063c776adde11610066578063c776adde14610255578063c9cdef0414610268578063e60f999f1461027b578063f2fde38b1461028e57600080fd5b8063754b377c146101de5780638da5cb5b146101f8578063af411a301461020f578063bfa665851461022f57600080fd5b806354846d7a116100d357806354846d7a1461016757806363e4afc21461019c5780637000b051146101af578063715018a6146101d657600080fd5b8063124d7199146100fa5780632785e3221461010f57806346657fe91461012d575b600080fd5b61010d61010836600461164e565b6102a1565b005b6101176102b5565b604051610124919061168d565b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610124565b61018e7f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610124565b61014f6101aa36600461169b565b6102ca565b61018e7f000000000000000000000000000000000000000000000000000000000000000081565b61010d6102e9565b6101e6600381565b60405160ff9091168152602001610124565b6000546201000090046001600160a01b031661014f565b61022261021d3660046116fc565b6102fd565b6040516101249190611827565b7f000000000000000000000000000000000000000000000000000000000000000061014f565b6102226102633660046118ae565b61045c565b61010d61027636600461195f565b610817565b6102226102893660046116fc565b61093a565b61010d61029c366004611997565b610a56565b6102a9610acc565b6102b281610b2d565b50565b6102bd611445565b6102c5610b75565b905090565b6000818152600360205260408120546001600160a01b03165b92915050565b6102f1610acc565b6102fb6000610baf565b565b6060600061031261030d866119db565b610c0a565b60408051600180825281830190925291925060009190816020015b610335611463565b81526020019060019003908161032d575050606083015151909150600090610386906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611b6a565b90507f00000000000000000000000000000000000000000000000000000000000000008111156103d157604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b03168152602001856020015181526020014263ffffffff168152602001604051806020016040528060008152508152508360008151811061044557610445611b82565b602090810291909101015250909695505050505050565b60606000856001600160401b0381111561047857610478611559565b6040519080825280602002602001820160405280156104a1578160200160208202803683370190505b5090506000866001600160401b038111156104be576104be611559565b6040519080825280602002602001820160405280156104e7578160200160208202803683370190505b5090506000876001600160401b0381111561050457610504611559565b60405190808252806020026020018201604052801561053d57816020015b61052a611463565b8152602001906001900390816105225790505b50905060005b88811015610711576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f8881811061059257610592611b82565b905060200201358e6040518363ffffffff1660e01b81526004016105c99291909182526001600160a01b0316602082015260400190565b600060405180830381865afa1580156105e6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261060e9190810190611b98565b93509350935093508b88868151811061062957610629611b82565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061065b5761065b611b82565b9050602002013587868151811061067457610674611b82565b6020026020010181815250506040518060c001604052808f8f8881811061069d5761069d611b82565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff168152602001828152508686815181106106ef576106ef611b82565b602002602001018190525050505050808061070990611c53565b915050610543565b5061071d818787610cbe565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af79061076b9086908690600401611c6c565b600060405180830381600087803b15801561078557600080fd5b505af1158015610799573d6000803e3d6000fd5b5050505060005b8881101561080a577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b8282815181106107db576107db611b82565b60200260200101516040516107f09190611cf0565b60405180910390a18061080281611c53565b9150506107a0565b5098975050505050505050565b600054600390610100900460ff16158015610839575060005460ff8083169116105b61089c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103c8565b6000805461ffff191660ff8316176101001781556108c96000546001600160a01b03620100009091041690565b6001600160a01b031614806108dd5750303b155b156108f4576108eb82610baf565b6108f483610b2d565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b6060610947848484610cd7565b60006109548585856102fd565b9050610961858585610d1f565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906109ad908490600401611827565b600060405180830381600087803b1580156109c757600080fd5b505af11580156109db573d6000803e3d6000fd5b5050505060005b8151811015610a4d577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc828281518110610a1e57610a1e611b82565b6020026020010151604051610a339190611cf0565b60405180910390a180610a4581611c53565b9150506109e2565b50949350505050565b610a5e610acc565b6001600160a01b038116610ac35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103c8565b6102b281610baf565b6000546001600160a01b03620100009091041633146102fb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c8565b610b3a60018260026114b1565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df81604051610b6a919061168d565b60405180910390a150565b610b7d611445565b60408051808201918290529060019060029082845b815481526020019060010190808311610b92575050505050905090565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b610c416040805160808101825260008082526020808301829052828401829052835180850190945281845283015290606082015290565b60008260000151600081518110610c5a57610c5a611b82565b60200260200101519050610c6d81610d88565b60008160400151806020019051810190610c879190611d13565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610ce582840184611ddd565b90506000610cf282610dcc565b90506000610d0261030d876119db565b9050610d0e8183610e68565b610d17836110ab565b505050505050565b6000610d2b8383611244565b6000818152600360205260409020549091506001600160a01b03168015610d6857604051631f5d53e360e01b8152600481018390526024016103c8565b610d8182610d7c6040880160208901611997565b611269565b5050505050565b6000610d9782604001516112cf565b82519091508114610dc85781516040516337e3d1ab60e01b81526103c8918391600401918252602082015260400190565b5050565b610dd46114f4565b604051806101000160405280610de984611304565b6001600160a01b03168152602001610e0084611319565b8152602001610e0e84611328565b8152602001610e1c84611337565b8152602001610e2a84611346565b8152602001610e3884611355565b8152602001610e508460200151610100015160011490565b15158152602001610e6084611364565b905292915050565b8151604082015114610e9d57815160408281015190516347a9715d60e01b8152600481019290925260248201526044016103c8565b81606001516020015115158160c00151151503610ee65760608201516020015160c0820151604051634629f1b560e11b81529115156004830152151560248201526044016103c8565b81604001516001600160a01b031681600001516001600160a01b031614610f3a57604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016103c8565b60408201516001600160a01b03163314610f7e576040808301519051632bfa317f60e11b81523360048201526001600160a01b0390911660248201526044016103c8565b46816020015114610fb1576020810151604051630432cec160e31b815246600482015260248101919091526044016103c8565b81602001518160a0015114610fec57602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016103c8565b6000610ff6610b75565b805160e08401515191925014158061101b575060208082015160e08401519091015114155b1561106457805160208083015160e0850151805192015160405163f71cb0f760e01b815260048101949094526024840191909152604483019190915260648201526084016103c8565b600061106f846113bc565b9050808360600151146110a55760608301516040516377bb6d2760e11b81526103c8918391600401918252602082015260400190565b50505050565b8051805160208083015160409384015191850151935163c542c93b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463c542c93b9461110e94909392909190600401611eae565b602060405180830381865afa925050508015611147575060408051601f3d908101601f1916820190925261114491810190611f55565b60015b61121d57611153611f70565b806308c379a00361118c5750611167611f8c565b8061117257506111cb565b8060405162dd577760e81b81526004016103c89190612015565b634e487b71036111cb5761119e612028565b906111a957506111cb565b60405162dd577760e81b815260206004820152600060248201526044016103c8565b3d8080156111f5576040519150601f19603f3d011682016040523d82523d6000602084013e6111fa565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016103c8565b80610dc85760405162dd577760e81b815260206004820152600060248201526044016103c8565b60008061125383850185611ddd565b9050600061126082611346565b95945050505050565b60008281526003602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b805160208201206000906102e3907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190612048565b6020810151600090815b602002015192915050565b6020810151600090600161130e565b6020810151600090600461130e565b6020810151600090600561130e565b6020810151600090600661130e565b6020810151600090600761130e565b61136c611445565b6040518060400160405280836020015160026009811061138e5761138e611b82565b6020020151815260200183602001516003600981106113af576113af611b82565b6020020151905292915050565b6000806113da308460600151600001516001600160801b03166113e1565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6113da9190612048565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b82600281019282156114df579160200282015b828111156114df5782518255916020019190600101906114c4565b506114eb929150611544565b5090565b905290565b60405180610100016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016114ef611445565b5b808211156114eb5760008155600101611545565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b038211171561158e5761158e611559565b60405250565b606081018181106001600160401b038211171561158e5761158e611559565b601f8201601f191681016001600160401b03811182821017156115d8576115d8611559565b6040525050565b600082601f8301126115f057600080fd5b604051604081018181106001600160401b038211171561161257611612611559565b806040525080604084018581111561162957600080fd5b845b8181101561164357803583526020928301920161162b565b509195945050505050565b60006040828403121561166057600080fd5b6113da83836115df565b8060005b60028110156110a557815184526020938401939091019060010161166e565b604081016102e3828461166a565b6000602082840312156116ad57600080fd5b5035919050565b60008083601f8401126116c657600080fd5b5081356001600160401b038111156116dd57600080fd5b6020830191508360208285010111156116f557600080fd5b9250929050565b60008060006040848603121561171157600080fd5b83356001600160401b038082111561172857600080fd5b908501906040828803121561173c57600080fd5b9093506020850135908082111561175257600080fd5b5061175f868287016116b4565b9497909650939450505050565b60005b8381101561178757818101518382015260200161176f565b838111156110a55750506000910152565b600081518084526117b081602086016020860161176c565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261181f60c0850182611798565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561187c57603f1988860301845261186a8583516117c4565b9450928501929085019060010161184e565b5092979650505050505050565b6001600160a01b03811681146102b257600080fd5b80356118a981611889565b919050565b6000806000806000606086880312156118c657600080fd5b85356001600160401b03808211156118dd57600080fd5b818801915088601f8301126118f157600080fd5b81358181111561190057600080fd5b8960208260051b850101111561191557600080fd5b6020830197508096505061192b6020890161189e565b9450604088013591508082111561194157600080fd5b5061194e888289016116b4565b969995985093965092949392505050565b6000806060838503121561197257600080fd5b61197c84846115df565b9150604083013561198c81611889565b809150509250929050565b6000602082840312156119a957600080fd5b81356113da81611889565b60006001600160401b038211156119cd576119cd611559565b50601f01601f191660200190565b600060408083360312156119ee57600080fd5b80516119f98161156f565b83356001600160401b0380821115611a1057600080fd5b9085019036601f830112611a2357600080fd5b8135602082821115611a3757611a37611559565b8160051b8651611a49838301826115b3565b92835284810182019282810136851115611a6257600080fd5b83870192505b84831015611b3657823586811115611a805760008081fd5b8701606036829003601f1901811315611a995760008081fd5b8a51611aa481611594565b8287013581528b83013581880152908201359088821115611ac55760008081fd5b9181019136603f840112611adb57600091508182fd5b868301359150611aea826119b4565b8c51611af682826115b3565b838152368e858701011115611b0d57600091508182fd5b838e86018a830137600093810189019390935250808c0191909152825250918301918301611a68565b50865250611b4588820161189e565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611b7d57611b7d611b54565b500190565b634e487b7160e01b600052603260045260246000fd5b60008060008060808587031215611bae57600080fd5b8451611bb981611889565b60208601516040870151919550935063ffffffff81168114611bda57600080fd5b60608601519092506001600160401b03811115611bf657600080fd5b8501601f81018713611c0757600080fd5b8051611c12816119b4565b604051611c1f82826115b3565b828152896020848601011115611c3457600080fd5b611c4583602083016020870161176c565b969995985093965050505050565b600060018201611c6557611c65611b54565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015611cae5781516001600160a01b031684529284019290840190600101611c89565b5050508381038285015284518082528583019183019060005b81811015611ce357835183529284019291840191600101611cc7565b5090979650505050505050565b6020815260006113da60208301846117c4565b805180151581146118a957600080fd5b600060408284031215611d2557600080fd5b604051604081018181106001600160401b0382111715611d4757611d47611559565b60405282516001600160801b0381168114611d6157600080fd5b8152611d6f60208401611d03565b60208201529392505050565b600082601f830112611d8c57600080fd5b6040516101208082018281106001600160401b0382111715611db057611db0611559565b60405283018185821115611dc357600080fd5b845b82811015611643578035825260209182019101611dc5565b6000818303610220811215611df157600080fd5b60408051611dfe8161156f565b61010080841215611e0e57600080fd5b82519350611e1b84611594565b611e2587876115df565b845286605f870112611e3657600080fd5b8251611e418161156f565b8060c0880189811115611e5357600080fd5b8589015b81811015611e7857611e698b826115df565b83526020909201918601611e57565b50826020880152611e898a826115df565b86880152505050838252611e9f87828801611d7b565b60208301525095945050505050565b6102208101611ebd828761166a565b60408083018660005b6002808210611ed55750611f10565b82518460005b83811015611ef9578251825260209283019290910190600101611edb565b505050928401925060209190910190600101611ec6565b50505050611f2160c083018561166a565b61010082018360005b6009811015611f49578151835260209283019290910190600101611f2a565b50505095945050505050565b600060208284031215611f6757600080fd5b6113da82611d03565b600060033d1115611f895760046000803e5060005160e01c5b90565b600060443d1015611f9a5790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715611fc957505050505090565b8285019150815181811115611fe15750505050505090565b843d8701016020828501011115611ffb5750505050505090565b61200a602082860101876115b3565b509095945050505050565b6020815260006113da6020830184611798565b60008060233d1115612044576020600460003e50506000516001905b9091565b60008261206557634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220ecfcdd3ed3aafdf6de9cf8f871557ae2657814cf595e7da8c33a09d25121780964736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063754b377c11610097578063c776adde11610066578063c776adde14610255578063c9cdef0414610268578063e60f999f1461027b578063f2fde38b1461028e57600080fd5b8063754b377c146101de5780638da5cb5b146101f8578063af411a301461020f578063bfa665851461022f57600080fd5b806354846d7a116100d357806354846d7a1461016757806363e4afc21461019c5780637000b051146101af578063715018a6146101d657600080fd5b8063124d7199146100fa5780632785e3221461010f57806346657fe91461012d575b600080fd5b61010d61010836600461164e565b6102a1565b005b6101176102b5565b604051610124919061168d565b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610124565b61018e7f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610124565b61014f6101aa36600461169b565b6102ca565b61018e7f000000000000000000000000000000000000000000000000000000000000000081565b61010d6102e9565b6101e6600381565b60405160ff9091168152602001610124565b6000546201000090046001600160a01b031661014f565b61022261021d3660046116fc565b6102fd565b6040516101249190611827565b7f000000000000000000000000000000000000000000000000000000000000000061014f565b6102226102633660046118ae565b61045c565b61010d61027636600461195f565b610817565b6102226102893660046116fc565b61093a565b61010d61029c366004611997565b610a56565b6102a9610acc565b6102b281610b2d565b50565b6102bd611445565b6102c5610b75565b905090565b6000818152600360205260408120546001600160a01b03165b92915050565b6102f1610acc565b6102fb6000610baf565b565b6060600061031261030d866119db565b610c0a565b60408051600180825281830190925291925060009190816020015b610335611463565b81526020019060019003908161032d575050606083015151909150600090610386906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611b6a565b90507f00000000000000000000000000000000000000000000000000000000000000008111156103d157604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b03168152602001856020015181526020014263ffffffff168152602001604051806020016040528060008152508152508360008151811061044557610445611b82565b602090810291909101015250909695505050505050565b60606000856001600160401b0381111561047857610478611559565b6040519080825280602002602001820160405280156104a1578160200160208202803683370190505b5090506000866001600160401b038111156104be576104be611559565b6040519080825280602002602001820160405280156104e7578160200160208202803683370190505b5090506000876001600160401b0381111561050457610504611559565b60405190808252806020026020018201604052801561053d57816020015b61052a611463565b8152602001906001900390816105225790505b50905060005b88811015610711576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f8881811061059257610592611b82565b905060200201358e6040518363ffffffff1660e01b81526004016105c99291909182526001600160a01b0316602082015260400190565b600060405180830381865afa1580156105e6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261060e9190810190611b98565b93509350935093508b88868151811061062957610629611b82565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061065b5761065b611b82565b9050602002013587868151811061067457610674611b82565b6020026020010181815250506040518060c001604052808f8f8881811061069d5761069d611b82565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff168152602001828152508686815181106106ef576106ef611b82565b602002602001018190525050505050808061070990611c53565b915050610543565b5061071d818787610cbe565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af79061076b9086908690600401611c6c565b600060405180830381600087803b15801561078557600080fd5b505af1158015610799573d6000803e3d6000fd5b5050505060005b8881101561080a577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b8282815181106107db576107db611b82565b60200260200101516040516107f09190611cf0565b60405180910390a18061080281611c53565b9150506107a0565b5098975050505050505050565b600054600390610100900460ff16158015610839575060005460ff8083169116105b61089c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103c8565b6000805461ffff191660ff8316176101001781556108c96000546001600160a01b03620100009091041690565b6001600160a01b031614806108dd5750303b155b156108f4576108eb82610baf565b6108f483610b2d565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b6060610947848484610cd7565b60006109548585856102fd565b9050610961858585610d1f565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906109ad908490600401611827565b600060405180830381600087803b1580156109c757600080fd5b505af11580156109db573d6000803e3d6000fd5b5050505060005b8151811015610a4d577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc828281518110610a1e57610a1e611b82565b6020026020010151604051610a339190611cf0565b60405180910390a180610a4581611c53565b9150506109e2565b50949350505050565b610a5e610acc565b6001600160a01b038116610ac35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103c8565b6102b281610baf565b6000546001600160a01b03620100009091041633146102fb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c8565b610b3a60018260026114b1565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df81604051610b6a919061168d565b60405180910390a150565b610b7d611445565b60408051808201918290529060019060029082845b815481526020019060010190808311610b92575050505050905090565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b610c416040805160808101825260008082526020808301829052828401829052835180850190945281845283015290606082015290565b60008260000151600081518110610c5a57610c5a611b82565b60200260200101519050610c6d81610d88565b60008160400151806020019051810190610c879190611d13565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610ce582840184611ddd565b90506000610cf282610dcc565b90506000610d0261030d876119db565b9050610d0e8183610e68565b610d17836110ab565b505050505050565b6000610d2b8383611244565b6000818152600360205260409020549091506001600160a01b03168015610d6857604051631f5d53e360e01b8152600481018390526024016103c8565b610d8182610d7c6040880160208901611997565b611269565b5050505050565b6000610d9782604001516112cf565b82519091508114610dc85781516040516337e3d1ab60e01b81526103c8918391600401918252602082015260400190565b5050565b610dd46114f4565b604051806101000160405280610de984611304565b6001600160a01b03168152602001610e0084611319565b8152602001610e0e84611328565b8152602001610e1c84611337565b8152602001610e2a84611346565b8152602001610e3884611355565b8152602001610e508460200151610100015160011490565b15158152602001610e6084611364565b905292915050565b8151604082015114610e9d57815160408281015190516347a9715d60e01b8152600481019290925260248201526044016103c8565b81606001516020015115158160c00151151503610ee65760608201516020015160c0820151604051634629f1b560e11b81529115156004830152151560248201526044016103c8565b81604001516001600160a01b031681600001516001600160a01b031614610f3a57604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016103c8565b60408201516001600160a01b03163314610f7e576040808301519051632bfa317f60e11b81523360048201526001600160a01b0390911660248201526044016103c8565b46816020015114610fb1576020810151604051630432cec160e31b815246600482015260248101919091526044016103c8565b81602001518160a0015114610fec57602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016103c8565b6000610ff6610b75565b805160e08401515191925014158061101b575060208082015160e08401519091015114155b1561106457805160208083015160e0850151805192015160405163f71cb0f760e01b815260048101949094526024840191909152604483019190915260648201526084016103c8565b600061106f846113bc565b9050808360600151146110a55760608301516040516377bb6d2760e11b81526103c8918391600401918252602082015260400190565b50505050565b8051805160208083015160409384015191850151935163c542c93b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463c542c93b9461110e94909392909190600401611eae565b602060405180830381865afa925050508015611147575060408051601f3d908101601f1916820190925261114491810190611f55565b60015b61121d57611153611f70565b806308c379a00361118c5750611167611f8c565b8061117257506111cb565b8060405162dd577760e81b81526004016103c89190612015565b634e487b71036111cb5761119e612028565b906111a957506111cb565b60405162dd577760e81b815260206004820152600060248201526044016103c8565b3d8080156111f5576040519150601f19603f3d011682016040523d82523d6000602084013e6111fa565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016103c8565b80610dc85760405162dd577760e81b815260206004820152600060248201526044016103c8565b60008061125383850185611ddd565b9050600061126082611346565b95945050505050565b60008281526003602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b805160208201206000906102e3907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190612048565b6020810151600090815b602002015192915050565b6020810151600090600161130e565b6020810151600090600461130e565b6020810151600090600561130e565b6020810151600090600661130e565b6020810151600090600761130e565b61136c611445565b6040518060400160405280836020015160026009811061138e5761138e611b82565b6020020151815260200183602001516003600981106113af576113af611b82565b6020020151905292915050565b6000806113da308460600151600001516001600160801b03166113e1565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6113da9190612048565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b82600281019282156114df579160200282015b828111156114df5782518255916020019190600101906114c4565b506114eb929150611544565b5090565b905290565b60405180610100016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016114ef611445565b5b808211156114eb5760008155600101611545565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b038211171561158e5761158e611559565b60405250565b606081018181106001600160401b038211171561158e5761158e611559565b601f8201601f191681016001600160401b03811182821017156115d8576115d8611559565b6040525050565b600082601f8301126115f057600080fd5b604051604081018181106001600160401b038211171561161257611612611559565b806040525080604084018581111561162957600080fd5b845b8181101561164357803583526020928301920161162b565b509195945050505050565b60006040828403121561166057600080fd5b6113da83836115df565b8060005b60028110156110a557815184526020938401939091019060010161166e565b604081016102e3828461166a565b6000602082840312156116ad57600080fd5b5035919050565b60008083601f8401126116c657600080fd5b5081356001600160401b038111156116dd57600080fd5b6020830191508360208285010111156116f557600080fd5b9250929050565b60008060006040848603121561171157600080fd5b83356001600160401b038082111561172857600080fd5b908501906040828803121561173c57600080fd5b9093506020850135908082111561175257600080fd5b5061175f868287016116b4565b9497909650939450505050565b60005b8381101561178757818101518382015260200161176f565b838111156110a55750506000910152565b600081518084526117b081602086016020860161176c565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261181f60c0850182611798565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561187c57603f1988860301845261186a8583516117c4565b9450928501929085019060010161184e565b5092979650505050505050565b6001600160a01b03811681146102b257600080fd5b80356118a981611889565b919050565b6000806000806000606086880312156118c657600080fd5b85356001600160401b03808211156118dd57600080fd5b818801915088601f8301126118f157600080fd5b81358181111561190057600080fd5b8960208260051b850101111561191557600080fd5b6020830197508096505061192b6020890161189e565b9450604088013591508082111561194157600080fd5b5061194e888289016116b4565b969995985093965092949392505050565b6000806060838503121561197257600080fd5b61197c84846115df565b9150604083013561198c81611889565b809150509250929050565b6000602082840312156119a957600080fd5b81356113da81611889565b60006001600160401b038211156119cd576119cd611559565b50601f01601f191660200190565b600060408083360312156119ee57600080fd5b80516119f98161156f565b83356001600160401b0380821115611a1057600080fd5b9085019036601f830112611a2357600080fd5b8135602082821115611a3757611a37611559565b8160051b8651611a49838301826115b3565b92835284810182019282810136851115611a6257600080fd5b83870192505b84831015611b3657823586811115611a805760008081fd5b8701606036829003601f1901811315611a995760008081fd5b8a51611aa481611594565b8287013581528b83013581880152908201359088821115611ac55760008081fd5b9181019136603f840112611adb57600091508182fd5b868301359150611aea826119b4565b8c51611af682826115b3565b838152368e858701011115611b0d57600091508182fd5b838e86018a830137600093810189019390935250808c0191909152825250918301918301611a68565b50865250611b4588820161189e565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611b7d57611b7d611b54565b500190565b634e487b7160e01b600052603260045260246000fd5b60008060008060808587031215611bae57600080fd5b8451611bb981611889565b60208601516040870151919550935063ffffffff81168114611bda57600080fd5b60608601519092506001600160401b03811115611bf657600080fd5b8501601f81018713611c0757600080fd5b8051611c12816119b4565b604051611c1f82826115b3565b828152896020848601011115611c3457600080fd5b611c4583602083016020870161176c565b969995985093965050505050565b600060018201611c6557611c65611b54565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015611cae5781516001600160a01b031684529284019290840190600101611c89565b5050508381038285015284518082528583019183019060005b81811015611ce357835183529284019291840191600101611cc7565b5090979650505050505050565b6020815260006113da60208301846117c4565b805180151581146118a957600080fd5b600060408284031215611d2557600080fd5b604051604081018181106001600160401b0382111715611d4757611d47611559565b60405282516001600160801b0381168114611d6157600080fd5b8152611d6f60208401611d03565b60208201529392505050565b600082601f830112611d8c57600080fd5b6040516101208082018281106001600160401b0382111715611db057611db0611559565b60405283018185821115611dc357600080fd5b845b82811015611643578035825260209182019101611dc5565b6000818303610220811215611df157600080fd5b60408051611dfe8161156f565b61010080841215611e0e57600080fd5b82519350611e1b84611594565b611e2587876115df565b845286605f870112611e3657600080fd5b8251611e418161156f565b8060c0880189811115611e5357600080fd5b8589015b81811015611e7857611e698b826115df565b83526020909201918601611e57565b50826020880152611e898a826115df565b86880152505050838252611e9f87828801611d7b565b60208301525095945050505050565b6102208101611ebd828761166a565b60408083018660005b6002808210611ed55750611f10565b82518460005b83811015611ef9578251825260209283019290910190600101611edb565b505050928401925060209190910190600101611ec6565b50505050611f2160c083018561166a565b61010082018360005b6009811015611f49578151835260209283019290910190600101611f2a565b50505095945050505050565b600060208284031215611f6757600080fd5b6113da82611d03565b600060033d1115611f895760046000803e5060005160e01c5b90565b600060443d1015611f9a5790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715611fc957505050505090565b8285019150815181811115611fe15750505050505090565b843d8701016020828501011115611ffb5750505050505090565b61200a602082860101876115b3565b509095945050505050565b6020815260006113da6020830184611798565b60008060233d1115612044576020600460003e50506000516001905b9091565b60008261206557634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220ecfcdd3ed3aafdf6de9cf8f871557ae2657814cf595e7da8c33a09d25121780964736f6c634300080e0033", "devdoc": { "author": "Sismo", "kind": "dev", @@ -902,7 +940,7 @@ "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" + "ownerAddress": "Owner of the contract, can update public key and address" } }, "owner()": { @@ -928,22 +966,26 @@ }, "userdoc": { "kind": "user", - "methods": {}, + "methods": { + "initialize(uint256[2],address)": { + "notice": "The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization." + } + }, "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, + "astId": 935, "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", "label": "_initialized", "offset": 0, "slot": "0", - "type": "t_bool" + "type": "t_uint8" }, { - "astId": 939, + "astId": 938, "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", "label": "_initializing", "offset": 1, @@ -951,7 +993,7 @@ "type": "t_bool" }, { - "astId": 389, + "astId": 396, "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", "label": "_owner", "offset": 2, @@ -959,7 +1001,7 @@ "type": "t_address" }, { - "astId": 8437, + "astId": 9697, "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", "label": "_commitmentSignerPubKey", "offset": 0, @@ -967,7 +1009,7 @@ "type": "t_array(t_uint256)2_storage" }, { - "astId": 8441, + "astId": 9701, "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", "label": "_ticketsDestinations", "offset": 0, @@ -1003,6 +1045,11 @@ "encoding": "inplace", "label": "uint256", "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" } } } diff --git a/deployments/mumbai/Pythia1SimpleAttesterImplem.json b/deployments/mumbai/Pythia1SimpleAttesterImplem.json index 183b6be..9b83bff 100644 --- a/deployments/mumbai/Pythia1SimpleAttesterImplem.json +++ b/deployments/mumbai/Pythia1SimpleAttesterImplem.json @@ -1,5 +1,5 @@ { - "address": "0x7D4358593d1F3e8202d7d3a7f3Fa9e97a61b464E", + "address": "0x5CE8544C05F6Ed9Dc626071505795C3c4E1EB559", "abi": [ { "inputs": [ @@ -332,6 +332,19 @@ "name": "CommitmentSignerPubKeyUpdated", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -396,6 +409,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "IMPLEMENTATION_VERSION", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -694,7 +720,7 @@ }, { "internalType": "address", - "name": "owner", + "name": "ownerAddress", "type": "address" } ], @@ -750,61 +776,73 @@ "type": "function" } ], - "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", + "transactionHash": "0x7757d7b590e85f889004b3d89b9bbe8bfd1795b460382bb17de6ed1dde0088a0", "receipt": { "to": null, "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0x7D4358593d1F3e8202d7d3a7f3Fa9e97a61b464E", - "transactionIndex": 7, - "gasUsed": "1836653", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800010000000000000000000000020000000000000000100008000000040000000000000000000000000000000000000000000000000800001000000000000000100000000000000000000020000000000000000000800000000000000000080000000000000400000000000000000000000200000000000000010000000000000000000008000200000000000000000200000080000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000001020000000000000000000000000000000000000000200000000000020000000100000", - "blockHash": "0x8f8bb6a6cf5de842bd59356d89fa7381911dfb68626902fd5d969d435f9859f5", - "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", + "contractAddress": "0x5CE8544C05F6Ed9Dc626071505795C3c4E1EB559", + "transactionIndex": 23, + "gasUsed": "1945946", + "logsBloom": "0x00000000000000000000000000020000000000000000000000800010000000000000000000000020000000000000000000008000000040000000000000000000000000000000000000000000000000800001000000000000000100000000000000000000020000000000000000000800002000000200000080000000000000400000000000000000008000000000000000000010000080000000000000008000200000000000000000200000800400000000000000000000000000000000004000000000000000000001000000040000000000000000000000100000001020000000000000000000000000000000000000002200000000000020000000100000", + "blockHash": "0xcdd137365ec23546d2267ad15968428470503f9c792d3f666ac25fcb94a9f2f4", + "transactionHash": "0x7757d7b590e85f889004b3d89b9bbe8bfd1795b460382bb17de6ed1dde0088a0", "logs": [ { - "transactionIndex": 7, - "blockNumber": 28600083, - "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", - "address": "0x7D4358593d1F3e8202d7d3a7f3Fa9e97a61b464E", + "transactionIndex": 23, + "blockNumber": 29540709, + "transactionHash": "0x7757d7b590e85f889004b3d89b9bbe8bfd1795b460382bb17de6ed1dde0088a0", + "address": "0x5CE8544C05F6Ed9Dc626071505795C3c4E1EB559", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" ], "data": "0x", - "logIndex": 44, - "blockHash": "0x8f8bb6a6cf5de842bd59356d89fa7381911dfb68626902fd5d969d435f9859f5" + "logIndex": 101, + "blockHash": "0xcdd137365ec23546d2267ad15968428470503f9c792d3f666ac25fcb94a9f2f4" }, { - "transactionIndex": 7, - "blockNumber": 28600083, - "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", - "address": "0x7D4358593d1F3e8202d7d3a7f3Fa9e97a61b464E", + "transactionIndex": 23, + "blockNumber": 29540709, + "transactionHash": "0x7757d7b590e85f889004b3d89b9bbe8bfd1795b460382bb17de6ed1dde0088a0", + "address": "0x5CE8544C05F6Ed9Dc626071505795C3c4E1EB559", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" + "0x0000000000000000000000004e070e9b85a659f0b7b47cde33152ad6c2f63954" ], "data": "0x", - "logIndex": 45, - "blockHash": "0x8f8bb6a6cf5de842bd59356d89fa7381911dfb68626902fd5d969d435f9859f5" + "logIndex": 102, + "blockHash": "0xcdd137365ec23546d2267ad15968428470503f9c792d3f666ac25fcb94a9f2f4" }, { - "transactionIndex": 7, - "blockNumber": 28600083, - "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", - "address": "0x7D4358593d1F3e8202d7d3a7f3Fa9e97a61b464E", + "transactionIndex": 23, + "blockNumber": 29540709, + "transactionHash": "0x7757d7b590e85f889004b3d89b9bbe8bfd1795b460382bb17de6ed1dde0088a0", + "address": "0x5CE8544C05F6Ed9Dc626071505795C3c4E1EB559", "topics": [ "0xda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df" ], "data": "0x038d3d596875c66eb90608bbe04e4e238607fd32ad61f4278bdaf47aadc28d601b46b55a0ce3f35d6025cdd4554aaac1fc7180b14d51b0f15aa51a6929bdb952", - "logIndex": 46, - "blockHash": "0x8f8bb6a6cf5de842bd59356d89fa7381911dfb68626902fd5d969d435f9859f5" + "logIndex": 103, + "blockHash": "0xcdd137365ec23546d2267ad15968428470503f9c792d3f666ac25fcb94a9f2f4" + }, + { + "transactionIndex": 23, + "blockNumber": 29540709, + "transactionHash": "0x7757d7b590e85f889004b3d89b9bbe8bfd1795b460382bb17de6ed1dde0088a0", + "address": "0x5CE8544C05F6Ed9Dc626071505795C3c4E1EB559", + "topics": [ + "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" + ], + "data": "0x0000000000000000000000000000000000000000000000000000000000000003", + "logIndex": 104, + "blockHash": "0xcdd137365ec23546d2267ad15968428470503f9c792d3f666ac25fcb94a9f2f4" }, { - "transactionIndex": 7, - "blockNumber": 28600083, - "transactionHash": "0xe9c716d75242fcf49ecc5a481c8ae56a9cfcc1259dde1d443afad084df1140af", + "transactionIndex": 23, + "blockNumber": 29540709, + "transactionHash": "0x7757d7b590e85f889004b3d89b9bbe8bfd1795b460382bb17de6ed1dde0088a0", "address": "0x0000000000000000000000000000000000001010", "topics": [ "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", @@ -812,13 +850,13 @@ "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", "0x000000000000000000000000f903ba9e006193c1527bfbe65fe2123704ea3f99" ], - "data": "0x000000000000000000000000000000000000000000000000002025bbacd28c810000000000000000000000000000000000000000000000007fd7faf32f52f12c0000000000000000000000000000000000000000000007c52f89c3d5584a97d50000000000000000000000000000000000000000000000007fb7d537828064ab0000000000000000000000000000000000000000000007c52fa9e991051d2456", - "logIndex": 47, - "blockHash": "0x8f8bb6a6cf5de842bd59356d89fa7381911dfb68626902fd5d969d435f9859f5" + "data": "0x000000000000000000000000000000000000000000000000000af11b618dcada0000000000000000000000000000000000000000000000007cc03a6b555a767600000000000000000000000000000000000000000000093b286bfaaecb33a9440000000000000000000000000000000000000000000000007cb5494ff3ccab9c00000000000000000000000000000000000000000000093b2876ebca2cc1741e", + "logIndex": 105, + "blockHash": "0xcdd137365ec23546d2267ad15968428470503f9c792d3f666ac25fcb94a9f2f4" } ], - "blockNumber": 28600083, - "cumulativeGasUsed": "3332715", + "blockNumber": 29540709, + "cumulativeGasUsed": "7737931", "status": 1, "byzantium": true }, @@ -831,13 +869,13 @@ "0x038d3d596875c66eb90608bbe04e4e238607fd32ad61f4278bdaf47aadc28d60", "0x1b46b55a0ce3f35d6025cdd4554aaac1fc7180b14d51b0f15aa51a6929bdb952" ], - "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6" + "0x4e070E9b85a659F0B7B47cde33152ad6c2F63954" ], - "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", + "numDeployments": 2, + "solcInputHash": "6edb98fea2bf424a369954d0e80655f6", + "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\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"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\":[],\"name\":\"IMPLEMENTATION_VERSION\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"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\":\"ownerAddress\",\"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\",\"ownerAddress\":\"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\":{\"initialize(uint256[2],address)\":{\"notice\":\"The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\"}},\"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 (last updated v4.7.0) (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 Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\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 the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\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\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@openzeppelin/contracts/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\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 prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 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 Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized < type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initialized`\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Internal function that returns the initialized version. Returns `_initializing`\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0xcee5467d5d873fb75dae6f98c01a8d25dd609f9d0374c7d39217bd5f9539a2d6\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, \\\"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 (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or 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 _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\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 /// @solidity memory-safe-assembly\\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\",\"keccak256\":\"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1\",\"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 uint8 public constant IMPLEMENTATION_VERSION = 3;\\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 ownerAddress Owner of the contract, can update public key and address\\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\n */\\n function initialize(\\n uint256[2] memory commitmentSignerPubKey,\\n address ownerAddress\\n ) public reinitializer(IMPLEMENTATION_VERSION) {\\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\\n if (owner() == address(0) || address(this).code.length == 0) {\\n _transferOwnership(ownerAddress);\\n _updateCommitmentSignerPubKey(commitmentSignerPubKey);\\n }\\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(\\n Request calldata request,\\n bytes calldata proofData\\n ) internal virtual override {\\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(\\n Request calldata request,\\n bytes calldata\\n ) public view virtual override(IAttester, Attester) returns (Attestation[] memory) {\\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(\\n Request calldata request,\\n bytes calldata proofData\\n ) internal virtual override {\\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(\\n Pythia1Claim memory claim\\n ) internal view override returns (uint256) {\\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(\\n uint256[2] memory commitmentSignerPubKey\\n ) external onlyOwner {\\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\":\"0x22a505a2f8a3246ad46cf6fdd5eeab1a58b7fcb08982d03ff742f48aec063b82\",\"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(\\n Pythia1Claim memory claim\\n ) internal view virtual 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(\\n Pythia1Claim memory claim,\\n Pythia1ProofInput memory input\\n ) internal view virtual {\\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(uint256 /*errorCode*/) {\\n revert InvalidGroth16Proof('');\\n } catch (bytes memory /*lowLevelData*/) {\\n revert InvalidGroth16Proof('');\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc15ec9f4ae345d96e52465049836e9294a37a45a4c219211264b1d7d15779285\",\"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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\\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\":\"0xa727568cccc2689a13e843d64003ffd6868537c73220e1dc94b86827c8e445d4\",\"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(\\n Pythia1ProofData memory self\\n )\\n internal\\n pure\\n returns (uint256[2] memory, uint256[2][2] memory, uint256[2] memory, uint256[9] memory)\\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(\\n Pythia1ProofData memory self\\n ) internal pure returns (uint256[2] memory) {\\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(\\n Pythia1ProofData memory self\\n ) internal pure returns (uint256) {\\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(\\n uint128 internalCollectionId,\\n bool isScore\\n ) internal pure returns (uint256) {\\n return\\n _generateGroupIdFromEncodedProperties(_encodeGroupProperties(internalCollectionId, isScore));\\n }\\n\\n function _generateGroupIdFromEncodedProperties(\\n bytes memory encodedProperties\\n ) internal pure returns (uint256) {\\n return uint256(keccak256(encodedProperties)) % Pythia1Lib.SNARK_FIELD;\\n }\\n\\n function _encodeGroupProperties(\\n uint128 internalCollectionId,\\n bool isScore\\n ) internal pure returns (bytes memory) {\\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\":\"0x9f50e72124764619442a1d9ad876661b56bc0abb330bc2ffe7536a1c65eb0d0e\",\"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(\\n Request calldata request,\\n bytes calldata proofData\\n ) external override returns (Attestation[] memory) {\\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 address[] memory attestationOwners = new address[](collectionIds.length);\\n\\n uint256[] memory attestationCollectionIds = new uint256[](collectionIds.length);\\n\\n Attestation[] memory attestations = new Attestation[](collectionIds.length);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n // fetch attestations from the registry\\n (\\n address issuer,\\n uint256 attestationValue,\\n uint32 timestamp,\\n bytes memory extraData\\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\\n\\n attestationOwners[i] = attestationsOwner;\\n attestationCollectionIds[i] = collectionIds[i];\\n\\n attestations[i] = (\\n Attestation(\\n collectionIds[i],\\n attestationsOwner,\\n issuer,\\n attestationValue,\\n timestamp,\\n extraData\\n )\\n );\\n }\\n\\n _verifyAttestationsDeletionRequest(attestations, proofData);\\n\\n _beforeDeleteAttestations(attestations, proofData);\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\\n\\n _afterDeleteAttestations(attestations, proofData);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n emit AttestationDeleted(attestations[i]);\\n }\\n return attestations;\\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(\\n Request calldata request,\\n bytes calldata proofData\\n ) public view virtual 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(\\n Request calldata request,\\n bytes calldata proofData\\n ) internal virtual {}\\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(\\n Attestation[] memory attestations,\\n bytes calldata proofData\\n ) internal virtual {}\\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(\\n Attestation[] memory attestations,\\n bytes calldata proofData\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x7743f02ed07e1b40a2ff45f5a45b5fe87d765326cce3528676cbd36c3d08ba37\",\"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';\\nimport {IAttestationsRegistryConfigLogic} from './IAttestationsRegistryConfigLogic.sol';\\n\\n/**\\n * @title IAttestationsRegistry\\n * @author Sismo\\n * @notice This is the interface of the AttestationRegistry\\n */\\ninterface IAttestationsRegistry is IAttestationsRegistryConfigLogic {\\n error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view returns (address, uint256, uint32, bytes memory);\\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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256 collectionId,\\n address owner\\n ) external view 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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view 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(\\n uint256[] memory collectionIds,\\n address[] memory owners\\n ) external view returns (uint256[] memory);\\n}\\n\",\"keccak256\":\"0x0c3af349bcfa545c959f4d9f25aacb73e3ef1ca7cfe62a2eda4a743a6835904f\",\"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 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 error AttributeDoesNotExist(uint8 attributeIndex);\\n error AttributeAlreadyExists(uint8 attributeIndex);\\n error ArgsLengthDoesNotMatch();\\n\\n event NewAttributeCreated(uint8 attributeIndex, bytes32 attributeName);\\n event AttributeNameUpdated(\\n uint8 attributeIndex,\\n bytes32 newAttributeName,\\n bytes32 previousAttributeName\\n );\\n event AttributeDeleted(uint8 attributeIndex, bytes32 deletedAttributeName);\\n\\n event AttestationsCollectionAttributeSet(\\n uint256 collectionId,\\n uint8 attributeIndex,\\n uint8 attributeValue\\n );\\n\\n event IssuerAuthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n event IssuerUnauthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\\n\\n /**\\n * @dev Returns whether an attestationsCollection has a specific attribute referenced by its index\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute. Can go from 0 to 63.\\n */\\n function attestationsCollectionHasAttribute(\\n uint256 collectionId,\\n uint8 index\\n ) external view returns (bool);\\n\\n function attestationsCollectionHasAttributes(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (bool);\\n\\n /**\\n * @dev Returns the attribute's value (from 1 to 15) of an attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param attributeIndex Index of the attribute. Can go from 0 to 63.\\n */\\n function getAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 attributeIndex\\n ) external view returns (uint8);\\n\\n function getAttributesValuesForAttestationsCollection(\\n uint256 collectionId,\\n uint8[] memory indices\\n ) external view returns (uint8[] memory);\\n\\n /**\\n * @dev Set a value for an attribute of an attestationsCollection. The attribute should already be created.\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n * @param index Index of the attribute (must be between 0 and 63)\\n * @param value Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15\\n */\\n function setAttributeValueForAttestationsCollection(\\n uint256 collectionId,\\n uint8 index,\\n uint8 value\\n ) external;\\n\\n function setAttributesValuesForAttestationsCollections(\\n uint256[] memory collectionIds,\\n uint8[] memory indices,\\n uint8[] memory values\\n ) external;\\n\\n /**\\n * @dev Returns all the enabled attributes names and their values for a specific attestationsCollection\\n * @param collectionId Collection Id of the targeted attestationsCollection\\n */\\n function getAttributesNamesAndValuesForAttestationsCollection(\\n uint256 collectionId\\n ) external view returns (bytes32[] memory, uint8[] memory);\\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 /**\\n * @dev Create a new attribute.\\n * @param index Index of the attribute. Can go from 0 to 63.\\n * @param name Name in bytes32 of the attribute\\n */\\n function createNewAttribute(uint8 index, bytes32 name) external;\\n\\n function createNewAttributes(uint8[] memory indices, bytes32[] memory names) external;\\n\\n /**\\n * @dev Update the name of an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n * @param newName new name in bytes32 of the attribute\\n */\\n function updateAttributeName(uint8 index, bytes32 newName) external;\\n\\n function updateAttributesName(uint8[] memory indices, bytes32[] memory names) external;\\n\\n /**\\n * @dev Delete an existing attribute\\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\\n */\\n function deleteAttribute(uint8 index) external;\\n\\n function deleteAttributes(uint8[] memory indices) external;\\n}\\n\",\"keccak256\":\"0x07a1a9e8d2caf1d810ba8fb760a35ce2a0ef60a76814d44881a5aa56162ce26b\",\"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(\\n Request calldata request,\\n bytes calldata proofData\\n ) external 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(\\n Request calldata request,\\n bytes calldata proofData\\n ) external view 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\":\"0x2d5faf5df56dfe1294202e89180846a1d4a5f938699619ee73b60c7314a97dfe\",\"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/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": "0x6101006040523480156200001257600080fd5b50604051620024dd380380620024dd8339810160408190526200003591620002d8565b6001600160a01b03838116608052861660a052620000533362000075565b60c085905260e0849052620000698282620000d0565b505050505050620003d9565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054600390610100900460ff16158015620000f3575060005460ff8083169116105b6200015b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b6000805461ffff191660ff831617610100178155620001886000546201000090046001600160a01b031690565b6001600160a01b031614806200019d5750303b155b15620001b957620001ae8262000075565b620001b983620001ff565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b6200020e60018260026200024b565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df81604051620002409190620003a6565b60405180910390a150565b82600281019282156200027c579160200282015b828111156200027c5782518255916020019190600101906200025f565b506200028a9291506200028e565b5090565b5b808211156200028a57600081556001016200028f565b80516001600160a01b0381168114620002bd57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060e08789031215620002f257600080fd5b620002fd87620002a5565b95506020808801519550604088015194506200031c60608901620002a5565b935088609f8901126200032e57600080fd5b604080519081016001600160401b0381118282101715620003535762000353620002c2565b6040528060c08a018b8111156200036957600080fd5b60808b015b818110156200038757805183529184019184016200036e565b508295506200039681620002a5565b9450505050509295509295509295565b60408101818360005b6002811015620003d0578151835260209283019290910190600101620003af565b50505092915050565b60805160a05160c05160e0516120a06200043d600039600081816101b4015261038a01526000818161016c01526103620152600081816102310152818161055301528181610734015261097801526000818161012f01526110d501526120a06000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063754b377c11610097578063c776adde11610066578063c776adde14610255578063c9cdef0414610268578063e60f999f1461027b578063f2fde38b1461028e57600080fd5b8063754b377c146101de5780638da5cb5b146101f8578063af411a301461020f578063bfa665851461022f57600080fd5b806354846d7a116100d357806354846d7a1461016757806363e4afc21461019c5780637000b051146101af578063715018a6146101d657600080fd5b8063124d7199146100fa5780632785e3221461010f57806346657fe91461012d575b600080fd5b61010d61010836600461164e565b6102a1565b005b6101176102b5565b604051610124919061168d565b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610124565b61018e7f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610124565b61014f6101aa36600461169b565b6102ca565b61018e7f000000000000000000000000000000000000000000000000000000000000000081565b61010d6102e9565b6101e6600381565b60405160ff9091168152602001610124565b6000546201000090046001600160a01b031661014f565b61022261021d3660046116fc565b6102fd565b6040516101249190611827565b7f000000000000000000000000000000000000000000000000000000000000000061014f565b6102226102633660046118ae565b61045c565b61010d61027636600461195f565b610817565b6102226102893660046116fc565b61093a565b61010d61029c366004611997565b610a56565b6102a9610acc565b6102b281610b2d565b50565b6102bd611445565b6102c5610b75565b905090565b6000818152600360205260408120546001600160a01b03165b92915050565b6102f1610acc565b6102fb6000610baf565b565b6060600061031261030d866119db565b610c0a565b60408051600180825281830190925291925060009190816020015b610335611463565b81526020019060019003908161032d575050606083015151909150600090610386906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611b6a565b90507f00000000000000000000000000000000000000000000000000000000000000008111156103d157604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b03168152602001856020015181526020014263ffffffff168152602001604051806020016040528060008152508152508360008151811061044557610445611b82565b602090810291909101015250909695505050505050565b60606000856001600160401b0381111561047857610478611559565b6040519080825280602002602001820160405280156104a1578160200160208202803683370190505b5090506000866001600160401b038111156104be576104be611559565b6040519080825280602002602001820160405280156104e7578160200160208202803683370190505b5090506000876001600160401b0381111561050457610504611559565b60405190808252806020026020018201604052801561053d57816020015b61052a611463565b8152602001906001900390816105225790505b50905060005b88811015610711576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f8881811061059257610592611b82565b905060200201358e6040518363ffffffff1660e01b81526004016105c99291909182526001600160a01b0316602082015260400190565b600060405180830381865afa1580156105e6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261060e9190810190611b98565b93509350935093508b88868151811061062957610629611b82565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061065b5761065b611b82565b9050602002013587868151811061067457610674611b82565b6020026020010181815250506040518060c001604052808f8f8881811061069d5761069d611b82565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff168152602001828152508686815181106106ef576106ef611b82565b602002602001018190525050505050808061070990611c53565b915050610543565b5061071d818787610cbe565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af79061076b9086908690600401611c6c565b600060405180830381600087803b15801561078557600080fd5b505af1158015610799573d6000803e3d6000fd5b5050505060005b8881101561080a577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b8282815181106107db576107db611b82565b60200260200101516040516107f09190611cf0565b60405180910390a18061080281611c53565b9150506107a0565b5098975050505050505050565b600054600390610100900460ff16158015610839575060005460ff8083169116105b61089c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103c8565b6000805461ffff191660ff8316176101001781556108c96000546001600160a01b03620100009091041690565b6001600160a01b031614806108dd5750303b155b156108f4576108eb82610baf565b6108f483610b2d565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b6060610947848484610cd7565b60006109548585856102fd565b9050610961858585610d1f565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906109ad908490600401611827565b600060405180830381600087803b1580156109c757600080fd5b505af11580156109db573d6000803e3d6000fd5b5050505060005b8151811015610a4d577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc828281518110610a1e57610a1e611b82565b6020026020010151604051610a339190611cf0565b60405180910390a180610a4581611c53565b9150506109e2565b50949350505050565b610a5e610acc565b6001600160a01b038116610ac35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103c8565b6102b281610baf565b6000546001600160a01b03620100009091041633146102fb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c8565b610b3a60018260026114b1565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df81604051610b6a919061168d565b60405180910390a150565b610b7d611445565b60408051808201918290529060019060029082845b815481526020019060010190808311610b92575050505050905090565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b610c416040805160808101825260008082526020808301829052828401829052835180850190945281845283015290606082015290565b60008260000151600081518110610c5a57610c5a611b82565b60200260200101519050610c6d81610d88565b60008160400151806020019051810190610c879190611d13565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610ce582840184611ddd565b90506000610cf282610dcc565b90506000610d0261030d876119db565b9050610d0e8183610e68565b610d17836110ab565b505050505050565b6000610d2b8383611244565b6000818152600360205260409020549091506001600160a01b03168015610d6857604051631f5d53e360e01b8152600481018390526024016103c8565b610d8182610d7c6040880160208901611997565b611269565b5050505050565b6000610d9782604001516112cf565b82519091508114610dc85781516040516337e3d1ab60e01b81526103c8918391600401918252602082015260400190565b5050565b610dd46114f4565b604051806101000160405280610de984611304565b6001600160a01b03168152602001610e0084611319565b8152602001610e0e84611328565b8152602001610e1c84611337565b8152602001610e2a84611346565b8152602001610e3884611355565b8152602001610e508460200151610100015160011490565b15158152602001610e6084611364565b905292915050565b8151604082015114610e9d57815160408281015190516347a9715d60e01b8152600481019290925260248201526044016103c8565b81606001516020015115158160c00151151503610ee65760608201516020015160c0820151604051634629f1b560e11b81529115156004830152151560248201526044016103c8565b81604001516001600160a01b031681600001516001600160a01b031614610f3a57604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016103c8565b60408201516001600160a01b03163314610f7e576040808301519051632bfa317f60e11b81523360048201526001600160a01b0390911660248201526044016103c8565b46816020015114610fb1576020810151604051630432cec160e31b815246600482015260248101919091526044016103c8565b81602001518160a0015114610fec57602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016103c8565b6000610ff6610b75565b805160e08401515191925014158061101b575060208082015160e08401519091015114155b1561106457805160208083015160e0850151805192015160405163f71cb0f760e01b815260048101949094526024840191909152604483019190915260648201526084016103c8565b600061106f846113bc565b9050808360600151146110a55760608301516040516377bb6d2760e11b81526103c8918391600401918252602082015260400190565b50505050565b8051805160208083015160409384015191850151935163c542c93b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463c542c93b9461110e94909392909190600401611eae565b602060405180830381865afa925050508015611147575060408051601f3d908101601f1916820190925261114491810190611f55565b60015b61121d57611153611f70565b806308c379a00361118c5750611167611f8c565b8061117257506111cb565b8060405162dd577760e81b81526004016103c89190612015565b634e487b71036111cb5761119e612028565b906111a957506111cb565b60405162dd577760e81b815260206004820152600060248201526044016103c8565b3d8080156111f5576040519150601f19603f3d011682016040523d82523d6000602084013e6111fa565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016103c8565b80610dc85760405162dd577760e81b815260206004820152600060248201526044016103c8565b60008061125383850185611ddd565b9050600061126082611346565b95945050505050565b60008281526003602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b805160208201206000906102e3907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190612048565b6020810151600090815b602002015192915050565b6020810151600090600161130e565b6020810151600090600461130e565b6020810151600090600561130e565b6020810151600090600661130e565b6020810151600090600761130e565b61136c611445565b6040518060400160405280836020015160026009811061138e5761138e611b82565b6020020151815260200183602001516003600981106113af576113af611b82565b6020020151905292915050565b6000806113da308460600151600001516001600160801b03166113e1565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6113da9190612048565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b82600281019282156114df579160200282015b828111156114df5782518255916020019190600101906114c4565b506114eb929150611544565b5090565b905290565b60405180610100016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016114ef611445565b5b808211156114eb5760008155600101611545565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b038211171561158e5761158e611559565b60405250565b606081018181106001600160401b038211171561158e5761158e611559565b601f8201601f191681016001600160401b03811182821017156115d8576115d8611559565b6040525050565b600082601f8301126115f057600080fd5b604051604081018181106001600160401b038211171561161257611612611559565b806040525080604084018581111561162957600080fd5b845b8181101561164357803583526020928301920161162b565b509195945050505050565b60006040828403121561166057600080fd5b6113da83836115df565b8060005b60028110156110a557815184526020938401939091019060010161166e565b604081016102e3828461166a565b6000602082840312156116ad57600080fd5b5035919050565b60008083601f8401126116c657600080fd5b5081356001600160401b038111156116dd57600080fd5b6020830191508360208285010111156116f557600080fd5b9250929050565b60008060006040848603121561171157600080fd5b83356001600160401b038082111561172857600080fd5b908501906040828803121561173c57600080fd5b9093506020850135908082111561175257600080fd5b5061175f868287016116b4565b9497909650939450505050565b60005b8381101561178757818101518382015260200161176f565b838111156110a55750506000910152565b600081518084526117b081602086016020860161176c565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261181f60c0850182611798565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561187c57603f1988860301845261186a8583516117c4565b9450928501929085019060010161184e565b5092979650505050505050565b6001600160a01b03811681146102b257600080fd5b80356118a981611889565b919050565b6000806000806000606086880312156118c657600080fd5b85356001600160401b03808211156118dd57600080fd5b818801915088601f8301126118f157600080fd5b81358181111561190057600080fd5b8960208260051b850101111561191557600080fd5b6020830197508096505061192b6020890161189e565b9450604088013591508082111561194157600080fd5b5061194e888289016116b4565b969995985093965092949392505050565b6000806060838503121561197257600080fd5b61197c84846115df565b9150604083013561198c81611889565b809150509250929050565b6000602082840312156119a957600080fd5b81356113da81611889565b60006001600160401b038211156119cd576119cd611559565b50601f01601f191660200190565b600060408083360312156119ee57600080fd5b80516119f98161156f565b83356001600160401b0380821115611a1057600080fd5b9085019036601f830112611a2357600080fd5b8135602082821115611a3757611a37611559565b8160051b8651611a49838301826115b3565b92835284810182019282810136851115611a6257600080fd5b83870192505b84831015611b3657823586811115611a805760008081fd5b8701606036829003601f1901811315611a995760008081fd5b8a51611aa481611594565b8287013581528b83013581880152908201359088821115611ac55760008081fd5b9181019136603f840112611adb57600091508182fd5b868301359150611aea826119b4565b8c51611af682826115b3565b838152368e858701011115611b0d57600091508182fd5b838e86018a830137600093810189019390935250808c0191909152825250918301918301611a68565b50865250611b4588820161189e565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611b7d57611b7d611b54565b500190565b634e487b7160e01b600052603260045260246000fd5b60008060008060808587031215611bae57600080fd5b8451611bb981611889565b60208601516040870151919550935063ffffffff81168114611bda57600080fd5b60608601519092506001600160401b03811115611bf657600080fd5b8501601f81018713611c0757600080fd5b8051611c12816119b4565b604051611c1f82826115b3565b828152896020848601011115611c3457600080fd5b611c4583602083016020870161176c565b969995985093965050505050565b600060018201611c6557611c65611b54565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015611cae5781516001600160a01b031684529284019290840190600101611c89565b5050508381038285015284518082528583019183019060005b81811015611ce357835183529284019291840191600101611cc7565b5090979650505050505050565b6020815260006113da60208301846117c4565b805180151581146118a957600080fd5b600060408284031215611d2557600080fd5b604051604081018181106001600160401b0382111715611d4757611d47611559565b60405282516001600160801b0381168114611d6157600080fd5b8152611d6f60208401611d03565b60208201529392505050565b600082601f830112611d8c57600080fd5b6040516101208082018281106001600160401b0382111715611db057611db0611559565b60405283018185821115611dc357600080fd5b845b82811015611643578035825260209182019101611dc5565b6000818303610220811215611df157600080fd5b60408051611dfe8161156f565b61010080841215611e0e57600080fd5b82519350611e1b84611594565b611e2587876115df565b845286605f870112611e3657600080fd5b8251611e418161156f565b8060c0880189811115611e5357600080fd5b8589015b81811015611e7857611e698b826115df565b83526020909201918601611e57565b50826020880152611e898a826115df565b86880152505050838252611e9f87828801611d7b565b60208301525095945050505050565b6102208101611ebd828761166a565b60408083018660005b6002808210611ed55750611f10565b82518460005b83811015611ef9578251825260209283019290910190600101611edb565b505050928401925060209190910190600101611ec6565b50505050611f2160c083018561166a565b61010082018360005b6009811015611f49578151835260209283019290910190600101611f2a565b50505095945050505050565b600060208284031215611f6757600080fd5b6113da82611d03565b600060033d1115611f895760046000803e5060005160e01c5b90565b600060443d1015611f9a5790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715611fc957505050505090565b8285019150815181811115611fe15750505050505090565b843d8701016020828501011115611ffb5750505050505090565b61200a602082860101876115b3565b509095945050505050565b6020815260006113da6020830184611798565b60008060233d1115612044576020600460003e50506000516001905b9091565b60008261206557634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220ecfcdd3ed3aafdf6de9cf8f871557ae2657814cf595e7da8c33a09d25121780964736f6c634300080e0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063754b377c11610097578063c776adde11610066578063c776adde14610255578063c9cdef0414610268578063e60f999f1461027b578063f2fde38b1461028e57600080fd5b8063754b377c146101de5780638da5cb5b146101f8578063af411a301461020f578063bfa665851461022f57600080fd5b806354846d7a116100d357806354846d7a1461016757806363e4afc21461019c5780637000b051146101af578063715018a6146101d657600080fd5b8063124d7199146100fa5780632785e3221461010f57806346657fe91461012d575b600080fd5b61010d61010836600461164e565b6102a1565b005b6101176102b5565b604051610124919061168d565b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610124565b61018e7f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610124565b61014f6101aa36600461169b565b6102ca565b61018e7f000000000000000000000000000000000000000000000000000000000000000081565b61010d6102e9565b6101e6600381565b60405160ff9091168152602001610124565b6000546201000090046001600160a01b031661014f565b61022261021d3660046116fc565b6102fd565b6040516101249190611827565b7f000000000000000000000000000000000000000000000000000000000000000061014f565b6102226102633660046118ae565b61045c565b61010d61027636600461195f565b610817565b6102226102893660046116fc565b61093a565b61010d61029c366004611997565b610a56565b6102a9610acc565b6102b281610b2d565b50565b6102bd611445565b6102c5610b75565b905090565b6000818152600360205260408120546001600160a01b03165b92915050565b6102f1610acc565b6102fb6000610baf565b565b6060600061031261030d866119db565b610c0a565b60408051600180825281830190925291925060009190816020015b610335611463565b81526020019060019003908161032d575050606083015151909150600090610386906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611b6a565b90507f00000000000000000000000000000000000000000000000000000000000000008111156103d157604051637bbf29e360e01b8152600481018290526024015b60405180910390fd5b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b03168152602001856020015181526020014263ffffffff168152602001604051806020016040528060008152508152508360008151811061044557610445611b82565b602090810291909101015250909695505050505050565b60606000856001600160401b0381111561047857610478611559565b6040519080825280602002602001820160405280156104a1578160200160208202803683370190505b5090506000866001600160401b038111156104be576104be611559565b6040519080825280602002602001820160405280156104e7578160200160208202803683370190505b5090506000876001600160401b0381111561050457610504611559565b60405190808252806020026020018201604052801561053d57816020015b61052a611463565b8152602001906001900390816105225790505b50905060005b88811015610711576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f8881811061059257610592611b82565b905060200201358e6040518363ffffffff1660e01b81526004016105c99291909182526001600160a01b0316602082015260400190565b600060405180830381865afa1580156105e6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261060e9190810190611b98565b93509350935093508b88868151811061062957610629611b82565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061065b5761065b611b82565b9050602002013587868151811061067457610674611b82565b6020026020010181815250506040518060c001604052808f8f8881811061069d5761069d611b82565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff168152602001828152508686815181106106ef576106ef611b82565b602002602001018190525050505050808061070990611c53565b915050610543565b5061071d818787610cbe565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af79061076b9086908690600401611c6c565b600060405180830381600087803b15801561078557600080fd5b505af1158015610799573d6000803e3d6000fd5b5050505060005b8881101561080a577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b8282815181106107db576107db611b82565b60200260200101516040516107f09190611cf0565b60405180910390a18061080281611c53565b9150506107a0565b5098975050505050505050565b600054600390610100900460ff16158015610839575060005460ff8083169116105b61089c5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103c8565b6000805461ffff191660ff8316176101001781556108c96000546001600160a01b03620100009091041690565b6001600160a01b031614806108dd5750303b155b156108f4576108eb82610baf565b6108f483610b2d565b6000805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b6060610947848484610cd7565b60006109548585856102fd565b9050610961858585610d1f565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906109ad908490600401611827565b600060405180830381600087803b1580156109c757600080fd5b505af11580156109db573d6000803e3d6000fd5b5050505060005b8151811015610a4d577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc828281518110610a1e57610a1e611b82565b6020026020010151604051610a339190611cf0565b60405180910390a180610a4581611c53565b9150506109e2565b50949350505050565b610a5e610acc565b6001600160a01b038116610ac35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103c8565b6102b281610baf565b6000546001600160a01b03620100009091041633146102fb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103c8565b610b3a60018260026114b1565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df81604051610b6a919061168d565b60405180910390a150565b610b7d611445565b60408051808201918290529060019060029082845b815481526020019060010190808311610b92575050505050905090565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b610c416040805160808101825260008082526020808301829052828401829052835180850190945281845283015290606082015290565b60008260000151600081518110610c5a57610c5a611b82565b60200260200101519050610c6d81610d88565b60008160400151806020019051810190610c879190611d13565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610ce582840184611ddd565b90506000610cf282610dcc565b90506000610d0261030d876119db565b9050610d0e8183610e68565b610d17836110ab565b505050505050565b6000610d2b8383611244565b6000818152600360205260409020549091506001600160a01b03168015610d6857604051631f5d53e360e01b8152600481018390526024016103c8565b610d8182610d7c6040880160208901611997565b611269565b5050505050565b6000610d9782604001516112cf565b82519091508114610dc85781516040516337e3d1ab60e01b81526103c8918391600401918252602082015260400190565b5050565b610dd46114f4565b604051806101000160405280610de984611304565b6001600160a01b03168152602001610e0084611319565b8152602001610e0e84611328565b8152602001610e1c84611337565b8152602001610e2a84611346565b8152602001610e3884611355565b8152602001610e508460200151610100015160011490565b15158152602001610e6084611364565b905292915050565b8151604082015114610e9d57815160408281015190516347a9715d60e01b8152600481019290925260248201526044016103c8565b81606001516020015115158160c00151151503610ee65760608201516020015160c0820151604051634629f1b560e11b81529115156004830152151560248201526044016103c8565b81604001516001600160a01b031681600001516001600160a01b031614610f3a57604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016103c8565b60408201516001600160a01b03163314610f7e576040808301519051632bfa317f60e11b81523360048201526001600160a01b0390911660248201526044016103c8565b46816020015114610fb1576020810151604051630432cec160e31b815246600482015260248101919091526044016103c8565b81602001518160a0015114610fec57602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016103c8565b6000610ff6610b75565b805160e08401515191925014158061101b575060208082015160e08401519091015114155b1561106457805160208083015160e0850151805192015160405163f71cb0f760e01b815260048101949094526024840191909152604483019190915260648201526084016103c8565b600061106f846113bc565b9050808360600151146110a55760608301516040516377bb6d2760e11b81526103c8918391600401918252602082015260400190565b50505050565b8051805160208083015160409384015191850151935163c542c93b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463c542c93b9461110e94909392909190600401611eae565b602060405180830381865afa925050508015611147575060408051601f3d908101601f1916820190925261114491810190611f55565b60015b61121d57611153611f70565b806308c379a00361118c5750611167611f8c565b8061117257506111cb565b8060405162dd577760e81b81526004016103c89190612015565b634e487b71036111cb5761119e612028565b906111a957506111cb565b60405162dd577760e81b815260206004820152600060248201526044016103c8565b3d8080156111f5576040519150601f19603f3d011682016040523d82523d6000602084013e6111fa565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016103c8565b80610dc85760405162dd577760e81b815260206004820152600060248201526044016103c8565b60008061125383850185611ddd565b9050600061126082611346565b95945050505050565b60008281526003602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b805160208201206000906102e3907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f000000190612048565b6020810151600090815b602002015192915050565b6020810151600090600161130e565b6020810151600090600461130e565b6020810151600090600561130e565b6020810151600090600661130e565b6020810151600090600761130e565b61136c611445565b6040518060400160405280836020015160026009811061138e5761138e611b82565b6020020151815260200183602001516003600981106113af576113af611b82565b6020020151905292915050565b6000806113da308460600151600001516001600160801b03166113e1565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c6113da9190612048565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b82600281019282156114df579160200282015b828111156114df5782518255916020019190600101906114c4565b506114eb929150611544565b5090565b905290565b60405180610100016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016114ef611445565b5b808211156114eb5760008155600101611545565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b038211171561158e5761158e611559565b60405250565b606081018181106001600160401b038211171561158e5761158e611559565b601f8201601f191681016001600160401b03811182821017156115d8576115d8611559565b6040525050565b600082601f8301126115f057600080fd5b604051604081018181106001600160401b038211171561161257611612611559565b806040525080604084018581111561162957600080fd5b845b8181101561164357803583526020928301920161162b565b509195945050505050565b60006040828403121561166057600080fd5b6113da83836115df565b8060005b60028110156110a557815184526020938401939091019060010161166e565b604081016102e3828461166a565b6000602082840312156116ad57600080fd5b5035919050565b60008083601f8401126116c657600080fd5b5081356001600160401b038111156116dd57600080fd5b6020830191508360208285010111156116f557600080fd5b9250929050565b60008060006040848603121561171157600080fd5b83356001600160401b038082111561172857600080fd5b908501906040828803121561173c57600080fd5b9093506020850135908082111561175257600080fd5b5061175f868287016116b4565b9497909650939450505050565b60005b8381101561178757818101518382015260200161176f565b838111156110a55750506000910152565b600081518084526117b081602086016020860161176c565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a085015261181f60c0850182611798565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561187c57603f1988860301845261186a8583516117c4565b9450928501929085019060010161184e565b5092979650505050505050565b6001600160a01b03811681146102b257600080fd5b80356118a981611889565b919050565b6000806000806000606086880312156118c657600080fd5b85356001600160401b03808211156118dd57600080fd5b818801915088601f8301126118f157600080fd5b81358181111561190057600080fd5b8960208260051b850101111561191557600080fd5b6020830197508096505061192b6020890161189e565b9450604088013591508082111561194157600080fd5b5061194e888289016116b4565b969995985093965092949392505050565b6000806060838503121561197257600080fd5b61197c84846115df565b9150604083013561198c81611889565b809150509250929050565b6000602082840312156119a957600080fd5b81356113da81611889565b60006001600160401b038211156119cd576119cd611559565b50601f01601f191660200190565b600060408083360312156119ee57600080fd5b80516119f98161156f565b83356001600160401b0380821115611a1057600080fd5b9085019036601f830112611a2357600080fd5b8135602082821115611a3757611a37611559565b8160051b8651611a49838301826115b3565b92835284810182019282810136851115611a6257600080fd5b83870192505b84831015611b3657823586811115611a805760008081fd5b8701606036829003601f1901811315611a995760008081fd5b8a51611aa481611594565b8287013581528b83013581880152908201359088821115611ac55760008081fd5b9181019136603f840112611adb57600091508182fd5b868301359150611aea826119b4565b8c51611af682826115b3565b838152368e858701011115611b0d57600091508182fd5b838e86018a830137600093810189019390935250808c0191909152825250918301918301611a68565b50865250611b4588820161189e565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611b7d57611b7d611b54565b500190565b634e487b7160e01b600052603260045260246000fd5b60008060008060808587031215611bae57600080fd5b8451611bb981611889565b60208601516040870151919550935063ffffffff81168114611bda57600080fd5b60608601519092506001600160401b03811115611bf657600080fd5b8501601f81018713611c0757600080fd5b8051611c12816119b4565b604051611c1f82826115b3565b828152896020848601011115611c3457600080fd5b611c4583602083016020870161176c565b969995985093965050505050565b600060018201611c6557611c65611b54565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015611cae5781516001600160a01b031684529284019290840190600101611c89565b5050508381038285015284518082528583019183019060005b81811015611ce357835183529284019291840191600101611cc7565b5090979650505050505050565b6020815260006113da60208301846117c4565b805180151581146118a957600080fd5b600060408284031215611d2557600080fd5b604051604081018181106001600160401b0382111715611d4757611d47611559565b60405282516001600160801b0381168114611d6157600080fd5b8152611d6f60208401611d03565b60208201529392505050565b600082601f830112611d8c57600080fd5b6040516101208082018281106001600160401b0382111715611db057611db0611559565b60405283018185821115611dc357600080fd5b845b82811015611643578035825260209182019101611dc5565b6000818303610220811215611df157600080fd5b60408051611dfe8161156f565b61010080841215611e0e57600080fd5b82519350611e1b84611594565b611e2587876115df565b845286605f870112611e3657600080fd5b8251611e418161156f565b8060c0880189811115611e5357600080fd5b8589015b81811015611e7857611e698b826115df565b83526020909201918601611e57565b50826020880152611e898a826115df565b86880152505050838252611e9f87828801611d7b565b60208301525095945050505050565b6102208101611ebd828761166a565b60408083018660005b6002808210611ed55750611f10565b82518460005b83811015611ef9578251825260209283019290910190600101611edb565b505050928401925060209190910190600101611ec6565b50505050611f2160c083018561166a565b61010082018360005b6009811015611f49578151835260209283019290910190600101611f2a565b50505095945050505050565b600060208284031215611f6757600080fd5b6113da82611d03565b600060033d1115611f895760046000803e5060005160e01c5b90565b600060443d1015611f9a5790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715611fc957505050505090565b8285019150815181811115611fe15750505050505090565b843d8701016020828501011115611ffb5750505050505090565b61200a602082860101876115b3565b509095945050505050565b6020815260006113da6020830184611798565b60008060233d1115612044576020600460003e50506000516001905b9091565b60008261206557634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220ecfcdd3ed3aafdf6de9cf8f871557ae2657814cf595e7da8c33a09d25121780964736f6c634300080e0033", "devdoc": { "author": "Sismo", "kind": "dev", @@ -902,7 +940,7 @@ "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" + "ownerAddress": "Owner of the contract, can update public key and address" } }, "owner()": { @@ -928,22 +966,26 @@ }, "userdoc": { "kind": "user", - "methods": {}, + "methods": { + "initialize(uint256[2],address)": { + "notice": "The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization." + } + }, "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, + "astId": 935, "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", "label": "_initialized", "offset": 0, "slot": "0", - "type": "t_bool" + "type": "t_uint8" }, { - "astId": 939, + "astId": 938, "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", "label": "_initializing", "offset": 1, @@ -951,7 +993,7 @@ "type": "t_bool" }, { - "astId": 389, + "astId": 396, "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", "label": "_owner", "offset": 2, @@ -959,7 +1001,7 @@ "type": "t_address" }, { - "astId": 8268, + "astId": 9697, "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", "label": "_commitmentSignerPubKey", "offset": 0, @@ -967,7 +1009,7 @@ "type": "t_array(t_uint256)2_storage" }, { - "astId": 8272, + "astId": 9701, "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", "label": "_ticketsDestinations", "offset": 0, @@ -1003,6 +1045,11 @@ "encoding": "inplace", "label": "uint256", "numberOfBytes": "32" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" } } } diff --git a/deployments/mumbai/Pythia1SimpleAttesterImplemV2.json b/deployments/mumbai/Pythia1SimpleAttesterImplemV2.json deleted file mode 100644 index 3c412a8..0000000 --- a/deployments/mumbai/Pythia1SimpleAttesterImplemV2.json +++ /dev/null @@ -1,1009 +0,0 @@ -{ - "address": "0x268669Ac1bAb63ea492F47428b778514F08508a8", - "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": "0x5445e69c2d005ddb9d33087dd1e9146f8b0f920b3780f93b8b6fee8160858ded", - "receipt": { - "to": null, - "from": "0x346d40b5BF73C5eB43c4c5E55A3fd22d25257DC6", - "contractAddress": "0x268669Ac1bAb63ea492F47428b778514F08508a8", - "transactionIndex": 9, - "gasUsed": "1938626", - "logsBloom": "0x00000000000000000000000000020000000000000000000000800000000000000000000000000000000000000000000000008000000040000000000000008000000000000000000000000000000000800001000000000000000100000000000000000000020000000000000000000800002000000000000080000000000000400000000000008000200000000000000000000010000000000000000000008000200000000000000000280000800000000000000000000000000000000000004000000000000000000001000000000100000000000040000000100000000020000000000000000000000000000000000000000200000000000020000000100000", - "blockHash": "0x3d1905558064932433f98c996d83e67c004af47553c140a69b564485ffc2acbe", - "transactionHash": "0x5445e69c2d005ddb9d33087dd1e9146f8b0f920b3780f93b8b6fee8160858ded", - "logs": [ - { - "transactionIndex": 9, - "blockNumber": 28807655, - "transactionHash": "0x5445e69c2d005ddb9d33087dd1e9146f8b0f920b3780f93b8b6fee8160858ded", - "address": "0x268669Ac1bAb63ea492F47428b778514F08508a8", - "topics": [ - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6" - ], - "data": "0x", - "logIndex": 50, - "blockHash": "0x3d1905558064932433f98c996d83e67c004af47553c140a69b564485ffc2acbe" - }, - { - "transactionIndex": 9, - "blockNumber": 28807655, - "transactionHash": "0x5445e69c2d005ddb9d33087dd1e9146f8b0f920b3780f93b8b6fee8160858ded", - "address": "0x268669Ac1bAb63ea492F47428b778514F08508a8", - "topics": [ - "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x0000000000000000000000004e070e9b85a659f0b7b47cde33152ad6c2f63954" - ], - "data": "0x", - "logIndex": 51, - "blockHash": "0x3d1905558064932433f98c996d83e67c004af47553c140a69b564485ffc2acbe" - }, - { - "transactionIndex": 9, - "blockNumber": 28807655, - "transactionHash": "0x5445e69c2d005ddb9d33087dd1e9146f8b0f920b3780f93b8b6fee8160858ded", - "address": "0x268669Ac1bAb63ea492F47428b778514F08508a8", - "topics": [ - "0xda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df" - ], - "data": "0x038d3d596875c66eb90608bbe04e4e238607fd32ad61f4278bdaf47aadc28d601b46b55a0ce3f35d6025cdd4554aaac1fc7180b14d51b0f15aa51a6929bdb952", - "logIndex": 52, - "blockHash": "0x3d1905558064932433f98c996d83e67c004af47553c140a69b564485ffc2acbe" - }, - { - "transactionIndex": 9, - "blockNumber": 28807655, - "transactionHash": "0x5445e69c2d005ddb9d33087dd1e9146f8b0f920b3780f93b8b6fee8160858ded", - "address": "0x0000000000000000000000000000000000001010", - "topics": [ - "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", - "0x0000000000000000000000000000000000000000000000000000000000001010", - "0x000000000000000000000000346d40b5bf73c5eb43c4c5e55a3fd22d25257dc6", - "0x0000000000000000000000003a22c8bc68e98b0faf40f349dd2b2890fae01484" - ], - "data": "0x00000000000000000000000000000000000000000000000000181b186349c6000000000000000000000000000000000000000000000000007dc6aa84dc1ab44d0000000000000000000000000000000000000000000000000583e3a5ef509bb00000000000000000000000000000000000000000000000007dae8f6c78d0ee4d000000000000000000000000000000000000000000000000059bfebe529a61b0", - "logIndex": 53, - "blockHash": "0x3d1905558064932433f98c996d83e67c004af47553c140a69b564485ffc2acbe" - } - ], - "blockNumber": 28807655, - "cumulativeGasUsed": "3547860", - "status": 1, - "byzantium": true - }, - "args": [ - "0xf576E42E5b2682B8f606B1840c3A982610C29a3f", - "30000001", - "30000100", - "0x115dFa344C877fF74e970F06BE10FF5A59EAba02", - [ - "0x038d3d596875c66eb90608bbe04e4e238607fd32ad61f4278bdaf47aadc28d60", - "0x1b46b55a0ce3f35d6025cdd4554aaac1fc7180b14d51b0f15aa51a6929bdb952" - ], - "0x4e070E9b85a659F0B7B47cde33152ad6c2F63954" - ], - "numDeployments": 1, - "solcInputHash": "c7c67c4a1ddf53de4ef76f8a114dfc39", - "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 address[] memory attestationOwners = new address[](collectionIds.length);\\n\\n uint256[] memory attestationCollectionIds = new uint256[](collectionIds.length);\\n\\n Attestation[] memory attestations = new Attestation[](collectionIds.length);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n // fetch attestations from the registry\\n (\\n address issuer,\\n uint256 attestationValue,\\n uint32 timestamp,\\n bytes memory extraData\\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\\n\\n attestationOwners[i] = attestationsOwner;\\n attestationCollectionIds[i] = collectionIds[i];\\n\\n attestations[i] = (\\n Attestation(\\n collectionIds[i],\\n attestationsOwner,\\n issuer,\\n attestationValue,\\n timestamp,\\n extraData\\n )\\n );\\n }\\n\\n _verifyAttestationsDeletionRequest(attestations, proofData);\\n\\n _beforeDeleteAttestations(attestations, proofData);\\n\\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\\n\\n _afterDeleteAttestations(attestations, proofData);\\n\\n for (uint256 i = 0; i < collectionIds.length; i++) {\\n emit AttestationDeleted(attestations[i]);\\n }\\n return attestations;\\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\":\"0xcab4865f46f442ae11ea0689f63eb7fa0763fcfe86522aa67521a548171cb8e0\",\"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 error IssuerNotAuthorized(address issuer, uint256 collectionId);\\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\\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 owners The owners of the attestations to be deleted\\n * @param collectionIds The collection ids of the attestations to be deleted\\n */\\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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\":\"0xcf79a817ec578f5b4d8f23853dd8df0e3b1acfbff2b5a01601fd9a7315862ec9\",\"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": "0x6101006040523480156200001257600080fd5b50604051620024a2380380620024a28339810160408190526200003591620002b6565b6001600160a01b03838116608052861660a052620000533362000075565b60c085905260e0849052620000698282620000d0565b505050505050620003b7565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b600054610100900460ff16620000ed5760005460ff1615620000f7565b620000f7620001b0565b6200015f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801562000182576000805461ffff19166101011790555b6200018d8262000075565b6200019883620001ce565b8015620001ab576000805461ff00191690555b505050565b6000620001c8306200021a60201b62000ad01760201c565b15905090565b620001dd600182600262000229565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df816040516200020f919062000384565b60405180910390a150565b6001600160a01b03163b151590565b82600281019282156200025a579160200282015b828111156200025a5782518255916020019190600101906200023d565b50620002689291506200026c565b5090565b5b808211156200026857600081556001016200026d565b80516001600160a01b03811681146200029b57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060008060008060e08789031215620002d057600080fd5b620002db8762000283565b9550602080880151955060408801519450620002fa6060890162000283565b935088609f8901126200030c57600080fd5b604080519081016001600160401b0381118282101715620003315762000331620002a0565b6040528060c08a018b8111156200034757600080fd5b60808b015b818110156200036557805183529184019184016200034c565b50829550620003748162000283565b9450505050509295509295509295565b60408101818360005b6002811015620003ae5781518352602092830192909101906001016200038d565b50505092915050565b60805160a05160c05160e0516120876200041b600039600081816101a901526103c0015260008181610161015261039801526000818161020c01528181610584015281816107650152610953015260008181610124015261108701526120876000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063c776adde11610066578063c776adde14610230578063c9cdef0414610243578063e60f999f14610256578063f2fde38b1461026957600080fd5b80638da5cb5b146101d3578063af411a30146101ea578063bfa665851461020a57600080fd5b806354846d7a116100c857806354846d7a1461015c57806363e4afc2146101915780637000b051146101a4578063715018a6146101cb57600080fd5b8063124d7199146100ef5780632785e3221461010457806346657fe914610122575b600080fd5b6101026100fd366004611600565b61027c565b005b61010c6102c2565b604051610119919061163f565b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610119565b6101837f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610119565b61014461019f36600461164d565b6102d7565b6101837f000000000000000000000000000000000000000000000000000000000000000081565b6101026102f6565b6000546201000090046001600160a01b0316610144565b6101fd6101f83660046116ae565b610333565b60405161011991906117d9565b7f0000000000000000000000000000000000000000000000000000000000000000610144565b6101fd61023e366004611860565b61048d565b610102610251366004611911565b610848565b6101fd6102643660046116ae565b610915565b610102610277366004611949565b610a31565b6000546001600160a01b03620100009091041633146102b65760405162461bcd60e51b81526004016102ad90611966565b60405180910390fd5b6102bf81610adf565b50565b6102ca6113f7565b6102d2610b27565b905090565b6000818152600360205260408120546001600160a01b03165b92915050565b6000546001600160a01b03620100009091041633146103275760405162461bcd60e51b81526004016102ad90611966565b6103316000610b61565b565b60606000610348610343866119c2565b610bbc565b60408051600180825281830190925291925060009190816020015b61036b611415565b8152602001906001900390816103635750506060830151519091506000906103bc906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611b51565b90507f000000000000000000000000000000000000000000000000000000000000000081111561040257604051637bbf29e360e01b8152600481018290526024016102ad565b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b03168152602001856020015181526020014263ffffffff168152602001604051806020016040528060008152508152508360008151811061047657610476611b69565b602090810291909101015250909695505050505050565b60606000856001600160401b038111156104a9576104a961150b565b6040519080825280602002602001820160405280156104d2578160200160208202803683370190505b5090506000866001600160401b038111156104ef576104ef61150b565b604051908082528060200260200182016040528015610518578160200160208202803683370190505b5090506000876001600160401b038111156105355761053561150b565b60405190808252806020026020018201604052801561056e57816020015b61055b611415565b8152602001906001900390816105535790505b50905060005b88811015610742576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f888181106105c3576105c3611b69565b905060200201358e6040518363ffffffff1660e01b81526004016105fa9291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610617573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261063f9190810190611b7f565b93509350935093508b88868151811061065a5761065a611b69565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061068c5761068c611b69565b905060200201358786815181106106a5576106a5611b69565b6020026020010181815250506040518060c001604052808f8f888181106106ce576106ce611b69565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061072057610720611b69565b602002602001018190525050505050808061073a90611c3a565b915050610574565b5061074e818787610c70565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af79061079c9086908690600401611c53565b600060405180830381600087803b1580156107b657600080fd5b505af11580156107ca573d6000803e3d6000fd5b5050505060005b8881101561083b577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061080c5761080c611b69565b60200260200101516040516108219190611cd7565b60405180910390a18061083381611c3a565b9150506107d1565b5098975050505050505050565b600054610100900460ff166108635760005460ff1615610867565b303b155b6108ca5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102ad565b600054610100900460ff161580156108ec576000805461ffff19166101011790555b6108f582610b61565b6108fe83610adf565b8015610910576000805461ff00191690555b505050565b6060610922848484610c89565b600061092f858585610333565b905061093c858585610cd1565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906109889084906004016117d9565b600060405180830381600087803b1580156109a257600080fd5b505af11580156109b6573d6000803e3d6000fd5b5050505060005b8151811015610a28577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc8282815181106109f9576109f9611b69565b6020026020010151604051610a0e9190611cd7565b60405180910390a180610a2081611c3a565b9150506109bd565b50949350505050565b6000546001600160a01b0362010000909104163314610a625760405162461bcd60e51b81526004016102ad90611966565b6001600160a01b038116610ac75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ad565b6102bf81610b61565b6001600160a01b03163b151590565b610aec6001826002611463565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df81604051610b1c919061163f565b60405180910390a150565b610b2f6113f7565b60408051808201918290529060019060029082845b815481526020019060010190808311610b44575050505050905090565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b610bf36040805160808101825260008082526020808301829052828401829052835180850190945281845283015290606082015290565b60008260000151600081518110610c0c57610c0c611b69565b60200260200101519050610c1f81610d3a565b60008160400151806020019051810190610c399190611cfa565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610c9782840184611dc4565b90506000610ca482610d7e565b90506000610cb4610343876119c2565b9050610cc08183610e1a565b610cc98361105d565b505050505050565b6000610cdd83836111f6565b6000818152600360205260409020549091506001600160a01b03168015610d1a57604051631f5d53e360e01b8152600481018390526024016102ad565b610d3382610d2e6040880160208901611949565b61121b565b5050505050565b6000610d498260400151611281565b82519091508114610d7a5781516040516337e3d1ab60e01b81526102ad918391600401918252602082015260400190565b5050565b610d866114a6565b604051806101000160405280610d9b846112b6565b6001600160a01b03168152602001610db2846112cb565b8152602001610dc0846112da565b8152602001610dce846112e9565b8152602001610ddc846112f8565b8152602001610dea84611307565b8152602001610e028460200151610100015160011490565b15158152602001610e1284611316565b905292915050565b8151604082015114610e4f57815160408281015190516347a9715d60e01b8152600481019290925260248201526044016102ad565b81606001516020015115158160c00151151503610e985760608201516020015160c0820151604051634629f1b560e11b81529115156004830152151560248201526044016102ad565b81604001516001600160a01b031681600001516001600160a01b031614610eec57604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016102ad565b60408201516001600160a01b03163314610f30576040808301519051632bfa317f60e11b81523360048201526001600160a01b0390911660248201526044016102ad565b46816020015114610f63576020810151604051630432cec160e31b815246600482015260248101919091526044016102ad565b81602001518160a0015114610f9e57602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016102ad565b6000610fa8610b27565b805160e084015151919250141580610fcd575060208082015160e08401519091015114155b1561101657805160208083015160e0850151805192015160405163f71cb0f760e01b815260048101949094526024840191909152604483019190915260648201526084016102ad565b60006110218461136e565b9050808360600151146110575760608301516040516377bb6d2760e11b81526102ad918391600401918252602082015260400190565b50505050565b8051805160208083015160409384015191850151935163c542c93b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463c542c93b946110c094909392909190600401611e95565b602060405180830381865afa9250505080156110f9575060408051601f3d908101601f191682019092526110f691810190611f3c565b60015b6111cf57611105611f57565b806308c379a00361113e5750611119611f73565b80611124575061117d565b8060405162dd577760e81b81526004016102ad9190611ffc565b634e487b710361117d5761115061200f565b9061115b575061117d565b60405162dd577760e81b815260206004820152600060248201526044016102ad565b3d8080156111a7576040519150601f19603f3d011682016040523d82523d6000602084013e6111ac565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016102ad565b80610d7a5760405162dd577760e81b815260206004820152600060248201526044016102ad565b60008061120583850185611dc4565b90506000611212826112f8565b95945050505050565b60008281526003602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b805160208201206000906102f0907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019061202f565b6020810151600090815b602002015192915050565b602081015160009060016112c0565b602081015160009060046112c0565b602081015160009060056112c0565b602081015160009060066112c0565b602081015160009060076112c0565b61131e6113f7565b6040518060400160405280836020015160026009811061134057611340611b69565b60200201518152602001836020015160036009811061136157611361611b69565b6020020151905292915050565b60008061138c308460600151600001516001600160801b0316611393565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c61138c919061202f565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b8260028101928215611491579160200282015b82811115611491578251825591602001919060010190611476565b5061149d9291506114f6565b5090565b905290565b60405180610100016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016114a16113f7565b5b8082111561149d57600081556001016114f7565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b03821117156115405761154061150b565b60405250565b606081018181106001600160401b03821117156115405761154061150b565b601f8201601f191681016001600160401b038111828210171561158a5761158a61150b565b6040525050565b600082601f8301126115a257600080fd5b604051604081018181106001600160401b03821117156115c4576115c461150b565b80604052508060408401858111156115db57600080fd5b845b818110156115f55780358352602092830192016115dd565b509195945050505050565b60006040828403121561161257600080fd5b61138c8383611591565b8060005b6002811015611057578151845260209384019390910190600101611620565b604081016102f0828461161c565b60006020828403121561165f57600080fd5b5035919050565b60008083601f84011261167857600080fd5b5081356001600160401b0381111561168f57600080fd5b6020830191508360208285010111156116a757600080fd5b9250929050565b6000806000604084860312156116c357600080fd5b83356001600160401b03808211156116da57600080fd5b90850190604082880312156116ee57600080fd5b9093506020850135908082111561170457600080fd5b5061171186828701611666565b9497909650939450505050565b60005b83811015611739578181015183820152602001611721565b838111156110575750506000910152565b6000815180845261176281602086016020860161171e565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a08501526117d160c085018261174a565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561182e57603f1988860301845261181c858351611776565b94509285019290850190600101611800565b5092979650505050505050565b6001600160a01b03811681146102bf57600080fd5b803561185b8161183b565b919050565b60008060008060006060868803121561187857600080fd5b85356001600160401b038082111561188f57600080fd5b818801915088601f8301126118a357600080fd5b8135818111156118b257600080fd5b8960208260051b85010111156118c757600080fd5b602083019750809650506118dd60208901611850565b945060408801359150808211156118f357600080fd5b5061190088828901611666565b969995985093965092949392505050565b6000806060838503121561192457600080fd5b61192e8484611591565b9150604083013561193e8161183b565b809150509250929050565b60006020828403121561195b57600080fd5b813561138c8161183b565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006001600160401b038211156119b4576119b461150b565b50601f01601f191660200190565b600060408083360312156119d557600080fd5b80516119e081611521565b83356001600160401b03808211156119f757600080fd5b9085019036601f830112611a0a57600080fd5b8135602082821115611a1e57611a1e61150b565b8160051b8651611a3083830182611565565b92835284810182019282810136851115611a4957600080fd5b83870192505b84831015611b1d57823586811115611a675760008081fd5b8701606036829003601f1901811315611a805760008081fd5b8a51611a8b81611546565b8287013581528b83013581880152908201359088821115611aac5760008081fd5b9181019136603f840112611ac257600091508182fd5b868301359150611ad18261199b565b8c51611add8282611565565b838152368e858701011115611af457600091508182fd5b838e86018a830137600093810189019390935250808c0191909152825250918301918301611a4f565b50865250611b2c888201611850565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611b6457611b64611b3b565b500190565b634e487b7160e01b600052603260045260246000fd5b60008060008060808587031215611b9557600080fd5b8451611ba08161183b565b60208601516040870151919550935063ffffffff81168114611bc157600080fd5b60608601519092506001600160401b03811115611bdd57600080fd5b8501601f81018713611bee57600080fd5b8051611bf98161199b565b604051611c068282611565565b828152896020848601011115611c1b57600080fd5b611c2c83602083016020870161171e565b969995985093965050505050565b600060018201611c4c57611c4c611b3b565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015611c955781516001600160a01b031684529284019290840190600101611c70565b5050508381038285015284518082528583019183019060005b81811015611cca57835183529284019291840191600101611cae565b5090979650505050505050565b60208152600061138c6020830184611776565b8051801515811461185b57600080fd5b600060408284031215611d0c57600080fd5b604051604081018181106001600160401b0382111715611d2e57611d2e61150b565b60405282516001600160801b0381168114611d4857600080fd5b8152611d5660208401611cea565b60208201529392505050565b600082601f830112611d7357600080fd5b6040516101208082018281106001600160401b0382111715611d9757611d9761150b565b60405283018185821115611daa57600080fd5b845b828110156115f5578035825260209182019101611dac565b6000818303610220811215611dd857600080fd5b60408051611de581611521565b61010080841215611df557600080fd5b82519350611e0284611546565b611e0c8787611591565b845286605f870112611e1d57600080fd5b8251611e2881611521565b8060c0880189811115611e3a57600080fd5b8589015b81811015611e5f57611e508b82611591565b83526020909201918601611e3e565b50826020880152611e708a82611591565b86880152505050838252611e8687828801611d62565b60208301525095945050505050565b6102208101611ea4828761161c565b60408083018660005b6002808210611ebc5750611ef7565b82518460005b83811015611ee0578251825260209283019290910190600101611ec2565b505050928401925060209190910190600101611ead565b50505050611f0860c083018561161c565b61010082018360005b6009811015611f30578151835260209283019290910190600101611f11565b50505095945050505050565b600060208284031215611f4e57600080fd5b61138c82611cea565b600060033d1115611f705760046000803e5060005160e01c5b90565b600060443d1015611f815790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715611fb057505050505090565b8285019150815181811115611fc85750505050505090565b843d8701016020828501011115611fe25750505050505090565b611ff160208286010187611565565b509095945050505050565b60208152600061138c602083018461174a565b60008060233d111561202b576020600460003e50506000516001905b9091565b60008261204c57634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220202c7874d91a345d5d1d262476c8976188ed40687e181d4b647f63471e63576b64736f6c634300080e0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063c776adde11610066578063c776adde14610230578063c9cdef0414610243578063e60f999f14610256578063f2fde38b1461026957600080fd5b80638da5cb5b146101d3578063af411a30146101ea578063bfa665851461020a57600080fd5b806354846d7a116100c857806354846d7a1461015c57806363e4afc2146101915780637000b051146101a4578063715018a6146101cb57600080fd5b8063124d7199146100ef5780632785e3221461010457806346657fe914610122575b600080fd5b6101026100fd366004611600565b61027c565b005b61010c6102c2565b604051610119919061163f565b60405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b039091168152602001610119565b6101837f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610119565b61014461019f36600461164d565b6102d7565b6101837f000000000000000000000000000000000000000000000000000000000000000081565b6101026102f6565b6000546201000090046001600160a01b0316610144565b6101fd6101f83660046116ae565b610333565b60405161011991906117d9565b7f0000000000000000000000000000000000000000000000000000000000000000610144565b6101fd61023e366004611860565b61048d565b610102610251366004611911565b610848565b6101fd6102643660046116ae565b610915565b610102610277366004611949565b610a31565b6000546001600160a01b03620100009091041633146102b65760405162461bcd60e51b81526004016102ad90611966565b60405180910390fd5b6102bf81610adf565b50565b6102ca6113f7565b6102d2610b27565b905090565b6000818152600360205260408120546001600160a01b03165b92915050565b6000546001600160a01b03620100009091041633146103275760405162461bcd60e51b81526004016102ad90611966565b6103316000610b61565b565b60606000610348610343866119c2565b610bbc565b60408051600180825281830190925291925060009190816020015b61036b611415565b8152602001906001900390816103635750506060830151519091506000906103bc906001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000611b51565b90507f000000000000000000000000000000000000000000000000000000000000000081111561040257604051637bbf29e360e01b8152600481018290526024016102ad565b60003090506040518060c0016040528083815260200185604001516001600160a01b03168152602001826001600160a01b03168152602001856020015181526020014263ffffffff168152602001604051806020016040528060008152508152508360008151811061047657610476611b69565b602090810291909101015250909695505050505050565b60606000856001600160401b038111156104a9576104a961150b565b6040519080825280602002602001820160405280156104d2578160200160208202803683370190505b5090506000866001600160401b038111156104ef576104ef61150b565b604051908082528060200260200182016040528015610518578160200160208202803683370190505b5090506000876001600160401b038111156105355761053561150b565b60405190808252806020026020018201604052801561056e57816020015b61055b611415565b8152602001906001900390816105535790505b50905060005b88811015610742576000806000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633be1ced78f8f888181106105c3576105c3611b69565b905060200201358e6040518363ffffffff1660e01b81526004016105fa9291909182526001600160a01b0316602082015260400190565b600060405180830381865afa158015610617573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261063f9190810190611b7f565b93509350935093508b88868151811061065a5761065a611b69565b60200260200101906001600160a01b031690816001600160a01b0316815250508d8d8681811061068c5761068c611b69565b905060200201358786815181106106a5576106a5611b69565b6020026020010181815250506040518060c001604052808f8f888181106106ce576106ce611b69565b9050602002013581526020018d6001600160a01b03168152602001856001600160a01b031681526020018481526020018363ffffffff1681526020018281525086868151811061072057610720611b69565b602002602001018190525050505050808061073a90611c3a565b915050610574565b5061074e818787610c70565b60405163811a6af760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063811a6af79061079c9086908690600401611c53565b600060405180830381600087803b1580156107b657600080fd5b505af11580156107ca573d6000803e3d6000fd5b5050505060005b8881101561083b577f01cba57fa881d11e8be5640b6abefb9709f2dd45f776051b2cf5cb8ea23fa56b82828151811061080c5761080c611b69565b60200260200101516040516108219190611cd7565b60405180910390a18061083381611c3a565b9150506107d1565b5098975050505050505050565b600054610100900460ff166108635760005460ff1615610867565b303b155b6108ca5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102ad565b600054610100900460ff161580156108ec576000805461ffff19166101011790555b6108f582610b61565b6108fe83610adf565b8015610910576000805461ff00191690555b505050565b6060610922848484610c89565b600061092f858585610333565b905061093c858585610cd1565b60405163ebc5c09360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ebc5c093906109889084906004016117d9565b600060405180830381600087803b1580156109a257600080fd5b505af11580156109b6573d6000803e3d6000fd5b5050505060005b8151811015610a28577f336e708b72b2b4a27a0c25e8cce7f97512e7f1e8dcaf800b100075e62c1eb1fc8282815181106109f9576109f9611b69565b6020026020010151604051610a0e9190611cd7565b60405180910390a180610a2081611c3a565b9150506109bd565b50949350505050565b6000546001600160a01b0362010000909104163314610a625760405162461bcd60e51b81526004016102ad90611966565b6001600160a01b038116610ac75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ad565b6102bf81610b61565b6001600160a01b03163b151590565b610aec6001826002611463565b507fda2ca1df50078dd7395bf2d1fe6c66f2133d7b56d4d1e671f564010981f204df81604051610b1c919061163f565b60405180910390a150565b610b2f6113f7565b60408051808201918290529060019060029082845b815481526020019060010190808311610b44575050505050905090565b600080546001600160a01b038381166201000081810262010000600160b01b0319851617855560405193049190911692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a35050565b610bf36040805160808101825260008082526020808301829052828401829052835180850190945281845283015290606082015290565b60008260000151600081518110610c0c57610c0c611b69565b60200260200101519050610c1f81610d3a565b60008160400151806020019051810190610c399190611cfa565b60408051608081018252845181526020948501518582015295909301516001600160a01b0316928501929092525060608301525090565b604051630d5cd8d960e11b815260040160405180910390fd5b6000610c9782840184611dc4565b90506000610ca482610d7e565b90506000610cb4610343876119c2565b9050610cc08183610e1a565b610cc98361105d565b505050505050565b6000610cdd83836111f6565b6000818152600360205260409020549091506001600160a01b03168015610d1a57604051631f5d53e360e01b8152600481018390526024016102ad565b610d3382610d2e6040880160208901611949565b61121b565b5050505050565b6000610d498260400151611281565b82519091508114610d7a5781516040516337e3d1ab60e01b81526102ad918391600401918252602082015260400190565b5050565b610d866114a6565b604051806101000160405280610d9b846112b6565b6001600160a01b03168152602001610db2846112cb565b8152602001610dc0846112da565b8152602001610dce846112e9565b8152602001610ddc846112f8565b8152602001610dea84611307565b8152602001610e028460200151610100015160011490565b15158152602001610e1284611316565b905292915050565b8151604082015114610e4f57815160408281015190516347a9715d60e01b8152600481019290925260248201526044016102ad565b81606001516020015115158160c00151151503610e985760608201516020015160c0820151604051634629f1b560e11b81529115156004830152151560248201526044016102ad565b81604001516001600160a01b031681600001516001600160a01b031614610eec57604082810151825191516370a8d99b60e11b81526001600160a01b039182166004820152911660248201526044016102ad565b60408201516001600160a01b03163314610f30576040808301519051632bfa317f60e11b81523360048201526001600160a01b0390911660248201526044016102ad565b46816020015114610f63576020810151604051630432cec160e31b815246600482015260248101919091526044016102ad565b81602001518160a0015114610f9e57602082015160a0820151604051630626ade360e41b8152600481019290925260248201526044016102ad565b6000610fa8610b27565b805160e084015151919250141580610fcd575060208082015160e08401519091015114155b1561101657805160208083015160e0850151805192015160405163f71cb0f760e01b815260048101949094526024840191909152604483019190915260648201526084016102ad565b60006110218461136e565b9050808360600151146110575760608301516040516377bb6d2760e11b81526102ad918391600401918252602082015260400190565b50505050565b8051805160208083015160409384015191850151935163c542c93b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169463c542c93b946110c094909392909190600401611e95565b602060405180830381865afa9250505080156110f9575060408051601f3d908101601f191682019092526110f691810190611f3c565b60015b6111cf57611105611f57565b806308c379a00361113e5750611119611f73565b80611124575061117d565b8060405162dd577760e81b81526004016102ad9190611ffc565b634e487b710361117d5761115061200f565b9061115b575061117d565b60405162dd577760e81b815260206004820152600060248201526044016102ad565b3d8080156111a7576040519150601f19603f3d011682016040523d82523d6000602084013e6111ac565b606091505b5060405162dd577760e81b815260206004820152600060248201526044016102ad565b80610d7a5760405162dd577760e81b815260206004820152600060248201526044016102ad565b60008061120583850185611dc4565b90506000611212826112f8565b95945050505050565b60008281526003602090815260409182902080546001600160a01b0319166001600160a01b0385169081179091558251858152918201527f38ff70eda64ebd48cbf0a5a4e1be5c5d509a7cdb60258e5a9210c1c0508dcbef910160405180910390a15050565b805160208201206000906102f0907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f00000019061202f565b6020810151600090815b602002015192915050565b602081015160009060016112c0565b602081015160009060046112c0565b602081015160009060056112c0565b602081015160009060066112c0565b602081015160009060076112c0565b61131e6113f7565b6040518060400160405280836020015160026009811061134057611340611b69565b60200201518152602001836020015160036009811061136157611361611b69565b6020020151905292915050565b60008061138c308460600151600001516001600160801b0316611393565b9392505050565b604080516001600160a01b03841660208201529081018290526000907f30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001906060016040516020818303038152906040528051906020012060001c61138c919061202f565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600063ffffffff168152602001606081525090565b8260028101928215611491579160200282015b82811115611491578251825591602001919060010190611476565b5061149d9291506114f6565b5090565b905290565b60405180610100016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016114a16113f7565b5b8082111561149d57600081556001016114f7565b634e487b7160e01b600052604160045260246000fd5b604081018181106001600160401b03821117156115405761154061150b565b60405250565b606081018181106001600160401b03821117156115405761154061150b565b601f8201601f191681016001600160401b038111828210171561158a5761158a61150b565b6040525050565b600082601f8301126115a257600080fd5b604051604081018181106001600160401b03821117156115c4576115c461150b565b80604052508060408401858111156115db57600080fd5b845b818110156115f55780358352602092830192016115dd565b509195945050505050565b60006040828403121561161257600080fd5b61138c8383611591565b8060005b6002811015611057578151845260209384019390910190600101611620565b604081016102f0828461161c565b60006020828403121561165f57600080fd5b5035919050565b60008083601f84011261167857600080fd5b5081356001600160401b0381111561168f57600080fd5b6020830191508360208285010111156116a757600080fd5b9250929050565b6000806000604084860312156116c357600080fd5b83356001600160401b03808211156116da57600080fd5b90850190604082880312156116ee57600080fd5b9093506020850135908082111561170457600080fd5b5061171186828701611666565b9497909650939450505050565b60005b83811015611739578181015183820152602001611721565b838111156110575750506000910152565b6000815180845261176281602086016020860161171e565b601f01601f19169290920160200192915050565b805182526000602082015160018060a01b03808216602086015280604085015116604086015250506060820151606084015263ffffffff608083015116608084015260a082015160c060a08501526117d160c085018261174a565b949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561182e57603f1988860301845261181c858351611776565b94509285019290850190600101611800565b5092979650505050505050565b6001600160a01b03811681146102bf57600080fd5b803561185b8161183b565b919050565b60008060008060006060868803121561187857600080fd5b85356001600160401b038082111561188f57600080fd5b818801915088601f8301126118a357600080fd5b8135818111156118b257600080fd5b8960208260051b85010111156118c757600080fd5b602083019750809650506118dd60208901611850565b945060408801359150808211156118f357600080fd5b5061190088828901611666565b969995985093965092949392505050565b6000806060838503121561192457600080fd5b61192e8484611591565b9150604083013561193e8161183b565b809150509250929050565b60006020828403121561195b57600080fd5b813561138c8161183b565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006001600160401b038211156119b4576119b461150b565b50601f01601f191660200190565b600060408083360312156119d557600080fd5b80516119e081611521565b83356001600160401b03808211156119f757600080fd5b9085019036601f830112611a0a57600080fd5b8135602082821115611a1e57611a1e61150b565b8160051b8651611a3083830182611565565b92835284810182019282810136851115611a4957600080fd5b83870192505b84831015611b1d57823586811115611a675760008081fd5b8701606036829003601f1901811315611a805760008081fd5b8a51611a8b81611546565b8287013581528b83013581880152908201359088821115611aac5760008081fd5b9181019136603f840112611ac257600091508182fd5b868301359150611ad18261199b565b8c51611add8282611565565b838152368e858701011115611af457600091508182fd5b838e86018a830137600093810189019390935250808c0191909152825250918301918301611a4f565b50865250611b2c888201611850565b90850152509195945050505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611b6457611b64611b3b565b500190565b634e487b7160e01b600052603260045260246000fd5b60008060008060808587031215611b9557600080fd5b8451611ba08161183b565b60208601516040870151919550935063ffffffff81168114611bc157600080fd5b60608601519092506001600160401b03811115611bdd57600080fd5b8501601f81018713611bee57600080fd5b8051611bf98161199b565b604051611c068282611565565b828152896020848601011115611c1b57600080fd5b611c2c83602083016020870161171e565b969995985093965050505050565b600060018201611c4c57611c4c611b3b565b5060010190565b604080825283519082018190526000906020906060840190828701845b82811015611c955781516001600160a01b031684529284019290840190600101611c70565b5050508381038285015284518082528583019183019060005b81811015611cca57835183529284019291840191600101611cae565b5090979650505050505050565b60208152600061138c6020830184611776565b8051801515811461185b57600080fd5b600060408284031215611d0c57600080fd5b604051604081018181106001600160401b0382111715611d2e57611d2e61150b565b60405282516001600160801b0381168114611d4857600080fd5b8152611d5660208401611cea565b60208201529392505050565b600082601f830112611d7357600080fd5b6040516101208082018281106001600160401b0382111715611d9757611d9761150b565b60405283018185821115611daa57600080fd5b845b828110156115f5578035825260209182019101611dac565b6000818303610220811215611dd857600080fd5b60408051611de581611521565b61010080841215611df557600080fd5b82519350611e0284611546565b611e0c8787611591565b845286605f870112611e1d57600080fd5b8251611e2881611521565b8060c0880189811115611e3a57600080fd5b8589015b81811015611e5f57611e508b82611591565b83526020909201918601611e3e565b50826020880152611e708a82611591565b86880152505050838252611e8687828801611d62565b60208301525095945050505050565b6102208101611ea4828761161c565b60408083018660005b6002808210611ebc5750611ef7565b82518460005b83811015611ee0578251825260209283019290910190600101611ec2565b505050928401925060209190910190600101611ead565b50505050611f0860c083018561161c565b61010082018360005b6009811015611f30578151835260209283019290910190600101611f11565b50505095945050505050565b600060208284031215611f4e57600080fd5b61138c82611cea565b600060033d1115611f705760046000803e5060005160e01c5b90565b600060443d1015611f815790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715611fb057505050505090565b8285019150815181811115611fc85750505050505090565b843d8701016020828501011115611fe25750505050505090565b611ff160208286010187611565565b509095945050505050565b60208152600061138c602083018461174a565b60008060233d111561202b576020600460003e50506000516001905b9091565b60008261204c57634e487b7160e01b600052601260045260246000fd5b50069056fea2646970667358221220202c7874d91a345d5d1d262476c8976188ed40687e181d4b647f63471e63576b64736f6c634300080e0033", - "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": 8437, - "contract": "contracts/attesters/pythia-1/Pythia1SimpleAttester.sol:Pythia1SimpleAttester", - "label": "_commitmentSignerPubKey", - "offset": 0, - "slot": "1", - "type": "t_array(t_uint256)2_storage" - }, - { - "astId": 8441, - "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/solcInputs/24c70469fd559e01f6ff2a10472da9a6.json b/deployments/mumbai/solcInputs/24c70469fd559e01f6ff2a10472da9a6.json new file mode 100644 index 0000000..f931f7d --- /dev/null +++ b/deployments/mumbai/solcInputs/24c70469fd559e01f6ff2a10472da9a6.json @@ -0,0 +1,237 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/AccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.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);\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 `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\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(account),\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 * May emit a {RoleGranted} event.\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 * May emit a {RoleRevoked} event.\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 * May emit a {RoleRevoked} event.\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 * May emit a {RoleGranted} event.\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 * May emit a {RoleGranted} event.\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 * May emit a {RoleRevoked} event.\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/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/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\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 the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\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" + }, + "@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/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/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (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 initializing the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\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/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/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.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 overridden 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 internal 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 overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\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 prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 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 Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized < type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initialized`\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initializing`\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts/security/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (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 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 _requireNotPaused();\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 _requirePaused();\n _;\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 Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\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/token/ERC1155/ERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (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: address zero is not a valid owner\");\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 token owner or 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: caller is not token owner or 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 uint256[] memory ids = _asSingletonArray(id);\n uint256[] memory amounts = _asSingletonArray(amount);\n\n _beforeTokenTransfer(operator, from, to, ids, amounts, 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 _afterTokenTransfer(operator, from, to, ids, amounts, data);\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 _afterTokenTransfer(operator, from, to, ids, amounts, data);\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 uint256[] memory ids = _asSingletonArray(id);\n uint256[] memory amounts = _asSingletonArray(amount);\n\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n _balances[id][to] += amount;\n emit TransferSingle(operator, address(0), to, id, amount);\n\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\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 * 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 _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 _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\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 * Emits a {TransferSingle} event.\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 uint256[] memory ids = _asSingletonArray(id);\n uint256[] memory amounts = _asSingletonArray(amount);\n\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \"\");\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 _afterTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\n *\n * Emits a {TransferBatch} event.\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 _afterTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n }\n\n /**\n * @dev Approve `operator` to operate on all of `owner` tokens\n *\n * Emits an {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 `ids` and `amounts` 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 /**\n * @dev Hook that is called after 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 _afterTokenTransfer(\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/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/token/ERC1155/IERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (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 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/ERC721/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.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: address zero is not a valid owner\");\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 = _ownerOf(tokenId);\n require(owner != address(0), \"ERC721: invalid token ID\");\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 _requireMinted(tokenId);\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 overridden 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 token owner or 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 _requireMinted(tokenId);\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: caller is not token owner or 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: caller is not token owner or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist\n */\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\n return _owners[tokenId];\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 _ownerOf(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 address owner = ERC721.ownerOf(tokenId);\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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, 1);\n\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n unchecked {\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\n // Given that tokens are minted one by one, it is impossible in practice that\n // this ever happens. Might change if we allow batch minting.\n // The ERC fails to describe this case.\n _balances[to] += 1;\n }\n\n _owners[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n\n _afterTokenTransfer(address(0), to, tokenId, 1);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n * This is an internal function that does not check if the sender is authorized to operate on the token.\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, 1);\n\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\n owner = ERC721.ownerOf(tokenId);\n\n // Clear approvals\n delete _tokenApprovals[tokenId];\n\n unchecked {\n // Cannot overflow, as that would require more tokens to be burned/transferred\n // out than the owner initially received through minting and transferring in.\n _balances[owner] -= 1;\n }\n delete _owners[tokenId];\n\n emit Transfer(owner, address(0), tokenId);\n\n _afterTokenTransfer(owner, address(0), tokenId, 1);\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, 1);\n\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\n require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n\n // Clear approvals from the previous owner\n delete _tokenApprovals[tokenId];\n\n unchecked {\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\n // `from`'s balance is the number of token held, which is at least one before the current\n // transfer.\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\n // all 2**256 token ids to be minted, which in practice is impossible.\n _balances[from] -= 1;\n _balances[to] += 1;\n }\n _owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n\n _afterTokenTransfer(from, to, tokenId, 1);\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits an {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 an {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 Reverts if the `tokenId` has not been minted yet.\n */\n function _requireMinted(uint256 tokenId) internal view virtual {\n require(_exists(tokenId), \"ERC721: invalid token ID\");\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 /// @solidity memory-safe-assembly\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 and burning. If {ERC721Consecutive} is\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\n * - When `from` is zero, the tokens will be minted for `to`.\n * - When `to` is zero, ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n * - `batchSize` is non-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, /* firstTokenId */\n uint256 batchSize\n ) internal virtual {\n if (batchSize > 1) {\n if (from != address(0)) {\n _balances[from] -= batchSize;\n }\n if (to != address(0)) {\n _balances[to] += batchSize;\n }\n }\n }\n\n /**\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\n * - When `from` is zero, the tokens were minted for `to`.\n * - When `to` is zero, ``from``'s tokens were burned.\n * - `from` and `to` are never both zero.\n * - `batchSize` is non-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 firstTokenId,\n uint256 batchSize\n ) internal virtual {}\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/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (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`.\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 /**\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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\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 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 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 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" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.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/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, \"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 (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or 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 _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\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 /// @solidity memory-safe-assembly\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" + }, + "@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/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/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10**64) {\n value /= 10**64;\n result += 64;\n }\n if (value >= 10**32) {\n value /= 10**32;\n result += 32;\n }\n if (value >= 10**16) {\n value /= 10**16;\n result += 16;\n }\n if (value >= 10**8) {\n value /= 10**8;\n result += 8;\n }\n if (value >= 10**4) {\n value /= 10**4;\n result += 4;\n }\n if (value >= 10**2) {\n value /= 10**2;\n result += 2;\n }\n if (value >= 10**1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (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 /// @solidity memory-safe-assembly\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 /// @solidity memory-safe-assembly\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 /// @solidity memory-safe-assembly\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 /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\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 unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\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 unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\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] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\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 [8609986746108439658545470593166889256314951959466775818870246174320018498804,\n 6848251127850009101372611262053374737897586140140607384018397707035108265914],\n [21367916863936594568281095443965096905143705300114190558130516981138584550504,\n 13327705762185115653848159709412003423932761899188342359583872691135383932883]\n );\n vk.IC = new Pairing.G1Point[](11);\n \n vk.IC[0] = Pairing.G1Point( \n 19965766170734310004645394427613286415565755728797065894668054116047682895204,\n 6952067612339183672227137101423582097916038093373585908267153974352032944482\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 13987716160490730015463796942940452666334097189904948795214986996497499925899,\n 5336810094802209074340875836312868429276540870324469349093948627126061524544\n ); \n \n vk.IC[4] = Pairing.G1Point( \n 14931593253473978964215343699995811275378324235306358485461293343370969283966,\n 564306919152089917957316877787764763278299990971316475606280877961553231205\n ); \n \n vk.IC[5] = Pairing.G1Point( \n 11591267743733991434114686002448165336885445656808796470854638278338319268343,\n 11495219763417990955889652410266075210402006084183208750635660647824890013350\n ); \n \n vk.IC[6] = Pairing.G1Point( \n 8183184532870222270700473518157259944911700429689031755853536692005688965081,\n 9121077094104828462137861111631978599019724423614716723152060153405564278301\n ); \n \n vk.IC[7] = Pairing.G1Point( \n 4314095526093128699362232919686741372014146055311239687202926853002748112330,\n 11665330391505820654128458332883010598817535082070674418723503440883598640597\n ); \n \n vk.IC[8] = Pairing.G1Point( \n 19602244162575575785636531633124796303002902053486919698240132790672698216585,\n 181057165072599074288983745076121344893296348827576905983079816835912241514\n ); \n \n vk.IC[9] = Pairing.G1Point( \n 18925967077785550270509493111690046951994174908254476036944536825999614778001,\n 4990629719417206796668074534812314525340851981015724652256935997545282642849\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" + }, + "@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/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 {Attester} from '../../../core/Attester.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 the following:\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 */\nabstract contract HydraS1Base is IHydraS1Base, Attester, 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 /**\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 nullifier from an attestation extraData\n * @dev Getter of a nullifier encoded in extraData\n * @notice Must be implemented by the inheriting contracts\n * @param extraData extraData where nullifier can be encoded\n */\n function getNullifierFromExtraData(\n bytes memory extraData\n ) external view virtual returns (uint256);\n\n /**\n * @dev MANDATORY: must be implemented to return the external nullifier from a user request\n * so it can be checked against snark input\n * nullifier = hash(sourceSecretHash, externalNullifier), 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 external nullifiers\n *\n * Do they get one external nullifier per claim?\n * Do they get 2 external nullifiers per claim?\n * Do they get 1 external nullifier 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 _getExternalNullifierOfClaim(\n HydraS1Claim memory claim\n ) internal view virtual 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(\n HydraS1Claim memory claim,\n HydraS1ProofInput memory input\n ) internal view virtual {\n if (input.accountsTreeValue != claim.groupId) {\n revert AccountsTreeValueMismatch(claim.groupId, input.accountsTreeValue);\n }\n\n if (input.isStrict == claim.groupProperties.isScore) {\n revert IsStrictMismatch(claim.groupProperties.isScore, input.isStrict);\n }\n\n if (input.destination != claim.destination) {\n revert DestinationMismatch(claim.destination, input.destination);\n }\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\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\n uint256 externalNullifier = _getExternalNullifierOfClaim(claim);\n\n if (input.externalNullifier != externalNullifier) {\n revert ExternalNullifierMismatch(externalNullifier, input.externalNullifier);\n }\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(uint256 /*errorCode*/) {\n revert InvalidGroth16Proof('');\n } catch (bytes memory /*lowLevelData*/) {\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 {IAttester} from '../../../core/interfaces/IAttester.sol';\nimport {HydraS1Verifier, HydraS1Lib, HydraS1ProofData} 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 Interface\n * @author Sismo\n * @notice Interface 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 errors and method specific of the Hydra-S1 attesters family and the Hydra-S1 ZK Proving Scheme\n * We invite readers to refer to the following:\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 **/\ninterface IHydraS1Base is IAttester {\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 ExternalNullifierMismatch(uint256 expectedExternalNullifier, uint256 externalNullifier);\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 function getNullifierFromExtraData(bytes memory extraData) external view returns (uint256);\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" + }, + "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.14;\npragma experimental ABIEncoderV2;\n\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\n\nimport {IHydraS1AccountboundAttester} from './interfaces/IHydraS1AccountboundAttester.sol';\n\n// Core protocol Protocol imports\nimport {Request, Attestation, Claim} from '../../core/libs/Structs.sol';\n\n// Imports related to Hydra-S1\nimport {HydraS1SimpleAttester, IAttester, HydraS1Lib, HydraS1ProofData, HydraS1Claim} from './HydraS1SimpleAttester.sol';\n\n/**\n * @title Hydra-S1 Accountbound 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 Simple Attester contract is inherited and holds the complex Hydra S1 verification logic.\n * Request verification alongside proof verification is already implemented in the inherited HydraS1SimpleAttester, along with the buildAttestations logic.\n * However, we override the buildAttestations function to encode the nullifier and its burn count in the user attestation.\n * The _beforeRecordAttestations is also overriden to fit the Accountbound 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 * - Nullified\n * Each source account gets one nullifier per claim (i.e only one attestation per source account per claim)\n * While semaphore/ tornado cash are using the following notations: nullifierHash = hash(IdNullifier, externalNullifier)\n * We prefered to use the naming 'nullifier' instead of 'nullifierHash' in our contracts and documentation.\n * We also renamed 'IdNullifier' in 'sourceSecret' (the secret tied to a source account) and we kept the 'externalNullifier' notation.\n * Finally, here is our notations at Sismo: nullifier = hash(sourceSecret, externalNullifier)\n\n * - Accountbound (opt-in, with cooldown period)\n * The owner of this attester can set a cooldown duration for a specific group, activating the accountbound feature for this group.\n * Users can update their attestation's destination by providing a new Hydra-S1 ZK proof \n * It means the attestation is bound to the source account, stored on an updatable destination account.\n * When deleting/ sending to a new destination, the nullifier will enter a cooldown period, so it remains occasional.\n * A group that has its cooldown duration set to 0 means it has been configured to not feature accountbound attestations, attestations can not be transferred\n * One can however know that the former and the new destinations were created using the same nullifier, thus creating a link between those two destinations.\n \n * - Renewable\n * A nullifier 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 **/\n\ncontract HydraS1AccountboundAttester is\n IHydraS1AccountboundAttester,\n HydraS1SimpleAttester,\n Ownable\n{\n using HydraS1Lib for HydraS1ProofData;\n using HydraS1Lib for bytes;\n using HydraS1Lib for Request;\n\n uint8 public constant IMPLEMENTATION_VERSION = 4;\n\n /*******************************************************\n Storage layout:\n 20 slots between HydraS1SimpleAttester and HydraS1AccountboundAttester\n 1 currently used by Ownable\n 19 place holders\n 2O for config\n 1 currently used\n 19 place holders\n 20 for logic\n 2 currently used\n 18 place holders\n *******************************************************/\n\n // keeping some space for future config logics\n uint256[19] private _placeHolderBeforeHydraS1Accountbound;\n\n // cooldown durations for each groupIndex\n mapping(uint256 => uint32) internal _cooldownDurations;\n\n // keeping some space for future config logics\n uint256[19] private _placeHoldersHydraS1AccountboundConfig;\n\n mapping(uint256 => uint32) internal _nullifiersCooldownStart;\n mapping(uint256 => uint16) internal _nullifiersBurnCount;\n\n // keeping some space for future config logics\n uint256[18] private _placeHoldersHydraS1AccountboundLogic;\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 attestation collection in which the attester is supposed to record\n * @param collectionIdLast Id of the last attestation collection in which the attester is supposed to record\n * @param owner Address of attester's owner\n */\n constructor(\n address attestationsRegistryAddress,\n address hydraS1VerifierAddress,\n address availableRootsRegistryAddress,\n address commitmentMapperAddress,\n uint256 collectionIdFirst,\n uint256 collectionIdLast,\n address owner\n )\n HydraS1SimpleAttester(\n attestationsRegistryAddress,\n hydraS1VerifierAddress,\n availableRootsRegistryAddress,\n commitmentMapperAddress,\n collectionIdFirst,\n collectionIdLast\n )\n {\n initialize(owner);\n }\n\n /**\n * @dev Initialize function, to be called by the proxy delegating calls to this implementation\n * @param ownerAddress Owner of the contract, has the right to authorize/unauthorize attestations issuers\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\n */\n function initialize(address ownerAddress) public reinitializer(IMPLEMENTATION_VERSION) {\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\n if (owner() == address(0) || address(this).code.length == 0) {\n _transferOwnership(ownerAddress);\n }\n }\n\n /*******************************************************\n MANDATORY FUNCTIONS TO OVERRIDE FROM ATTESTER.SOL\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(\n Request calldata request,\n bytes calldata proofData\n ) public view virtual override(IAttester, HydraS1SimpleAttester) returns (Attestation[] memory) {\n Attestation[] memory attestations = super.buildAttestations(request, proofData);\n\n uint256 nullifier = proofData._getNullifier();\n attestations[0].extraData = abi.encodePacked(\n attestations[0].extraData, // nullifier, from HydraS1 Simple\n _getNextBurnCount(nullifier, attestations[0].owner) // BurnCount\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 nullifier already used, not a renewal, and nullifier 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(\n Request calldata request,\n bytes calldata proofData\n ) internal virtual override {\n uint256 nullifier = proofData._getNullifier();\n address previousNullifierDestination = _getDestinationOfNullifier(nullifier);\n\n HydraS1Claim memory claim = request._claim();\n\n // check if the nullifier has already been used previously, if so it may be on cooldown\n if (\n previousNullifierDestination != address(0) &&\n previousNullifierDestination != claim.destination\n ) {\n uint32 cooldownDuration = _getCooldownDurationForGroupIndex(claim.groupProperties.groupIndex);\n if (cooldownDuration == 0) {\n revert CooldownDurationNotSetForGroupIndex(claim.groupProperties.groupIndex);\n }\n if (_isOnCooldown(nullifier, cooldownDuration)) {\n uint16 burnCount = _getNullifierBurnCount(nullifier);\n revert NullifierOnCooldown(\n nullifier,\n previousNullifierDestination,\n burnCount,\n cooldownDuration\n );\n }\n\n // Delete the old Attestation linked to the nullifier before recording the new one (accountbound feature)\n _deletePreviousAttestation(claim, previousNullifierDestination);\n\n _setNullifierOnCooldownAndIncrementBurnCount(nullifier);\n }\n _setDestinationForNullifier(nullifier, request.destination);\n }\n\n /*******************************************************\n LOGIC FUNCTIONS RELATED TO ACCOUNTBOUND FEATURE\n *******************************************************/\n\n /**\n * @dev Getter, returns the burnCount of a nullifier\n * @param nullifier nullifier used\n **/\n function getNullifierBurnCount(uint256 nullifier) external view returns (uint16) {\n return _getNullifierBurnCount(nullifier);\n }\n\n /**\n * @dev Getter, returns the cooldown start of a nullifier\n * @param nullifier nullifier used\n **/\n function getNullifierCooldownStart(uint256 nullifier) external view returns (uint32) {\n return _getNullifierCooldownStart(nullifier);\n }\n\n /**\n * @dev returns the nullifier for a given extraData\n * @param extraData bytes where the nullifier is encoded\n */\n function getNullifierFromExtraData(\n bytes memory extraData\n ) external pure override(HydraS1SimpleAttester, IHydraS1AccountboundAttester) returns (uint256) {\n (uint256 nullifier, ) = abi.decode(extraData, (uint256, uint16));\n\n return nullifier;\n }\n\n /**\n * @dev Returns the burn count for a given extraData\n * @param extraData bytes where the burnCount is encoded\n */\n function getBurnCountFromExtraData(bytes memory extraData) external pure returns (uint16) {\n (, uint16 burnCount) = abi.decode(extraData, (uint256, uint16));\n\n return burnCount;\n }\n\n /**\n * @dev Checks if a nullifier is on cooldown\n * @param nullifier user nullifier\n * @param cooldownDuration waiting time before the user can change its badge destination\n */\n function _isOnCooldown(uint256 nullifier, uint32 cooldownDuration) internal view returns (bool) {\n return _getNullifierCooldownStart(nullifier) + cooldownDuration > block.timestamp;\n }\n\n /**\n * @dev Delete the previous attestation created with this nullifier\n * @param claim user claim\n * @param previousNullifierDestination previous destination chosen for this user nullifier\n */\n function _deletePreviousAttestation(\n HydraS1Claim memory claim,\n address previousNullifierDestination\n ) internal {\n address[] memory attestationOwners = new address[](1);\n uint256[] memory attestationCollectionIds = new uint256[](1);\n\n attestationOwners[0] = previousNullifierDestination;\n attestationCollectionIds[0] = AUTHORIZED_COLLECTION_ID_FIRST + claim.groupProperties.groupIndex;\n\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\n }\n\n function _setNullifierOnCooldownAndIncrementBurnCount(uint256 nullifier) internal {\n _nullifiersCooldownStart[nullifier] = uint32(block.timestamp);\n _nullifiersBurnCount[nullifier] += 1;\n emit NullifierSetOnCooldown(nullifier, _nullifiersBurnCount[nullifier]);\n }\n\n function _getNullifierCooldownStart(uint256 nullifier) internal view returns (uint32) {\n return _nullifiersCooldownStart[nullifier];\n }\n\n function _getNullifierBurnCount(uint256 nullifier) internal view returns (uint16) {\n return _nullifiersBurnCount[nullifier];\n }\n\n /**\n * @dev returns burn count or burn count + 1 if new burn will happen\n * @param nullifier user nullifier\n * @param claimDestination destination referenced in the user claim\n */\n function _getNextBurnCount(\n uint256 nullifier,\n address claimDestination\n ) public view virtual returns (uint16) {\n address previousNullifierDestination = _getDestinationOfNullifier(nullifier);\n uint16 burnCount = _getNullifierBurnCount(nullifier);\n // If the attestation is minted on a new destination address\n // the burnCount that will be encoded in the extraData of the Attestation should be incremented\n if (\n previousNullifierDestination != address(0) && previousNullifierDestination != claimDestination\n ) {\n burnCount += 1;\n }\n return burnCount;\n }\n\n /*******************************************************\n GROUP CONFIGURATION LOGIC\n *******************************************************/\n\n /**\n * @dev Setter, sets the cooldown duration of a groupIndex\n * @notice set to 0 to deactivate the accountbound feature for this group\n * @param groupIndex internal collection id\n * @param cooldownDuration cooldown duration we want to set for the groupIndex\n **/\n function setCooldownDurationForGroupIndex(\n uint256 groupIndex,\n uint32 cooldownDuration\n ) external onlyOwner {\n _cooldownDurations[groupIndex] = cooldownDuration;\n emit CooldownDurationSetForGroupIndex(groupIndex, cooldownDuration);\n }\n\n /**\n * @dev Getter, get the cooldown duration of a groupIndex\n * @notice returns 0 when the accountbound feature is deactivated for this group\n * @param groupIndex internal collection id\n **/\n function getCooldownDurationForGroupIndex(uint256 groupIndex) external view returns (uint32) {\n return _getCooldownDurationForGroupIndex(groupIndex);\n }\n\n // = 0 means that the accountbound feature is deactivated for this group\n function _getCooldownDurationForGroupIndex(uint256 groupIndex) internal view returns (uint32) {\n return _cooldownDurations[groupIndex];\n }\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';\nimport {IHydraS1Base} from './base/IHydraS1Base.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 * - Nullified\n * Each source account gets one nullifier per claim (i.e only one attestation per source account per claim)\n * For people used to semaphore/ tornado cash people:\n * nullifier = hash(sourceSecret, externalNullifier) <=> nullifierHash = hash(IdNullifier, externalNullifier)\n \n * - Renewable\n * A nullifier 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 {\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 /*******************************************************\n Storage layout:\n 20 slots for HydraS1\n 1 slot used\n 19 place holders\n *******************************************************/\n\n mapping(uint256 => address) internal _nullifiersDestinations;\n\n // keeping some space for future\n uint256[19] private _placeHoldersHydraS1Simple;\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(\n Request calldata request,\n bytes calldata proofData\n ) internal virtual override {\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(\n Request calldata request,\n bytes calldata proofData\n ) public view virtual override(IAttester, Attester) returns (Attestation[] memory) {\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 uint256 nullifier = proofData._getNullifier();\n\n attestations[0] = Attestation(\n attestationCollectionId,\n claim.destination,\n issuer,\n claim.claimedValue,\n claim.groupProperties.generationTimestamp,\n abi.encode(nullifier)\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 nullifier 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(\n Request calldata request,\n bytes calldata proofData\n ) internal virtual override {\n // we get the nullifier used from the snark input in the data provided\n uint256 nullifier = proofData._getNullifier();\n address currentDestination = _getDestinationOfNullifier(nullifier);\n\n if (currentDestination != address(0) && currentDestination != request.destination) {\n revert NullifierUsed(nullifier);\n }\n\n _setDestinationForNullifier(nullifier, request.destination);\n }\n\n /*******************************************************\n Hydra-S1 MANDATORY FUNCTIONS FROM Hydra-S1 Base Attester\n *******************************************************/\n\n /**\n * @dev Returns the external nullifier from a user claim\n * @param claim user Hydra-S1 claim = have an account with a specific value in a specific group\n * nullifier = hash(sourceSecretHash, externalNullifier), which is verified inside the snark\n * users bring sourceSecretHash as private input in snark which guarantees privacy\n \n * Here we chose externalNullifier = hash(attesterAddress, claim.GroupId)\n * Creates one nullifier per group, per user and makes sure no collision with other attester's nullifiers\n **/\n function _getExternalNullifierOfClaim(\n HydraS1Claim memory claim\n ) internal view override returns (uint256) {\n uint256 externalNullifier = _encodeInSnarkField(\n address(this),\n claim.groupProperties.groupIndex\n );\n return externalNullifier;\n }\n\n /**\n * @dev returns the nullifier for a given extraData\n * @param extraData bytes where the nullifier is encoded\n */\n function getNullifierFromExtraData(\n bytes memory extraData\n ) external pure virtual override(IHydraS1Base, HydraS1Base) returns (uint256) {\n return abi.decode(extraData, (uint256));\n }\n\n /*******************************************************\n Hydra-S1 Attester Specific Functions\n *******************************************************/\n\n /**\n * @dev Getter, returns the last attestation destination of a nullifier\n * @param nullifier nullifier used\n **/\n function getDestinationOfNullifier(uint256 nullifier) external view override returns (address) {\n return _getDestinationOfNullifier(nullifier);\n }\n\n function _setDestinationForNullifier(uint256 nullifier, address destination) internal virtual {\n _nullifiersDestinations[nullifier] = destination;\n emit NullifierDestinationUpdated(nullifier, destination);\n }\n\n function _getDestinationOfNullifier(uint256 nullifier) internal view returns (address) {\n return _nullifiersDestinations[nullifier];\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/IHydraS1AccountboundAttester.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.14;\npragma experimental ABIEncoderV2;\n\nimport {IHydraS1SimpleAttester} from '././IHydraS1SimpleAttester.sol';\n\n/**\n * @title Hydra-S1 Accountbound Interface\n * @author Sismo\n * @notice Interface of the HydraS1AccountboundAttester contract which inherits from the errors, events and methods specific to the HydraS1SimpleAttester interface.\n **/\ninterface IHydraS1AccountboundAttester is IHydraS1SimpleAttester {\n /**\n * @dev Event emitted when the duration of the cooldown duration for a group index (internal collection id) has been set\n * @param groupIndex internal collection id\n * @param cooldownDuration the duration of the cooldown period\n **/\n event CooldownDurationSetForGroupIndex(uint256 indexed groupIndex, uint32 cooldownDuration);\n\n /**\n * @dev Event emitted when the nullifier has been set on cooldown. This happens when the\n * attestation destination of a nullifier has been changed\n * @param nullifier user nullifier\n * @param burnCount the number of times the attestation destination of a nullifier has been changed\n **/\n event NullifierSetOnCooldown(uint256 indexed nullifier, uint16 burnCount);\n\n /**\n * @dev Error when the nullifier is on cooldown. The user have to wait the cooldownDuration\n * before being able to change again the destination address.\n **/\n error NullifierOnCooldown(\n uint256 nullifier,\n address destination,\n uint16 burnCount,\n uint32 cooldownStart\n );\n\n /**\n * @dev Error when the cooldown duration for a given groupIndex is equal to zero.\n * The HydraS1AccountboundAttester behaves like the HydraS1SimpleAttester.\n **/\n error CooldownDurationNotSetForGroupIndex(uint256 groupIndex);\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 returns the nullifier for a given extraData\n * @param extraData bytes where the nullifier is encoded\n */\n function getNullifierFromExtraData(bytes memory extraData) external pure returns (uint256);\n\n /**\n * @dev Returns the burn count for a given extraData\n * @param extraData bytes where the burnCount is encoded\n */\n function getBurnCountFromExtraData(bytes memory extraData) external pure returns (uint16);\n\n /**\n * @dev Getter, returns the cooldown start of a nullifier\n * @param nullifier nullifier used\n **/\n function getNullifierCooldownStart(uint256 nullifier) external view returns (uint32);\n\n /**\n * @dev Getter, returns the burnCount of a nullifier\n * @param nullifier nullifier used\n **/\n function getNullifierBurnCount(uint256 nullifier) external view returns (uint16);\n\n /**\n * @dev Setter, sets the cooldown duration of a groupIndex\n * @param groupIndex internal collection id\n * @param cooldownDuration cooldown duration we want to set for the groupIndex\n **/\n function setCooldownDurationForGroupIndex(uint256 groupIndex, uint32 cooldownDuration) external;\n\n /*/**\n * @dev Getter, get the cooldown duration of a groupIndex\n * @notice returns 0 when the accountbound feature is deactivated for this group\n * @param groupIndex internal collection id\n **/\n function getCooldownDurationForGroupIndex(uint256 groupIndex) external view returns (uint32);\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 {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/**\n * @title Hydra-S1 Accountbound Interface\n * @author Sismo\n * @notice Interface with errors, events and methods specific to the HydraS1SimpleAttester.\n **/\ninterface IHydraS1SimpleAttester is IHydraS1Base {\n /**\n * @dev Error when the nullifier is already used for a destination address\n **/\n error NullifierUsed(uint256 nullifier);\n\n /**\n * @dev Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST\n **/\n error CollectionIdOutOfBound(uint256 collectionId);\n\n /**\n * @dev Event emitted when the nullifier is associated to a destination address.\n **/\n event NullifierDestinationUpdated(uint256 nullifier, address newOwner);\n\n /**\n * @dev Getter, returns the last attestation destination of a nullifier\n * @param nullifier nullifier used\n **/\n function getDestinationOfNullifier(uint256 nullifier) 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/libs/HydraS1AccountboundLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\nimport {Claim, Request} from '../../../core/libs/Structs.sol';\nimport {HydraS1Lib, HydraS1Claim, HydraS1GroupProperties} from './HydraS1Lib.sol';\n\n// user Hydra-S1 claim retrieved form his request\nstruct HydraS1AccountboundClaim {\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 HydraS1AccountboundGroupProperties groupProperties; // user claims the group has the following properties\n}\n\nstruct HydraS1AccountboundGroupProperties {\n uint128 groupIndex;\n uint32 generationTimestamp;\n uint32 cooldownDuration;\n bool isScore;\n}\n\nlibrary HydraS1AccountboundLib {\n error GroupIdAndPropertiesMismatch(uint256 expectedGroupId, uint256 groupId);\n\n function _hydraS1claim(Request memory self) internal pure returns (HydraS1Claim memory) {\n Claim memory claim = self.claims[0];\n _validateClaim(claim);\n\n HydraS1AccountboundGroupProperties memory groupProperties = abi.decode(\n claim.extraData,\n (HydraS1AccountboundGroupProperties)\n );\n\n HydraS1GroupProperties memory hydraS1GroupProperties = HydraS1GroupProperties(\n groupProperties.groupIndex,\n groupProperties.generationTimestamp,\n groupProperties.isScore\n );\n\n return (\n HydraS1Claim(claim.groupId, claim.claimedValue, self.destination, hydraS1GroupProperties)\n );\n }\n\n function _hydraS1Accountboundclaim(\n Request memory self\n ) internal pure returns (HydraS1AccountboundClaim memory) {\n Claim memory claim = self.claims[0];\n _validateClaim(claim);\n\n HydraS1AccountboundGroupProperties memory hydraS1AccountboundGroupProperties = abi.decode(\n claim.extraData,\n (HydraS1AccountboundGroupProperties)\n );\n\n return (\n HydraS1AccountboundClaim(\n claim.groupId,\n claim.claimedValue,\n self.destination,\n hydraS1AccountboundGroupProperties\n )\n );\n }\n\n function _generateGroupIdFromEncodedProperties(\n bytes memory encodedProperties\n ) internal pure returns (uint256) {\n return uint256(keccak256(encodedProperties)) % HydraS1Lib.SNARK_FIELD;\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/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 // externalNullifier\n // nullifier\n // claimedValue\n // accountsTreeValue\n // isStrict\n}\n\nstruct HydraS1ProofInput {\n address destination;\n uint256 chainId;\n uint256 registryRoot;\n uint256 externalNullifier;\n uint256 nullifier;\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 _getNullifier(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(\n HydraS1ProofData memory self\n )\n internal\n pure\n returns (uint256[2] memory, uint256[2][2] memory, uint256[2] memory, uint256[10] memory)\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(\n HydraS1ProofData memory self\n ) internal pure returns (uint256[2] memory) {\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(\n HydraS1ProofData memory self\n ) internal pure returns (uint256) {\n return self.input[5];\n }\n\n function _getNullifier(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 _getNullifier(bytes calldata self) internal pure returns (uint256) {\n HydraS1ProofData memory snarkProofData = abi.decode(self, (HydraS1ProofData));\n uint256 nullifier = uint256(_getNullifier(snarkProofData));\n return nullifier;\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(\n bytes memory encodedProperties\n ) internal pure returns (uint256) {\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/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/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(\n Pythia1Claim memory claim\n ) internal view virtual 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(\n Pythia1Claim memory claim,\n Pythia1ProofInput memory input\n ) internal view virtual {\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(uint256 /*errorCode*/) {\n revert InvalidGroth16Proof('');\n } catch (bytes memory /*lowLevelData*/) {\n revert InvalidGroth16Proof('');\n }\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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\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/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(\n Pythia1ProofData memory self\n )\n internal\n pure\n returns (uint256[2] memory, uint256[2][2] memory, uint256[2] memory, uint256[9] memory)\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(\n Pythia1ProofData memory self\n ) internal pure returns (uint256[2] memory) {\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(\n Pythia1ProofData memory self\n ) internal pure returns (uint256) {\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(\n uint128 internalCollectionId,\n bool isScore\n ) internal pure returns (uint256) {\n return\n _generateGroupIdFromEncodedProperties(_encodeGroupProperties(internalCollectionId, isScore));\n }\n\n function _generateGroupIdFromEncodedProperties(\n bytes memory encodedProperties\n ) internal pure returns (uint256) {\n return uint256(keccak256(encodedProperties)) % Pythia1Lib.SNARK_FIELD;\n }\n\n function _encodeGroupProperties(\n uint128 internalCollectionId,\n bool isScore\n ) internal pure returns (bytes memory) {\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" + }, + "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 uint8 public constant IMPLEMENTATION_VERSION = 3;\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 ownerAddress Owner of the contract, can update public key and address\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\n */\n function initialize(\n uint256[2] memory commitmentSignerPubKey,\n address ownerAddress\n ) public reinitializer(IMPLEMENTATION_VERSION) {\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\n if (owner() == address(0) || address(this).code.length == 0) {\n _transferOwnership(ownerAddress);\n _updateCommitmentSignerPubKey(commitmentSignerPubKey);\n }\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(\n Request calldata request,\n bytes calldata proofData\n ) internal virtual override {\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(\n Request calldata request,\n bytes calldata\n ) public view virtual override(IAttester, Attester) returns (Attestation[] memory) {\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(\n Request calldata request,\n bytes calldata proofData\n ) internal virtual override {\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(\n Pythia1Claim memory claim\n ) internal view override returns (uint256) {\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(\n uint256[2] memory commitmentSignerPubKey\n ) external onlyOwner {\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/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 uint8 public constant IMPLEMENTATION_VERSION = 3;\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 BADGES = IBadges(badgesAddress);\n initialize(owner);\n }\n\n /**\n * @dev Initialize function, to be called by the proxy delegating calls to this implementation\n * @param ownerAddress Owner of the contract, has the right to authorize/unauthorize attestations issuers\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\n */\n function initialize(address ownerAddress) public reinitializer(IMPLEMENTATION_VERSION) {\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\n if (owner() == address(0) || address(this).code.length == 0) {\n _transferOwnership(ownerAddress);\n }\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 owners The owners of the attestations to be deleted\n * @param collectionIds The collection ids of the attestations to be deleted\n */\n function deleteAttestations(\n address[] calldata owners,\n uint256[] calldata collectionIds\n ) external override whenNotPaused {\n if (owners.length != collectionIds.length)\n revert OwnersAndCollectionIdsLengthMismatch(owners, collectionIds);\n\n address issuer = _msgSender();\n for (uint256 i = 0; i < owners.length; i++) {\n AttestationData memory attestationData = _attestationsData[collectionIds[i]][owners[i]];\n\n if (!_isAuthorized(issuer, collectionIds[i]))\n revert IssuerNotAuthorized(issuer, collectionIds[i]);\n delete _attestationsData[collectionIds[i]][owners[i]];\n\n _triggerBadgeTransferEvent(collectionIds[i], owners[i], attestationData.value, 0);\n\n emit AttestationDeleted(\n Attestation(\n collectionIds[i],\n owners[i],\n attestationData.issuer,\n attestationData.value,\n attestationData.timestamp,\n attestationData.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(\n uint256 collectionId,\n address owner\n ) external view override returns (bool) {\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(\n uint256 collectionId,\n address owner\n ) external view override returns (AttestationData memory) {\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(\n uint256 collectionId,\n address owner\n ) external view override returns (uint256) {\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(\n uint256 collectionId,\n address owner\n ) external view override returns (address, uint256, uint32, bytes memory) {\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(\n uint256 collectionId,\n address owner\n ) external view override returns (bytes memory) {\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(\n uint256 collectionId,\n address owner\n ) external view override returns (address) {\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(\n uint256 collectionId,\n address owner\n ) external view override returns (uint32) {\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(\n uint256[] memory collectionIds,\n address[] memory owners\n ) external view override returns (AttestationData[] memory) {\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(\n uint256[] memory collectionIds,\n address[] memory owners\n ) external view override returns (uint256[] memory) {\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(\n uint256 collectionId,\n address owner\n ) internal view returns (AttestationData memory) {\n return (_attestationsData[collectionId][owner]);\n }\n\n function _getAttestationValue(\n uint256 collectionId,\n address owner\n ) internal view returns (uint256) {\n return _attestationsData[collectionId][owner].value;\n }\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(\n Request calldata request,\n bytes calldata proofData\n ) external override returns (Attestation[] memory) {\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 address[] memory attestationOwners = new address[](collectionIds.length);\n\n uint256[] memory attestationCollectionIds = new uint256[](collectionIds.length);\n\n Attestation[] memory attestations = new Attestation[](collectionIds.length);\n\n for (uint256 i = 0; i < collectionIds.length; i++) {\n // fetch attestations from the registry\n (\n address issuer,\n uint256 attestationValue,\n uint32 timestamp,\n bytes memory extraData\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\n\n attestationOwners[i] = attestationsOwner;\n attestationCollectionIds[i] = collectionIds[i];\n\n attestations[i] = (\n Attestation(\n collectionIds[i],\n attestationsOwner,\n issuer,\n attestationValue,\n timestamp,\n extraData\n )\n );\n }\n\n _verifyAttestationsDeletionRequest(attestations, proofData);\n\n _beforeDeleteAttestations(attestations, proofData);\n\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\n\n _afterDeleteAttestations(attestations, proofData);\n\n for (uint256 i = 0; i < collectionIds.length; i++) {\n emit AttestationDeleted(attestations[i]);\n }\n return attestations;\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(\n Request calldata request,\n bytes calldata proofData\n ) public view virtual 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(\n Request calldata request,\n bytes calldata proofData\n ) internal virtual {}\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(\n Attestation[] memory attestations,\n bytes calldata proofData\n ) internal virtual {}\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(\n Attestation[] memory attestations,\n bytes calldata proofData\n ) internal virtual {}\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 uint8 public constant IMPLEMENTATION_VERSION = 3;\n\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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\n */\n function initialize(\n string memory uri,\n address owner\n ) public reinitializer(IMPLEMENTATION_VERSION) {\n // if proxy did not setup uri yet or if called by constructor (for implem setup)\n if (bytes(ERC1155.uri(0)).length == 0 || address(this).code.length == 0) {\n _setURI(uri);\n _grantRole(DEFAULT_ADMIN_ROLE, owner);\n }\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(\n address account,\n uint256 id\n ) public view virtual override(ERC1155, IBadges) returns (uint256) {\n return _attestationsRegistry.getAttestationValue(id, account);\n }\n\n /**\n * @dev Reverts, this is a non transferable ERC115 contract\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n revert BadgesNonTransferrable();\n }\n\n /**\n * @dev Reverts, this is a non transferable ERC115 contract\n */\n function isApprovedForAll(\n address account,\n address operator\n ) public view virtual override returns (bool) {\n revert BadgesNonTransferrable();\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(\n address attestationsRegistry\n ) external override onlyRole(DEFAULT_ADMIN_ROLE) {\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 Getter of the badge issuer\n * @param account Address that holds the badge\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function getBadgeIssuer(address account, uint256 id) external view returns (address) {\n return _attestationsRegistry.getAttestationIssuer(id, account);\n }\n\n /**\n * @dev Getter of the badge timestamp\n * @param account Address that holds the badge\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function getBadgeTimestamp(address account, uint256 id) external view returns (uint32) {\n return _attestationsRegistry.getAttestationTimestamp(id, account);\n }\n\n /**\n * @dev Getter of the badge extra data (it can store nullifier and burnCount)\n * @param account Address that holds the badge\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function getBadgeExtraData(address account, uint256 id) external view returns (bytes memory) {\n return _attestationsRegistry.getAttestationExtraData(id, account);\n }\n\n /**\n * @dev Getter of the value of a specific badge attribute\n * @param id Badge Id to check (= attestationCollectionId)\n * @param index Index of the attribute\n */\n function getAttributeValueForBadge(uint256 id, uint8 index) external view returns (uint8) {\n return _attestationsRegistry.getAttributeValueForAttestationsCollection(id, index);\n }\n\n /**\n * @dev Getter of all badge attributes and their values for a specific badge\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function getAttributesNamesAndValuesForBadge(\n uint256 id\n ) external view returns (bytes32[] memory, uint8[] memory) {\n return _attestationsRegistry.getAttributesNamesAndValuesForAttestationsCollection(id);\n }\n\n /**\n * @dev ERC165\n */\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override(AccessControl, ERC1155) returns (bool) {\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" + }, + "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/IAttestationsRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\nimport {Attestation, AttestationData} from '../libs/Structs.sol';\nimport {IAttestationsRegistryConfigLogic} from './IAttestationsRegistryConfigLogic.sol';\n\n/**\n * @title IAttestationsRegistry\n * @author Sismo\n * @notice This is the interface of the AttestationRegistry\n */\ninterface IAttestationsRegistry is IAttestationsRegistryConfigLogic {\n error IssuerNotAuthorized(address issuer, uint256 collectionId);\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\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 owners The owners of the attestations to be deleted\n * @param collectionIds The collection ids of the attestations to be deleted\n */\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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(\n uint256 collectionId,\n address owner\n ) external view 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(\n uint256 collectionId,\n address owner\n ) external view returns (address, uint256, uint32, bytes memory);\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(\n uint256 collectionId,\n address owner\n ) external view 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(\n uint256 collectionId,\n address owner\n ) external view 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(\n uint256 collectionId,\n address owner\n ) external view 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(\n uint256[] memory collectionIds,\n address[] memory owners\n ) external view 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(\n uint256[] memory collectionIds,\n address[] memory owners\n ) external view returns (uint256[] memory);\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 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 error AttributeDoesNotExist(uint8 attributeIndex);\n error AttributeAlreadyExists(uint8 attributeIndex);\n error ArgsLengthDoesNotMatch();\n\n event NewAttributeCreated(uint8 attributeIndex, bytes32 attributeName);\n event AttributeNameUpdated(\n uint8 attributeIndex,\n bytes32 newAttributeName,\n bytes32 previousAttributeName\n );\n event AttributeDeleted(uint8 attributeIndex, bytes32 deletedAttributeName);\n\n event AttestationsCollectionAttributeSet(\n uint256 collectionId,\n uint8 attributeIndex,\n uint8 attributeValue\n );\n\n event IssuerAuthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\n event IssuerUnauthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\n\n /**\n * @dev Returns whether an attestationsCollection has a specific attribute referenced by its index\n * @param collectionId Collection Id of the targeted attestationsCollection\n * @param index Index of the attribute. Can go from 0 to 63.\n */\n function attestationsCollectionHasAttribute(\n uint256 collectionId,\n uint8 index\n ) external view returns (bool);\n\n function attestationsCollectionHasAttributes(\n uint256 collectionId,\n uint8[] memory indices\n ) external view returns (bool);\n\n /**\n * @dev Returns the attribute's value (from 1 to 15) of an attestationsCollection\n * @param collectionId Collection Id of the targeted attestationsCollection\n * @param attributeIndex Index of the attribute. Can go from 0 to 63.\n */\n function getAttributeValueForAttestationsCollection(\n uint256 collectionId,\n uint8 attributeIndex\n ) external view returns (uint8);\n\n function getAttributesValuesForAttestationsCollection(\n uint256 collectionId,\n uint8[] memory indices\n ) external view returns (uint8[] memory);\n\n /**\n * @dev Set a value for an attribute of an attestationsCollection. The attribute should already be created.\n * @param collectionId Collection Id of the targeted attestationsCollection\n * @param index Index of the attribute (must be between 0 and 63)\n * @param value Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15\n */\n function setAttributeValueForAttestationsCollection(\n uint256 collectionId,\n uint8 index,\n uint8 value\n ) external;\n\n function setAttributesValuesForAttestationsCollections(\n uint256[] memory collectionIds,\n uint8[] memory indices,\n uint8[] memory values\n ) external;\n\n /**\n * @dev Returns all the enabled attributes names and their values for a specific attestationsCollection\n * @param collectionId Collection Id of the targeted attestationsCollection\n */\n function getAttributesNamesAndValuesForAttestationsCollection(\n uint256 collectionId\n ) external view returns (bytes32[] memory, uint8[] memory);\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 /**\n * @dev Create a new attribute.\n * @param index Index of the attribute. Can go from 0 to 63.\n * @param name Name in bytes32 of the attribute\n */\n function createNewAttribute(uint8 index, bytes32 name) external;\n\n function createNewAttributes(uint8[] memory indices, bytes32[] memory names) external;\n\n /**\n * @dev Update the name of an existing attribute\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\n * @param newName new name in bytes32 of the attribute\n */\n function updateAttributeName(uint8 index, bytes32 newName) external;\n\n function updateAttributesName(uint8[] memory indices, bytes32[] memory names) external;\n\n /**\n * @dev Delete an existing attribute\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\n */\n function deleteAttribute(uint8 index) external;\n\n function deleteAttributes(uint8[] memory indices) external;\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(\n Request calldata request,\n bytes calldata proofData\n ) external 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(\n Request calldata request,\n bytes calldata proofData\n ) external view 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/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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\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 /**\n * @dev Getter of the badge issuer\n * @param account Address that holds the badge\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function getBadgeIssuer(address account, uint256 id) external view returns (address);\n\n /**\n * @dev Getter of the badge timestamp\n * @param account Address that holds the badge\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function getBadgeTimestamp(address account, uint256 id) external view returns (uint32);\n\n /**\n * @dev Getter of the badge extra data (it can store nullifier and burnCount)\n * @param account Address that holds the badge\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function getBadgeExtraData(address account, uint256 id) external view returns (bytes memory);\n\n /**\n * @dev Getter of the value of a specific badge attribute\n * @param id Badge Id to check (= attestationCollectionId)\n * @param index Index of the attribute\n */\n function getAttributeValueForBadge(uint256 id, uint8 index) external view returns (uint8);\n\n /**\n * @dev Getter of all badge attributes and their values for a specific badge\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function getAttributesNamesAndValuesForBadge(\n uint256 id\n ) external view returns (bytes32[] memory, uint8[] memory);\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/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';\nimport {Bitmap256Bit} from '../utils/Bitmap256Bit.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 using Bitmap256Bit for uint256;\n using Bitmap256Bit for uint8;\n\n /******************************************\n *\n * ATTESTATION REGISTRY WRITE ACCESS MANAGEMENT (ISSUERS)\n *\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 /**\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 *\n * ATTRIBUTES CONFIG LOGIC\n *\n *****************************************/\n\n /**\n * @dev Create a new attribute.\n * @param index Index of the attribute. Can go from 0 to 63.\n * @param name Name in bytes32 of the attribute\n */\n function createNewAttribute(uint8 index, bytes32 name) public onlyOwner {\n index._checkIndexIsValid();\n if (_isAttributeCreated(index)) {\n revert AttributeAlreadyExists(index);\n }\n _createNewAttribute(index, name);\n }\n\n function createNewAttributes(uint8[] memory indices, bytes32[] memory names) external onlyOwner {\n if (indices.length != names.length) {\n revert ArgsLengthDoesNotMatch();\n }\n\n for (uint256 i = 0; i < indices.length; i++) {\n createNewAttribute(indices[i], names[i]);\n }\n }\n\n /**\n * @dev Update the name of an existing attribute\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\n * @param newName new name in bytes32 of the attribute\n */\n function updateAttributeName(uint8 index, bytes32 newName) public onlyOwner {\n index._checkIndexIsValid();\n if (!_isAttributeCreated(index)) {\n revert AttributeDoesNotExist(index);\n }\n _updateAttributeName(index, newName);\n }\n\n function updateAttributesName(\n uint8[] memory indices,\n bytes32[] memory newNames\n ) external onlyOwner {\n if (indices.length != newNames.length) {\n revert ArgsLengthDoesNotMatch();\n }\n\n for (uint256 i = 0; i < indices.length; i++) {\n updateAttributeName(indices[i], newNames[i]);\n }\n }\n\n /**\n * @dev Delete an existing attribute\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must already exist\n */\n function deleteAttribute(uint8 index) public onlyOwner {\n index._checkIndexIsValid();\n if (!_isAttributeCreated(index)) {\n revert AttributeDoesNotExist(index);\n }\n _deleteAttribute(index);\n }\n\n function deleteAttributes(uint8[] memory indices) external onlyOwner {\n for (uint256 i = 0; i < indices.length; i++) {\n deleteAttribute(indices[i]);\n }\n }\n\n /**\n * @dev Set a value for an attribute of an attestationsCollection. The attribute should already be created.\n * @param collectionId Collection Id of the targeted attestationsCollection\n * @param index Index of the attribute (must be between 0 and 63)\n * @param value Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15\n */\n function setAttributeValueForAttestationsCollection(\n uint256 collectionId,\n uint8 index,\n uint8 value\n ) public onlyOwner {\n index._checkIndexIsValid();\n\n if (!_isAttributeCreated(index)) {\n revert AttributeDoesNotExist(index);\n }\n\n _setAttributeForAttestationsCollection(collectionId, index, value);\n }\n\n function setAttributesValuesForAttestationsCollections(\n uint256[] memory collectionIds,\n uint8[] memory indices,\n uint8[] memory values\n ) external onlyOwner {\n if (collectionIds.length != indices.length || collectionIds.length != values.length) {\n revert ArgsLengthDoesNotMatch();\n }\n for (uint256 i = 0; i < collectionIds.length; i++) {\n setAttributeValueForAttestationsCollection(collectionIds[i], indices[i], values[i]);\n }\n }\n\n /**\n * @dev Returns the attribute's value (from 0 to 15) of an attestationsCollection\n * @param collectionId Collection Id of the targeted attestationsCollection\n * @param index Index of the attribute. Can go from 0 to 63.\n */\n function getAttributeValueForAttestationsCollection(\n uint256 collectionId,\n uint8 index\n ) public view returns (uint8) {\n uint256 currentAttributesValues = _getAttributesValuesBitmapForAttestationsCollection(\n collectionId\n );\n return currentAttributesValues._get(index);\n }\n\n function getAttributesValuesForAttestationsCollection(\n uint256 collectionId,\n uint8[] memory indices\n ) external view returns (uint8[] memory) {\n uint8[] memory attributesValues = new uint8[](indices.length);\n for (uint256 i = 0; i < indices.length; i++) {\n attributesValues[i] = getAttributeValueForAttestationsCollection(collectionId, indices[i]);\n }\n return attributesValues;\n }\n\n /**\n * @dev Returns whether an attestationsCollection has a specific attribute referenced by its index\n * @param collectionId Collection Id of the targeted attestationsCollection\n * @param index Index of the attribute. Can go from 0 to 63.\n */\n function attestationsCollectionHasAttribute(\n uint256 collectionId,\n uint8 index\n ) public view returns (bool) {\n uint256 currentAttributeValues = _getAttributesValuesBitmapForAttestationsCollection(\n collectionId\n );\n return currentAttributeValues._get(index) > 0;\n }\n\n function attestationsCollectionHasAttributes(\n uint256 collectionId,\n uint8[] memory indices\n ) external view returns (bool) {\n for (uint256 i = 0; i < indices.length; i++) {\n if (!attestationsCollectionHasAttribute(collectionId, indices[i])) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * @dev Returns all the enabled attributes names and their values for a specific attestationsCollection\n * @param collectionId Collection Id of the targeted attestationsCollection\n */\n function getAttributesNamesAndValuesForAttestationsCollection(\n uint256 collectionId\n ) public view returns (bytes32[] memory, uint8[] memory) {\n uint256 currentAttributesValues = _getAttributesValuesBitmapForAttestationsCollection(\n collectionId\n );\n\n (\n uint8[] memory indices,\n uint8[] memory values,\n uint8 nbOfNonZeroValues\n ) = currentAttributesValues._getAllNonZeroValues();\n\n bytes32[] memory attributesNames = new bytes32[](nbOfNonZeroValues);\n uint8[] memory attributesValues = new uint8[](nbOfNonZeroValues);\n for (uint8 i = 0; i < nbOfNonZeroValues; i++) {\n attributesNames[i] = _attributesNames[indices[i]];\n attributesValues[i] = values[i];\n }\n\n return (attributesNames, attributesValues);\n }\n\n /*****************************\n *\n * INTERNAL FUNCTIONS\n *\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 function _isAuthorized(address issuer, uint256 collectionId) internal view returns (bool) {\n return _authorizedRanges[issuer]._includes(collectionId);\n }\n\n function _setAttributeForAttestationsCollection(\n uint256 collectionId,\n uint8 index,\n uint8 value\n ) internal {\n uint256 currentAttributes = _getAttributesValuesBitmapForAttestationsCollection(collectionId);\n\n _attestationsCollectionAttributesValuesBitmap[collectionId] = currentAttributes._set(\n index,\n value\n );\n\n emit AttestationsCollectionAttributeSet(collectionId, index, value);\n }\n\n function _createNewAttribute(uint8 index, bytes32 name) internal {\n _attributesNames[index] = name;\n\n emit NewAttributeCreated(index, name);\n }\n\n function _updateAttributeName(uint8 index, bytes32 newName) internal {\n bytes32 previousName = _attributesNames[index];\n\n _attributesNames[index] = newName;\n\n emit AttributeNameUpdated(index, newName, previousName);\n }\n\n function _deleteAttribute(uint8 index) internal {\n bytes32 deletedName = _attributesNames[index];\n\n delete _attributesNames[index];\n\n emit AttributeDeleted(index, deletedName);\n }\n\n function _getAttributesValuesBitmapForAttestationsCollection(\n uint256 collectionId\n ) internal view returns (uint256) {\n return _attestationsCollectionAttributesValuesBitmap[collectionId];\n }\n\n function _isAttributeCreated(uint8 index) internal view returns (bool) {\n if (_attributesNames[index] == 0) {\n return false;\n }\n return true;\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 /*******************************************************\n Storage layout:\n 19 slots for config\n 4 currently used for _initialized, _initializing, _paused, _owner\n 15 place holders\n 16 slots for logic\n 3 currently used for _authorizedRanges, _attestationsCollectionAttributesValuesBitmap, _attributesNames\n 13 place holders\n 1 slot for _attestationsData \n *******************************************************/\n\n // main config\n // changed `_initialized` from bool to uint8\n // as we were using OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n // and changed to OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\n // PR: https://github.com/sismo-core/sismo-protocol/pull/41\n uint8 internal _initialized;\n bool internal _initializing;\n bool internal _paused;\n address internal _owner;\n // keeping some space for future\n uint256[15] private _placeHoldersAdmin;\n\n // storing the authorized ranges for each attesters\n mapping(address => Range[]) internal _authorizedRanges;\n // Storing the attributes values used for each attestations collection\n // Each attribute value is an hexadecimal\n mapping(uint256 => uint256) internal _attestationsCollectionAttributesValuesBitmap;\n // Storing the attribute name for each attributes index\n mapping(uint8 => bytes32) internal _attributesNames;\n // keeping some space for future\n uint256[13] private _placeHoldersConfig;\n // storing the data of attestations\n // =collectionId=> =owner=> attestationData\n mapping(uint256 => mapping(address => AttestationData)) internal _attestationsData;\n}\n" + }, + "contracts/core/libs/attestations-registry/InitializableLogic.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\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 prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\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 Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) ||\n (!Address.isContract(address(this)) && _initialized == 1),\n 'Initializable: contract is already initialized'\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(\n !_initializing && _initialized < version,\n 'Initializable: contract is already initialized'\n );\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, 'Initializable: contract is not initializing');\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, 'Initializable: contract is initializing');\n if (_initialized < type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initialized`\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initializing`\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\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/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/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(\n address target,\n bytes memory data\n ) 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/core/libs/utils/Bitmap256Bit.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\n/*\n * The 256-bit bitmap is structured in 64 chuncks of 4 bits each.\n * The 4 bits can encode any value from 0 to 15.\n\n chunck63 chunck2 chunck1 chunck0\n bits bits bits bits \n ┌────────────┐ ┌────────────┬────────────┬────────────┐\n │ 1 1 1 1 │ .... │ 1 0 1 1 │ 0 0 0 0 │ 0 0 0 1 │\n └────────────┘ └────────────┴────────────┴────────────┘\n value 15 value 11 value 0 value 1\n\n * A chunck index must be between 0 and 63.\n * A value must be between 0 and 15.\n **/\n\nlibrary Bitmap256Bit {\n uint256 constant MAX_INT = 2 ** 256 - 1;\n\n error IndexOutOfBounds(uint8 index);\n error ValueOutOfBounds(uint8 value);\n\n /**\n * @dev Return the value at a given index of a 256-bit bitmap\n * @param index index where the value can be found. Can be between 0 and 63\n */\n function _get(uint256 self, uint8 index) internal pure returns (uint8) {\n uint256 currentValues = self;\n // Get the encoded 4-bit value by right shifting to the `index` position\n uint256 shifted = currentValues >> (4 * index);\n // Get the value by only masking the last 4 bits with an AND operator\n return uint8(shifted & (2 ** 4 - 1));\n }\n\n /**\n * @dev Set a value at a chosen index in a 256-bit bitmap\n * @param index index where the value will be stored. Can be between 0 and 63\n * @param value value to store. Can be between 0 and 15\n */\n function _set(uint256 self, uint8 index, uint8 value) internal pure returns (uint256) {\n _checkIndexIsValid(index);\n _checkValueIsValid(value);\n\n uint256 currentValues = self;\n // 1. first we need to remove the current value for the inputed `index`\n // Left Shift 4 bits mask (1111 mask) to the `index` position\n uint256 mask = (2 ** 4 - 1) << (4 * index);\n // Apply a XOR operation to obtain a mask with all bits set to 1 except the 4 bits that we want to remove\n uint256 negativeMask = MAX_INT ^ mask;\n // Apply a AND operation between the current values and the negative mask to remove the wanted bits\n uint256 newValues = currentValues & negativeMask;\n\n // 2. We set the new value wanted at the `index` position\n // Create the 4 bits encoding the new value and left shift them to the `index` position\n uint256 newValueMask = uint256(value) << (4 * index);\n // Apply an OR operation between the current values and the newValueMask to reference new value\n return newValues | newValueMask;\n }\n\n /**\n * @dev Get all the non-zero values in a 256-bit bitmap\n * @param self a 256-bit bitmap\n */\n function _getAllNonZeroValues(\n uint256 self\n ) internal pure returns (uint8[] memory, uint8[] memory, uint8) {\n uint8[] memory indices = new uint8[](64);\n uint8[] memory values = new uint8[](64);\n uint8 nbOfNonZeroValues = 0;\n for (uint8 i = 0; i < 63; i++) {\n uint8 value = _get(self, i);\n if (value > 0) {\n indices[nbOfNonZeroValues] = i;\n values[nbOfNonZeroValues] = value;\n nbOfNonZeroValues++;\n }\n }\n return (indices, values, nbOfNonZeroValues);\n }\n\n /**\n * @dev Check if the index is valid (is between 0 and 63)\n * @param index index of a chunck\n */\n function _checkIndexIsValid(uint8 index) internal pure {\n if (index > 63) {\n revert IndexOutOfBounds(index);\n }\n }\n\n /**\n * @dev Check if the value is valid (is between 0 and 15)\n * @param value value to encode in a chunck\n */\n function _checkValueIsValid(uint8 value) internal pure {\n if (value > 15) {\n revert ValueOutOfBounds(value);\n }\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/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/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" + }, + "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 uint8 public constant IMPLEMENTATION_VERSION = 2;\n\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 ownerAddress Owner of the contract, can update public key and address\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\n */\n function initialize(address ownerAddress) public reinitializer(IMPLEMENTATION_VERSION) {\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\n if (owner() == address(0) || address(this).code.length == 0) {\n _transferOwnership(ownerAddress);\n }\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" + }, + "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 uint8 public constant IMPLEMENTATION_VERSION = 2;\n\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 ownerAddress 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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\n */\n function initialize(\n address ownerAddress,\n uint256[2] memory commitmentMapperEdDSAPubKey,\n address commitmentMapperAddress\n ) public reinitializer(IMPLEMENTATION_VERSION) {\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\n if (owner() == address(0) || address(this).code.length == 0) {\n _transferOwnership(ownerAddress);\n _updateCommitmentMapperEdDSAPubKey(commitmentMapperEdDSAPubKey);\n _updateCommitmentMapperAddress(commitmentMapperAddress);\n }\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/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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\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/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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\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" + }, + "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(\n address newImplementation,\n bytes calldata data\n ) external payable ifAdmin {\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/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(\n uint256 collectionId,\n address owner\n ) external view returns (uint256) {\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/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(\n Request calldata request,\n bytes calldata proofData\n ) internal virtual override {}\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" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates", + "storageLayout" + ], + "": [ + "ast" + ] + } + }, + "metadata": { + "useLiteralContent": true + } + } +} \ No newline at end of file diff --git a/deployments/mumbai/solcInputs/6edb98fea2bf424a369954d0e80655f6.json b/deployments/mumbai/solcInputs/6edb98fea2bf424a369954d0e80655f6.json new file mode 100644 index 0000000..8f3bf5d --- /dev/null +++ b/deployments/mumbai/solcInputs/6edb98fea2bf424a369954d0e80655f6.json @@ -0,0 +1,237 @@ +{ + "language": "Solidity", + "sources": { + "@openzeppelin/contracts/access/AccessControl.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.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);\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 `_msgSender()` is missing `role`.\n * Overriding this function changes the behavior of the {onlyRole} modifier.\n *\n * Format of the revert message is described in {_checkRole}.\n *\n * _Available since v4.6._\n */\n function _checkRole(bytes32 role) internal view virtual {\n _checkRole(role, _msgSender());\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(account),\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 * May emit a {RoleGranted} event.\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 * May emit a {RoleRevoked} event.\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 * May emit a {RoleRevoked} event.\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 * May emit a {RoleGranted} event.\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 * May emit a {RoleGranted} event.\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 * May emit a {RoleRevoked} event.\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/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/access/Ownable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n _checkOwner();\n _;\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 the sender is not the owner.\n */\n function _checkOwner() internal view virtual {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\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" + }, + "@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/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/proxy/ERC1967/ERC1967Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (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 initializing the storage of the proxy like a Solidity constructor.\n */\n constructor(address _logic, bytes memory _data) payable {\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/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/Proxy.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.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 overridden 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 internal 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 overridden should call `super._beforeFallback()`.\n */\n function _beforeFallback() internal virtual {}\n}\n" + }, + "@openzeppelin/contracts/proxy/utils/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\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 prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n /**\n * @dev Indicates that the contract has been initialized.\n * @custom:oz-retyped-from bool\n */\n uint8 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 Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1),\n \"Initializable: contract is already initialized\"\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, \"Initializable: contract is not initializing\");\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, \"Initializable: contract is initializing\");\n if (_initialized < type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initialized`\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initializing`\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\n}\n" + }, + "@openzeppelin/contracts/security/Pausable.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (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 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 _requireNotPaused();\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 _requirePaused();\n _;\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 Throws if the contract is paused.\n */\n function _requireNotPaused() internal view virtual {\n require(!paused(), \"Pausable: paused\");\n }\n\n /**\n * @dev Throws if the contract is not paused.\n */\n function _requirePaused() internal view virtual {\n require(paused(), \"Pausable: not paused\");\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/token/ERC1155/ERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (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: address zero is not a valid owner\");\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 token owner or 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: caller is not token owner or 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 uint256[] memory ids = _asSingletonArray(id);\n uint256[] memory amounts = _asSingletonArray(amount);\n\n _beforeTokenTransfer(operator, from, to, ids, amounts, 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 _afterTokenTransfer(operator, from, to, ids, amounts, data);\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 _afterTokenTransfer(operator, from, to, ids, amounts, data);\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 uint256[] memory ids = _asSingletonArray(id);\n uint256[] memory amounts = _asSingletonArray(amount);\n\n _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\n\n _balances[id][to] += amount;\n emit TransferSingle(operator, address(0), to, id, amount);\n\n _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\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 * 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 _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 _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\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 * Emits a {TransferSingle} event.\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 uint256[] memory ids = _asSingletonArray(id);\n uint256[] memory amounts = _asSingletonArray(amount);\n\n _beforeTokenTransfer(operator, from, address(0), ids, amounts, \"\");\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 _afterTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n }\n\n /**\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\n *\n * Emits a {TransferBatch} event.\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 _afterTokenTransfer(operator, from, address(0), ids, amounts, \"\");\n }\n\n /**\n * @dev Approve `operator` to operate on all of `owner` tokens\n *\n * Emits an {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 `ids` and `amounts` 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 /**\n * @dev Hook that is called after 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 _afterTokenTransfer(\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/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/token/ERC1155/IERC1155.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (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 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/ERC721/ERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.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: address zero is not a valid owner\");\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 = _ownerOf(tokenId);\n require(owner != address(0), \"ERC721: invalid token ID\");\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 _requireMinted(tokenId);\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 overridden 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 token owner or 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 _requireMinted(tokenId);\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: caller is not token owner or 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: caller is not token owner or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist\n */\n function _ownerOf(uint256 tokenId) internal view virtual returns (address) {\n return _owners[tokenId];\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 _ownerOf(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 address owner = ERC721.ownerOf(tokenId);\n return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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, 1);\n\n // Check that tokenId was not minted by `_beforeTokenTransfer` hook\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n unchecked {\n // Will not overflow unless all 2**256 token ids are minted to the same owner.\n // Given that tokens are minted one by one, it is impossible in practice that\n // this ever happens. Might change if we allow batch minting.\n // The ERC fails to describe this case.\n _balances[to] += 1;\n }\n\n _owners[tokenId] = to;\n\n emit Transfer(address(0), to, tokenId);\n\n _afterTokenTransfer(address(0), to, tokenId, 1);\n }\n\n /**\n * @dev Destroys `tokenId`.\n * The approval is cleared when the token is burned.\n * This is an internal function that does not check if the sender is authorized to operate on the token.\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, 1);\n\n // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook\n owner = ERC721.ownerOf(tokenId);\n\n // Clear approvals\n delete _tokenApprovals[tokenId];\n\n unchecked {\n // Cannot overflow, as that would require more tokens to be burned/transferred\n // out than the owner initially received through minting and transferring in.\n _balances[owner] -= 1;\n }\n delete _owners[tokenId];\n\n emit Transfer(owner, address(0), tokenId);\n\n _afterTokenTransfer(owner, address(0), tokenId, 1);\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, 1);\n\n // Check that tokenId was not transferred by `_beforeTokenTransfer` hook\n require(ERC721.ownerOf(tokenId) == from, \"ERC721: transfer from incorrect owner\");\n\n // Clear approvals from the previous owner\n delete _tokenApprovals[tokenId];\n\n unchecked {\n // `_balances[from]` cannot overflow for the same reason as described in `_burn`:\n // `from`'s balance is the number of token held, which is at least one before the current\n // transfer.\n // `_balances[to]` could overflow in the conditions described in `_mint`. That would require\n // all 2**256 token ids to be minted, which in practice is impossible.\n _balances[from] -= 1;\n _balances[to] += 1;\n }\n _owners[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n\n _afterTokenTransfer(from, to, tokenId, 1);\n }\n\n /**\n * @dev Approve `to` to operate on `tokenId`\n *\n * Emits an {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 an {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 Reverts if the `tokenId` has not been minted yet.\n */\n function _requireMinted(uint256 tokenId) internal view virtual {\n require(_exists(tokenId), \"ERC721: invalid token ID\");\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 /// @solidity memory-safe-assembly\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 and burning. If {ERC721Consecutive} is\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.\n * - When `from` is zero, the tokens will be minted for `to`.\n * - When `to` is zero, ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n * - `batchSize` is non-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, /* firstTokenId */\n uint256 batchSize\n ) internal virtual {\n if (batchSize > 1) {\n if (from != address(0)) {\n _balances[from] -= batchSize;\n }\n if (to != address(0)) {\n _balances[to] += batchSize;\n }\n }\n }\n\n /**\n * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is\n * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.\n *\n * Calling conditions:\n *\n * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.\n * - When `from` is zero, the tokens were minted for `to`.\n * - When `to` is zero, ``from``'s tokens were burned.\n * - `from` and `to` are never both zero.\n * - `batchSize` is non-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 firstTokenId,\n uint256 batchSize\n ) internal virtual {}\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/token/ERC721/IERC721.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (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`.\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 /**\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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\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 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 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 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" + }, + "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.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/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, \"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 (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResultFromTarget(target, 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 (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n *\n * _Available since v4.8._\n */\n function verifyCallResultFromTarget(\n address target,\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n if (success) {\n if (returndata.length == 0) {\n // only check isContract if the call was successful and the return data is empty\n // otherwise we already know that it was a contract\n require(isContract(target), \"Address: call to non-contract\");\n }\n return returndata;\n } else {\n _revert(returndata, errorMessage);\n }\n }\n\n /**\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason or 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 _revert(returndata, errorMessage);\n }\n }\n\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\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 /// @solidity memory-safe-assembly\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" + }, + "@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/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/utils/math/Math.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n enum Rounding {\n Down, // Toward negative infinity\n Up, // Toward infinity\n Zero // Toward zero\n }\n\n /**\n * @dev Returns the largest of two numbers.\n */\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\n return a > b ? a : b;\n }\n\n /**\n * @dev Returns the smallest of two numbers.\n */\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\n return a < b ? a : b;\n }\n\n /**\n * @dev Returns the average of two numbers. The result is rounded towards\n * zero.\n */\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b) / 2 can overflow.\n return (a & b) + (a ^ b) / 2;\n }\n\n /**\n * @dev Returns the ceiling of the division of two numbers.\n *\n * This differs from standard division with `/` in that it rounds up instead\n * of rounding down.\n */\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n // (a + b - 1) / b can overflow on addition, so we distribute.\n return a == 0 ? 0 : (a - 1) / b + 1;\n }\n\n /**\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n * with further edits by Uniswap Labs also under MIT license.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator\n ) internal pure returns (uint256 result) {\n unchecked {\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n // variables such that product = prod1 * 2^256 + prod0.\n uint256 prod0; // Least significant 256 bits of the product\n uint256 prod1; // Most significant 256 bits of the product\n assembly {\n let mm := mulmod(x, y, not(0))\n prod0 := mul(x, y)\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n }\n\n // Handle non-overflow cases, 256 by 256 division.\n if (prod1 == 0) {\n return prod0 / denominator;\n }\n\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\n require(denominator > prod1);\n\n ///////////////////////////////////////////////\n // 512 by 256 division.\n ///////////////////////////////////////////////\n\n // Make division exact by subtracting the remainder from [prod1 prod0].\n uint256 remainder;\n assembly {\n // Compute remainder using mulmod.\n remainder := mulmod(x, y, denominator)\n\n // Subtract 256 bit number from 512 bit number.\n prod1 := sub(prod1, gt(remainder, prod0))\n prod0 := sub(prod0, remainder)\n }\n\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n // See https://cs.stackexchange.com/q/138556/92363.\n\n // Does not overflow because the denominator cannot be zero at this stage in the function.\n uint256 twos = denominator & (~denominator + 1);\n assembly {\n // Divide denominator by twos.\n denominator := div(denominator, twos)\n\n // Divide [prod1 prod0] by twos.\n prod0 := div(prod0, twos)\n\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n twos := add(div(sub(0, twos), twos), 1)\n }\n\n // Shift in bits from prod1 into prod0.\n prod0 |= prod1 * twos;\n\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n // four bits. That is, denominator * inv = 1 mod 2^4.\n uint256 inverse = (3 * denominator) ^ 2;\n\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n // in modular arithmetic, doubling the correct bits in each step.\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n // is no longer required.\n result = prod0 * inverse;\n return result;\n }\n }\n\n /**\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n */\n function mulDiv(\n uint256 x,\n uint256 y,\n uint256 denominator,\n Rounding rounding\n ) internal pure returns (uint256) {\n uint256 result = mulDiv(x, y, denominator);\n if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n result += 1;\n }\n return result;\n }\n\n /**\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n *\n * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n */\n function sqrt(uint256 a) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n //\n // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n //\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n //\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n uint256 result = 1 << (log2(a) >> 1);\n\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n // into the expected uint128 result.\n unchecked {\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n result = (result + a / result) >> 1;\n return min(result, a / result);\n }\n }\n\n /**\n * @notice Calculates sqrt(a), following the selected rounding direction.\n */\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = sqrt(a);\n return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 2, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 128;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 64;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 32;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 16;\n }\n if (value >> 8 > 0) {\n value >>= 8;\n result += 8;\n }\n if (value >> 4 > 0) {\n value >>= 4;\n result += 4;\n }\n if (value >> 2 > 0) {\n value >>= 2;\n result += 2;\n }\n if (value >> 1 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log2(value);\n return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 10, rounded down, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >= 10**64) {\n value /= 10**64;\n result += 64;\n }\n if (value >= 10**32) {\n value /= 10**32;\n result += 32;\n }\n if (value >= 10**16) {\n value /= 10**16;\n result += 16;\n }\n if (value >= 10**8) {\n value /= 10**8;\n result += 8;\n }\n if (value >= 10**4) {\n value /= 10**4;\n result += 4;\n }\n if (value >= 10**2) {\n value /= 10**2;\n result += 2;\n }\n if (value >= 10**1) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log10(value);\n return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n }\n }\n\n /**\n * @dev Return the log in base 256, rounded down, of a positive value.\n * Returns 0 if given 0.\n *\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n */\n function log256(uint256 value) internal pure returns (uint256) {\n uint256 result = 0;\n unchecked {\n if (value >> 128 > 0) {\n value >>= 128;\n result += 16;\n }\n if (value >> 64 > 0) {\n value >>= 64;\n result += 8;\n }\n if (value >> 32 > 0) {\n value >>= 32;\n result += 4;\n }\n if (value >> 16 > 0) {\n value >>= 16;\n result += 2;\n }\n if (value >> 8 > 0) {\n result += 1;\n }\n }\n return result;\n }\n\n /**\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n * Returns 0 if given 0.\n */\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n unchecked {\n uint256 result = log256(value);\n return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/StorageSlot.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (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 /// @solidity memory-safe-assembly\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 /// @solidity memory-safe-assembly\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 /// @solidity memory-safe-assembly\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 /// @solidity memory-safe-assembly\n assembly {\n r.slot := slot\n }\n }\n}\n" + }, + "@openzeppelin/contracts/utils/Strings.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/Math.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary Strings {\n bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n uint8 private constant _ADDRESS_LENGTH = 20;\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 unchecked {\n uint256 length = Math.log10(value) + 1;\n string memory buffer = new string(length);\n uint256 ptr;\n /// @solidity memory-safe-assembly\n assembly {\n ptr := add(buffer, add(32, length))\n }\n while (true) {\n ptr--;\n /// @solidity memory-safe-assembly\n assembly {\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n }\n value /= 10;\n if (value == 0) break;\n }\n return buffer;\n }\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 unchecked {\n return toHexString(value, Math.log256(value) + 1);\n }\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] = _SYMBOLS[value & 0xf];\n value >>= 4;\n }\n require(value == 0, \"Strings: hex length insufficient\");\n return string(buffer);\n }\n\n /**\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n */\n function toHexString(address addr) internal pure returns (string memory) {\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\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 [8609986746108439658545470593166889256314951959466775818870246174320018498804,\n 6848251127850009101372611262053374737897586140140607384018397707035108265914],\n [21367916863936594568281095443965096905143705300114190558130516981138584550504,\n 13327705762185115653848159709412003423932761899188342359583872691135383932883]\n );\n vk.IC = new Pairing.G1Point[](11);\n \n vk.IC[0] = Pairing.G1Point( \n 19965766170734310004645394427613286415565755728797065894668054116047682895204,\n 6952067612339183672227137101423582097916038093373585908267153974352032944482\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 13987716160490730015463796942940452666334097189904948795214986996497499925899,\n 5336810094802209074340875836312868429276540870324469349093948627126061524544\n ); \n \n vk.IC[4] = Pairing.G1Point( \n 14931593253473978964215343699995811275378324235306358485461293343370969283966,\n 564306919152089917957316877787764763278299990971316475606280877961553231205\n ); \n \n vk.IC[5] = Pairing.G1Point( \n 11591267743733991434114686002448165336885445656808796470854638278338319268343,\n 11495219763417990955889652410266075210402006084183208750635660647824890013350\n ); \n \n vk.IC[6] = Pairing.G1Point( \n 8183184532870222270700473518157259944911700429689031755853536692005688965081,\n 9121077094104828462137861111631978599019724423614716723152060153405564278301\n ); \n \n vk.IC[7] = Pairing.G1Point( \n 4314095526093128699362232919686741372014146055311239687202926853002748112330,\n 11665330391505820654128458332883010598817535082070674418723503440883598640597\n ); \n \n vk.IC[8] = Pairing.G1Point( \n 19602244162575575785636531633124796303002902053486919698240132790672698216585,\n 181057165072599074288983745076121344893296348827576905983079816835912241514\n ); \n \n vk.IC[9] = Pairing.G1Point( \n 18925967077785550270509493111690046951994174908254476036944536825999614778001,\n 4990629719417206796668074534812314525340851981015724652256935997545282642849\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" + }, + "@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/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 {Attester} from '../../../core/Attester.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 the following:\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 */\nabstract contract HydraS1Base is IHydraS1Base, Attester, 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 /**\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 nullifier from an attestation extraData\n * @dev Getter of a nullifier encoded in extraData\n * @notice Must be implemented by the inheriting contracts\n * @param extraData extraData where nullifier can be encoded\n */\n function getNullifierFromExtraData(\n bytes memory extraData\n ) external view virtual returns (uint256);\n\n /**\n * @dev MANDATORY: must be implemented to return the external nullifier from a user request\n * so it can be checked against snark input\n * nullifier = hash(sourceSecretHash, externalNullifier), 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 external nullifiers\n *\n * Do they get one external nullifier per claim?\n * Do they get 2 external nullifiers per claim?\n * Do they get 1 external nullifier 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 _getExternalNullifierOfClaim(\n HydraS1Claim memory claim\n ) internal view virtual 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(\n HydraS1Claim memory claim,\n HydraS1ProofInput memory input\n ) internal view virtual {\n if (input.accountsTreeValue != claim.groupId) {\n revert AccountsTreeValueMismatch(claim.groupId, input.accountsTreeValue);\n }\n\n if (input.isStrict == claim.groupProperties.isScore) {\n revert IsStrictMismatch(claim.groupProperties.isScore, input.isStrict);\n }\n\n if (input.destination != claim.destination) {\n revert DestinationMismatch(claim.destination, input.destination);\n }\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\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\n uint256 externalNullifier = _getExternalNullifierOfClaim(claim);\n\n if (input.externalNullifier != externalNullifier) {\n revert ExternalNullifierMismatch(externalNullifier, input.externalNullifier);\n }\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(uint256 /*errorCode*/) {\n revert InvalidGroth16Proof('');\n } catch (bytes memory /*lowLevelData*/) {\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 {IAttester} from '../../../core/interfaces/IAttester.sol';\nimport {HydraS1Verifier, HydraS1Lib, HydraS1ProofData} 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 Interface\n * @author Sismo\n * @notice Interface 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 errors and method specific of the Hydra-S1 attesters family and the Hydra-S1 ZK Proving Scheme\n * We invite readers to refer to the following:\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 **/\ninterface IHydraS1Base is IAttester {\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 ExternalNullifierMismatch(uint256 expectedExternalNullifier, uint256 externalNullifier);\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 function getNullifierFromExtraData(bytes memory extraData) external view returns (uint256);\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" + }, + "contracts/attesters/hydra-s1/HydraS1AccountboundAttester.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.14;\npragma experimental ABIEncoderV2;\n\nimport {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';\n\nimport {IHydraS1AccountboundAttester} from './interfaces/IHydraS1AccountboundAttester.sol';\n\n// Core protocol Protocol imports\nimport {Request, Attestation, Claim} from '../../core/libs/Structs.sol';\n\n// Imports related to Hydra-S1\nimport {HydraS1SimpleAttester, IAttester, HydraS1Lib, HydraS1ProofData, HydraS1Claim} from './HydraS1SimpleAttester.sol';\n\n/**\n * @title Hydra-S1 Accountbound 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 Simple Attester contract is inherited and holds the complex Hydra S1 verification logic.\n * Request verification alongside proof verification is already implemented in the inherited HydraS1SimpleAttester, along with the buildAttestations logic.\n * However, we override the buildAttestations function to encode the nullifier and its burn count in the user attestation.\n * The _beforeRecordAttestations is also overriden to fit the Accountbound 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 * - Nullified\n * Each source account gets one nullifier per claim (i.e only one attestation per source account per claim)\n * While semaphore/ tornado cash are using the following notations: nullifierHash = hash(IdNullifier, externalNullifier)\n * We prefered to use the naming 'nullifier' instead of 'nullifierHash' in our contracts and documentation.\n * We also renamed 'IdNullifier' in 'sourceSecret' (the secret tied to a source account) and we kept the 'externalNullifier' notation.\n * Finally, here is our notations at Sismo: nullifier = hash(sourceSecret, externalNullifier)\n\n * - Accountbound (opt-in, with cooldown period)\n * The owner of this attester can set a cooldown duration for a specific group, activating the accountbound feature for this group.\n * Users can update their attestation's destination by providing a new Hydra-S1 ZK proof \n * It means the attestation is bound to the source account, stored on an updatable destination account.\n * When deleting/ sending to a new destination, the nullifier will enter a cooldown period, so it remains occasional.\n * A group that has its cooldown duration set to 0 means it has been configured to not feature accountbound attestations, attestations can not be transferred\n * One can however know that the former and the new destinations were created using the same nullifier, thus creating a link between those two destinations.\n \n * - Renewable\n * A nullifier 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 **/\n\ncontract HydraS1AccountboundAttester is\n IHydraS1AccountboundAttester,\n HydraS1SimpleAttester,\n Ownable\n{\n using HydraS1Lib for HydraS1ProofData;\n using HydraS1Lib for bytes;\n using HydraS1Lib for Request;\n\n uint8 public constant IMPLEMENTATION_VERSION = 4;\n\n /*******************************************************\n Storage layout:\n 20 slots between HydraS1SimpleAttester and HydraS1AccountboundAttester\n 1 currently used by Ownable\n 19 place holders\n 2O for config\n 1 currently used\n 19 place holders\n 20 for logic\n 2 currently used\n 18 place holders\n *******************************************************/\n\n // keeping some space for future config logics\n uint256[19] private _placeHolderBeforeHydraS1Accountbound;\n\n // cooldown durations for each groupIndex\n mapping(uint256 => uint32) internal _cooldownDurations;\n\n // keeping some space for future config logics\n uint256[19] private _placeHoldersHydraS1AccountboundConfig;\n\n mapping(uint256 => uint32) internal _nullifiersCooldownStart;\n mapping(uint256 => uint16) internal _nullifiersBurnCount;\n\n // keeping some space for future config logics\n uint256[18] private _placeHoldersHydraS1AccountboundLogic;\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 attestation collection in which the attester is supposed to record\n * @param collectionIdLast Id of the last attestation collection in which the attester is supposed to record\n * @param owner Address of attester's owner\n */\n constructor(\n address attestationsRegistryAddress,\n address hydraS1VerifierAddress,\n address availableRootsRegistryAddress,\n address commitmentMapperAddress,\n uint256 collectionIdFirst,\n uint256 collectionIdLast,\n address owner\n )\n HydraS1SimpleAttester(\n attestationsRegistryAddress,\n hydraS1VerifierAddress,\n availableRootsRegistryAddress,\n commitmentMapperAddress,\n collectionIdFirst,\n collectionIdLast\n )\n {\n initialize(owner);\n }\n\n /**\n * @dev Initialize function, to be called by the proxy delegating calls to this implementation\n * @param ownerAddress Owner of the contract, has the right to authorize/unauthorize attestations issuers\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\n */\n function initialize(address ownerAddress) public reinitializer(IMPLEMENTATION_VERSION) {\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\n if (owner() == address(0) || address(this).code.length == 0) {\n _transferOwnership(ownerAddress);\n }\n }\n\n /*******************************************************\n MANDATORY FUNCTIONS TO OVERRIDE FROM ATTESTER.SOL\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(\n Request calldata request,\n bytes calldata proofData\n ) public view virtual override(IAttester, HydraS1SimpleAttester) returns (Attestation[] memory) {\n Attestation[] memory attestations = super.buildAttestations(request, proofData);\n\n uint256 nullifier = proofData._getNullifier();\n attestations[0].extraData = abi.encode(\n attestations[0].extraData, // nullifier, from HydraS1 Simple\n _getNextBurnCount(nullifier, attestations[0].owner) // BurnCount\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 nullifier already used, not a renewal, and nullifier 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(\n Request calldata request,\n bytes calldata proofData\n ) internal virtual override {\n uint256 nullifier = proofData._getNullifier();\n address previousNullifierDestination = _getDestinationOfNullifier(nullifier);\n\n HydraS1Claim memory claim = request._claim();\n\n // check if the nullifier has already been used previously, if so it may be on cooldown\n if (\n previousNullifierDestination != address(0) &&\n previousNullifierDestination != claim.destination\n ) {\n uint32 cooldownDuration = _getCooldownDurationForGroupIndex(claim.groupProperties.groupIndex);\n if (cooldownDuration == 0) {\n revert CooldownDurationNotSetForGroupIndex(claim.groupProperties.groupIndex);\n }\n if (_isOnCooldown(nullifier, cooldownDuration)) {\n uint16 burnCount = _getNullifierBurnCount(nullifier);\n revert NullifierOnCooldown(\n nullifier,\n previousNullifierDestination,\n burnCount,\n cooldownDuration\n );\n }\n\n // Delete the old Attestation linked to the nullifier before recording the new one (accountbound feature)\n _deletePreviousAttestation(claim, previousNullifierDestination);\n\n _setNullifierOnCooldownAndIncrementBurnCount(nullifier);\n }\n _setDestinationForNullifier(nullifier, request.destination);\n }\n\n /*******************************************************\n LOGIC FUNCTIONS RELATED TO ACCOUNTBOUND FEATURE\n *******************************************************/\n\n /**\n * @dev Getter, returns the burnCount of a nullifier\n * @param nullifier nullifier used\n **/\n function getNullifierBurnCount(uint256 nullifier) external view returns (uint16) {\n return _getNullifierBurnCount(nullifier);\n }\n\n /**\n * @dev Getter, returns the cooldown start of a nullifier\n * @param nullifier nullifier used\n **/\n function getNullifierCooldownStart(uint256 nullifier) external view returns (uint32) {\n return _getNullifierCooldownStart(nullifier);\n }\n\n /**\n * @dev returns the nullifier for a given extraData\n * @param extraData bytes where the nullifier is encoded\n */\n function getNullifierFromExtraData(\n bytes memory extraData\n ) external pure override(HydraS1SimpleAttester, IHydraS1AccountboundAttester) returns (uint256) {\n (uint256 nullifier, ) = abi.decode(extraData, (uint256, uint16));\n\n return nullifier;\n }\n\n /**\n * @dev Returns the burn count for a given extraData\n * @param extraData bytes where the burnCount is encoded\n */\n function getBurnCountFromExtraData(bytes memory extraData) external pure returns (uint16) {\n (, uint16 burnCount) = abi.decode(extraData, (uint256, uint16));\n\n return burnCount;\n }\n\n /**\n * @dev Checks if a nullifier is on cooldown\n * @param nullifier user nullifier\n * @param cooldownDuration waiting time before the user can change its badge destination\n */\n function _isOnCooldown(uint256 nullifier, uint32 cooldownDuration) internal view returns (bool) {\n return _getNullifierCooldownStart(nullifier) + cooldownDuration > block.timestamp;\n }\n\n /**\n * @dev Delete the previous attestation created with this nullifier\n * @param claim user claim\n * @param previousNullifierDestination previous destination chosen for this user nullifier\n */\n function _deletePreviousAttestation(\n HydraS1Claim memory claim,\n address previousNullifierDestination\n ) internal {\n address[] memory attestationOwners = new address[](1);\n uint256[] memory attestationCollectionIds = new uint256[](1);\n\n attestationOwners[0] = previousNullifierDestination;\n attestationCollectionIds[0] = AUTHORIZED_COLLECTION_ID_FIRST + claim.groupProperties.groupIndex;\n\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\n }\n\n function _setNullifierOnCooldownAndIncrementBurnCount(uint256 nullifier) internal {\n _nullifiersCooldownStart[nullifier] = uint32(block.timestamp);\n _nullifiersBurnCount[nullifier] += 1;\n emit NullifierSetOnCooldown(nullifier, _nullifiersBurnCount[nullifier]);\n }\n\n function _getNullifierCooldownStart(uint256 nullifier) internal view returns (uint32) {\n return _nullifiersCooldownStart[nullifier];\n }\n\n function _getNullifierBurnCount(uint256 nullifier) internal view returns (uint16) {\n return _nullifiersBurnCount[nullifier];\n }\n\n /**\n * @dev returns burn count or burn count + 1 if new burn will happen\n * @param nullifier user nullifier\n * @param claimDestination destination referenced in the user claim\n */\n function _getNextBurnCount(\n uint256 nullifier,\n address claimDestination\n ) public view virtual returns (uint16) {\n address previousNullifierDestination = _getDestinationOfNullifier(nullifier);\n uint16 burnCount = _getNullifierBurnCount(nullifier);\n // If the attestation is minted on a new destination address\n // the burnCount that will be encoded in the extraData of the Attestation should be incremented\n if (\n previousNullifierDestination != address(0) && previousNullifierDestination != claimDestination\n ) {\n burnCount += 1;\n }\n return burnCount;\n }\n\n /*******************************************************\n GROUP CONFIGURATION LOGIC\n *******************************************************/\n\n /**\n * @dev Setter, sets the cooldown duration of a groupIndex\n * @notice set to 0 to deactivate the accountbound feature for this group\n * @param groupIndex internal collection id\n * @param cooldownDuration cooldown duration we want to set for the groupIndex\n **/\n function setCooldownDurationForGroupIndex(\n uint256 groupIndex,\n uint32 cooldownDuration\n ) external onlyOwner {\n _cooldownDurations[groupIndex] = cooldownDuration;\n emit CooldownDurationSetForGroupIndex(groupIndex, cooldownDuration);\n }\n\n /**\n * @dev Getter, get the cooldown duration of a groupIndex\n * @notice returns 0 when the accountbound feature is deactivated for this group\n * @param groupIndex internal collection id\n **/\n function getCooldownDurationForGroupIndex(uint256 groupIndex) external view returns (uint32) {\n return _getCooldownDurationForGroupIndex(groupIndex);\n }\n\n // = 0 means that the accountbound feature is deactivated for this group\n function _getCooldownDurationForGroupIndex(uint256 groupIndex) internal view returns (uint32) {\n return _cooldownDurations[groupIndex];\n }\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';\nimport {IHydraS1Base} from './base/IHydraS1Base.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 * - Nullified\n * Each source account gets one nullifier per claim (i.e only one attestation per source account per claim)\n * For people used to semaphore/ tornado cash people:\n * nullifier = hash(sourceSecret, externalNullifier) <=> nullifierHash = hash(IdNullifier, externalNullifier)\n \n * - Renewable\n * A nullifier 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 {\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 /*******************************************************\n Storage layout:\n 20 slots for HydraS1\n 1 slot used\n 19 place holders\n *******************************************************/\n\n mapping(uint256 => address) internal _nullifiersDestinations;\n\n // keeping some space for future\n uint256[19] private _placeHoldersHydraS1Simple;\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(\n Request calldata request,\n bytes calldata proofData\n ) internal virtual override {\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(\n Request calldata request,\n bytes calldata proofData\n ) public view virtual override(IAttester, Attester) returns (Attestation[] memory) {\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 uint256 nullifier = proofData._getNullifier();\n\n attestations[0] = Attestation(\n attestationCollectionId,\n claim.destination,\n issuer,\n claim.claimedValue,\n claim.groupProperties.generationTimestamp,\n abi.encode(nullifier)\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 nullifier 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(\n Request calldata request,\n bytes calldata proofData\n ) internal virtual override {\n // we get the nullifier used from the snark input in the data provided\n uint256 nullifier = proofData._getNullifier();\n address currentDestination = _getDestinationOfNullifier(nullifier);\n\n if (currentDestination != address(0) && currentDestination != request.destination) {\n revert NullifierUsed(nullifier);\n }\n\n _setDestinationForNullifier(nullifier, request.destination);\n }\n\n /*******************************************************\n Hydra-S1 MANDATORY FUNCTIONS FROM Hydra-S1 Base Attester\n *******************************************************/\n\n /**\n * @dev Returns the external nullifier from a user claim\n * @param claim user Hydra-S1 claim = have an account with a specific value in a specific group\n * nullifier = hash(sourceSecretHash, externalNullifier), which is verified inside the snark\n * users bring sourceSecretHash as private input in snark which guarantees privacy\n \n * Here we chose externalNullifier = hash(attesterAddress, claim.GroupId)\n * Creates one nullifier per group, per user and makes sure no collision with other attester's nullifiers\n **/\n function _getExternalNullifierOfClaim(\n HydraS1Claim memory claim\n ) internal view override returns (uint256) {\n uint256 externalNullifier = _encodeInSnarkField(\n address(this),\n claim.groupProperties.groupIndex\n );\n return externalNullifier;\n }\n\n /**\n * @dev returns the nullifier for a given extraData\n * @param extraData bytes where the nullifier is encoded\n */\n function getNullifierFromExtraData(\n bytes memory extraData\n ) external pure virtual override(IHydraS1Base, HydraS1Base) returns (uint256) {\n return abi.decode(extraData, (uint256));\n }\n\n /*******************************************************\n Hydra-S1 Attester Specific Functions\n *******************************************************/\n\n /**\n * @dev Getter, returns the last attestation destination of a nullifier\n * @param nullifier nullifier used\n **/\n function getDestinationOfNullifier(uint256 nullifier) external view override returns (address) {\n return _getDestinationOfNullifier(nullifier);\n }\n\n function _setDestinationForNullifier(uint256 nullifier, address destination) internal virtual {\n _nullifiersDestinations[nullifier] = destination;\n emit NullifierDestinationUpdated(nullifier, destination);\n }\n\n function _getDestinationOfNullifier(uint256 nullifier) internal view returns (address) {\n return _nullifiersDestinations[nullifier];\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/IHydraS1AccountboundAttester.sol": { + "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.14;\npragma experimental ABIEncoderV2;\n\nimport {IHydraS1SimpleAttester} from '././IHydraS1SimpleAttester.sol';\n\n/**\n * @title Hydra-S1 Accountbound Interface\n * @author Sismo\n * @notice Interface of the HydraS1AccountboundAttester contract which inherits from the errors, events and methods specific to the HydraS1SimpleAttester interface.\n **/\ninterface IHydraS1AccountboundAttester is IHydraS1SimpleAttester {\n /**\n * @dev Event emitted when the duration of the cooldown duration for a group index (internal collection id) has been set\n * @param groupIndex internal collection id\n * @param cooldownDuration the duration of the cooldown period\n **/\n event CooldownDurationSetForGroupIndex(uint256 indexed groupIndex, uint32 cooldownDuration);\n\n /**\n * @dev Event emitted when the nullifier has been set on cooldown. This happens when the\n * attestation destination of a nullifier has been changed\n * @param nullifier user nullifier\n * @param burnCount the number of times the attestation destination of a nullifier has been changed\n **/\n event NullifierSetOnCooldown(uint256 indexed nullifier, uint16 burnCount);\n\n /**\n * @dev Error when the nullifier is on cooldown. The user have to wait the cooldownDuration\n * before being able to change again the destination address.\n **/\n error NullifierOnCooldown(\n uint256 nullifier,\n address destination,\n uint16 burnCount,\n uint32 cooldownStart\n );\n\n /**\n * @dev Error when the cooldown duration for a given groupIndex is equal to zero.\n * The HydraS1AccountboundAttester behaves like the HydraS1SimpleAttester.\n **/\n error CooldownDurationNotSetForGroupIndex(uint256 groupIndex);\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 returns the nullifier for a given extraData\n * @param extraData bytes where the nullifier is encoded\n */\n function getNullifierFromExtraData(bytes memory extraData) external pure returns (uint256);\n\n /**\n * @dev Returns the burn count for a given extraData\n * @param extraData bytes where the burnCount is encoded\n */\n function getBurnCountFromExtraData(bytes memory extraData) external pure returns (uint16);\n\n /**\n * @dev Getter, returns the cooldown start of a nullifier\n * @param nullifier nullifier used\n **/\n function getNullifierCooldownStart(uint256 nullifier) external view returns (uint32);\n\n /**\n * @dev Getter, returns the burnCount of a nullifier\n * @param nullifier nullifier used\n **/\n function getNullifierBurnCount(uint256 nullifier) external view returns (uint16);\n\n /**\n * @dev Setter, sets the cooldown duration of a groupIndex\n * @param groupIndex internal collection id\n * @param cooldownDuration cooldown duration we want to set for the groupIndex\n **/\n function setCooldownDurationForGroupIndex(uint256 groupIndex, uint32 cooldownDuration) external;\n\n /*/**\n * @dev Getter, get the cooldown duration of a groupIndex\n * @notice returns 0 when the accountbound feature is deactivated for this group\n * @param groupIndex internal collection id\n **/\n function getCooldownDurationForGroupIndex(uint256 groupIndex) external view returns (uint32);\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 {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/**\n * @title Hydra-S1 Accountbound Interface\n * @author Sismo\n * @notice Interface with errors, events and methods specific to the HydraS1SimpleAttester.\n **/\ninterface IHydraS1SimpleAttester is IHydraS1Base {\n /**\n * @dev Error when the nullifier is already used for a destination address\n **/\n error NullifierUsed(uint256 nullifier);\n\n /**\n * @dev Error when the collectionId of an attestation overflow the AUTHORIZED_COLLECTION_ID_LAST\n **/\n error CollectionIdOutOfBound(uint256 collectionId);\n\n /**\n * @dev Event emitted when the nullifier is associated to a destination address.\n **/\n event NullifierDestinationUpdated(uint256 nullifier, address newOwner);\n\n /**\n * @dev Getter, returns the last attestation destination of a nullifier\n * @param nullifier nullifier used\n **/\n function getDestinationOfNullifier(uint256 nullifier) 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/libs/HydraS1AccountboundLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\nimport {Claim, Request} from '../../../core/libs/Structs.sol';\nimport {HydraS1Lib, HydraS1Claim, HydraS1GroupProperties} from './HydraS1Lib.sol';\n\n// user Hydra-S1 claim retrieved form his request\nstruct HydraS1AccountboundClaim {\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 HydraS1AccountboundGroupProperties groupProperties; // user claims the group has the following properties\n}\n\nstruct HydraS1AccountboundGroupProperties {\n uint128 groupIndex;\n uint32 generationTimestamp;\n uint32 cooldownDuration;\n bool isScore;\n}\n\nlibrary HydraS1AccountboundLib {\n error GroupIdAndPropertiesMismatch(uint256 expectedGroupId, uint256 groupId);\n\n function _hydraS1claim(Request memory self) internal pure returns (HydraS1Claim memory) {\n Claim memory claim = self.claims[0];\n _validateClaim(claim);\n\n HydraS1AccountboundGroupProperties memory groupProperties = abi.decode(\n claim.extraData,\n (HydraS1AccountboundGroupProperties)\n );\n\n HydraS1GroupProperties memory hydraS1GroupProperties = HydraS1GroupProperties(\n groupProperties.groupIndex,\n groupProperties.generationTimestamp,\n groupProperties.isScore\n );\n\n return (\n HydraS1Claim(claim.groupId, claim.claimedValue, self.destination, hydraS1GroupProperties)\n );\n }\n\n function _hydraS1Accountboundclaim(\n Request memory self\n ) internal pure returns (HydraS1AccountboundClaim memory) {\n Claim memory claim = self.claims[0];\n _validateClaim(claim);\n\n HydraS1AccountboundGroupProperties memory hydraS1AccountboundGroupProperties = abi.decode(\n claim.extraData,\n (HydraS1AccountboundGroupProperties)\n );\n\n return (\n HydraS1AccountboundClaim(\n claim.groupId,\n claim.claimedValue,\n self.destination,\n hydraS1AccountboundGroupProperties\n )\n );\n }\n\n function _generateGroupIdFromEncodedProperties(\n bytes memory encodedProperties\n ) internal pure returns (uint256) {\n return uint256(keccak256(encodedProperties)) % HydraS1Lib.SNARK_FIELD;\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/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 // externalNullifier\n // nullifier\n // claimedValue\n // accountsTreeValue\n // isStrict\n}\n\nstruct HydraS1ProofInput {\n address destination;\n uint256 chainId;\n uint256 registryRoot;\n uint256 externalNullifier;\n uint256 nullifier;\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 _getNullifier(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(\n HydraS1ProofData memory self\n )\n internal\n pure\n returns (uint256[2] memory, uint256[2][2] memory, uint256[2] memory, uint256[10] memory)\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(\n HydraS1ProofData memory self\n ) internal pure returns (uint256[2] memory) {\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(\n HydraS1ProofData memory self\n ) internal pure returns (uint256) {\n return self.input[5];\n }\n\n function _getNullifier(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 _getNullifier(bytes calldata self) internal pure returns (uint256) {\n HydraS1ProofData memory snarkProofData = abi.decode(self, (HydraS1ProofData));\n uint256 nullifier = uint256(_getNullifier(snarkProofData));\n return nullifier;\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(\n bytes memory encodedProperties\n ) internal pure returns (uint256) {\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/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/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(\n Pythia1Claim memory claim\n ) internal view virtual 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(\n Pythia1Claim memory claim,\n Pythia1ProofInput memory input\n ) internal view virtual {\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(uint256 /*errorCode*/) {\n revert InvalidGroth16Proof('');\n } catch (bytes memory /*lowLevelData*/) {\n revert InvalidGroth16Proof('');\n }\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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\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/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(\n Pythia1ProofData memory self\n )\n internal\n pure\n returns (uint256[2] memory, uint256[2][2] memory, uint256[2] memory, uint256[9] memory)\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(\n Pythia1ProofData memory self\n ) internal pure returns (uint256[2] memory) {\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(\n Pythia1ProofData memory self\n ) internal pure returns (uint256) {\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(\n uint128 internalCollectionId,\n bool isScore\n ) internal pure returns (uint256) {\n return\n _generateGroupIdFromEncodedProperties(_encodeGroupProperties(internalCollectionId, isScore));\n }\n\n function _generateGroupIdFromEncodedProperties(\n bytes memory encodedProperties\n ) internal pure returns (uint256) {\n return uint256(keccak256(encodedProperties)) % Pythia1Lib.SNARK_FIELD;\n }\n\n function _encodeGroupProperties(\n uint128 internalCollectionId,\n bool isScore\n ) internal pure returns (bytes memory) {\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" + }, + "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 uint8 public constant IMPLEMENTATION_VERSION = 3;\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 ownerAddress Owner of the contract, can update public key and address\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\n */\n function initialize(\n uint256[2] memory commitmentSignerPubKey,\n address ownerAddress\n ) public reinitializer(IMPLEMENTATION_VERSION) {\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\n if (owner() == address(0) || address(this).code.length == 0) {\n _transferOwnership(ownerAddress);\n _updateCommitmentSignerPubKey(commitmentSignerPubKey);\n }\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(\n Request calldata request,\n bytes calldata proofData\n ) internal virtual override {\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(\n Request calldata request,\n bytes calldata\n ) public view virtual override(IAttester, Attester) returns (Attestation[] memory) {\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(\n Request calldata request,\n bytes calldata proofData\n ) internal virtual override {\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(\n Pythia1Claim memory claim\n ) internal view override returns (uint256) {\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(\n uint256[2] memory commitmentSignerPubKey\n ) external onlyOwner {\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/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 uint8 public constant IMPLEMENTATION_VERSION = 3;\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 BADGES = IBadges(badgesAddress);\n initialize(owner);\n }\n\n /**\n * @dev Initialize function, to be called by the proxy delegating calls to this implementation\n * @param ownerAddress Owner of the contract, has the right to authorize/unauthorize attestations issuers\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\n */\n function initialize(address ownerAddress) public reinitializer(IMPLEMENTATION_VERSION) {\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\n if (owner() == address(0) || address(this).code.length == 0) {\n _transferOwnership(ownerAddress);\n }\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 owners The owners of the attestations to be deleted\n * @param collectionIds The collection ids of the attestations to be deleted\n */\n function deleteAttestations(\n address[] calldata owners,\n uint256[] calldata collectionIds\n ) external override whenNotPaused {\n if (owners.length != collectionIds.length)\n revert OwnersAndCollectionIdsLengthMismatch(owners, collectionIds);\n\n address issuer = _msgSender();\n for (uint256 i = 0; i < owners.length; i++) {\n AttestationData memory attestationData = _attestationsData[collectionIds[i]][owners[i]];\n\n if (!_isAuthorized(issuer, collectionIds[i]))\n revert IssuerNotAuthorized(issuer, collectionIds[i]);\n delete _attestationsData[collectionIds[i]][owners[i]];\n\n _triggerBadgeTransferEvent(collectionIds[i], owners[i], attestationData.value, 0);\n\n emit AttestationDeleted(\n Attestation(\n collectionIds[i],\n owners[i],\n attestationData.issuer,\n attestationData.value,\n attestationData.timestamp,\n attestationData.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(\n uint256 collectionId,\n address owner\n ) external view override returns (bool) {\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(\n uint256 collectionId,\n address owner\n ) external view override returns (AttestationData memory) {\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(\n uint256 collectionId,\n address owner\n ) external view override returns (uint256) {\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(\n uint256 collectionId,\n address owner\n ) external view override returns (address, uint256, uint32, bytes memory) {\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(\n uint256 collectionId,\n address owner\n ) external view override returns (bytes memory) {\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(\n uint256 collectionId,\n address owner\n ) external view override returns (address) {\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(\n uint256 collectionId,\n address owner\n ) external view override returns (uint32) {\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(\n uint256[] memory collectionIds,\n address[] memory owners\n ) external view override returns (AttestationData[] memory) {\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(\n uint256[] memory collectionIds,\n address[] memory owners\n ) external view override returns (uint256[] memory) {\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(\n uint256 collectionId,\n address owner\n ) internal view returns (AttestationData memory) {\n return (_attestationsData[collectionId][owner]);\n }\n\n function _getAttestationValue(\n uint256 collectionId,\n address owner\n ) internal view returns (uint256) {\n return _attestationsData[collectionId][owner].value;\n }\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(\n Request calldata request,\n bytes calldata proofData\n ) external override returns (Attestation[] memory) {\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 address[] memory attestationOwners = new address[](collectionIds.length);\n\n uint256[] memory attestationCollectionIds = new uint256[](collectionIds.length);\n\n Attestation[] memory attestations = new Attestation[](collectionIds.length);\n\n for (uint256 i = 0; i < collectionIds.length; i++) {\n // fetch attestations from the registry\n (\n address issuer,\n uint256 attestationValue,\n uint32 timestamp,\n bytes memory extraData\n ) = ATTESTATIONS_REGISTRY.getAttestationDataTuple(collectionIds[i], attestationsOwner);\n\n attestationOwners[i] = attestationsOwner;\n attestationCollectionIds[i] = collectionIds[i];\n\n attestations[i] = (\n Attestation(\n collectionIds[i],\n attestationsOwner,\n issuer,\n attestationValue,\n timestamp,\n extraData\n )\n );\n }\n\n _verifyAttestationsDeletionRequest(attestations, proofData);\n\n _beforeDeleteAttestations(attestations, proofData);\n\n ATTESTATIONS_REGISTRY.deleteAttestations(attestationOwners, attestationCollectionIds);\n\n _afterDeleteAttestations(attestations, proofData);\n\n for (uint256 i = 0; i < collectionIds.length; i++) {\n emit AttestationDeleted(attestations[i]);\n }\n return attestations;\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(\n Request calldata request,\n bytes calldata proofData\n ) public view virtual 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(\n Request calldata request,\n bytes calldata proofData\n ) internal virtual {}\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(\n Attestation[] memory attestations,\n bytes calldata proofData\n ) internal virtual {}\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(\n Attestation[] memory attestations,\n bytes calldata proofData\n ) internal virtual {}\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 uint8 public constant IMPLEMENTATION_VERSION = 3;\n\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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\n */\n function initialize(\n string memory uri,\n address owner\n ) public reinitializer(IMPLEMENTATION_VERSION) {\n // if proxy did not setup uri yet or if called by constructor (for implem setup)\n if (bytes(ERC1155.uri(0)).length == 0 || address(this).code.length == 0) {\n _setURI(uri);\n _grantRole(DEFAULT_ADMIN_ROLE, owner);\n }\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(\n address account,\n uint256 id\n ) public view virtual override(ERC1155, IBadges) returns (uint256) {\n return _attestationsRegistry.getAttestationValue(id, account);\n }\n\n /**\n * @dev Reverts, this is a non transferable ERC115 contract\n */\n function setApprovalForAll(address operator, bool approved) public virtual override {\n revert BadgesNonTransferrable();\n }\n\n /**\n * @dev Reverts, this is a non transferable ERC115 contract\n */\n function isApprovedForAll(\n address account,\n address operator\n ) public view virtual override returns (bool) {\n revert BadgesNonTransferrable();\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(\n address attestationsRegistry\n ) external override onlyRole(DEFAULT_ADMIN_ROLE) {\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 Getter of the badge issuer\n * @param account Address that holds the badge\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function getBadgeIssuer(address account, uint256 id) external view returns (address) {\n return _attestationsRegistry.getAttestationIssuer(id, account);\n }\n\n /**\n * @dev Getter of the badge timestamp\n * @param account Address that holds the badge\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function getBadgeTimestamp(address account, uint256 id) external view returns (uint32) {\n return _attestationsRegistry.getAttestationTimestamp(id, account);\n }\n\n /**\n * @dev Getter of the badge extra data (it can store nullifier and burnCount)\n * @param account Address that holds the badge\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function getBadgeExtraData(address account, uint256 id) external view returns (bytes memory) {\n return _attestationsRegistry.getAttestationExtraData(id, account);\n }\n\n /**\n * @dev Getter of the value of a specific badge attribute\n * @param id Badge Id to check (= attestationCollectionId)\n * @param index Index of the attribute\n */\n function getAttributeValueForBadge(uint256 id, uint8 index) external view returns (uint8) {\n return _attestationsRegistry.getAttributeValueForAttestationsCollection(id, index);\n }\n\n /**\n * @dev Getter of all badge attributes and their values for a specific badge\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function getAttributesNamesAndValuesForBadge(\n uint256 id\n ) external view returns (bytes32[] memory, uint8[] memory) {\n return _attestationsRegistry.getAttributesNamesAndValuesForAttestationsCollection(id);\n }\n\n /**\n * @dev ERC165\n */\n function supportsInterface(\n bytes4 interfaceId\n ) public view virtual override(AccessControl, ERC1155) returns (bool) {\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" + }, + "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/IAttestationsRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\nimport {Attestation, AttestationData} from '../libs/Structs.sol';\nimport {IAttestationsRegistryConfigLogic} from './IAttestationsRegistryConfigLogic.sol';\n\n/**\n * @title IAttestationsRegistry\n * @author Sismo\n * @notice This is the interface of the AttestationRegistry\n */\ninterface IAttestationsRegistry is IAttestationsRegistryConfigLogic {\n error IssuerNotAuthorized(address issuer, uint256 collectionId);\n error OwnersAndCollectionIdsLengthMismatch(address[] owners, uint256[] collectionIds);\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 owners The owners of the attestations to be deleted\n * @param collectionIds The collection ids of the attestations to be deleted\n */\n function deleteAttestations(address[] calldata owners, uint256[] calldata collectionIds) 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(\n uint256 collectionId,\n address owner\n ) external view 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(\n uint256 collectionId,\n address owner\n ) external view returns (address, uint256, uint32, bytes memory);\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(\n uint256 collectionId,\n address owner\n ) external view 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(\n uint256 collectionId,\n address owner\n ) external view 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(\n uint256 collectionId,\n address owner\n ) external view 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(\n uint256[] memory collectionIds,\n address[] memory owners\n ) external view 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(\n uint256[] memory collectionIds,\n address[] memory owners\n ) external view returns (uint256[] memory);\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 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 error AttributeDoesNotExist(uint8 attributeIndex);\n error AttributeAlreadyExists(uint8 attributeIndex);\n error ArgsLengthDoesNotMatch();\n\n event NewAttributeCreated(uint8 attributeIndex, bytes32 attributeName);\n event AttributeNameUpdated(\n uint8 attributeIndex,\n bytes32 newAttributeName,\n bytes32 previousAttributeName\n );\n event AttributeDeleted(uint8 attributeIndex, bytes32 deletedAttributeName);\n\n event AttestationsCollectionAttributeSet(\n uint256 collectionId,\n uint8 attributeIndex,\n uint8 attributeValue\n );\n\n event IssuerAuthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\n event IssuerUnauthorized(address issuer, uint256 firstCollectionId, uint256 lastCollectionId);\n\n /**\n * @dev Returns whether an attestationsCollection has a specific attribute referenced by its index\n * @param collectionId Collection Id of the targeted attestationsCollection\n * @param index Index of the attribute. Can go from 0 to 63.\n */\n function attestationsCollectionHasAttribute(\n uint256 collectionId,\n uint8 index\n ) external view returns (bool);\n\n function attestationsCollectionHasAttributes(\n uint256 collectionId,\n uint8[] memory indices\n ) external view returns (bool);\n\n /**\n * @dev Returns the attribute's value (from 1 to 15) of an attestationsCollection\n * @param collectionId Collection Id of the targeted attestationsCollection\n * @param attributeIndex Index of the attribute. Can go from 0 to 63.\n */\n function getAttributeValueForAttestationsCollection(\n uint256 collectionId,\n uint8 attributeIndex\n ) external view returns (uint8);\n\n function getAttributesValuesForAttestationsCollection(\n uint256 collectionId,\n uint8[] memory indices\n ) external view returns (uint8[] memory);\n\n /**\n * @dev Set a value for an attribute of an attestationsCollection. The attribute should already be created.\n * @param collectionId Collection Id of the targeted attestationsCollection\n * @param index Index of the attribute (must be between 0 and 63)\n * @param value Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15\n */\n function setAttributeValueForAttestationsCollection(\n uint256 collectionId,\n uint8 index,\n uint8 value\n ) external;\n\n function setAttributesValuesForAttestationsCollections(\n uint256[] memory collectionIds,\n uint8[] memory indices,\n uint8[] memory values\n ) external;\n\n /**\n * @dev Returns all the enabled attributes names and their values for a specific attestationsCollection\n * @param collectionId Collection Id of the targeted attestationsCollection\n */\n function getAttributesNamesAndValuesForAttestationsCollection(\n uint256 collectionId\n ) external view returns (bytes32[] memory, uint8[] memory);\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 /**\n * @dev Create a new attribute.\n * @param index Index of the attribute. Can go from 0 to 63.\n * @param name Name in bytes32 of the attribute\n */\n function createNewAttribute(uint8 index, bytes32 name) external;\n\n function createNewAttributes(uint8[] memory indices, bytes32[] memory names) external;\n\n /**\n * @dev Update the name of an existing attribute\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\n * @param newName new name in bytes32 of the attribute\n */\n function updateAttributeName(uint8 index, bytes32 newName) external;\n\n function updateAttributesName(uint8[] memory indices, bytes32[] memory names) external;\n\n /**\n * @dev Delete an existing attribute\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\n */\n function deleteAttribute(uint8 index) external;\n\n function deleteAttributes(uint8[] memory indices) external;\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(\n Request calldata request,\n bytes calldata proofData\n ) external 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(\n Request calldata request,\n bytes calldata proofData\n ) external view 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/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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\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 /**\n * @dev Getter of the badge issuer\n * @param account Address that holds the badge\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function getBadgeIssuer(address account, uint256 id) external view returns (address);\n\n /**\n * @dev Getter of the badge timestamp\n * @param account Address that holds the badge\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function getBadgeTimestamp(address account, uint256 id) external view returns (uint32);\n\n /**\n * @dev Getter of the badge extra data (it can store nullifier and burnCount)\n * @param account Address that holds the badge\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function getBadgeExtraData(address account, uint256 id) external view returns (bytes memory);\n\n /**\n * @dev Getter of the value of a specific badge attribute\n * @param id Badge Id to check (= attestationCollectionId)\n * @param index Index of the attribute\n */\n function getAttributeValueForBadge(uint256 id, uint8 index) external view returns (uint8);\n\n /**\n * @dev Getter of all badge attributes and their values for a specific badge\n * @param id Badge Id to check (= attestationCollectionId)\n */\n function getAttributesNamesAndValuesForBadge(\n uint256 id\n ) external view returns (bytes32[] memory, uint8[] memory);\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/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';\nimport {Bitmap256Bit} from '../utils/Bitmap256Bit.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 using Bitmap256Bit for uint256;\n using Bitmap256Bit for uint8;\n\n /******************************************\n *\n * ATTESTATION REGISTRY WRITE ACCESS MANAGEMENT (ISSUERS)\n *\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 /**\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 *\n * ATTRIBUTES CONFIG LOGIC\n *\n *****************************************/\n\n /**\n * @dev Create a new attribute.\n * @param index Index of the attribute. Can go from 0 to 63.\n * @param name Name in bytes32 of the attribute\n */\n function createNewAttribute(uint8 index, bytes32 name) public onlyOwner {\n index._checkIndexIsValid();\n if (_isAttributeCreated(index)) {\n revert AttributeAlreadyExists(index);\n }\n _createNewAttribute(index, name);\n }\n\n function createNewAttributes(uint8[] memory indices, bytes32[] memory names) external onlyOwner {\n if (indices.length != names.length) {\n revert ArgsLengthDoesNotMatch();\n }\n\n for (uint256 i = 0; i < indices.length; i++) {\n createNewAttribute(indices[i], names[i]);\n }\n }\n\n /**\n * @dev Update the name of an existing attribute\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must exist\n * @param newName new name in bytes32 of the attribute\n */\n function updateAttributeName(uint8 index, bytes32 newName) public onlyOwner {\n index._checkIndexIsValid();\n if (!_isAttributeCreated(index)) {\n revert AttributeDoesNotExist(index);\n }\n _updateAttributeName(index, newName);\n }\n\n function updateAttributesName(\n uint8[] memory indices,\n bytes32[] memory newNames\n ) external onlyOwner {\n if (indices.length != newNames.length) {\n revert ArgsLengthDoesNotMatch();\n }\n\n for (uint256 i = 0; i < indices.length; i++) {\n updateAttributeName(indices[i], newNames[i]);\n }\n }\n\n /**\n * @dev Delete an existing attribute\n * @param index Index of the attribute. Can go from 0 to 63. The attribute must already exist\n */\n function deleteAttribute(uint8 index) public onlyOwner {\n index._checkIndexIsValid();\n if (!_isAttributeCreated(index)) {\n revert AttributeDoesNotExist(index);\n }\n _deleteAttribute(index);\n }\n\n function deleteAttributes(uint8[] memory indices) external onlyOwner {\n for (uint256 i = 0; i < indices.length; i++) {\n deleteAttribute(indices[i]);\n }\n }\n\n /**\n * @dev Set a value for an attribute of an attestationsCollection. The attribute should already be created.\n * @param collectionId Collection Id of the targeted attestationsCollection\n * @param index Index of the attribute (must be between 0 and 63)\n * @param value Value of the attribute we want to set for this attestationsCollection. Can take the value 0 to 15\n */\n function setAttributeValueForAttestationsCollection(\n uint256 collectionId,\n uint8 index,\n uint8 value\n ) public onlyOwner {\n index._checkIndexIsValid();\n\n if (!_isAttributeCreated(index)) {\n revert AttributeDoesNotExist(index);\n }\n\n _setAttributeForAttestationsCollection(collectionId, index, value);\n }\n\n function setAttributesValuesForAttestationsCollections(\n uint256[] memory collectionIds,\n uint8[] memory indices,\n uint8[] memory values\n ) external onlyOwner {\n if (collectionIds.length != indices.length || collectionIds.length != values.length) {\n revert ArgsLengthDoesNotMatch();\n }\n for (uint256 i = 0; i < collectionIds.length; i++) {\n setAttributeValueForAttestationsCollection(collectionIds[i], indices[i], values[i]);\n }\n }\n\n /**\n * @dev Returns the attribute's value (from 0 to 15) of an attestationsCollection\n * @param collectionId Collection Id of the targeted attestationsCollection\n * @param index Index of the attribute. Can go from 0 to 63.\n */\n function getAttributeValueForAttestationsCollection(\n uint256 collectionId,\n uint8 index\n ) public view returns (uint8) {\n uint256 currentAttributesValues = _getAttributesValuesBitmapForAttestationsCollection(\n collectionId\n );\n return currentAttributesValues._get(index);\n }\n\n function getAttributesValuesForAttestationsCollection(\n uint256 collectionId,\n uint8[] memory indices\n ) external view returns (uint8[] memory) {\n uint8[] memory attributesValues = new uint8[](indices.length);\n for (uint256 i = 0; i < indices.length; i++) {\n attributesValues[i] = getAttributeValueForAttestationsCollection(collectionId, indices[i]);\n }\n return attributesValues;\n }\n\n /**\n * @dev Returns whether an attestationsCollection has a specific attribute referenced by its index\n * @param collectionId Collection Id of the targeted attestationsCollection\n * @param index Index of the attribute. Can go from 0 to 63.\n */\n function attestationsCollectionHasAttribute(\n uint256 collectionId,\n uint8 index\n ) public view returns (bool) {\n uint256 currentAttributeValues = _getAttributesValuesBitmapForAttestationsCollection(\n collectionId\n );\n return currentAttributeValues._get(index) > 0;\n }\n\n function attestationsCollectionHasAttributes(\n uint256 collectionId,\n uint8[] memory indices\n ) external view returns (bool) {\n for (uint256 i = 0; i < indices.length; i++) {\n if (!attestationsCollectionHasAttribute(collectionId, indices[i])) {\n return false;\n }\n }\n return true;\n }\n\n /**\n * @dev Returns all the enabled attributes names and their values for a specific attestationsCollection\n * @param collectionId Collection Id of the targeted attestationsCollection\n */\n function getAttributesNamesAndValuesForAttestationsCollection(\n uint256 collectionId\n ) public view returns (bytes32[] memory, uint8[] memory) {\n uint256 currentAttributesValues = _getAttributesValuesBitmapForAttestationsCollection(\n collectionId\n );\n\n (\n uint8[] memory indices,\n uint8[] memory values,\n uint8 nbOfNonZeroValues\n ) = currentAttributesValues._getAllNonZeroValues();\n\n bytes32[] memory attributesNames = new bytes32[](nbOfNonZeroValues);\n uint8[] memory attributesValues = new uint8[](nbOfNonZeroValues);\n for (uint8 i = 0; i < nbOfNonZeroValues; i++) {\n attributesNames[i] = _attributesNames[indices[i]];\n attributesValues[i] = values[i];\n }\n\n return (attributesNames, attributesValues);\n }\n\n /*****************************\n *\n * INTERNAL FUNCTIONS\n *\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 function _isAuthorized(address issuer, uint256 collectionId) internal view returns (bool) {\n return _authorizedRanges[issuer]._includes(collectionId);\n }\n\n function _setAttributeForAttestationsCollection(\n uint256 collectionId,\n uint8 index,\n uint8 value\n ) internal {\n uint256 currentAttributes = _getAttributesValuesBitmapForAttestationsCollection(collectionId);\n\n _attestationsCollectionAttributesValuesBitmap[collectionId] = currentAttributes._set(\n index,\n value\n );\n\n emit AttestationsCollectionAttributeSet(collectionId, index, value);\n }\n\n function _createNewAttribute(uint8 index, bytes32 name) internal {\n _attributesNames[index] = name;\n\n emit NewAttributeCreated(index, name);\n }\n\n function _updateAttributeName(uint8 index, bytes32 newName) internal {\n bytes32 previousName = _attributesNames[index];\n\n _attributesNames[index] = newName;\n\n emit AttributeNameUpdated(index, newName, previousName);\n }\n\n function _deleteAttribute(uint8 index) internal {\n bytes32 deletedName = _attributesNames[index];\n\n delete _attributesNames[index];\n\n emit AttributeDeleted(index, deletedName);\n }\n\n function _getAttributesValuesBitmapForAttestationsCollection(\n uint256 collectionId\n ) internal view returns (uint256) {\n return _attestationsCollectionAttributesValuesBitmap[collectionId];\n }\n\n function _isAttributeCreated(uint8 index) internal view returns (bool) {\n if (_attributesNames[index] == 0) {\n return false;\n }\n return true;\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 /*******************************************************\n Storage layout:\n 19 slots for config\n 4 currently used for _initialized, _initializing, _paused, _owner\n 15 place holders\n 16 slots for logic\n 3 currently used for _authorizedRanges, _attestationsCollectionAttributesValuesBitmap, _attributesNames\n 13 place holders\n 1 slot for _attestationsData \n *******************************************************/\n\n // main config\n // changed `_initialized` from bool to uint8\n // as we were using OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol)\n // and changed to OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol)\n // PR: https://github.com/sismo-core/sismo-protocol/pull/41\n uint8 internal _initialized;\n bool internal _initializing;\n bool internal _paused;\n address internal _owner;\n // keeping some space for future\n uint256[15] private _placeHoldersAdmin;\n\n // storing the authorized ranges for each attesters\n mapping(address => Range[]) internal _authorizedRanges;\n // Storing the attributes values used for each attestations collection\n // Each attribute value is an hexadecimal\n mapping(uint256 => uint256) internal _attestationsCollectionAttributesValuesBitmap;\n // Storing the attribute name for each attributes index\n mapping(uint8 => bytes32) internal _attributesNames;\n // keeping some space for future\n uint256[13] private _placeHoldersConfig;\n // storing the data of attestations\n // =collectionId=> =owner=> attestationData\n mapping(uint256 => mapping(address => AttestationData)) internal _attestationsData;\n}\n" + }, + "contracts/core/libs/attestations-registry/InitializableLogic.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.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 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n * function initialize() initializer public {\n * __ERC20_init(\"MyToken\", \"MTK\");\n * }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n * function initializeV2() reinitializer(2) public {\n * __ERC20Permit_init(\"MyToken\");\n * }\n * }\n * ```\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 prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n * _disableInitializers();\n * }\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 Triggered when the contract has been initialized or reinitialized.\n */\n event Initialized(uint8 version);\n\n /**\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n * `onlyInitializing` functions can be used to initialize parent contracts.\n *\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n * constructor.\n *\n * Emits an {Initialized} event.\n */\n modifier initializer() {\n bool isTopLevelCall = !_initializing;\n require(\n (isTopLevelCall && _initialized < 1) ||\n (!Address.isContract(address(this)) && _initialized == 1),\n 'Initializable: contract is already initialized'\n );\n _initialized = 1;\n if (isTopLevelCall) {\n _initializing = true;\n }\n _;\n if (isTopLevelCall) {\n _initializing = false;\n emit Initialized(1);\n }\n }\n\n /**\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n * used to initialize parent contracts.\n *\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n * are added through upgrades and that require initialization.\n *\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n * cannot be nested. If one is invoked in the context of another, execution will revert.\n *\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n * a contract, executing them in the right order is up to the developer or operator.\n *\n * WARNING: setting the version to 255 will prevent any future reinitialization.\n *\n * Emits an {Initialized} event.\n */\n modifier reinitializer(uint8 version) {\n require(\n !_initializing && _initialized < version,\n 'Initializable: contract is already initialized'\n );\n _initialized = version;\n _initializing = true;\n _;\n _initializing = false;\n emit Initialized(version);\n }\n\n /**\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\n */\n modifier onlyInitializing() {\n require(_initializing, 'Initializable: contract is not initializing');\n _;\n }\n\n /**\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n * through proxies.\n *\n * Emits an {Initialized} event the first time it is successfully executed.\n */\n function _disableInitializers() internal virtual {\n require(!_initializing, 'Initializable: contract is initializing');\n if (_initialized < type(uint8).max) {\n _initialized = type(uint8).max;\n emit Initialized(type(uint8).max);\n }\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initialized`\n */\n function _getInitializedVersion() internal view returns (uint8) {\n return _initialized;\n }\n\n /**\n * @dev Internal function that returns the initialized version. Returns `_initializing`\n */\n function _isInitializing() internal view returns (bool) {\n return _initializing;\n }\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/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/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(\n address target,\n bytes memory data\n ) 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/core/libs/utils/Bitmap256Bit.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.14;\n\n/*\n * The 256-bit bitmap is structured in 64 chuncks of 4 bits each.\n * The 4 bits can encode any value from 0 to 15.\n\n chunck63 chunck2 chunck1 chunck0\n bits bits bits bits \n ┌────────────┐ ┌────────────┬────────────┬────────────┐\n │ 1 1 1 1 │ .... │ 1 0 1 1 │ 0 0 0 0 │ 0 0 0 1 │\n └────────────┘ └────────────┴────────────┴────────────┘\n value 15 value 11 value 0 value 1\n\n * A chunck index must be between 0 and 63.\n * A value must be between 0 and 15.\n **/\n\nlibrary Bitmap256Bit {\n uint256 constant MAX_INT = 2 ** 256 - 1;\n\n error IndexOutOfBounds(uint8 index);\n error ValueOutOfBounds(uint8 value);\n\n /**\n * @dev Return the value at a given index of a 256-bit bitmap\n * @param index index where the value can be found. Can be between 0 and 63\n */\n function _get(uint256 self, uint8 index) internal pure returns (uint8) {\n uint256 currentValues = self;\n // Get the encoded 4-bit value by right shifting to the `index` position\n uint256 shifted = currentValues >> (4 * index);\n // Get the value by only masking the last 4 bits with an AND operator\n return uint8(shifted & (2 ** 4 - 1));\n }\n\n /**\n * @dev Set a value at a chosen index in a 256-bit bitmap\n * @param index index where the value will be stored. Can be between 0 and 63\n * @param value value to store. Can be between 0 and 15\n */\n function _set(uint256 self, uint8 index, uint8 value) internal pure returns (uint256) {\n _checkIndexIsValid(index);\n _checkValueIsValid(value);\n\n uint256 currentValues = self;\n // 1. first we need to remove the current value for the inputed `index`\n // Left Shift 4 bits mask (1111 mask) to the `index` position\n uint256 mask = (2 ** 4 - 1) << (4 * index);\n // Apply a XOR operation to obtain a mask with all bits set to 1 except the 4 bits that we want to remove\n uint256 negativeMask = MAX_INT ^ mask;\n // Apply a AND operation between the current values and the negative mask to remove the wanted bits\n uint256 newValues = currentValues & negativeMask;\n\n // 2. We set the new value wanted at the `index` position\n // Create the 4 bits encoding the new value and left shift them to the `index` position\n uint256 newValueMask = uint256(value) << (4 * index);\n // Apply an OR operation between the current values and the newValueMask to reference new value\n return newValues | newValueMask;\n }\n\n /**\n * @dev Get all the non-zero values in a 256-bit bitmap\n * @param self a 256-bit bitmap\n */\n function _getAllNonZeroValues(\n uint256 self\n ) internal pure returns (uint8[] memory, uint8[] memory, uint8) {\n uint8[] memory indices = new uint8[](64);\n uint8[] memory values = new uint8[](64);\n uint8 nbOfNonZeroValues = 0;\n for (uint8 i = 0; i < 63; i++) {\n uint8 value = _get(self, i);\n if (value > 0) {\n indices[nbOfNonZeroValues] = i;\n values[nbOfNonZeroValues] = value;\n nbOfNonZeroValues++;\n }\n }\n return (indices, values, nbOfNonZeroValues);\n }\n\n /**\n * @dev Check if the index is valid (is between 0 and 63)\n * @param index index of a chunck\n */\n function _checkIndexIsValid(uint8 index) internal pure {\n if (index > 63) {\n revert IndexOutOfBounds(index);\n }\n }\n\n /**\n * @dev Check if the value is valid (is between 0 and 15)\n * @param value value to encode in a chunck\n */\n function _checkValueIsValid(uint8 value) internal pure {\n if (value > 15) {\n revert ValueOutOfBounds(value);\n }\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/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/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" + }, + "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 uint8 public constant IMPLEMENTATION_VERSION = 2;\n\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 ownerAddress Owner of the contract, can update public key and address\n * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\n */\n function initialize(address ownerAddress) public reinitializer(IMPLEMENTATION_VERSION) {\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\n if (owner() == address(0) || address(this).code.length == 0) {\n _transferOwnership(ownerAddress);\n }\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" + }, + "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 uint8 public constant IMPLEMENTATION_VERSION = 2;\n\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 ownerAddress 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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\n */\n function initialize(\n address ownerAddress,\n uint256[2] memory commitmentMapperEdDSAPubKey,\n address commitmentMapperAddress\n ) public reinitializer(IMPLEMENTATION_VERSION) {\n // if proxy did not setup owner yet or if called by constructor (for implem setup)\n if (owner() == address(0) || address(this).code.length == 0) {\n _transferOwnership(ownerAddress);\n _updateCommitmentMapperEdDSAPubKey(commitmentMapperEdDSAPubKey);\n _updateCommitmentMapperAddress(commitmentMapperAddress);\n }\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/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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\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/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 * @notice The reinitializer modifier is needed to configure modules that are added through upgrades and that require initialization.\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" + }, + "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(\n address newImplementation,\n bytes calldata data\n ) external payable ifAdmin {\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/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(\n uint256 collectionId,\n address owner\n ) external view returns (uint256) {\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/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(\n Request calldata request,\n bytes calldata proofData\n ) internal virtual override {}\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" + } + }, + "settings": { + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates", + "storageLayout" + ], + "": [ + "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 20ce26a..d8551f8 100644 --- a/tasks/deploy-tasks/deployments-config.ts +++ b/tasks/deploy-tasks/deployments-config.ts @@ -190,7 +190,7 @@ export const deploymentsConfig: DeploymentsConfigTypes = { collectionIdLast: '10000000', }, hydraS1Verifier: { - address: '0x34e3CcCF4fF2E297be22465b85F03E5E6D27b41B', + address: '0xCBB1032416EB875D94Da8a447D73471E4C51998E', }, hydraS1SimpleAttester: { enableDeployment: false,