From c8fd670885aa4b2a846e2be4a25cfbddca46ba22 Mon Sep 17 00:00:00 2001 From: Mark Bliss Date: Mon, 13 May 2024 17:58:31 +0200 Subject: [PATCH] Testnet deploy for 0.8.6 rc5 (#259) --- deployments/testnet/PostageStamp.json | 130 +++++------------------- deployments/testnet/PriceOracle.json | 62 +++++------ deployments/testnet/Redistribution.json | 48 ++++----- deployments/testnet/StakeRegistry.json | 74 +++++++------- testnet_deployed.json | 94 +++-------------- 5 files changed, 134 insertions(+), 274 deletions(-) diff --git a/deployments/testnet/PostageStamp.json b/deployments/testnet/PostageStamp.json index 7a27b220..f74a4d77 100644 --- a/deployments/testnet/PostageStamp.json +++ b/deployments/testnet/PostageStamp.json @@ -1,5 +1,5 @@ { - "address": "0xb2C3CD6cA7917265faFc70C847F9202aB23f651F", + "address": "0x794532C50c6EfA070Cd206b82178E98433046996", "abi": [ { "inputs": [ @@ -221,25 +221,6 @@ "name": "BatchTopUp", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "batchId", - "type": "bytes32" - } - ], - "name": "CopyBatchFailed", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -634,51 +615,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "batchId", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint8", - "name": "depth", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "bucketDepth", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "immutableFlag", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "remainingBalance", - "type": "uint256" - } - ], - "internalType": "struct PostageStamp.ImportBatch[]", - "name": "bulkBatches", - "type": "tuple[]" - } - ], - "name": "copyBatchBulk", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -1143,22 +1079,22 @@ "type": "function" } ], - "transactionHash": "0xecb206570c41aea26a0f75bad4e119e2bdfaa340749bed8ae10fee46847e80a1", + "transactionHash": "0x1414bfcc284c9befe409c8c95ea129e8b45dc64559d41760c18bee5c1b50550c", "receipt": { "to": null, "from": "0xb1C7F17Ed88189Abf269Bf68A3B2Ed83C5276aAe", - "contractAddress": "0xb2C3CD6cA7917265faFc70C847F9202aB23f651F", - "transactionIndex": 46, - "gasUsed": "3320836", - "logsBloom": "0x00000004000000000000000000000000000000000000000001000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000010000000000000000002000000000040000000000000000000000008000000000000000000000000000000000000000000100000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000100002000000020000000000000000000000000000000000000000400000000000000000000000000", - "blockHash": "0x5d04e455358f37dfccf9a00bba5636be6306ed2e5e906c194f4bc61be7488443", - "transactionHash": "0xecb206570c41aea26a0f75bad4e119e2bdfaa340749bed8ae10fee46847e80a1", + "contractAddress": "0x794532C50c6EfA070Cd206b82178E98433046996", + "transactionIndex": 0, + "gasUsed": "3200816", + "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000010000000000000000002000000000040000000000000000000000008000000400000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000002000000000000000000000000000000100002000000020000000000000000000000000000000000000000400000000000000000000000000", + "blockHash": "0x7c9b5355bc4beb3d66bfa0fa780446f93c6b5d023d112738249c23f8dc6ef497", + "transactionHash": "0x1414bfcc284c9befe409c8c95ea129e8b45dc64559d41760c18bee5c1b50550c", "logs": [ { - "transactionIndex": 46, - "blockNumber": 5753668, - "transactionHash": "0xecb206570c41aea26a0f75bad4e119e2bdfaa340749bed8ae10fee46847e80a1", - "address": "0xb2C3CD6cA7917265faFc70C847F9202aB23f651F", + "transactionIndex": 0, + "blockNumber": 4594513, + "transactionHash": "0x1414bfcc284c9befe409c8c95ea129e8b45dc64559d41760c18bee5c1b50550c", + "address": "0x794532C50c6EfA070Cd206b82178E98433046996", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -1166,14 +1102,14 @@ "0x000000000000000000000000b1c7f17ed88189abf269bf68a3b2ed83c5276aae" ], "data": "0x", - "logIndex": 62, - "blockHash": "0x5d04e455358f37dfccf9a00bba5636be6306ed2e5e906c194f4bc61be7488443" + "logIndex": 0, + "blockHash": "0x7c9b5355bc4beb3d66bfa0fa780446f93c6b5d023d112738249c23f8dc6ef497" }, { - "transactionIndex": 46, - "blockNumber": 5753668, - "transactionHash": "0xecb206570c41aea26a0f75bad4e119e2bdfaa340749bed8ae10fee46847e80a1", - "address": "0xb2C3CD6cA7917265faFc70C847F9202aB23f651F", + "transactionIndex": 0, + "blockNumber": 4594513, + "transactionHash": "0x1414bfcc284c9befe409c8c95ea129e8b45dc64559d41760c18bee5c1b50550c", + "address": "0x794532C50c6EfA070Cd206b82178E98433046996", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a", @@ -1181,12 +1117,12 @@ "0x000000000000000000000000b1c7f17ed88189abf269bf68a3b2ed83c5276aae" ], "data": "0x", - "logIndex": 63, - "blockHash": "0x5d04e455358f37dfccf9a00bba5636be6306ed2e5e906c194f4bc61be7488443" + "logIndex": 1, + "blockHash": "0x7c9b5355bc4beb3d66bfa0fa780446f93c6b5d023d112738249c23f8dc6ef497" } ], - "blockNumber": 5753668, - "cumulativeGasUsed": "7837432", + "blockNumber": 4594513, + "cumulativeGasUsed": "3200816", "status": 1, "byzantium": true }, @@ -1194,11 +1130,11 @@ "0x543dDb01Ba47acB11de34891cD86B675F04840db", 16 ], - "numDeployments": 2, - "solcInputHash": "72863154353a753995d89fd6bb12e809", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bzzToken\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_minimumBucketDepth\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AdministratorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchTooSmall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DepthNotIncreasing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficienChunkCount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDepth\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoBatchesExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotBatchOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyPauser\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyRedistributor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PriceOracleOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TotalOutpaymentDecreased\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueCannotBeZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueKeyPairExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroBalance\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"normalisedBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"bucketDepth\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"immutableFlag\",\"type\":\"bool\"}],\"name\":\"BatchCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"newDepth\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"normalisedBalance\",\"type\":\"uint256\"}],\"name\":\"BatchDepthIncrease\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"topupAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"normalisedBalance\",\"type\":\"uint256\"}],\"name\":\"BatchTopUp\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"batchId\",\"type\":\"bytes32\"}],\"name\":\"CopyBatchFailed\",\"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\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"PotWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"PriceUpdate\",\"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\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PRICE_ORACLE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REDISTRIBUTOR_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"}],\"name\":\"batchBucketDepth\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"}],\"name\":\"batchDepth\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"}],\"name\":\"batchImmutableFlag\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"}],\"name\":\"batchLastUpdatedBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"}],\"name\":\"batchNormalisedBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"}],\"name\":\"batchOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"batches\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"bucketDepth\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"immutableFlag\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"normalisedBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastUpdatedBlockNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bzzToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_initialBalancePerChunk\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"_depth\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"_bucketDepth\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"_immutable\",\"type\":\"bool\"}],\"name\":\"copyBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"batchId\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"bucketDepth\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"immutableFlag\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"remainingBalance\",\"type\":\"uint256\"}],\"internalType\":\"struct PostageStamp.ImportBatch[]\",\"name\":\"bulkBatches\",\"type\":\"tuple[]\"}],\"name\":\"copyBatchBulk\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_initialBalancePerChunk\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"_depth\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"_bucketDepth\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"_nonce\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"_immutable\",\"type\":\"bool\"}],\"name\":\"createBatch\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentTotalOutPayment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"}],\"name\":\"expireLimited\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"expiredBatchesExist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"firstBatchId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"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\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_newDepth\",\"type\":\"uint8\"}],\"name\":\"increaseDepth\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isBatchesTreeEmpty\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastExpiryBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPrice\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastUpdatedBlock\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumBucketDepth\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumInitialBalancePerChunk\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumValidityBlocks\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"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\":[],\"name\":\"pot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"}],\"name\":\"remainingBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"uint64\",\"name\":\"_value\",\"type\":\"uint64\"}],\"name\":\"setMinimumValidityBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_price\",\"type\":\"uint256\"}],\"name\":\"setPrice\",\"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\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_topupAmountPerChunk\",\"type\":\"uint256\"}],\"name\":\"topUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalPot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"validChunkCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"The Swarm Authors\",\"details\":\"The postage stamp contracts allows users to create and manage postage stamp batches. The current balance for each batch is stored ordered in descending order of normalised balance. Balance is normalised to be per chunk and the total spend since the contract was deployed, i.e. when a batch is bought, its per-chunk balance is supplemented with the current cost of storing one chunk since the beginning of time, as if the batch had existed since the contract's inception. During the _expiry_ process, each of these balances is checked against the _currentTotalOutPayment_, a similarly normalised figure that represents the current cost of storing one chunk since the beginning of time. A batch with a normalised balance less than _currentTotalOutPayment_ is treated as expired. The _currentTotalOutPayment_ is calculated using _totalOutPayment_ which is updated during _setPrice_ events so that the applicable per-chunk prices can be charged for the relevant periods of time. This can then be multiplied by the amount of chunks which are allowed to be stamped by each batch to get the actual cost of storage. The amount of chunks a batch can stamp is determined by the _bucketDepth_. A batch may store a maximum of 2^depth chunks. The global figure for the currently allowed chunks is tracked by _validChunkCount_ and updated during batch _expiry_ events.\",\"events\":{\"BatchCreated(bytes32,uint256,uint256,address,uint8,uint8,bool)\":{\"details\":\"Emitted when a new batch is created.\"},\"BatchDepthIncrease(bytes32,uint8,uint256)\":{\"details\":\"Emitted when the depth of an existing batch increases.\"},\"BatchTopUp(bytes32,uint256,uint256)\":{\"details\":\"Emitted when an existing batch is topped up.\"},\"CopyBatchFailed(uint256,bytes32)\":{\"details\":\"Emitted on every batch failed in bulk batch creation\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"PotWithdrawn(address,uint256)\":{\"details\":\"Emitted when an pot is Withdrawn.\"},\"PriceUpdate(uint256)\":{\"details\":\"Emitted on every price update.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_bzzToken\":\"The ERC20 token address to reference in this contract.\",\"_minimumBucketDepth\":\"The minimum bucket depth of batches that can be purchased.\"}},\"copyBatch(address,uint256,uint8,uint8,bytes32,bool)\":{\"details\":\"At least `_initialBalancePerChunk*2^depth` tokens must be approved in the ERC20 token contract.\",\"params\":{\"_batchId\":\"BatchId being copied (from previous version contract data).\",\"_depth\":\"Initial depth of the new batch.\",\"_immutable\":\"Whether the batch is mutable.\",\"_initialBalancePerChunk\":\"Initial balance per chunk of the batch.\",\"_owner\":\"Owner of the new batch.\"}},\"copyBatchBulk((bytes32,address,uint8,uint8,bool,uint256)[])\":{\"details\":\"Import batches in bulk to lower the number of transactions needed,becase of block limitations 90 batches per trx is ceiling, 60 to 70 sweetspot\",\"params\":{\"bulkBatches\":\"array of batches\"}},\"createBatch(address,uint256,uint8,uint8,bytes32,bool)\":{\"details\":\"At least `_initialBalancePerChunk*2^depth` tokens must be approved in the ERC20 token contract.\",\"params\":{\"_depth\":\"Initial depth of the new batch.\",\"_immutable\":\"Whether the batch is mutable.\",\"_initialBalancePerChunk\":\"Initial balance per chunk.\",\"_nonce\":\"A random value used in the batch id derivation to allow multiple batches per owner.\",\"_owner\":\"Owner of the new batch.\"}},\"currentTotalOutPayment()\":{\"details\":\"Returns the total normalised all-time per chunk payout. Only Batches with a normalised balance greater than this are valid.\"},\"expireLimited(uint256)\":{\"details\":\"Can be used if reclaiming all expired batches would exceed the block gas limit, causing other contract method calls to fail.\",\"params\":{\"limit\":\"The maximum number of batches to expire.\"}},\"firstBatchId()\":{\"details\":\"If more than one batch id, return index at 0, if no batches, revert.\"},\"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`.\"},\"increaseDepth(bytes32,uint8)\":{\"details\":\"Can only be called by the owner of the batch.\",\"params\":{\"_batchId\":\"the id of an existing batch.\",\"_newDepth\":\"the new (larger than the previous one) depth for this batch.\"}},\"pause()\":{\"details\":\"Can only be called by the pauser when not paused. The contract can be provably stopped by renouncing the pauser role and the admin role once paused.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"remainingBalance(bytes32)\":{\"params\":{\"_batchId\":\"The id of an existing batch.\"}},\"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.\"},\"setPrice(uint256)\":{\"details\":\"Can only be called by the price oracle role.\",\"params\":{\"_price\":\"The new price.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"topUp(bytes32,uint256)\":{\"details\":\"At least `_topupAmountPerChunk*2^depth` tokens must be approved in the ERC20 token contract.\",\"params\":{\"_batchId\":\"The id of an existing batch.\",\"_topupAmountPerChunk\":\"The amount of additional tokens to add per chunk.\"}},\"unPause()\":{\"details\":\"Can only be called by the pauser role while paused.\"},\"withdraw(address)\":{\"params\":{\"beneficiary\":\"Recieves the current total pot.\"}}},\"title\":\"PostageStamp contract\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"copyBatch(address,uint256,uint8,uint8,bytes32,bool)\":{\"notice\":\"Manually create a new batch when facilitating migration, can only be called by the Admin role.\"},\"copyBatchBulk((bytes32,address,uint8,uint8,bool,uint256)[])\":{\"notice\":\"Import batches in bulk\"},\"createBatch(address,uint256,uint8,uint8,bytes32,bool)\":{\"notice\":\"Create a new batch.\"},\"currentTotalOutPayment()\":{\"notice\":\"Total per-chunk cost since the contract's deployment.\"},\"expireLimited(uint256)\":{\"notice\":\"Reclaims a limited number of expired batches\"},\"expiredBatchesExist()\":{\"notice\":\"Indicates whether expired batches exist.\"},\"firstBatchId()\":{\"notice\":\"Get the first batch id ordered by ascending normalised balance.\"},\"increaseDepth(bytes32,uint8)\":{\"notice\":\"Increase the depth of an existing batch.\"},\"isBatchesTreeEmpty()\":{\"notice\":\"Return true if no batches exist\"},\"pause()\":{\"notice\":\"Pause the contract.\"},\"remainingBalance(bytes32)\":{\"notice\":\"Return the per chunk balance not yet used up.\"},\"setPrice(uint256)\":{\"notice\":\"Set a new price.\"},\"topUp(bytes32,uint256)\":{\"notice\":\"Top up an existing batch.\"},\"totalPot()\":{\"notice\":\"The current pot.\"},\"unPause()\":{\"notice\":\"Unpause the contract.\"},\"withdraw(address)\":{\"notice\":\"Withdraw the pot, authorised callers only.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/PostageStamp.sol\":\"PostageStamp\"},\"evmVersion\":\"paris\",\"libraries\":{\":__CACHE_BREAKER__\":\"0x00000000d41867734bbee4c6863d9255b2b06ac1\"},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"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/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/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x4ffc0547c02ad22925310c585c0f166f8759e2648a09e9b489100c42f15dd98d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"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\"},\"src/OrderStatisticsTree/HitchensOrderStatisticsTreeLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\n/*\\nHitchens Order Statistics Tree v0.99\\n\\nA Solidity Red-Black Tree library to store and maintain a sorted data\\nstructure in a Red-Black binary search tree, with O(log 2n) insert, remove\\nand search time (and gas, approximately)\\n\\nhttps://github.com/rob-Hitchens/OrderStatisticsTree\\n\\nCopyright (c) Rob Hitchens. the MIT License\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\\"Software\\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\nSOFTWARE.\\n\\nSignificant portions from BokkyPooBahsRedBlackTreeLibrary,\\nhttps://github.com/bokkypoobah/BokkyPooBahsRedBlackTreeLibrary\\n\\nTHIS SOFTWARE IS NOT TESTED OR AUDITED. DO NOT USE FOR PRODUCTION.\\n*/\\n\\nlibrary HitchensOrderStatisticsTreeLib {\\n uint private constant EMPTY = 0;\\n struct Node {\\n uint parent;\\n uint left;\\n uint right;\\n bool red;\\n bytes32[] keys;\\n mapping(bytes32 => uint) keyMap;\\n uint count;\\n }\\n struct Tree {\\n uint root;\\n mapping(uint => Node) nodes;\\n }\\n\\n error ValueDoesNotExist(); // Provided value doesn't exist in the tree.\\n error ValueCannotBeZero(); // Value to insert cannot be zero\\n error ValueKeyPairExists(); // Value and Key pair exists. Cannot be inserted again.\\n\\n function first(Tree storage self) internal view returns (uint _value) {\\n _value = self.root;\\n if (_value == EMPTY) return 0;\\n while (self.nodes[_value].left != EMPTY) {\\n _value = self.nodes[_value].left;\\n }\\n }\\n\\n function exists(Tree storage self, uint value) internal view returns (bool _exists) {\\n if (value == EMPTY) return false;\\n if (value == self.root) return true;\\n if (self.nodes[value].parent != EMPTY) return true;\\n return false;\\n }\\n\\n function keyExists(Tree storage self, bytes32 key, uint value) internal view returns (bool _exists) {\\n if (!exists(self, value)) return false;\\n return self.nodes[value].keys[self.nodes[value].keyMap[key]] == key;\\n }\\n\\n function getNode(\\n Tree storage self,\\n uint value\\n ) internal view returns (uint _parent, uint _left, uint _right, bool _red, uint keyCount, uint __count) {\\n if (!exists(self, value)) {\\n revert ValueDoesNotExist();\\n }\\n\\n Node storage gn = self.nodes[value];\\n return (gn.parent, gn.left, gn.right, gn.red, gn.keys.length, gn.keys.length + gn.count);\\n }\\n\\n function getNodeCount(Tree storage self, uint value) internal view returns (uint __count) {\\n Node storage gn = self.nodes[value];\\n return gn.keys.length + gn.count;\\n }\\n\\n function valueKeyAtIndex(Tree storage self, uint value, uint index) internal view returns (bytes32 _key) {\\n if (!exists(self, value)) {\\n revert ValueDoesNotExist();\\n }\\n return self.nodes[value].keys[index];\\n }\\n\\n function count(Tree storage self) internal view returns (uint _count) {\\n return getNodeCount(self, self.root);\\n }\\n\\n /* We don't use this functionality, so it is commented out to make audit easier\\n\\n function percentile(Tree storage self, uint value) internal view returns(uint _percentile) {\\n uint denominator = count(self);\\n uint numerator = rank(self, value);\\n _percentile = ((uint(1000) * numerator)/denominator+(uint(5)))/uint(10);\\n }\\n function permil(Tree storage self, uint value) internal view returns(uint _permil) {\\n uint denominator = count(self);\\n uint numerator = rank(self, value);\\n _permil = ((uint(10000) * numerator)/denominator+(uint(5)))/uint(10);\\n }\\n function atPercentile(Tree storage self, uint _percentile) internal view returns(uint _value) {\\n uint findRank = (((_percentile * count(self))/uint(10)) + uint(5)) / uint(10);\\n return atRank(self,findRank);\\n }\\n function atPermil(Tree storage self, uint _permil) internal view returns(uint _value) {\\n uint findRank = (((_permil * count(self))/uint(100)) + uint(5)) / uint(10);\\n return atRank(self,findRank);\\n }\\n function median(Tree storage self) internal view returns(uint value) {\\n return atPercentile(self,50);\\n }\\n function below(Tree storage self, uint value) public view returns(uint _below) {\\n if(count(self) > 0 && value > 0) _below = rank(self,value)-uint(1);\\n }\\n function above(Tree storage self, uint value) public view returns(uint _above) {\\n if(count(self) > 0) _above = count(self)-rank(self,value);\\n }\\n function valueBelowEstimate(Tree storage self, uint estimate) public view returns(uint _below) {\\n if(count(self) > 0 && estimate > 0) {\\n uint highestValue = last(self);\\n uint lowestValue = first(self);\\n if(estimate < lowestValue) {\\n return 0;\\n }\\n if(estimate >= highestValue) {\\n return highestValue;\\n }\\n uint rankOfValue = rank(self, estimate); // approximation\\n _below = atRank(self, rankOfValue);\\n if(_below > estimate) { // fix error in approximation\\n rankOfValue--;\\n _below = atRank(self, rankOfValue);\\n }\\n }\\n }\\n function valueAboveEstimate(Tree storage self, uint estimate) public view returns(uint _above) {\\n if(count(self) > 0 && estimate > 0) {\\n uint highestValue = last(self);\\n uint lowestValue = first(self);\\n if(estimate > highestValue) {\\n return 0;\\n }\\n if(estimate <= lowestValue) {\\n return lowestValue;\\n }\\n uint rankOfValue = rank(self, estimate); // approximation\\n _above = atRank(self, rankOfValue);\\n if(_above < estimate) { // fix error in approximation\\n rankOfValue++;\\n _above = atRank(self, rankOfValue);\\n }\\n }\\n }\\n function rank(Tree storage self, uint value) internal view returns(uint _rank) {\\n if(count(self) > 0) {\\n bool finished;\\n uint cursor = self.root;\\n Node storage c = self.nodes[cursor];\\n uint smaller = getNodeCount(self,c.left);\\n while (!finished) {\\n uint keyCount = c.keys.length;\\n if(cursor == value) {\\n finished = true;\\n } else {\\n if(cursor < value) {\\n cursor = c.right;\\n c = self.nodes[cursor];\\n smaller += keyCount + getNodeCount(self,c.left);\\n } else {\\n cursor = c.left;\\n c = self.nodes[cursor];\\n smaller -= (keyCount + getNodeCount(self,c.right));\\n }\\n }\\n if (!exists(self,cursor)) {\\n finished = true;\\n }\\n }\\n return smaller + 1;\\n }\\n }\\n function atRank(Tree storage self, uint _rank) internal view returns(uint _value) {\\n bool finished;\\n uint cursor = self.root;\\n Node storage c = self.nodes[cursor];\\n uint smaller = getNodeCount(self,c.left);\\n while (!finished) {\\n _value = cursor;\\n c = self.nodes[cursor];\\n uint keyCount = c.keys.length;\\n if(smaller + 1 >= _rank && smaller + keyCount <= _rank) {\\n _value = cursor;\\n finished = true;\\n } else {\\n if(smaller + keyCount <= _rank) {\\n cursor = c.right;\\n c = self.nodes[cursor];\\n smaller += keyCount + getNodeCount(self,c.left);\\n } else {\\n cursor = c.left;\\n c = self.nodes[cursor];\\n smaller -= (keyCount + getNodeCount(self,c.right));\\n }\\n }\\n if (!exists(self,cursor)) {\\n finished = true;\\n }\\n }\\n }\\n*/\\n\\n function insert(Tree storage self, bytes32 key, uint value) internal {\\n if (value == EMPTY) {\\n revert ValueCannotBeZero();\\n }\\n if (keyExists(self, key, value)) {\\n revert ValueKeyPairExists();\\n }\\n uint cursor;\\n uint probe = self.root;\\n while (probe != EMPTY) {\\n cursor = probe;\\n if (value < probe) {\\n probe = self.nodes[probe].left;\\n } else if (value > probe) {\\n probe = self.nodes[probe].right;\\n } else if (value == probe) {\\n self.nodes[probe].keys.push(key);\\n self.nodes[probe].keyMap[key] = self.nodes[probe].keys.length - uint(1);\\n return;\\n }\\n self.nodes[cursor].count++;\\n }\\n Node storage nValue = self.nodes[value];\\n nValue.parent = cursor;\\n nValue.left = EMPTY;\\n nValue.right = EMPTY;\\n nValue.red = true;\\n nValue.keys.push(key);\\n nValue.keyMap[key] = nValue.keys.length - uint(1);\\n if (cursor == EMPTY) {\\n self.root = value;\\n } else if (value < cursor) {\\n self.nodes[cursor].left = value;\\n } else {\\n self.nodes[cursor].right = value;\\n }\\n insertFixup(self, value);\\n }\\n\\n function remove(Tree storage self, bytes32 key, uint value) internal {\\n if (value == EMPTY) {\\n revert ValueCannotBeZero();\\n }\\n if (!keyExists(self, key, value)) {\\n revert ValueDoesNotExist();\\n }\\n\\n Node storage nValue = self.nodes[value];\\n uint rowToDelete = nValue.keyMap[key];\\n bytes32 last = nValue.keys[nValue.keys.length - uint(1)];\\n nValue.keys[rowToDelete] = last;\\n nValue.keyMap[last] = rowToDelete;\\n nValue.keys.pop();\\n\\n uint probe;\\n uint cursor;\\n\\n if (nValue.keys.length == 0) {\\n if (self.nodes[value].left == EMPTY || self.nodes[value].right == EMPTY) {\\n cursor = value;\\n } else {\\n cursor = self.nodes[value].right;\\n while (self.nodes[cursor].left != EMPTY) {\\n cursor = self.nodes[cursor].left;\\n }\\n }\\n\\n if (self.nodes[cursor].left != EMPTY) {\\n probe = self.nodes[cursor].left;\\n } else {\\n probe = self.nodes[cursor].right;\\n }\\n\\n uint cursorParent = self.nodes[cursor].parent;\\n self.nodes[probe].parent = cursorParent;\\n\\n if (cursorParent != EMPTY) {\\n if (cursor == self.nodes[cursorParent].left) {\\n self.nodes[cursorParent].left = probe;\\n } else {\\n self.nodes[cursorParent].right = probe;\\n }\\n } else {\\n self.root = probe;\\n }\\n\\n bool doFixup = !self.nodes[cursor].red;\\n\\n if (cursor != value) {\\n replaceParent(self, cursor, value);\\n self.nodes[cursor].left = self.nodes[value].left;\\n self.nodes[self.nodes[cursor].left].parent = cursor;\\n self.nodes[cursor].right = self.nodes[value].right;\\n self.nodes[self.nodes[cursor].right].parent = cursor;\\n self.nodes[cursor].red = self.nodes[value].red;\\n (cursor, value) = (value, cursor);\\n fixCountRecurse(self, value);\\n }\\n\\n if (doFixup) {\\n removeFixup(self, probe);\\n }\\n\\n fixCountRecurse(self, cursorParent);\\n delete self.nodes[cursor];\\n }\\n }\\n\\n function fixCountRecurse(Tree storage self, uint value) private {\\n while (value != EMPTY) {\\n self.nodes[value].count =\\n getNodeCount(self, self.nodes[value].left) +\\n getNodeCount(self, self.nodes[value].right);\\n value = self.nodes[value].parent;\\n }\\n }\\n\\n function treeMinimum(Tree storage self, uint value) private view returns (uint) {\\n while (self.nodes[value].left != EMPTY) {\\n value = self.nodes[value].left;\\n }\\n return value;\\n }\\n\\n function treeMaximum(Tree storage self, uint value) private view returns (uint) {\\n while (self.nodes[value].right != EMPTY) {\\n value = self.nodes[value].right;\\n }\\n return value;\\n }\\n\\n function rotateLeft(Tree storage self, uint value) private {\\n uint cursor = self.nodes[value].right;\\n uint parent = self.nodes[value].parent;\\n uint cursorLeft = self.nodes[cursor].left;\\n self.nodes[value].right = cursorLeft;\\n if (cursorLeft != EMPTY) {\\n self.nodes[cursorLeft].parent = value;\\n }\\n self.nodes[cursor].parent = parent;\\n if (parent == EMPTY) {\\n self.root = cursor;\\n } else if (value == self.nodes[parent].left) {\\n self.nodes[parent].left = cursor;\\n } else {\\n self.nodes[parent].right = cursor;\\n }\\n self.nodes[cursor].left = value;\\n self.nodes[value].parent = cursor;\\n self.nodes[value].count =\\n getNodeCount(self, self.nodes[value].left) +\\n getNodeCount(self, self.nodes[value].right);\\n self.nodes[cursor].count =\\n getNodeCount(self, self.nodes[cursor].left) +\\n getNodeCount(self, self.nodes[cursor].right);\\n }\\n\\n function rotateRight(Tree storage self, uint value) private {\\n uint cursor = self.nodes[value].left;\\n uint parent = self.nodes[value].parent;\\n uint cursorRight = self.nodes[cursor].right;\\n self.nodes[value].left = cursorRight;\\n if (cursorRight != EMPTY) {\\n self.nodes[cursorRight].parent = value;\\n }\\n self.nodes[cursor].parent = parent;\\n if (parent == EMPTY) {\\n self.root = cursor;\\n } else if (value == self.nodes[parent].right) {\\n self.nodes[parent].right = cursor;\\n } else {\\n self.nodes[parent].left = cursor;\\n }\\n self.nodes[cursor].right = value;\\n self.nodes[value].parent = cursor;\\n self.nodes[value].count =\\n getNodeCount(self, self.nodes[value].left) +\\n getNodeCount(self, self.nodes[value].right);\\n self.nodes[cursor].count =\\n getNodeCount(self, self.nodes[cursor].left) +\\n getNodeCount(self, self.nodes[cursor].right);\\n }\\n\\n function insertFixup(Tree storage self, uint value) private {\\n uint cursor;\\n while (value != self.root && self.nodes[self.nodes[value].parent].red) {\\n uint valueParent = self.nodes[value].parent;\\n if (valueParent == self.nodes[self.nodes[valueParent].parent].left) {\\n cursor = self.nodes[self.nodes[valueParent].parent].right;\\n if (self.nodes[cursor].red) {\\n self.nodes[valueParent].red = false;\\n self.nodes[cursor].red = false;\\n self.nodes[self.nodes[valueParent].parent].red = true;\\n value = self.nodes[valueParent].parent;\\n } else {\\n if (value == self.nodes[valueParent].right) {\\n value = valueParent;\\n rotateLeft(self, value);\\n }\\n valueParent = self.nodes[value].parent;\\n self.nodes[valueParent].red = false;\\n self.nodes[self.nodes[valueParent].parent].red = true;\\n rotateRight(self, self.nodes[valueParent].parent);\\n }\\n } else {\\n cursor = self.nodes[self.nodes[valueParent].parent].left;\\n if (self.nodes[cursor].red) {\\n self.nodes[valueParent].red = false;\\n self.nodes[cursor].red = false;\\n self.nodes[self.nodes[valueParent].parent].red = true;\\n value = self.nodes[valueParent].parent;\\n } else {\\n if (value == self.nodes[valueParent].left) {\\n value = valueParent;\\n rotateRight(self, value);\\n }\\n valueParent = self.nodes[value].parent;\\n self.nodes[valueParent].red = false;\\n self.nodes[self.nodes[valueParent].parent].red = true;\\n rotateLeft(self, self.nodes[valueParent].parent);\\n }\\n }\\n }\\n self.nodes[self.root].red = false;\\n }\\n\\n function replaceParent(Tree storage self, uint a, uint b) private {\\n uint bParent = self.nodes[b].parent;\\n self.nodes[a].parent = bParent;\\n if (bParent == EMPTY) {\\n self.root = a;\\n } else {\\n if (b == self.nodes[bParent].left) {\\n self.nodes[bParent].left = a;\\n } else {\\n self.nodes[bParent].right = a;\\n }\\n }\\n }\\n\\n function removeFixup(Tree storage self, uint value) private {\\n uint cursor;\\n while (value != self.root && !self.nodes[value].red) {\\n uint valueParent = self.nodes[value].parent;\\n if (value == self.nodes[valueParent].left) {\\n cursor = self.nodes[valueParent].right;\\n if (self.nodes[cursor].red) {\\n self.nodes[cursor].red = false;\\n self.nodes[valueParent].red = true;\\n rotateLeft(self, valueParent);\\n cursor = self.nodes[valueParent].right;\\n }\\n if (!self.nodes[self.nodes[cursor].left].red && !self.nodes[self.nodes[cursor].right].red) {\\n self.nodes[cursor].red = true;\\n value = valueParent;\\n } else {\\n if (!self.nodes[self.nodes[cursor].right].red) {\\n self.nodes[self.nodes[cursor].left].red = false;\\n self.nodes[cursor].red = true;\\n rotateRight(self, cursor);\\n cursor = self.nodes[valueParent].right;\\n }\\n self.nodes[cursor].red = self.nodes[valueParent].red;\\n self.nodes[valueParent].red = false;\\n self.nodes[self.nodes[cursor].right].red = false;\\n rotateLeft(self, valueParent);\\n value = self.root;\\n }\\n } else {\\n cursor = self.nodes[valueParent].left;\\n if (self.nodes[cursor].red) {\\n self.nodes[cursor].red = false;\\n self.nodes[valueParent].red = true;\\n rotateRight(self, valueParent);\\n cursor = self.nodes[valueParent].left;\\n }\\n if (!self.nodes[self.nodes[cursor].right].red && !self.nodes[self.nodes[cursor].left].red) {\\n self.nodes[cursor].red = true;\\n value = valueParent;\\n } else {\\n if (!self.nodes[self.nodes[cursor].left].red) {\\n self.nodes[self.nodes[cursor].right].red = false;\\n self.nodes[cursor].red = true;\\n rotateLeft(self, cursor);\\n cursor = self.nodes[valueParent].left;\\n }\\n self.nodes[cursor].red = self.nodes[valueParent].red;\\n self.nodes[valueParent].red = false;\\n self.nodes[self.nodes[cursor].left].red = false;\\n rotateRight(self, valueParent);\\n value = self.root;\\n }\\n }\\n }\\n self.nodes[value].red = false;\\n }\\n}\\n\",\"keccak256\":\"0x3d13491ca535051ff9d923b284f6b633c660a4d110804e4a3e965dfaa59024b8\",\"license\":\"MIT\"},\"src/PostageStamp.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.19;\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"./OrderStatisticsTree/HitchensOrderStatisticsTreeLib.sol\\\";\\n\\n/**\\n * @title PostageStamp contract\\n * @author The Swarm Authors\\n * @dev The postage stamp contracts allows users to create and manage postage stamp batches.\\n * The current balance for each batch is stored ordered in descending order of normalised balance.\\n * Balance is normalised to be per chunk and the total spend since the contract was deployed, i.e. when a batch\\n * is bought, its per-chunk balance is supplemented with the current cost of storing one chunk since the beginning of time,\\n * as if the batch had existed since the contract's inception. During the _expiry_ process, each of these balances is\\n * checked against the _currentTotalOutPayment_, a similarly normalised figure that represents the current cost of\\n * storing one chunk since the beginning of time. A batch with a normalised balance less than _currentTotalOutPayment_\\n * is treated as expired.\\n *\\n * The _currentTotalOutPayment_ is calculated using _totalOutPayment_ which is updated during _setPrice_ events so\\n * that the applicable per-chunk prices can be charged for the relevant periods of time. This can then be multiplied\\n * by the amount of chunks which are allowed to be stamped by each batch to get the actual cost of storage.\\n *\\n * The amount of chunks a batch can stamp is determined by the _bucketDepth_. A batch may store a maximum of 2^depth chunks.\\n * The global figure for the currently allowed chunks is tracked by _validChunkCount_ and updated during batch _expiry_ events.\\n */\\n\\ncontract PostageStamp is AccessControl, Pausable {\\n using HitchensOrderStatisticsTreeLib for HitchensOrderStatisticsTreeLib.Tree;\\n\\n // ----------------------------- State variables ------------------------------\\n\\n // Address of the ERC20 token this contract references.\\n address public bzzToken;\\n\\n // Minimum allowed depth of bucket.\\n uint8 public minimumBucketDepth;\\n\\n // Role allowed to increase totalOutPayment.\\n bytes32 public immutable PRICE_ORACLE_ROLE;\\n\\n // Role allowed to pause\\n bytes32 public immutable PAUSER_ROLE;\\n // Role allowed to withdraw the pot.\\n bytes32 public immutable REDISTRIBUTOR_ROLE;\\n\\n // Associate every batch id with batch data.\\n mapping(bytes32 => Batch) public batches;\\n // Store every batch id ordered by normalisedBalance.\\n HitchensOrderStatisticsTreeLib.Tree tree;\\n\\n // Total out payment per chunk, at the blockheight of the last price change.\\n uint256 private totalOutPayment;\\n\\n // Combined global chunk capacity of valid batches remaining at the blockheight expire() was last called.\\n uint256 public validChunkCount;\\n\\n // Lottery pot at last update.\\n uint256 public pot;\\n\\n // Normalised balance at the blockheight expire() was last called.\\n uint256 public lastExpiryBalance;\\n\\n // Price from the last update.\\n uint64 public lastPrice;\\n\\n // blocks in 24 hours ~ 24 * 60 * 60 / 5 = 17280\\n uint64 public minimumValidityBlocks = 17280;\\n\\n // Block at which the last update occured.\\n uint64 public lastUpdatedBlock;\\n\\n // ----------------------------- Type declarations ------------------------------\\n\\n struct Batch {\\n // Owner of this batch (0 if not valid).\\n address owner;\\n // Current depth of this batch.\\n uint8 depth;\\n // Bucket depth defined in this batch\\n uint8 bucketDepth;\\n // Whether this batch is immutable.\\n bool immutableFlag;\\n // Normalised balance per chunk.\\n uint256 normalisedBalance;\\n // When was this batch last updated\\n uint256 lastUpdatedBlockNumber;\\n }\\n\\n struct ImportBatch {\\n bytes32 batchId;\\n address owner;\\n uint8 depth;\\n uint8 bucketDepth;\\n bool immutableFlag;\\n uint256 remainingBalance;\\n }\\n\\n // ----------------------------- Events ------------------------------\\n\\n /**\\n * @dev Emitted when a new batch is created.\\n */\\n event BatchCreated(\\n bytes32 indexed batchId,\\n uint256 totalAmount,\\n uint256 normalisedBalance,\\n address owner,\\n uint8 depth,\\n uint8 bucketDepth,\\n bool immutableFlag\\n );\\n\\n /**\\n * @dev Emitted when an pot is Withdrawn.\\n */\\n event PotWithdrawn(address recipient, uint256 totalAmount);\\n\\n /**\\n * @dev Emitted when an existing batch is topped up.\\n */\\n event BatchTopUp(bytes32 indexed batchId, uint256 topupAmount, uint256 normalisedBalance);\\n\\n /**\\n * @dev Emitted when the depth of an existing batch increases.\\n */\\n event BatchDepthIncrease(bytes32 indexed batchId, uint8 newDepth, uint256 normalisedBalance);\\n\\n /**\\n *@dev Emitted on every price update.\\n */\\n event PriceUpdate(uint256 price);\\n\\n /**\\n *@dev Emitted on every batch failed in bulk batch creation\\n */\\n event CopyBatchFailed(uint index, bytes32 batchId);\\n\\n // ----------------------------- Errors ------------------------------\\n\\n error ZeroAddress(); // Owner cannot be the zero address\\n error InvalidDepth(); // Invalid bucket depth\\n error BatchExists(); // Batch already exists\\n error InsufficientBalance(); // Insufficient initial balance for 24h minimum validity\\n error TransferFailed(); // Failed transfer of BZZ tokens\\n error ZeroBalance(); // NormalisedBalance cannot be zero\\n error AdministratorOnly(); // Only administrator can use copy method\\n error BatchDoesNotExist(); // Batch does not exist or has expired\\n error BatchExpired(); // Batch already expired\\n error BatchTooSmall(); // Batch too small to renew\\n error NotBatchOwner(); // Not batch owner\\n error DepthNotIncreasing(); // Depth not increasing\\n error PriceOracleOnly(); // Only price oracle can set the price\\n error InsufficienChunkCount(); // Insufficient valid chunk count\\n error TotalOutpaymentDecreased(); // Current total outpayment should never decrease\\n error NoBatchesExist(); // There are no batches\\n error OnlyPauser(); // Only Pauser role can pause or unpause contracts\\n error OnlyRedistributor(); // Only redistributor role can withdraw from the contract\\n\\n // ----------------------------- CONSTRUCTOR ------------------------------\\n\\n /**\\n * @param _bzzToken The ERC20 token address to reference in this contract.\\n * @param _minimumBucketDepth The minimum bucket depth of batches that can be purchased.\\n */\\n constructor(address _bzzToken, uint8 _minimumBucketDepth) {\\n bzzToken = _bzzToken;\\n minimumBucketDepth = _minimumBucketDepth;\\n PRICE_ORACLE_ROLE = keccak256(\\\"PRICE_ORACLE_ROLE\\\");\\n PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n REDISTRIBUTOR_ROLE = keccak256(\\\"REDISTRIBUTOR_ROLE\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n _setupRole(PAUSER_ROLE, msg.sender);\\n }\\n\\n ////////////////////////////////////////\\n // STATE CHANGING //\\n ////////////////////////////////////////\\n\\n /**\\n * @notice Create a new batch.\\n * @dev At least `_initialBalancePerChunk*2^depth` tokens must be approved in the ERC20 token contract.\\n * @param _owner Owner of the new batch.\\n * @param _initialBalancePerChunk Initial balance per chunk.\\n * @param _depth Initial depth of the new batch.\\n * @param _nonce A random value used in the batch id derivation to allow multiple batches per owner.\\n * @param _immutable Whether the batch is mutable.\\n */\\n function createBatch(\\n address _owner,\\n uint256 _initialBalancePerChunk,\\n uint8 _depth,\\n uint8 _bucketDepth,\\n bytes32 _nonce,\\n bool _immutable\\n ) external whenNotPaused returns (bytes32) {\\n if (_owner == address(0)) {\\n revert ZeroAddress();\\n }\\n\\n if (_bucketDepth == 0 || _bucketDepth < minimumBucketDepth || _bucketDepth >= _depth) {\\n revert InvalidDepth();\\n }\\n\\n bytes32 batchId = keccak256(abi.encode(msg.sender, _nonce));\\n if (batches[batchId].owner != address(0)) {\\n revert BatchExists();\\n }\\n\\n if (_initialBalancePerChunk < minimumInitialBalancePerChunk()) {\\n revert InsufficientBalance();\\n }\\n\\n uint256 totalAmount = _initialBalancePerChunk * (1 << _depth);\\n if (!ERC20(bzzToken).transferFrom(msg.sender, address(this), totalAmount)) {\\n revert TransferFailed();\\n }\\n\\n uint256 normalisedBalance = currentTotalOutPayment() + (_initialBalancePerChunk);\\n if (normalisedBalance == 0) {\\n revert ZeroBalance();\\n }\\n\\n expireLimited(type(uint256).max);\\n validChunkCount += 1 << _depth;\\n\\n batches[batchId] = Batch({\\n owner: _owner,\\n depth: _depth,\\n bucketDepth: _bucketDepth,\\n immutableFlag: _immutable,\\n normalisedBalance: normalisedBalance,\\n lastUpdatedBlockNumber: block.number\\n });\\n\\n tree.insert(batchId, normalisedBalance);\\n\\n emit BatchCreated(batchId, totalAmount, normalisedBalance, _owner, _depth, _bucketDepth, _immutable);\\n\\n return batchId;\\n }\\n\\n /**\\n * @notice Manually create a new batch when facilitating migration, can only be called by the Admin role.\\n * @dev At least `_initialBalancePerChunk*2^depth` tokens must be approved in the ERC20 token contract.\\n * @param _owner Owner of the new batch.\\n * @param _initialBalancePerChunk Initial balance per chunk of the batch.\\n * @param _depth Initial depth of the new batch.\\n * @param _batchId BatchId being copied (from previous version contract data).\\n * @param _immutable Whether the batch is mutable.\\n */\\n function copyBatch(\\n address _owner,\\n uint256 _initialBalancePerChunk,\\n uint8 _depth,\\n uint8 _bucketDepth,\\n bytes32 _batchId,\\n bool _immutable\\n ) public whenNotPaused {\\n if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert AdministratorOnly();\\n }\\n\\n if (_owner == address(0)) {\\n revert ZeroAddress();\\n }\\n\\n if (_bucketDepth == 0 || _bucketDepth >= _depth) {\\n revert InvalidDepth();\\n }\\n\\n if (batches[_batchId].owner != address(0)) {\\n revert BatchExists();\\n }\\n\\n uint256 totalAmount = _initialBalancePerChunk * (1 << _depth);\\n uint256 normalisedBalance = currentTotalOutPayment() + (_initialBalancePerChunk);\\n if (normalisedBalance == 0) {\\n revert ZeroBalance();\\n }\\n\\n //update validChunkCount to remove currently expired batches\\n expireLimited(type(uint256).max);\\n\\n validChunkCount += 1 << _depth;\\n\\n batches[_batchId] = Batch({\\n owner: _owner,\\n depth: _depth,\\n bucketDepth: _bucketDepth,\\n immutableFlag: _immutable,\\n normalisedBalance: normalisedBalance,\\n lastUpdatedBlockNumber: block.number\\n });\\n\\n tree.insert(_batchId, normalisedBalance);\\n\\n emit BatchCreated(_batchId, totalAmount, normalisedBalance, _owner, _depth, _bucketDepth, _immutable);\\n }\\n\\n /**\\n * @notice Import batches in bulk\\n * @dev Import batches in bulk to lower the number of transactions needed,\\n * @dev becase of block limitations 90 batches per trx is ceiling, 60 to 70 sweetspot\\n * @param bulkBatches array of batches\\n */\\n function copyBatchBulk(ImportBatch[] calldata bulkBatches) external {\\n if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert AdministratorOnly();\\n }\\n for (uint i = 0; i < bulkBatches.length; i++) {\\n ImportBatch memory _batch = bulkBatches[i];\\n try\\n this.copyBatch(\\n _batch.owner,\\n _batch.remainingBalance,\\n _batch.depth,\\n _batch.bucketDepth,\\n _batch.batchId,\\n _batch.immutableFlag\\n )\\n {\\n // Successful copyBatch call\\n } catch {\\n // copyBatch failed, handle error\\n emit CopyBatchFailed(i, _batch.batchId);\\n }\\n }\\n }\\n\\n /**\\n * @notice Top up an existing batch.\\n * @dev At least `_topupAmountPerChunk*2^depth` tokens must be approved in the ERC20 token contract.\\n * @param _batchId The id of an existing batch.\\n * @param _topupAmountPerChunk The amount of additional tokens to add per chunk.\\n */\\n function topUp(bytes32 _batchId, uint256 _topupAmountPerChunk) external whenNotPaused {\\n Batch memory batch = batches[_batchId];\\n\\n if (batch.owner == address(0)) {\\n revert BatchDoesNotExist();\\n }\\n\\n if (batch.normalisedBalance <= currentTotalOutPayment()) {\\n revert BatchExpired();\\n }\\n\\n if (batch.depth <= minimumBucketDepth) {\\n revert BatchTooSmall();\\n }\\n\\n if (remainingBalance(_batchId) + (_topupAmountPerChunk) < minimumInitialBalancePerChunk()) {\\n revert InsufficientBalance();\\n }\\n\\n // per chunk balance multiplied by the batch size in chunks must be transferred from the sender\\n uint256 totalAmount = _topupAmountPerChunk * (1 << batch.depth);\\n if (!ERC20(bzzToken).transferFrom(msg.sender, address(this), totalAmount)) {\\n revert TransferFailed();\\n }\\n\\n // update by removing batch and then reinserting\\n tree.remove(_batchId, batch.normalisedBalance);\\n batch.normalisedBalance = batch.normalisedBalance + (_topupAmountPerChunk);\\n tree.insert(_batchId, batch.normalisedBalance);\\n\\n batches[_batchId].normalisedBalance = batch.normalisedBalance;\\n emit BatchTopUp(_batchId, totalAmount, batch.normalisedBalance);\\n }\\n\\n /**\\n * @notice Increase the depth of an existing batch.\\n * @dev Can only be called by the owner of the batch.\\n * @param _batchId the id of an existing batch.\\n * @param _newDepth the new (larger than the previous one) depth for this batch.\\n */\\n function increaseDepth(bytes32 _batchId, uint8 _newDepth) external whenNotPaused {\\n Batch memory batch = batches[_batchId];\\n\\n if (batch.owner != msg.sender) {\\n revert NotBatchOwner();\\n }\\n\\n if (!(minimumBucketDepth < _newDepth && batch.depth < _newDepth)) {\\n revert DepthNotIncreasing();\\n }\\n\\n if (batch.normalisedBalance <= currentTotalOutPayment()) {\\n revert BatchExpired();\\n }\\n\\n uint8 depthChange = _newDepth - batch.depth;\\n uint256 newRemainingBalance = remainingBalance(_batchId) / (1 << depthChange);\\n\\n if (newRemainingBalance < minimumInitialBalancePerChunk()) {\\n revert InsufficientBalance();\\n }\\n\\n expireLimited(type(uint256).max);\\n validChunkCount += (1 << _newDepth) - (1 << batch.depth);\\n tree.remove(_batchId, batch.normalisedBalance);\\n batches[_batchId].depth = _newDepth;\\n batches[_batchId].lastUpdatedBlockNumber = block.number;\\n\\n batch.normalisedBalance = currentTotalOutPayment() + newRemainingBalance;\\n batches[_batchId].normalisedBalance = batch.normalisedBalance;\\n tree.insert(_batchId, batch.normalisedBalance);\\n\\n emit BatchDepthIncrease(_batchId, _newDepth, batch.normalisedBalance);\\n }\\n\\n /**\\n * @notice Set a new price.\\n * @dev Can only be called by the price oracle role.\\n * @param _price The new price.\\n */\\n function setPrice(uint256 _price) external {\\n if (!hasRole(PRICE_ORACLE_ROLE, msg.sender)) {\\n revert PriceOracleOnly();\\n }\\n\\n if (lastPrice != 0) {\\n totalOutPayment = currentTotalOutPayment();\\n }\\n\\n lastPrice = uint64(_price);\\n lastUpdatedBlock = uint64(block.number);\\n\\n emit PriceUpdate(_price);\\n }\\n\\n function setMinimumValidityBlocks(uint64 _value) external {\\n if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert AdministratorOnly();\\n }\\n\\n minimumValidityBlocks = _value;\\n }\\n\\n /**\\n * @notice Reclaims a limited number of expired batches\\n * @dev Can be used if reclaiming all expired batches would exceed the block gas limit, causing other\\n * contract method calls to fail.\\n * @param limit The maximum number of batches to expire.\\n */\\n function expireLimited(uint256 limit) public {\\n // the lower bound of the normalised balance for which we will check if batches have expired\\n uint256 _lastExpiryBalance = lastExpiryBalance;\\n uint256 i;\\n for (i; i < limit; ) {\\n if (isBatchesTreeEmpty()) {\\n lastExpiryBalance = currentTotalOutPayment();\\n break;\\n }\\n // get the batch with the smallest normalised balance\\n bytes32 fbi = firstBatchId();\\n // if the batch with the smallest balance has not yet expired\\n // we have already reached the end of the batches we need\\n // to expire, so exit the loop\\n if (remainingBalance(fbi) > 0) {\\n // the upper bound of the normalised balance for which we will check if batches have expired\\n // value is updated when there are no expired batches left\\n lastExpiryBalance = currentTotalOutPayment();\\n break;\\n }\\n // otherwise, the batch with the smallest balance has expired,\\n // so we must remove the chunks this batch contributes to the global validChunkCount\\n Batch memory batch = batches[fbi];\\n uint256 batchSize = 1 << batch.depth;\\n\\n if (validChunkCount < batchSize) {\\n revert InsufficienChunkCount();\\n }\\n validChunkCount -= batchSize;\\n // since the batch expired _during_ the period we must add\\n // remaining normalised payout for this batch only\\n pot += batchSize * (batch.normalisedBalance - _lastExpiryBalance);\\n tree.remove(fbi, batch.normalisedBalance);\\n delete batches[fbi];\\n\\n unchecked {\\n ++i;\\n }\\n }\\n // then, for all batches that have _not_ expired during the period\\n // add the total normalised payout of all batches\\n // multiplied by the remaining total valid chunk count\\n // to the pot for the period since the last expiry\\n\\n if (lastExpiryBalance < _lastExpiryBalance) {\\n revert TotalOutpaymentDecreased();\\n }\\n\\n // then, for all batches that have _not_ expired during the period\\n // add the total normalised payout of all batches\\n // multiplied by the remaining total valid chunk count\\n // to the pot for the period since the last expiry\\n pot += validChunkCount * (lastExpiryBalance - _lastExpiryBalance);\\n }\\n\\n /**\\n * @notice The current pot.\\n */\\n function totalPot() public returns (uint256) {\\n expireLimited(type(uint256).max);\\n uint256 balance = ERC20(bzzToken).balanceOf(address(this));\\n return pot < balance ? pot : balance;\\n }\\n\\n /**\\n * @notice Withdraw the pot, authorised callers only.\\n * @param beneficiary Recieves the current total pot.\\n */\\n\\n function withdraw(address beneficiary) external {\\n if (!hasRole(REDISTRIBUTOR_ROLE, msg.sender)) {\\n revert OnlyRedistributor();\\n }\\n\\n uint256 totalAmount = totalPot();\\n if (!ERC20(bzzToken).transfer(beneficiary, totalAmount)) {\\n revert TransferFailed();\\n }\\n\\n emit PotWithdrawn(beneficiary, totalAmount);\\n pot = 0;\\n }\\n\\n /**\\n * @notice Pause the contract.\\n * @dev Can only be called by the pauser when not paused.\\n * The contract can be provably stopped by renouncing the pauser role and the admin role once paused.\\n */\\n function pause() public {\\n if (!hasRole(PAUSER_ROLE, msg.sender)) {\\n revert OnlyPauser();\\n }\\n _pause();\\n }\\n\\n /**\\n * @notice Unpause the contract.\\n * @dev Can only be called by the pauser role while paused.\\n */\\n function unPause() public {\\n if (!hasRole(PAUSER_ROLE, msg.sender)) {\\n revert OnlyPauser();\\n }\\n\\n _unpause();\\n }\\n\\n ////////////////////////////////////////\\n // STATE READING //\\n ////////////////////////////////////////\\n\\n /**\\n * @notice Total per-chunk cost since the contract's deployment.\\n * @dev Returns the total normalised all-time per chunk payout.\\n * Only Batches with a normalised balance greater than this are valid.\\n */\\n function currentTotalOutPayment() public view returns (uint256) {\\n uint256 blocks = block.number - lastUpdatedBlock;\\n uint256 increaseSinceLastUpdate = lastPrice * (blocks);\\n return totalOutPayment + (increaseSinceLastUpdate);\\n }\\n\\n function minimumInitialBalancePerChunk() public view returns (uint256) {\\n return minimumValidityBlocks * lastPrice;\\n }\\n\\n /**\\n * @notice Return the per chunk balance not yet used up.\\n * @param _batchId The id of an existing batch.\\n */\\n function remainingBalance(bytes32 _batchId) public view returns (uint256) {\\n Batch memory batch = batches[_batchId];\\n\\n if (batch.owner == address(0)) {\\n revert BatchDoesNotExist(); // Batch does not exist or expired\\n }\\n\\n if (batch.normalisedBalance <= currentTotalOutPayment()) {\\n return 0;\\n }\\n\\n return batch.normalisedBalance - currentTotalOutPayment();\\n }\\n\\n /**\\n * @notice Indicates whether expired batches exist.\\n */\\n function expiredBatchesExist() public view returns (bool) {\\n if (isBatchesTreeEmpty()) {\\n return false;\\n }\\n return (remainingBalance(firstBatchId()) <= 0);\\n }\\n\\n /**\\n * @notice Return true if no batches exist\\n */\\n function isBatchesTreeEmpty() public view returns (bool) {\\n return tree.count() == 0;\\n }\\n\\n /**\\n * @notice Get the first batch id ordered by ascending normalised balance.\\n * @dev If more than one batch id, return index at 0, if no batches, revert.\\n */\\n function firstBatchId() public view returns (bytes32) {\\n uint256 val = tree.first();\\n if (val == 0) {\\n revert NoBatchesExist();\\n }\\n return tree.valueKeyAtIndex(val, 0);\\n }\\n\\n function batchOwner(bytes32 _batchId) public view returns (address) {\\n return batches[_batchId].owner;\\n }\\n\\n function batchDepth(bytes32 _batchId) public view returns (uint8) {\\n return batches[_batchId].depth;\\n }\\n\\n function batchBucketDepth(bytes32 _batchId) public view returns (uint8) {\\n return batches[_batchId].bucketDepth;\\n }\\n\\n function batchImmutableFlag(bytes32 _batchId) public view returns (bool) {\\n return batches[_batchId].immutableFlag;\\n }\\n\\n function batchNormalisedBalance(bytes32 _batchId) public view returns (uint256) {\\n return batches[_batchId].normalisedBalance;\\n }\\n\\n function batchLastUpdatedBlockNumber(bytes32 _batchId) public view returns (uint256) {\\n return batches[_batchId].lastUpdatedBlockNumber;\\n }\\n}\\n\",\"keccak256\":\"0x7d4fb7df6e72f3feb06c17dfa56f21213b6a2f2911814c495d65444b7ea2f256\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", - "bytecode": "0x60e060405260098054600160401b600160801b03191669438000000000000000001790553480156200003057600080fd5b5060405162003bc938038062003bc98339810160408190526200005391620001c4565b600180546001600160b01b0319166101006001600160a01b0385160260ff60a81b191617600160a81b60ff8416021790557f1337d7d57528a8879766fdf2d0456253114c66c4fc263c97168bfdb007c64c666080527f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a60a0527f3e35b14a9f4fef84b59f9bdcd3044fc28783144b7e42bfb2cd075e6a02cb082860c052620000fd60003362000114565b60a0516200010c903362000114565b505062000213565b62000120828262000124565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000120576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001803390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008060408385031215620001d857600080fd5b82516001600160a01b0381168114620001f057600080fd5b602084015190925060ff811681146200020857600080fd5b809150509250929050565b60805160a05160c05161396a6200025f600039600081816105bb015261118b01526000818161075e015281816118ad0152611e2b015260008181610609015261199e015261396a6000f3fe608060405234801561001057600080fd5b50600436106102f45760003560e01c806381e508b911610191578063b998902f116100e3578063dd483cfb11610097578063ea612e1f11610071578063ea612e1f14610780578063f7b188a514610789578063f90ce5ba1461079157600080fd5b8063dd483cfb14610716578063df67438514610736578063e63ab1e91461075957600080fd5b8063d547741f116100c8578063d547741f146106c6578063d71ba7c4146106d9578063d968f44b146106ec57600080fd5b8063b998902f14610604578063c81e25ab1461062b57600080fd5b806391b7f5ed11610145578063a6471a1d1161011f578063a6471a1d146105b6578063a81064ee146105dd578063b67644b9146105f157600080fd5b806391b7f5ed1461056457806391d1485414610577578063a217fddf146105ae57600080fd5b80638a5e8e32116101765780638a5e8e321461054b5780638b82547f14610554578063906978421461055c57600080fd5b806381e508b91461051f5780638456cb591461054357600080fd5b8063420fc4db1161024a57806351b17cd0116101fe5780635c975abb116101d85780635c975abb146104f9578063628de87714610504578063711bfa2b1461051757600080fd5b806351b17cd0146104cb57806351cff8d9146104d35780635239af71146104e657600080fd5b806347aab79b1161022f57806347aab79b1461049c5780634ba2363a146104af5780634bb13e34146104b857600080fd5b8063420fc4db1461045a57806344beae8e1461047257600080fd5b80632182ddb1116102ac5780632f2ff15d116102865780632f2ff15d146103f857806332ac57dd1461040b57806336568abe1461044757600080fd5b80632182ddb11461037e578063248a9ca3146103bf57806324b570a9146103f057600080fd5b80631889b99b116102dd5780631889b99b1461034e57806318c8572f146103565780631a37b4851461036b57600080fd5b806301ffc9a7146102f9578063053f14da14610321575b600080fd5b61030c610307366004613427565b6107ac565b60405190151581526020015b60405180910390f35b6009546103359067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610318565b61030c610845565b6103696103643660046134aa565b610857565b005b610369610379366004613514565b610af1565b6103a761038c36600461353e565b6000908152600260205260409020546001600160a01b031690565b6040516001600160a01b039091168152602001610318565b6103e26103cd36600461353e565b60009081526020819052604090206001015490565b604051908152602001610318565b6103e2610b87565b610369610406366004613557565b610c3a565b61043561041936600461353e565b600090815260026020526040902054600160a81b900460ff1690565b60405160ff9091168152602001610318565b610369610455366004613557565b610c64565b6001546103a79061010090046001600160a01b031681565b61043561048036600461353e565b600090815260026020526040902054600160a01b900460ff1690565b6103696104aa366004613583565b610cf5565b6103e260075481565b6103696104c63660046135a6565b610fa8565b6103e2611131565b6103696104e136600461361b565b611189565b6103e26104f43660046134aa565b611306565b60015460ff1661030c565b61036961051236600461353e565b611664565b61030c611882565b6103e261052d36600461353e565b6000908152600260208190526040909120015490565b6103696118ab565b6103e260065481565b6103e261190e565b6103e2611964565b61036961057236600461353e565b61199c565b61030c610585366004613557565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6103e2600081565b6103e27f000000000000000000000000000000000000000000000000000000000000000081565b60015461043590600160a81b900460ff1681565b6103696105ff366004613636565b611aab565b6103e27f000000000000000000000000000000000000000000000000000000000000000081565b61068661063936600461353e565b60026020819052600091825260409091208054600182015491909201546001600160a01b0383169260ff600160a01b8204811693600160a81b8304821693600160b01b9093049091169186565b604080516001600160a01b0397909716875260ff9586166020880152939094169285019290925215156060840152608083015260a082015260c001610318565b6103696106d4366004613557565b611d3f565b6103e26106e736600461353e565b611d64565b61030c6106fa36600461353e565b600090815260026020526040902054600160b01b900460ff1690565b6009546103359068010000000000000000900467ffffffffffffffff1681565b6103e261074436600461353e565b60009081526002602052604090206001015490565b6103e27f000000000000000000000000000000000000000000000000000000000000000081565b6103e260085481565b610369611e29565b60095461033590600160801b900467ffffffffffffffff1681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061083f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60006108516003611e8a565b15919050565b61085f611e9a565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166108ae57604051635844c9e760e11b815260040160405180910390fd5b6001600160a01b0386166108d55760405163d92e233d60e01b815260040160405180910390fd5b60ff831615806108eb57508360ff168360ff1610155b1561090957604051630a0b2c3560e41b815260040160405180910390fd5b6000828152600260205260409020546001600160a01b03161561093f576040516311ab459f60e21b815260040160405180910390fd5b6000610951600160ff87161b8761366e565b905060008661095e611131565b6109689190613685565b90508060000361098b5760405163334ab3f560e11b815260040160405180910390fd5b610996600019611664565b8560ff166001901b600660008282546109af9190613685565b90915550506040805160c0810182526001600160a01b03808b16825260ff808a1660208085019182528a831685870190815289151560608701908152608087018981524360a0890190815260008e815260029586905299909920975188549551935192511515600160b01b0260ff60b01b19938816600160a81b029390931661ffff60a81b1994909716600160a01b0274ffffffffffffffffffffffffffffffffffffffffff19909616971696909617939093171692909217178355905160018301559151910155610a8360038583611eed565b60408051838152602081018390526001600160a01b038a168183015260ff88811660608301528716608082015284151560a0820152905185917f9b088e2c89b322a3c1d81515e1c88db3d386d022926f0e2d0b9b5813b7413d58919081900360c00190a25050505050505050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610b4057604051635844c9e760e11b815260040160405180910390fd5b6009805467ffffffffffffffff90921668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff909216919091179055565b6000610b94600019611664565b6001546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009161010090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610bfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1f9190613698565b90508060075410610c305780610c34565b6007545b91505090565b600082815260208190526040902060010154610c55816120f0565b610c5f83836120fd565b505050565b6001600160a01b0381163314610ce75760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610cf1828261219b565b5050565b610cfd611e9a565b600082815260026020818152604092839020835160c08101855281546001600160a01b03811680835260ff600160a01b8304811695840195909552600160a81b8204851696830196909652600160b01b900490921615156060830152600181015460808301529091015460a0820152903314610da5576040517fb72bcb2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015460ff808416600160a81b90920416108015610dcc57508160ff16816020015160ff16105b610e02576040517fd5fd03fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e0a611131565b816080015111610e2d576040516368aebbc560e01b815260040160405180910390fd5b6000816020015183610e3f91906136b1565b90506000600160ff83161b610e5386611d64565b610e5d91906136ca565b9050610e67611964565b811015610e8757604051631e9acf1760e31b815260040160405180910390fd5b610e92600019611664565b826020015160ff166001901b8460ff166001901b610eb091906136ec565b60066000828254610ec19190613685565b90915550506080830151610ed990600390879061221a565b600085815260026020819052604090912080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b60ff8816021781554391015580610f28611131565b610f329190613685565b6080840181815260008781526002602052604090206001019190915551610f5d906003908790611eed565b60808301516040805160ff87168152602081019290925286917faf27998ec15e9d3809edad41aec1b5551d8412e71bd07c91611a0237ead1dc8e910160405180910390a25050505050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610ff757604051635844c9e760e11b815260040160405180910390fd5b60005b81811015610c5f576000838383818110611016576110166136ff565b905060c0020180360381019061102c919061372b565b602081015160a082015160408084015160608501518551608087015193517f18c8572f0000000000000000000000000000000000000000000000000000000081526001600160a01b039096166004870152602486019490945260ff91821660448601521660648401526084830191909152151560a482015290915030906318c8572f9060c401600060405180830381600087803b1580156110cc57600080fd5b505af19250505080156110dd575060015b61111e5780516040805184815260208101929092527f7ded044f9ef68a0ffb6bdb48c80387f300787e7492659224ad140db77893950d910160405180910390a15b5080611129816137cd565b915050610ffa565b600954600090819061115490600160801b900467ffffffffffffffff16436136ec565b60095490915060009061117290839067ffffffffffffffff1661366e565b9050806005546111829190613685565b9250505090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff166111fb576040517f24876df800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611205610b87565b6001546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018490529293506101009091049091169063a9059cbb906044016020604051808303816000875af115801561127a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129e91906137e6565b6112bb576040516312171d8360e31b815260040160405180910390fd5b604080516001600160a01b0384168152602081018390527ff5d8f9b1e7af440e1e7915f4693ccc004d1461a7dafd17ea7347d03decf298e1910160405180910390a150506000600755565b6000611310611e9a565b6001600160a01b0387166113375760405163d92e233d60e01b815260040160405180910390fd5b60ff84161580611356575060015460ff600160a81b9091048116908516105b8061136757508460ff168460ff1610155b1561138557604051630a0b2c3560e41b815260040160405180910390fd5b6040805133602082015290810184905260009060600160408051601f198184030181529181528151602092830120600081815260029093529120549091506001600160a01b0316156113ea576040516311ab459f60e21b815260040160405180910390fd5b6113f2611964565b87101561141257604051631e9acf1760e31b815260040160405180910390fd5b6000611424600160ff89161b8961366e565b6001546040516323b872dd60e01b81523360048201523060248201526044810183905291925061010090046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611481573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a591906137e6565b6114c2576040516312171d8360e31b815260040160405180910390fd5b6000886114cd611131565b6114d79190613685565b9050806000036114fa5760405163334ab3f560e11b815260040160405180910390fd5b611505600019611664565b8760ff166001901b6006600082825461151e9190613685565b90915550506040805160c0810182526001600160a01b03808d16825260ff808c1660208085019182528c83168587019081528b151560608701908152608087018981524360a0890190815260008d815260029586905299909920975188549551935192511515600160b01b0260ff60b01b19938816600160a81b029390931661ffff60a81b1994909716600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199096169716969096179390931716929092171783559051600183015591519101556115f260038483611eed565b60408051838152602081018390526001600160a01b038c168183015260ff8a811660608301528916608082015286151560a0820152905184917f9b088e2c89b322a3c1d81515e1c88db3d386d022926f0e2d0b9b5813b7413d58919081900360c00190a2509098975050505050505050565b60085460005b828110156118105761167a610845565b1561168f57611687611131565b600855611810565b600061169961190e565b905060006116a682611d64565b11156116bd576116b4611131565b60085550611810565b600081815260026020818152604092839020835160c08101855281546001600160a01b038116825260ff600160a01b82048116948301859052600160a81b8204811696830196909652600160b01b900490941615156060850152600180820154608086015292015460a084015260065491901b9081111561176a576040517f9b02220b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806006600082825461177c91906136ec565b909155505060808201516117919086906136ec565b61179b908261366e565b600760008282546117ac9190613685565b909155505060808201516117c490600390859061221a565b50506000908152600260208190526040822080547fffffffffffffffffff000000000000000000000000000000000000000000000016815560018082018490559101919091550161166a565b81600854101561184c576040517f530da97a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160085461185a91906136ec565b600654611867919061366e565b600760008282546118789190613685565b9091555050505050565b600061188c610845565b156118975750600090565b60006118a46106e761190e565b1115905090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff1661190457604051631d77d47760e21b815260040160405180910390fd5b61190c61256b565b565b60008061191b60036125bf565b905080600003611957576040517f46c83ec800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c346003826000612606565b60095460009061198d9067ffffffffffffffff8082169168010000000000000000900416613803565b67ffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff16611a0e576040517fea0f601b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60095467ffffffffffffffff1615611a2c57611a28611131565b6005555b600980544367ffffffffffffffff908116600160801b027fffffffffffffffff0000000000000000ffffffffffffffff0000000000000000909216908416171790556040517fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a90611aa09083815260200190565b60405180910390a150565b611ab3611e9a565b600082815260026020818152604092839020835160c08101855281546001600160a01b03811680835260ff600160a01b8304811695840195909552600160a81b8204851696830196909652600160b01b900490921615156060830152600181015460808301529091015460a082015290611b4057604051634ee9bc0f60e01b815260040160405180910390fd5b611b48611131565b816080015111611b6b576040516368aebbc560e01b815260040160405180910390fd5b600154602082015160ff600160a81b9092048216911611611bb8576040517f7103b80500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611bc0611964565b82611bca85611d64565b611bd49190613685565b1015611bf357604051631e9acf1760e31b815260040160405180910390fd5b6000816020015160ff166001901b83611c0c919061366e565b6001546040516323b872dd60e01b81523360048201523060248201526044810183905291925061010090046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611c69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8d91906137e6565b611caa576040516312171d8360e31b815260040160405180910390fd5b6080820151611cbd90600390869061221a565b828260800151611ccd9190613685565b60808301819052611ce2906003908690611eed565b60808201805160008681526002602090815260409182902060010192909255915182518481529182015285917faf5756c62d6c0722ef9be1f82bef97ab06ea5aea7f3eb8ad348422079f01d88d910160405180910390a250505050565b600082815260208190526040902060010154611d5a816120f0565b610c5f838361219b565b6000818152600260208181526040808420815160c08101835281546001600160a01b03811680835260ff600160a01b8304811696840196909652600160a81b8204861694830194909452600160b01b900490931615156060840152600181015460808401529092015460a082015290611df057604051634ee9bc0f60e01b815260040160405180910390fd5b611df8611131565b816080015111611e0b5750600092915050565b611e13611131565b8160800151611e2291906136ec565b9392505050565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff16611e8257604051631d77d47760e21b815260040160405180910390fd5b61190c612668565b600061083f8283600001546126a1565b60015460ff161561190c5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610cde565b80611f0b576040516363868c5560e11b815260040160405180910390fd5b611f168383836126cd565b15611f4d576040517f6082d5c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82546000905b80156120315780915080831015611f7d576000908152600180860160205260409091200154612008565b80831115611f9e576000908152600185016020526040902060020154612008565b808303612008576000818152600180870160209081526040832060040180548084018255818552918420909101879055918390529054611fde91906136ec565b60009182526001909501602090815260408083209583526005909501905292909220929092555050565b60008281526001860160205260408120600601805491612027836137cd565b9190505550611f53565b600083815260018087016020908152604083208581558083018490556002810184905560038101805460ff191684179055600481018054808501825581865292909420909101879055915461208691906136ec565b6000868152600583016020526040902055826120a4578386556120de565b828410156120c757600083815260018088016020526040909120018490556120de565b600083815260018701602052604090206002018490555b6120e88685612733565b505050505050565b6120fa813361299b565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610cf1576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556121573390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610cf1576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b80612238576040516363868c5560e11b815260040160405180910390fd5b6122438383836126cd565b61226057604051635889b1c560e11b815260040160405180910390fd5b6000818152600180850160209081526040808420868552600581019092528320546004820180549294919391929091612298916136ec565b815481106122a8576122a86136ff565b90600052602060002001549050808360040183815481106122cb576122cb6136ff565b60009182526020808320909101929092558281526005850190915260409020829055600483018054806123005761230061382f565b6001900381819060005260206000200160009055905560008084600401805490506000036125615760008681526001808a0160205260409091200154158061235957506000868152600189016020526040902060020154155b156123655750846123ad565b5060008581526001880160205260409020600201545b60008181526001808a0160205260409091200154156123ad57600090815260018089016020526040909120015461237b565b60008181526001808a0160205260409091200154156123e15760008181526001808a016020526040909120015491506123f8565b600081815260018901602052604090206002015491505b600081815260018901602052604080822054848352912081905580156124685760008181526001808b0160205260409091200154820361244d5760008181526001808b0160205260409091200183905561246c565b600081815260018a016020526040902060020183905561246c565b8289555b600082815260018a01602052604090206003015460ff16158783146124ff576124968a848a612a0e565b600088815260018b8101602052604080832080830154878552828520938401819055845281842087905560028082015490840181905584529083208690556003908101549286905201805460ff191660ff90921615159190911790559196916124ff8a89612a87565b801561250f5761250f8a85612af4565b6125198a83612a87565b60008381526001808c01602052604082208281559081018290556002810182905560038101805460ff191690559061255460048301826133f5565b6006820160009055505050505b5050505050505050565b612573611e9a565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b8054806125ce57506000919050565b5b6000818152600180840160205260409091200154156126015760009081526001808301602052604090912001546125cf565b919050565b60006126128484612f0d565b61262f57604051635889b1c560e11b815260040160405180910390fd5b60008381526001850160205260409020600401805483908110612654576126546136ff565b906000526020600020015490509392505050565b612670612f53565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336125a2565b60008181526001830160205260408120600681015460048201546126c59190613685565b949350505050565b60006126d98483612f0d565b6126e557506000611e22565b60008281526001850160209081526040808320868452600581019092529091205460049091018054859290811061271e5761271e6136ff565b90600052602060002001541490509392505050565b60005b825482148015906127605750600082815260018401602052604080822054825290206003015460ff165b1561297957600082815260018085016020526040808320548084528184205484529220015481036128815760008181526001850160205260408082205482528082206002015480835291206003015490925060ff1615612808576000818152600180860160205260408083206003808201805460ff19908116909155878652838620820180548216905582548652928520018054909216909217905590829052549250612973565b6000818152600185016020526040902060020154830361282f5780925061282f8484612fa5565b50600082815260018085016020526040808320548084528184206003808201805460ff1990811690915582548752938620018054909316909317909155918290525461287c908590613122565b612973565b6000818152600180860160205260408083205483528083209091015480835291206003015490925060ff16156128ff576000818152600180860160205260408083206003808201805460ff19908116909155878652838620820180548216905582548652928520018054909216909217905590829052549250612973565b60008181526001808601602052604090912001548303612926578092506129268484613122565b50600082815260018085016020526040808320548084528184206003808201805460ff19908116909155825487529386200180549093169093179091559182905254612973908590612fa5565b50612736565b505080546000908152600190910160205260409020600301805460ff19169055565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610cf1576129cc81613202565b6129d7836020613214565b6040516020016129e8929190613869565b60408051601f198184030181529082905262461bcd60e51b8252610cde916004016138ea565b600081815260018401602052604080822054848352912081905580612a3557828455612a81565b60008181526001808601602052604090912001548203612a6a5760008181526001808601602052604090912001839055612a81565b600081815260018501602052604090206002018390555b50505050565b8015610cf1576000818152600183016020526040902060020154612aac9083906126a1565b6000828152600180850160205260409091200154612acb9084906126a1565b612ad59190613685565b6000918252600183016020526040909120600681019190915554612a87565b60005b82548214801590612b1c5750600082815260018401602052604090206003015460ff16155b15612eee5760008281526001808501602052604080832054808452922001548303612d175760008181526001850160205260408082206002015480835291206003015490925060ff1615612bbf576000828152600180860160205260408083206003908101805460ff19908116909155858552919093209092018054909216179055612ba88482612fa5565b600081815260018501602052604090206002015491505b60008281526001808601602052604080832090910154825290206003015460ff16158015612c0a5750600082815260018501602052604080822060020154825290206003015460ff16155b15612c3757600082815260018581016020526040909120600301805460ff19169091179055915081612ee8565b600082815260018501602052604080822060020154825290206003015460ff16612cb4576000828152600180860160205260408083208083015484529083206003908101805460ff1990811690915593869052018054909216179055612c9d8483613122565b600081815260018501602052604090206002015491505b600081815260018501602052604080822060039081018054868552838520808401805460ff909316151560ff199384161790558254821690925560029091015484529190922090910180549091169055612d0e8482612fa5565b83549250612ee8565b6000818152600180860160205260408083209091015480835291206003015490925060ff1615612d96576000828152600180860160205260408083206003908101805460ff19908116909155858552919093209092018054909216179055612d7f8482613122565b600081815260018086016020526040909120015491505b600082815260018501602052604080822060020154825290206003015460ff16158015612de1575060008281526001808601602052604080832090910154825290206003015460ff16155b15612e0e57600082815260018581016020526040909120600301805460ff19169091179055915081612ee8565b60008281526001808601602052604080832090910154825290206003015460ff16612e8d57600082815260018086016020526040808320600281015484529083206003908101805460ff1990811690915593869052018054909216179055612e768483612fa5565b600081815260018086016020526040909120015491505b60008181526001808601602052604080832060039081018054878652838620808401805460ff909316151560ff19938416179055825482169092559301548452922090910180549091169055612ee38482613122565b835492505b50612af7565b506000908152600190910160205260409020600301805460ff19169055565b600081612f1c5750600061083f565b82548203612f2c5750600161083f565b600082815260018401602052604090205415612f4a5750600161083f565b50600092915050565b60015460ff1661190c5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610cde565b600081815260018084016020526040808320600281018054915482865292852090930154938590529183905590918015612fed57600081815260018601602052604090208490555b600083815260018601602052604090208290558161300d57828555613059565b600082815260018087016020526040909120015484036130425760008281526001808701602052604090912001839055613059565b600082815260018601602052604090206002018390555b6000838152600180870160205260408083209091018690558582529020838155600201546130889086906126a1565b60008581526001808801602052604090912001546130a79087906126a1565b6130b19190613685565b60008581526001870160205260408082206006019290925584815220600201546130dc9086906126a1565b60008481526001808801602052604090912001546130fb9087906126a1565b6131059190613685565b600093845260019095016020525050604090206006019190915550565b6000818152600180840160205260408083209182018054925483855291842060020154938590528390559091801561316857600081815260018601602052604090208490555b6000838152600186016020526040902082905581613188578285556131d4565b600082815260018601602052604090206002015484036131bd57600082815260018601602052604090206002018390556131d4565b600082815260018087016020526040909120018390555b60008381526001860160205260408082206002908101879055868352912084815501546130889086906126a1565b606061083f6001600160a01b03831660145b6060600061322383600261366e565b61322e906002613685565b67ffffffffffffffff81111561324657613246613715565b6040519080825280601f01601f191660200182016040528015613270576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106132a7576132a76136ff565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106132f2576132f26136ff565b60200101906001600160f81b031916908160001a905350600061331684600261366e565b613321906001613685565b90505b60018111156133a6577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613362576133626136ff565b1a60f81b828281518110613378576133786136ff565b60200101906001600160f81b031916908160001a90535060049490941c9361339f8161391d565b9050613324565b508315611e225760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610cde565b50805460008255906000526020600020908101906120fa91905b80821115613423576000815560010161340f565b5090565b60006020828403121561343957600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611e2257600080fd5b80356001600160a01b038116811461260157600080fd5b803560ff8116811461260157600080fd5b80151581146120fa57600080fd5b803561260181613491565b60008060008060008060c087890312156134c357600080fd5b6134cc87613469565b9550602087013594506134e160408801613480565b93506134ef60608801613480565b92506080870135915060a087013561350681613491565b809150509295509295509295565b60006020828403121561352657600080fd5b813567ffffffffffffffff81168114611e2257600080fd5b60006020828403121561355057600080fd5b5035919050565b6000806040838503121561356a57600080fd5b8235915061357a60208401613469565b90509250929050565b6000806040838503121561359657600080fd5b8235915061357a60208401613480565b600080602083850312156135b957600080fd5b823567ffffffffffffffff808211156135d157600080fd5b818501915085601f8301126135e557600080fd5b8135818111156135f457600080fd5b86602060c08302850101111561360957600080fd5b60209290920196919550909350505050565b60006020828403121561362d57600080fd5b611e2282613469565b6000806040838503121561364957600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761083f5761083f613658565b8082018082111561083f5761083f613658565b6000602082840312156136aa57600080fd5b5051919050565b60ff828116828216039081111561083f5761083f613658565b6000826136e757634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561083f5761083f613658565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060c0828403121561373d57600080fd5b60405160c0810181811067ffffffffffffffff8211171561376e57634e487b7160e01b600052604160045260246000fd5b6040528235815261378160208401613469565b602082015261379260408401613480565b60408201526137a360608401613480565b60608201526137b46080840161349f565b608082015260a083013560a08201528091505092915050565b6000600182016137df576137df613658565b5060010190565b6000602082840312156137f857600080fd5b8151611e2281613491565b67ffffffffffffffff81811683821602808216919082811461382757613827613658565b505092915050565b634e487b7160e01b600052603160045260246000fd5b60005b83811015613860578181015183820152602001613848565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516138a1816017850160208801613845565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516138de816028840160208801613845565b01602801949350505050565b6020815260008251806020840152613909816040850160208701613845565b601f01601f19169190910160400192915050565b60008161392c5761392c613658565b50600019019056fea2646970667358221220b8e989571a98a41404ede9329461cf1ff50f79df9ca172c5ded6755573d871c364736f6c63430008130033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102f45760003560e01c806381e508b911610191578063b998902f116100e3578063dd483cfb11610097578063ea612e1f11610071578063ea612e1f14610780578063f7b188a514610789578063f90ce5ba1461079157600080fd5b8063dd483cfb14610716578063df67438514610736578063e63ab1e91461075957600080fd5b8063d547741f116100c8578063d547741f146106c6578063d71ba7c4146106d9578063d968f44b146106ec57600080fd5b8063b998902f14610604578063c81e25ab1461062b57600080fd5b806391b7f5ed11610145578063a6471a1d1161011f578063a6471a1d146105b6578063a81064ee146105dd578063b67644b9146105f157600080fd5b806391b7f5ed1461056457806391d1485414610577578063a217fddf146105ae57600080fd5b80638a5e8e32116101765780638a5e8e321461054b5780638b82547f14610554578063906978421461055c57600080fd5b806381e508b91461051f5780638456cb591461054357600080fd5b8063420fc4db1161024a57806351b17cd0116101fe5780635c975abb116101d85780635c975abb146104f9578063628de87714610504578063711bfa2b1461051757600080fd5b806351b17cd0146104cb57806351cff8d9146104d35780635239af71146104e657600080fd5b806347aab79b1161022f57806347aab79b1461049c5780634ba2363a146104af5780634bb13e34146104b857600080fd5b8063420fc4db1461045a57806344beae8e1461047257600080fd5b80632182ddb1116102ac5780632f2ff15d116102865780632f2ff15d146103f857806332ac57dd1461040b57806336568abe1461044757600080fd5b80632182ddb11461037e578063248a9ca3146103bf57806324b570a9146103f057600080fd5b80631889b99b116102dd5780631889b99b1461034e57806318c8572f146103565780631a37b4851461036b57600080fd5b806301ffc9a7146102f9578063053f14da14610321575b600080fd5b61030c610307366004613427565b6107ac565b60405190151581526020015b60405180910390f35b6009546103359067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610318565b61030c610845565b6103696103643660046134aa565b610857565b005b610369610379366004613514565b610af1565b6103a761038c36600461353e565b6000908152600260205260409020546001600160a01b031690565b6040516001600160a01b039091168152602001610318565b6103e26103cd36600461353e565b60009081526020819052604090206001015490565b604051908152602001610318565b6103e2610b87565b610369610406366004613557565b610c3a565b61043561041936600461353e565b600090815260026020526040902054600160a81b900460ff1690565b60405160ff9091168152602001610318565b610369610455366004613557565b610c64565b6001546103a79061010090046001600160a01b031681565b61043561048036600461353e565b600090815260026020526040902054600160a01b900460ff1690565b6103696104aa366004613583565b610cf5565b6103e260075481565b6103696104c63660046135a6565b610fa8565b6103e2611131565b6103696104e136600461361b565b611189565b6103e26104f43660046134aa565b611306565b60015460ff1661030c565b61036961051236600461353e565b611664565b61030c611882565b6103e261052d36600461353e565b6000908152600260208190526040909120015490565b6103696118ab565b6103e260065481565b6103e261190e565b6103e2611964565b61036961057236600461353e565b61199c565b61030c610585366004613557565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6103e2600081565b6103e27f000000000000000000000000000000000000000000000000000000000000000081565b60015461043590600160a81b900460ff1681565b6103696105ff366004613636565b611aab565b6103e27f000000000000000000000000000000000000000000000000000000000000000081565b61068661063936600461353e565b60026020819052600091825260409091208054600182015491909201546001600160a01b0383169260ff600160a01b8204811693600160a81b8304821693600160b01b9093049091169186565b604080516001600160a01b0397909716875260ff9586166020880152939094169285019290925215156060840152608083015260a082015260c001610318565b6103696106d4366004613557565b611d3f565b6103e26106e736600461353e565b611d64565b61030c6106fa36600461353e565b600090815260026020526040902054600160b01b900460ff1690565b6009546103359068010000000000000000900467ffffffffffffffff1681565b6103e261074436600461353e565b60009081526002602052604090206001015490565b6103e27f000000000000000000000000000000000000000000000000000000000000000081565b6103e260085481565b610369611e29565b60095461033590600160801b900467ffffffffffffffff1681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061083f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60006108516003611e8a565b15919050565b61085f611e9a565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166108ae57604051635844c9e760e11b815260040160405180910390fd5b6001600160a01b0386166108d55760405163d92e233d60e01b815260040160405180910390fd5b60ff831615806108eb57508360ff168360ff1610155b1561090957604051630a0b2c3560e41b815260040160405180910390fd5b6000828152600260205260409020546001600160a01b03161561093f576040516311ab459f60e21b815260040160405180910390fd5b6000610951600160ff87161b8761366e565b905060008661095e611131565b6109689190613685565b90508060000361098b5760405163334ab3f560e11b815260040160405180910390fd5b610996600019611664565b8560ff166001901b600660008282546109af9190613685565b90915550506040805160c0810182526001600160a01b03808b16825260ff808a1660208085019182528a831685870190815289151560608701908152608087018981524360a0890190815260008e815260029586905299909920975188549551935192511515600160b01b0260ff60b01b19938816600160a81b029390931661ffff60a81b1994909716600160a01b0274ffffffffffffffffffffffffffffffffffffffffff19909616971696909617939093171692909217178355905160018301559151910155610a8360038583611eed565b60408051838152602081018390526001600160a01b038a168183015260ff88811660608301528716608082015284151560a0820152905185917f9b088e2c89b322a3c1d81515e1c88db3d386d022926f0e2d0b9b5813b7413d58919081900360c00190a25050505050505050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610b4057604051635844c9e760e11b815260040160405180910390fd5b6009805467ffffffffffffffff90921668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff909216919091179055565b6000610b94600019611664565b6001546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009161010090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610bfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1f9190613698565b90508060075410610c305780610c34565b6007545b91505090565b600082815260208190526040902060010154610c55816120f0565b610c5f83836120fd565b505050565b6001600160a01b0381163314610ce75760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610cf1828261219b565b5050565b610cfd611e9a565b600082815260026020818152604092839020835160c08101855281546001600160a01b03811680835260ff600160a01b8304811695840195909552600160a81b8204851696830196909652600160b01b900490921615156060830152600181015460808301529091015460a0820152903314610da5576040517fb72bcb2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015460ff808416600160a81b90920416108015610dcc57508160ff16816020015160ff16105b610e02576040517fd5fd03fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e0a611131565b816080015111610e2d576040516368aebbc560e01b815260040160405180910390fd5b6000816020015183610e3f91906136b1565b90506000600160ff83161b610e5386611d64565b610e5d91906136ca565b9050610e67611964565b811015610e8757604051631e9acf1760e31b815260040160405180910390fd5b610e92600019611664565b826020015160ff166001901b8460ff166001901b610eb091906136ec565b60066000828254610ec19190613685565b90915550506080830151610ed990600390879061221a565b600085815260026020819052604090912080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b60ff8816021781554391015580610f28611131565b610f329190613685565b6080840181815260008781526002602052604090206001019190915551610f5d906003908790611eed565b60808301516040805160ff87168152602081019290925286917faf27998ec15e9d3809edad41aec1b5551d8412e71bd07c91611a0237ead1dc8e910160405180910390a25050505050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610ff757604051635844c9e760e11b815260040160405180910390fd5b60005b81811015610c5f576000838383818110611016576110166136ff565b905060c0020180360381019061102c919061372b565b602081015160a082015160408084015160608501518551608087015193517f18c8572f0000000000000000000000000000000000000000000000000000000081526001600160a01b039096166004870152602486019490945260ff91821660448601521660648401526084830191909152151560a482015290915030906318c8572f9060c401600060405180830381600087803b1580156110cc57600080fd5b505af19250505080156110dd575060015b61111e5780516040805184815260208101929092527f7ded044f9ef68a0ffb6bdb48c80387f300787e7492659224ad140db77893950d910160405180910390a15b5080611129816137cd565b915050610ffa565b600954600090819061115490600160801b900467ffffffffffffffff16436136ec565b60095490915060009061117290839067ffffffffffffffff1661366e565b9050806005546111829190613685565b9250505090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff166111fb576040517f24876df800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611205610b87565b6001546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018490529293506101009091049091169063a9059cbb906044016020604051808303816000875af115801561127a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129e91906137e6565b6112bb576040516312171d8360e31b815260040160405180910390fd5b604080516001600160a01b0384168152602081018390527ff5d8f9b1e7af440e1e7915f4693ccc004d1461a7dafd17ea7347d03decf298e1910160405180910390a150506000600755565b6000611310611e9a565b6001600160a01b0387166113375760405163d92e233d60e01b815260040160405180910390fd5b60ff84161580611356575060015460ff600160a81b9091048116908516105b8061136757508460ff168460ff1610155b1561138557604051630a0b2c3560e41b815260040160405180910390fd5b6040805133602082015290810184905260009060600160408051601f198184030181529181528151602092830120600081815260029093529120549091506001600160a01b0316156113ea576040516311ab459f60e21b815260040160405180910390fd5b6113f2611964565b87101561141257604051631e9acf1760e31b815260040160405180910390fd5b6000611424600160ff89161b8961366e565b6001546040516323b872dd60e01b81523360048201523060248201526044810183905291925061010090046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611481573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a591906137e6565b6114c2576040516312171d8360e31b815260040160405180910390fd5b6000886114cd611131565b6114d79190613685565b9050806000036114fa5760405163334ab3f560e11b815260040160405180910390fd5b611505600019611664565b8760ff166001901b6006600082825461151e9190613685565b90915550506040805160c0810182526001600160a01b03808d16825260ff808c1660208085019182528c83168587019081528b151560608701908152608087018981524360a0890190815260008d815260029586905299909920975188549551935192511515600160b01b0260ff60b01b19938816600160a81b029390931661ffff60a81b1994909716600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199096169716969096179390931716929092171783559051600183015591519101556115f260038483611eed565b60408051838152602081018390526001600160a01b038c168183015260ff8a811660608301528916608082015286151560a0820152905184917f9b088e2c89b322a3c1d81515e1c88db3d386d022926f0e2d0b9b5813b7413d58919081900360c00190a2509098975050505050505050565b60085460005b828110156118105761167a610845565b1561168f57611687611131565b600855611810565b600061169961190e565b905060006116a682611d64565b11156116bd576116b4611131565b60085550611810565b600081815260026020818152604092839020835160c08101855281546001600160a01b038116825260ff600160a01b82048116948301859052600160a81b8204811696830196909652600160b01b900490941615156060850152600180820154608086015292015460a084015260065491901b9081111561176a576040517f9b02220b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806006600082825461177c91906136ec565b909155505060808201516117919086906136ec565b61179b908261366e565b600760008282546117ac9190613685565b909155505060808201516117c490600390859061221a565b50506000908152600260208190526040822080547fffffffffffffffffff000000000000000000000000000000000000000000000016815560018082018490559101919091550161166a565b81600854101561184c576040517f530da97a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160085461185a91906136ec565b600654611867919061366e565b600760008282546118789190613685565b9091555050505050565b600061188c610845565b156118975750600090565b60006118a46106e761190e565b1115905090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff1661190457604051631d77d47760e21b815260040160405180910390fd5b61190c61256b565b565b60008061191b60036125bf565b905080600003611957576040517f46c83ec800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c346003826000612606565b60095460009061198d9067ffffffffffffffff8082169168010000000000000000900416613803565b67ffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff16611a0e576040517fea0f601b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60095467ffffffffffffffff1615611a2c57611a28611131565b6005555b600980544367ffffffffffffffff908116600160801b027fffffffffffffffff0000000000000000ffffffffffffffff0000000000000000909216908416171790556040517fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a90611aa09083815260200190565b60405180910390a150565b611ab3611e9a565b600082815260026020818152604092839020835160c08101855281546001600160a01b03811680835260ff600160a01b8304811695840195909552600160a81b8204851696830196909652600160b01b900490921615156060830152600181015460808301529091015460a082015290611b4057604051634ee9bc0f60e01b815260040160405180910390fd5b611b48611131565b816080015111611b6b576040516368aebbc560e01b815260040160405180910390fd5b600154602082015160ff600160a81b9092048216911611611bb8576040517f7103b80500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611bc0611964565b82611bca85611d64565b611bd49190613685565b1015611bf357604051631e9acf1760e31b815260040160405180910390fd5b6000816020015160ff166001901b83611c0c919061366e565b6001546040516323b872dd60e01b81523360048201523060248201526044810183905291925061010090046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611c69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8d91906137e6565b611caa576040516312171d8360e31b815260040160405180910390fd5b6080820151611cbd90600390869061221a565b828260800151611ccd9190613685565b60808301819052611ce2906003908690611eed565b60808201805160008681526002602090815260409182902060010192909255915182518481529182015285917faf5756c62d6c0722ef9be1f82bef97ab06ea5aea7f3eb8ad348422079f01d88d910160405180910390a250505050565b600082815260208190526040902060010154611d5a816120f0565b610c5f838361219b565b6000818152600260208181526040808420815160c08101835281546001600160a01b03811680835260ff600160a01b8304811696840196909652600160a81b8204861694830194909452600160b01b900490931615156060840152600181015460808401529092015460a082015290611df057604051634ee9bc0f60e01b815260040160405180910390fd5b611df8611131565b816080015111611e0b5750600092915050565b611e13611131565b8160800151611e2291906136ec565b9392505050565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff16611e8257604051631d77d47760e21b815260040160405180910390fd5b61190c612668565b600061083f8283600001546126a1565b60015460ff161561190c5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610cde565b80611f0b576040516363868c5560e11b815260040160405180910390fd5b611f168383836126cd565b15611f4d576040517f6082d5c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82546000905b80156120315780915080831015611f7d576000908152600180860160205260409091200154612008565b80831115611f9e576000908152600185016020526040902060020154612008565b808303612008576000818152600180870160209081526040832060040180548084018255818552918420909101879055918390529054611fde91906136ec565b60009182526001909501602090815260408083209583526005909501905292909220929092555050565b60008281526001860160205260408120600601805491612027836137cd565b9190505550611f53565b600083815260018087016020908152604083208581558083018490556002810184905560038101805460ff191684179055600481018054808501825581865292909420909101879055915461208691906136ec565b6000868152600583016020526040902055826120a4578386556120de565b828410156120c757600083815260018088016020526040909120018490556120de565b600083815260018701602052604090206002018490555b6120e88685612733565b505050505050565b6120fa813361299b565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610cf1576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556121573390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610cf1576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b80612238576040516363868c5560e11b815260040160405180910390fd5b6122438383836126cd565b61226057604051635889b1c560e11b815260040160405180910390fd5b6000818152600180850160209081526040808420868552600581019092528320546004820180549294919391929091612298916136ec565b815481106122a8576122a86136ff565b90600052602060002001549050808360040183815481106122cb576122cb6136ff565b60009182526020808320909101929092558281526005850190915260409020829055600483018054806123005761230061382f565b6001900381819060005260206000200160009055905560008084600401805490506000036125615760008681526001808a0160205260409091200154158061235957506000868152600189016020526040902060020154155b156123655750846123ad565b5060008581526001880160205260409020600201545b60008181526001808a0160205260409091200154156123ad57600090815260018089016020526040909120015461237b565b60008181526001808a0160205260409091200154156123e15760008181526001808a016020526040909120015491506123f8565b600081815260018901602052604090206002015491505b600081815260018901602052604080822054848352912081905580156124685760008181526001808b0160205260409091200154820361244d5760008181526001808b0160205260409091200183905561246c565b600081815260018a016020526040902060020183905561246c565b8289555b600082815260018a01602052604090206003015460ff16158783146124ff576124968a848a612a0e565b600088815260018b8101602052604080832080830154878552828520938401819055845281842087905560028082015490840181905584529083208690556003908101549286905201805460ff191660ff90921615159190911790559196916124ff8a89612a87565b801561250f5761250f8a85612af4565b6125198a83612a87565b60008381526001808c01602052604082208281559081018290556002810182905560038101805460ff191690559061255460048301826133f5565b6006820160009055505050505b5050505050505050565b612573611e9a565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b8054806125ce57506000919050565b5b6000818152600180840160205260409091200154156126015760009081526001808301602052604090912001546125cf565b919050565b60006126128484612f0d565b61262f57604051635889b1c560e11b815260040160405180910390fd5b60008381526001850160205260409020600401805483908110612654576126546136ff565b906000526020600020015490509392505050565b612670612f53565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336125a2565b60008181526001830160205260408120600681015460048201546126c59190613685565b949350505050565b60006126d98483612f0d565b6126e557506000611e22565b60008281526001850160209081526040808320868452600581019092529091205460049091018054859290811061271e5761271e6136ff565b90600052602060002001541490509392505050565b60005b825482148015906127605750600082815260018401602052604080822054825290206003015460ff165b1561297957600082815260018085016020526040808320548084528184205484529220015481036128815760008181526001850160205260408082205482528082206002015480835291206003015490925060ff1615612808576000818152600180860160205260408083206003808201805460ff19908116909155878652838620820180548216905582548652928520018054909216909217905590829052549250612973565b6000818152600185016020526040902060020154830361282f5780925061282f8484612fa5565b50600082815260018085016020526040808320548084528184206003808201805460ff1990811690915582548752938620018054909316909317909155918290525461287c908590613122565b612973565b6000818152600180860160205260408083205483528083209091015480835291206003015490925060ff16156128ff576000818152600180860160205260408083206003808201805460ff19908116909155878652838620820180548216905582548652928520018054909216909217905590829052549250612973565b60008181526001808601602052604090912001548303612926578092506129268484613122565b50600082815260018085016020526040808320548084528184206003808201805460ff19908116909155825487529386200180549093169093179091559182905254612973908590612fa5565b50612736565b505080546000908152600190910160205260409020600301805460ff19169055565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610cf1576129cc81613202565b6129d7836020613214565b6040516020016129e8929190613869565b60408051601f198184030181529082905262461bcd60e51b8252610cde916004016138ea565b600081815260018401602052604080822054848352912081905580612a3557828455612a81565b60008181526001808601602052604090912001548203612a6a5760008181526001808601602052604090912001839055612a81565b600081815260018501602052604090206002018390555b50505050565b8015610cf1576000818152600183016020526040902060020154612aac9083906126a1565b6000828152600180850160205260409091200154612acb9084906126a1565b612ad59190613685565b6000918252600183016020526040909120600681019190915554612a87565b60005b82548214801590612b1c5750600082815260018401602052604090206003015460ff16155b15612eee5760008281526001808501602052604080832054808452922001548303612d175760008181526001850160205260408082206002015480835291206003015490925060ff1615612bbf576000828152600180860160205260408083206003908101805460ff19908116909155858552919093209092018054909216179055612ba88482612fa5565b600081815260018501602052604090206002015491505b60008281526001808601602052604080832090910154825290206003015460ff16158015612c0a5750600082815260018501602052604080822060020154825290206003015460ff16155b15612c3757600082815260018581016020526040909120600301805460ff19169091179055915081612ee8565b600082815260018501602052604080822060020154825290206003015460ff16612cb4576000828152600180860160205260408083208083015484529083206003908101805460ff1990811690915593869052018054909216179055612c9d8483613122565b600081815260018501602052604090206002015491505b600081815260018501602052604080822060039081018054868552838520808401805460ff909316151560ff199384161790558254821690925560029091015484529190922090910180549091169055612d0e8482612fa5565b83549250612ee8565b6000818152600180860160205260408083209091015480835291206003015490925060ff1615612d96576000828152600180860160205260408083206003908101805460ff19908116909155858552919093209092018054909216179055612d7f8482613122565b600081815260018086016020526040909120015491505b600082815260018501602052604080822060020154825290206003015460ff16158015612de1575060008281526001808601602052604080832090910154825290206003015460ff16155b15612e0e57600082815260018581016020526040909120600301805460ff19169091179055915081612ee8565b60008281526001808601602052604080832090910154825290206003015460ff16612e8d57600082815260018086016020526040808320600281015484529083206003908101805460ff1990811690915593869052018054909216179055612e768483612fa5565b600081815260018086016020526040909120015491505b60008181526001808601602052604080832060039081018054878652838620808401805460ff909316151560ff19938416179055825482169092559301548452922090910180549091169055612ee38482613122565b835492505b50612af7565b506000908152600190910160205260409020600301805460ff19169055565b600081612f1c5750600061083f565b82548203612f2c5750600161083f565b600082815260018401602052604090205415612f4a5750600161083f565b50600092915050565b60015460ff1661190c5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610cde565b600081815260018084016020526040808320600281018054915482865292852090930154938590529183905590918015612fed57600081815260018601602052604090208490555b600083815260018601602052604090208290558161300d57828555613059565b600082815260018087016020526040909120015484036130425760008281526001808701602052604090912001839055613059565b600082815260018601602052604090206002018390555b6000838152600180870160205260408083209091018690558582529020838155600201546130889086906126a1565b60008581526001808801602052604090912001546130a79087906126a1565b6130b19190613685565b60008581526001870160205260408082206006019290925584815220600201546130dc9086906126a1565b60008481526001808801602052604090912001546130fb9087906126a1565b6131059190613685565b600093845260019095016020525050604090206006019190915550565b6000818152600180840160205260408083209182018054925483855291842060020154938590528390559091801561316857600081815260018601602052604090208490555b6000838152600186016020526040902082905581613188578285556131d4565b600082815260018601602052604090206002015484036131bd57600082815260018601602052604090206002018390556131d4565b600082815260018087016020526040909120018390555b60008381526001860160205260408082206002908101879055868352912084815501546130889086906126a1565b606061083f6001600160a01b03831660145b6060600061322383600261366e565b61322e906002613685565b67ffffffffffffffff81111561324657613246613715565b6040519080825280601f01601f191660200182016040528015613270576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106132a7576132a76136ff565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106132f2576132f26136ff565b60200101906001600160f81b031916908160001a905350600061331684600261366e565b613321906001613685565b90505b60018111156133a6577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613362576133626136ff565b1a60f81b828281518110613378576133786136ff565b60200101906001600160f81b031916908160001a90535060049490941c9361339f8161391d565b9050613324565b508315611e225760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610cde565b50805460008255906000526020600020908101906120fa91905b80821115613423576000815560010161340f565b5090565b60006020828403121561343957600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611e2257600080fd5b80356001600160a01b038116811461260157600080fd5b803560ff8116811461260157600080fd5b80151581146120fa57600080fd5b803561260181613491565b60008060008060008060c087890312156134c357600080fd5b6134cc87613469565b9550602087013594506134e160408801613480565b93506134ef60608801613480565b92506080870135915060a087013561350681613491565b809150509295509295509295565b60006020828403121561352657600080fd5b813567ffffffffffffffff81168114611e2257600080fd5b60006020828403121561355057600080fd5b5035919050565b6000806040838503121561356a57600080fd5b8235915061357a60208401613469565b90509250929050565b6000806040838503121561359657600080fd5b8235915061357a60208401613480565b600080602083850312156135b957600080fd5b823567ffffffffffffffff808211156135d157600080fd5b818501915085601f8301126135e557600080fd5b8135818111156135f457600080fd5b86602060c08302850101111561360957600080fd5b60209290920196919550909350505050565b60006020828403121561362d57600080fd5b611e2282613469565b6000806040838503121561364957600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761083f5761083f613658565b8082018082111561083f5761083f613658565b6000602082840312156136aa57600080fd5b5051919050565b60ff828116828216039081111561083f5761083f613658565b6000826136e757634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561083f5761083f613658565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060c0828403121561373d57600080fd5b60405160c0810181811067ffffffffffffffff8211171561376e57634e487b7160e01b600052604160045260246000fd5b6040528235815261378160208401613469565b602082015261379260408401613480565b60408201526137a360608401613480565b60608201526137b46080840161349f565b608082015260a083013560a08201528091505092915050565b6000600182016137df576137df613658565b5060010190565b6000602082840312156137f857600080fd5b8151611e2281613491565b67ffffffffffffffff81811683821602808216919082811461382757613827613658565b505092915050565b634e487b7160e01b600052603160045260246000fd5b60005b83811015613860578181015183820152602001613848565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516138a1816017850160208801613845565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516138de816028840160208801613845565b01602801949350505050565b6020815260008251806020840152613909816040850160208701613845565b601f01601f19169190910160400192915050565b60008161392c5761392c613658565b50600019019056fea2646970667358221220b8e989571a98a41404ede9329461cf1ff50f79df9ca172c5ded6755573d871c364736f6c63430008130033", + "numDeployments": 1, + "solcInputHash": "b85a93172485bf790fee27ce7d9db48a", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bzzToken\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_minimumBucketDepth\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AdministratorOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchTooSmall\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DepthNotIncreasing\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficienChunkCount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDepth\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoBatchesExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotBatchOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyPauser\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyRedistributor\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PriceOracleOnly\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TotalOutpaymentDecreased\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueCannotBeZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueDoesNotExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueKeyPairExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroBalance\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"normalisedBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"bucketDepth\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"immutableFlag\",\"type\":\"bool\"}],\"name\":\"BatchCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"newDepth\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"normalisedBalance\",\"type\":\"uint256\"}],\"name\":\"BatchDepthIncrease\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"batchId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"topupAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"normalisedBalance\",\"type\":\"uint256\"}],\"name\":\"BatchTopUp\",\"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\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"name\":\"PotWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"PriceUpdate\",\"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\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PRICE_ORACLE_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REDISTRIBUTOR_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"}],\"name\":\"batchBucketDepth\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"}],\"name\":\"batchDepth\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"}],\"name\":\"batchImmutableFlag\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"}],\"name\":\"batchLastUpdatedBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"}],\"name\":\"batchNormalisedBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"}],\"name\":\"batchOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"batches\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"bucketDepth\",\"type\":\"uint8\"},{\"internalType\":\"bool\",\"name\":\"immutableFlag\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"normalisedBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lastUpdatedBlockNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bzzToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_initialBalancePerChunk\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"_depth\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"_bucketDepth\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"_immutable\",\"type\":\"bool\"}],\"name\":\"copyBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_initialBalancePerChunk\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"_depth\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"_bucketDepth\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"_nonce\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"_immutable\",\"type\":\"bool\"}],\"name\":\"createBatch\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentTotalOutPayment\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"limit\",\"type\":\"uint256\"}],\"name\":\"expireLimited\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"expiredBatchesExist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"firstBatchId\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"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\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_newDepth\",\"type\":\"uint8\"}],\"name\":\"increaseDepth\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isBatchesTreeEmpty\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastExpiryBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastPrice\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastUpdatedBlock\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumBucketDepth\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumInitialBalancePerChunk\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumValidityBlocks\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"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\":[],\"name\":\"pot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"}],\"name\":\"remainingBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"uint64\",\"name\":\"_value\",\"type\":\"uint64\"}],\"name\":\"setMinimumValidityBlocks\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_price\",\"type\":\"uint256\"}],\"name\":\"setPrice\",\"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\":\"bytes32\",\"name\":\"_batchId\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_topupAmountPerChunk\",\"type\":\"uint256\"}],\"name\":\"topUp\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalPot\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"validChunkCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"The Swarm Authors\",\"details\":\"The postage stamp contracts allows users to create and manage postage stamp batches. The current balance for each batch is stored ordered in descending order of normalised balance. Balance is normalised to be per chunk and the total spend since the contract was deployed, i.e. when a batch is bought, its per-chunk balance is supplemented with the current cost of storing one chunk since the beginning of time, as if the batch had existed since the contract's inception. During the _expiry_ process, each of these balances is checked against the _currentTotalOutPayment_, a similarly normalised figure that represents the current cost of storing one chunk since the beginning of time. A batch with a normalised balance less than _currentTotalOutPayment_ is treated as expired. The _currentTotalOutPayment_ is calculated using _totalOutPayment_ which is updated during _setPrice_ events so that the applicable per-chunk prices can be charged for the relevant periods of time. This can then be multiplied by the amount of chunks which are allowed to be stamped by each batch to get the actual cost of storage. The amount of chunks a batch can stamp is determined by the _bucketDepth_. A batch may store a maximum of 2^depth chunks. The global figure for the currently allowed chunks is tracked by _validChunkCount_ and updated during batch _expiry_ events.\",\"events\":{\"BatchCreated(bytes32,uint256,uint256,address,uint8,uint8,bool)\":{\"details\":\"Emitted when a new batch is created.\"},\"BatchDepthIncrease(bytes32,uint8,uint256)\":{\"details\":\"Emitted when the depth of an existing batch increases.\"},\"BatchTopUp(bytes32,uint256,uint256)\":{\"details\":\"Emitted when an existing batch is topped up.\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"PotWithdrawn(address,uint256)\":{\"details\":\"Emitted when an pot is Withdrawn.\"},\"PriceUpdate(uint256)\":{\"details\":\"Emitted on every price update.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_bzzToken\":\"The ERC20 token address to reference in this contract.\",\"_minimumBucketDepth\":\"The minimum bucket depth of batches that can be purchased.\"}},\"copyBatch(address,uint256,uint8,uint8,bytes32,bool)\":{\"details\":\"At least `_initialBalancePerChunk*2^depth` tokens must be approved in the ERC20 token contract.\",\"params\":{\"_batchId\":\"BatchId being copied (from previous version contract data).\",\"_depth\":\"Initial depth of the new batch.\",\"_immutable\":\"Whether the batch is mutable.\",\"_initialBalancePerChunk\":\"Initial balance per chunk of the batch.\",\"_owner\":\"Owner of the new batch.\"}},\"createBatch(address,uint256,uint8,uint8,bytes32,bool)\":{\"details\":\"At least `_initialBalancePerChunk*2^depth` tokens must be approved in the ERC20 token contract.\",\"params\":{\"_depth\":\"Initial depth of the new batch.\",\"_immutable\":\"Whether the batch is mutable.\",\"_initialBalancePerChunk\":\"Initial balance per chunk.\",\"_nonce\":\"A random value used in the batch id derivation to allow multiple batches per owner.\",\"_owner\":\"Owner of the new batch.\"}},\"currentTotalOutPayment()\":{\"details\":\"Returns the total normalised all-time per chunk payout. Only Batches with a normalised balance greater than this are valid.\"},\"expireLimited(uint256)\":{\"details\":\"Can be used if reclaiming all expired batches would exceed the block gas limit, causing other contract method calls to fail.\",\"params\":{\"limit\":\"The maximum number of batches to expire.\"}},\"firstBatchId()\":{\"details\":\"If more than one batch id, return index at 0, if no batches, revert.\"},\"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`.\"},\"increaseDepth(bytes32,uint8)\":{\"details\":\"Can only be called by the owner of the batch.\",\"params\":{\"_batchId\":\"the id of an existing batch.\",\"_newDepth\":\"the new (larger than the previous one) depth for this batch.\"}},\"pause()\":{\"details\":\"Can only be called by the pauser when not paused. The contract can be provably stopped by renouncing the pauser role and the admin role once paused.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"remainingBalance(bytes32)\":{\"params\":{\"_batchId\":\"The id of an existing batch.\"}},\"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.\"},\"setPrice(uint256)\":{\"details\":\"Can only be called by the price oracle role.\",\"params\":{\"_price\":\"The new price.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"topUp(bytes32,uint256)\":{\"details\":\"At least `_topupAmountPerChunk*2^depth` tokens must be approved in the ERC20 token contract.\",\"params\":{\"_batchId\":\"The id of an existing batch.\",\"_topupAmountPerChunk\":\"The amount of additional tokens to add per chunk.\"}},\"unPause()\":{\"details\":\"Can only be called by the pauser role while paused.\"},\"withdraw(address)\":{\"params\":{\"beneficiary\":\"Recieves the current total pot.\"}}},\"title\":\"PostageStamp contract\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"copyBatch(address,uint256,uint8,uint8,bytes32,bool)\":{\"notice\":\"Manually create a new batch when facilitating migration, can only be called by the Admin role.\"},\"createBatch(address,uint256,uint8,uint8,bytes32,bool)\":{\"notice\":\"Create a new batch.\"},\"currentTotalOutPayment()\":{\"notice\":\"Total per-chunk cost since the contract's deployment.\"},\"expireLimited(uint256)\":{\"notice\":\"Reclaims a limited number of expired batches\"},\"expiredBatchesExist()\":{\"notice\":\"Indicates whether expired batches exist.\"},\"firstBatchId()\":{\"notice\":\"Get the first batch id ordered by ascending normalised balance.\"},\"increaseDepth(bytes32,uint8)\":{\"notice\":\"Increase the depth of an existing batch.\"},\"isBatchesTreeEmpty()\":{\"notice\":\"Return true if no batches exist\"},\"pause()\":{\"notice\":\"Pause the contract.\"},\"remainingBalance(bytes32)\":{\"notice\":\"Return the per chunk balance not yet used up.\"},\"setPrice(uint256)\":{\"notice\":\"Set a new price.\"},\"topUp(bytes32,uint256)\":{\"notice\":\"Top up an existing batch.\"},\"totalPot()\":{\"notice\":\"The current pot.\"},\"unPause()\":{\"notice\":\"Unpause the contract.\"},\"withdraw(address)\":{\"notice\":\"Withdraw the pot, authorised callers only.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/PostageStamp.sol\":\"PostageStamp\"},\"evmVersion\":\"paris\",\"libraries\":{\":__CACHE_BREAKER__\":\"0x00000000d41867734bbee4c6863d9255b2b06ac1\"},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"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/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/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x4ffc0547c02ad22925310c585c0f166f8759e2648a09e9b489100c42f15dd98d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"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\"},\"src/OrderStatisticsTree/HitchensOrderStatisticsTreeLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\n/*\\nHitchens Order Statistics Tree v0.99\\n\\nA Solidity Red-Black Tree library to store and maintain a sorted data\\nstructure in a Red-Black binary search tree, with O(log 2n) insert, remove\\nand search time (and gas, approximately)\\n\\nhttps://github.com/rob-Hitchens/OrderStatisticsTree\\n\\nCopyright (c) Rob Hitchens. the MIT License\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\\"Software\\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is\\nfurnished to do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice shall be included in all\\ncopies or substantial portions of the Software.\\n\\nTHE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\nSOFTWARE.\\n\\nSignificant portions from BokkyPooBahsRedBlackTreeLibrary,\\nhttps://github.com/bokkypoobah/BokkyPooBahsRedBlackTreeLibrary\\n\\nTHIS SOFTWARE IS NOT TESTED OR AUDITED. DO NOT USE FOR PRODUCTION.\\n*/\\n\\nlibrary HitchensOrderStatisticsTreeLib {\\n uint private constant EMPTY = 0;\\n struct Node {\\n uint parent;\\n uint left;\\n uint right;\\n bool red;\\n bytes32[] keys;\\n mapping(bytes32 => uint) keyMap;\\n uint count;\\n }\\n struct Tree {\\n uint root;\\n mapping(uint => Node) nodes;\\n }\\n\\n error ValueDoesNotExist(); // Provided value doesn't exist in the tree.\\n error ValueCannotBeZero(); // Value to insert cannot be zero\\n error ValueKeyPairExists(); // Value and Key pair exists. Cannot be inserted again.\\n\\n function first(Tree storage self) internal view returns (uint _value) {\\n _value = self.root;\\n if (_value == EMPTY) return 0;\\n while (self.nodes[_value].left != EMPTY) {\\n _value = self.nodes[_value].left;\\n }\\n }\\n\\n function exists(Tree storage self, uint value) internal view returns (bool _exists) {\\n if (value == EMPTY) return false;\\n if (value == self.root) return true;\\n if (self.nodes[value].parent != EMPTY) return true;\\n return false;\\n }\\n\\n function keyExists(Tree storage self, bytes32 key, uint value) internal view returns (bool _exists) {\\n if (!exists(self, value)) return false;\\n return self.nodes[value].keys[self.nodes[value].keyMap[key]] == key;\\n }\\n\\n function getNode(\\n Tree storage self,\\n uint value\\n ) internal view returns (uint _parent, uint _left, uint _right, bool _red, uint keyCount, uint __count) {\\n if (!exists(self, value)) {\\n revert ValueDoesNotExist();\\n }\\n\\n Node storage gn = self.nodes[value];\\n return (gn.parent, gn.left, gn.right, gn.red, gn.keys.length, gn.keys.length + gn.count);\\n }\\n\\n function getNodeCount(Tree storage self, uint value) internal view returns (uint __count) {\\n Node storage gn = self.nodes[value];\\n return gn.keys.length + gn.count;\\n }\\n\\n function valueKeyAtIndex(Tree storage self, uint value, uint index) internal view returns (bytes32 _key) {\\n if (!exists(self, value)) {\\n revert ValueDoesNotExist();\\n }\\n return self.nodes[value].keys[index];\\n }\\n\\n function count(Tree storage self) internal view returns (uint _count) {\\n return getNodeCount(self, self.root);\\n }\\n\\n /* We don't use this functionality, so it is commented out to make audit easier\\n\\n function percentile(Tree storage self, uint value) internal view returns(uint _percentile) {\\n uint denominator = count(self);\\n uint numerator = rank(self, value);\\n _percentile = ((uint(1000) * numerator)/denominator+(uint(5)))/uint(10);\\n }\\n function permil(Tree storage self, uint value) internal view returns(uint _permil) {\\n uint denominator = count(self);\\n uint numerator = rank(self, value);\\n _permil = ((uint(10000) * numerator)/denominator+(uint(5)))/uint(10);\\n }\\n function atPercentile(Tree storage self, uint _percentile) internal view returns(uint _value) {\\n uint findRank = (((_percentile * count(self))/uint(10)) + uint(5)) / uint(10);\\n return atRank(self,findRank);\\n }\\n function atPermil(Tree storage self, uint _permil) internal view returns(uint _value) {\\n uint findRank = (((_permil * count(self))/uint(100)) + uint(5)) / uint(10);\\n return atRank(self,findRank);\\n }\\n function median(Tree storage self) internal view returns(uint value) {\\n return atPercentile(self,50);\\n }\\n function below(Tree storage self, uint value) public view returns(uint _below) {\\n if(count(self) > 0 && value > 0) _below = rank(self,value)-uint(1);\\n }\\n function above(Tree storage self, uint value) public view returns(uint _above) {\\n if(count(self) > 0) _above = count(self)-rank(self,value);\\n }\\n function valueBelowEstimate(Tree storage self, uint estimate) public view returns(uint _below) {\\n if(count(self) > 0 && estimate > 0) {\\n uint highestValue = last(self);\\n uint lowestValue = first(self);\\n if(estimate < lowestValue) {\\n return 0;\\n }\\n if(estimate >= highestValue) {\\n return highestValue;\\n }\\n uint rankOfValue = rank(self, estimate); // approximation\\n _below = atRank(self, rankOfValue);\\n if(_below > estimate) { // fix error in approximation\\n rankOfValue--;\\n _below = atRank(self, rankOfValue);\\n }\\n }\\n }\\n function valueAboveEstimate(Tree storage self, uint estimate) public view returns(uint _above) {\\n if(count(self) > 0 && estimate > 0) {\\n uint highestValue = last(self);\\n uint lowestValue = first(self);\\n if(estimate > highestValue) {\\n return 0;\\n }\\n if(estimate <= lowestValue) {\\n return lowestValue;\\n }\\n uint rankOfValue = rank(self, estimate); // approximation\\n _above = atRank(self, rankOfValue);\\n if(_above < estimate) { // fix error in approximation\\n rankOfValue++;\\n _above = atRank(self, rankOfValue);\\n }\\n }\\n }\\n function rank(Tree storage self, uint value) internal view returns(uint _rank) {\\n if(count(self) > 0) {\\n bool finished;\\n uint cursor = self.root;\\n Node storage c = self.nodes[cursor];\\n uint smaller = getNodeCount(self,c.left);\\n while (!finished) {\\n uint keyCount = c.keys.length;\\n if(cursor == value) {\\n finished = true;\\n } else {\\n if(cursor < value) {\\n cursor = c.right;\\n c = self.nodes[cursor];\\n smaller += keyCount + getNodeCount(self,c.left);\\n } else {\\n cursor = c.left;\\n c = self.nodes[cursor];\\n smaller -= (keyCount + getNodeCount(self,c.right));\\n }\\n }\\n if (!exists(self,cursor)) {\\n finished = true;\\n }\\n }\\n return smaller + 1;\\n }\\n }\\n function atRank(Tree storage self, uint _rank) internal view returns(uint _value) {\\n bool finished;\\n uint cursor = self.root;\\n Node storage c = self.nodes[cursor];\\n uint smaller = getNodeCount(self,c.left);\\n while (!finished) {\\n _value = cursor;\\n c = self.nodes[cursor];\\n uint keyCount = c.keys.length;\\n if(smaller + 1 >= _rank && smaller + keyCount <= _rank) {\\n _value = cursor;\\n finished = true;\\n } else {\\n if(smaller + keyCount <= _rank) {\\n cursor = c.right;\\n c = self.nodes[cursor];\\n smaller += keyCount + getNodeCount(self,c.left);\\n } else {\\n cursor = c.left;\\n c = self.nodes[cursor];\\n smaller -= (keyCount + getNodeCount(self,c.right));\\n }\\n }\\n if (!exists(self,cursor)) {\\n finished = true;\\n }\\n }\\n }\\n*/\\n\\n function insert(Tree storage self, bytes32 key, uint value) internal {\\n if (value == EMPTY) {\\n revert ValueCannotBeZero();\\n }\\n if (keyExists(self, key, value)) {\\n revert ValueKeyPairExists();\\n }\\n uint cursor;\\n uint probe = self.root;\\n while (probe != EMPTY) {\\n cursor = probe;\\n if (value < probe) {\\n probe = self.nodes[probe].left;\\n } else if (value > probe) {\\n probe = self.nodes[probe].right;\\n } else if (value == probe) {\\n self.nodes[probe].keys.push(key);\\n self.nodes[probe].keyMap[key] = self.nodes[probe].keys.length - uint(1);\\n return;\\n }\\n self.nodes[cursor].count++;\\n }\\n Node storage nValue = self.nodes[value];\\n nValue.parent = cursor;\\n nValue.left = EMPTY;\\n nValue.right = EMPTY;\\n nValue.red = true;\\n nValue.keys.push(key);\\n nValue.keyMap[key] = nValue.keys.length - uint(1);\\n if (cursor == EMPTY) {\\n self.root = value;\\n } else if (value < cursor) {\\n self.nodes[cursor].left = value;\\n } else {\\n self.nodes[cursor].right = value;\\n }\\n insertFixup(self, value);\\n }\\n\\n function remove(Tree storage self, bytes32 key, uint value) internal {\\n if (value == EMPTY) {\\n revert ValueCannotBeZero();\\n }\\n if (!keyExists(self, key, value)) {\\n revert ValueDoesNotExist();\\n }\\n\\n Node storage nValue = self.nodes[value];\\n uint rowToDelete = nValue.keyMap[key];\\n bytes32 last = nValue.keys[nValue.keys.length - uint(1)];\\n nValue.keys[rowToDelete] = last;\\n nValue.keyMap[last] = rowToDelete;\\n nValue.keys.pop();\\n\\n uint probe;\\n uint cursor;\\n\\n if (nValue.keys.length == 0) {\\n if (self.nodes[value].left == EMPTY || self.nodes[value].right == EMPTY) {\\n cursor = value;\\n } else {\\n cursor = self.nodes[value].right;\\n while (self.nodes[cursor].left != EMPTY) {\\n cursor = self.nodes[cursor].left;\\n }\\n }\\n\\n if (self.nodes[cursor].left != EMPTY) {\\n probe = self.nodes[cursor].left;\\n } else {\\n probe = self.nodes[cursor].right;\\n }\\n\\n uint cursorParent = self.nodes[cursor].parent;\\n self.nodes[probe].parent = cursorParent;\\n\\n if (cursorParent != EMPTY) {\\n if (cursor == self.nodes[cursorParent].left) {\\n self.nodes[cursorParent].left = probe;\\n } else {\\n self.nodes[cursorParent].right = probe;\\n }\\n } else {\\n self.root = probe;\\n }\\n\\n bool doFixup = !self.nodes[cursor].red;\\n\\n if (cursor != value) {\\n replaceParent(self, cursor, value);\\n self.nodes[cursor].left = self.nodes[value].left;\\n self.nodes[self.nodes[cursor].left].parent = cursor;\\n self.nodes[cursor].right = self.nodes[value].right;\\n self.nodes[self.nodes[cursor].right].parent = cursor;\\n self.nodes[cursor].red = self.nodes[value].red;\\n (cursor, value) = (value, cursor);\\n fixCountRecurse(self, value);\\n }\\n\\n if (doFixup) {\\n removeFixup(self, probe);\\n }\\n\\n fixCountRecurse(self, cursorParent);\\n delete self.nodes[cursor];\\n }\\n }\\n\\n function fixCountRecurse(Tree storage self, uint value) private {\\n while (value != EMPTY) {\\n self.nodes[value].count =\\n getNodeCount(self, self.nodes[value].left) +\\n getNodeCount(self, self.nodes[value].right);\\n value = self.nodes[value].parent;\\n }\\n }\\n\\n function treeMinimum(Tree storage self, uint value) private view returns (uint) {\\n while (self.nodes[value].left != EMPTY) {\\n value = self.nodes[value].left;\\n }\\n return value;\\n }\\n\\n function treeMaximum(Tree storage self, uint value) private view returns (uint) {\\n while (self.nodes[value].right != EMPTY) {\\n value = self.nodes[value].right;\\n }\\n return value;\\n }\\n\\n function rotateLeft(Tree storage self, uint value) private {\\n uint cursor = self.nodes[value].right;\\n uint parent = self.nodes[value].parent;\\n uint cursorLeft = self.nodes[cursor].left;\\n self.nodes[value].right = cursorLeft;\\n if (cursorLeft != EMPTY) {\\n self.nodes[cursorLeft].parent = value;\\n }\\n self.nodes[cursor].parent = parent;\\n if (parent == EMPTY) {\\n self.root = cursor;\\n } else if (value == self.nodes[parent].left) {\\n self.nodes[parent].left = cursor;\\n } else {\\n self.nodes[parent].right = cursor;\\n }\\n self.nodes[cursor].left = value;\\n self.nodes[value].parent = cursor;\\n self.nodes[value].count =\\n getNodeCount(self, self.nodes[value].left) +\\n getNodeCount(self, self.nodes[value].right);\\n self.nodes[cursor].count =\\n getNodeCount(self, self.nodes[cursor].left) +\\n getNodeCount(self, self.nodes[cursor].right);\\n }\\n\\n function rotateRight(Tree storage self, uint value) private {\\n uint cursor = self.nodes[value].left;\\n uint parent = self.nodes[value].parent;\\n uint cursorRight = self.nodes[cursor].right;\\n self.nodes[value].left = cursorRight;\\n if (cursorRight != EMPTY) {\\n self.nodes[cursorRight].parent = value;\\n }\\n self.nodes[cursor].parent = parent;\\n if (parent == EMPTY) {\\n self.root = cursor;\\n } else if (value == self.nodes[parent].right) {\\n self.nodes[parent].right = cursor;\\n } else {\\n self.nodes[parent].left = cursor;\\n }\\n self.nodes[cursor].right = value;\\n self.nodes[value].parent = cursor;\\n self.nodes[value].count =\\n getNodeCount(self, self.nodes[value].left) +\\n getNodeCount(self, self.nodes[value].right);\\n self.nodes[cursor].count =\\n getNodeCount(self, self.nodes[cursor].left) +\\n getNodeCount(self, self.nodes[cursor].right);\\n }\\n\\n function insertFixup(Tree storage self, uint value) private {\\n uint cursor;\\n while (value != self.root && self.nodes[self.nodes[value].parent].red) {\\n uint valueParent = self.nodes[value].parent;\\n if (valueParent == self.nodes[self.nodes[valueParent].parent].left) {\\n cursor = self.nodes[self.nodes[valueParent].parent].right;\\n if (self.nodes[cursor].red) {\\n self.nodes[valueParent].red = false;\\n self.nodes[cursor].red = false;\\n self.nodes[self.nodes[valueParent].parent].red = true;\\n value = self.nodes[valueParent].parent;\\n } else {\\n if (value == self.nodes[valueParent].right) {\\n value = valueParent;\\n rotateLeft(self, value);\\n }\\n valueParent = self.nodes[value].parent;\\n self.nodes[valueParent].red = false;\\n self.nodes[self.nodes[valueParent].parent].red = true;\\n rotateRight(self, self.nodes[valueParent].parent);\\n }\\n } else {\\n cursor = self.nodes[self.nodes[valueParent].parent].left;\\n if (self.nodes[cursor].red) {\\n self.nodes[valueParent].red = false;\\n self.nodes[cursor].red = false;\\n self.nodes[self.nodes[valueParent].parent].red = true;\\n value = self.nodes[valueParent].parent;\\n } else {\\n if (value == self.nodes[valueParent].left) {\\n value = valueParent;\\n rotateRight(self, value);\\n }\\n valueParent = self.nodes[value].parent;\\n self.nodes[valueParent].red = false;\\n self.nodes[self.nodes[valueParent].parent].red = true;\\n rotateLeft(self, self.nodes[valueParent].parent);\\n }\\n }\\n }\\n self.nodes[self.root].red = false;\\n }\\n\\n function replaceParent(Tree storage self, uint a, uint b) private {\\n uint bParent = self.nodes[b].parent;\\n self.nodes[a].parent = bParent;\\n if (bParent == EMPTY) {\\n self.root = a;\\n } else {\\n if (b == self.nodes[bParent].left) {\\n self.nodes[bParent].left = a;\\n } else {\\n self.nodes[bParent].right = a;\\n }\\n }\\n }\\n\\n function removeFixup(Tree storage self, uint value) private {\\n uint cursor;\\n while (value != self.root && !self.nodes[value].red) {\\n uint valueParent = self.nodes[value].parent;\\n if (value == self.nodes[valueParent].left) {\\n cursor = self.nodes[valueParent].right;\\n if (self.nodes[cursor].red) {\\n self.nodes[cursor].red = false;\\n self.nodes[valueParent].red = true;\\n rotateLeft(self, valueParent);\\n cursor = self.nodes[valueParent].right;\\n }\\n if (!self.nodes[self.nodes[cursor].left].red && !self.nodes[self.nodes[cursor].right].red) {\\n self.nodes[cursor].red = true;\\n value = valueParent;\\n } else {\\n if (!self.nodes[self.nodes[cursor].right].red) {\\n self.nodes[self.nodes[cursor].left].red = false;\\n self.nodes[cursor].red = true;\\n rotateRight(self, cursor);\\n cursor = self.nodes[valueParent].right;\\n }\\n self.nodes[cursor].red = self.nodes[valueParent].red;\\n self.nodes[valueParent].red = false;\\n self.nodes[self.nodes[cursor].right].red = false;\\n rotateLeft(self, valueParent);\\n value = self.root;\\n }\\n } else {\\n cursor = self.nodes[valueParent].left;\\n if (self.nodes[cursor].red) {\\n self.nodes[cursor].red = false;\\n self.nodes[valueParent].red = true;\\n rotateRight(self, valueParent);\\n cursor = self.nodes[valueParent].left;\\n }\\n if (!self.nodes[self.nodes[cursor].right].red && !self.nodes[self.nodes[cursor].left].red) {\\n self.nodes[cursor].red = true;\\n value = valueParent;\\n } else {\\n if (!self.nodes[self.nodes[cursor].left].red) {\\n self.nodes[self.nodes[cursor].right].red = false;\\n self.nodes[cursor].red = true;\\n rotateLeft(self, cursor);\\n cursor = self.nodes[valueParent].left;\\n }\\n self.nodes[cursor].red = self.nodes[valueParent].red;\\n self.nodes[valueParent].red = false;\\n self.nodes[self.nodes[cursor].left].red = false;\\n rotateRight(self, valueParent);\\n value = self.root;\\n }\\n }\\n }\\n self.nodes[value].red = false;\\n }\\n}\\n\",\"keccak256\":\"0x3d13491ca535051ff9d923b284f6b633c660a4d110804e4a3e965dfaa59024b8\",\"license\":\"MIT\"},\"src/PostageStamp.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.19;\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"./OrderStatisticsTree/HitchensOrderStatisticsTreeLib.sol\\\";\\n\\n/**\\n * @title PostageStamp contract\\n * @author The Swarm Authors\\n * @dev The postage stamp contracts allows users to create and manage postage stamp batches.\\n * The current balance for each batch is stored ordered in descending order of normalised balance.\\n * Balance is normalised to be per chunk and the total spend since the contract was deployed, i.e. when a batch\\n * is bought, its per-chunk balance is supplemented with the current cost of storing one chunk since the beginning of time,\\n * as if the batch had existed since the contract's inception. During the _expiry_ process, each of these balances is\\n * checked against the _currentTotalOutPayment_, a similarly normalised figure that represents the current cost of\\n * storing one chunk since the beginning of time. A batch with a normalised balance less than _currentTotalOutPayment_\\n * is treated as expired.\\n *\\n * The _currentTotalOutPayment_ is calculated using _totalOutPayment_ which is updated during _setPrice_ events so\\n * that the applicable per-chunk prices can be charged for the relevant periods of time. This can then be multiplied\\n * by the amount of chunks which are allowed to be stamped by each batch to get the actual cost of storage.\\n *\\n * The amount of chunks a batch can stamp is determined by the _bucketDepth_. A batch may store a maximum of 2^depth chunks.\\n * The global figure for the currently allowed chunks is tracked by _validChunkCount_ and updated during batch _expiry_ events.\\n */\\n\\ncontract PostageStamp is AccessControl, Pausable {\\n using HitchensOrderStatisticsTreeLib for HitchensOrderStatisticsTreeLib.Tree;\\n\\n // ----------------------------- State variables ------------------------------\\n\\n // Address of the ERC20 token this contract references.\\n address public bzzToken;\\n\\n // Minimum allowed depth of bucket.\\n uint8 public minimumBucketDepth;\\n\\n // Role allowed to increase totalOutPayment.\\n bytes32 public immutable PRICE_ORACLE_ROLE;\\n\\n // Role allowed to pause\\n bytes32 public immutable PAUSER_ROLE;\\n // Role allowed to withdraw the pot.\\n bytes32 public immutable REDISTRIBUTOR_ROLE;\\n\\n // Associate every batch id with batch data.\\n mapping(bytes32 => Batch) public batches;\\n // Store every batch id ordered by normalisedBalance.\\n HitchensOrderStatisticsTreeLib.Tree tree;\\n\\n // Total out payment per chunk, at the blockheight of the last price change.\\n uint256 private totalOutPayment;\\n\\n // Combined global chunk capacity of valid batches remaining at the blockheight expire() was last called.\\n uint256 public validChunkCount;\\n\\n // Lottery pot at last update.\\n uint256 public pot;\\n\\n // Normalised balance at the blockheight expire() was last called.\\n uint256 public lastExpiryBalance;\\n\\n // Price from the last update.\\n uint64 public lastPrice;\\n\\n // blocks in 24 hours ~ 24 * 60 * 60 / 5 = 17280\\n uint64 public minimumValidityBlocks = 17280;\\n\\n // Block at which the last update occured.\\n uint64 public lastUpdatedBlock;\\n\\n // ----------------------------- Type declarations ------------------------------\\n\\n struct Batch {\\n // Owner of this batch (0 if not valid).\\n address owner;\\n // Current depth of this batch.\\n uint8 depth;\\n // Bucket depth defined in this batch\\n uint8 bucketDepth;\\n // Whether this batch is immutable.\\n bool immutableFlag;\\n // Normalised balance per chunk.\\n uint256 normalisedBalance;\\n // When was this batch last updated\\n uint256 lastUpdatedBlockNumber;\\n }\\n\\n // ----------------------------- Events ------------------------------\\n\\n /**\\n * @dev Emitted when a new batch is created.\\n */\\n event BatchCreated(\\n bytes32 indexed batchId,\\n uint256 totalAmount,\\n uint256 normalisedBalance,\\n address owner,\\n uint8 depth,\\n uint8 bucketDepth,\\n bool immutableFlag\\n );\\n\\n /**\\n * @dev Emitted when an pot is Withdrawn.\\n */\\n event PotWithdrawn(address recipient, uint256 totalAmount);\\n\\n /**\\n * @dev Emitted when an existing batch is topped up.\\n */\\n event BatchTopUp(bytes32 indexed batchId, uint256 topupAmount, uint256 normalisedBalance);\\n\\n /**\\n * @dev Emitted when the depth of an existing batch increases.\\n */\\n event BatchDepthIncrease(bytes32 indexed batchId, uint8 newDepth, uint256 normalisedBalance);\\n\\n /**\\n *@dev Emitted on every price update.\\n */\\n event PriceUpdate(uint256 price);\\n\\n // ----------------------------- Errors ------------------------------\\n\\n error ZeroAddress(); // Owner cannot be the zero address\\n error InvalidDepth(); // Invalid bucket depth\\n error BatchExists(); // Batch already exists\\n error InsufficientBalance(); // Insufficient initial balance for 24h minimum validity\\n error TransferFailed(); // Failed transfer of BZZ tokens\\n error ZeroBalance(); // NormalisedBalance cannot be zero\\n error AdministratorOnly(); // Only administrator can use copy method\\n error BatchDoesNotExist(); // Batch does not exist or has expired\\n error BatchExpired(); // Batch already expired\\n error BatchTooSmall(); // Batch too small to renew\\n error NotBatchOwner(); // Not batch owner\\n error DepthNotIncreasing(); // Depth not increasing\\n error PriceOracleOnly(); // Only price oracle can set the price\\n error InsufficienChunkCount(); // Insufficient valid chunk count\\n error TotalOutpaymentDecreased(); // Current total outpayment should never decrease\\n error NoBatchesExist(); // There are no batches\\n error OnlyPauser(); // Only Pauser role can pause or unpause contracts\\n error OnlyRedistributor(); // Only redistributor role can withdraw from the contract\\n\\n // ----------------------------- CONSTRUCTOR ------------------------------\\n\\n /**\\n * @param _bzzToken The ERC20 token address to reference in this contract.\\n * @param _minimumBucketDepth The minimum bucket depth of batches that can be purchased.\\n */\\n constructor(address _bzzToken, uint8 _minimumBucketDepth) {\\n bzzToken = _bzzToken;\\n minimumBucketDepth = _minimumBucketDepth;\\n PRICE_ORACLE_ROLE = keccak256(\\\"PRICE_ORACLE_ROLE\\\");\\n PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n REDISTRIBUTOR_ROLE = keccak256(\\\"REDISTRIBUTOR_ROLE\\\");\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n _setupRole(PAUSER_ROLE, msg.sender);\\n }\\n\\n ////////////////////////////////////////\\n // STATE CHANGING //\\n ////////////////////////////////////////\\n\\n /**\\n * @notice Create a new batch.\\n * @dev At least `_initialBalancePerChunk*2^depth` tokens must be approved in the ERC20 token contract.\\n * @param _owner Owner of the new batch.\\n * @param _initialBalancePerChunk Initial balance per chunk.\\n * @param _depth Initial depth of the new batch.\\n * @param _nonce A random value used in the batch id derivation to allow multiple batches per owner.\\n * @param _immutable Whether the batch is mutable.\\n */\\n function createBatch(\\n address _owner,\\n uint256 _initialBalancePerChunk,\\n uint8 _depth,\\n uint8 _bucketDepth,\\n bytes32 _nonce,\\n bool _immutable\\n ) external whenNotPaused returns (bytes32) {\\n if (_owner == address(0)) {\\n revert ZeroAddress();\\n }\\n\\n if (_bucketDepth == 0 || _bucketDepth < minimumBucketDepth || _bucketDepth >= _depth) {\\n revert InvalidDepth();\\n }\\n\\n bytes32 batchId = keccak256(abi.encode(msg.sender, _nonce));\\n if (batches[batchId].owner != address(0)) {\\n revert BatchExists();\\n }\\n\\n if (_initialBalancePerChunk < minimumInitialBalancePerChunk()) {\\n revert InsufficientBalance();\\n }\\n\\n uint256 totalAmount = _initialBalancePerChunk * (1 << _depth);\\n if (!ERC20(bzzToken).transferFrom(msg.sender, address(this), totalAmount)) {\\n revert TransferFailed();\\n }\\n\\n uint256 normalisedBalance = currentTotalOutPayment() + (_initialBalancePerChunk);\\n if (normalisedBalance == 0) {\\n revert ZeroBalance();\\n }\\n\\n expireLimited(type(uint256).max);\\n validChunkCount += 1 << _depth;\\n\\n batches[batchId] = Batch({\\n owner: _owner,\\n depth: _depth,\\n bucketDepth: _bucketDepth,\\n immutableFlag: _immutable,\\n normalisedBalance: normalisedBalance,\\n lastUpdatedBlockNumber: block.number\\n });\\n\\n tree.insert(batchId, normalisedBalance);\\n\\n emit BatchCreated(batchId, totalAmount, normalisedBalance, _owner, _depth, _bucketDepth, _immutable);\\n\\n return batchId;\\n }\\n\\n /**\\n * @notice Manually create a new batch when facilitating migration, can only be called by the Admin role.\\n * @dev At least `_initialBalancePerChunk*2^depth` tokens must be approved in the ERC20 token contract.\\n * @param _owner Owner of the new batch.\\n * @param _initialBalancePerChunk Initial balance per chunk of the batch.\\n * @param _depth Initial depth of the new batch.\\n * @param _batchId BatchId being copied (from previous version contract data).\\n * @param _immutable Whether the batch is mutable.\\n */\\n function copyBatch(\\n address _owner,\\n uint256 _initialBalancePerChunk,\\n uint8 _depth,\\n uint8 _bucketDepth,\\n bytes32 _batchId,\\n bool _immutable\\n ) external whenNotPaused {\\n if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert AdministratorOnly();\\n }\\n\\n if (_owner == address(0)) {\\n revert ZeroAddress();\\n }\\n\\n if (_bucketDepth == 0 || _bucketDepth >= _depth) {\\n revert InvalidDepth();\\n }\\n\\n if (batches[_batchId].owner != address(0)) {\\n revert BatchExists();\\n }\\n\\n uint256 totalAmount = _initialBalancePerChunk * (1 << _depth);\\n if (!ERC20(bzzToken).transferFrom(msg.sender, address(this), totalAmount)) {\\n revert TransferFailed();\\n }\\n\\n uint256 normalisedBalance = currentTotalOutPayment() + (_initialBalancePerChunk);\\n if (normalisedBalance == 0) {\\n revert ZeroBalance();\\n }\\n\\n //update validChunkCount to remove currently expired batches\\n expireLimited(type(uint256).max);\\n\\n validChunkCount += 1 << _depth;\\n\\n batches[_batchId] = Batch({\\n owner: _owner,\\n depth: _depth,\\n bucketDepth: _bucketDepth,\\n immutableFlag: _immutable,\\n normalisedBalance: normalisedBalance,\\n lastUpdatedBlockNumber: block.number\\n });\\n\\n tree.insert(_batchId, normalisedBalance);\\n\\n emit BatchCreated(_batchId, totalAmount, normalisedBalance, _owner, _depth, _bucketDepth, _immutable);\\n }\\n\\n /**\\n * @notice Top up an existing batch.\\n * @dev At least `_topupAmountPerChunk*2^depth` tokens must be approved in the ERC20 token contract.\\n * @param _batchId The id of an existing batch.\\n * @param _topupAmountPerChunk The amount of additional tokens to add per chunk.\\n */\\n function topUp(bytes32 _batchId, uint256 _topupAmountPerChunk) external whenNotPaused {\\n Batch memory batch = batches[_batchId];\\n\\n if (batch.owner == address(0)) {\\n revert BatchDoesNotExist();\\n }\\n\\n if (batch.normalisedBalance <= currentTotalOutPayment()) {\\n revert BatchExpired();\\n }\\n\\n if (batch.depth <= minimumBucketDepth) {\\n revert BatchTooSmall();\\n }\\n\\n if (remainingBalance(_batchId) + (_topupAmountPerChunk) < minimumInitialBalancePerChunk()) {\\n revert InsufficientBalance();\\n }\\n\\n // per chunk balance multiplied by the batch size in chunks must be transferred from the sender\\n uint256 totalAmount = _topupAmountPerChunk * (1 << batch.depth);\\n if (!ERC20(bzzToken).transferFrom(msg.sender, address(this), totalAmount)) {\\n revert TransferFailed();\\n }\\n\\n // update by removing batch and then reinserting\\n tree.remove(_batchId, batch.normalisedBalance);\\n batch.normalisedBalance = batch.normalisedBalance + (_topupAmountPerChunk);\\n tree.insert(_batchId, batch.normalisedBalance);\\n\\n batches[_batchId].normalisedBalance = batch.normalisedBalance;\\n emit BatchTopUp(_batchId, totalAmount, batch.normalisedBalance);\\n }\\n\\n /**\\n * @notice Increase the depth of an existing batch.\\n * @dev Can only be called by the owner of the batch.\\n * @param _batchId the id of an existing batch.\\n * @param _newDepth the new (larger than the previous one) depth for this batch.\\n */\\n function increaseDepth(bytes32 _batchId, uint8 _newDepth) external whenNotPaused {\\n Batch memory batch = batches[_batchId];\\n\\n if (batch.owner != msg.sender) {\\n revert NotBatchOwner();\\n }\\n\\n if (!(minimumBucketDepth < _newDepth && batch.depth < _newDepth)) {\\n revert DepthNotIncreasing();\\n }\\n\\n if (batch.normalisedBalance <= currentTotalOutPayment()) {\\n revert BatchExpired();\\n }\\n\\n uint8 depthChange = _newDepth - batch.depth;\\n uint256 newRemainingBalance = remainingBalance(_batchId) / (1 << depthChange);\\n\\n if (newRemainingBalance < minimumInitialBalancePerChunk()) {\\n revert InsufficientBalance();\\n }\\n\\n expireLimited(type(uint256).max);\\n validChunkCount += (1 << _newDepth) - (1 << batch.depth);\\n tree.remove(_batchId, batch.normalisedBalance);\\n batches[_batchId].depth = _newDepth;\\n batches[_batchId].lastUpdatedBlockNumber = block.number;\\n\\n batch.normalisedBalance = currentTotalOutPayment() + newRemainingBalance;\\n batches[_batchId].normalisedBalance = batch.normalisedBalance;\\n tree.insert(_batchId, batch.normalisedBalance);\\n\\n emit BatchDepthIncrease(_batchId, _newDepth, batch.normalisedBalance);\\n }\\n\\n /**\\n * @notice Set a new price.\\n * @dev Can only be called by the price oracle role.\\n * @param _price The new price.\\n */\\n function setPrice(uint256 _price) external {\\n if (!hasRole(PRICE_ORACLE_ROLE, msg.sender)) {\\n revert PriceOracleOnly();\\n }\\n\\n if (lastPrice != 0) {\\n totalOutPayment = currentTotalOutPayment();\\n }\\n\\n lastPrice = uint64(_price);\\n lastUpdatedBlock = uint64(block.number);\\n\\n emit PriceUpdate(_price);\\n }\\n\\n function setMinimumValidityBlocks(uint64 _value) external {\\n if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert AdministratorOnly();\\n }\\n\\n minimumValidityBlocks = _value;\\n }\\n\\n /**\\n * @notice Reclaims a limited number of expired batches\\n * @dev Can be used if reclaiming all expired batches would exceed the block gas limit, causing other\\n * contract method calls to fail.\\n * @param limit The maximum number of batches to expire.\\n */\\n function expireLimited(uint256 limit) public {\\n // the lower bound of the normalised balance for which we will check if batches have expired\\n uint256 _lastExpiryBalance = lastExpiryBalance;\\n uint256 i;\\n for (i; i < limit; ) {\\n if (isBatchesTreeEmpty()) {\\n lastExpiryBalance = currentTotalOutPayment();\\n break;\\n }\\n // get the batch with the smallest normalised balance\\n bytes32 fbi = firstBatchId();\\n // if the batch with the smallest balance has not yet expired\\n // we have already reached the end of the batches we need\\n // to expire, so exit the loop\\n if (remainingBalance(fbi) > 0) {\\n // the upper bound of the normalised balance for which we will check if batches have expired\\n // value is updated when there are no expired batches left\\n lastExpiryBalance = currentTotalOutPayment();\\n break;\\n }\\n // otherwise, the batch with the smallest balance has expired,\\n // so we must remove the chunks this batch contributes to the global validChunkCount\\n Batch memory batch = batches[fbi];\\n uint256 batchSize = 1 << batch.depth;\\n\\n if (validChunkCount < batchSize) {\\n revert InsufficienChunkCount();\\n }\\n validChunkCount -= batchSize;\\n // since the batch expired _during_ the period we must add\\n // remaining normalised payout for this batch only\\n pot += batchSize * (batch.normalisedBalance - _lastExpiryBalance);\\n tree.remove(fbi, batch.normalisedBalance);\\n delete batches[fbi];\\n\\n unchecked {\\n ++i;\\n }\\n }\\n // then, for all batches that have _not_ expired during the period\\n // add the total normalised payout of all batches\\n // multiplied by the remaining total valid chunk count\\n // to the pot for the period since the last expiry\\n\\n if (lastExpiryBalance < _lastExpiryBalance) {\\n revert TotalOutpaymentDecreased();\\n }\\n\\n // then, for all batches that have _not_ expired during the period\\n // add the total normalised payout of all batches\\n // multiplied by the remaining total valid chunk count\\n // to the pot for the period since the last expiry\\n pot += validChunkCount * (lastExpiryBalance - _lastExpiryBalance);\\n }\\n\\n /**\\n * @notice The current pot.\\n */\\n function totalPot() public returns (uint256) {\\n expireLimited(type(uint256).max);\\n uint256 balance = ERC20(bzzToken).balanceOf(address(this));\\n return pot < balance ? pot : balance;\\n }\\n\\n /**\\n * @notice Withdraw the pot, authorised callers only.\\n * @param beneficiary Recieves the current total pot.\\n */\\n\\n function withdraw(address beneficiary) external {\\n if (!hasRole(REDISTRIBUTOR_ROLE, msg.sender)) {\\n revert OnlyRedistributor();\\n }\\n\\n uint256 totalAmount = totalPot();\\n if (!ERC20(bzzToken).transfer(beneficiary, totalAmount)) {\\n revert TransferFailed();\\n }\\n\\n emit PotWithdrawn(beneficiary, totalAmount);\\n pot = 0;\\n }\\n\\n /**\\n * @notice Pause the contract.\\n * @dev Can only be called by the pauser when not paused.\\n * The contract can be provably stopped by renouncing the pauser role and the admin role once paused.\\n */\\n function pause() public {\\n if (!hasRole(PAUSER_ROLE, msg.sender)) {\\n revert OnlyPauser();\\n }\\n _pause();\\n }\\n\\n /**\\n * @notice Unpause the contract.\\n * @dev Can only be called by the pauser role while paused.\\n */\\n function unPause() public {\\n if (!hasRole(PAUSER_ROLE, msg.sender)) {\\n revert OnlyPauser();\\n }\\n\\n _unpause();\\n }\\n\\n ////////////////////////////////////////\\n // STATE READING //\\n ////////////////////////////////////////\\n\\n /**\\n * @notice Total per-chunk cost since the contract's deployment.\\n * @dev Returns the total normalised all-time per chunk payout.\\n * Only Batches with a normalised balance greater than this are valid.\\n */\\n function currentTotalOutPayment() public view returns (uint256) {\\n uint256 blocks = block.number - lastUpdatedBlock;\\n uint256 increaseSinceLastUpdate = lastPrice * (blocks);\\n return totalOutPayment + (increaseSinceLastUpdate);\\n }\\n\\n function minimumInitialBalancePerChunk() public view returns (uint256) {\\n return minimumValidityBlocks * lastPrice;\\n }\\n\\n /**\\n * @notice Return the per chunk balance not yet used up.\\n * @param _batchId The id of an existing batch.\\n */\\n function remainingBalance(bytes32 _batchId) public view returns (uint256) {\\n Batch memory batch = batches[_batchId];\\n\\n if (batch.owner == address(0)) {\\n revert BatchDoesNotExist(); // Batch does not exist or expired\\n }\\n\\n if (batch.normalisedBalance <= currentTotalOutPayment()) {\\n return 0;\\n }\\n\\n return batch.normalisedBalance - currentTotalOutPayment();\\n }\\n\\n /**\\n * @notice Indicates whether expired batches exist.\\n */\\n function expiredBatchesExist() public view returns (bool) {\\n if (isBatchesTreeEmpty()) {\\n return false;\\n }\\n return (remainingBalance(firstBatchId()) <= 0);\\n }\\n\\n /**\\n * @notice Return true if no batches exist\\n */\\n function isBatchesTreeEmpty() public view returns (bool) {\\n return tree.count() == 0;\\n }\\n\\n /**\\n * @notice Get the first batch id ordered by ascending normalised balance.\\n * @dev If more than one batch id, return index at 0, if no batches, revert.\\n */\\n function firstBatchId() public view returns (bytes32) {\\n uint256 val = tree.first();\\n if (val == 0) {\\n revert NoBatchesExist();\\n }\\n return tree.valueKeyAtIndex(val, 0);\\n }\\n\\n function batchOwner(bytes32 _batchId) public view returns (address) {\\n return batches[_batchId].owner;\\n }\\n\\n function batchDepth(bytes32 _batchId) public view returns (uint8) {\\n return batches[_batchId].depth;\\n }\\n\\n function batchBucketDepth(bytes32 _batchId) public view returns (uint8) {\\n return batches[_batchId].bucketDepth;\\n }\\n\\n function batchImmutableFlag(bytes32 _batchId) public view returns (bool) {\\n return batches[_batchId].immutableFlag;\\n }\\n\\n function batchNormalisedBalance(bytes32 _batchId) public view returns (uint256) {\\n return batches[_batchId].normalisedBalance;\\n }\\n\\n function batchLastUpdatedBlockNumber(bytes32 _batchId) public view returns (uint256) {\\n return batches[_batchId].lastUpdatedBlockNumber;\\n }\\n}\\n\",\"keccak256\":\"0x0e55340aa9a37b3f3c7c66e37ee26bbafa2ce5416f233d59067a0441aaf2df7f\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x60e060405260098054600160401b600160801b03191669438000000000000000001790553480156200003057600080fd5b506040516200399c3803806200399c8339810160408190526200005391620001c4565b600180546001600160b01b0319166101006001600160a01b0385160260ff60a81b191617600160a81b60ff8416021790557f1337d7d57528a8879766fdf2d0456253114c66c4fc263c97168bfdb007c64c666080527f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a60a0527f3e35b14a9f4fef84b59f9bdcd3044fc28783144b7e42bfb2cd075e6a02cb082860c052620000fd60003362000114565b60a0516200010c903362000114565b505062000213565b62000120828262000124565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000120576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001803390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008060408385031215620001d857600080fd5b82516001600160a01b0381168114620001f057600080fd5b602084015190925060ff811681146200020857600080fd5b809150509250929050565b60805160a05160c05161373d6200025f6000396000818161059d0152611080015260008181610740015281816117a20152611d200152600081816105eb0152611893015261373d6000f3fe608060405234801561001057600080fd5b50600436106102e95760003560e01c806381e508b911610191578063b998902f116100e3578063dd483cfb11610097578063ea612e1f11610071578063ea612e1f14610762578063f7b188a51461076b578063f90ce5ba1461077357600080fd5b8063dd483cfb146106f8578063df67438514610718578063e63ab1e91461073b57600080fd5b8063d547741f116100c8578063d547741f146106a8578063d71ba7c4146106bb578063d968f44b146106ce57600080fd5b8063b998902f146105e6578063c81e25ab1461060d57600080fd5b806391b7f5ed11610145578063a6471a1d1161011f578063a6471a1d14610598578063a81064ee146105bf578063b67644b9146105d357600080fd5b806391b7f5ed1461054657806391d1485414610559578063a217fddf1461059057600080fd5b80638a5e8e32116101765780638a5e8e321461052d5780638b82547f14610536578063906978421461053e57600080fd5b806381e508b9146105015780638456cb591461052557600080fd5b806336568abe1161024a57806351b17cd0116101fe5780635c975abb116101d85780635c975abb146104db578063628de877146104e6578063711bfa2b146104f957600080fd5b806351b17cd0146104ad57806351cff8d9146104b55780635239af71146104c857600080fd5b806344beae8e1161022f57806344beae8e1461046757806347aab79b146104915780634ba2363a146104a457600080fd5b806336568abe1461043c578063420fc4db1461044f57600080fd5b80632182ddb1116102a157806324b570a91161028657806324b570a9146103e55780632f2ff15d146103ed57806332ac57dd1461040057600080fd5b80632182ddb114610373578063248a9ca3146103b457600080fd5b80631889b99b116102d25780631889b99b1461034357806318c8572f1461034b5780631a37b4851461036057600080fd5b806301ffc9a7146102ee578063053f14da14610316575b600080fd5b6103016102fc36600461331c565b61078e565b60405190151581526020015b60405180910390f35b60095461032a9067ffffffffffffffff1681565b60405167ffffffffffffffff909116815260200161030d565b610301610827565b61035e610359366004613394565b610839565b005b61035e61036e3660046133fe565b610b6f565b61039c610381366004613428565b6000908152600260205260409020546001600160a01b031690565b6040516001600160a01b03909116815260200161030d565b6103d76103c2366004613428565b60009081526020819052604090206001015490565b60405190815260200161030d565b6103d7610c05565b61035e6103fb366004613441565b610cb8565b61042a61040e366004613428565b600090815260026020526040902054600160a81b900460ff1690565b60405160ff909116815260200161030d565b61035e61044a366004613441565b610ce2565b60015461039c9061010090046001600160a01b031681565b61042a610475366004613428565b600090815260026020526040902054600160a01b900460ff1690565b61035e61049f36600461346d565b610d73565b6103d760075481565b6103d7611026565b61035e6104c3366004613490565b61107e565b6103d76104d6366004613394565b6111fb565b60015460ff16610301565b61035e6104f4366004613428565b611559565b610301611777565b6103d761050f366004613428565b6000908152600260208190526040909120015490565b61035e6117a0565b6103d760065481565b6103d7611803565b6103d7611859565b61035e610554366004613428565b611891565b610301610567366004613441565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6103d7600081565b6103d77f000000000000000000000000000000000000000000000000000000000000000081565b60015461042a90600160a81b900460ff1681565b61035e6105e13660046134ab565b6119a0565b6103d77f000000000000000000000000000000000000000000000000000000000000000081565b61066861061b366004613428565b60026020819052600091825260409091208054600182015491909201546001600160a01b0383169260ff600160a01b8204811693600160a81b8304821693600160b01b9093049091169186565b604080516001600160a01b0397909716875260ff9586166020880152939094169285019290925215156060840152608083015260a082015260c00161030d565b61035e6106b6366004613441565b611c34565b6103d76106c9366004613428565b611c59565b6103016106dc366004613428565b600090815260026020526040902054600160b01b900460ff1690565b60095461032a9068010000000000000000900467ffffffffffffffff1681565b6103d7610726366004613428565b60009081526002602052604090206001015490565b6103d77f000000000000000000000000000000000000000000000000000000000000000081565b6103d760085481565b61035e611d1e565b60095461032a90600160801b900467ffffffffffffffff1681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061082157507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60006108336003611d7f565b15919050565b610841611d8f565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661089057604051635844c9e760e11b815260040160405180910390fd5b6001600160a01b0386166108b75760405163d92e233d60e01b815260040160405180910390fd5b60ff831615806108cd57508360ff168360ff1610155b156108eb57604051630a0b2c3560e41b815260040160405180910390fd5b6000828152600260205260409020546001600160a01b031615610921576040516311ab459f60e21b815260040160405180910390fd5b6000610933600160ff87161b876134e3565b6001546040516323b872dd60e01b81523360048201523060248201526044810183905291925061010090046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b491906134fa565b6109d1576040516312171d8360e31b815260040160405180910390fd5b6000866109dc611026565b6109e69190613517565b905080600003610a095760405163334ab3f560e11b815260040160405180910390fd5b610a14600019611559565b8560ff166001901b60066000828254610a2d9190613517565b90915550506040805160c0810182526001600160a01b03808b16825260ff808a1660208085019182528a831685870190815289151560608701908152608087018981524360a0890190815260008e815260029586905299909920975188549551935192511515600160b01b0260ff60b01b19938816600160a81b029390931661ffff60a81b1994909716600160a01b0274ffffffffffffffffffffffffffffffffffffffffff19909616971696909617939093171692909217178355905160018301559151910155610b0160038583611de2565b60408051838152602081018390526001600160a01b038a168183015260ff88811660608301528716608082015284151560a0820152905185917f9b088e2c89b322a3c1d81515e1c88db3d386d022926f0e2d0b9b5813b7413d58919081900360c00190a25050505050505050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610bbe57604051635844c9e760e11b815260040160405180910390fd5b6009805467ffffffffffffffff90921668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff909216919091179055565b6000610c12600019611559565b6001546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009161010090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610c79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9d919061352a565b90508060075410610cae5780610cb2565b6007545b91505090565b600082815260208190526040902060010154610cd381611fe5565b610cdd8383611ff2565b505050565b6001600160a01b0381163314610d655760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610d6f8282612090565b5050565b610d7b611d8f565b600082815260026020818152604092839020835160c08101855281546001600160a01b03811680835260ff600160a01b8304811695840195909552600160a81b8204851696830196909652600160b01b900490921615156060830152600181015460808301529091015460a0820152903314610e23576040517fb72bcb2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015460ff808416600160a81b90920416108015610e4a57508160ff16816020015160ff16105b610e80576040517fd5fd03fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e88611026565b816080015111610eab576040516368aebbc560e01b815260040160405180910390fd5b6000816020015183610ebd9190613543565b90506000600160ff83161b610ed186611c59565b610edb919061355c565b9050610ee5611859565b811015610f0557604051631e9acf1760e31b815260040160405180910390fd5b610f10600019611559565b826020015160ff166001901b8460ff166001901b610f2e919061357e565b60066000828254610f3f9190613517565b90915550506080830151610f5790600390879061210f565b600085815260026020819052604090912080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b60ff8816021781554391015580610fa6611026565b610fb09190613517565b6080840181815260008781526002602052604090206001019190915551610fdb906003908790611de2565b60808301516040805160ff87168152602081019290925286917faf27998ec15e9d3809edad41aec1b5551d8412e71bd07c91611a0237ead1dc8e910160405180910390a25050505050565b600954600090819061104990600160801b900467ffffffffffffffff164361357e565b60095490915060009061106790839067ffffffffffffffff166134e3565b9050806005546110779190613517565b9250505090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff166110f0576040517f24876df800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006110fa610c05565b6001546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018490529293506101009091049091169063a9059cbb906044016020604051808303816000875af115801561116f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119391906134fa565b6111b0576040516312171d8360e31b815260040160405180910390fd5b604080516001600160a01b0384168152602081018390527ff5d8f9b1e7af440e1e7915f4693ccc004d1461a7dafd17ea7347d03decf298e1910160405180910390a150506000600755565b6000611205611d8f565b6001600160a01b03871661122c5760405163d92e233d60e01b815260040160405180910390fd5b60ff8416158061124b575060015460ff600160a81b9091048116908516105b8061125c57508460ff168460ff1610155b1561127a57604051630a0b2c3560e41b815260040160405180910390fd5b6040805133602082015290810184905260009060600160408051601f198184030181529181528151602092830120600081815260029093529120549091506001600160a01b0316156112df576040516311ab459f60e21b815260040160405180910390fd5b6112e7611859565b87101561130757604051631e9acf1760e31b815260040160405180910390fd5b6000611319600160ff89161b896134e3565b6001546040516323b872dd60e01b81523360048201523060248201526044810183905291925061010090046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611376573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139a91906134fa565b6113b7576040516312171d8360e31b815260040160405180910390fd5b6000886113c2611026565b6113cc9190613517565b9050806000036113ef5760405163334ab3f560e11b815260040160405180910390fd5b6113fa600019611559565b8760ff166001901b600660008282546114139190613517565b90915550506040805160c0810182526001600160a01b03808d16825260ff808c1660208085019182528c83168587019081528b151560608701908152608087018981524360a0890190815260008d815260029586905299909920975188549551935192511515600160b01b0260ff60b01b19938816600160a81b029390931661ffff60a81b1994909716600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199096169716969096179390931716929092171783559051600183015591519101556114e760038483611de2565b60408051838152602081018390526001600160a01b038c168183015260ff8a811660608301528916608082015286151560a0820152905184917f9b088e2c89b322a3c1d81515e1c88db3d386d022926f0e2d0b9b5813b7413d58919081900360c00190a2509098975050505050505050565b60085460005b828110156117055761156f610827565b156115845761157c611026565b600855611705565b600061158e611803565b9050600061159b82611c59565b11156115b2576115a9611026565b60085550611705565b600081815260026020818152604092839020835160c08101855281546001600160a01b038116825260ff600160a01b82048116948301859052600160a81b8204811696830196909652600160b01b900490941615156060850152600180820154608086015292015460a084015260065491901b9081111561165f576040517f9b02220b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060066000828254611671919061357e565b9091555050608082015161168690869061357e565b61169090826134e3565b600760008282546116a19190613517565b909155505060808201516116b990600390859061210f565b50506000908152600260208190526040822080547fffffffffffffffffff000000000000000000000000000000000000000000000016815560018082018490559101919091550161155f565b816008541015611741576040517f530da97a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160085461174f919061357e565b60065461175c91906134e3565b6007600082825461176d9190613517565b9091555050505050565b6000611781610827565b1561178c5750600090565b60006117996106c9611803565b1115905090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff166117f957604051631d77d47760e21b815260040160405180910390fd5b611801612460565b565b60008061181060036124b4565b90508060000361184c576040517f46c83ec800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610cb260038260006124fb565b6009546000906118829067ffffffffffffffff8082169168010000000000000000900416613591565b67ffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff16611903576040517fea0f601b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60095467ffffffffffffffff16156119215761191d611026565b6005555b600980544367ffffffffffffffff908116600160801b027fffffffffffffffff0000000000000000ffffffffffffffff0000000000000000909216908416171790556040517fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a906119959083815260200190565b60405180910390a150565b6119a8611d8f565b600082815260026020818152604092839020835160c08101855281546001600160a01b03811680835260ff600160a01b8304811695840195909552600160a81b8204851696830196909652600160b01b900490921615156060830152600181015460808301529091015460a082015290611a3557604051634ee9bc0f60e01b815260040160405180910390fd5b611a3d611026565b816080015111611a60576040516368aebbc560e01b815260040160405180910390fd5b600154602082015160ff600160a81b9092048216911611611aad576040517f7103b80500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ab5611859565b82611abf85611c59565b611ac99190613517565b1015611ae857604051631e9acf1760e31b815260040160405180910390fd5b6000816020015160ff166001901b83611b0191906134e3565b6001546040516323b872dd60e01b81523360048201523060248201526044810183905291925061010090046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611b5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8291906134fa565b611b9f576040516312171d8360e31b815260040160405180910390fd5b6080820151611bb290600390869061210f565b828260800151611bc29190613517565b60808301819052611bd7906003908690611de2565b60808201805160008681526002602090815260409182902060010192909255915182518481529182015285917faf5756c62d6c0722ef9be1f82bef97ab06ea5aea7f3eb8ad348422079f01d88d910160405180910390a250505050565b600082815260208190526040902060010154611c4f81611fe5565b610cdd8383612090565b6000818152600260208181526040808420815160c08101835281546001600160a01b03811680835260ff600160a01b8304811696840196909652600160a81b8204861694830194909452600160b01b900490931615156060840152600181015460808401529092015460a082015290611ce557604051634ee9bc0f60e01b815260040160405180910390fd5b611ced611026565b816080015111611d005750600092915050565b611d08611026565b8160800151611d17919061357e565b9392505050565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff16611d7757604051631d77d47760e21b815260040160405180910390fd5b61180161255d565b6000610821828360000154612596565b60015460ff16156118015760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610d5c565b80611e00576040516363868c5560e11b815260040160405180910390fd5b611e0b8383836125c2565b15611e42576040517f6082d5c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82546000905b8015611f265780915080831015611e72576000908152600180860160205260409091200154611efd565b80831115611e93576000908152600185016020526040902060020154611efd565b808303611efd576000818152600180870160209081526040832060040180548084018255818552918420909101879055918390529054611ed3919061357e565b60009182526001909501602090815260408083209583526005909501905292909220929092555050565b60008281526001860160205260408120600601805491611f1c836135bd565b9190505550611e48565b600083815260018087016020908152604083208581558083018490556002810184905560038101805460ff1916841790556004810180548085018255818652929094209091018790559154611f7b919061357e565b600086815260058301602052604090205582611f9957838655611fd3565b82841015611fbc5760008381526001808801602052604090912001849055611fd3565b600083815260018701602052604090206002018490555b611fdd8685612628565b505050505050565b611fef8133612890565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610d6f576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561204c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610d6f576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8061212d576040516363868c5560e11b815260040160405180910390fd5b6121388383836125c2565b61215557604051635889b1c560e11b815260040160405180910390fd5b600081815260018085016020908152604080842086855260058101909252832054600482018054929491939192909161218d9161357e565b8154811061219d5761219d6135d6565b90600052602060002001549050808360040183815481106121c0576121c06135d6565b60009182526020808320909101929092558281526005850190915260409020829055600483018054806121f5576121f56135ec565b6001900381819060005260206000200160009055905560008084600401805490506000036124565760008681526001808a0160205260409091200154158061224e57506000868152600189016020526040902060020154155b1561225a5750846122a2565b5060008581526001880160205260409020600201545b60008181526001808a0160205260409091200154156122a2576000908152600180890160205260409091200154612270565b60008181526001808a0160205260409091200154156122d65760008181526001808a016020526040909120015491506122ed565b600081815260018901602052604090206002015491505b6000818152600189016020526040808220548483529120819055801561235d5760008181526001808b016020526040909120015482036123425760008181526001808b01602052604090912001839055612361565b600081815260018a0160205260409020600201839055612361565b8289555b600082815260018a01602052604090206003015460ff16158783146123f45761238b8a848a612903565b600088815260018b8101602052604080832080830154878552828520938401819055845281842087905560028082015490840181905584529083208690556003908101549286905201805460ff191660ff90921615159190911790559196916123f48a8961297c565b8015612404576124048a856129e9565b61240e8a8361297c565b60008381526001808c01602052604082208281559081018290556002810182905560038101805460ff191690559061244960048301826132ea565b6006820160009055505050505b5050505050505050565b612468611d8f565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b8054806124c357506000919050565b5b6000818152600180840160205260409091200154156124f65760009081526001808301602052604090912001546124c4565b919050565b60006125078484612e02565b61252457604051635889b1c560e11b815260040160405180910390fd5b60008381526001850160205260409020600401805483908110612549576125496135d6565b906000526020600020015490509392505050565b612565612e48565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33612497565b60008181526001830160205260408120600681015460048201546125ba9190613517565b949350505050565b60006125ce8483612e02565b6125da57506000611d17565b600082815260018501602090815260408083208684526005810190925290912054600490910180548592908110612613576126136135d6565b90600052602060002001541490509392505050565b60005b825482148015906126555750600082815260018401602052604080822054825290206003015460ff165b1561286e57600082815260018085016020526040808320548084528184205484529220015481036127765760008181526001850160205260408082205482528082206002015480835291206003015490925060ff16156126fd576000818152600180860160205260408083206003808201805460ff19908116909155878652838620820180548216905582548652928520018054909216909217905590829052549250612868565b60008181526001850160205260409020600201548303612724578092506127248484612e9a565b50600082815260018085016020526040808320548084528184206003808201805460ff19908116909155825487529386200180549093169093179091559182905254612771908590613017565b612868565b6000818152600180860160205260408083205483528083209091015480835291206003015490925060ff16156127f4576000818152600180860160205260408083206003808201805460ff19908116909155878652838620820180548216905582548652928520018054909216909217905590829052549250612868565b6000818152600180860160205260409091200154830361281b5780925061281b8484613017565b50600082815260018085016020526040808320548084528184206003808201805460ff19908116909155825487529386200180549093169093179091559182905254612868908590612e9a565b5061262b565b505080546000908152600190910160205260409020600301805460ff19169055565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610d6f576128c1816130f7565b6128cc836020613109565b6040516020016128dd929190613626565b60408051601f198184030181529082905262461bcd60e51b8252610d5c916004016136a7565b60008181526001840160205260408082205484835291208190558061292a57828455612976565b6000818152600180860160205260409091200154820361295f5760008181526001808601602052604090912001839055612976565b600081815260018501602052604090206002018390555b50505050565b8015610d6f5760008181526001830160205260409020600201546129a1908390612596565b60008281526001808501602052604090912001546129c0908490612596565b6129ca9190613517565b600091825260018301602052604090912060068101919091555461297c565b60005b82548214801590612a115750600082815260018401602052604090206003015460ff16155b15612de35760008281526001808501602052604080832054808452922001548303612c0c5760008181526001850160205260408082206002015480835291206003015490925060ff1615612ab4576000828152600180860160205260408083206003908101805460ff19908116909155858552919093209092018054909216179055612a9d8482612e9a565b600081815260018501602052604090206002015491505b60008281526001808601602052604080832090910154825290206003015460ff16158015612aff5750600082815260018501602052604080822060020154825290206003015460ff16155b15612b2c57600082815260018581016020526040909120600301805460ff19169091179055915081612ddd565b600082815260018501602052604080822060020154825290206003015460ff16612ba9576000828152600180860160205260408083208083015484529083206003908101805460ff1990811690915593869052018054909216179055612b928483613017565b600081815260018501602052604090206002015491505b600081815260018501602052604080822060039081018054868552838520808401805460ff909316151560ff199384161790558254821690925560029091015484529190922090910180549091169055612c038482612e9a565b83549250612ddd565b6000818152600180860160205260408083209091015480835291206003015490925060ff1615612c8b576000828152600180860160205260408083206003908101805460ff19908116909155858552919093209092018054909216179055612c748482613017565b600081815260018086016020526040909120015491505b600082815260018501602052604080822060020154825290206003015460ff16158015612cd6575060008281526001808601602052604080832090910154825290206003015460ff16155b15612d0357600082815260018581016020526040909120600301805460ff19169091179055915081612ddd565b60008281526001808601602052604080832090910154825290206003015460ff16612d8257600082815260018086016020526040808320600281015484529083206003908101805460ff1990811690915593869052018054909216179055612d6b8483612e9a565b600081815260018086016020526040909120015491505b60008181526001808601602052604080832060039081018054878652838620808401805460ff909316151560ff19938416179055825482169092559301548452922090910180549091169055612dd88482613017565b835492505b506129ec565b506000908152600190910160205260409020600301805460ff19169055565b600081612e1157506000610821565b82548203612e2157506001610821565b600082815260018401602052604090205415612e3f57506001610821565b50600092915050565b60015460ff166118015760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610d5c565b600081815260018084016020526040808320600281018054915482865292852090930154938590529183905590918015612ee257600081815260018601602052604090208490555b6000838152600186016020526040902082905581612f0257828555612f4e565b60008281526001808701602052604090912001548403612f375760008281526001808701602052604090912001839055612f4e565b600082815260018601602052604090206002018390555b600083815260018087016020526040808320909101869055858252902083815560020154612f7d908690612596565b6000858152600180880160205260409091200154612f9c908790612596565b612fa69190613517565b6000858152600187016020526040808220600601929092558481522060020154612fd1908690612596565b6000848152600180880160205260409091200154612ff0908790612596565b612ffa9190613517565b600093845260019095016020525050604090206006019190915550565b6000818152600180840160205260408083209182018054925483855291842060020154938590528390559091801561305d57600081815260018601602052604090208490555b600083815260018601602052604090208290558161307d578285556130c9565b600082815260018601602052604090206002015484036130b257600082815260018601602052604090206002018390556130c9565b600082815260018087016020526040909120018390555b6000838152600186016020526040808220600290810187905586835291208481550154612f7d908690612596565b60606108216001600160a01b03831660145b606060006131188360026134e3565b613123906002613517565b67ffffffffffffffff81111561313b5761313b6136da565b6040519080825280601f01601f191660200182016040528015613165576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061319c5761319c6135d6565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106131e7576131e76135d6565b60200101906001600160f81b031916908160001a905350600061320b8460026134e3565b613216906001613517565b90505b600181111561329b577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613257576132576135d6565b1a60f81b82828151811061326d5761326d6135d6565b60200101906001600160f81b031916908160001a90535060049490941c93613294816136f0565b9050613219565b508315611d175760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d5c565b5080546000825590600052602060002090810190611fef91905b808211156133185760008155600101613304565b5090565b60006020828403121561332e57600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611d1757600080fd5b80356001600160a01b03811681146124f657600080fd5b803560ff811681146124f657600080fd5b8015158114611fef57600080fd5b60008060008060008060c087890312156133ad57600080fd5b6133b68761335e565b9550602087013594506133cb60408801613375565b93506133d960608801613375565b92506080870135915060a08701356133f081613386565b809150509295509295509295565b60006020828403121561341057600080fd5b813567ffffffffffffffff81168114611d1757600080fd5b60006020828403121561343a57600080fd5b5035919050565b6000806040838503121561345457600080fd5b823591506134646020840161335e565b90509250929050565b6000806040838503121561348057600080fd5b8235915061346460208401613375565b6000602082840312156134a257600080fd5b611d178261335e565b600080604083850312156134be57600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610821576108216134cd565b60006020828403121561350c57600080fd5b8151611d1781613386565b80820180821115610821576108216134cd565b60006020828403121561353c57600080fd5b5051919050565b60ff8281168282160390811115610821576108216134cd565b60008261357957634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610821576108216134cd565b67ffffffffffffffff8181168382160280821691908281146135b5576135b56134cd565b505092915050565b6000600182016135cf576135cf6134cd565b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60005b8381101561361d578181015183820152602001613605565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161365e816017850160208801613602565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161369b816028840160208801613602565b01602801949350505050565b60208152600082518060208401526136c6816040850160208701613602565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b6000816136ff576136ff6134cd565b50600019019056fea2646970667358221220411be42d57a5a9f4b3ff704fbf2eae4df6b8a24c5bc3d29bd000af154f11517364736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102e95760003560e01c806381e508b911610191578063b998902f116100e3578063dd483cfb11610097578063ea612e1f11610071578063ea612e1f14610762578063f7b188a51461076b578063f90ce5ba1461077357600080fd5b8063dd483cfb146106f8578063df67438514610718578063e63ab1e91461073b57600080fd5b8063d547741f116100c8578063d547741f146106a8578063d71ba7c4146106bb578063d968f44b146106ce57600080fd5b8063b998902f146105e6578063c81e25ab1461060d57600080fd5b806391b7f5ed11610145578063a6471a1d1161011f578063a6471a1d14610598578063a81064ee146105bf578063b67644b9146105d357600080fd5b806391b7f5ed1461054657806391d1485414610559578063a217fddf1461059057600080fd5b80638a5e8e32116101765780638a5e8e321461052d5780638b82547f14610536578063906978421461053e57600080fd5b806381e508b9146105015780638456cb591461052557600080fd5b806336568abe1161024a57806351b17cd0116101fe5780635c975abb116101d85780635c975abb146104db578063628de877146104e6578063711bfa2b146104f957600080fd5b806351b17cd0146104ad57806351cff8d9146104b55780635239af71146104c857600080fd5b806344beae8e1161022f57806344beae8e1461046757806347aab79b146104915780634ba2363a146104a457600080fd5b806336568abe1461043c578063420fc4db1461044f57600080fd5b80632182ddb1116102a157806324b570a91161028657806324b570a9146103e55780632f2ff15d146103ed57806332ac57dd1461040057600080fd5b80632182ddb114610373578063248a9ca3146103b457600080fd5b80631889b99b116102d25780631889b99b1461034357806318c8572f1461034b5780631a37b4851461036057600080fd5b806301ffc9a7146102ee578063053f14da14610316575b600080fd5b6103016102fc36600461331c565b61078e565b60405190151581526020015b60405180910390f35b60095461032a9067ffffffffffffffff1681565b60405167ffffffffffffffff909116815260200161030d565b610301610827565b61035e610359366004613394565b610839565b005b61035e61036e3660046133fe565b610b6f565b61039c610381366004613428565b6000908152600260205260409020546001600160a01b031690565b6040516001600160a01b03909116815260200161030d565b6103d76103c2366004613428565b60009081526020819052604090206001015490565b60405190815260200161030d565b6103d7610c05565b61035e6103fb366004613441565b610cb8565b61042a61040e366004613428565b600090815260026020526040902054600160a81b900460ff1690565b60405160ff909116815260200161030d565b61035e61044a366004613441565b610ce2565b60015461039c9061010090046001600160a01b031681565b61042a610475366004613428565b600090815260026020526040902054600160a01b900460ff1690565b61035e61049f36600461346d565b610d73565b6103d760075481565b6103d7611026565b61035e6104c3366004613490565b61107e565b6103d76104d6366004613394565b6111fb565b60015460ff16610301565b61035e6104f4366004613428565b611559565b610301611777565b6103d761050f366004613428565b6000908152600260208190526040909120015490565b61035e6117a0565b6103d760065481565b6103d7611803565b6103d7611859565b61035e610554366004613428565b611891565b610301610567366004613441565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6103d7600081565b6103d77f000000000000000000000000000000000000000000000000000000000000000081565b60015461042a90600160a81b900460ff1681565b61035e6105e13660046134ab565b6119a0565b6103d77f000000000000000000000000000000000000000000000000000000000000000081565b61066861061b366004613428565b60026020819052600091825260409091208054600182015491909201546001600160a01b0383169260ff600160a01b8204811693600160a81b8304821693600160b01b9093049091169186565b604080516001600160a01b0397909716875260ff9586166020880152939094169285019290925215156060840152608083015260a082015260c00161030d565b61035e6106b6366004613441565b611c34565b6103d76106c9366004613428565b611c59565b6103016106dc366004613428565b600090815260026020526040902054600160b01b900460ff1690565b60095461032a9068010000000000000000900467ffffffffffffffff1681565b6103d7610726366004613428565b60009081526002602052604090206001015490565b6103d77f000000000000000000000000000000000000000000000000000000000000000081565b6103d760085481565b61035e611d1e565b60095461032a90600160801b900467ffffffffffffffff1681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061082157507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60006108336003611d7f565b15919050565b610841611d8f565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661089057604051635844c9e760e11b815260040160405180910390fd5b6001600160a01b0386166108b75760405163d92e233d60e01b815260040160405180910390fd5b60ff831615806108cd57508360ff168360ff1610155b156108eb57604051630a0b2c3560e41b815260040160405180910390fd5b6000828152600260205260409020546001600160a01b031615610921576040516311ab459f60e21b815260040160405180910390fd5b6000610933600160ff87161b876134e3565b6001546040516323b872dd60e01b81523360048201523060248201526044810183905291925061010090046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b491906134fa565b6109d1576040516312171d8360e31b815260040160405180910390fd5b6000866109dc611026565b6109e69190613517565b905080600003610a095760405163334ab3f560e11b815260040160405180910390fd5b610a14600019611559565b8560ff166001901b60066000828254610a2d9190613517565b90915550506040805160c0810182526001600160a01b03808b16825260ff808a1660208085019182528a831685870190815289151560608701908152608087018981524360a0890190815260008e815260029586905299909920975188549551935192511515600160b01b0260ff60b01b19938816600160a81b029390931661ffff60a81b1994909716600160a01b0274ffffffffffffffffffffffffffffffffffffffffff19909616971696909617939093171692909217178355905160018301559151910155610b0160038583611de2565b60408051838152602081018390526001600160a01b038a168183015260ff88811660608301528716608082015284151560a0820152905185917f9b088e2c89b322a3c1d81515e1c88db3d386d022926f0e2d0b9b5813b7413d58919081900360c00190a25050505050505050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610bbe57604051635844c9e760e11b815260040160405180910390fd5b6009805467ffffffffffffffff90921668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff909216919091179055565b6000610c12600019611559565b6001546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009161010090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610c79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9d919061352a565b90508060075410610cae5780610cb2565b6007545b91505090565b600082815260208190526040902060010154610cd381611fe5565b610cdd8383611ff2565b505050565b6001600160a01b0381163314610d655760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610d6f8282612090565b5050565b610d7b611d8f565b600082815260026020818152604092839020835160c08101855281546001600160a01b03811680835260ff600160a01b8304811695840195909552600160a81b8204851696830196909652600160b01b900490921615156060830152600181015460808301529091015460a0820152903314610e23576040517fb72bcb2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015460ff808416600160a81b90920416108015610e4a57508160ff16816020015160ff16105b610e80576040517fd5fd03fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e88611026565b816080015111610eab576040516368aebbc560e01b815260040160405180910390fd5b6000816020015183610ebd9190613543565b90506000600160ff83161b610ed186611c59565b610edb919061355c565b9050610ee5611859565b811015610f0557604051631e9acf1760e31b815260040160405180910390fd5b610f10600019611559565b826020015160ff166001901b8460ff166001901b610f2e919061357e565b60066000828254610f3f9190613517565b90915550506080830151610f5790600390879061210f565b600085815260026020819052604090912080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b60ff8816021781554391015580610fa6611026565b610fb09190613517565b6080840181815260008781526002602052604090206001019190915551610fdb906003908790611de2565b60808301516040805160ff87168152602081019290925286917faf27998ec15e9d3809edad41aec1b5551d8412e71bd07c91611a0237ead1dc8e910160405180910390a25050505050565b600954600090819061104990600160801b900467ffffffffffffffff164361357e565b60095490915060009061106790839067ffffffffffffffff166134e3565b9050806005546110779190613517565b9250505090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff166110f0576040517f24876df800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006110fa610c05565b6001546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018490529293506101009091049091169063a9059cbb906044016020604051808303816000875af115801561116f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119391906134fa565b6111b0576040516312171d8360e31b815260040160405180910390fd5b604080516001600160a01b0384168152602081018390527ff5d8f9b1e7af440e1e7915f4693ccc004d1461a7dafd17ea7347d03decf298e1910160405180910390a150506000600755565b6000611205611d8f565b6001600160a01b03871661122c5760405163d92e233d60e01b815260040160405180910390fd5b60ff8416158061124b575060015460ff600160a81b9091048116908516105b8061125c57508460ff168460ff1610155b1561127a57604051630a0b2c3560e41b815260040160405180910390fd5b6040805133602082015290810184905260009060600160408051601f198184030181529181528151602092830120600081815260029093529120549091506001600160a01b0316156112df576040516311ab459f60e21b815260040160405180910390fd5b6112e7611859565b87101561130757604051631e9acf1760e31b815260040160405180910390fd5b6000611319600160ff89161b896134e3565b6001546040516323b872dd60e01b81523360048201523060248201526044810183905291925061010090046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611376573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139a91906134fa565b6113b7576040516312171d8360e31b815260040160405180910390fd5b6000886113c2611026565b6113cc9190613517565b9050806000036113ef5760405163334ab3f560e11b815260040160405180910390fd5b6113fa600019611559565b8760ff166001901b600660008282546114139190613517565b90915550506040805160c0810182526001600160a01b03808d16825260ff808c1660208085019182528c83168587019081528b151560608701908152608087018981524360a0890190815260008d815260029586905299909920975188549551935192511515600160b01b0260ff60b01b19938816600160a81b029390931661ffff60a81b1994909716600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199096169716969096179390931716929092171783559051600183015591519101556114e760038483611de2565b60408051838152602081018390526001600160a01b038c168183015260ff8a811660608301528916608082015286151560a0820152905184917f9b088e2c89b322a3c1d81515e1c88db3d386d022926f0e2d0b9b5813b7413d58919081900360c00190a2509098975050505050505050565b60085460005b828110156117055761156f610827565b156115845761157c611026565b600855611705565b600061158e611803565b9050600061159b82611c59565b11156115b2576115a9611026565b60085550611705565b600081815260026020818152604092839020835160c08101855281546001600160a01b038116825260ff600160a01b82048116948301859052600160a81b8204811696830196909652600160b01b900490941615156060850152600180820154608086015292015460a084015260065491901b9081111561165f576040517f9b02220b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060066000828254611671919061357e565b9091555050608082015161168690869061357e565b61169090826134e3565b600760008282546116a19190613517565b909155505060808201516116b990600390859061210f565b50506000908152600260208190526040822080547fffffffffffffffffff000000000000000000000000000000000000000000000016815560018082018490559101919091550161155f565b816008541015611741576040517f530da97a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160085461174f919061357e565b60065461175c91906134e3565b6007600082825461176d9190613517565b9091555050505050565b6000611781610827565b1561178c5750600090565b60006117996106c9611803565b1115905090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff166117f957604051631d77d47760e21b815260040160405180910390fd5b611801612460565b565b60008061181060036124b4565b90508060000361184c576040517f46c83ec800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610cb260038260006124fb565b6009546000906118829067ffffffffffffffff8082169168010000000000000000900416613591565b67ffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff16611903576040517fea0f601b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60095467ffffffffffffffff16156119215761191d611026565b6005555b600980544367ffffffffffffffff908116600160801b027fffffffffffffffff0000000000000000ffffffffffffffff0000000000000000909216908416171790556040517fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a906119959083815260200190565b60405180910390a150565b6119a8611d8f565b600082815260026020818152604092839020835160c08101855281546001600160a01b03811680835260ff600160a01b8304811695840195909552600160a81b8204851696830196909652600160b01b900490921615156060830152600181015460808301529091015460a082015290611a3557604051634ee9bc0f60e01b815260040160405180910390fd5b611a3d611026565b816080015111611a60576040516368aebbc560e01b815260040160405180910390fd5b600154602082015160ff600160a81b9092048216911611611aad576040517f7103b80500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ab5611859565b82611abf85611c59565b611ac99190613517565b1015611ae857604051631e9acf1760e31b815260040160405180910390fd5b6000816020015160ff166001901b83611b0191906134e3565b6001546040516323b872dd60e01b81523360048201523060248201526044810183905291925061010090046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611b5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8291906134fa565b611b9f576040516312171d8360e31b815260040160405180910390fd5b6080820151611bb290600390869061210f565b828260800151611bc29190613517565b60808301819052611bd7906003908690611de2565b60808201805160008681526002602090815260409182902060010192909255915182518481529182015285917faf5756c62d6c0722ef9be1f82bef97ab06ea5aea7f3eb8ad348422079f01d88d910160405180910390a250505050565b600082815260208190526040902060010154611c4f81611fe5565b610cdd8383612090565b6000818152600260208181526040808420815160c08101835281546001600160a01b03811680835260ff600160a01b8304811696840196909652600160a81b8204861694830194909452600160b01b900490931615156060840152600181015460808401529092015460a082015290611ce557604051634ee9bc0f60e01b815260040160405180910390fd5b611ced611026565b816080015111611d005750600092915050565b611d08611026565b8160800151611d17919061357e565b9392505050565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff16611d7757604051631d77d47760e21b815260040160405180910390fd5b61180161255d565b6000610821828360000154612596565b60015460ff16156118015760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610d5c565b80611e00576040516363868c5560e11b815260040160405180910390fd5b611e0b8383836125c2565b15611e42576040517f6082d5c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82546000905b8015611f265780915080831015611e72576000908152600180860160205260409091200154611efd565b80831115611e93576000908152600185016020526040902060020154611efd565b808303611efd576000818152600180870160209081526040832060040180548084018255818552918420909101879055918390529054611ed3919061357e565b60009182526001909501602090815260408083209583526005909501905292909220929092555050565b60008281526001860160205260408120600601805491611f1c836135bd565b9190505550611e48565b600083815260018087016020908152604083208581558083018490556002810184905560038101805460ff1916841790556004810180548085018255818652929094209091018790559154611f7b919061357e565b600086815260058301602052604090205582611f9957838655611fd3565b82841015611fbc5760008381526001808801602052604090912001849055611fd3565b600083815260018701602052604090206002018490555b611fdd8685612628565b505050505050565b611fef8133612890565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610d6f576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561204c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610d6f576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8061212d576040516363868c5560e11b815260040160405180910390fd5b6121388383836125c2565b61215557604051635889b1c560e11b815260040160405180910390fd5b600081815260018085016020908152604080842086855260058101909252832054600482018054929491939192909161218d9161357e565b8154811061219d5761219d6135d6565b90600052602060002001549050808360040183815481106121c0576121c06135d6565b60009182526020808320909101929092558281526005850190915260409020829055600483018054806121f5576121f56135ec565b6001900381819060005260206000200160009055905560008084600401805490506000036124565760008681526001808a0160205260409091200154158061224e57506000868152600189016020526040902060020154155b1561225a5750846122a2565b5060008581526001880160205260409020600201545b60008181526001808a0160205260409091200154156122a2576000908152600180890160205260409091200154612270565b60008181526001808a0160205260409091200154156122d65760008181526001808a016020526040909120015491506122ed565b600081815260018901602052604090206002015491505b6000818152600189016020526040808220548483529120819055801561235d5760008181526001808b016020526040909120015482036123425760008181526001808b01602052604090912001839055612361565b600081815260018a0160205260409020600201839055612361565b8289555b600082815260018a01602052604090206003015460ff16158783146123f45761238b8a848a612903565b600088815260018b8101602052604080832080830154878552828520938401819055845281842087905560028082015490840181905584529083208690556003908101549286905201805460ff191660ff90921615159190911790559196916123f48a8961297c565b8015612404576124048a856129e9565b61240e8a8361297c565b60008381526001808c01602052604082208281559081018290556002810182905560038101805460ff191690559061244960048301826132ea565b6006820160009055505050505b5050505050505050565b612468611d8f565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b8054806124c357506000919050565b5b6000818152600180840160205260409091200154156124f65760009081526001808301602052604090912001546124c4565b919050565b60006125078484612e02565b61252457604051635889b1c560e11b815260040160405180910390fd5b60008381526001850160205260409020600401805483908110612549576125496135d6565b906000526020600020015490509392505050565b612565612e48565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33612497565b60008181526001830160205260408120600681015460048201546125ba9190613517565b949350505050565b60006125ce8483612e02565b6125da57506000611d17565b600082815260018501602090815260408083208684526005810190925290912054600490910180548592908110612613576126136135d6565b90600052602060002001541490509392505050565b60005b825482148015906126555750600082815260018401602052604080822054825290206003015460ff165b1561286e57600082815260018085016020526040808320548084528184205484529220015481036127765760008181526001850160205260408082205482528082206002015480835291206003015490925060ff16156126fd576000818152600180860160205260408083206003808201805460ff19908116909155878652838620820180548216905582548652928520018054909216909217905590829052549250612868565b60008181526001850160205260409020600201548303612724578092506127248484612e9a565b50600082815260018085016020526040808320548084528184206003808201805460ff19908116909155825487529386200180549093169093179091559182905254612771908590613017565b612868565b6000818152600180860160205260408083205483528083209091015480835291206003015490925060ff16156127f4576000818152600180860160205260408083206003808201805460ff19908116909155878652838620820180548216905582548652928520018054909216909217905590829052549250612868565b6000818152600180860160205260409091200154830361281b5780925061281b8484613017565b50600082815260018085016020526040808320548084528184206003808201805460ff19908116909155825487529386200180549093169093179091559182905254612868908590612e9a565b5061262b565b505080546000908152600190910160205260409020600301805460ff19169055565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610d6f576128c1816130f7565b6128cc836020613109565b6040516020016128dd929190613626565b60408051601f198184030181529082905262461bcd60e51b8252610d5c916004016136a7565b60008181526001840160205260408082205484835291208190558061292a57828455612976565b6000818152600180860160205260409091200154820361295f5760008181526001808601602052604090912001839055612976565b600081815260018501602052604090206002018390555b50505050565b8015610d6f5760008181526001830160205260409020600201546129a1908390612596565b60008281526001808501602052604090912001546129c0908490612596565b6129ca9190613517565b600091825260018301602052604090912060068101919091555461297c565b60005b82548214801590612a115750600082815260018401602052604090206003015460ff16155b15612de35760008281526001808501602052604080832054808452922001548303612c0c5760008181526001850160205260408082206002015480835291206003015490925060ff1615612ab4576000828152600180860160205260408083206003908101805460ff19908116909155858552919093209092018054909216179055612a9d8482612e9a565b600081815260018501602052604090206002015491505b60008281526001808601602052604080832090910154825290206003015460ff16158015612aff5750600082815260018501602052604080822060020154825290206003015460ff16155b15612b2c57600082815260018581016020526040909120600301805460ff19169091179055915081612ddd565b600082815260018501602052604080822060020154825290206003015460ff16612ba9576000828152600180860160205260408083208083015484529083206003908101805460ff1990811690915593869052018054909216179055612b928483613017565b600081815260018501602052604090206002015491505b600081815260018501602052604080822060039081018054868552838520808401805460ff909316151560ff199384161790558254821690925560029091015484529190922090910180549091169055612c038482612e9a565b83549250612ddd565b6000818152600180860160205260408083209091015480835291206003015490925060ff1615612c8b576000828152600180860160205260408083206003908101805460ff19908116909155858552919093209092018054909216179055612c748482613017565b600081815260018086016020526040909120015491505b600082815260018501602052604080822060020154825290206003015460ff16158015612cd6575060008281526001808601602052604080832090910154825290206003015460ff16155b15612d0357600082815260018581016020526040909120600301805460ff19169091179055915081612ddd565b60008281526001808601602052604080832090910154825290206003015460ff16612d8257600082815260018086016020526040808320600281015484529083206003908101805460ff1990811690915593869052018054909216179055612d6b8483612e9a565b600081815260018086016020526040909120015491505b60008181526001808601602052604080832060039081018054878652838620808401805460ff909316151560ff19938416179055825482169092559301548452922090910180549091169055612dd88482613017565b835492505b506129ec565b506000908152600190910160205260409020600301805460ff19169055565b600081612e1157506000610821565b82548203612e2157506001610821565b600082815260018401602052604090205415612e3f57506001610821565b50600092915050565b60015460ff166118015760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610d5c565b600081815260018084016020526040808320600281018054915482865292852090930154938590529183905590918015612ee257600081815260018601602052604090208490555b6000838152600186016020526040902082905581612f0257828555612f4e565b60008281526001808701602052604090912001548403612f375760008281526001808701602052604090912001839055612f4e565b600082815260018601602052604090206002018390555b600083815260018087016020526040808320909101869055858252902083815560020154612f7d908690612596565b6000858152600180880160205260409091200154612f9c908790612596565b612fa69190613517565b6000858152600187016020526040808220600601929092558481522060020154612fd1908690612596565b6000848152600180880160205260409091200154612ff0908790612596565b612ffa9190613517565b600093845260019095016020525050604090206006019190915550565b6000818152600180840160205260408083209182018054925483855291842060020154938590528390559091801561305d57600081815260018601602052604090208490555b600083815260018601602052604090208290558161307d578285556130c9565b600082815260018601602052604090206002015484036130b257600082815260018601602052604090206002018390556130c9565b600082815260018087016020526040909120018390555b6000838152600186016020526040808220600290810187905586835291208481550154612f7d908690612596565b60606108216001600160a01b03831660145b606060006131188360026134e3565b613123906002613517565b67ffffffffffffffff81111561313b5761313b6136da565b6040519080825280601f01601f191660200182016040528015613165576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061319c5761319c6135d6565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106131e7576131e76135d6565b60200101906001600160f81b031916908160001a905350600061320b8460026134e3565b613216906001613517565b90505b600181111561329b577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613257576132576135d6565b1a60f81b82828151811061326d5761326d6135d6565b60200101906001600160f81b031916908160001a90535060049490941c93613294816136f0565b9050613219565b508315611d175760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d5c565b5080546000825590600052602060002090810190611fef91905b808211156133185760008155600101613304565b5090565b60006020828403121561332e57600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611d1757600080fd5b80356001600160a01b03811681146124f657600080fd5b803560ff811681146124f657600080fd5b8015158114611fef57600080fd5b60008060008060008060c087890312156133ad57600080fd5b6133b68761335e565b9550602087013594506133cb60408801613375565b93506133d960608801613375565b92506080870135915060a08701356133f081613386565b809150509295509295509295565b60006020828403121561341057600080fd5b813567ffffffffffffffff81168114611d1757600080fd5b60006020828403121561343a57600080fd5b5035919050565b6000806040838503121561345457600080fd5b823591506134646020840161335e565b90509250929050565b6000806040838503121561348057600080fd5b8235915061346460208401613375565b6000602082840312156134a257600080fd5b611d178261335e565b600080604083850312156134be57600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610821576108216134cd565b60006020828403121561350c57600080fd5b8151611d1781613386565b80820180821115610821576108216134cd565b60006020828403121561353c57600080fd5b5051919050565b60ff8281168282160390811115610821576108216134cd565b60008261357957634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610821576108216134cd565b67ffffffffffffffff8181168382160280821691908281146135b5576135b56134cd565b505092915050565b6000600182016135cf576135cf6134cd565b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60005b8381101561361d578181015183820152602001613605565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161365e816017850160208801613602565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161369b816028840160208801613602565b01602801949350505050565b60208152600082518060208401526136c6816040850160208701613602565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b6000816136ff576136ff6134cd565b50600019019056fea2646970667358221220411be42d57a5a9f4b3ff704fbf2eae4df6b8a24c5bc3d29bd000af154f11517364736f6c63430008130033", "devdoc": { "author": "The Swarm Authors", "details": "The postage stamp contracts allows users to create and manage postage stamp batches. The current balance for each batch is stored ordered in descending order of normalised balance. Balance is normalised to be per chunk and the total spend since the contract was deployed, i.e. when a batch is bought, its per-chunk balance is supplemented with the current cost of storing one chunk since the beginning of time, as if the batch had existed since the contract's inception. During the _expiry_ process, each of these balances is checked against the _currentTotalOutPayment_, a similarly normalised figure that represents the current cost of storing one chunk since the beginning of time. A batch with a normalised balance less than _currentTotalOutPayment_ is treated as expired. The _currentTotalOutPayment_ is calculated using _totalOutPayment_ which is updated during _setPrice_ events so that the applicable per-chunk prices can be charged for the relevant periods of time. This can then be multiplied by the amount of chunks which are allowed to be stamped by each batch to get the actual cost of storage. The amount of chunks a batch can stamp is determined by the _bucketDepth_. A batch may store a maximum of 2^depth chunks. The global figure for the currently allowed chunks is tracked by _validChunkCount_ and updated during batch _expiry_ events.", @@ -1212,9 +1148,6 @@ "BatchTopUp(bytes32,uint256,uint256)": { "details": "Emitted when an existing batch is topped up." }, - "CopyBatchFailed(uint256,bytes32)": { - "details": "Emitted on every batch failed in bulk batch creation" - }, "Paused(address)": { "details": "Emitted when the pause is triggered by `account`." }, @@ -1255,12 +1188,6 @@ "_owner": "Owner of the new batch." } }, - "copyBatchBulk((bytes32,address,uint8,uint8,bool,uint256)[])": { - "details": "Import batches in bulk to lower the number of transactions needed,becase of block limitations 90 batches per trx is ceiling, 60 to 70 sweetspot", - "params": { - "bulkBatches": "array of batches" - } - }, "createBatch(address,uint256,uint8,uint8,bytes32,bool)": { "details": "At least `_initialBalancePerChunk*2^depth` tokens must be approved in the ERC20 token contract.", "params": { @@ -1350,9 +1277,6 @@ "copyBatch(address,uint256,uint8,uint8,bytes32,bool)": { "notice": "Manually create a new batch when facilitating migration, can only be called by the Admin role." }, - "copyBatchBulk((bytes32,address,uint8,uint8,bool,uint256)[])": { - "notice": "Import batches in bulk" - }, "createBatch(address,uint256,uint8,uint8,bytes32,bool)": { "notice": "Create a new batch." }, diff --git a/deployments/testnet/PriceOracle.json b/deployments/testnet/PriceOracle.json index af6ecf04..3effa1bd 100644 --- a/deployments/testnet/PriceOracle.json +++ b/deployments/testnet/PriceOracle.json @@ -1,5 +1,5 @@ { - "address": "0x5d79aA5aE4823f37c72B3736353709e5Ed657D7F", + "address": "0x201dcde5c2D14CE03Fa74b0158488122FcA673B8", "abi": [ { "inputs": [ @@ -439,22 +439,22 @@ "type": "function" } ], - "transactionHash": "0x147d29c46f417dda7f741633cb491eb41aea58b960e973ac4cfc681446256675", + "transactionHash": "0xd7cc96588f0d7b61850fcdb8aca7ea14b524e7b7fbd99e986055d72e24699f11", "receipt": { "to": null, "from": "0xb1C7F17Ed88189Abf269Bf68A3B2Ed83C5276aAe", - "contractAddress": "0x5d79aA5aE4823f37c72B3736353709e5Ed657D7F", + "contractAddress": "0x201dcde5c2D14CE03Fa74b0158488122FcA673B8", "transactionIndex": 27, - "gasUsed": "1218958", - "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000002010000000000000000002000000000040000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000100000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1a923393191c673e43583587b41b1a4d85624bd3b4c5e59cafadb640218b6aea", - "transactionHash": "0x147d29c46f417dda7f741633cb491eb41aea58b960e973ac4cfc681446256675", + "gasUsed": "1218936", + "logsBloom": "0x02000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000010000000000000000002000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000120000000000020000000000000000000000000000000200000000000000000000000000000000000", + "blockHash": "0xbf854e5f691248ccd02e1131e0ea6e7c1215d6804b6d9272435a3566fcfd0283", + "transactionHash": "0xd7cc96588f0d7b61850fcdb8aca7ea14b524e7b7fbd99e986055d72e24699f11", "logs": [ { "transactionIndex": 27, - "blockNumber": 5753675, - "transactionHash": "0x147d29c46f417dda7f741633cb491eb41aea58b960e973ac4cfc681446256675", - "address": "0x5d79aA5aE4823f37c72B3736353709e5Ed657D7F", + "blockNumber": 4594519, + "transactionHash": "0xd7cc96588f0d7b61850fcdb8aca7ea14b524e7b7fbd99e986055d72e24699f11", + "address": "0x201dcde5c2D14CE03Fa74b0158488122FcA673B8", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -462,23 +462,23 @@ "0x000000000000000000000000b1c7f17ed88189abf269bf68a3b2ed83c5276aae" ], "data": "0x", - "logIndex": 62, - "blockHash": "0x1a923393191c673e43583587b41b1a4d85624bd3b4c5e59cafadb640218b6aea" + "logIndex": 67, + "blockHash": "0xbf854e5f691248ccd02e1131e0ea6e7c1215d6804b6d9272435a3566fcfd0283" } ], - "blockNumber": 5753675, - "cumulativeGasUsed": "4208333", + "blockNumber": 4594519, + "cumulativeGasUsed": "5513662", "status": 1, "byzantium": true }, "args": [ - "0xb2C3CD6cA7917265faFc70C847F9202aB23f651F" + "0x794532C50c6EfA070Cd206b82178E98433046996" ], - "numDeployments": 2, - "solcInputHash": "72863154353a753995d89fd6bb12e809", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_postageStamp\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CallerNotAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotPriceUpdater\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PriceAlreadyAdjusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedZero\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"PriceUpdate\",\"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\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PRICE_UPDATER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"redundancy\",\"type\":\"uint16\"}],\"name\":\"adjustPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"changeRate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentPrice\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentPriceUpScaled\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentRound\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"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\":[],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAdjustedRound\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumPrice\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumPriceUpscaled\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"postageStamp\",\"outputs\":[{\"internalType\":\"contract IPostageStamp\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceBase\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"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\":\"uint32\",\"name\":\"_price\",\"type\":\"uint32\"}],\"name\":\"setPrice\",\"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\":[],\"name\":\"unPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"The Swarm Authors.\",\"details\":\"The price oracle contract emits a price feed using events.\",\"events\":{\"PriceUpdate(uint256)\":{\"details\":\"Emitted on every price update.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"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`.\"},\"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.\"},\"setPrice(uint32)\":{\"details\":\"Can only be called by the admin role.\",\"params\":{\"_price\":\"The new price.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"title\":\"PriceOracle contract.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"currentPrice()\":{\"notice\":\"Return the price downscaled\"},\"currentRound()\":{\"notice\":\"Return the number of the current round.\"},\"minimumPrice()\":{\"notice\":\"Return the price downscaled\"},\"setPrice(uint32)\":{\"notice\":\"Manually set the price.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/PriceOracle.sol\":\"PriceOracle\"},\"evmVersion\":\"paris\",\"libraries\":{\":__CACHE_BREAKER__\":\"0x00000000d41867734bbee4c6863d9255b2b06ac1\"},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"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/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\"},\"src/PriceOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.19;\\nimport \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\nimport \\\"./interface/IPostageStamp.sol\\\";\\n\\n/**\\n * @title PriceOracle contract.\\n * @author The Swarm Authors.\\n * @dev The price oracle contract emits a price feed using events.\\n */\\n\\ncontract PriceOracle is AccessControl {\\n // ----------------------------- State variables ------------------------------\\n\\n // The address of the linked PostageStamp contract\\n IPostageStamp public postageStamp;\\n\\n uint16 targetRedundancy = 4;\\n uint16 maxConsideredExtraRedundancy = 4;\\n\\n // When the contract is paused, price changes are not effective\\n bool public isPaused = false;\\n\\n // The number of the last round price adjusting happend\\n uint64 public lastAdjustedRound;\\n\\n // The minimum price allowed\\n uint32 public minimumPriceUpscaled = 24000 << 10; // we upscale it by 2^10\\n\\n // The priceBase to modulate the price\\n uint32 public priceBase = 524288;\\n\\n uint64 public currentPriceUpScaled = minimumPriceUpscaled;\\n\\n // Constants used to modulate the price, see below usage\\n uint32[9] public changeRate = [524324, 524315, 524306, 524297, 524288, 524279, 524270, 524261, 524252];\\n\\n // Role allowed to update price\\n bytes32 public immutable PRICE_UPDATER_ROLE;\\n\\n // The length of a round in blocks.\\n uint8 private constant ROUND_LENGTH = 152;\\n\\n // ----------------------------- Events ------------------------------\\n\\n /**\\n *@dev Emitted on every price update.\\n */\\n event PriceUpdate(uint256 price);\\n\\n // ----------------------------- Custom Errors ------------------------------\\n error CallerNotAdmin(); // Caller is not the admin\\n error CallerNotPriceUpdater(); // Caller is not a price updater\\n error PriceAlreadyAdjusted(); // Price already adjusted in this round\\n error UnexpectedZero(); // Redundancy needs to be higher then 0\\n\\n // ----------------------------- CONSTRUCTOR ------------------------------\\n\\n constructor(address _postageStamp) {\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n postageStamp = IPostageStamp(_postageStamp);\\n lastAdjustedRound = currentRound();\\n PRICE_UPDATER_ROLE = keccak256(\\\"PRICE_UPDATER_ROLE\\\");\\n }\\n\\n ////////////////////////////////////////\\n // STATE SETTING //\\n ////////////////////////////////////////\\n\\n /**\\n * @notice Manually set the price.\\n * @dev Can only be called by the admin role.\\n * @param _price The new price.\\n */ function setPrice(uint32 _price) external {\\n if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert CallerNotAdmin();\\n }\\n\\n uint64 _currentPriceUpScaled = _price << 10;\\n uint64 _minimumPriceUpscaled = minimumPriceUpscaled;\\n\\n // Enforce minimum price\\n if (_currentPriceUpScaled < _minimumPriceUpscaled) {\\n _currentPriceUpScaled = _minimumPriceUpscaled;\\n }\\n currentPriceUpScaled = _currentPriceUpScaled;\\n\\n // Price in postagestamp is set at 256 so we need to upcast it\\n postageStamp.setPrice(uint256(currentPrice()));\\n emit PriceUpdate(currentPrice());\\n }\\n\\n function adjustPrice(uint16 redundancy) external {\\n if (isPaused == false) {\\n if (!hasRole(PRICE_UPDATER_ROLE, msg.sender)) {\\n revert CallerNotPriceUpdater();\\n }\\n\\n uint16 usedRedundancy = redundancy;\\n uint64 currentRoundNumber = currentRound();\\n\\n // Price can only be adjusted once per round\\n if (currentRoundNumber <= lastAdjustedRound) {\\n revert PriceAlreadyAdjusted();\\n }\\n // Redundancy may not be zero\\n if (redundancy == 0) {\\n revert UnexpectedZero();\\n }\\n\\n // Enforce maximum considered extra redundancy\\n uint16 maxConsideredRedundancy = targetRedundancy + maxConsideredExtraRedundancy;\\n if (redundancy > maxConsideredRedundancy) {\\n usedRedundancy = maxConsideredRedundancy;\\n }\\n\\n uint64 _currentPriceUpScaled = currentPriceUpScaled;\\n uint64 _minimumPriceUpscaled = minimumPriceUpscaled;\\n uint32 _priceBase = priceBase;\\n\\n // Set the number of rounds that were skipped\\n uint64 skippedRounds = currentRoundNumber - lastAdjustedRound - 1;\\n\\n // We first apply the increase/decrease rate for the current round\\n uint32 _changeRate = changeRate[usedRedundancy];\\n _currentPriceUpScaled = (_changeRate * _currentPriceUpScaled) / _priceBase;\\n\\n // If previous rounds were skipped, use MAX price increase for the previous rounds\\n if (skippedRounds > 0) {\\n _changeRate = changeRate[0];\\n for (uint64 i = 0; i < skippedRounds; i++) {\\n _currentPriceUpScaled = (_changeRate * _currentPriceUpScaled) / _priceBase;\\n }\\n }\\n\\n // Enforce minimum price\\n if (_currentPriceUpScaled < _minimumPriceUpscaled) {\\n _currentPriceUpScaled = _minimumPriceUpscaled;\\n }\\n\\n currentPriceUpScaled = _currentPriceUpScaled;\\n lastAdjustedRound = currentRoundNumber;\\n postageStamp.setPrice(uint256(currentPrice()));\\n emit PriceUpdate(currentPrice());\\n }\\n }\\n\\n function pause() external {\\n if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert CallerNotAdmin();\\n }\\n isPaused = true;\\n }\\n\\n function unPause() external {\\n if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert CallerNotAdmin();\\n }\\n isPaused = false;\\n }\\n\\n ////////////////////////////////////////\\n // STATE READING //\\n ////////////////////////////////////////\\n\\n /**\\n * @notice Return the number of the current round.\\n */\\n function currentRound() public view returns (uint64) {\\n // We downcasted to uint64 as uint64 has 18,446,744,073,709,551,616 places\\n // as each round is 152 x 5 = 760, each day has around 113 rounds which is 41245 in a year\\n // it results 4.4724801e+14 years to run this game\\n return uint64(block.number / uint256(ROUND_LENGTH));\\n }\\n\\n /**\\n * @notice Return the price downscaled\\n */\\n function currentPrice() public view returns (uint32) {\\n // We downcasted to uint32 and bitshift it by 2^10\\n return uint32((currentPriceUpScaled) >> 10);\\n }\\n\\n /**\\n * @notice Return the price downscaled\\n */\\n function minimumPrice() public view returns (uint32) {\\n // We downcasted to uint32 and bitshift it by 2^10\\n return uint32((minimumPriceUpscaled) >> 10);\\n }\\n}\\n\",\"keccak256\":\"0x46220a921dcbac1f300a12aa0c441bbebf340485e9bbd9514163ac600fc1d64d\",\"license\":\"BSD-3-Clause\"},\"src/interface/IPostageStamp.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.19;\\n\\ninterface IPostageStamp {\\n function withdraw(address beneficiary) external;\\n\\n function validChunkCount() external view returns (uint256);\\n\\n function batchOwner(bytes32 _batchId) external view returns (address);\\n\\n function batchDepth(bytes32 _batchId) external view returns (uint8);\\n\\n function batchBucketDepth(bytes32 _batchId) external view returns (uint8);\\n\\n function remainingBalance(bytes32 _batchId) external view returns (uint256);\\n\\n function minimumInitialBalancePerChunk() external view returns (uint256);\\n\\n function setPrice(uint256 _price) external;\\n\\n function batches(\\n bytes32\\n )\\n external\\n view\\n returns (\\n address owner,\\n uint8 depth,\\n uint8 bucketDepth,\\n bool immutableFlag,\\n uint256 normalisedBalance,\\n uint256 lastUpdatedBlockNumber\\n );\\n}\\n\",\"keccak256\":\"0xc018ff96e75e773e76e6245a930acc3679667250e345415a38196f1e2ad1de76\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", - "bytecode": "0x600180546201000160a21b64ffffffffff60a01b1990911617905560028054600160401b600160c01b0319811663ffffffff68010000000000000000600160401b600160801b03199093166e0800000177000000000000000000009081179390930416600160801b02171790556101c06040526208002460a09081526208001b60c0526208001260e052620800096101005262080000610120526207fff7610140526207ffee610160526207ffe5610180526207ffdc6101a052620000c99060039060096200023b565b50348015620000d757600080fd5b506040516200163438038062001634833981016040819052620000fa91620002f4565b6200010760003362000177565b600180546001600160a01b0319166001600160a01b0383161790556200012c62000187565b600280546001600160401b0319166001600160401b0392909216919091179055507fd96ba01d6560c2ab35f2940dd8d70c5f5fe06236c72674237120515918198fb060805262000349565b6200018382826200019b565b5050565b60006200019660984362000326565b905090565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000183576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001f73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600283019183908215620002cb5791602002820160005b838211156200029757835183826101000a81548163ffffffff021916908362ffffff160217905550926020019260040160208160030104928301926001030262000252565b8015620002c95782816101000a81549063ffffffff021916905560040160208160030104928301926001030262000297565b505b50620002d9929150620002dd565b5090565b5b80821115620002d95760008155600101620002de565b6000602082840312156200030757600080fd5b81516001600160a01b03811681146200031f57600080fd5b9392505050565b6000826200034457634e487b7160e01b600052601260045260246000fd5b500490565b6080516112c86200036c600039600081816103ac015261080d01526112c86000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c806391d14854116100d8578063daafe0a51161008c578063f7b188a511610066578063f7b188a51461039f578063fb8d8101146103a7578063ffb98fe3146103ce57600080fd5b8063daafe0a514610346578063dcd8ffb814610359578063e0632c641461037457600080fd5b8063a217fddf116100bd578063a217fddf14610317578063b187bd261461031f578063d547741f1461033357600080fd5b806391d14854146102c55780639d1b464a146102fc57600080fd5b80637310561b1161013a5780637f386b6c116101145780637f386b6c146102995780638456cb59146102b55780638a19c8bc146102bd57600080fd5b80637310561b1461023557806374e7493b1461026a5780637e8effdd1461027d57600080fd5b80632f2ff15d1161016b5780632f2ff15d146101e057806336568abe146101f557806355bdcd231461020857600080fd5b806301ffc9a714610187578063248a9ca3146101af575b600080fd5b61019a610195366004610f6f565b6103e1565b60405190151581526020015b60405180910390f35b6101d26101bd366004610fb1565b60009081526020819052604090206001015490565b6040519081526020016101a6565b6101f36101ee366004610fca565b61047a565b005b6101f3610203366004610fca565b6104a4565b60025461021c9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101a6565b600254610255906c01000000000000000000000000900463ffffffff1681565b60405163ffffffff90911681526020016101a6565b610255610278366004610fb1565b610535565b6002546102559068010000000000000000900463ffffffff1681565b600254680100000000000000009004600a1c623fffff16610255565b6101f3610565565b61021c6105c9565b61019a6102d3366004610fca565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600254600160801b9004600a1c663fffffffffffff16610255565b6101d2600081565b60015461019a90600160c01b900460ff1681565b6101f3610341366004610fca565b6105db565b6101f3610354366004611006565b610600565b60025461021c90600160801b900467ffffffffffffffff1681565b600154610387906001600160a01b031681565b6040516001600160a01b0390911681526020016101a6565b6101f3610797565b6101d27f000000000000000000000000000000000000000000000000000000000000000081565b6101f36103dc36600461102c565b6107f5565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061047457507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60008281526020819052604090206001015461049581610bdb565b61049f8383610be5565b505050565b6001600160a01b03811633146105275760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6105318282610c83565b5050565b6003816009811061054557600080fd5b60089182820401919006600402915054906101000a900463ffffffff1681565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166105b45760405163036c8cf960e11b815260040160405180910390fd5b6001805460ff60c01b1916600160c01b179055565b60006105d660984361107c565b905090565b6000828152602081905260409020600101546105f681610bdb565b61049f8383610c83565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661064f5760405163036c8cf960e11b815260040160405180910390fd5b60025463fffffc00600a83901b169068010000000000000000900463ffffffff168082101561067c578091505b6002805467ffffffffffffffff8416600160801b027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff9091161790556001546001600160a01b03166391b7f5ed6106e6600254663fffffffffffff600160801b909104600a1c1690565b63ffffffff166040518263ffffffff1660e01b815260040161070a91815260200190565b600060405180830381600087803b15801561072457600080fd5b505af1158015610738573d6000803e3d6000fd5b505050507fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a61077a600254663fffffffffffff600160801b909104600a1c1690565b60405163ffffffff909116815260200160405180910390a1505050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166107e65760405163036c8cf960e11b815260040160405180910390fd5b6001805460ff60c01b19169055565b600154600160c01b900460ff161515600003610bd8577f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff1661087d576040517f262791ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060006108886105c9565b60025490915067ffffffffffffffff908116908216116108d4576040517f08a5cb4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8261ffff16600003610912576040517fb5ca2d7100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015460009061095a9061ffff760100000000000000000000000000000000000000000000820481169174010000000000000000000000000000000000000000900416611090565b90508061ffff168461ffff161115610970578092505b60025467ffffffffffffffff600160801b820481169163ffffffff6801000000000000000082048116926c010000000000000000000000008304909116916000916001916109bf9116886110b2565b6109c991906110b2565b9050600060038861ffff16600981106109e4576109e46110d3565b60088104919091015460079091166004026101000a900463ffffffff90811691508316610a1186836110e9565b610a1b9190611115565b945067ffffffffffffffff821615610a8f575060035463ffffffff1660005b8267ffffffffffffffff168167ffffffffffffffff161015610a8d578363ffffffff16868363ffffffff16610a6f91906110e9565b610a799190611115565b955080610a858161113c565b915050610a3a565b505b8367ffffffffffffffff168567ffffffffffffffff161015610aaf578394505b600280547fffffffffffffffff0000000000000000ffffffffffffffff000000000000000016600160801b67ffffffffffffffff888116820267ffffffffffffffff191692909217918a1691909117918290556001546001600160a01b0316916391b7f5ed919004600a1c663fffffffffffff1663ffffffff166040518263ffffffff1660e01b8152600401610b4791815260200190565b600060405180830381600087803b158015610b6157600080fd5b505af1158015610b75573d6000803e3d6000fd5b505050507fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a610bb7600254663fffffffffffff600160801b909104600a1c1690565b60405163ffffffff909116815260200160405180910390a150505050505050505b50565b610bd88133610d02565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610531576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610c3f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610531576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661053157610d3381610d75565b610d3e836020610d87565b604051602001610d4f929190611187565b60408051601f198184030181529082905262461bcd60e51b825261051e91600401611208565b60606104746001600160a01b03831660145b60606000610d9683600261123b565b610da1906002611252565b67ffffffffffffffff811115610db957610db9611265565b6040519080825280601f01601f191660200182016040528015610de3576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110610e1a57610e1a6110d3565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110610e6557610e656110d3565b60200101906001600160f81b031916908160001a9053506000610e8984600261123b565b610e94906001611252565b90505b6001811115610f19577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110610ed557610ed56110d3565b1a60f81b828281518110610eeb57610eeb6110d3565b60200101906001600160f81b031916908160001a90535060049490941c93610f128161127b565b9050610e97565b508315610f685760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161051e565b9392505050565b600060208284031215610f8157600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610f6857600080fd5b600060208284031215610fc357600080fd5b5035919050565b60008060408385031215610fdd57600080fd5b8235915060208301356001600160a01b0381168114610ffb57600080fd5b809150509250929050565b60006020828403121561101857600080fd5b813563ffffffff81168114610f6857600080fd5b60006020828403121561103e57600080fd5b813561ffff81168114610f6857600080fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008261108b5761108b611050565b500490565b61ffff8181168382160190808211156110ab576110ab611066565b5092915050565b67ffffffffffffffff8281168282160390808211156110ab576110ab611066565b634e487b7160e01b600052603260045260246000fd5b67ffffffffffffffff81811683821602808216919082811461110d5761110d611066565b505092915050565b600067ffffffffffffffff8084168061113057611130611050565b92169190910492915050565b600067ffffffffffffffff80831681810361115957611159611066565b6001019392505050565b60005b8381101561117e578181015183820152602001611166565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516111bf816017850160208801611163565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516111fc816028840160208801611163565b01602801949350505050565b6020815260008251806020840152611227816040850160208701611163565b601f01601f19169190910160400192915050565b808202811582820484141761047457610474611066565b8082018082111561047457610474611066565b634e487b7160e01b600052604160045260246000fd5b60008161128a5761128a611066565b50600019019056fea2646970667358221220ae138e65b6afda072afc2642ba44cd4f0dba23acc91686a94131453ad482fce464736f6c63430008130033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101825760003560e01c806391d14854116100d8578063daafe0a51161008c578063f7b188a511610066578063f7b188a51461039f578063fb8d8101146103a7578063ffb98fe3146103ce57600080fd5b8063daafe0a514610346578063dcd8ffb814610359578063e0632c641461037457600080fd5b8063a217fddf116100bd578063a217fddf14610317578063b187bd261461031f578063d547741f1461033357600080fd5b806391d14854146102c55780639d1b464a146102fc57600080fd5b80637310561b1161013a5780637f386b6c116101145780637f386b6c146102995780638456cb59146102b55780638a19c8bc146102bd57600080fd5b80637310561b1461023557806374e7493b1461026a5780637e8effdd1461027d57600080fd5b80632f2ff15d1161016b5780632f2ff15d146101e057806336568abe146101f557806355bdcd231461020857600080fd5b806301ffc9a714610187578063248a9ca3146101af575b600080fd5b61019a610195366004610f6f565b6103e1565b60405190151581526020015b60405180910390f35b6101d26101bd366004610fb1565b60009081526020819052604090206001015490565b6040519081526020016101a6565b6101f36101ee366004610fca565b61047a565b005b6101f3610203366004610fca565b6104a4565b60025461021c9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101a6565b600254610255906c01000000000000000000000000900463ffffffff1681565b60405163ffffffff90911681526020016101a6565b610255610278366004610fb1565b610535565b6002546102559068010000000000000000900463ffffffff1681565b600254680100000000000000009004600a1c623fffff16610255565b6101f3610565565b61021c6105c9565b61019a6102d3366004610fca565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600254600160801b9004600a1c663fffffffffffff16610255565b6101d2600081565b60015461019a90600160c01b900460ff1681565b6101f3610341366004610fca565b6105db565b6101f3610354366004611006565b610600565b60025461021c90600160801b900467ffffffffffffffff1681565b600154610387906001600160a01b031681565b6040516001600160a01b0390911681526020016101a6565b6101f3610797565b6101d27f000000000000000000000000000000000000000000000000000000000000000081565b6101f36103dc36600461102c565b6107f5565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061047457507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60008281526020819052604090206001015461049581610bdb565b61049f8383610be5565b505050565b6001600160a01b03811633146105275760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6105318282610c83565b5050565b6003816009811061054557600080fd5b60089182820401919006600402915054906101000a900463ffffffff1681565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166105b45760405163036c8cf960e11b815260040160405180910390fd5b6001805460ff60c01b1916600160c01b179055565b60006105d660984361107c565b905090565b6000828152602081905260409020600101546105f681610bdb565b61049f8383610c83565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661064f5760405163036c8cf960e11b815260040160405180910390fd5b60025463fffffc00600a83901b169068010000000000000000900463ffffffff168082101561067c578091505b6002805467ffffffffffffffff8416600160801b027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff9091161790556001546001600160a01b03166391b7f5ed6106e6600254663fffffffffffff600160801b909104600a1c1690565b63ffffffff166040518263ffffffff1660e01b815260040161070a91815260200190565b600060405180830381600087803b15801561072457600080fd5b505af1158015610738573d6000803e3d6000fd5b505050507fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a61077a600254663fffffffffffff600160801b909104600a1c1690565b60405163ffffffff909116815260200160405180910390a1505050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166107e65760405163036c8cf960e11b815260040160405180910390fd5b6001805460ff60c01b19169055565b600154600160c01b900460ff161515600003610bd8577f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff1661087d576040517f262791ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060006108886105c9565b60025490915067ffffffffffffffff908116908216116108d4576040517f08a5cb4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8261ffff16600003610912576040517fb5ca2d7100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015460009061095a9061ffff760100000000000000000000000000000000000000000000820481169174010000000000000000000000000000000000000000900416611090565b90508061ffff168461ffff161115610970578092505b60025467ffffffffffffffff600160801b820481169163ffffffff6801000000000000000082048116926c010000000000000000000000008304909116916000916001916109bf9116886110b2565b6109c991906110b2565b9050600060038861ffff16600981106109e4576109e46110d3565b60088104919091015460079091166004026101000a900463ffffffff90811691508316610a1186836110e9565b610a1b9190611115565b945067ffffffffffffffff821615610a8f575060035463ffffffff1660005b8267ffffffffffffffff168167ffffffffffffffff161015610a8d578363ffffffff16868363ffffffff16610a6f91906110e9565b610a799190611115565b955080610a858161113c565b915050610a3a565b505b8367ffffffffffffffff168567ffffffffffffffff161015610aaf578394505b600280547fffffffffffffffff0000000000000000ffffffffffffffff000000000000000016600160801b67ffffffffffffffff888116820267ffffffffffffffff191692909217918a1691909117918290556001546001600160a01b0316916391b7f5ed919004600a1c663fffffffffffff1663ffffffff166040518263ffffffff1660e01b8152600401610b4791815260200190565b600060405180830381600087803b158015610b6157600080fd5b505af1158015610b75573d6000803e3d6000fd5b505050507fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a610bb7600254663fffffffffffff600160801b909104600a1c1690565b60405163ffffffff909116815260200160405180910390a150505050505050505b50565b610bd88133610d02565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610531576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610c3f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610531576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661053157610d3381610d75565b610d3e836020610d87565b604051602001610d4f929190611187565b60408051601f198184030181529082905262461bcd60e51b825261051e91600401611208565b60606104746001600160a01b03831660145b60606000610d9683600261123b565b610da1906002611252565b67ffffffffffffffff811115610db957610db9611265565b6040519080825280601f01601f191660200182016040528015610de3576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110610e1a57610e1a6110d3565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110610e6557610e656110d3565b60200101906001600160f81b031916908160001a9053506000610e8984600261123b565b610e94906001611252565b90505b6001811115610f19577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110610ed557610ed56110d3565b1a60f81b828281518110610eeb57610eeb6110d3565b60200101906001600160f81b031916908160001a90535060049490941c93610f128161127b565b9050610e97565b508315610f685760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161051e565b9392505050565b600060208284031215610f8157600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610f6857600080fd5b600060208284031215610fc357600080fd5b5035919050565b60008060408385031215610fdd57600080fd5b8235915060208301356001600160a01b0381168114610ffb57600080fd5b809150509250929050565b60006020828403121561101857600080fd5b813563ffffffff81168114610f6857600080fd5b60006020828403121561103e57600080fd5b813561ffff81168114610f6857600080fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008261108b5761108b611050565b500490565b61ffff8181168382160190808211156110ab576110ab611066565b5092915050565b67ffffffffffffffff8281168282160390808211156110ab576110ab611066565b634e487b7160e01b600052603260045260246000fd5b67ffffffffffffffff81811683821602808216919082811461110d5761110d611066565b505092915050565b600067ffffffffffffffff8084168061113057611130611050565b92169190910492915050565b600067ffffffffffffffff80831681810361115957611159611066565b6001019392505050565b60005b8381101561117e578181015183820152602001611166565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516111bf816017850160208801611163565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516111fc816028840160208801611163565b01602801949350505050565b6020815260008251806020840152611227816040850160208701611163565b601f01601f19169190910160400192915050565b808202811582820484141761047457610474611066565b8082018082111561047457610474611066565b634e487b7160e01b600052604160045260246000fd5b60008161128a5761128a611066565b50600019019056fea2646970667358221220ae138e65b6afda072afc2642ba44cd4f0dba23acc91686a94131453ad482fce464736f6c63430008130033", + "numDeployments": 1, + "solcInputHash": "b85a93172485bf790fee27ce7d9db48a", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_postageStamp\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CallerNotAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotPriceUpdater\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PriceAlreadyAdjusted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedZero\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"name\":\"PriceUpdate\",\"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\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PRICE_UPDATER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"redundancy\",\"type\":\"uint16\"}],\"name\":\"adjustPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"changeRate\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentPrice\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentPriceUpScaled\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentRound\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"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\":[],\"name\":\"isPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastAdjustedRound\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumPrice\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minimumPriceUpscaled\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"postageStamp\",\"outputs\":[{\"internalType\":\"contract IPostageStamp\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceBase\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"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\":\"uint32\",\"name\":\"_price\",\"type\":\"uint32\"}],\"name\":\"setPrice\",\"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\":[],\"name\":\"unPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"The Swarm Authors.\",\"details\":\"The price oracle contract emits a price feed using events.\",\"events\":{\"PriceUpdate(uint256)\":{\"details\":\"Emitted on every price update.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"}},\"kind\":\"dev\",\"methods\":{\"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`.\"},\"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.\"},\"setPrice(uint32)\":{\"details\":\"Can only be called by the admin role.\",\"params\":{\"_price\":\"The new price.\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"}},\"title\":\"PriceOracle contract.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"currentPrice()\":{\"notice\":\"Return the price downscaled\"},\"currentRound()\":{\"notice\":\"Return the number of the current round.\"},\"minimumPrice()\":{\"notice\":\"Return the price downscaled\"},\"setPrice(uint32)\":{\"notice\":\"Manually set the price.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/PriceOracle.sol\":\"PriceOracle\"},\"evmVersion\":\"paris\",\"libraries\":{\":__CACHE_BREAKER__\":\"0x00000000d41867734bbee4c6863d9255b2b06ac1\"},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"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/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\"},\"src/PriceOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.19;\\nimport \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\nimport \\\"./interface/IPostageStamp.sol\\\";\\n\\n/**\\n * @title PriceOracle contract.\\n * @author The Swarm Authors.\\n * @dev The price oracle contract emits a price feed using events.\\n */\\n\\ncontract PriceOracle is AccessControl {\\n // ----------------------------- State variables ------------------------------\\n\\n // The address of the linked PostageStamp contract\\n IPostageStamp public postageStamp;\\n\\n uint16 targetRedundancy = 4;\\n uint16 maxConsideredExtraRedundancy = 4;\\n\\n // When the contract is paused, price changes are not effective\\n bool public isPaused = true;\\n\\n // The number of the last round price adjusting happend\\n uint64 public lastAdjustedRound;\\n\\n // The minimum price allowed\\n uint32 public minimumPriceUpscaled = 24000 << 10; // we upscale it by 2^10\\n\\n // The priceBase to modulate the price\\n uint32 public priceBase = 524288;\\n\\n uint64 public currentPriceUpScaled = minimumPriceUpscaled;\\n\\n // Constants used to modulate the price, see below usage\\n uint32[9] public changeRate = [524324, 524315, 524306, 524297, 524288, 524279, 524270, 524261, 524252];\\n\\n // Role allowed to update price\\n bytes32 public immutable PRICE_UPDATER_ROLE;\\n\\n // The length of a round in blocks.\\n uint8 private constant ROUND_LENGTH = 152;\\n\\n // ----------------------------- Events ------------------------------\\n\\n /**\\n *@dev Emitted on every price update.\\n */\\n event PriceUpdate(uint256 price);\\n\\n // ----------------------------- Custom Errors ------------------------------\\n error CallerNotAdmin(); // Caller is not the admin\\n error CallerNotPriceUpdater(); // Caller is not a price updater\\n error PriceAlreadyAdjusted(); // Price already adjusted in this round\\n error UnexpectedZero(); // Redundancy needs to be higher then 0\\n\\n // ----------------------------- CONSTRUCTOR ------------------------------\\n\\n constructor(address _postageStamp) {\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n postageStamp = IPostageStamp(_postageStamp);\\n lastAdjustedRound = currentRound();\\n PRICE_UPDATER_ROLE = keccak256(\\\"PRICE_UPDATER_ROLE\\\");\\n }\\n\\n ////////////////////////////////////////\\n // STATE SETTING //\\n ////////////////////////////////////////\\n\\n /**\\n * @notice Manually set the price.\\n * @dev Can only be called by the admin role.\\n * @param _price The new price.\\n */ function setPrice(uint32 _price) external {\\n if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert CallerNotAdmin();\\n }\\n\\n uint64 _currentPriceUpScaled = _price << 10;\\n uint64 _minimumPriceUpscaled = minimumPriceUpscaled;\\n\\n // Enforce minimum price\\n if (_currentPriceUpScaled < _minimumPriceUpscaled) {\\n _currentPriceUpScaled = _minimumPriceUpscaled;\\n }\\n currentPriceUpScaled = _currentPriceUpScaled;\\n\\n // Price in postagestamp is set at 256 so we need to upcast it\\n postageStamp.setPrice(uint256(currentPrice()));\\n emit PriceUpdate(currentPrice());\\n }\\n\\n function adjustPrice(uint16 redundancy) external {\\n if (isPaused == false) {\\n if (!hasRole(PRICE_UPDATER_ROLE, msg.sender)) {\\n revert CallerNotPriceUpdater();\\n }\\n\\n uint16 usedRedundancy = redundancy;\\n uint64 currentRoundNumber = currentRound();\\n\\n // Price can only be adjusted once per round\\n if (currentRoundNumber <= lastAdjustedRound) {\\n revert PriceAlreadyAdjusted();\\n }\\n // Redundancy may not be zero\\n if (redundancy == 0) {\\n revert UnexpectedZero();\\n }\\n\\n // Enforce maximum considered extra redundancy\\n uint16 maxConsideredRedundancy = targetRedundancy + maxConsideredExtraRedundancy;\\n if (redundancy > maxConsideredRedundancy) {\\n usedRedundancy = maxConsideredRedundancy;\\n }\\n\\n uint64 _currentPriceUpScaled = currentPriceUpScaled;\\n uint64 _minimumPriceUpscaled = minimumPriceUpscaled;\\n uint32 _priceBase = priceBase;\\n\\n // Set the number of rounds that were skipped\\n uint64 skippedRounds = currentRoundNumber - lastAdjustedRound - 1;\\n\\n // We first apply the increase/decrease rate for the current round\\n uint32 _changeRate = changeRate[usedRedundancy];\\n _currentPriceUpScaled = (_changeRate * _currentPriceUpScaled) / _priceBase;\\n\\n // If previous rounds were skipped, use MAX price increase for the previous rounds\\n if (skippedRounds > 0) {\\n _changeRate = changeRate[0];\\n for (uint64 i = 0; i < skippedRounds; i++) {\\n _currentPriceUpScaled = (_changeRate * _currentPriceUpScaled) / _priceBase;\\n }\\n }\\n\\n // Enforce minimum price\\n if (_currentPriceUpScaled < _minimumPriceUpscaled) {\\n _currentPriceUpScaled = _minimumPriceUpscaled;\\n }\\n\\n currentPriceUpScaled = _currentPriceUpScaled;\\n lastAdjustedRound = currentRoundNumber;\\n postageStamp.setPrice(uint256(currentPrice()));\\n emit PriceUpdate(currentPrice());\\n }\\n }\\n\\n function pause() external {\\n if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert CallerNotAdmin();\\n }\\n isPaused = true;\\n }\\n\\n function unPause() external {\\n if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert CallerNotAdmin();\\n }\\n isPaused = false;\\n }\\n\\n ////////////////////////////////////////\\n // STATE READING //\\n ////////////////////////////////////////\\n\\n /**\\n * @notice Return the number of the current round.\\n */\\n function currentRound() public view returns (uint64) {\\n // We downcasted to uint64 as uint64 has 18,446,744,073,709,551,616 places\\n // as each round is 152 x 5 = 760, each day has around 113 rounds which is 41245 in a year\\n // it results 4.4724801e+14 years to run this game\\n return uint64(block.number / uint256(ROUND_LENGTH));\\n }\\n\\n /**\\n * @notice Return the price downscaled\\n */\\n function currentPrice() public view returns (uint32) {\\n // We downcasted to uint32 and bitshift it by 2^10\\n return uint32((currentPriceUpScaled) >> 10);\\n }\\n\\n /**\\n * @notice Return the price downscaled\\n */\\n function minimumPrice() public view returns (uint32) {\\n // We downcasted to uint32 and bitshift it by 2^10\\n return uint32((minimumPriceUpscaled) >> 10);\\n }\\n}\\n\",\"keccak256\":\"0xa36ac9ad3f5682e13ce2ed3a91372db6ea645c65eb7f107290d8426299abf1fd\",\"license\":\"BSD-3-Clause\"},\"src/interface/IPostageStamp.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.19;\\n\\ninterface IPostageStamp {\\n function withdraw(address beneficiary) external;\\n\\n function validChunkCount() external view returns (uint256);\\n\\n function batchOwner(bytes32 _batchId) external view returns (address);\\n\\n function batchDepth(bytes32 _batchId) external view returns (uint8);\\n\\n function batchBucketDepth(bytes32 _batchId) external view returns (uint8);\\n\\n function remainingBalance(bytes32 _batchId) external view returns (uint256);\\n\\n function minimumInitialBalancePerChunk() external view returns (uint256);\\n\\n function setPrice(uint256 _price) external;\\n\\n function batches(\\n bytes32\\n )\\n external\\n view\\n returns (\\n address owner,\\n uint8 depth,\\n uint8 bucketDepth,\\n bool immutableFlag,\\n uint256 normalisedBalance,\\n uint256 lastUpdatedBlockNumber\\n );\\n}\\n\",\"keccak256\":\"0xc018ff96e75e773e76e6245a930acc3679667250e345415a38196f1e2ad1de76\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x6001805464ffffffffff60a01b1916634001000160a21b17905560028054600160401b600160c01b0319811663ffffffff68010000000000000000600160401b600160801b03199093166e0800000177000000000000000000009081179390930416600160801b02171790556101c06040526208002460a09081526208001b60c0526208001260e052620800096101005262080000610120526207fff7610140526207ffee610160526207ffe5610180526207ffdc6101a052620000c89060039060096200023a565b50348015620000d657600080fd5b506040516200163338038062001633833981016040819052620000f991620002f3565b6200010660003362000176565b600180546001600160a01b0319166001600160a01b0383161790556200012b62000186565b600280546001600160401b0319166001600160401b0392909216919091179055507fd96ba01d6560c2ab35f2940dd8d70c5f5fe06236c72674237120515918198fb060805262000348565b6200018282826200019a565b5050565b60006200019560984362000325565b905090565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000182576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001f63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600283019183908215620002ca5791602002820160005b838211156200029657835183826101000a81548163ffffffff021916908362ffffff160217905550926020019260040160208160030104928301926001030262000251565b8015620002c85782816101000a81549063ffffffff021916905560040160208160030104928301926001030262000296565b505b50620002d8929150620002dc565b5090565b5b80821115620002d85760008155600101620002dd565b6000602082840312156200030657600080fd5b81516001600160a01b03811681146200031e57600080fd5b9392505050565b6000826200034357634e487b7160e01b600052601260045260246000fd5b500490565b6080516112c86200036b600039600081816103ac015261080d01526112c86000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c806391d14854116100d8578063daafe0a51161008c578063f7b188a511610066578063f7b188a51461039f578063fb8d8101146103a7578063ffb98fe3146103ce57600080fd5b8063daafe0a514610346578063dcd8ffb814610359578063e0632c641461037457600080fd5b8063a217fddf116100bd578063a217fddf14610317578063b187bd261461031f578063d547741f1461033357600080fd5b806391d14854146102c55780639d1b464a146102fc57600080fd5b80637310561b1161013a5780637f386b6c116101145780637f386b6c146102995780638456cb59146102b55780638a19c8bc146102bd57600080fd5b80637310561b1461023557806374e7493b1461026a5780637e8effdd1461027d57600080fd5b80632f2ff15d1161016b5780632f2ff15d146101e057806336568abe146101f557806355bdcd231461020857600080fd5b806301ffc9a714610187578063248a9ca3146101af575b600080fd5b61019a610195366004610f6f565b6103e1565b60405190151581526020015b60405180910390f35b6101d26101bd366004610fb1565b60009081526020819052604090206001015490565b6040519081526020016101a6565b6101f36101ee366004610fca565b61047a565b005b6101f3610203366004610fca565b6104a4565b60025461021c9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101a6565b600254610255906c01000000000000000000000000900463ffffffff1681565b60405163ffffffff90911681526020016101a6565b610255610278366004610fb1565b610535565b6002546102559068010000000000000000900463ffffffff1681565b600254680100000000000000009004600a1c623fffff16610255565b6101f3610565565b61021c6105c9565b61019a6102d3366004610fca565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600254600160801b9004600a1c663fffffffffffff16610255565b6101d2600081565b60015461019a90600160c01b900460ff1681565b6101f3610341366004610fca565b6105db565b6101f3610354366004611006565b610600565b60025461021c90600160801b900467ffffffffffffffff1681565b600154610387906001600160a01b031681565b6040516001600160a01b0390911681526020016101a6565b6101f3610797565b6101d27f000000000000000000000000000000000000000000000000000000000000000081565b6101f36103dc36600461102c565b6107f5565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061047457507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60008281526020819052604090206001015461049581610bdb565b61049f8383610be5565b505050565b6001600160a01b03811633146105275760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6105318282610c83565b5050565b6003816009811061054557600080fd5b60089182820401919006600402915054906101000a900463ffffffff1681565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166105b45760405163036c8cf960e11b815260040160405180910390fd5b6001805460ff60c01b1916600160c01b179055565b60006105d660984361107c565b905090565b6000828152602081905260409020600101546105f681610bdb565b61049f8383610c83565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661064f5760405163036c8cf960e11b815260040160405180910390fd5b60025463fffffc00600a83901b169068010000000000000000900463ffffffff168082101561067c578091505b6002805467ffffffffffffffff8416600160801b027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff9091161790556001546001600160a01b03166391b7f5ed6106e6600254663fffffffffffff600160801b909104600a1c1690565b63ffffffff166040518263ffffffff1660e01b815260040161070a91815260200190565b600060405180830381600087803b15801561072457600080fd5b505af1158015610738573d6000803e3d6000fd5b505050507fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a61077a600254663fffffffffffff600160801b909104600a1c1690565b60405163ffffffff909116815260200160405180910390a1505050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166107e65760405163036c8cf960e11b815260040160405180910390fd5b6001805460ff60c01b19169055565b600154600160c01b900460ff161515600003610bd8577f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff1661087d576040517f262791ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060006108886105c9565b60025490915067ffffffffffffffff908116908216116108d4576040517f08a5cb4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8261ffff16600003610912576040517fb5ca2d7100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015460009061095a9061ffff760100000000000000000000000000000000000000000000820481169174010000000000000000000000000000000000000000900416611090565b90508061ffff168461ffff161115610970578092505b60025467ffffffffffffffff600160801b820481169163ffffffff6801000000000000000082048116926c010000000000000000000000008304909116916000916001916109bf9116886110b2565b6109c991906110b2565b9050600060038861ffff16600981106109e4576109e46110d3565b60088104919091015460079091166004026101000a900463ffffffff90811691508316610a1186836110e9565b610a1b9190611115565b945067ffffffffffffffff821615610a8f575060035463ffffffff1660005b8267ffffffffffffffff168167ffffffffffffffff161015610a8d578363ffffffff16868363ffffffff16610a6f91906110e9565b610a799190611115565b955080610a858161113c565b915050610a3a565b505b8367ffffffffffffffff168567ffffffffffffffff161015610aaf578394505b600280547fffffffffffffffff0000000000000000ffffffffffffffff000000000000000016600160801b67ffffffffffffffff888116820267ffffffffffffffff191692909217918a1691909117918290556001546001600160a01b0316916391b7f5ed919004600a1c663fffffffffffff1663ffffffff166040518263ffffffff1660e01b8152600401610b4791815260200190565b600060405180830381600087803b158015610b6157600080fd5b505af1158015610b75573d6000803e3d6000fd5b505050507fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a610bb7600254663fffffffffffff600160801b909104600a1c1690565b60405163ffffffff909116815260200160405180910390a150505050505050505b50565b610bd88133610d02565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610531576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610c3f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610531576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661053157610d3381610d75565b610d3e836020610d87565b604051602001610d4f929190611187565b60408051601f198184030181529082905262461bcd60e51b825261051e91600401611208565b60606104746001600160a01b03831660145b60606000610d9683600261123b565b610da1906002611252565b67ffffffffffffffff811115610db957610db9611265565b6040519080825280601f01601f191660200182016040528015610de3576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110610e1a57610e1a6110d3565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110610e6557610e656110d3565b60200101906001600160f81b031916908160001a9053506000610e8984600261123b565b610e94906001611252565b90505b6001811115610f19577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110610ed557610ed56110d3565b1a60f81b828281518110610eeb57610eeb6110d3565b60200101906001600160f81b031916908160001a90535060049490941c93610f128161127b565b9050610e97565b508315610f685760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161051e565b9392505050565b600060208284031215610f8157600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610f6857600080fd5b600060208284031215610fc357600080fd5b5035919050565b60008060408385031215610fdd57600080fd5b8235915060208301356001600160a01b0381168114610ffb57600080fd5b809150509250929050565b60006020828403121561101857600080fd5b813563ffffffff81168114610f6857600080fd5b60006020828403121561103e57600080fd5b813561ffff81168114610f6857600080fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008261108b5761108b611050565b500490565b61ffff8181168382160190808211156110ab576110ab611066565b5092915050565b67ffffffffffffffff8281168282160390808211156110ab576110ab611066565b634e487b7160e01b600052603260045260246000fd5b67ffffffffffffffff81811683821602808216919082811461110d5761110d611066565b505092915050565b600067ffffffffffffffff8084168061113057611130611050565b92169190910492915050565b600067ffffffffffffffff80831681810361115957611159611066565b6001019392505050565b60005b8381101561117e578181015183820152602001611166565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516111bf816017850160208801611163565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516111fc816028840160208801611163565b01602801949350505050565b6020815260008251806020840152611227816040850160208701611163565b601f01601f19169190910160400192915050565b808202811582820484141761047457610474611066565b8082018082111561047457610474611066565b634e487b7160e01b600052604160045260246000fd5b60008161128a5761128a611066565b50600019019056fea26469706673582212202f236cd5b630e6e0225c8acc85210a4bcfe2cdea08e9391b021d837ae1d50d4064736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101825760003560e01c806391d14854116100d8578063daafe0a51161008c578063f7b188a511610066578063f7b188a51461039f578063fb8d8101146103a7578063ffb98fe3146103ce57600080fd5b8063daafe0a514610346578063dcd8ffb814610359578063e0632c641461037457600080fd5b8063a217fddf116100bd578063a217fddf14610317578063b187bd261461031f578063d547741f1461033357600080fd5b806391d14854146102c55780639d1b464a146102fc57600080fd5b80637310561b1161013a5780637f386b6c116101145780637f386b6c146102995780638456cb59146102b55780638a19c8bc146102bd57600080fd5b80637310561b1461023557806374e7493b1461026a5780637e8effdd1461027d57600080fd5b80632f2ff15d1161016b5780632f2ff15d146101e057806336568abe146101f557806355bdcd231461020857600080fd5b806301ffc9a714610187578063248a9ca3146101af575b600080fd5b61019a610195366004610f6f565b6103e1565b60405190151581526020015b60405180910390f35b6101d26101bd366004610fb1565b60009081526020819052604090206001015490565b6040519081526020016101a6565b6101f36101ee366004610fca565b61047a565b005b6101f3610203366004610fca565b6104a4565b60025461021c9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101a6565b600254610255906c01000000000000000000000000900463ffffffff1681565b60405163ffffffff90911681526020016101a6565b610255610278366004610fb1565b610535565b6002546102559068010000000000000000900463ffffffff1681565b600254680100000000000000009004600a1c623fffff16610255565b6101f3610565565b61021c6105c9565b61019a6102d3366004610fca565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600254600160801b9004600a1c663fffffffffffff16610255565b6101d2600081565b60015461019a90600160c01b900460ff1681565b6101f3610341366004610fca565b6105db565b6101f3610354366004611006565b610600565b60025461021c90600160801b900467ffffffffffffffff1681565b600154610387906001600160a01b031681565b6040516001600160a01b0390911681526020016101a6565b6101f3610797565b6101d27f000000000000000000000000000000000000000000000000000000000000000081565b6101f36103dc36600461102c565b6107f5565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061047457507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60008281526020819052604090206001015461049581610bdb565b61049f8383610be5565b505050565b6001600160a01b03811633146105275760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6105318282610c83565b5050565b6003816009811061054557600080fd5b60089182820401919006600402915054906101000a900463ffffffff1681565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166105b45760405163036c8cf960e11b815260040160405180910390fd5b6001805460ff60c01b1916600160c01b179055565b60006105d660984361107c565b905090565b6000828152602081905260409020600101546105f681610bdb565b61049f8383610c83565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661064f5760405163036c8cf960e11b815260040160405180910390fd5b60025463fffffc00600a83901b169068010000000000000000900463ffffffff168082101561067c578091505b6002805467ffffffffffffffff8416600160801b027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff9091161790556001546001600160a01b03166391b7f5ed6106e6600254663fffffffffffff600160801b909104600a1c1690565b63ffffffff166040518263ffffffff1660e01b815260040161070a91815260200190565b600060405180830381600087803b15801561072457600080fd5b505af1158015610738573d6000803e3d6000fd5b505050507fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a61077a600254663fffffffffffff600160801b909104600a1c1690565b60405163ffffffff909116815260200160405180910390a1505050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166107e65760405163036c8cf960e11b815260040160405180910390fd5b6001805460ff60c01b19169055565b600154600160c01b900460ff161515600003610bd8577f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff1661087d576040517f262791ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060006108886105c9565b60025490915067ffffffffffffffff908116908216116108d4576040517f08a5cb4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8261ffff16600003610912576040517fb5ca2d7100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015460009061095a9061ffff760100000000000000000000000000000000000000000000820481169174010000000000000000000000000000000000000000900416611090565b90508061ffff168461ffff161115610970578092505b60025467ffffffffffffffff600160801b820481169163ffffffff6801000000000000000082048116926c010000000000000000000000008304909116916000916001916109bf9116886110b2565b6109c991906110b2565b9050600060038861ffff16600981106109e4576109e46110d3565b60088104919091015460079091166004026101000a900463ffffffff90811691508316610a1186836110e9565b610a1b9190611115565b945067ffffffffffffffff821615610a8f575060035463ffffffff1660005b8267ffffffffffffffff168167ffffffffffffffff161015610a8d578363ffffffff16868363ffffffff16610a6f91906110e9565b610a799190611115565b955080610a858161113c565b915050610a3a565b505b8367ffffffffffffffff168567ffffffffffffffff161015610aaf578394505b600280547fffffffffffffffff0000000000000000ffffffffffffffff000000000000000016600160801b67ffffffffffffffff888116820267ffffffffffffffff191692909217918a1691909117918290556001546001600160a01b0316916391b7f5ed919004600a1c663fffffffffffff1663ffffffff166040518263ffffffff1660e01b8152600401610b4791815260200190565b600060405180830381600087803b158015610b6157600080fd5b505af1158015610b75573d6000803e3d6000fd5b505050507fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a610bb7600254663fffffffffffff600160801b909104600a1c1690565b60405163ffffffff909116815260200160405180910390a150505050505050505b50565b610bd88133610d02565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610531576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610c3f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610531576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661053157610d3381610d75565b610d3e836020610d87565b604051602001610d4f929190611187565b60408051601f198184030181529082905262461bcd60e51b825261051e91600401611208565b60606104746001600160a01b03831660145b60606000610d9683600261123b565b610da1906002611252565b67ffffffffffffffff811115610db957610db9611265565b6040519080825280601f01601f191660200182016040528015610de3576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110610e1a57610e1a6110d3565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110610e6557610e656110d3565b60200101906001600160f81b031916908160001a9053506000610e8984600261123b565b610e94906001611252565b90505b6001811115610f19577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110610ed557610ed56110d3565b1a60f81b828281518110610eeb57610eeb6110d3565b60200101906001600160f81b031916908160001a90535060049490941c93610f128161127b565b9050610e97565b508315610f685760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161051e565b9392505050565b600060208284031215610f8157600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610f6857600080fd5b600060208284031215610fc357600080fd5b5035919050565b60008060408385031215610fdd57600080fd5b8235915060208301356001600160a01b0381168114610ffb57600080fd5b809150509250929050565b60006020828403121561101857600080fd5b813563ffffffff81168114610f6857600080fd5b60006020828403121561103e57600080fd5b813561ffff81168114610f6857600080fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008261108b5761108b611050565b500490565b61ffff8181168382160190808211156110ab576110ab611066565b5092915050565b67ffffffffffffffff8281168282160390808211156110ab576110ab611066565b634e487b7160e01b600052603260045260246000fd5b67ffffffffffffffff81811683821602808216919082811461110d5761110d611066565b505092915050565b600067ffffffffffffffff8084168061113057611130611050565b92169190910492915050565b600067ffffffffffffffff80831681810361115957611159611066565b6001019392505050565b60005b8381101561117e578181015183820152602001611166565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516111bf816017850160208801611163565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516111fc816028840160208801611163565b01602801949350505050565b6020815260008251806020840152611227816040850160208701611163565b601f01601f19169190910160400192915050565b808202811582820484141761047457610474611066565b8082018082111561047457610474611066565b634e487b7160e01b600052604160045260246000fd5b60008161128a5761128a611066565b50600019019056fea26469706673582212202f236cd5b630e6e0225c8acc85210a4bcfe2cdea08e9391b021d837ae1d50d4064736f6c63430008130033", "devdoc": { "author": "The Swarm Authors.", "details": "The price oracle contract emits a price feed using events.", @@ -555,15 +555,15 @@ "type": "t_mapping(t_bytes32,t_struct(RoleData)19_storage)" }, { - "astId": 6716, + "astId": 6648, "contract": "src/PriceOracle.sol:PriceOracle", "label": "postageStamp", "offset": 0, "slot": "1", - "type": "t_contract(IPostageStamp)11004" + "type": "t_contract(IPostageStamp)10900" }, { - "astId": 6719, + "astId": 6651, "contract": "src/PriceOracle.sol:PriceOracle", "label": "targetRedundancy", "offset": 20, @@ -571,7 +571,7 @@ "type": "t_uint16" }, { - "astId": 6722, + "astId": 6654, "contract": "src/PriceOracle.sol:PriceOracle", "label": "maxConsideredExtraRedundancy", "offset": 22, @@ -579,7 +579,7 @@ "type": "t_uint16" }, { - "astId": 6725, + "astId": 6657, "contract": "src/PriceOracle.sol:PriceOracle", "label": "isPaused", "offset": 24, @@ -587,7 +587,7 @@ "type": "t_bool" }, { - "astId": 6727, + "astId": 6659, "contract": "src/PriceOracle.sol:PriceOracle", "label": "lastAdjustedRound", "offset": 0, @@ -595,7 +595,7 @@ "type": "t_uint64" }, { - "astId": 6732, + "astId": 6664, "contract": "src/PriceOracle.sol:PriceOracle", "label": "minimumPriceUpscaled", "offset": 8, @@ -603,7 +603,7 @@ "type": "t_uint32" }, { - "astId": 6735, + "astId": 6667, "contract": "src/PriceOracle.sol:PriceOracle", "label": "priceBase", "offset": 12, @@ -611,7 +611,7 @@ "type": "t_uint32" }, { - "astId": 6738, + "astId": 6670, "contract": "src/PriceOracle.sol:PriceOracle", "label": "currentPriceUpScaled", "offset": 16, @@ -619,7 +619,7 @@ "type": "t_uint64" }, { - "astId": 6752, + "astId": 6684, "contract": "src/PriceOracle.sol:PriceOracle", "label": "changeRate", "offset": 0, @@ -649,7 +649,7 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(IPostageStamp)11004": { + "t_contract(IPostageStamp)10900": { "encoding": "inplace", "label": "contract IPostageStamp", "numberOfBytes": "20" diff --git a/deployments/testnet/Redistribution.json b/deployments/testnet/Redistribution.json index 60dda85a..686fd021 100644 --- a/deployments/testnet/Redistribution.json +++ b/deployments/testnet/Redistribution.json @@ -1,5 +1,5 @@ { - "address": "0x55cffEA5Cb0799850365d941985E9eC58D7bcB03", + "address": "0xd4621827301E26645Ae3887f7172d6a372782F69", "abi": [ { "inputs": [ @@ -1540,22 +1540,22 @@ "type": "function" } ], - "transactionHash": "0x3b2fd62a04e24970d977db70957051fc1b7cf5624c19eed336777fc11c835fa1", + "transactionHash": "0x1cb8195189dece218d569c130958470485e544bc2a4f5c568eddc6ce84f59327", "receipt": { "to": null, "from": "0xb1C7F17Ed88189Abf269Bf68A3B2Ed83C5276aAe", - "contractAddress": "0x55cffEA5Cb0799850365d941985E9eC58D7bcB03", - "transactionIndex": 60, + "contractAddress": "0xd4621827301E26645Ae3887f7172d6a372782F69", + "transactionIndex": 5, "gasUsed": "4232970", - "logsBloom": "0x00040004000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000010000000000000000002000000000040000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000100002000000020000000000000000000000000000000000000000400000000000000000000080000", - "blockHash": "0x6fa51f83fe564cca6539e9430f872c6b02d6949f72c522b7944f053bee33b0c5", - "transactionHash": "0x3b2fd62a04e24970d977db70957051fc1b7cf5624c19eed336777fc11c835fa1", + "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000040000000000008800000000010000000000000000002000000000040000000000000000000000008000000000000000000000000000000000000000000004000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000100002000000020000000000000000000000000000000000000000400000000000000000000000000", + "blockHash": "0x22dcc424cb79ff13b9f2358a84b071e4f69a14c3bc425f397f1a367fd216a202", + "transactionHash": "0x1cb8195189dece218d569c130958470485e544bc2a4f5c568eddc6ce84f59327", "logs": [ { - "transactionIndex": 60, - "blockNumber": 5753689, - "transactionHash": "0x3b2fd62a04e24970d977db70957051fc1b7cf5624c19eed336777fc11c835fa1", - "address": "0x55cffEA5Cb0799850365d941985E9eC58D7bcB03", + "transactionIndex": 5, + "blockNumber": 5895352, + "transactionHash": "0x1cb8195189dece218d569c130958470485e544bc2a4f5c568eddc6ce84f59327", + "address": "0xd4621827301E26645Ae3887f7172d6a372782F69", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -1563,14 +1563,14 @@ "0x000000000000000000000000b1c7f17ed88189abf269bf68a3b2ed83c5276aae" ], "data": "0x", - "logIndex": 97, - "blockHash": "0x6fa51f83fe564cca6539e9430f872c6b02d6949f72c522b7944f053bee33b0c5" + "logIndex": 3, + "blockHash": "0x22dcc424cb79ff13b9f2358a84b071e4f69a14c3bc425f397f1a367fd216a202" }, { - "transactionIndex": 60, - "blockNumber": 5753689, - "transactionHash": "0x3b2fd62a04e24970d977db70957051fc1b7cf5624c19eed336777fc11c835fa1", - "address": "0x55cffEA5Cb0799850365d941985E9eC58D7bcB03", + "transactionIndex": 5, + "blockNumber": 5895352, + "transactionHash": "0x1cb8195189dece218d569c130958470485e544bc2a4f5c568eddc6ce84f59327", + "address": "0xd4621827301E26645Ae3887f7172d6a372782F69", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a", @@ -1578,19 +1578,19 @@ "0x000000000000000000000000b1c7f17ed88189abf269bf68a3b2ed83c5276aae" ], "data": "0x", - "logIndex": 98, - "blockHash": "0x6fa51f83fe564cca6539e9430f872c6b02d6949f72c522b7944f053bee33b0c5" + "logIndex": 4, + "blockHash": "0x22dcc424cb79ff13b9f2358a84b071e4f69a14c3bc425f397f1a367fd216a202" } ], - "blockNumber": 5753689, - "cumulativeGasUsed": "10094632", + "blockNumber": 5895352, + "cumulativeGasUsed": "4443580", "status": 1, "byzantium": true }, "args": [ - "0x8808FCCacF447a75eBb86733733Da8DAECEf6b62", - "0xb2C3CD6cA7917265faFc70C847F9202aB23f651F", - "0x5d79aA5aE4823f37c72B3736353709e5Ed657D7F" + "0x41379955a216968996D10614B74b31AA48a0624A", + "0x794532C50c6EfA070Cd206b82178E98433046996", + "0x201dcde5c2D14CE03Fa74b0158488122FcA673B8" ], "numDeployments": 4, "solcInputHash": "72863154353a753995d89fd6bb12e809", diff --git a/deployments/testnet/StakeRegistry.json b/deployments/testnet/StakeRegistry.json index a6ef601f..37055c80 100644 --- a/deployments/testnet/StakeRegistry.json +++ b/deployments/testnet/StakeRegistry.json @@ -1,5 +1,5 @@ { - "address": "0x8808FCCacF447a75eBb86733733Da8DAECEf6b62", + "address": "0x41379955a216968996D10614B74b31AA48a0624A", "abi": [ { "inputs": [ @@ -588,22 +588,22 @@ "type": "function" } ], - "transactionHash": "0x1c0c7725e513f68cd2cbd2437c0153ff2a73e256669feb4ca6ee0d7a27ae5885", + "transactionHash": "0x46801483d6153c052e7bf678abc544b50608329be1e35670ccd40c490c425fe4", "receipt": { "to": null, "from": "0xb1C7F17Ed88189Abf269Bf68A3B2Ed83C5276aAe", - "contractAddress": "0x8808FCCacF447a75eBb86733733Da8DAECEf6b62", - "transactionIndex": 47, - "gasUsed": "1462081", - "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000010000000000000000002000000000040000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000001001080000000000000000000000000000000000000000000000000000000000100002000004020000000000000000000000000000000000000000400000000000000000000000000", - "blockHash": "0x3f66e815586bd7b450b915349cf34d0e24b97202d9882e5a31dec4fcbde92fe1", - "transactionHash": "0x1c0c7725e513f68cd2cbd2437c0153ff2a73e256669feb4ca6ee0d7a27ae5885", + "contractAddress": "0x41379955a216968996D10614B74b31AA48a0624A", + "transactionIndex": 14, + "gasUsed": "1462093", + "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000010000000000000000002000000000040000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000800000000000000000000000000000000000000000000100002000000020000000000000000000000000000000000000000400000000000000000200000000", + "blockHash": "0x791cd7e898cada3d62cb7feb662249dd54e4fe9a03546790403ae89de05119be", + "transactionHash": "0x46801483d6153c052e7bf678abc544b50608329be1e35670ccd40c490c425fe4", "logs": [ { - "transactionIndex": 47, - "blockNumber": 5753682, - "transactionHash": "0x1c0c7725e513f68cd2cbd2437c0153ff2a73e256669feb4ca6ee0d7a27ae5885", - "address": "0x8808FCCacF447a75eBb86733733Da8DAECEf6b62", + "transactionIndex": 14, + "blockNumber": 4660478, + "transactionHash": "0x46801483d6153c052e7bf678abc544b50608329be1e35670ccd40c490c425fe4", + "address": "0x41379955a216968996D10614B74b31AA48a0624A", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -611,14 +611,14 @@ "0x000000000000000000000000b1c7f17ed88189abf269bf68a3b2ed83c5276aae" ], "data": "0x", - "logIndex": 57, - "blockHash": "0x3f66e815586bd7b450b915349cf34d0e24b97202d9882e5a31dec4fcbde92fe1" + "logIndex": 20, + "blockHash": "0x791cd7e898cada3d62cb7feb662249dd54e4fe9a03546790403ae89de05119be" }, { - "transactionIndex": 47, - "blockNumber": 5753682, - "transactionHash": "0x1c0c7725e513f68cd2cbd2437c0153ff2a73e256669feb4ca6ee0d7a27ae5885", - "address": "0x8808FCCacF447a75eBb86733733Da8DAECEf6b62", + "transactionIndex": 14, + "blockNumber": 4660478, + "transactionHash": "0x46801483d6153c052e7bf678abc544b50608329be1e35670ccd40c490c425fe4", + "address": "0x41379955a216968996D10614B74b31AA48a0624A", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a", @@ -626,21 +626,21 @@ "0x000000000000000000000000b1c7f17ed88189abf269bf68a3b2ed83c5276aae" ], "data": "0x", - "logIndex": 58, - "blockHash": "0x3f66e815586bd7b450b915349cf34d0e24b97202d9882e5a31dec4fcbde92fe1" + "logIndex": 21, + "blockHash": "0x791cd7e898cada3d62cb7feb662249dd54e4fe9a03546790403ae89de05119be" } ], - "blockNumber": 5753682, - "cumulativeGasUsed": "4862796", + "blockNumber": 4660478, + "cumulativeGasUsed": "4233016", "status": 1, "byzantium": true }, "args": [ "0x543dDb01Ba47acB11de34891cD86B675F04840db", - 10 + 666 ], - "numDeployments": 3, - "solcInputHash": "72863154353a753995d89fd6bb12e809", + "numDeployments": 2, + "solcInputHash": "e6ec032769424f08caf4c37bd4609121", "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_bzzToken\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"_NetworkId\",\"type\":\"uint64\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"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\":false,\"internalType\":\"bytes32\",\"name\":\"slashed\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"StakeFrozen\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"slashed\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"StakeSlashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"stakeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lastUpdatedBlock\",\"type\":\"uint256\"}],\"name\":\"StakeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAUSER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REDISTRIBUTOR_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bzzToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_NetworkId\",\"type\":\"uint64\"}],\"name\":\"changeNetworkId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"nonce\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"depositStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"freezeDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"}],\"name\":\"lastUpdatedBlockNumberOfOverlay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"}],\"name\":\"ownerOfOverlay\",\"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\":[{\"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\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"slashDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"}],\"name\":\"stakeOfOverlay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"stakes\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"stakeAmount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"lastUpdatedBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isValue\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unPause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"}],\"name\":\"usableStakeOfOverlay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdrawFromStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"The Swarm Authors\",\"details\":\"Allows users to stake tokens in order to be eligible for the Redistribution Schelling co-ordination game. Stakes are not withdrawable unless the contract is paused, e.g. in the event of migration to a new staking contract. Stakes are frozen or slashed by the Redistribution contract in response to violations of the protocol.\",\"events\":{\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"RoleAdminChanged(bytes32,bytes32,bytes32)\":{\"details\":\"Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite {RoleAdminChanged} not being emitted signaling this. _Available since v3.1._\"},\"RoleGranted(bytes32,address,address)\":{\"details\":\"Emitted when `account` is granted `role`. `sender` is the account that originated the contract call, an admin role bearer except when using {AccessControl-_setupRole}.\"},\"RoleRevoked(bytes32,address,address)\":{\"details\":\"Emitted when `account` is revoked `role`. `sender` is the account that originated the contract call: - if using `revokeRole`, it is the admin role bearer - if using `renounceRole`, it is the role bearer (i.e. `account`)\"},\"StakeFrozen(bytes32,uint256)\":{\"details\":\"Emitted when a stake for overlay `frozen` for `time` blocks.\"},\"StakeSlashed(bytes32,uint256)\":{\"details\":\"Emitted when a stake for overlay `slashed` is slashed by `amount`.\"},\"StakeUpdated(bytes32,uint256,address,uint256)\":{\"details\":\"Emitted when a stake is created or updated by `owner` of the `overlay` by `stakeamount`, during `lastUpdatedBlock`.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_NetworkId\":\"Swarm network ID\",\"_bzzToken\":\"Address of the staked ERC20 token\"}},\"depositStake(address,bytes32,uint256)\":{\"details\":\"At least `_initialBalancePerChunk*2^depth` number of tokens need to be preapproved for this contract.\",\"params\":{\"_owner\":\"Eth address used for overlay calculation.\",\"amount\":\"Deposited amount of ERC20 tokens.\",\"nonce\":\"Nonce that was used for overlay calculation.\"}},\"freezeDeposit(bytes32,uint256)\":{\"details\":\"Freeze an existing stake, can only be called by the redistributor\",\"params\":{\"overlay\":\"the overlay selected\",\"time\":\"penalty length in blocknumbers\"}},\"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`.\"},\"lastUpdatedBlockNumberOfOverlay(bytes32)\":{\"details\":\"Returns the `lastUpdatedBlockNumber` of `overlay`.\"},\"ownerOfOverlay(bytes32)\":{\"details\":\"Returns the eth address of the owner of `overlay`.\",\"params\":{\"overlay\":\"Overlay of node\"}},\"pause()\":{\"details\":\"Pause the contract. The contract is provably stopped by renouncing the pauser role and the admin role after pausing, can only be called by the `PAUSER`\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"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.\"},\"slashDeposit(bytes32,uint256)\":{\"details\":\"Slash an existing stake, can only be called by the `redistributor`\",\"params\":{\"amount\":\"the amount to be slashed\",\"overlay\":\"the overlay selected\"}},\"stakeOfOverlay(bytes32)\":{\"details\":\"Returns the current `stakeAmount` of `overlay`.\",\"params\":{\"overlay\":\"Overlay of node\"}},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"unPause()\":{\"details\":\"Unpause the contract, can only be called by the pauser when paused\"},\"usableStakeOfOverlay(bytes32)\":{\"details\":\"Returns the current usable `stakeAmount` of `overlay`. Checks whether the stake is currently frozen.\",\"params\":{\"overlay\":\"Overlay of node\"}},\"withdrawFromStake(bytes32,uint256)\":{\"details\":\"Withdraw stake only when the staking contract is paused, can only be called by the owner specific to the associated `overlay`\",\"params\":{\"amount\":\"The amount of ERC20 tokens to be withdrawn\",\"overlay\":\"The overlay to withdraw from\"}}},\"title\":\"Staking contract for the Swarm storage incentives\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"depositStake(address,bytes32,uint256)\":{\"notice\":\"Create a new stake or update an existing one.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/Staking.sol\":\"StakeRegistry\"},\"evmVersion\":\"paris\",\"libraries\":{\":__CACHE_BREAKER__\":\"0x00000000d41867734bbee4c6863d9255b2b06ac1\"},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"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/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/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0x4ffc0547c02ad22925310c585c0f166f8759e2648a09e9b489100c42f15dd98d\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"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\"},\"src/Staking.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.19;\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\n\\n/**\\n * @title Staking contract for the Swarm storage incentives\\n * @author The Swarm Authors\\n * @dev Allows users to stake tokens in order to be eligible for the Redistribution Schelling co-ordination game.\\n * Stakes are not withdrawable unless the contract is paused, e.g. in the event of migration to a new staking\\n * contract. Stakes are frozen or slashed by the Redistribution contract in response to violations of the\\n * protocol.\\n */\\n\\ncontract StakeRegistry is AccessControl, Pausable {\\n /**\\n * @dev Emitted when a stake is created or updated by `owner` of the `overlay` by `stakeamount`, during `lastUpdatedBlock`.\\n */\\n event StakeUpdated(bytes32 indexed overlay, uint256 stakeAmount, address owner, uint256 lastUpdatedBlock);\\n\\n /**\\n * @dev Emitted when a stake for overlay `slashed` is slashed by `amount`.\\n */\\n event StakeSlashed(bytes32 slashed, uint256 amount);\\n\\n /**\\n * @dev Emitted when a stake for overlay `frozen` for `time` blocks.\\n */\\n event StakeFrozen(bytes32 slashed, uint256 time);\\n\\n struct Stake {\\n // Overlay of the node that is being staked\\n bytes32 overlay;\\n // Amount of tokens staked\\n uint256 stakeAmount;\\n // Owner of `overlay`\\n address owner;\\n // Block height the stake was updated\\n uint256 lastUpdatedBlockNumber;\\n // Used to indicate presents in stakes struct\\n bool isValue;\\n }\\n\\n // Associate every stake id with overlay data.\\n mapping(bytes32 => Stake) public stakes;\\n\\n // Role allowed to pause\\n bytes32 public constant PAUSER_ROLE = keccak256(\\\"PAUSER_ROLE\\\");\\n // Role allowed to freeze and slash entries\\n bytes32 public constant REDISTRIBUTOR_ROLE = keccak256(\\\"REDISTRIBUTOR_ROLE\\\");\\n\\n // Swarm network ID\\n uint64 NetworkId;\\n\\n // Address of the staked ERC20 token\\n address public bzzToken;\\n\\n /**\\n * @param _bzzToken Address of the staked ERC20 token\\n * @param _NetworkId Swarm network ID\\n */\\n constructor(address _bzzToken, uint64 _NetworkId) {\\n NetworkId = _NetworkId;\\n bzzToken = _bzzToken;\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n _setupRole(PAUSER_ROLE, msg.sender);\\n }\\n\\n /**\\n * @dev Checks to see if `overlay` is frozen.\\n * @param overlay Overlay of staked overlay\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n */\\n function overlayNotFrozen(bytes32 overlay) internal view returns (bool) {\\n return stakes[overlay].lastUpdatedBlockNumber < block.number;\\n }\\n\\n /**\\n * @dev Returns the current `stakeAmount` of `overlay`.\\n * @param overlay Overlay of node\\n */\\n function stakeOfOverlay(bytes32 overlay) public view returns (uint256) {\\n return stakes[overlay].stakeAmount;\\n }\\n\\n /**\\n * @dev Returns the current usable `stakeAmount` of `overlay`.\\n * Checks whether the stake is currently frozen.\\n * @param overlay Overlay of node\\n */\\n function usableStakeOfOverlay(bytes32 overlay) public view returns (uint256) {\\n return overlayNotFrozen(overlay) ? stakes[overlay].stakeAmount : 0;\\n }\\n\\n /**\\n * @dev Returns the `lastUpdatedBlockNumber` of `overlay`.\\n */\\n function lastUpdatedBlockNumberOfOverlay(bytes32 overlay) public view returns (uint256) {\\n return stakes[overlay].lastUpdatedBlockNumber;\\n }\\n\\n /**\\n * @dev Returns the eth address of the owner of `overlay`.\\n * @param overlay Overlay of node\\n */\\n function ownerOfOverlay(bytes32 overlay) public view returns (address) {\\n return stakes[overlay].owner;\\n }\\n\\n /**\\n * @dev Please both Endians \\ud83e\\udd5a.\\n * @param input Eth address used for overlay calculation.\\n */\\n function reverse(uint64 input) internal pure returns (uint64 v) {\\n v = input;\\n\\n // swap bytes\\n v = ((v & 0xFF00FF00FF00FF00) >> 8) | ((v & 0x00FF00FF00FF00FF) << 8);\\n\\n // swap 2-byte long pairs\\n v = ((v & 0xFFFF0000FFFF0000) >> 16) | ((v & 0x0000FFFF0000FFFF) << 16);\\n\\n // swap 4-byte long pairs\\n v = (v >> 32) | (v << 32);\\n }\\n\\n /**\\n * @notice Create a new stake or update an existing one.\\n * @dev At least `_initialBalancePerChunk*2^depth` number of tokens need to be preapproved for this contract.\\n * @param _owner Eth address used for overlay calculation.\\n * @param nonce Nonce that was used for overlay calculation.\\n * @param amount Deposited amount of ERC20 tokens.\\n */\\n function depositStake(address _owner, bytes32 nonce, uint256 amount) external whenNotPaused {\\n require(_owner == msg.sender, \\\"only owner can update stake\\\");\\n\\n bytes32 overlay = keccak256(abi.encodePacked(_owner, reverse(NetworkId), nonce));\\n\\n uint256 updatedAmount = amount;\\n\\n if (stakes[overlay].isValue) {\\n require(overlayNotFrozen(overlay), \\\"overlay currently frozen\\\");\\n updatedAmount = amount + stakes[overlay].stakeAmount;\\n }\\n\\n require(ERC20(bzzToken).transferFrom(msg.sender, address(this), amount), \\\"failed transfer\\\");\\n\\n emit StakeUpdated(overlay, updatedAmount, _owner, block.number);\\n\\n stakes[overlay] = Stake({\\n owner: _owner,\\n overlay: overlay,\\n stakeAmount: updatedAmount,\\n lastUpdatedBlockNumber: block.number,\\n isValue: true\\n });\\n }\\n\\n /**\\n * @dev Withdraw stake only when the staking contract is paused,\\n * can only be called by the owner specific to the associated `overlay`\\n * @param overlay The overlay to withdraw from\\n * @param amount The amount of ERC20 tokens to be withdrawn\\n */\\n function withdrawFromStake(bytes32 overlay, uint256 amount) external whenPaused {\\n require(stakes[overlay].owner == msg.sender, \\\"only owner can withdraw stake\\\");\\n uint256 withDrawLimit = amount;\\n if (amount > stakes[overlay].stakeAmount) {\\n withDrawLimit = stakes[overlay].stakeAmount;\\n }\\n\\n if (withDrawLimit < stakes[overlay].stakeAmount) {\\n stakes[overlay].stakeAmount -= withDrawLimit;\\n stakes[overlay].lastUpdatedBlockNumber = block.number;\\n require(ERC20(bzzToken).transfer(msg.sender, withDrawLimit), \\\"failed withdrawal\\\");\\n } else {\\n delete stakes[overlay];\\n require(ERC20(bzzToken).transfer(msg.sender, withDrawLimit), \\\"failed withdrawal\\\");\\n }\\n }\\n\\n /**\\n * @dev Freeze an existing stake, can only be called by the redistributor\\n * @param overlay the overlay selected\\n * @param time penalty length in blocknumbers\\n */\\n function freezeDeposit(bytes32 overlay, uint256 time) external {\\n require(hasRole(REDISTRIBUTOR_ROLE, msg.sender), \\\"only redistributor can freeze stake\\\");\\n\\n if (stakes[overlay].isValue) {\\n emit StakeFrozen(overlay, time);\\n stakes[overlay].lastUpdatedBlockNumber = block.number + time;\\n }\\n }\\n\\n /**\\n * @dev Slash an existing stake, can only be called by the `redistributor`\\n * @param overlay the overlay selected\\n * @param amount the amount to be slashed\\n */\\n function slashDeposit(bytes32 overlay, uint256 amount) external {\\n require(hasRole(REDISTRIBUTOR_ROLE, msg.sender), \\\"only redistributor can slash stake\\\");\\n emit StakeSlashed(overlay, amount);\\n if (stakes[overlay].isValue) {\\n if (stakes[overlay].stakeAmount > amount) {\\n stakes[overlay].stakeAmount -= amount;\\n stakes[overlay].lastUpdatedBlockNumber = block.number;\\n } else {\\n delete stakes[overlay];\\n }\\n }\\n }\\n\\n /**\\n * @dev Pause the contract. The contract is provably stopped by renouncing\\n the pauser role and the admin role after pausing, can only be called by the `PAUSER`\\n */\\n function pause() public {\\n require(hasRole(PAUSER_ROLE, msg.sender), \\\"only pauser can pause\\\");\\n _pause();\\n }\\n\\n /**\\n * @dev Unpause the contract, can only be called by the pauser when paused\\n */\\n function unPause() public {\\n require(hasRole(PAUSER_ROLE, msg.sender), \\\"only pauser can unpause\\\");\\n _unpause();\\n }\\n\\n function changeNetworkId(uint64 _NetworkId) external {\\n require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), \\\"only admin can change Network ID\\\");\\n NetworkId = _NetworkId;\\n }\\n}\\n\",\"keccak256\":\"0xb6411f0342250e8a5f95c0478e8e2a3b04b16fdf7d7f4ca70635ba78387d31f7\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", "bytecode": "0x60806040523480156200001157600080fd5b50604051620019e6380380620019e6833981016040819052620000349162000162565b6001805460ff19169055600380546001600160a01b03841668010000000000000000026001600160e01b03199091166001600160401b038416171790556200007e600033620000b2565b620000aa7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33620000b2565b5050620001b7565b620000be8282620000c2565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000be576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200011e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600080604083850312156200017657600080fd5b82516001600160a01b03811681146200018e57600080fd5b60208401519092506001600160401b0381168114620001ac57600080fd5b809150509250929050565b61181f80620001c76000396000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c806391d14854116100e3578063d48bfaeb1161008c578063e63ab1e911610066578063e63ab1e91461041a578063ede4130214610441578063f7b188a51461046457600080fd5b8063d48bfaeb146103e1578063d547741f146103f4578063e34c45271461040757600080fd5b8063a6471a1d116100bd578063a6471a1d14610394578063a6ce31d4146103bb578063abe38543146103ce57600080fd5b806391d1485414610328578063a0d22b211461035f578063a217fddf1461038c57600080fd5b8063420fc4db11610145578063837fd16a1161011f578063837fd16a1461028b5780638456cb591461029e5780638fee6407146102a657600080fd5b8063420fc4db1461022657806348962b931461025d5780635c975abb1461028057600080fd5b8063248a9ca311610176578063248a9ca3146101cf5780632f2ff15d1461020057806336568abe1461021357600080fd5b806301ffc9a7146101925780631ed2cd40146101ba575b600080fd5b6101a56101a0366004611537565b61046c565b60405190151581526020015b60405180910390f35b6101cd6101c8366004611595565b610505565b005b6101f26101dd3660046115c8565b60009081526020819052604090206001015490565b6040519081526020016101b1565b6101cd61020e3660046115e1565b6108a9565b6101cd6102213660046115e1565b6108d3565b600354610245906801000000000000000090046001600160a01b031681565b6040516001600160a01b0390911681526020016101b1565b6101f261026b3660046115c8565b60009081526002602052604090206001015490565b60015460ff166101a5565b6101cd61029936600461160d565b61095f565b6101cd610a76565b6102f06102b43660046115c8565b6002602081905260009182526040909120805460018201549282015460038301546004909301549193926001600160a01b039091169160ff1685565b6040805195865260208601949094526001600160a01b039092169284019290925260608301919091521515608082015260a0016101b1565b6101a56103363660046115e1565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61024561036d3660046115c8565b600090815260026020819052604090912001546001600160a01b031690565b6101f2600081565b6101f27f3e35b14a9f4fef84b59f9bdcd3044fc28783144b7e42bfb2cd075e6a02cb082881565b6101cd6103c936600461160d565b610afe565b6101f26103dc3660046115c8565b610c9a565b6101cd6103ef36600461162f565b610ccf565b6101cd6104023660046115e1565b610d71565b6101cd61041536600461160d565b610d96565b6101f27f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6101f261044f3660046115c8565b60009081526002602052604090206003015490565b6101cd610fe8565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806104ff57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b61050d61106e565b6001600160a01b038316331461056a5760405162461bcd60e51b815260206004820152601b60248201527f6f6e6c79206f776e65722063616e20757064617465207374616b65000000000060448201526064015b60405180910390fd5b600354600090849065ff000000ff00600882811b91821664ff000000ff9390911c92831617601090811b67ff000000ff0000009290921666ff000000ff0000939093169290921790911c17602081811b6bffffffffffffffff000000001691901c63ffffffff161760405160609290921b6bffffffffffffffffffffffff1916602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166034820152603c8101849052605c0160408051601f19818403018152918152815160209283012060008181526002909352912060040154909150829060ff16156106d75760008281526002602052604090206003015443116106b85760405162461bcd60e51b815260206004820152601860248201527f6f7665726c61792063757272656e746c792066726f7a656e00000000000000006044820152606401610561565b6000828152600260205260409020600101546106d4908461166f565b90505b6003546040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101859052680100000000000000009091046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610752573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107769190611682565b6107c25760405162461bcd60e51b815260206004820152600f60248201527f6661696c6564207472616e7366657200000000000000000000000000000000006044820152606401610561565b604080518281526001600160a01b03871660208201524381830152905183917f61e979698346a2aa868a3a9f08d30c846174841dc9b074bbf2a82d20554bc682919081900360600190a26040805160a08101825283815260208082019384526001600160a01b039788168284019081524360608401908152600160808501818152600098895260029485905295909720935184559451958301959095559351938101805473ffffffffffffffffffffffffffffffffffffffff1916949097169390931790955551600382015592516004909301805460ff1916931515939093179092555050565b6000828152602081905260409020600101546108c4816110c1565b6108ce83836110ce565b505050565b6001600160a01b03811633146109515760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610561565b61095b828261116c565b5050565b3360009081527f10fa80d2e578284bf61a483a3da84fbdd683a7e7256a9895dc4461ac543f4a16602052604090205460ff16610a035760405162461bcd60e51b815260206004820152602360248201527f6f6e6c792072656469737472696275746f722063616e20667265657a6520737460448201527f616b6500000000000000000000000000000000000000000000000000000000006064820152608401610561565b60008281526002602052604090206004015460ff161561095b5760408051838152602081018390527f340439a63c1ee2404f5b7010cab559b4dcbfc28b8baab9acade354fd688ae2b9910160405180910390a1610a60814361166f565b6000838152600260205260409020600301555050565b3360009081527ff7c9542c591017a21c74b6f3fab6263c7952fc0aaf9db4c22a2a04ddc7f8674f602052604090205460ff16610af45760405162461bcd60e51b815260206004820152601560248201527f6f6e6c79207061757365722063616e20706175736500000000000000000000006044820152606401610561565b610afc6111eb565b565b3360009081527f10fa80d2e578284bf61a483a3da84fbdd683a7e7256a9895dc4461ac543f4a16602052604090205460ff16610ba25760405162461bcd60e51b815260206004820152602260248201527f6f6e6c792072656469737472696275746f722063616e20736c6173682073746160448201527f6b650000000000000000000000000000000000000000000000000000000000006064820152608401610561565b60408051838152602081018390527f0956b50d4d586f6b9c90800d4e713bd2b866e044decd047e6d70ea20314ab308910160405180910390a160008281526002602052604090206004015460ff161561095b57600082815260026020526040902060010154811015610c4c5760008281526002602052604081206001018054839290610c2f9084906116a4565b909155505050600090815260026020526040902043600390910155565b506000908152600260208190526040822082815560018101839055908101805473ffffffffffffffffffffffffffffffffffffffff191690556003810191909155600401805460ff19169055565b6000818152600260205260408120600301544311610cb95760006104ff565b5060009081526002602052604090206001015490565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610d4d5760405162461bcd60e51b815260206004820181905260248201527f6f6e6c792061646d696e2063616e206368616e6765204e6574776f726b2049446044820152606401610561565b6003805467ffffffffffffffff191667ffffffffffffffff92909216919091179055565b600082815260208190526040902060010154610d8c816110c1565b6108ce838361116c565b610d9e61123f565b600082815260026020819052604090912001546001600160a01b03163314610e085760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c79206f776e65722063616e207769746864726177207374616b650000006044820152606401610561565b6000828152600260205260409020600101548190811115610e3757506000828152600260205260409020600101545b600083815260026020526040902060010154811015610f575760008381526002602052604081206001018054839290610e719084906116a4565b9091555050600083815260026020526040908190204360039182015554905163a9059cbb60e01b815233600482015260248101839052680100000000000000009091046001600160a01b03169063a9059cbb906044015b6020604051808303816000875af1158015610ee7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0b9190611682565b6108ce5760405162461bcd60e51b815260206004820152601160248201527f6661696c6564207769746864726177616c0000000000000000000000000000006044820152606401610561565b600083815260026020819052604080832083815560018101849055918201805473ffffffffffffffffffffffffffffffffffffffff191690556003808301939093556004918201805460ff191690559154915163a9059cbb60e01b8152339181019190915260248101839052680100000000000000009091046001600160a01b03169063a9059cbb90604401610ec8565b3360009081527ff7c9542c591017a21c74b6f3fab6263c7952fc0aaf9db4c22a2a04ddc7f8674f602052604090205460ff166110665760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79207061757365722063616e20756e70617573650000000000000000006044820152606401610561565b610afc611291565b60015460ff1615610afc5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610561565b6110cb81336112ca565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661095b576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111283390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff161561095b576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6111f361106e565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b60015460ff16610afc5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610561565b61129961123f565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611222565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661095b576112fb8161133d565b61130683602061134f565b6040516020016113179291906116db565b60408051601f198184030181529082905262461bcd60e51b82526105619160040161175c565b60606104ff6001600160a01b03831660145b6060600061135e83600261178f565b61136990600261166f565b67ffffffffffffffff811115611381576113816117a6565b6040519080825280601f01601f1916602001820160405280156113ab576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106113e2576113e26117bc565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061142d5761142d6117bc565b60200101906001600160f81b031916908160001a905350600061145184600261178f565b61145c90600161166f565b90505b60018111156114e1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061149d5761149d6117bc565b1a60f81b8282815181106114b3576114b36117bc565b60200101906001600160f81b031916908160001a90535060049490941c936114da816117d2565b905061145f565b5083156115305760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610561565b9392505050565b60006020828403121561154957600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461153057600080fd5b80356001600160a01b038116811461159057600080fd5b919050565b6000806000606084860312156115aa57600080fd5b6115b384611579565b95602085013595506040909401359392505050565b6000602082840312156115da57600080fd5b5035919050565b600080604083850312156115f457600080fd5b8235915061160460208401611579565b90509250929050565b6000806040838503121561162057600080fd5b50508035926020909101359150565b60006020828403121561164157600080fd5b813567ffffffffffffffff8116811461153057600080fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156104ff576104ff611659565b60006020828403121561169457600080fd5b8151801515811461153057600080fd5b818103818111156104ff576104ff611659565b60005b838110156116d25781810151838201526020016116ba565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516117138160178501602088016116b7565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516117508160288401602088016116b7565b01602801949350505050565b602081526000825180602084015261177b8160408501602087016116b7565b601f01601f19169190910160400192915050565b80820281158282048414176104ff576104ff611659565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816117e1576117e1611659565b50600019019056fea2646970667358221220367efbc2ea2942295a59f5bc7e915bf7eaa0a4cba4a32890457582de2d4a566064736f6c63430008130033", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061018d5760003560e01c806391d14854116100e3578063d48bfaeb1161008c578063e63ab1e911610066578063e63ab1e91461041a578063ede4130214610441578063f7b188a51461046457600080fd5b8063d48bfaeb146103e1578063d547741f146103f4578063e34c45271461040757600080fd5b8063a6471a1d116100bd578063a6471a1d14610394578063a6ce31d4146103bb578063abe38543146103ce57600080fd5b806391d1485414610328578063a0d22b211461035f578063a217fddf1461038c57600080fd5b8063420fc4db11610145578063837fd16a1161011f578063837fd16a1461028b5780638456cb591461029e5780638fee6407146102a657600080fd5b8063420fc4db1461022657806348962b931461025d5780635c975abb1461028057600080fd5b8063248a9ca311610176578063248a9ca3146101cf5780632f2ff15d1461020057806336568abe1461021357600080fd5b806301ffc9a7146101925780631ed2cd40146101ba575b600080fd5b6101a56101a0366004611537565b61046c565b60405190151581526020015b60405180910390f35b6101cd6101c8366004611595565b610505565b005b6101f26101dd3660046115c8565b60009081526020819052604090206001015490565b6040519081526020016101b1565b6101cd61020e3660046115e1565b6108a9565b6101cd6102213660046115e1565b6108d3565b600354610245906801000000000000000090046001600160a01b031681565b6040516001600160a01b0390911681526020016101b1565b6101f261026b3660046115c8565b60009081526002602052604090206001015490565b60015460ff166101a5565b6101cd61029936600461160d565b61095f565b6101cd610a76565b6102f06102b43660046115c8565b6002602081905260009182526040909120805460018201549282015460038301546004909301549193926001600160a01b039091169160ff1685565b6040805195865260208601949094526001600160a01b039092169284019290925260608301919091521515608082015260a0016101b1565b6101a56103363660046115e1565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61024561036d3660046115c8565b600090815260026020819052604090912001546001600160a01b031690565b6101f2600081565b6101f27f3e35b14a9f4fef84b59f9bdcd3044fc28783144b7e42bfb2cd075e6a02cb082881565b6101cd6103c936600461160d565b610afe565b6101f26103dc3660046115c8565b610c9a565b6101cd6103ef36600461162f565b610ccf565b6101cd6104023660046115e1565b610d71565b6101cd61041536600461160d565b610d96565b6101f27f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6101f261044f3660046115c8565b60009081526002602052604090206003015490565b6101cd610fe8565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806104ff57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b61050d61106e565b6001600160a01b038316331461056a5760405162461bcd60e51b815260206004820152601b60248201527f6f6e6c79206f776e65722063616e20757064617465207374616b65000000000060448201526064015b60405180910390fd5b600354600090849065ff000000ff00600882811b91821664ff000000ff9390911c92831617601090811b67ff000000ff0000009290921666ff000000ff0000939093169290921790911c17602081811b6bffffffffffffffff000000001691901c63ffffffff161760405160609290921b6bffffffffffffffffffffffff1916602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166034820152603c8101849052605c0160408051601f19818403018152918152815160209283012060008181526002909352912060040154909150829060ff16156106d75760008281526002602052604090206003015443116106b85760405162461bcd60e51b815260206004820152601860248201527f6f7665726c61792063757272656e746c792066726f7a656e00000000000000006044820152606401610561565b6000828152600260205260409020600101546106d4908461166f565b90505b6003546040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101859052680100000000000000009091046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610752573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107769190611682565b6107c25760405162461bcd60e51b815260206004820152600f60248201527f6661696c6564207472616e7366657200000000000000000000000000000000006044820152606401610561565b604080518281526001600160a01b03871660208201524381830152905183917f61e979698346a2aa868a3a9f08d30c846174841dc9b074bbf2a82d20554bc682919081900360600190a26040805160a08101825283815260208082019384526001600160a01b039788168284019081524360608401908152600160808501818152600098895260029485905295909720935184559451958301959095559351938101805473ffffffffffffffffffffffffffffffffffffffff1916949097169390931790955551600382015592516004909301805460ff1916931515939093179092555050565b6000828152602081905260409020600101546108c4816110c1565b6108ce83836110ce565b505050565b6001600160a01b03811633146109515760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610561565b61095b828261116c565b5050565b3360009081527f10fa80d2e578284bf61a483a3da84fbdd683a7e7256a9895dc4461ac543f4a16602052604090205460ff16610a035760405162461bcd60e51b815260206004820152602360248201527f6f6e6c792072656469737472696275746f722063616e20667265657a6520737460448201527f616b6500000000000000000000000000000000000000000000000000000000006064820152608401610561565b60008281526002602052604090206004015460ff161561095b5760408051838152602081018390527f340439a63c1ee2404f5b7010cab559b4dcbfc28b8baab9acade354fd688ae2b9910160405180910390a1610a60814361166f565b6000838152600260205260409020600301555050565b3360009081527ff7c9542c591017a21c74b6f3fab6263c7952fc0aaf9db4c22a2a04ddc7f8674f602052604090205460ff16610af45760405162461bcd60e51b815260206004820152601560248201527f6f6e6c79207061757365722063616e20706175736500000000000000000000006044820152606401610561565b610afc6111eb565b565b3360009081527f10fa80d2e578284bf61a483a3da84fbdd683a7e7256a9895dc4461ac543f4a16602052604090205460ff16610ba25760405162461bcd60e51b815260206004820152602260248201527f6f6e6c792072656469737472696275746f722063616e20736c6173682073746160448201527f6b650000000000000000000000000000000000000000000000000000000000006064820152608401610561565b60408051838152602081018390527f0956b50d4d586f6b9c90800d4e713bd2b866e044decd047e6d70ea20314ab308910160405180910390a160008281526002602052604090206004015460ff161561095b57600082815260026020526040902060010154811015610c4c5760008281526002602052604081206001018054839290610c2f9084906116a4565b909155505050600090815260026020526040902043600390910155565b506000908152600260208190526040822082815560018101839055908101805473ffffffffffffffffffffffffffffffffffffffff191690556003810191909155600401805460ff19169055565b6000818152600260205260408120600301544311610cb95760006104ff565b5060009081526002602052604090206001015490565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610d4d5760405162461bcd60e51b815260206004820181905260248201527f6f6e6c792061646d696e2063616e206368616e6765204e6574776f726b2049446044820152606401610561565b6003805467ffffffffffffffff191667ffffffffffffffff92909216919091179055565b600082815260208190526040902060010154610d8c816110c1565b6108ce838361116c565b610d9e61123f565b600082815260026020819052604090912001546001600160a01b03163314610e085760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c79206f776e65722063616e207769746864726177207374616b650000006044820152606401610561565b6000828152600260205260409020600101548190811115610e3757506000828152600260205260409020600101545b600083815260026020526040902060010154811015610f575760008381526002602052604081206001018054839290610e719084906116a4565b9091555050600083815260026020526040908190204360039182015554905163a9059cbb60e01b815233600482015260248101839052680100000000000000009091046001600160a01b03169063a9059cbb906044015b6020604051808303816000875af1158015610ee7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0b9190611682565b6108ce5760405162461bcd60e51b815260206004820152601160248201527f6661696c6564207769746864726177616c0000000000000000000000000000006044820152606401610561565b600083815260026020819052604080832083815560018101849055918201805473ffffffffffffffffffffffffffffffffffffffff191690556003808301939093556004918201805460ff191690559154915163a9059cbb60e01b8152339181019190915260248101839052680100000000000000009091046001600160a01b03169063a9059cbb90604401610ec8565b3360009081527ff7c9542c591017a21c74b6f3fab6263c7952fc0aaf9db4c22a2a04ddc7f8674f602052604090205460ff166110665760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79207061757365722063616e20756e70617573650000000000000000006044820152606401610561565b610afc611291565b60015460ff1615610afc5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610561565b6110cb81336112ca565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661095b576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111283390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff161561095b576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6111f361106e565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b60015460ff16610afc5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610561565b61129961123f565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611222565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661095b576112fb8161133d565b61130683602061134f565b6040516020016113179291906116db565b60408051601f198184030181529082905262461bcd60e51b82526105619160040161175c565b60606104ff6001600160a01b03831660145b6060600061135e83600261178f565b61136990600261166f565b67ffffffffffffffff811115611381576113816117a6565b6040519080825280601f01601f1916602001820160405280156113ab576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106113e2576113e26117bc565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061142d5761142d6117bc565b60200101906001600160f81b031916908160001a905350600061145184600261178f565b61145c90600161166f565b90505b60018111156114e1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061149d5761149d6117bc565b1a60f81b8282815181106114b3576114b36117bc565b60200101906001600160f81b031916908160001a90535060049490941c936114da816117d2565b905061145f565b5083156115305760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610561565b9392505050565b60006020828403121561154957600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461153057600080fd5b80356001600160a01b038116811461159057600080fd5b919050565b6000806000606084860312156115aa57600080fd5b6115b384611579565b95602085013595506040909401359392505050565b6000602082840312156115da57600080fd5b5035919050565b600080604083850312156115f457600080fd5b8235915061160460208401611579565b90509250929050565b6000806040838503121561162057600080fd5b50508035926020909101359150565b60006020828403121561164157600080fd5b813567ffffffffffffffff8116811461153057600080fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156104ff576104ff611659565b60006020828403121561169457600080fd5b8151801515811461153057600080fd5b818103818111156104ff576104ff611659565b60005b838110156116d25781810151838201526020016116ba565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516117138160178501602088016116b7565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516117508160288401602088016116b7565b01602801949350505050565b602081526000825180602084015261177b8160408501602087016116b7565b601f01601f19169190910160400192915050565b80820281158282048414176104ff576104ff611659565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816117e1576117e1611659565b50600019019056fea2646970667358221220367efbc2ea2942295a59f5bc7e915bf7eaa0a4cba4a32890457582de2d4a566064736f6c63430008130033", @@ -790,15 +790,15 @@ "type": "t_bool" }, { - "astId": 9748, + "astId": 9702, "contract": "src/Staking.sol:StakeRegistry", "label": "stakes", "offset": 0, "slot": "2", - "type": "t_mapping(t_bytes32,t_struct(Stake)9743_storage)" + "type": "t_mapping(t_bytes32,t_struct(Stake)9697_storage)" }, { - "astId": 9760, + "astId": 9714, "contract": "src/Staking.sol:StakeRegistry", "label": "NetworkId", "offset": 0, @@ -806,7 +806,7 @@ "type": "t_uint64" }, { - "astId": 9762, + "astId": 9716, "contract": "src/Staking.sol:StakeRegistry", "label": "bzzToken", "offset": 8, @@ -844,12 +844,12 @@ "numberOfBytes": "32", "value": "t_struct(RoleData)19_storage" }, - "t_mapping(t_bytes32,t_struct(Stake)9743_storage)": { + "t_mapping(t_bytes32,t_struct(Stake)9697_storage)": { "encoding": "mapping", "key": "t_bytes32", "label": "mapping(bytes32 => struct StakeRegistry.Stake)", "numberOfBytes": "32", - "value": "t_struct(Stake)9743_storage" + "value": "t_struct(Stake)9697_storage" }, "t_struct(RoleData)19_storage": { "encoding": "inplace", @@ -874,12 +874,12 @@ ], "numberOfBytes": "64" }, - "t_struct(Stake)9743_storage": { + "t_struct(Stake)9697_storage": { "encoding": "inplace", "label": "struct StakeRegistry.Stake", "members": [ { - "astId": 9734, + "astId": 9688, "contract": "src/Staking.sol:StakeRegistry", "label": "overlay", "offset": 0, @@ -887,7 +887,7 @@ "type": "t_bytes32" }, { - "astId": 9736, + "astId": 9690, "contract": "src/Staking.sol:StakeRegistry", "label": "stakeAmount", "offset": 0, @@ -895,7 +895,7 @@ "type": "t_uint256" }, { - "astId": 9738, + "astId": 9692, "contract": "src/Staking.sol:StakeRegistry", "label": "owner", "offset": 0, @@ -903,7 +903,7 @@ "type": "t_address" }, { - "astId": 9740, + "astId": 9694, "contract": "src/Staking.sol:StakeRegistry", "label": "lastUpdatedBlockNumber", "offset": 0, @@ -911,7 +911,7 @@ "type": "t_uint256" }, { - "astId": 9742, + "astId": 9696, "contract": "src/Staking.sol:StakeRegistry", "label": "isValue", "offset": 0, diff --git a/testnet_deployed.json b/testnet_deployed.json index 38c2aa58..bdaaf42c 100644 --- a/testnet_deployed.json +++ b/testnet_deployed.json @@ -1,6 +1,6 @@ { "chainId": 11155111, - "swarmNetworkId": 333, + "swarmNetworkId": 10, "contracts": { "bzzToken": { "abi": [ @@ -1266,9 +1266,9 @@ } ], "bytecode": "0x60806040523480156200001157600080fd5b50604051620019e6380380620019e6833981016040819052620000349162000162565b6001805460ff19169055600380546001600160a01b03841668010000000000000000026001600160e01b03199091166001600160401b038416171790556200007e600033620000b2565b620000aa7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a33620000b2565b5050620001b7565b620000be8282620000c2565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000be576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200011e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600080604083850312156200017657600080fd5b82516001600160a01b03811681146200018e57600080fd5b60208401519092506001600160401b0381168114620001ac57600080fd5b809150509250929050565b61181f80620001c76000396000f3fe608060405234801561001057600080fd5b506004361061018d5760003560e01c806391d14854116100e3578063d48bfaeb1161008c578063e63ab1e911610066578063e63ab1e91461041a578063ede4130214610441578063f7b188a51461046457600080fd5b8063d48bfaeb146103e1578063d547741f146103f4578063e34c45271461040757600080fd5b8063a6471a1d116100bd578063a6471a1d14610394578063a6ce31d4146103bb578063abe38543146103ce57600080fd5b806391d1485414610328578063a0d22b211461035f578063a217fddf1461038c57600080fd5b8063420fc4db11610145578063837fd16a1161011f578063837fd16a1461028b5780638456cb591461029e5780638fee6407146102a657600080fd5b8063420fc4db1461022657806348962b931461025d5780635c975abb1461028057600080fd5b8063248a9ca311610176578063248a9ca3146101cf5780632f2ff15d1461020057806336568abe1461021357600080fd5b806301ffc9a7146101925780631ed2cd40146101ba575b600080fd5b6101a56101a0366004611537565b61046c565b60405190151581526020015b60405180910390f35b6101cd6101c8366004611595565b610505565b005b6101f26101dd3660046115c8565b60009081526020819052604090206001015490565b6040519081526020016101b1565b6101cd61020e3660046115e1565b6108a9565b6101cd6102213660046115e1565b6108d3565b600354610245906801000000000000000090046001600160a01b031681565b6040516001600160a01b0390911681526020016101b1565b6101f261026b3660046115c8565b60009081526002602052604090206001015490565b60015460ff166101a5565b6101cd61029936600461160d565b61095f565b6101cd610a76565b6102f06102b43660046115c8565b6002602081905260009182526040909120805460018201549282015460038301546004909301549193926001600160a01b039091169160ff1685565b6040805195865260208601949094526001600160a01b039092169284019290925260608301919091521515608082015260a0016101b1565b6101a56103363660046115e1565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61024561036d3660046115c8565b600090815260026020819052604090912001546001600160a01b031690565b6101f2600081565b6101f27f3e35b14a9f4fef84b59f9bdcd3044fc28783144b7e42bfb2cd075e6a02cb082881565b6101cd6103c936600461160d565b610afe565b6101f26103dc3660046115c8565b610c9a565b6101cd6103ef36600461162f565b610ccf565b6101cd6104023660046115e1565b610d71565b6101cd61041536600461160d565b610d96565b6101f27f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6101f261044f3660046115c8565b60009081526002602052604090206003015490565b6101cd610fe8565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806104ff57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b61050d61106e565b6001600160a01b038316331461056a5760405162461bcd60e51b815260206004820152601b60248201527f6f6e6c79206f776e65722063616e20757064617465207374616b65000000000060448201526064015b60405180910390fd5b600354600090849065ff000000ff00600882811b91821664ff000000ff9390911c92831617601090811b67ff000000ff0000009290921666ff000000ff0000939093169290921790911c17602081811b6bffffffffffffffff000000001691901c63ffffffff161760405160609290921b6bffffffffffffffffffffffff1916602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166034820152603c8101849052605c0160408051601f19818403018152918152815160209283012060008181526002909352912060040154909150829060ff16156106d75760008281526002602052604090206003015443116106b85760405162461bcd60e51b815260206004820152601860248201527f6f7665726c61792063757272656e746c792066726f7a656e00000000000000006044820152606401610561565b6000828152600260205260409020600101546106d4908461166f565b90505b6003546040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101859052680100000000000000009091046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610752573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107769190611682565b6107c25760405162461bcd60e51b815260206004820152600f60248201527f6661696c6564207472616e7366657200000000000000000000000000000000006044820152606401610561565b604080518281526001600160a01b03871660208201524381830152905183917f61e979698346a2aa868a3a9f08d30c846174841dc9b074bbf2a82d20554bc682919081900360600190a26040805160a08101825283815260208082019384526001600160a01b039788168284019081524360608401908152600160808501818152600098895260029485905295909720935184559451958301959095559351938101805473ffffffffffffffffffffffffffffffffffffffff1916949097169390931790955551600382015592516004909301805460ff1916931515939093179092555050565b6000828152602081905260409020600101546108c4816110c1565b6108ce83836110ce565b505050565b6001600160a01b03811633146109515760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610561565b61095b828261116c565b5050565b3360009081527f10fa80d2e578284bf61a483a3da84fbdd683a7e7256a9895dc4461ac543f4a16602052604090205460ff16610a035760405162461bcd60e51b815260206004820152602360248201527f6f6e6c792072656469737472696275746f722063616e20667265657a6520737460448201527f616b6500000000000000000000000000000000000000000000000000000000006064820152608401610561565b60008281526002602052604090206004015460ff161561095b5760408051838152602081018390527f340439a63c1ee2404f5b7010cab559b4dcbfc28b8baab9acade354fd688ae2b9910160405180910390a1610a60814361166f565b6000838152600260205260409020600301555050565b3360009081527ff7c9542c591017a21c74b6f3fab6263c7952fc0aaf9db4c22a2a04ddc7f8674f602052604090205460ff16610af45760405162461bcd60e51b815260206004820152601560248201527f6f6e6c79207061757365722063616e20706175736500000000000000000000006044820152606401610561565b610afc6111eb565b565b3360009081527f10fa80d2e578284bf61a483a3da84fbdd683a7e7256a9895dc4461ac543f4a16602052604090205460ff16610ba25760405162461bcd60e51b815260206004820152602260248201527f6f6e6c792072656469737472696275746f722063616e20736c6173682073746160448201527f6b650000000000000000000000000000000000000000000000000000000000006064820152608401610561565b60408051838152602081018390527f0956b50d4d586f6b9c90800d4e713bd2b866e044decd047e6d70ea20314ab308910160405180910390a160008281526002602052604090206004015460ff161561095b57600082815260026020526040902060010154811015610c4c5760008281526002602052604081206001018054839290610c2f9084906116a4565b909155505050600090815260026020526040902043600390910155565b506000908152600260208190526040822082815560018101839055908101805473ffffffffffffffffffffffffffffffffffffffff191690556003810191909155600401805460ff19169055565b6000818152600260205260408120600301544311610cb95760006104ff565b5060009081526002602052604090206001015490565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610d4d5760405162461bcd60e51b815260206004820181905260248201527f6f6e6c792061646d696e2063616e206368616e6765204e6574776f726b2049446044820152606401610561565b6003805467ffffffffffffffff191667ffffffffffffffff92909216919091179055565b600082815260208190526040902060010154610d8c816110c1565b6108ce838361116c565b610d9e61123f565b600082815260026020819052604090912001546001600160a01b03163314610e085760405162461bcd60e51b815260206004820152601d60248201527f6f6e6c79206f776e65722063616e207769746864726177207374616b650000006044820152606401610561565b6000828152600260205260409020600101548190811115610e3757506000828152600260205260409020600101545b600083815260026020526040902060010154811015610f575760008381526002602052604081206001018054839290610e719084906116a4565b9091555050600083815260026020526040908190204360039182015554905163a9059cbb60e01b815233600482015260248101839052680100000000000000009091046001600160a01b03169063a9059cbb906044015b6020604051808303816000875af1158015610ee7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0b9190611682565b6108ce5760405162461bcd60e51b815260206004820152601160248201527f6661696c6564207769746864726177616c0000000000000000000000000000006044820152606401610561565b600083815260026020819052604080832083815560018101849055918201805473ffffffffffffffffffffffffffffffffffffffff191690556003808301939093556004918201805460ff191690559154915163a9059cbb60e01b8152339181019190915260248101839052680100000000000000009091046001600160a01b03169063a9059cbb90604401610ec8565b3360009081527ff7c9542c591017a21c74b6f3fab6263c7952fc0aaf9db4c22a2a04ddc7f8674f602052604090205460ff166110665760405162461bcd60e51b815260206004820152601760248201527f6f6e6c79207061757365722063616e20756e70617573650000000000000000006044820152606401610561565b610afc611291565b60015460ff1615610afc5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610561565b6110cb81336112ca565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661095b576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111283390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff161561095b576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6111f361106e565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b60015460ff16610afc5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610561565b61129961123f565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611222565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661095b576112fb8161133d565b61130683602061134f565b6040516020016113179291906116db565b60408051601f198184030181529082905262461bcd60e51b82526105619160040161175c565b60606104ff6001600160a01b03831660145b6060600061135e83600261178f565b61136990600261166f565b67ffffffffffffffff811115611381576113816117a6565b6040519080825280601f01601f1916602001820160405280156113ab576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106113e2576113e26117bc565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061142d5761142d6117bc565b60200101906001600160f81b031916908160001a905350600061145184600261178f565b61145c90600161166f565b90505b60018111156114e1577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061149d5761149d6117bc565b1a60f81b8282815181106114b3576114b36117bc565b60200101906001600160f81b031916908160001a90535060049490941c936114da816117d2565b905061145f565b5083156115305760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610561565b9392505050565b60006020828403121561154957600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461153057600080fd5b80356001600160a01b038116811461159057600080fd5b919050565b6000806000606084860312156115aa57600080fd5b6115b384611579565b95602085013595506040909401359392505050565b6000602082840312156115da57600080fd5b5035919050565b600080604083850312156115f457600080fd5b8235915061160460208401611579565b90509250929050565b6000806040838503121561162057600080fd5b50508035926020909101359150565b60006020828403121561164157600080fd5b813567ffffffffffffffff8116811461153057600080fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156104ff576104ff611659565b60006020828403121561169457600080fd5b8151801515811461153057600080fd5b818103818111156104ff576104ff611659565b60005b838110156116d25781810151838201526020016116ba565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516117138160178501602088016116b7565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516117508160288401602088016116b7565b01602801949350505050565b602081526000825180602084015261177b8160408501602087016116b7565b601f01601f19169190910160400192915050565b80820281158282048414176104ff576104ff611659565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816117e1576117e1611659565b50600019019056fea2646970667358221220367efbc2ea2942295a59f5bc7e915bf7eaa0a4cba4a32890457582de2d4a566064736f6c63430008130033", - "address": "0x4951B2789Cc8699f69959DA3DA0F7fd6FbD31Cd7", - "block": 5855600, - "url": "https://sepolia.etherscan.io/address/0x4951B2789Cc8699f69959DA3DA0F7fd6FbD31Cd7" + "address": "0x41379955a216968996D10614B74b31AA48a0624A", + "block": 4660478, + "url": "https://sepolia.etherscan.io/address/0x41379955a216968996D10614B74b31AA48a0624A" }, "postageStamp": { "abi": [ @@ -1492,25 +1492,6 @@ "name": "BatchTopUp", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "batchId", - "type": "bytes32" - } - ], - "name": "CopyBatchFailed", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -1905,51 +1886,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "batchId", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "uint8", - "name": "depth", - "type": "uint8" - }, - { - "internalType": "uint8", - "name": "bucketDepth", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "immutableFlag", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "remainingBalance", - "type": "uint256" - } - ], - "internalType": "struct PostageStamp.ImportBatch[]", - "name": "bulkBatches", - "type": "tuple[]" - } - ], - "name": "copyBatchBulk", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -2414,10 +2350,10 @@ "type": "function" } ], - "bytecode": "0x60e060405260098054600160401b600160801b03191669438000000000000000001790553480156200003057600080fd5b5060405162003bc938038062003bc98339810160408190526200005391620001c4565b600180546001600160b01b0319166101006001600160a01b0385160260ff60a81b191617600160a81b60ff8416021790557f1337d7d57528a8879766fdf2d0456253114c66c4fc263c97168bfdb007c64c666080527f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a60a0527f3e35b14a9f4fef84b59f9bdcd3044fc28783144b7e42bfb2cd075e6a02cb082860c052620000fd60003362000114565b60a0516200010c903362000114565b505062000213565b62000120828262000124565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000120576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001803390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008060408385031215620001d857600080fd5b82516001600160a01b0381168114620001f057600080fd5b602084015190925060ff811681146200020857600080fd5b809150509250929050565b60805160a05160c05161396a6200025f600039600081816105bb015261118b01526000818161075e015281816118ad0152611e2b015260008181610609015261199e015261396a6000f3fe608060405234801561001057600080fd5b50600436106102f45760003560e01c806381e508b911610191578063b998902f116100e3578063dd483cfb11610097578063ea612e1f11610071578063ea612e1f14610780578063f7b188a514610789578063f90ce5ba1461079157600080fd5b8063dd483cfb14610716578063df67438514610736578063e63ab1e91461075957600080fd5b8063d547741f116100c8578063d547741f146106c6578063d71ba7c4146106d9578063d968f44b146106ec57600080fd5b8063b998902f14610604578063c81e25ab1461062b57600080fd5b806391b7f5ed11610145578063a6471a1d1161011f578063a6471a1d146105b6578063a81064ee146105dd578063b67644b9146105f157600080fd5b806391b7f5ed1461056457806391d1485414610577578063a217fddf146105ae57600080fd5b80638a5e8e32116101765780638a5e8e321461054b5780638b82547f14610554578063906978421461055c57600080fd5b806381e508b91461051f5780638456cb591461054357600080fd5b8063420fc4db1161024a57806351b17cd0116101fe5780635c975abb116101d85780635c975abb146104f9578063628de87714610504578063711bfa2b1461051757600080fd5b806351b17cd0146104cb57806351cff8d9146104d35780635239af71146104e657600080fd5b806347aab79b1161022f57806347aab79b1461049c5780634ba2363a146104af5780634bb13e34146104b857600080fd5b8063420fc4db1461045a57806344beae8e1461047257600080fd5b80632182ddb1116102ac5780632f2ff15d116102865780632f2ff15d146103f857806332ac57dd1461040b57806336568abe1461044757600080fd5b80632182ddb11461037e578063248a9ca3146103bf57806324b570a9146103f057600080fd5b80631889b99b116102dd5780631889b99b1461034e57806318c8572f146103565780631a37b4851461036b57600080fd5b806301ffc9a7146102f9578063053f14da14610321575b600080fd5b61030c610307366004613427565b6107ac565b60405190151581526020015b60405180910390f35b6009546103359067ffffffffffffffff1681565b60405167ffffffffffffffff9091168152602001610318565b61030c610845565b6103696103643660046134aa565b610857565b005b610369610379366004613514565b610af1565b6103a761038c36600461353e565b6000908152600260205260409020546001600160a01b031690565b6040516001600160a01b039091168152602001610318565b6103e26103cd36600461353e565b60009081526020819052604090206001015490565b604051908152602001610318565b6103e2610b87565b610369610406366004613557565b610c3a565b61043561041936600461353e565b600090815260026020526040902054600160a81b900460ff1690565b60405160ff9091168152602001610318565b610369610455366004613557565b610c64565b6001546103a79061010090046001600160a01b031681565b61043561048036600461353e565b600090815260026020526040902054600160a01b900460ff1690565b6103696104aa366004613583565b610cf5565b6103e260075481565b6103696104c63660046135a6565b610fa8565b6103e2611131565b6103696104e136600461361b565b611189565b6103e26104f43660046134aa565b611306565b60015460ff1661030c565b61036961051236600461353e565b611664565b61030c611882565b6103e261052d36600461353e565b6000908152600260208190526040909120015490565b6103696118ab565b6103e260065481565b6103e261190e565b6103e2611964565b61036961057236600461353e565b61199c565b61030c610585366004613557565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6103e2600081565b6103e27f000000000000000000000000000000000000000000000000000000000000000081565b60015461043590600160a81b900460ff1681565b6103696105ff366004613636565b611aab565b6103e27f000000000000000000000000000000000000000000000000000000000000000081565b61068661063936600461353e565b60026020819052600091825260409091208054600182015491909201546001600160a01b0383169260ff600160a01b8204811693600160a81b8304821693600160b01b9093049091169186565b604080516001600160a01b0397909716875260ff9586166020880152939094169285019290925215156060840152608083015260a082015260c001610318565b6103696106d4366004613557565b611d3f565b6103e26106e736600461353e565b611d64565b61030c6106fa36600461353e565b600090815260026020526040902054600160b01b900460ff1690565b6009546103359068010000000000000000900467ffffffffffffffff1681565b6103e261074436600461353e565b60009081526002602052604090206001015490565b6103e27f000000000000000000000000000000000000000000000000000000000000000081565b6103e260085481565b610369611e29565b60095461033590600160801b900467ffffffffffffffff1681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061083f57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60006108516003611e8a565b15919050565b61085f611e9a565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166108ae57604051635844c9e760e11b815260040160405180910390fd5b6001600160a01b0386166108d55760405163d92e233d60e01b815260040160405180910390fd5b60ff831615806108eb57508360ff168360ff1610155b1561090957604051630a0b2c3560e41b815260040160405180910390fd5b6000828152600260205260409020546001600160a01b03161561093f576040516311ab459f60e21b815260040160405180910390fd5b6000610951600160ff87161b8761366e565b905060008661095e611131565b6109689190613685565b90508060000361098b5760405163334ab3f560e11b815260040160405180910390fd5b610996600019611664565b8560ff166001901b600660008282546109af9190613685565b90915550506040805160c0810182526001600160a01b03808b16825260ff808a1660208085019182528a831685870190815289151560608701908152608087018981524360a0890190815260008e815260029586905299909920975188549551935192511515600160b01b0260ff60b01b19938816600160a81b029390931661ffff60a81b1994909716600160a01b0274ffffffffffffffffffffffffffffffffffffffffff19909616971696909617939093171692909217178355905160018301559151910155610a8360038583611eed565b60408051838152602081018390526001600160a01b038a168183015260ff88811660608301528716608082015284151560a0820152905185917f9b088e2c89b322a3c1d81515e1c88db3d386d022926f0e2d0b9b5813b7413d58919081900360c00190a25050505050505050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610b4057604051635844c9e760e11b815260040160405180910390fd5b6009805467ffffffffffffffff90921668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff909216919091179055565b6000610b94600019611664565b6001546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009161010090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610bfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1f9190613698565b90508060075410610c305780610c34565b6007545b91505090565b600082815260208190526040902060010154610c55816120f0565b610c5f83836120fd565b505050565b6001600160a01b0381163314610ce75760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610cf1828261219b565b5050565b610cfd611e9a565b600082815260026020818152604092839020835160c08101855281546001600160a01b03811680835260ff600160a01b8304811695840195909552600160a81b8204851696830196909652600160b01b900490921615156060830152600181015460808301529091015460a0820152903314610da5576040517fb72bcb2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015460ff808416600160a81b90920416108015610dcc57508160ff16816020015160ff16105b610e02576040517fd5fd03fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e0a611131565b816080015111610e2d576040516368aebbc560e01b815260040160405180910390fd5b6000816020015183610e3f91906136b1565b90506000600160ff83161b610e5386611d64565b610e5d91906136ca565b9050610e67611964565b811015610e8757604051631e9acf1760e31b815260040160405180910390fd5b610e92600019611664565b826020015160ff166001901b8460ff166001901b610eb091906136ec565b60066000828254610ec19190613685565b90915550506080830151610ed990600390879061221a565b600085815260026020819052604090912080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b60ff8816021781554391015580610f28611131565b610f329190613685565b6080840181815260008781526002602052604090206001019190915551610f5d906003908790611eed565b60808301516040805160ff87168152602081019290925286917faf27998ec15e9d3809edad41aec1b5551d8412e71bd07c91611a0237ead1dc8e910160405180910390a25050505050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610ff757604051635844c9e760e11b815260040160405180910390fd5b60005b81811015610c5f576000838383818110611016576110166136ff565b905060c0020180360381019061102c919061372b565b602081015160a082015160408084015160608501518551608087015193517f18c8572f0000000000000000000000000000000000000000000000000000000081526001600160a01b039096166004870152602486019490945260ff91821660448601521660648401526084830191909152151560a482015290915030906318c8572f9060c401600060405180830381600087803b1580156110cc57600080fd5b505af19250505080156110dd575060015b61111e5780516040805184815260208101929092527f7ded044f9ef68a0ffb6bdb48c80387f300787e7492659224ad140db77893950d910160405180910390a15b5080611129816137cd565b915050610ffa565b600954600090819061115490600160801b900467ffffffffffffffff16436136ec565b60095490915060009061117290839067ffffffffffffffff1661366e565b9050806005546111829190613685565b9250505090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff166111fb576040517f24876df800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611205610b87565b6001546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018490529293506101009091049091169063a9059cbb906044016020604051808303816000875af115801561127a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129e91906137e6565b6112bb576040516312171d8360e31b815260040160405180910390fd5b604080516001600160a01b0384168152602081018390527ff5d8f9b1e7af440e1e7915f4693ccc004d1461a7dafd17ea7347d03decf298e1910160405180910390a150506000600755565b6000611310611e9a565b6001600160a01b0387166113375760405163d92e233d60e01b815260040160405180910390fd5b60ff84161580611356575060015460ff600160a81b9091048116908516105b8061136757508460ff168460ff1610155b1561138557604051630a0b2c3560e41b815260040160405180910390fd5b6040805133602082015290810184905260009060600160408051601f198184030181529181528151602092830120600081815260029093529120549091506001600160a01b0316156113ea576040516311ab459f60e21b815260040160405180910390fd5b6113f2611964565b87101561141257604051631e9acf1760e31b815260040160405180910390fd5b6000611424600160ff89161b8961366e565b6001546040516323b872dd60e01b81523360048201523060248201526044810183905291925061010090046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611481573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a591906137e6565b6114c2576040516312171d8360e31b815260040160405180910390fd5b6000886114cd611131565b6114d79190613685565b9050806000036114fa5760405163334ab3f560e11b815260040160405180910390fd5b611505600019611664565b8760ff166001901b6006600082825461151e9190613685565b90915550506040805160c0810182526001600160a01b03808d16825260ff808c1660208085019182528c83168587019081528b151560608701908152608087018981524360a0890190815260008d815260029586905299909920975188549551935192511515600160b01b0260ff60b01b19938816600160a81b029390931661ffff60a81b1994909716600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199096169716969096179390931716929092171783559051600183015591519101556115f260038483611eed565b60408051838152602081018390526001600160a01b038c168183015260ff8a811660608301528916608082015286151560a0820152905184917f9b088e2c89b322a3c1d81515e1c88db3d386d022926f0e2d0b9b5813b7413d58919081900360c00190a2509098975050505050505050565b60085460005b828110156118105761167a610845565b1561168f57611687611131565b600855611810565b600061169961190e565b905060006116a682611d64565b11156116bd576116b4611131565b60085550611810565b600081815260026020818152604092839020835160c08101855281546001600160a01b038116825260ff600160a01b82048116948301859052600160a81b8204811696830196909652600160b01b900490941615156060850152600180820154608086015292015460a084015260065491901b9081111561176a576040517f9b02220b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806006600082825461177c91906136ec565b909155505060808201516117919086906136ec565b61179b908261366e565b600760008282546117ac9190613685565b909155505060808201516117c490600390859061221a565b50506000908152600260208190526040822080547fffffffffffffffffff000000000000000000000000000000000000000000000016815560018082018490559101919091550161166a565b81600854101561184c576040517f530da97a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160085461185a91906136ec565b600654611867919061366e565b600760008282546118789190613685565b9091555050505050565b600061188c610845565b156118975750600090565b60006118a46106e761190e565b1115905090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff1661190457604051631d77d47760e21b815260040160405180910390fd5b61190c61256b565b565b60008061191b60036125bf565b905080600003611957576040517f46c83ec800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610c346003826000612606565b60095460009061198d9067ffffffffffffffff8082169168010000000000000000900416613803565b67ffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff16611a0e576040517fea0f601b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60095467ffffffffffffffff1615611a2c57611a28611131565b6005555b600980544367ffffffffffffffff908116600160801b027fffffffffffffffff0000000000000000ffffffffffffffff0000000000000000909216908416171790556040517fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a90611aa09083815260200190565b60405180910390a150565b611ab3611e9a565b600082815260026020818152604092839020835160c08101855281546001600160a01b03811680835260ff600160a01b8304811695840195909552600160a81b8204851696830196909652600160b01b900490921615156060830152600181015460808301529091015460a082015290611b4057604051634ee9bc0f60e01b815260040160405180910390fd5b611b48611131565b816080015111611b6b576040516368aebbc560e01b815260040160405180910390fd5b600154602082015160ff600160a81b9092048216911611611bb8576040517f7103b80500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611bc0611964565b82611bca85611d64565b611bd49190613685565b1015611bf357604051631e9acf1760e31b815260040160405180910390fd5b6000816020015160ff166001901b83611c0c919061366e565b6001546040516323b872dd60e01b81523360048201523060248201526044810183905291925061010090046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611c69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8d91906137e6565b611caa576040516312171d8360e31b815260040160405180910390fd5b6080820151611cbd90600390869061221a565b828260800151611ccd9190613685565b60808301819052611ce2906003908690611eed565b60808201805160008681526002602090815260409182902060010192909255915182518481529182015285917faf5756c62d6c0722ef9be1f82bef97ab06ea5aea7f3eb8ad348422079f01d88d910160405180910390a250505050565b600082815260208190526040902060010154611d5a816120f0565b610c5f838361219b565b6000818152600260208181526040808420815160c08101835281546001600160a01b03811680835260ff600160a01b8304811696840196909652600160a81b8204861694830194909452600160b01b900490931615156060840152600181015460808401529092015460a082015290611df057604051634ee9bc0f60e01b815260040160405180910390fd5b611df8611131565b816080015111611e0b5750600092915050565b611e13611131565b8160800151611e2291906136ec565b9392505050565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff16611e8257604051631d77d47760e21b815260040160405180910390fd5b61190c612668565b600061083f8283600001546126a1565b60015460ff161561190c5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610cde565b80611f0b576040516363868c5560e11b815260040160405180910390fd5b611f168383836126cd565b15611f4d576040517f6082d5c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82546000905b80156120315780915080831015611f7d576000908152600180860160205260409091200154612008565b80831115611f9e576000908152600185016020526040902060020154612008565b808303612008576000818152600180870160209081526040832060040180548084018255818552918420909101879055918390529054611fde91906136ec565b60009182526001909501602090815260408083209583526005909501905292909220929092555050565b60008281526001860160205260408120600601805491612027836137cd565b9190505550611f53565b600083815260018087016020908152604083208581558083018490556002810184905560038101805460ff191684179055600481018054808501825581865292909420909101879055915461208691906136ec565b6000868152600583016020526040902055826120a4578386556120de565b828410156120c757600083815260018088016020526040909120018490556120de565b600083815260018701602052604090206002018490555b6120e88685612733565b505050505050565b6120fa813361299b565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610cf1576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556121573390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610cf1576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b80612238576040516363868c5560e11b815260040160405180910390fd5b6122438383836126cd565b61226057604051635889b1c560e11b815260040160405180910390fd5b6000818152600180850160209081526040808420868552600581019092528320546004820180549294919391929091612298916136ec565b815481106122a8576122a86136ff565b90600052602060002001549050808360040183815481106122cb576122cb6136ff565b60009182526020808320909101929092558281526005850190915260409020829055600483018054806123005761230061382f565b6001900381819060005260206000200160009055905560008084600401805490506000036125615760008681526001808a0160205260409091200154158061235957506000868152600189016020526040902060020154155b156123655750846123ad565b5060008581526001880160205260409020600201545b60008181526001808a0160205260409091200154156123ad57600090815260018089016020526040909120015461237b565b60008181526001808a0160205260409091200154156123e15760008181526001808a016020526040909120015491506123f8565b600081815260018901602052604090206002015491505b600081815260018901602052604080822054848352912081905580156124685760008181526001808b0160205260409091200154820361244d5760008181526001808b0160205260409091200183905561246c565b600081815260018a016020526040902060020183905561246c565b8289555b600082815260018a01602052604090206003015460ff16158783146124ff576124968a848a612a0e565b600088815260018b8101602052604080832080830154878552828520938401819055845281842087905560028082015490840181905584529083208690556003908101549286905201805460ff191660ff90921615159190911790559196916124ff8a89612a87565b801561250f5761250f8a85612af4565b6125198a83612a87565b60008381526001808c01602052604082208281559081018290556002810182905560038101805460ff191690559061255460048301826133f5565b6006820160009055505050505b5050505050505050565b612573611e9a565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b8054806125ce57506000919050565b5b6000818152600180840160205260409091200154156126015760009081526001808301602052604090912001546125cf565b919050565b60006126128484612f0d565b61262f57604051635889b1c560e11b815260040160405180910390fd5b60008381526001850160205260409020600401805483908110612654576126546136ff565b906000526020600020015490509392505050565b612670612f53565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336125a2565b60008181526001830160205260408120600681015460048201546126c59190613685565b949350505050565b60006126d98483612f0d565b6126e557506000611e22565b60008281526001850160209081526040808320868452600581019092529091205460049091018054859290811061271e5761271e6136ff565b90600052602060002001541490509392505050565b60005b825482148015906127605750600082815260018401602052604080822054825290206003015460ff165b1561297957600082815260018085016020526040808320548084528184205484529220015481036128815760008181526001850160205260408082205482528082206002015480835291206003015490925060ff1615612808576000818152600180860160205260408083206003808201805460ff19908116909155878652838620820180548216905582548652928520018054909216909217905590829052549250612973565b6000818152600185016020526040902060020154830361282f5780925061282f8484612fa5565b50600082815260018085016020526040808320548084528184206003808201805460ff1990811690915582548752938620018054909316909317909155918290525461287c908590613122565b612973565b6000818152600180860160205260408083205483528083209091015480835291206003015490925060ff16156128ff576000818152600180860160205260408083206003808201805460ff19908116909155878652838620820180548216905582548652928520018054909216909217905590829052549250612973565b60008181526001808601602052604090912001548303612926578092506129268484613122565b50600082815260018085016020526040808320548084528184206003808201805460ff19908116909155825487529386200180549093169093179091559182905254612973908590612fa5565b50612736565b505080546000908152600190910160205260409020600301805460ff19169055565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610cf1576129cc81613202565b6129d7836020613214565b6040516020016129e8929190613869565b60408051601f198184030181529082905262461bcd60e51b8252610cde916004016138ea565b600081815260018401602052604080822054848352912081905580612a3557828455612a81565b60008181526001808601602052604090912001548203612a6a5760008181526001808601602052604090912001839055612a81565b600081815260018501602052604090206002018390555b50505050565b8015610cf1576000818152600183016020526040902060020154612aac9083906126a1565b6000828152600180850160205260409091200154612acb9084906126a1565b612ad59190613685565b6000918252600183016020526040909120600681019190915554612a87565b60005b82548214801590612b1c5750600082815260018401602052604090206003015460ff16155b15612eee5760008281526001808501602052604080832054808452922001548303612d175760008181526001850160205260408082206002015480835291206003015490925060ff1615612bbf576000828152600180860160205260408083206003908101805460ff19908116909155858552919093209092018054909216179055612ba88482612fa5565b600081815260018501602052604090206002015491505b60008281526001808601602052604080832090910154825290206003015460ff16158015612c0a5750600082815260018501602052604080822060020154825290206003015460ff16155b15612c3757600082815260018581016020526040909120600301805460ff19169091179055915081612ee8565b600082815260018501602052604080822060020154825290206003015460ff16612cb4576000828152600180860160205260408083208083015484529083206003908101805460ff1990811690915593869052018054909216179055612c9d8483613122565b600081815260018501602052604090206002015491505b600081815260018501602052604080822060039081018054868552838520808401805460ff909316151560ff199384161790558254821690925560029091015484529190922090910180549091169055612d0e8482612fa5565b83549250612ee8565b6000818152600180860160205260408083209091015480835291206003015490925060ff1615612d96576000828152600180860160205260408083206003908101805460ff19908116909155858552919093209092018054909216179055612d7f8482613122565b600081815260018086016020526040909120015491505b600082815260018501602052604080822060020154825290206003015460ff16158015612de1575060008281526001808601602052604080832090910154825290206003015460ff16155b15612e0e57600082815260018581016020526040909120600301805460ff19169091179055915081612ee8565b60008281526001808601602052604080832090910154825290206003015460ff16612e8d57600082815260018086016020526040808320600281015484529083206003908101805460ff1990811690915593869052018054909216179055612e768483612fa5565b600081815260018086016020526040909120015491505b60008181526001808601602052604080832060039081018054878652838620808401805460ff909316151560ff19938416179055825482169092559301548452922090910180549091169055612ee38482613122565b835492505b50612af7565b506000908152600190910160205260409020600301805460ff19169055565b600081612f1c5750600061083f565b82548203612f2c5750600161083f565b600082815260018401602052604090205415612f4a5750600161083f565b50600092915050565b60015460ff1661190c5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610cde565b600081815260018084016020526040808320600281018054915482865292852090930154938590529183905590918015612fed57600081815260018601602052604090208490555b600083815260018601602052604090208290558161300d57828555613059565b600082815260018087016020526040909120015484036130425760008281526001808701602052604090912001839055613059565b600082815260018601602052604090206002018390555b6000838152600180870160205260408083209091018690558582529020838155600201546130889086906126a1565b60008581526001808801602052604090912001546130a79087906126a1565b6130b19190613685565b60008581526001870160205260408082206006019290925584815220600201546130dc9086906126a1565b60008481526001808801602052604090912001546130fb9087906126a1565b6131059190613685565b600093845260019095016020525050604090206006019190915550565b6000818152600180840160205260408083209182018054925483855291842060020154938590528390559091801561316857600081815260018601602052604090208490555b6000838152600186016020526040902082905581613188578285556131d4565b600082815260018601602052604090206002015484036131bd57600082815260018601602052604090206002018390556131d4565b600082815260018087016020526040909120018390555b60008381526001860160205260408082206002908101879055868352912084815501546130889086906126a1565b606061083f6001600160a01b03831660145b6060600061322383600261366e565b61322e906002613685565b67ffffffffffffffff81111561324657613246613715565b6040519080825280601f01601f191660200182016040528015613270576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106132a7576132a76136ff565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106132f2576132f26136ff565b60200101906001600160f81b031916908160001a905350600061331684600261366e565b613321906001613685565b90505b60018111156133a6577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613362576133626136ff565b1a60f81b828281518110613378576133786136ff565b60200101906001600160f81b031916908160001a90535060049490941c9361339f8161391d565b9050613324565b508315611e225760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610cde565b50805460008255906000526020600020908101906120fa91905b80821115613423576000815560010161340f565b5090565b60006020828403121561343957600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611e2257600080fd5b80356001600160a01b038116811461260157600080fd5b803560ff8116811461260157600080fd5b80151581146120fa57600080fd5b803561260181613491565b60008060008060008060c087890312156134c357600080fd5b6134cc87613469565b9550602087013594506134e160408801613480565b93506134ef60608801613480565b92506080870135915060a087013561350681613491565b809150509295509295509295565b60006020828403121561352657600080fd5b813567ffffffffffffffff81168114611e2257600080fd5b60006020828403121561355057600080fd5b5035919050565b6000806040838503121561356a57600080fd5b8235915061357a60208401613469565b90509250929050565b6000806040838503121561359657600080fd5b8235915061357a60208401613480565b600080602083850312156135b957600080fd5b823567ffffffffffffffff808211156135d157600080fd5b818501915085601f8301126135e557600080fd5b8135818111156135f457600080fd5b86602060c08302850101111561360957600080fd5b60209290920196919550909350505050565b60006020828403121561362d57600080fd5b611e2282613469565b6000806040838503121561364957600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761083f5761083f613658565b8082018082111561083f5761083f613658565b6000602082840312156136aa57600080fd5b5051919050565b60ff828116828216039081111561083f5761083f613658565b6000826136e757634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561083f5761083f613658565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060c0828403121561373d57600080fd5b60405160c0810181811067ffffffffffffffff8211171561376e57634e487b7160e01b600052604160045260246000fd5b6040528235815261378160208401613469565b602082015261379260408401613480565b60408201526137a360608401613480565b60608201526137b46080840161349f565b608082015260a083013560a08201528091505092915050565b6000600182016137df576137df613658565b5060010190565b6000602082840312156137f857600080fd5b8151611e2281613491565b67ffffffffffffffff81811683821602808216919082811461382757613827613658565b505092915050565b634e487b7160e01b600052603160045260246000fd5b60005b83811015613860578181015183820152602001613848565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516138a1816017850160208801613845565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516138de816028840160208801613845565b01602801949350505050565b6020815260008251806020840152613909816040850160208701613845565b601f01601f19169190910160400192915050565b60008161392c5761392c613658565b50600019019056fea2646970667358221220b8e989571a98a41404ede9329461cf1ff50f79df9ca172c5ded6755573d871c364736f6c63430008130033", - "address": "0x38eC2DC60069b28439e4Fca4DF9a91b1d29217cF", - "block": 5855588, - "url": "https://sepolia.etherscan.io/address/0x38eC2DC60069b28439e4Fca4DF9a91b1d29217cF" + "bytecode": "0x60e060405260098054600160401b600160801b03191669438000000000000000001790553480156200003057600080fd5b506040516200399c3803806200399c8339810160408190526200005391620001c4565b600180546001600160b01b0319166101006001600160a01b0385160260ff60a81b191617600160a81b60ff8416021790557f1337d7d57528a8879766fdf2d0456253114c66c4fc263c97168bfdb007c64c666080527f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a60a0527f3e35b14a9f4fef84b59f9bdcd3044fc28783144b7e42bfb2cd075e6a02cb082860c052620000fd60003362000114565b60a0516200010c903362000114565b505062000213565b62000120828262000124565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000120576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001803390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008060408385031215620001d857600080fd5b82516001600160a01b0381168114620001f057600080fd5b602084015190925060ff811681146200020857600080fd5b809150509250929050565b60805160a05160c05161373d6200025f6000396000818161059d0152611080015260008181610740015281816117a20152611d200152600081816105eb0152611893015261373d6000f3fe608060405234801561001057600080fd5b50600436106102e95760003560e01c806381e508b911610191578063b998902f116100e3578063dd483cfb11610097578063ea612e1f11610071578063ea612e1f14610762578063f7b188a51461076b578063f90ce5ba1461077357600080fd5b8063dd483cfb146106f8578063df67438514610718578063e63ab1e91461073b57600080fd5b8063d547741f116100c8578063d547741f146106a8578063d71ba7c4146106bb578063d968f44b146106ce57600080fd5b8063b998902f146105e6578063c81e25ab1461060d57600080fd5b806391b7f5ed11610145578063a6471a1d1161011f578063a6471a1d14610598578063a81064ee146105bf578063b67644b9146105d357600080fd5b806391b7f5ed1461054657806391d1485414610559578063a217fddf1461059057600080fd5b80638a5e8e32116101765780638a5e8e321461052d5780638b82547f14610536578063906978421461053e57600080fd5b806381e508b9146105015780638456cb591461052557600080fd5b806336568abe1161024a57806351b17cd0116101fe5780635c975abb116101d85780635c975abb146104db578063628de877146104e6578063711bfa2b146104f957600080fd5b806351b17cd0146104ad57806351cff8d9146104b55780635239af71146104c857600080fd5b806344beae8e1161022f57806344beae8e1461046757806347aab79b146104915780634ba2363a146104a457600080fd5b806336568abe1461043c578063420fc4db1461044f57600080fd5b80632182ddb1116102a157806324b570a91161028657806324b570a9146103e55780632f2ff15d146103ed57806332ac57dd1461040057600080fd5b80632182ddb114610373578063248a9ca3146103b457600080fd5b80631889b99b116102d25780631889b99b1461034357806318c8572f1461034b5780631a37b4851461036057600080fd5b806301ffc9a7146102ee578063053f14da14610316575b600080fd5b6103016102fc36600461331c565b61078e565b60405190151581526020015b60405180910390f35b60095461032a9067ffffffffffffffff1681565b60405167ffffffffffffffff909116815260200161030d565b610301610827565b61035e610359366004613394565b610839565b005b61035e61036e3660046133fe565b610b6f565b61039c610381366004613428565b6000908152600260205260409020546001600160a01b031690565b6040516001600160a01b03909116815260200161030d565b6103d76103c2366004613428565b60009081526020819052604090206001015490565b60405190815260200161030d565b6103d7610c05565b61035e6103fb366004613441565b610cb8565b61042a61040e366004613428565b600090815260026020526040902054600160a81b900460ff1690565b60405160ff909116815260200161030d565b61035e61044a366004613441565b610ce2565b60015461039c9061010090046001600160a01b031681565b61042a610475366004613428565b600090815260026020526040902054600160a01b900460ff1690565b61035e61049f36600461346d565b610d73565b6103d760075481565b6103d7611026565b61035e6104c3366004613490565b61107e565b6103d76104d6366004613394565b6111fb565b60015460ff16610301565b61035e6104f4366004613428565b611559565b610301611777565b6103d761050f366004613428565b6000908152600260208190526040909120015490565b61035e6117a0565b6103d760065481565b6103d7611803565b6103d7611859565b61035e610554366004613428565b611891565b610301610567366004613441565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6103d7600081565b6103d77f000000000000000000000000000000000000000000000000000000000000000081565b60015461042a90600160a81b900460ff1681565b61035e6105e13660046134ab565b6119a0565b6103d77f000000000000000000000000000000000000000000000000000000000000000081565b61066861061b366004613428565b60026020819052600091825260409091208054600182015491909201546001600160a01b0383169260ff600160a01b8204811693600160a81b8304821693600160b01b9093049091169186565b604080516001600160a01b0397909716875260ff9586166020880152939094169285019290925215156060840152608083015260a082015260c00161030d565b61035e6106b6366004613441565b611c34565b6103d76106c9366004613428565b611c59565b6103016106dc366004613428565b600090815260026020526040902054600160b01b900460ff1690565b60095461032a9068010000000000000000900467ffffffffffffffff1681565b6103d7610726366004613428565b60009081526002602052604090206001015490565b6103d77f000000000000000000000000000000000000000000000000000000000000000081565b6103d760085481565b61035e611d1e565b60095461032a90600160801b900467ffffffffffffffff1681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061082157507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60006108336003611d7f565b15919050565b610841611d8f565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661089057604051635844c9e760e11b815260040160405180910390fd5b6001600160a01b0386166108b75760405163d92e233d60e01b815260040160405180910390fd5b60ff831615806108cd57508360ff168360ff1610155b156108eb57604051630a0b2c3560e41b815260040160405180910390fd5b6000828152600260205260409020546001600160a01b031615610921576040516311ab459f60e21b815260040160405180910390fd5b6000610933600160ff87161b876134e3565b6001546040516323b872dd60e01b81523360048201523060248201526044810183905291925061010090046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b491906134fa565b6109d1576040516312171d8360e31b815260040160405180910390fd5b6000866109dc611026565b6109e69190613517565b905080600003610a095760405163334ab3f560e11b815260040160405180910390fd5b610a14600019611559565b8560ff166001901b60066000828254610a2d9190613517565b90915550506040805160c0810182526001600160a01b03808b16825260ff808a1660208085019182528a831685870190815289151560608701908152608087018981524360a0890190815260008e815260029586905299909920975188549551935192511515600160b01b0260ff60b01b19938816600160a81b029390931661ffff60a81b1994909716600160a01b0274ffffffffffffffffffffffffffffffffffffffffff19909616971696909617939093171692909217178355905160018301559151910155610b0160038583611de2565b60408051838152602081018390526001600160a01b038a168183015260ff88811660608301528716608082015284151560a0820152905185917f9b088e2c89b322a3c1d81515e1c88db3d386d022926f0e2d0b9b5813b7413d58919081900360c00190a25050505050505050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16610bbe57604051635844c9e760e11b815260040160405180910390fd5b6009805467ffffffffffffffff90921668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff909216919091179055565b6000610c12600019611559565b6001546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009161010090046001600160a01b0316906370a0823190602401602060405180830381865afa158015610c79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9d919061352a565b90508060075410610cae5780610cb2565b6007545b91505090565b600082815260208190526040902060010154610cd381611fe5565b610cdd8383611ff2565b505050565b6001600160a01b0381163314610d655760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610d6f8282612090565b5050565b610d7b611d8f565b600082815260026020818152604092839020835160c08101855281546001600160a01b03811680835260ff600160a01b8304811695840195909552600160a81b8204851696830196909652600160b01b900490921615156060830152600181015460808301529091015460a0820152903314610e23576040517fb72bcb2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015460ff808416600160a81b90920416108015610e4a57508160ff16816020015160ff16105b610e80576040517fd5fd03fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e88611026565b816080015111610eab576040516368aebbc560e01b815260040160405180910390fd5b6000816020015183610ebd9190613543565b90506000600160ff83161b610ed186611c59565b610edb919061355c565b9050610ee5611859565b811015610f0557604051631e9acf1760e31b815260040160405180910390fd5b610f10600019611559565b826020015160ff166001901b8460ff166001901b610f2e919061357e565b60066000828254610f3f9190613517565b90915550506080830151610f5790600390879061210f565b600085815260026020819052604090912080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b60ff8816021781554391015580610fa6611026565b610fb09190613517565b6080840181815260008781526002602052604090206001019190915551610fdb906003908790611de2565b60808301516040805160ff87168152602081019290925286917faf27998ec15e9d3809edad41aec1b5551d8412e71bd07c91611a0237ead1dc8e910160405180910390a25050505050565b600954600090819061104990600160801b900467ffffffffffffffff164361357e565b60095490915060009061106790839067ffffffffffffffff166134e3565b9050806005546110779190613517565b9250505090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff166110f0576040517f24876df800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006110fa610c05565b6001546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018490529293506101009091049091169063a9059cbb906044016020604051808303816000875af115801561116f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119391906134fa565b6111b0576040516312171d8360e31b815260040160405180910390fd5b604080516001600160a01b0384168152602081018390527ff5d8f9b1e7af440e1e7915f4693ccc004d1461a7dafd17ea7347d03decf298e1910160405180910390a150506000600755565b6000611205611d8f565b6001600160a01b03871661122c5760405163d92e233d60e01b815260040160405180910390fd5b60ff8416158061124b575060015460ff600160a81b9091048116908516105b8061125c57508460ff168460ff1610155b1561127a57604051630a0b2c3560e41b815260040160405180910390fd5b6040805133602082015290810184905260009060600160408051601f198184030181529181528151602092830120600081815260029093529120549091506001600160a01b0316156112df576040516311ab459f60e21b815260040160405180910390fd5b6112e7611859565b87101561130757604051631e9acf1760e31b815260040160405180910390fd5b6000611319600160ff89161b896134e3565b6001546040516323b872dd60e01b81523360048201523060248201526044810183905291925061010090046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611376573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139a91906134fa565b6113b7576040516312171d8360e31b815260040160405180910390fd5b6000886113c2611026565b6113cc9190613517565b9050806000036113ef5760405163334ab3f560e11b815260040160405180910390fd5b6113fa600019611559565b8760ff166001901b600660008282546114139190613517565b90915550506040805160c0810182526001600160a01b03808d16825260ff808c1660208085019182528c83168587019081528b151560608701908152608087018981524360a0890190815260008d815260029586905299909920975188549551935192511515600160b01b0260ff60b01b19938816600160a81b029390931661ffff60a81b1994909716600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199096169716969096179390931716929092171783559051600183015591519101556114e760038483611de2565b60408051838152602081018390526001600160a01b038c168183015260ff8a811660608301528916608082015286151560a0820152905184917f9b088e2c89b322a3c1d81515e1c88db3d386d022926f0e2d0b9b5813b7413d58919081900360c00190a2509098975050505050505050565b60085460005b828110156117055761156f610827565b156115845761157c611026565b600855611705565b600061158e611803565b9050600061159b82611c59565b11156115b2576115a9611026565b60085550611705565b600081815260026020818152604092839020835160c08101855281546001600160a01b038116825260ff600160a01b82048116948301859052600160a81b8204811696830196909652600160b01b900490941615156060850152600180820154608086015292015460a084015260065491901b9081111561165f576040517f9b02220b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060066000828254611671919061357e565b9091555050608082015161168690869061357e565b61169090826134e3565b600760008282546116a19190613517565b909155505060808201516116b990600390859061210f565b50506000908152600260208190526040822080547fffffffffffffffffff000000000000000000000000000000000000000000000016815560018082018490559101919091550161155f565b816008541015611741576040517f530da97a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160085461174f919061357e565b60065461175c91906134e3565b6007600082825461176d9190613517565b9091555050505050565b6000611781610827565b1561178c5750600090565b60006117996106c9611803565b1115905090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff166117f957604051631d77d47760e21b815260040160405180910390fd5b611801612460565b565b60008061181060036124b4565b90508060000361184c576040517f46c83ec800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610cb260038260006124fb565b6009546000906118829067ffffffffffffffff8082169168010000000000000000900416613591565b67ffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff16611903576040517fea0f601b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60095467ffffffffffffffff16156119215761191d611026565b6005555b600980544367ffffffffffffffff908116600160801b027fffffffffffffffff0000000000000000ffffffffffffffff0000000000000000909216908416171790556040517fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a906119959083815260200190565b60405180910390a150565b6119a8611d8f565b600082815260026020818152604092839020835160c08101855281546001600160a01b03811680835260ff600160a01b8304811695840195909552600160a81b8204851696830196909652600160b01b900490921615156060830152600181015460808301529091015460a082015290611a3557604051634ee9bc0f60e01b815260040160405180910390fd5b611a3d611026565b816080015111611a60576040516368aebbc560e01b815260040160405180910390fd5b600154602082015160ff600160a81b9092048216911611611aad576040517f7103b80500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ab5611859565b82611abf85611c59565b611ac99190613517565b1015611ae857604051631e9acf1760e31b815260040160405180910390fd5b6000816020015160ff166001901b83611b0191906134e3565b6001546040516323b872dd60e01b81523360048201523060248201526044810183905291925061010090046001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611b5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b8291906134fa565b611b9f576040516312171d8360e31b815260040160405180910390fd5b6080820151611bb290600390869061210f565b828260800151611bc29190613517565b60808301819052611bd7906003908690611de2565b60808201805160008681526002602090815260409182902060010192909255915182518481529182015285917faf5756c62d6c0722ef9be1f82bef97ab06ea5aea7f3eb8ad348422079f01d88d910160405180910390a250505050565b600082815260208190526040902060010154611c4f81611fe5565b610cdd8383612090565b6000818152600260208181526040808420815160c08101835281546001600160a01b03811680835260ff600160a01b8304811696840196909652600160a81b8204861694830194909452600160b01b900490931615156060840152600181015460808401529092015460a082015290611ce557604051634ee9bc0f60e01b815260040160405180910390fd5b611ced611026565b816080015111611d005750600092915050565b611d08611026565b8160800151611d17919061357e565b9392505050565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff16611d7757604051631d77d47760e21b815260040160405180910390fd5b61180161255d565b6000610821828360000154612596565b60015460ff16156118015760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610d5c565b80611e00576040516363868c5560e11b815260040160405180910390fd5b611e0b8383836125c2565b15611e42576040517f6082d5c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82546000905b8015611f265780915080831015611e72576000908152600180860160205260409091200154611efd565b80831115611e93576000908152600185016020526040902060020154611efd565b808303611efd576000818152600180870160209081526040832060040180548084018255818552918420909101879055918390529054611ed3919061357e565b60009182526001909501602090815260408083209583526005909501905292909220929092555050565b60008281526001860160205260408120600601805491611f1c836135bd565b9190505550611e48565b600083815260018087016020908152604083208581558083018490556002810184905560038101805460ff1916841790556004810180548085018255818652929094209091018790559154611f7b919061357e565b600086815260058301602052604090205582611f9957838655611fd3565b82841015611fbc5760008381526001808801602052604090912001849055611fd3565b600083815260018701602052604090206002018490555b611fdd8685612628565b505050505050565b611fef8133612890565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610d6f576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561204c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610d6f576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8061212d576040516363868c5560e11b815260040160405180910390fd5b6121388383836125c2565b61215557604051635889b1c560e11b815260040160405180910390fd5b600081815260018085016020908152604080842086855260058101909252832054600482018054929491939192909161218d9161357e565b8154811061219d5761219d6135d6565b90600052602060002001549050808360040183815481106121c0576121c06135d6565b60009182526020808320909101929092558281526005850190915260409020829055600483018054806121f5576121f56135ec565b6001900381819060005260206000200160009055905560008084600401805490506000036124565760008681526001808a0160205260409091200154158061224e57506000868152600189016020526040902060020154155b1561225a5750846122a2565b5060008581526001880160205260409020600201545b60008181526001808a0160205260409091200154156122a2576000908152600180890160205260409091200154612270565b60008181526001808a0160205260409091200154156122d65760008181526001808a016020526040909120015491506122ed565b600081815260018901602052604090206002015491505b6000818152600189016020526040808220548483529120819055801561235d5760008181526001808b016020526040909120015482036123425760008181526001808b01602052604090912001839055612361565b600081815260018a0160205260409020600201839055612361565b8289555b600082815260018a01602052604090206003015460ff16158783146123f45761238b8a848a612903565b600088815260018b8101602052604080832080830154878552828520938401819055845281842087905560028082015490840181905584529083208690556003908101549286905201805460ff191660ff90921615159190911790559196916123f48a8961297c565b8015612404576124048a856129e9565b61240e8a8361297c565b60008381526001808c01602052604082208281559081018290556002810182905560038101805460ff191690559061244960048301826132ea565b6006820160009055505050505b5050505050505050565b612468611d8f565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b8054806124c357506000919050565b5b6000818152600180840160205260409091200154156124f65760009081526001808301602052604090912001546124c4565b919050565b60006125078484612e02565b61252457604051635889b1c560e11b815260040160405180910390fd5b60008381526001850160205260409020600401805483908110612549576125496135d6565b906000526020600020015490509392505050565b612565612e48565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33612497565b60008181526001830160205260408120600681015460048201546125ba9190613517565b949350505050565b60006125ce8483612e02565b6125da57506000611d17565b600082815260018501602090815260408083208684526005810190925290912054600490910180548592908110612613576126136135d6565b90600052602060002001541490509392505050565b60005b825482148015906126555750600082815260018401602052604080822054825290206003015460ff165b1561286e57600082815260018085016020526040808320548084528184205484529220015481036127765760008181526001850160205260408082205482528082206002015480835291206003015490925060ff16156126fd576000818152600180860160205260408083206003808201805460ff19908116909155878652838620820180548216905582548652928520018054909216909217905590829052549250612868565b60008181526001850160205260409020600201548303612724578092506127248484612e9a565b50600082815260018085016020526040808320548084528184206003808201805460ff19908116909155825487529386200180549093169093179091559182905254612771908590613017565b612868565b6000818152600180860160205260408083205483528083209091015480835291206003015490925060ff16156127f4576000818152600180860160205260408083206003808201805460ff19908116909155878652838620820180548216905582548652928520018054909216909217905590829052549250612868565b6000818152600180860160205260409091200154830361281b5780925061281b8484613017565b50600082815260018085016020526040808320548084528184206003808201805460ff19908116909155825487529386200180549093169093179091559182905254612868908590612e9a565b5061262b565b505080546000908152600190910160205260409020600301805460ff19169055565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610d6f576128c1816130f7565b6128cc836020613109565b6040516020016128dd929190613626565b60408051601f198184030181529082905262461bcd60e51b8252610d5c916004016136a7565b60008181526001840160205260408082205484835291208190558061292a57828455612976565b6000818152600180860160205260409091200154820361295f5760008181526001808601602052604090912001839055612976565b600081815260018501602052604090206002018390555b50505050565b8015610d6f5760008181526001830160205260409020600201546129a1908390612596565b60008281526001808501602052604090912001546129c0908490612596565b6129ca9190613517565b600091825260018301602052604090912060068101919091555461297c565b60005b82548214801590612a115750600082815260018401602052604090206003015460ff16155b15612de35760008281526001808501602052604080832054808452922001548303612c0c5760008181526001850160205260408082206002015480835291206003015490925060ff1615612ab4576000828152600180860160205260408083206003908101805460ff19908116909155858552919093209092018054909216179055612a9d8482612e9a565b600081815260018501602052604090206002015491505b60008281526001808601602052604080832090910154825290206003015460ff16158015612aff5750600082815260018501602052604080822060020154825290206003015460ff16155b15612b2c57600082815260018581016020526040909120600301805460ff19169091179055915081612ddd565b600082815260018501602052604080822060020154825290206003015460ff16612ba9576000828152600180860160205260408083208083015484529083206003908101805460ff1990811690915593869052018054909216179055612b928483613017565b600081815260018501602052604090206002015491505b600081815260018501602052604080822060039081018054868552838520808401805460ff909316151560ff199384161790558254821690925560029091015484529190922090910180549091169055612c038482612e9a565b83549250612ddd565b6000818152600180860160205260408083209091015480835291206003015490925060ff1615612c8b576000828152600180860160205260408083206003908101805460ff19908116909155858552919093209092018054909216179055612c748482613017565b600081815260018086016020526040909120015491505b600082815260018501602052604080822060020154825290206003015460ff16158015612cd6575060008281526001808601602052604080832090910154825290206003015460ff16155b15612d0357600082815260018581016020526040909120600301805460ff19169091179055915081612ddd565b60008281526001808601602052604080832090910154825290206003015460ff16612d8257600082815260018086016020526040808320600281015484529083206003908101805460ff1990811690915593869052018054909216179055612d6b8483612e9a565b600081815260018086016020526040909120015491505b60008181526001808601602052604080832060039081018054878652838620808401805460ff909316151560ff19938416179055825482169092559301548452922090910180549091169055612dd88482613017565b835492505b506129ec565b506000908152600190910160205260409020600301805460ff19169055565b600081612e1157506000610821565b82548203612e2157506001610821565b600082815260018401602052604090205415612e3f57506001610821565b50600092915050565b60015460ff166118015760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610d5c565b600081815260018084016020526040808320600281018054915482865292852090930154938590529183905590918015612ee257600081815260018601602052604090208490555b6000838152600186016020526040902082905581612f0257828555612f4e565b60008281526001808701602052604090912001548403612f375760008281526001808701602052604090912001839055612f4e565b600082815260018601602052604090206002018390555b600083815260018087016020526040808320909101869055858252902083815560020154612f7d908690612596565b6000858152600180880160205260409091200154612f9c908790612596565b612fa69190613517565b6000858152600187016020526040808220600601929092558481522060020154612fd1908690612596565b6000848152600180880160205260409091200154612ff0908790612596565b612ffa9190613517565b600093845260019095016020525050604090206006019190915550565b6000818152600180840160205260408083209182018054925483855291842060020154938590528390559091801561305d57600081815260018601602052604090208490555b600083815260018601602052604090208290558161307d578285556130c9565b600082815260018601602052604090206002015484036130b257600082815260018601602052604090206002018390556130c9565b600082815260018087016020526040909120018390555b6000838152600186016020526040808220600290810187905586835291208481550154612f7d908690612596565b60606108216001600160a01b03831660145b606060006131188360026134e3565b613123906002613517565b67ffffffffffffffff81111561313b5761313b6136da565b6040519080825280601f01601f191660200182016040528015613165576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061319c5761319c6135d6565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106131e7576131e76135d6565b60200101906001600160f81b031916908160001a905350600061320b8460026134e3565b613216906001613517565b90505b600181111561329b577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613257576132576135d6565b1a60f81b82828151811061326d5761326d6135d6565b60200101906001600160f81b031916908160001a90535060049490941c93613294816136f0565b9050613219565b508315611d175760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d5c565b5080546000825590600052602060002090810190611fef91905b808211156133185760008155600101613304565b5090565b60006020828403121561332e57600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114611d1757600080fd5b80356001600160a01b03811681146124f657600080fd5b803560ff811681146124f657600080fd5b8015158114611fef57600080fd5b60008060008060008060c087890312156133ad57600080fd5b6133b68761335e565b9550602087013594506133cb60408801613375565b93506133d960608801613375565b92506080870135915060a08701356133f081613386565b809150509295509295509295565b60006020828403121561341057600080fd5b813567ffffffffffffffff81168114611d1757600080fd5b60006020828403121561343a57600080fd5b5035919050565b6000806040838503121561345457600080fd5b823591506134646020840161335e565b90509250929050565b6000806040838503121561348057600080fd5b8235915061346460208401613375565b6000602082840312156134a257600080fd5b611d178261335e565b600080604083850312156134be57600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610821576108216134cd565b60006020828403121561350c57600080fd5b8151611d1781613386565b80820180821115610821576108216134cd565b60006020828403121561353c57600080fd5b5051919050565b60ff8281168282160390811115610821576108216134cd565b60008261357957634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115610821576108216134cd565b67ffffffffffffffff8181168382160280821691908281146135b5576135b56134cd565b505092915050565b6000600182016135cf576135cf6134cd565b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60005b8381101561361d578181015183820152602001613605565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161365e816017850160208801613602565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161369b816028840160208801613602565b01602801949350505050565b60208152600082518060208401526136c6816040850160208701613602565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b6000816136ff576136ff6134cd565b50600019019056fea2646970667358221220411be42d57a5a9f4b3ff704fbf2eae4df6b8a24c5bc3d29bd000af154f11517364736f6c63430008130033", + "address": "0x794532C50c6EfA070Cd206b82178E98433046996", + "block": 4594513, + "url": "https://sepolia.etherscan.io/address/0x794532C50c6EfA070Cd206b82178E98433046996" }, "priceOracle": { "abi": [ @@ -2859,10 +2795,10 @@ "type": "function" } ], - "bytecode": "0x600180546201000160a21b64ffffffffff60a01b1990911617905560028054600160401b600160c01b0319811663ffffffff68010000000000000000600160401b600160801b03199093166e0800000177000000000000000000009081179390930416600160801b02171790556101c06040526208002460a09081526208001b60c0526208001260e052620800096101005262080000610120526207fff7610140526207ffee610160526207ffe5610180526207ffdc6101a052620000c99060039060096200023b565b50348015620000d757600080fd5b506040516200163438038062001634833981016040819052620000fa91620002f4565b6200010760003362000177565b600180546001600160a01b0319166001600160a01b0383161790556200012c62000187565b600280546001600160401b0319166001600160401b0392909216919091179055507fd96ba01d6560c2ab35f2940dd8d70c5f5fe06236c72674237120515918198fb060805262000349565b6200018382826200019b565b5050565b60006200019660984362000326565b905090565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000183576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001f73390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600283019183908215620002cb5791602002820160005b838211156200029757835183826101000a81548163ffffffff021916908362ffffff160217905550926020019260040160208160030104928301926001030262000252565b8015620002c95782816101000a81549063ffffffff021916905560040160208160030104928301926001030262000297565b505b50620002d9929150620002dd565b5090565b5b80821115620002d95760008155600101620002de565b6000602082840312156200030757600080fd5b81516001600160a01b03811681146200031f57600080fd5b9392505050565b6000826200034457634e487b7160e01b600052601260045260246000fd5b500490565b6080516112c86200036c600039600081816103ac015261080d01526112c86000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c806391d14854116100d8578063daafe0a51161008c578063f7b188a511610066578063f7b188a51461039f578063fb8d8101146103a7578063ffb98fe3146103ce57600080fd5b8063daafe0a514610346578063dcd8ffb814610359578063e0632c641461037457600080fd5b8063a217fddf116100bd578063a217fddf14610317578063b187bd261461031f578063d547741f1461033357600080fd5b806391d14854146102c55780639d1b464a146102fc57600080fd5b80637310561b1161013a5780637f386b6c116101145780637f386b6c146102995780638456cb59146102b55780638a19c8bc146102bd57600080fd5b80637310561b1461023557806374e7493b1461026a5780637e8effdd1461027d57600080fd5b80632f2ff15d1161016b5780632f2ff15d146101e057806336568abe146101f557806355bdcd231461020857600080fd5b806301ffc9a714610187578063248a9ca3146101af575b600080fd5b61019a610195366004610f6f565b6103e1565b60405190151581526020015b60405180910390f35b6101d26101bd366004610fb1565b60009081526020819052604090206001015490565b6040519081526020016101a6565b6101f36101ee366004610fca565b61047a565b005b6101f3610203366004610fca565b6104a4565b60025461021c9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101a6565b600254610255906c01000000000000000000000000900463ffffffff1681565b60405163ffffffff90911681526020016101a6565b610255610278366004610fb1565b610535565b6002546102559068010000000000000000900463ffffffff1681565b600254680100000000000000009004600a1c623fffff16610255565b6101f3610565565b61021c6105c9565b61019a6102d3366004610fca565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600254600160801b9004600a1c663fffffffffffff16610255565b6101d2600081565b60015461019a90600160c01b900460ff1681565b6101f3610341366004610fca565b6105db565b6101f3610354366004611006565b610600565b60025461021c90600160801b900467ffffffffffffffff1681565b600154610387906001600160a01b031681565b6040516001600160a01b0390911681526020016101a6565b6101f3610797565b6101d27f000000000000000000000000000000000000000000000000000000000000000081565b6101f36103dc36600461102c565b6107f5565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061047457507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60008281526020819052604090206001015461049581610bdb565b61049f8383610be5565b505050565b6001600160a01b03811633146105275760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6105318282610c83565b5050565b6003816009811061054557600080fd5b60089182820401919006600402915054906101000a900463ffffffff1681565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166105b45760405163036c8cf960e11b815260040160405180910390fd5b6001805460ff60c01b1916600160c01b179055565b60006105d660984361107c565b905090565b6000828152602081905260409020600101546105f681610bdb565b61049f8383610c83565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661064f5760405163036c8cf960e11b815260040160405180910390fd5b60025463fffffc00600a83901b169068010000000000000000900463ffffffff168082101561067c578091505b6002805467ffffffffffffffff8416600160801b027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff9091161790556001546001600160a01b03166391b7f5ed6106e6600254663fffffffffffff600160801b909104600a1c1690565b63ffffffff166040518263ffffffff1660e01b815260040161070a91815260200190565b600060405180830381600087803b15801561072457600080fd5b505af1158015610738573d6000803e3d6000fd5b505050507fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a61077a600254663fffffffffffff600160801b909104600a1c1690565b60405163ffffffff909116815260200160405180910390a1505050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166107e65760405163036c8cf960e11b815260040160405180910390fd5b6001805460ff60c01b19169055565b600154600160c01b900460ff161515600003610bd8577f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff1661087d576040517f262791ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060006108886105c9565b60025490915067ffffffffffffffff908116908216116108d4576040517f08a5cb4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8261ffff16600003610912576040517fb5ca2d7100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015460009061095a9061ffff760100000000000000000000000000000000000000000000820481169174010000000000000000000000000000000000000000900416611090565b90508061ffff168461ffff161115610970578092505b60025467ffffffffffffffff600160801b820481169163ffffffff6801000000000000000082048116926c010000000000000000000000008304909116916000916001916109bf9116886110b2565b6109c991906110b2565b9050600060038861ffff16600981106109e4576109e46110d3565b60088104919091015460079091166004026101000a900463ffffffff90811691508316610a1186836110e9565b610a1b9190611115565b945067ffffffffffffffff821615610a8f575060035463ffffffff1660005b8267ffffffffffffffff168167ffffffffffffffff161015610a8d578363ffffffff16868363ffffffff16610a6f91906110e9565b610a799190611115565b955080610a858161113c565b915050610a3a565b505b8367ffffffffffffffff168567ffffffffffffffff161015610aaf578394505b600280547fffffffffffffffff0000000000000000ffffffffffffffff000000000000000016600160801b67ffffffffffffffff888116820267ffffffffffffffff191692909217918a1691909117918290556001546001600160a01b0316916391b7f5ed919004600a1c663fffffffffffff1663ffffffff166040518263ffffffff1660e01b8152600401610b4791815260200190565b600060405180830381600087803b158015610b6157600080fd5b505af1158015610b75573d6000803e3d6000fd5b505050507fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a610bb7600254663fffffffffffff600160801b909104600a1c1690565b60405163ffffffff909116815260200160405180910390a150505050505050505b50565b610bd88133610d02565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610531576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610c3f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610531576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661053157610d3381610d75565b610d3e836020610d87565b604051602001610d4f929190611187565b60408051601f198184030181529082905262461bcd60e51b825261051e91600401611208565b60606104746001600160a01b03831660145b60606000610d9683600261123b565b610da1906002611252565b67ffffffffffffffff811115610db957610db9611265565b6040519080825280601f01601f191660200182016040528015610de3576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110610e1a57610e1a6110d3565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110610e6557610e656110d3565b60200101906001600160f81b031916908160001a9053506000610e8984600261123b565b610e94906001611252565b90505b6001811115610f19577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110610ed557610ed56110d3565b1a60f81b828281518110610eeb57610eeb6110d3565b60200101906001600160f81b031916908160001a90535060049490941c93610f128161127b565b9050610e97565b508315610f685760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161051e565b9392505050565b600060208284031215610f8157600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610f6857600080fd5b600060208284031215610fc357600080fd5b5035919050565b60008060408385031215610fdd57600080fd5b8235915060208301356001600160a01b0381168114610ffb57600080fd5b809150509250929050565b60006020828403121561101857600080fd5b813563ffffffff81168114610f6857600080fd5b60006020828403121561103e57600080fd5b813561ffff81168114610f6857600080fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008261108b5761108b611050565b500490565b61ffff8181168382160190808211156110ab576110ab611066565b5092915050565b67ffffffffffffffff8281168282160390808211156110ab576110ab611066565b634e487b7160e01b600052603260045260246000fd5b67ffffffffffffffff81811683821602808216919082811461110d5761110d611066565b505092915050565b600067ffffffffffffffff8084168061113057611130611050565b92169190910492915050565b600067ffffffffffffffff80831681810361115957611159611066565b6001019392505050565b60005b8381101561117e578181015183820152602001611166565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516111bf816017850160208801611163565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516111fc816028840160208801611163565b01602801949350505050565b6020815260008251806020840152611227816040850160208701611163565b601f01601f19169190910160400192915050565b808202811582820484141761047457610474611066565b8082018082111561047457610474611066565b634e487b7160e01b600052604160045260246000fd5b60008161128a5761128a611066565b50600019019056fea2646970667358221220ae138e65b6afda072afc2642ba44cd4f0dba23acc91686a94131453ad482fce464736f6c63430008130033", - "address": "0xcA1E073042438a40A7BC0e558e2B9bd1fe2647F8", - "block": 5855594, - "url": "https://sepolia.etherscan.io/address/0xcA1E073042438a40A7BC0e558e2B9bd1fe2647F8" + "bytecode": "0x6001805464ffffffffff60a01b1916634001000160a21b17905560028054600160401b600160c01b0319811663ffffffff68010000000000000000600160401b600160801b03199093166e0800000177000000000000000000009081179390930416600160801b02171790556101c06040526208002460a09081526208001b60c0526208001260e052620800096101005262080000610120526207fff7610140526207ffee610160526207ffe5610180526207ffdc6101a052620000c89060039060096200023a565b50348015620000d657600080fd5b506040516200163338038062001633833981016040819052620000f991620002f3565b6200010660003362000176565b600180546001600160a01b0319166001600160a01b0383161790556200012b62000186565b600280546001600160401b0319166001600160401b0392909216919091179055507fd96ba01d6560c2ab35f2940dd8d70c5f5fe06236c72674237120515918198fb060805262000348565b6200018282826200019a565b5050565b60006200019560984362000325565b905090565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000182576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001f63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600283019183908215620002ca5791602002820160005b838211156200029657835183826101000a81548163ffffffff021916908362ffffff160217905550926020019260040160208160030104928301926001030262000251565b8015620002c85782816101000a81549063ffffffff021916905560040160208160030104928301926001030262000296565b505b50620002d8929150620002dc565b5090565b5b80821115620002d85760008155600101620002dd565b6000602082840312156200030657600080fd5b81516001600160a01b03811681146200031e57600080fd5b9392505050565b6000826200034357634e487b7160e01b600052601260045260246000fd5b500490565b6080516112c86200036b600039600081816103ac015261080d01526112c86000f3fe608060405234801561001057600080fd5b50600436106101825760003560e01c806391d14854116100d8578063daafe0a51161008c578063f7b188a511610066578063f7b188a51461039f578063fb8d8101146103a7578063ffb98fe3146103ce57600080fd5b8063daafe0a514610346578063dcd8ffb814610359578063e0632c641461037457600080fd5b8063a217fddf116100bd578063a217fddf14610317578063b187bd261461031f578063d547741f1461033357600080fd5b806391d14854146102c55780639d1b464a146102fc57600080fd5b80637310561b1161013a5780637f386b6c116101145780637f386b6c146102995780638456cb59146102b55780638a19c8bc146102bd57600080fd5b80637310561b1461023557806374e7493b1461026a5780637e8effdd1461027d57600080fd5b80632f2ff15d1161016b5780632f2ff15d146101e057806336568abe146101f557806355bdcd231461020857600080fd5b806301ffc9a714610187578063248a9ca3146101af575b600080fd5b61019a610195366004610f6f565b6103e1565b60405190151581526020015b60405180910390f35b6101d26101bd366004610fb1565b60009081526020819052604090206001015490565b6040519081526020016101a6565b6101f36101ee366004610fca565b61047a565b005b6101f3610203366004610fca565b6104a4565b60025461021c9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101a6565b600254610255906c01000000000000000000000000900463ffffffff1681565b60405163ffffffff90911681526020016101a6565b610255610278366004610fb1565b610535565b6002546102559068010000000000000000900463ffffffff1681565b600254680100000000000000009004600a1c623fffff16610255565b6101f3610565565b61021c6105c9565b61019a6102d3366004610fca565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600254600160801b9004600a1c663fffffffffffff16610255565b6101d2600081565b60015461019a90600160c01b900460ff1681565b6101f3610341366004610fca565b6105db565b6101f3610354366004611006565b610600565b60025461021c90600160801b900467ffffffffffffffff1681565b600154610387906001600160a01b031681565b6040516001600160a01b0390911681526020016101a6565b6101f3610797565b6101d27f000000000000000000000000000000000000000000000000000000000000000081565b6101f36103dc36600461102c565b6107f5565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061047457507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60008281526020819052604090206001015461049581610bdb565b61049f8383610be5565b505050565b6001600160a01b03811633146105275760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b6105318282610c83565b5050565b6003816009811061054557600080fd5b60089182820401919006600402915054906101000a900463ffffffff1681565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166105b45760405163036c8cf960e11b815260040160405180910390fd5b6001805460ff60c01b1916600160c01b179055565b60006105d660984361107c565b905090565b6000828152602081905260409020600101546105f681610bdb565b61049f8383610c83565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661064f5760405163036c8cf960e11b815260040160405180910390fd5b60025463fffffc00600a83901b169068010000000000000000900463ffffffff168082101561067c578091505b6002805467ffffffffffffffff8416600160801b027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff9091161790556001546001600160a01b03166391b7f5ed6106e6600254663fffffffffffff600160801b909104600a1c1690565b63ffffffff166040518263ffffffff1660e01b815260040161070a91815260200190565b600060405180830381600087803b15801561072457600080fd5b505af1158015610738573d6000803e3d6000fd5b505050507fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a61077a600254663fffffffffffff600160801b909104600a1c1690565b60405163ffffffff909116815260200160405180910390a1505050565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166107e65760405163036c8cf960e11b815260040160405180910390fd5b6001805460ff60c01b19169055565b600154600160c01b900460ff161515600003610bd8577f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff1661087d576040517f262791ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060006108886105c9565b60025490915067ffffffffffffffff908116908216116108d4576040517f08a5cb4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8261ffff16600003610912576040517fb5ca2d7100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015460009061095a9061ffff760100000000000000000000000000000000000000000000820481169174010000000000000000000000000000000000000000900416611090565b90508061ffff168461ffff161115610970578092505b60025467ffffffffffffffff600160801b820481169163ffffffff6801000000000000000082048116926c010000000000000000000000008304909116916000916001916109bf9116886110b2565b6109c991906110b2565b9050600060038861ffff16600981106109e4576109e46110d3565b60088104919091015460079091166004026101000a900463ffffffff90811691508316610a1186836110e9565b610a1b9190611115565b945067ffffffffffffffff821615610a8f575060035463ffffffff1660005b8267ffffffffffffffff168167ffffffffffffffff161015610a8d578363ffffffff16868363ffffffff16610a6f91906110e9565b610a799190611115565b955080610a858161113c565b915050610a3a565b505b8367ffffffffffffffff168567ffffffffffffffff161015610aaf578394505b600280547fffffffffffffffff0000000000000000ffffffffffffffff000000000000000016600160801b67ffffffffffffffff888116820267ffffffffffffffff191692909217918a1691909117918290556001546001600160a01b0316916391b7f5ed919004600a1c663fffffffffffff1663ffffffff166040518263ffffffff1660e01b8152600401610b4791815260200190565b600060405180830381600087803b158015610b6157600080fd5b505af1158015610b75573d6000803e3d6000fd5b505050507fae46785019700e30375a5d7b4f91e32f8060ef085111f896ebf889450aa2ab5a610bb7600254663fffffffffffff600160801b909104600a1c1690565b60405163ffffffff909116815260200160405180910390a150505050505050505b50565b610bd88133610d02565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610531576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610c3f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610531576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661053157610d3381610d75565b610d3e836020610d87565b604051602001610d4f929190611187565b60408051601f198184030181529082905262461bcd60e51b825261051e91600401611208565b60606104746001600160a01b03831660145b60606000610d9683600261123b565b610da1906002611252565b67ffffffffffffffff811115610db957610db9611265565b6040519080825280601f01601f191660200182016040528015610de3576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110610e1a57610e1a6110d3565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110610e6557610e656110d3565b60200101906001600160f81b031916908160001a9053506000610e8984600261123b565b610e94906001611252565b90505b6001811115610f19577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110610ed557610ed56110d3565b1a60f81b828281518110610eeb57610eeb6110d3565b60200101906001600160f81b031916908160001a90535060049490941c93610f128161127b565b9050610e97565b508315610f685760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161051e565b9392505050565b600060208284031215610f8157600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610f6857600080fd5b600060208284031215610fc357600080fd5b5035919050565b60008060408385031215610fdd57600080fd5b8235915060208301356001600160a01b0381168114610ffb57600080fd5b809150509250929050565b60006020828403121561101857600080fd5b813563ffffffff81168114610f6857600080fd5b60006020828403121561103e57600080fd5b813561ffff81168114610f6857600080fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008261108b5761108b611050565b500490565b61ffff8181168382160190808211156110ab576110ab611066565b5092915050565b67ffffffffffffffff8281168282160390808211156110ab576110ab611066565b634e487b7160e01b600052603260045260246000fd5b67ffffffffffffffff81811683821602808216919082811461110d5761110d611066565b505092915050565b600067ffffffffffffffff8084168061113057611130611050565b92169190910492915050565b600067ffffffffffffffff80831681810361115957611159611066565b6001019392505050565b60005b8381101561117e578181015183820152602001611166565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516111bf816017850160208801611163565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516111fc816028840160208801611163565b01602801949350505050565b6020815260008251806020840152611227816040850160208701611163565b601f01601f19169190910160400192915050565b808202811582820484141761047457610474611066565b8082018082111561047457610474611066565b634e487b7160e01b600052604160045260246000fd5b60008161128a5761128a611066565b50600019019056fea26469706673582212202f236cd5b630e6e0225c8acc85210a4bcfe2cdea08e9391b021d837ae1d50d4064736f6c63430008130033", + "address": "0x201dcde5c2D14CE03Fa74b0158488122FcA673B8", + "block": 4594519, + "url": "https://sepolia.etherscan.io/address/0x201dcde5c2D14CE03Fa74b0158488122FcA673B8" }, "redistribution": { "abi": [ @@ -4406,9 +4342,9 @@ } ], "bytecode": "0x60a06040526008805462ffffff60c01b19166214020160c01b1790557dba1914b54e0348a1028d1a103a95ed55c4004b9d332400000000000000006009553480156200004a57600080fd5b5060405162004afe38038062004afe8339810160408190526200006d91620001d0565b60018054600380546001600160a01b03199081166001600160a01b03888116919091179092556001600160a81b03199092166101008683160217909255600280549091169183169190911790557f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a608052620000eb60003362000103565b608051620000fa903362000103565b5050506200021a565b6200010f828262000113565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200010f576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200016f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b80516001600160a01b0381168114620001cb57600080fd5b919050565b600080600060608486031215620001e657600080fd5b620001f184620001b3565b92506200020160208501620001b3565b91506200021160408501620001b3565b90509250925092565b6080516148c16200023d600039600081816110e90152611fdc01526148c16000f3fe608060405234801561001057600080fd5b50600436106102775760003560e01c806382b39b1b11610160578063c1d810d5116100d8578063dfbf53ae1161008c578063f69ee1d111610071578063f69ee1d1146105d5578063f7b188a5146105e8578063fb00f2f3146105f057600080fd5b8063dfbf53ae14610592578063f4e6fcca146105c257600080fd5b8063ce987745116100bd578063ce98774514610564578063d1e8b63d14610577578063d547741f1461057f57600080fd5b8063c1d810d514610537578063c46b40291461054a57600080fd5b80638d8b64281161012f57806391d148541161011457806391d14854146104e5578063a217fddf1461051c578063b78a52a71461052457600080fd5b80638d8b6428146104ca57806391276bec146104d257600080fd5b806382b39b1b1461046257806383220626146104b25780638456cb59146104ba5780638a19c8bc146104c257600080fd5b806362fd29ae116101f357806369da9114116101c257806372286cba116101a757806372286cba146103e657806377c75d10146104345780637fe019c61461044757600080fd5b806369da9114146103b85780636f94aaf2146103cb57600080fd5b806362fd29ae1461036857806363f5cf7c1461037057806364c34a851461038357806369bfac011461038b57600080fd5b80632f2ff15d1161024a57806336568abe1161022f57806336568abe146103375780635c975abb1461034a5780635d4844ea1461035557600080fd5b80632f2ff15d1461031a5780632f3906da1461032f57600080fd5b806301ffc9a71461027c57806318350096146102a4578063248a9ca3146102d45780632a4e624914610305575b600080fd5b61028f61028a36600461402a565b610603565b60405190151581526020015b60405180910390f35b6001546102bc9061010090046001600160a01b031681565b6040516001600160a01b03909116815260200161029b565b6102f76102e2366004614054565b60009081526020819052604090206001015490565b60405190815260200161029b565b61030d61066c565b60405161029b919061406d565b61032d610328366004614111565b610779565b005b61028f6107a3565b61032d610345366004614111565b6107ed565b60015460ff1661028f565b6003546102bc906001600160a01b031681565b6102f761087e565b61032d61037e36600461415a565b61094a565b6102f7610ce5565b60085461039f9067ffffffffffffffff1681565b60405167ffffffffffffffff909116815260200161029b565b6002546102bc906001600160a01b031681565b60085461039f90600160801b900467ffffffffffffffff1681565b6103f96103f4366004614054565b610dc5565b604080519687526001600160a01b039095166020870152921515938501939093526060840152608083019190915260a082015260c00161029b565b61028f610442366004614054565b610e1c565b60085461039f90600160401b900467ffffffffffffffff1681565b610475610470366004614054565b6110cc565b604080519687526001600160a01b03909516602087015260ff909316938501939093526060840152608083019190915260a082015260c00161029b565b6102f76110dc565b61032d6110e7565b61039f61114a565b61028f611157565b61032d6104e03660046141ff565b611181565b61028f6104f3366004614111565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6102f7600081565b61028f610532366004614243565b611707565b61032d610545366004614268565b611896565b610552611d61565b60405160ff909116815260200161029b565b6102f7610572366004614268565b611de6565b61028f611e55565b61032d61058d366004614111565b611e7a565b600a54600b54600c54600d54600e5461047594936001600160a01b03811693600160a01b90910460ff1692909186565b61032d6105d03660046142a5565b611e9f565b61032d6105e3366004614054565b611f86565b61032d611fda565b61028f6105fe3660046142f0565b61203b565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061066657507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6060610676611157565b61069357604051633788c6c160e11b815260040160405180910390fd5b600061069d61114a565b60085490915067ffffffffffffffff808316600160401b90920416146106d657604051636fbabc7760e01b815260040160405180910390fd5b6005805480602002602001604051908101604052809291908181526020016000905b8282101561076f5760008481526020908190206040805160c08101825260058602909201805483526001808201546001600160a01b03811685870152600160a01b900460ff169284019290925260028101546060840152600381015460808401526004015460a083015290835290920191016106f8565b5050505091505090565b60008281526020819052604090206001015461079481612077565b61079e8383612084565b505050565b6000806107b1609843614334565b90506107bf6004609861435e565b81101580156107d857506107d56002609861435e565b81105b156107e557600191505090565b600091505090565b6001600160a01b03811633146108705760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b61087a8282612122565b5050565b60008061088961114a565b610894906001614372565b600754600854919250906108ba90600160401b900467ffffffffffffffff166001614372565b67ffffffffffffffff168267ffffffffffffffff161115610666576008546000906001906108f990600160401b900467ffffffffffffffff168561439a565b610903919061439a565b67ffffffffffffffff169050818160405160200161092b929190918252602082015260400190565b6040516020818303038152906040528051906020012091505092915050565b6109526121a1565b61095a6121f4565b6040805160c081018252600a548152600b546001600160a01b0381166020830152600160a01b900460ff1691810191909152600c546060820152600d546080820152600e5460a082015260065460075460009182916109ba600f82614334565b93506109c7600e82614334565b92508383106109de57826109da816143bb565b9350505b6109f1866020013583876040015161203b565b610a1157604051633b5f43a360e01b815260036004820152602401610867565b610a1c86601e6127ea565b610a2586612afc565b610a2e86612e09565b610a41886020013583876040015161203b565b610a6157604051633b5f43a360e01b815260026004820152602401610867565b610a7588610a708660026143d4565b6127ea565b610a7e88612afc565b610a8788612e09565b610a9a876020013583876040015161203b565b610aba57604051633b5f43a360e01b815260016004820152602401610867565b610ac987610a708560026143d4565b610ad287612afc565b610adb87612e09565b610b518484610aea8b806143eb565b6000818110610afb57610afb61443c565b60200291909101359050610b0f8b806143eb565b6000818110610b2057610b2061443c565b60200291909101359050610b348b806143eb565b6000818110610b4557610b4561443c565b9050602002013561309d565b610b7b610b5e87806143eb565b6000818110610b6f57610b6f61443c565b9050602002013561312a565b60015460208601516040517f51cff8d90000000000000000000000000000000000000000000000000000000081526001600160a01b03918216600482015261010090920416906351cff8d990602401600060405180830381600087803b158015610be457600080fd5b505af1158015610bf8573d6000803e3d6000fd5b505050507f788e77979e6e6a8a6a5d2c19c58b1ff9671298f54c85ac6f6aa30379aed5861a85604051610c2b9190614452565b60405180910390a17fbee3fc8a3523c1a65fa9308ce1f2b8fd90c24975b141b754603194597846e4dd60018054906101000a90046001600160a01b03166001600160a01b0316638a5e8e326040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ca5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc991906144a1565b6040519081526020015b60405180910390a15050505050505050565b6000610cef611e55565b80610d2d5750600854600160401b900467ffffffffffffffff16610d1161114a565b67ffffffffffffffff16118015610d2d5750610d2b611157565b155b15610d3f57610d3a6110dc565b905090565b610d47611157565b15610d5457610d3a61087e565b610d5c6107a3565b8015610d8b5750600854600160401b900467ffffffffffffffff16610d7f61114a565b67ffffffffffffffff16145b15610dc2576040517f36b7884b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b90565b60048181548110610dd557600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294506001600160a01b03821693600160a01b90920460ff169290919086565b6000610e26611157565b610e4357604051633788c6c160e11b815260040160405180910390fd5b6000610e4d61114a565b60085490915067ffffffffffffffff808316600160401b9092041614610e8657604051636fbabc7760e01b815260040160405180910390fd5b60085467ffffffffffffffff600160801b909104811690821611610ebd57604051630c8d9eab60e31b815260040160405180910390fd5b600080600080600080600080610ed1613168565b90506000610edd613222565b600454919650945060005b818110156110b85760048181548110610f0357610f0361443c565b906000526020600020906005020160040154945060048181548110610f2a57610f2a61443c565b906000526020600020906005020160010160149054906101000a900460ff168015610f78575060058581548110610f6357610f6361443c565b90600052602060002090600502016004015487145b8015610fb6575060058581548110610f9257610f9261443c565b600091825260209091206001600590920201015460ff878116600160a01b90920416145b156110b05760058581548110610fce57610fce61443c565b9060005260206000209060050201600301548b610feb91906144ba565b9a5083836040516020016110009291906144f1565b60408051601f19818403018152919052805160209091012098506fffffffffffffffffffffffffffffffff808a16985061103b9060016144ba565b6005868154811061104e5761104e61443c565b90600052602060002090600502016003015461106a91906143d4565b6110748c8a6143d4565b10156110a2576005858154811061108d5761108d61443c565b90600052602060002090600502016000015499505b826110ac816143bb565b9350505b600101610ee8565b505050959099149998505050505050505050565b60058181548110610dd557600080fd5b60008061089461114a565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff1661114057604051631d77d47760e21b815260040160405180910390fd5b6111486133db565b565b6000610d3a60984361435e565b60006111656002609861435e565b611170609843614334565b1061117b5750600190565b50600090565b6111896121a1565b600061119361114a565b6003546040516348962b9360e01b8152600481018690529192506000916001600160a01b03909116906348962b9390602401602060405180830381865afa1580156111e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061120691906144a1565b9050611210611e55565b611246576040517fdc816a8700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016112546004609861435e565b61125e9190614513565b611269609843614334565b036112a0576040517f5baef6b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8267ffffffffffffffff168267ffffffffffffffff1611156112ee576040517f50ff7c0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8267ffffffffffffffff168267ffffffffffffffff16101561133c576040517f7a0c0fd600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67016345785d8a000081101561136557604051638ecf3d0360e01b815260040160405180910390fd5b6003546040517fa0d22b210000000000000000000000000000000000000000000000000000000081526004810186905233916001600160a01b03169063a0d22b2190602401602060405180830381865afa1580156113c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113eb9190614526565b6001600160a01b03161461142b576040517fb78fd5c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611437609860026143d4565b6114419043614513565b6003546040516376f2098160e11b8152600481018790526001600160a01b039091169063ede4130290602401602060405180830381865afa15801561148a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ae91906144a1565b106114cc57604051630a0744c560e01b815260040160405180910390fd5b60085467ffffffffffffffff83811691161461150c576114ee60046000613fc1565b6008805467ffffffffffffffff191667ffffffffffffffff84161790555b60045460005b8181101561157f57856004828154811061152e5761152e61443c565b90600052602060002090600502016000015403611577576040517ffc507a3100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101611512565b506040805160c081018252868152336020808301918252600083850181815260608501888152608086018d815260a0870184815260048054600181018255955296517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b60059095029485015594517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c8401805493516001600160a01b0390921674ffffffffffffffffffffffffffffffffffffffffff1990941693909317600160a01b9115159190910217909155517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d82015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e83015591517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f90910155815167ffffffffffffffff871681529081018790527f68e0867601a98978930107aee7f425665e61edd70ca594c68ca5da9e81f84c29910160405180910390a1505050505050565b60006117116107a3565b15611748576040517fe2586bcc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611754609860026143d4565b61175e9043614513565b6003546040516376f2098160e11b8152600481018690526001600160a01b039091169063ede4130290602401602060405180830381865afa1580156117a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117cb91906144a1565b106117e957604051630a0744c560e01b815260040160405180910390fd5b6003546040516348962b9360e01b81526004810185905267016345785d8a0000916001600160a01b0316906348962b9390602401602060405180830381865afa15801561183a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185e91906144a1565b101561187d57604051638ecf3d0360e01b815260040160405180910390fd5b61188f83611889610ce5565b8461203b565b9392505050565b61189e6121a1565b60006118a861114a565b90506118b2611d61565b60ff168460ff1610156118f1576040517f83d9b7bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118f96107a3565b61192f576040517fd1088db600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085467ffffffffffffffff828116911614611977576040517f842a9e0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085467ffffffffffffffff828116600160401b9092041614611a5f5761199c610ce5565b6006556119ab60056000613fc1565b600880547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff16600160401b67ffffffffffffffff8416908102919091179091556006546040805192835260208301919091527ff0ae472da9c8da86bda4991a549c03a3cb328b5f360ea11a5b8814f32bb85176910160405180910390a1611a5f600754604080516020810192909252449082015260600160408051601f198184030181529190528051602090910120600755565b6000611a6d86868686611de6565b90506000611a7b878361342f565b9050600060048281548110611a9257611a9261443c565b60009182526020918290206040805160c081018252600593909302909101805480845260018201546001600160a01b03811695850195909552600160a01b90940460ff1615159183019190915260028101546060830152600381015460808301526004015460a0820152600654909250611b0d91908961203b565b611b49576006546040517f14ebbbe400000000000000000000000000000000000000000000000000000000815260040161086791815260200190565b806040015115611b85576040517fa89ac15100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160048381548110611b9a57611b9a61443c565b906000526020600020906005020160010160146101000a81548160ff02191690831515021790555060058054905060048381548110611bdb57611bdb61443c565b90600052602060002090600502016004018190555060056040518060c001604052808360000151815260200183602001516001600160a01b031681526020018960ff16815260200183606001518152602001896002611c3a9190614627565b8460600151611c4991906143d4565b815260209081018990528254600181810185556000948552938290208351600590920201908155908201519281018054604084015160ff16600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199091166001600160a01b0390951694909417939093179092556060808201516002808501919091556080830151600385015560a0909201516004909301929092558251918301517f13fc17fd71632266fe82092de6dd91a06b4fa68d8dc950492e5421cbed55a6a5928792909190611d17908c90614627565b8560600151611d2691906143d4565b6040805167ffffffffffffffff909516855260208501939093529183015260608201526080810188905260ff891660a082015260c001610cd3565b6008546000908190611d869067ffffffffffffffff600160801b82048116911661439a565b67ffffffffffffffff169050600060fe8211611da25781611da5565b60fe5b611db0906001614636565b600b5490915060ff600160a01b9091048116908216811115611ddb57611dd6828261464f565b611dde565b60005b935050505090565b60408051602081018690527fff0000000000000000000000000000000000000000000000000000000000000060f886901b169181019190915260418101839052606181018290526000906081015b6040516020818303038152906040528051906020012090505b949350505050565b6000611e636004609861435e565b611e6e609843614334565b101561117b5750600190565b600082815260208190526040902060010154611e9581612077565b61079e8383612122565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16611eee57604051637bfa4b9f60e01b815260040160405180910390fd5b600880547fffffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b60ff958616027fffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffff1617600160c81b93851693909302929092177fffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffff16600160d01b9190931602919091179055565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16611fd557604051637bfa4b9f60e01b815260040160405180910390fd5b600955565b7f000000000000000000000000000000000000000000000000000000000000000060009081526020818152604080832033845290915290205460ff1661203357604051631d77d47760e21b815260040160405180910390fd5b6111486134da565b60008160ff166000036120505750600161188f565b61205f60ff8316610100614668565b61206a906002614683565b8484181090509392505050565b6120818133613513565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661087a576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556120de3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff161561087a576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60015460ff16156111485760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610867565b60006121fe61114a565b9050612208611157565b61222557604051633788c6c160e11b815260040160405180910390fd5b60085467ffffffffffffffff828116600160401b909204161461225b57604051636fbabc7760e01b815260040160405180910390fd5b60085467ffffffffffffffff600160801b90910481169082161161229257604051630c8d9eab60e31b815260040160405180910390fd5b600454604051818152600091829182918291829182917f6752c5e71c95fb93bc7137adeb115a33fa4e54e2683e33d3f90c2bb1c4b6c2a59060200160405180910390a16005546040519081527f4c03de6a759749c0c9387b7014634dc5c6af610e1366023d90751c783a998f8d9060200160405180910390a1612313613222565b6040805183815260ff831660208201529295509093507f34e8eda4cd857cd2865becf58a47748f31415f4a382cbb2cc0c64b9a27c717be910160405180910390a1600061235e613168565b905060005b82811015612724576000600482815481106123805761238061443c565b600091825260208083206040805160c08101825260059485029092018054835260018101546001600160a01b03811694840194909452600160a01b90930460ff16151590820152600282015460608201526003820154608082015260049091015460a082018190528254919450929190839081106124005761240061443c565b60009182526020918290206040805160c0810182526005939093029091018054835260018101546001600160a01b03811694840194909452600160a01b90930460ff1682820152600283015460608301526003830154608083015260049092015460a082015290840151909150801561247c57508060a0015188145b80156124915750806040015160ff168760ff16145b156125865760808101516124a5908d6144ba565b9b50848b6040516020016124ba9291906144f1565b60408051601f19818403018152919052805160209091012099506fffffffffffffffffffffffffffffffff808b1699506124f59060016144ba565b816080015161250491906143d4565b61250e8d8b6143d4565b1015612578578051600a556020810151600b8054604084015160ff16600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199091166001600160a01b03909316929092179190911790556060810151600c556080810151600d5560a0810151600e555b8a612582816143bb565b9b50505b826040015180156125af57508060a00151881415806125af5750806040015160ff168760ff1614155b80156125d05750600854600160d01b900460ff166125ce606444614334565b105b156126715760035481516001600160a01b039091169063837fd16a906125f78a6002614627565b60085461261090609890600160c01b900460ff166143d4565b61261a91906143d4565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b15801561265857600080fd5b505af115801561266c573d6000803e3d6000fd5b505050505b82604001516127165760035483516001600160a01b039091169063837fd16a9061269c8a6002614627565b6008546126b590609890600160c81b900460ff166143d4565b6126bf91906143d4565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b1580156126fd57600080fd5b505af1158015612711573d6000803e3d6000fd5b505050505b836001019350505050612363565b506002546040517fffb98fe300000000000000000000000000000000000000000000000000000000815261ffff891660048201526001600160a01b039091169063ffb98fe390602401600060405180830381600087803b15801561278757600080fd5b505af115801561279b573d6000803e3d6000fd5b50506008805467ffffffffffffffff909c16600160801b027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff909c169b909b17909a5550505050505050505050565b6007546000906127fc90608090614334565b9050600061285f61281060a08601866143eb565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060608601358461285760a0890160808a01614693565b600654613586565b60408051858152602081018390529192507f94e252069a85aa79db21f5bd8ca4e14dd3a3927aa492711017a2c8ddad95af00910160405180910390a16128e76128a885806143eb565b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505050506020860135856104006136fe565b600e54146129125760405163755f0a2560e01b81526001600482015260248101829052604401610867565b61291f60a08501856143eb565b60008181106129305761293061443c565b9050602002013584806040019061294791906143eb565b60008181106129585761295861443c565b90506020020135146129875760405163755f0a2560e01b81526002600482015260248101829052604401610867565b60008061299760e08701876143eb565b9050116129a85784602001356129dd565b6129b560e08601866143eb565b60008181106129c6576129c661443c565b90506020028101906129d891906146ae565b606001355b9050612a3b6129ef60408701876143eb565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505050606087013585612a3660a08a0160808b01614693565b6136fe565b8114612a645760405163755f0a2560e01b81526003600482015260248101839052604401610867565b6000612a7360e08701876143eb565b90501115612aab5760408051602080880135908201529081018390526060016040516020818303038152906040528051906020012091505b81612ab686806143eb565b6000818110612ac757612ac761443c565b9050602002013514612af55760405163755f0a2560e01b815260048181015260248101839052604401610867565b5050505050565b6001546000908190819061010090046001600160a01b031663c81e25ab612b2660c08701876146ae565b602001356040518263ffffffff1660e01b8152600401612b4891815260200190565b60c060405180830381865afa158015612b65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b8991906146ce565b509396509194509250506001600160a01b0384169050612be957612bb060c08501856146ae565b602001356040517f2396d34e00000000000000000000000000000000000000000000000000000000815260040161086791815260200190565b6000612c0c612bfb60c08701876146ae565b610dc2906060810190604001614693565b90506000612c1a848461386c565b9050808263ffffffff1610612c6f57612c3660c08701876146ae565b602001356040517f1362e4a000000000000000000000000000000000000000000000000000000000815260040161086791815260200190565b6000612c9e612c8160c08901896146ae565b612c92906060810190604001614693565b60201c63ffffffff1690565b90506000612cb0886020013586613887565b63ffffffff16905067ffffffffffffffff82168114612d0f57612cd660c08901896146ae565b602001356040517f6dd6a24f00000000000000000000000000000000000000000000000000000000815260040161086791815260200190565b612db587612d2060c08b018b6146ae565b612d2a9080614746565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060208b0135612d7060c08d018d6146ae565b60200135612d8160c08e018e6146ae565b612d92906060810190604001614693565b612d9f60c08f018f6146ae565b612db0906080810190606001614693565b6138ae565b612dff57612dc660c08901896146ae565b602001356040517fdb12fb9d00000000000000000000000000000000000000000000000000000000815260040161086791815260200190565b5050505050505050565b612e1660e08201826143eb565b9050600003612e225750565b612f43612e3260e08301836143eb565b6000818110612e4357612e4361443c565b9050602002810190612e5591906146ae565b612e6390602081019061478d565b612e7060e08401846143eb565b6000818110612e8157612e8161443c565b9050602002810190612e9391906146ae565b612ea1906020810190614746565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612ee39250505060e08501856143eb565b6000818110612ef457612ef461443c565b9050602002810190612f0691906146ae565b60400135612f1760e08601866143eb565b6000818110612f2857612f2861443c565b9050602002810190612f3a91906146ae565b60600135613945565b612fb057612f5460e08201826143eb565b6000818110612f6557612f6561443c565b9050602002810190612f7791906146ae565b606001356040517fd740df6100000000000000000000000000000000000000000000000000000000815260040161086791815260200190565b602081013561302f612fc560e08401846143eb565b6000818110612fd657612fd661443c565b9050602002810190612fe891906146ae565b60400135612ff960e08501856143eb565b600081811061300a5761300a61443c565b905060200281019061301c91906146ae565b61302a90602081019061478d565b6139d8565b146120815761304160e08201826143eb565b60008181106130525761305261443c565b905060200281019061306491906146ae565b606001356040517f82f2469d00000000000000000000000000000000000000000000000000000000815260040161086791815260200190565b838510156130ea578183106130c557604051633d386eb360e11b815260040160405180910390fd5b8082106130e557604051633588c6d360e11b815260040160405180910390fd5b612af5565b82821061310a57604051633d386eb360e11b815260040160405180910390fd5b808310612af557604051633588c6d360e11b815260040160405180910390fd5b6009548110612081576040517fb6052cdf00000000000000000000000000000000000000000000000000000000815260048101829052602401610867565b6060613172611157565b61318f57604051633788c6c160e11b815260040160405180910390fd5b600061319961114a565b60085490915067ffffffffffffffff808316600160401b90920416146131d257604051636fbabc7760e01b815260040160405180910390fd5b60075460405160200161320d9181527f3100000000000000000000000000000000000000000000000000000000000000602082015260210190565b60405160208183030381529060405291505090565b6000806000806000806000806000613238613a26565b60045490915060005b818110156133ca576004818154811061325c5761325c61443c565b906000526020600020906005020160010160149054906101000a900460ff16156133c257600481815481106132935761329361443c565b9060005260206000209060050201600401549350600584815481106132ba576132ba61443c565b906000526020600020906005020160030154896132d791906144ba565b985082816040516020016132ec9291906144f1565b60408051601f19818403018152919052805160209091012097506fffffffffffffffffffffffffffffffff80891697506133279060016144ba565b6005858154811061333a5761333a61443c565b90600052602060002090600502016003015461335691906143d4565b6133608a896143d4565b10156133c257600584815481106133795761337961443c565b9060005260206000209060050201600401549550600584815481106133a0576133a061443c565b906000526020600020906005020160010160149054906101000a900460ff1694505b600101613241565b509399929850919650505050505050565b6133e36121a1565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b6000805b6004548110156134a75783600482815481106134515761345161443c565b90600052602060002090600502016000015414801561349357506004818154811061347e5761347e61443c565b90600052602060002090600502016003015483145b1561349f579050610666565b600101613433565b506040517fd950091500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6134e2613aaf565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613412565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661087a5761354481613b01565b61354f836020613b13565b6040516020016135609291906147aa565b60408051601f198184030181529082905262461bcd60e51b82526108679160040161482b565b60008061359587878786613cd8565b90508261369a856000808267ffffffffffffffff1690506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b600882901c7eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff161790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b601082901c7dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff161790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b602082901c7bffffffff00000000ffffffff00000000ffffffff00000000ffffffff1617905080915050919050565b826040516020016136dc9392919092835260c09190911b77ffffffffffffffffffffffffffffffffffffffffffffffff19166020830152602882015260480190565b6040516020818303038152906040528051906020012091505095945050505050565b60008061370c868686613d4e565b9050613810836000808267ffffffffffffffff1690506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b600882901c7eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff161790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b601082901c7dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff161790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b602082901c7bffffffff00000000ffffffff00000000ffffffff00000000ffffffff1617905080915050919050565b8160405160200161384b92919060c09290921b77ffffffffffffffffffffffffffffffffffffffffffffffff19168252600882015260280190565b60405160208183030381529060405280519060200120915050949350505050565b6000613878828461464f565b60ff166001901b905092915050565b600060e083901c61389983602061464f565b60ff168163ffffffff16901c91505092915050565b6000806138bd86868686613db6565b90506000613918826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050886001600160a01b031661392e828a613e01565b6001600160a01b0316149998505050505050505050565b6000806139528484613e80565b905060006139ad826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050866001600160a01b03166139c38288613e01565b6001600160a01b031614979650505050505050565b60008282604051602001613a0892919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b60405160208183030381529060405280519060200120905092915050565b6060613a30611157565b613a4d57604051633788c6c160e11b815260040160405180910390fd5b6000613a5761114a565b60085490915067ffffffffffffffff808316600160401b9092041614613a9057604051636fbabc7760e01b815260040160405180910390fd5b60075460405160200161320d918152600360fc1b602082015260210190565b60015460ff166111485760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610867565b60606106666001600160a01b03831660145b60606000613b228360026143d4565b613b2d9060026144ba565b67ffffffffffffffff811115613b4557613b4561485e565b6040519080825280601f01601f191660200182016040528015613b6f576020820181803683370190505b509050600360fc1b81600081518110613b8a57613b8a61443c565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613bd557613bd561443c565b60200101906001600160f81b031916908160001a9053506000613bf98460026143d4565b613c049060016144ba565b90505b6001811115613c89577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613c4557613c4561443c565b1a60f81b828281518110613c5b57613c5b61443c565b60200101906001600160f81b031916908160001a90535060049490941c93613c8281614874565b9050613c07565b50831561188f5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610867565b8260005b8551811015613d45576000613cf2600286614334565b15613cfe576000613d01565b60015b9050613d2883888481518110613d1957613d1961443c565b60200260200101518387613e9c565b9250600185901c9450508080613d3d906143bb565b915050613cdc565b50949350505050565b8160005b8451811015613dae576000613d68600285614334565b6000149050613d9183878481518110613d8357613d8361443c565b602002602001015183613efc565b9250600184901c9350508080613da6906143bb565b915050613d52565b509392505050565b604080516020810186905290810184905277ffffffffffffffffffffffffffffffffffffffffffffffff1960c084811b8216606084015283901b166068820152600090607001611e34565b600080600080613e1085613f63565b6040805160008152602081018083528b905260ff8316918101919091526060810184905260808101839052929550909350915060019060a0016020604051602081039080840390855afa158015613e6b573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b6040805160208101849052908101829052600090606001613a08565b60008215613edc57604080516020810184905290810186905260608101859052608001604051602081830303815290604052805190602001209050611e4d565b604080516020810184905290810185905260608101869052608001611e34565b60008115613f3557604080516020810186905290810184905260600160405160208183030381529060405280519060200120905061188f565b5050604080516020808201939093528082019390935280518084038201815260609093019052815191012090565b60008060008351604114613fa3576040517f4be6321b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505060208101516040820151606090920151909260009190911a90565b508054600082556005029060005260206000209081019061208191905b8082111561402657600080825560018201805474ffffffffffffffffffffffffffffffffffffffffff1916905560028201819055600382018190556004820155600501613fde565b5090565b60006020828403121561403c57600080fd5b81356001600160e01b03198116811461188f57600080fd5b60006020828403121561406657600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b818110156140f0576140dd838551805182526001600160a01b03602082015116602083015260ff6040820151166040830152606081015160608301526080810151608083015260a081015160a08301525050565b9284019260c09290920191600101614089565b50909695505050505050565b6001600160a01b038116811461208157600080fd5b6000806040838503121561412457600080fd5b823591506020830135614136816140fc565b809150509250929050565b6000610100828403121561415457600080fd5b50919050565b60008060006060848603121561416f57600080fd5b833567ffffffffffffffff8082111561418757600080fd5b61419387838801614141565b945060208601359150808211156141a957600080fd5b6141b587838801614141565b935060408601359150808211156141cb57600080fd5b506141d886828701614141565b9150509250925092565b803567ffffffffffffffff811681146141fa57600080fd5b919050565b60008060006060848603121561421457600080fd5b833592506020840135915061422b604085016141e2565b90509250925092565b60ff8116811461208157600080fd5b6000806040838503121561425657600080fd5b82359150602083013561413681614234565b6000806000806080858703121561427e57600080fd5b84359350602085013561429081614234565b93969395505050506040820135916060013590565b6000806000606084860312156142ba57600080fd5b83356142c581614234565b925060208401356142d581614234565b915060408401356142e581614234565b809150509250925092565b60008060006060848603121561430557600080fd5b833592506020840135915060408401356142e581614234565b634e487b7160e01b600052601260045260246000fd5b6000826143435761434361431e565b500690565b634e487b7160e01b600052601160045260246000fd5b60008261436d5761436d61431e565b500490565b67ffffffffffffffff81811683821601908082111561439357614393614348565b5092915050565b67ffffffffffffffff82811682821603908082111561439357614393614348565b6000600182016143cd576143cd614348565b5060010190565b808202811582820484141761066657610666614348565b6000808335601e1984360301811261440257600080fd5b83018035915067ffffffffffffffff82111561441d57600080fd5b6020019150600581901b360382131561443557600080fd5b9250929050565b634e487b7160e01b600052603260045260246000fd5b60c081016106668284805182526001600160a01b03602082015116602083015260ff6040820151166040830152606081015160608301526080810151608083015260a081015160a08301525050565b6000602082840312156144b357600080fd5b5051919050565b8082018082111561066657610666614348565b60005b838110156144e85781810151838201526020016144d0565b50506000910152565b600083516145038184602088016144cd565b9190910191825250602001919050565b8181038181111561066657610666614348565b60006020828403121561453857600080fd5b815161188f816140fc565b600181815b8085111561457e57816000190482111561456457614564614348565b8085161561457157918102915b93841c9390800290614548565b509250929050565b60008261459557506001610666565b816145a257506000610666565b81600181146145b857600281146145c2576145de565b6001915050610666565b60ff8411156145d3576145d3614348565b50506001821b610666565b5060208310610133831016604e8410600b8410161715614601575081810a610666565b61460b8383614543565b806000190482111561461f5761461f614348565b029392505050565b600061188f60ff841683614586565b60ff818116838216019081111561066657610666614348565b60ff828116828216039081111561066657610666614348565b61ffff82811682821603908082111561439357614393614348565b600061188f61ffff841683614586565b6000602082840312156146a557600080fd5b61188f826141e2565b60008235607e198336030181126146c457600080fd5b9190910192915050565b60008060008060008060c087890312156146e757600080fd5b86516146f2816140fc565b602088015190965061470381614234565b604088015190955061471481614234565b6060880151909450801515811461472a57600080fd5b809350506080870151915060a087015190509295509295509295565b6000808335601e1984360301811261475d57600080fd5b83018035915067ffffffffffffffff82111561477857600080fd5b60200191503681900382131561443557600080fd5b60006020828403121561479f57600080fd5b813561188f816140fc565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516147e28160178501602088016144cd565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161481f8160288401602088016144cd565b01602801949350505050565b602081526000825180602084015261484a8160408501602087016144cd565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b60008161488357614883614348565b50600019019056fea264697066735822122060d47d6f1de6f9cb6d0d1a3bd75eab3b41a63ccaaeab6f29a16dd8a87745b93f64736f6c63430008130033", - "address": "0xCb9Da2c048063F2886EA6D727602EC27e48649d2", - "block": 5855606, - "url": "https://sepolia.etherscan.io/address/0xCb9Da2c048063F2886EA6D727602EC27e48649d2" + "address": "0xd4621827301E26645Ae3887f7172d6a372782F69", + "block": 5895352, + "url": "https://sepolia.etherscan.io/address/0xd4621827301E26645Ae3887f7172d6a372782F69" } } }