diff --git a/deployments/testnet/Redistribution.json b/deployments/testnet/Redistribution.json index 3ca6f223..9029a1a5 100644 --- a/deployments/testnet/Redistribution.json +++ b/deployments/testnet/Redistribution.json @@ -1,5 +1,5 @@ { - "address": "0x817418a474D1c6de116f1DF7613553bA95965223", + "address": "0xF7c43aEfD3bCC308A5515D421d51DeC6aB97EaDb", "abi": [ { "inputs": [ @@ -279,6 +279,12 @@ "internalType": "bytes32", "name": "overlay", "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "height", + "type": "uint8" } ], "name": "Committed", @@ -1561,22 +1567,22 @@ "type": "function" } ], - "transactionHash": "0x404947ccb7150a094b06eb54c4609950853a6ad698bb9f1db4e3b78bdaacb33c", + "transactionHash": "0xfbfa74e7b35ba38e1beb6964b38de8d253582a435a28914aa50ce7db7b7055ef", "receipt": { "to": null, "from": "0xb1C7F17Ed88189Abf269Bf68A3B2Ed83C5276aAe", - "contractAddress": "0x817418a474D1c6de116f1DF7613553bA95965223", - "transactionIndex": 47, - "gasUsed": "4391161", - "logsBloom": "0x00000004000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000010000000000000000002000000000040000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000002000000000000000000000000000000000000000100000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xf195006b330f59920daba61108d3260cd59e337286a7c73d6a0f85715e031047", - "transactionHash": "0x404947ccb7150a094b06eb54c4609950853a6ad698bb9f1db4e3b78bdaacb33c", + "contractAddress": "0xF7c43aEfD3bCC308A5515D421d51DeC6aB97EaDb", + "transactionIndex": 34, + "gasUsed": "4394017", + "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000010002000000000000002000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000100000000000020000000000000000000000000000000000000000000000000000000000020000000", + "blockHash": "0xf955a5e8cccdf3ccb563ccf20bbbaaf91e3c8b239d7dc4a36b1acd93940793dc", + "transactionHash": "0xfbfa74e7b35ba38e1beb6964b38de8d253582a435a28914aa50ce7db7b7055ef", "logs": [ { - "transactionIndex": 47, - "blockNumber": 6964638, - "transactionHash": "0x404947ccb7150a094b06eb54c4609950853a6ad698bb9f1db4e3b78bdaacb33c", - "address": "0x817418a474D1c6de116f1DF7613553bA95965223", + "transactionIndex": 34, + "blockNumber": 6984307, + "transactionHash": "0xfbfa74e7b35ba38e1beb6964b38de8d253582a435a28914aa50ce7db7b7055ef", + "address": "0xF7c43aEfD3bCC308A5515D421d51DeC6aB97EaDb", "topics": [ "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d", "0x0000000000000000000000000000000000000000000000000000000000000000", @@ -1584,12 +1590,12 @@ "0x000000000000000000000000b1c7f17ed88189abf269bf68a3b2ed83c5276aae" ], "data": "0x", - "logIndex": 56, - "blockHash": "0xf195006b330f59920daba61108d3260cd59e337286a7c73d6a0f85715e031047" + "logIndex": 44, + "blockHash": "0xf955a5e8cccdf3ccb563ccf20bbbaaf91e3c8b239d7dc4a36b1acd93940793dc" } ], - "blockNumber": 6964638, - "cumulativeGasUsed": "9365678", + "blockNumber": 6984307, + "cumulativeGasUsed": "8185223", "status": 1, "byzantium": true }, @@ -1598,11 +1604,11 @@ "0xcdfdC3752caaA826fE62531E0000C40546eC56A6", "0x47B134D38Ab0a89D561CF393fC370f2099AE0c4B" ], - "numDeployments": 9, - "solcInputHash": "99c9ef5f7ef53ea99ef6c816b26b1e5c", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staking\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"postageContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oracleContract\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyClaimed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyCommitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyRevealed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"BatchDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"BucketDiffers\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitRoundNotStarted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitRoundOver\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FirstRevealDone\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"InclusionProofFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"IndexOutsideSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LastElementCheckFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustStake2Rounds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoCommitsReceived\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoMatchingCommit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoReveals\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotClaimPhase\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCommitPhase\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotMatchingOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotRevealPhase\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotStaked\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyPauser\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OutOfDepth\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"OutOfDepthClaim\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"OutOfDepthReveal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PhaseLastBlock\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RandomElementCheckFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"trALast\",\"type\":\"bytes32\"}],\"name\":\"ReserveCheckFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"SigRecoveryFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"SocCalcNotMatching\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"SocVerificationFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrongPhase\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"validChunkCount\",\"type\":\"uint256\"}],\"name\":\"ChunkCount\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"roundNumber\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"}],\"name\":\"Committed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"CountCommits\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"CountReveals\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"roundNumber\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"anchor\",\"type\":\"bytes32\"}],\"name\":\"CurrentRevealAnchor\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"redundancyCount\",\"type\":\"uint16\"}],\"name\":\"PriceAdjustmentSkipped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"roundNumber\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"stakeDensity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"reserveCommitment\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"}],\"name\":\"Revealed\",\"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\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"}],\"name\":\"TruthSelected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakeDensity\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"struct Redistribution.Reveal\",\"name\":\"winner\",\"type\":\"tuple\"}],\"name\":\"WinnerSelected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"WithdrawFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"indexInRC\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"chunkAddress\",\"type\":\"bytes32\"}],\"name\":\"transformedChunkAddressFromInclusionProof\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OracleContract\",\"outputs\":[{\"internalType\":\"contract IPriceOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PostageContract\",\"outputs\":[{\"internalType\":\"contract IPostageStamp\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"Stakes\",\"outputs\":[{\"internalType\":\"contract IStakeRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"proveSegment\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments2\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"proveSegment2\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"chunkSpan\",\"type\":\"uint64\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments3\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"postageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"index\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timeStamp\",\"type\":\"uint64\"}],\"internalType\":\"struct Redistribution.PostageProof\",\"name\":\"postageProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"identifier\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"chunkAddr\",\"type\":\"bytes32\"}],\"internalType\":\"struct Redistribution.SOCProof[]\",\"name\":\"socProof\",\"type\":\"tuple[]\"}],\"internalType\":\"struct Redistribution.ChunkInclusionProof\",\"name\":\"entryProof1\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"proveSegment\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments2\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"proveSegment2\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"chunkSpan\",\"type\":\"uint64\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments3\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"postageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"index\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timeStamp\",\"type\":\"uint64\"}],\"internalType\":\"struct Redistribution.PostageProof\",\"name\":\"postageProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"identifier\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"chunkAddr\",\"type\":\"bytes32\"}],\"internalType\":\"struct Redistribution.SOCProof[]\",\"name\":\"socProof\",\"type\":\"tuple[]\"}],\"internalType\":\"struct Redistribution.ChunkInclusionProof\",\"name\":\"entryProof2\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"proveSegment\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments2\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"proveSegment2\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"chunkSpan\",\"type\":\"uint64\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments3\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"postageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"index\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timeStamp\",\"type\":\"uint64\"}],\"internalType\":\"struct Redistribution.PostageProof\",\"name\":\"postageProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"identifier\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"chunkAddr\",\"type\":\"bytes32\"}],\"internalType\":\"struct Redistribution.SOCProof[]\",\"name\":\"socProof\",\"type\":\"tuple[]\"}],\"internalType\":\"struct Redistribution.ChunkInclusionProof\",\"name\":\"entryProofLast\",\"type\":\"tuple\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_obfuscatedHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"_roundNumber\",\"type\":\"uint64\"}],\"name\":\"commit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentClaimRound\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentCommitRound\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"currentCommits\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"revealed\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"height\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"obfuscatedHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"revealIndex\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentMinimumDepth\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentPhaseClaim\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentPhaseCommit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentPhaseReveal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentRevealRound\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"currentReveals\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakeDensity\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentRound\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentRoundAnchor\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"returnVal\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentRoundReveals\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakeDensity\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"internalType\":\"struct Redistribution.Reveal[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentSeed\",\"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\":\"A\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"B\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"minimum\",\"type\":\"uint8\"}],\"name\":\"inProximity\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_depth\",\"type\":\"uint8\"}],\"name\":\"isParticipatingInUpcomingRound\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_overlay\",\"type\":\"bytes32\"}],\"name\":\"isWinner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextSeed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"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\":\"uint8\",\"name\":\"_depth\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"_hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_revealNonce\",\"type\":\"bytes32\"}],\"name\":\"reveal\",\"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\":\"uint8\",\"name\":\"_penaltyMultiplierDisagreement\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"_penaltyMultiplierNonRevealed\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"_penaltyRandomFactor\",\"type\":\"uint8\"}],\"name\":\"setFreezingParams\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sampleMaxValue\",\"type\":\"uint256\"}],\"name\":\"setSampleMaxValue\",\"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\"},{\"inputs\":[],\"name\":\"winner\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakeDensity\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_overlay\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_depth\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"_hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"revealNonce\",\"type\":\"bytes32\"}],\"name\":\"wrapCommit\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"The Swarm Authors\",\"details\":\"Implements a Schelling Co-ordination game to form consensus around the Reserve Commitment hash. This takes place in three phases: _commit_, _reveal_ and _claim_. A node, upon establishing that it _isParticipatingInUpcomingRound_, i.e. it's overlay falls within proximity order of its reported depth with the _currentRoundAnchor_, prepares a \\\"reserve commitment hash\\\" using the chunks it currently stores in its reserve and calculates the \\\"storage depth\\\" (see Bee for details). These values, if calculated honestly, and with the right chunks stored, should be the same for every node in a neighbourhood. This is the Schelling point. Each eligible node can then use these values, together with a random, single use, secret _revealNonce_ and their _overlay_ as the pre-image values for the obsfucated _commit_, using the _wrapCommit_ method. Once the _commit_ round has elapsed, participating nodes must provide the values used to calculate their obsfucated _commit_ hash, which, once verified for correctness and proximity to the anchor are retained in the _currentReveals_. Nodes that have committed but do not reveal the correct values used to create the pre-image will have their stake \\\"frozen\\\" for a period of rounds proportional to their reported depth. During the _reveal_ round, randomness is updated after every successful reveal. Once the reveal round is concluded, the _currentRoundAnchor_ is updated and users can determine if they will be eligible their overlay will be eligible for the next commit phase using _isParticipatingInUpcomingRound_. When the _reveal_ phase has been concluded, the claim phase can begin. At this point, the truth teller and winner are already determined. By calling _isWinner_, an applicant node can run the relevant logic to determine if they have been selected as the beneficiary of this round. When calling _claim_, the current pot from the PostageStamp contract is withdrawn and transferred to that beneficiaries address. Nodes that have revealed values that differ from the truth, have their stakes \\\"frozen\\\" for a period of rounds proportional to their reported depth.\",\"events\":{\"ChunkCount(uint256)\":{\"details\":\"Emit from Postagestamp contract valid chunk count at the end of claim\"},\"Committed(uint256,bytes32)\":{\"details\":\"Logs that an overlay has committed\"},\"CountCommits(uint256)\":{\"details\":\"Emits the number of commits being processed by the claim phase.\"},\"CountReveals(uint256)\":{\"details\":\"Emits the number of reveals being processed by the claim phase.\"},\"CurrentRevealAnchor(uint256,bytes32)\":{\"details\":\"Bytes32 anhor of current reveal round\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"PriceAdjustmentSkipped(uint16)\":{\"details\":\"Output external call status\"},\"Revealed(uint256,bytes32,uint256,uint256,bytes32,uint8)\":{\"details\":\"Logs that an overlay has revealed\"},\"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`)\"},\"TruthSelected(bytes32,uint8)\":{\"details\":\"Emitted when the truth oracle of a round is selected in the claim phase.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WinnerSelected((bytes32,address,uint8,uint256,uint256,bytes32))\":{\"details\":\"Emitted when the winner of a round is selected in the claim phase\"},\"WithdrawFailed(address)\":{\"details\":\"Withdraw not successful in claim\"},\"transformedChunkAddressFromInclusionProof(uint256,bytes32)\":{\"details\":\"Logs for inclusion proof\"}},\"kind\":\"dev\",\"methods\":{\"commit(bytes32,uint64)\":{\"details\":\"If a node's overlay is _inProximity_(_depth_) of the _currentRoundAnchor_, that node may compute an _obfuscatedHash_ by providing their _overlay_, reported storage _depth_, reserve commitment _hash_ and a randomly generated, and secret _revealNonce_ to the _wrapCommit_ method.\",\"params\":{\"_obfuscatedHash\":\"The calculated hash resultant of the required pre-image values. and be derived from the same key pair as the message sender.\",\"_roundNumber\":\"Node needs to provide round number for which commit is valid\"}},\"constructor\":{\"params\":{\"oracleContract\":\"the address of the linked PriceOracle contract.\",\"postageContract\":\"the address of the linked PostageStamp contract.\",\"staking\":\"the address of the linked Staking contract.\"}},\"currentRoundAnchor()\":{\"details\":\"A node must be within proximity order of less than or equal to the storage depth they intend to report.\"},\"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`.\"},\"inProximity(bytes32,bytes32,uint8)\":{\"params\":{\"A\":\"An overlay address to compare.\",\"B\":\"An overlay address to compare.\",\"minimum\":\"Minimum proximity order.\"}},\"isParticipatingInUpcomingRound(address,uint8)\":{\"params\":{\"_depth\":\"The storage depth the applicant intends to report.\",\"_owner\":\"The address of the applicant from.\"}},\"isWinner(bytes32)\":{\"params\":{\"_overlay\":\"The overlay address of the applicant.\"}},\"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.\"},\"reveal(uint8,bytes32,bytes32)\":{\"params\":{\"_depth\":\"The reported depth.\",\"_hash\":\"The reserve commitment hash.\",\"_revealNonce\":\"The nonce used to generate the commit that is being revealed.\"}},\"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.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"unPause()\":{\"details\":\"Unpause the contract, can only be called by the pauser when paused\"},\"wrapCommit(bytes32,uint8,bytes32,bytes32)\":{\"details\":\"_revealNonce_ must be randomly generated, used once and kept secret until the reveal phase.\",\"params\":{\"_depth\":\"The reported depth.\",\"_hash\":\"The reserve commitment hash.\",\"_overlay\":\"The overlay address of the applicant.\",\"revealNonce\":\"A random, single use, secret nonce.\"}}},\"title\":\"Redistribution contract\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"claim((bytes32[],bytes32,bytes32[],bytes32,uint64,bytes32[],(bytes,bytes32,uint64,uint64),(address,bytes,bytes32,bytes32)[]),(bytes32[],bytes32,bytes32[],bytes32,uint64,bytes32[],(bytes,bytes32,uint64,uint64),(address,bytes,bytes32,bytes32)[]),(bytes32[],bytes32,bytes32[],bytes32,uint64,bytes32[],(bytes,bytes32,uint64,uint64),(address,bytes,bytes32,bytes32)[]))\":{\"notice\":\"Helper function to get this round truth\"},\"commit(bytes32,uint64)\":{\"notice\":\"Begin application for a round if eligible. Commit a hashed value for which the pre-image will be subsequently revealed.\"},\"currentMinimumDepth()\":{\"notice\":\"Returns minimum depth reveal has to have to participate in this round\"},\"currentPhaseClaim()\":{\"notice\":\"Returns true if current block is during claim phase.\"},\"currentPhaseCommit()\":{\"notice\":\"Returns true if current block is during commit phase.\"},\"currentPhaseReveal()\":{\"notice\":\"Returns true if current block is during reveal phase.\"},\"currentRound()\":{\"notice\":\"The number of the current round.\"},\"currentRoundAnchor()\":{\"notice\":\"The anchor used to determine eligibility for the current round.\"},\"currentRoundReveals()\":{\"notice\":\"Returns true if current block is during reveal phase.\"},\"currentSeed()\":{\"notice\":\"Returns the current random seed which is used to determine later utilised random numbers. If rounds have elapsed without reveals, hash the seed with an incremented nonce to produce a new random seed and hence a new round anchor.\"},\"inProximity(bytes32,bytes32,uint8)\":{\"notice\":\"Returns true if an overlay address _A_ is within proximity order _minimum_ of _B_.\"},\"isParticipatingInUpcomingRound(address,uint8)\":{\"notice\":\"Determine if a the owner of a given overlay can participate in the upcoming round.\"},\"isWinner(bytes32)\":{\"notice\":\"Determine if a the owner of a given overlay will be the beneficiary of the claim phase.\"},\"nextSeed()\":{\"notice\":\"Returns the seed which will become current once the next commit phase begins. Used to determine what the next round's anchor will be.\"},\"reveal(uint8,bytes32,bytes32)\":{\"notice\":\"Reveal the pre-image values used to generate commit provided during this round's commit phase.\"},\"setFreezingParams(uint8,uint8,uint8)\":{\"notice\":\"Set freezing parameters\"},\"setSampleMaxValue(uint256)\":{\"notice\":\"changes the max sample value used for reserve estimation\"},\"wrapCommit(bytes32,uint8,bytes32,bytes32)\":{\"notice\":\"Hash the pre-image values to the obsfucated hash.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/Redistribution.sol\":\"Redistribution\"},\"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/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/Redistribution.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.19;\\nimport \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"./Util/TransformedChunkProof.sol\\\";\\nimport \\\"./Util/ChunkProof.sol\\\";\\nimport \\\"./Util/Signatures.sol\\\";\\nimport \\\"./interface/IPostageStamp.sol\\\";\\n\\ninterface IPriceOracle {\\n function adjustPrice(uint16 redundancy) external returns (bool);\\n}\\n\\ninterface IStakeRegistry {\\n struct Stake {\\n bytes32 overlay;\\n uint256 stakeAmount;\\n uint256 lastUpdatedBlockNumber;\\n }\\n\\n function freezeDeposit(address _owner, uint256 _time) external;\\n\\n function lastUpdatedBlockNumberOfAddress(address _owner) external view returns (uint256);\\n\\n function overlayOfAddress(address _owner) external view returns (bytes32);\\n\\n function heightOfAddress(address _owner) external view returns (uint8);\\n\\n function nodeEffectiveStake(address _owner) external view returns (uint256);\\n}\\n\\n/**\\n * @title Redistribution contract\\n * @author The Swarm Authors\\n * @dev Implements a Schelling Co-ordination game to form consensus around the Reserve Commitment hash. This takes\\n * place in three phases: _commit_, _reveal_ and _claim_.\\n *\\n * A node, upon establishing that it _isParticipatingInUpcomingRound_, i.e. it's overlay falls within proximity order\\n * of its reported depth with the _currentRoundAnchor_, prepares a \\\"reserve commitment hash\\\" using the chunks\\n * it currently stores in its reserve and calculates the \\\"storage depth\\\" (see Bee for details). These values, if calculated\\n * honestly, and with the right chunks stored, should be the same for every node in a neighbourhood. This is the Schelling point.\\n * Each eligible node can then use these values, together with a random, single use, secret _revealNonce_ and their\\n * _overlay_ as the pre-image values for the obsfucated _commit_, using the _wrapCommit_ method.\\n *\\n * Once the _commit_ round has elapsed, participating nodes must provide the values used to calculate their obsfucated\\n * _commit_ hash, which, once verified for correctness and proximity to the anchor are retained in the _currentReveals_.\\n * Nodes that have committed but do not reveal the correct values used to create the pre-image will have their stake\\n * \\\"frozen\\\" for a period of rounds proportional to their reported depth.\\n *\\n * During the _reveal_ round, randomness is updated after every successful reveal. Once the reveal round is concluded,\\n * the _currentRoundAnchor_ is updated and users can determine if they will be eligible their overlay will be eligible\\n * for the next commit phase using _isParticipatingInUpcomingRound_.\\n *\\n * When the _reveal_ phase has been concluded, the claim phase can begin. At this point, the truth teller and winner\\n * are already determined. By calling _isWinner_, an applicant node can run the relevant logic to determine if they have\\n * been selected as the beneficiary of this round. When calling _claim_, the current pot from the PostageStamp contract\\n * is withdrawn and transferred to that beneficiaries address. Nodes that have revealed values that differ from the truth,\\n * have their stakes \\\"frozen\\\" for a period of rounds proportional to their reported depth.\\n */\\n\\ncontract Redistribution is AccessControl, Pausable {\\n // ----------------------------- Type declarations ------------------------------\\n\\n // An eligible user may commit to an _obfuscatedHash_ during the commit phase...\\n struct Commit {\\n bytes32 overlay;\\n address owner;\\n bool revealed;\\n uint8 height;\\n uint256 stake;\\n bytes32 obfuscatedHash;\\n uint256 revealIndex;\\n }\\n // ...then provide the actual values that are the constituents of the pre-image of the _obfuscatedHash_\\n // during the reveal phase.\\n struct Reveal {\\n bytes32 overlay;\\n address owner;\\n uint8 depth;\\n uint256 stake;\\n uint256 stakeDensity;\\n bytes32 hash;\\n }\\n\\n struct ChunkInclusionProof {\\n bytes32[] proofSegments;\\n bytes32 proveSegment;\\n // _RCspan is known for RC 32*32\\n\\n // Inclusion proof of transformed address\\n bytes32[] proofSegments2;\\n bytes32 proveSegment2;\\n // proveSegmentIndex2 known from deterministic random selection;\\n uint64 chunkSpan;\\n bytes32[] proofSegments3;\\n // _proveSegment3 known, is equal _proveSegment2\\n // proveSegmentIndex3 know, is equal _proveSegmentIndex2;\\n // chunkSpan2 is equal to chunkSpan (as the data is the same)\\n //\\n PostageProof postageProof;\\n SOCProof[] socProof;\\n }\\n\\n struct SOCProof {\\n address signer; // signer Ethereum address to check against\\n bytes signature;\\n bytes32 identifier; //\\n bytes32 chunkAddr; // wrapped chunk address\\n }\\n\\n struct PostageProof {\\n bytes signature;\\n bytes32 postageId;\\n uint64 index;\\n uint64 timeStamp;\\n // address signer; it is provided by the postage stamp contract\\n // bytes32 chunkAddr; it equals to the proveSegment argument\\n }\\n\\n // The address of the linked PostageStamp contract.\\n IPostageStamp public PostageContract;\\n // The address of the linked PriceOracle contract.\\n IPriceOracle public OracleContract;\\n // The address of the linked Staking contract.\\n IStakeRegistry public Stakes;\\n\\n // Commits for the current round.\\n Commit[] public currentCommits;\\n // Reveals for the current round.\\n Reveal[] public currentReveals;\\n\\n // The current anchor that being processed for the reveal and claim phases of the round.\\n bytes32 private currentRevealRoundAnchor;\\n\\n // The current random value from which we will random.\\n // inputs for selection of the truth teller and beneficiary.\\n bytes32 private seed;\\n\\n // The number of the currently active round phases.\\n uint64 public currentCommitRound;\\n uint64 public currentRevealRound;\\n uint64 public currentClaimRound;\\n\\n // Settings for slashing and freezing\\n uint8 private penaltyMultiplierDisagreement = 1;\\n uint8 private penaltyMultiplierNonRevealed = 2;\\n uint8 private penaltyRandomFactor = 100; // Use 100 as value to ignore random factor in freezing penalty\\n\\n // alpha=0.097612 beta=0.0716570 k=16\\n uint256 private sampleMaxValue = 1284401000000000000000000000000000000000000000000000000000000000000000000;\\n\\n // The reveal of the winner of the last round.\\n Reveal public winner;\\n\\n // The length of a round in blocks.\\n uint256 private constant ROUND_LENGTH = 152;\\n\\n // Maximum value of the keccack256 hash.\\n bytes32 private constant MAX_H = 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff;\\n\\n // ----------------------------- Events ------------------------------\\n\\n /**\\n * @dev Emitted when the winner of a round is selected in the claim phase\\n */\\n event WinnerSelected(Reveal winner);\\n\\n /**\\n * @dev Emitted when the truth oracle of a round is selected in the claim phase.\\n */\\n event TruthSelected(bytes32 hash, uint8 depth);\\n\\n // Next two events to be removed after testing phase pending some other usefulness being found.\\n /**\\n * @dev Emits the number of commits being processed by the claim phase.\\n */\\n event CountCommits(uint256 _count);\\n\\n /**\\n * @dev Emits the number of reveals being processed by the claim phase.\\n */\\n event CountReveals(uint256 _count);\\n\\n /**\\n * @dev Logs that an overlay has committed\\n */\\n event Committed(uint256 roundNumber, bytes32 overlay);\\n /**\\n * @dev Emit from Postagestamp contract valid chunk count at the end of claim\\n */\\n event ChunkCount(uint256 validChunkCount);\\n\\n /**\\n * @dev Bytes32 anhor of current reveal round\\n */\\n event CurrentRevealAnchor(uint256 roundNumber, bytes32 anchor);\\n\\n /**\\n * @dev Output external call status\\n */\\n event PriceAdjustmentSkipped(uint16 redundancyCount);\\n\\n /**\\n * @dev Withdraw not successful in claim\\n */\\n event WithdrawFailed(address owner);\\n\\n /**\\n * @dev Logs that an overlay has revealed\\n */\\n event Revealed(\\n uint256 roundNumber,\\n bytes32 overlay,\\n uint256 stake,\\n uint256 stakeDensity,\\n bytes32 reserveCommitment,\\n uint8 depth\\n );\\n\\n /**\\n * @dev Logs for inclusion proof\\n */\\n event transformedChunkAddressFromInclusionProof(uint256 indexInRC, bytes32 chunkAddress);\\n\\n // ----------------------------- Errors ------------------------------\\n\\n error NotCommitPhase(); // Game is not in commit phase\\n error NoCommitsReceived(); // Round didn't receive any commits\\n error PhaseLastBlock(); // We don't permit commits in last block of the phase\\n error CommitRoundOver(); // Commit phase in this round is over\\n error CommitRoundNotStarted(); // Commit phase in this round has not started yet\\n error NotMatchingOwner(); // Sender of commit is not matching the overlay address\\n error MustStake2Rounds(); // Before entering the game node must stake 2 rounds prior\\n error NotStaked(); // Node didn't add any staking\\n error WrongPhase(); // Checking in wrong phase, need to check duing claim phase of current round for next round or commit in current round\\n error AlreadyCommitted(); // Node already committed in this round\\n error NotRevealPhase(); // Game is not in reveal phase\\n error OutOfDepthReveal(bytes32); // Anchor is out of reported depth in Reveal phase, anchor data available as argument\\n error OutOfDepthClaim(uint8); // Anchor is out of reported depth in Claim phase, entryProof index is argument\\n error OutOfDepth(); // Anchor is out of reported depth\\n error AlreadyRevealed(); // Node already revealed\\n error NoMatchingCommit(); // No matching commit and hash\\n error NotClaimPhase(); // Game is not in the claim phase\\n error NoReveals(); // Round did not receive any reveals\\n error FirstRevealDone(); // We don't want to return value after first reveal\\n error AlreadyClaimed(); // This round was already claimed\\n error NotAdmin(); // Caller of trx is not admin\\n error OnlyPauser(); // Only account with pauser role can call pause/unpause\\n error SocVerificationFailed(bytes32); // Soc verification failed for this element\\n error SocCalcNotMatching(bytes32); // Soc address calculation does not match with the witness\\n error IndexOutsideSet(bytes32); // Stamp available: index resides outside of the valid index set\\n error SigRecoveryFailed(bytes32); // Stamp authorized: signature recovery failed for element\\n error BatchDoesNotExist(bytes32); // Stamp alive: batch remaining balance validation failed for attached stamp\\n error BucketDiffers(bytes32); // Stamp aligned: postage bucket differs from address bucket\\n error InclusionProofFailed(uint8, bytes32);\\n // 1 = RC inclusion proof failed for element\\n // 2 = First sister segment in data must match,\\n // 3 = Inclusion proof failed for original address of element\\n // 4 = Inclusion proof failed for transformed address of element\\n error RandomElementCheckFailed(); // Random element order check failed\\n error LastElementCheckFailed(); // Last element order check failed\\n error ReserveCheckFailed(bytes32 trALast); // Reserve size estimation check failed\\n\\n // ----------------------------- CONSTRUCTOR ------------------------------\\n\\n /**\\n * @param staking the address of the linked Staking contract.\\n * @param postageContract the address of the linked PostageStamp contract.\\n * @param oracleContract the address of the linked PriceOracle contract.\\n */\\n constructor(address staking, address postageContract, address oracleContract) {\\n Stakes = IStakeRegistry(staking);\\n PostageContract = IPostageStamp(postageContract);\\n OracleContract = IPriceOracle(oracleContract);\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n }\\n\\n ////////////////////////////////////////\\n // STATE CHANGING //\\n ////////////////////////////////////////\\n\\n /**\\n * @notice Begin application for a round if eligible. Commit a hashed value for which the pre-image will be\\n * subsequently revealed.\\n * @dev If a node's overlay is _inProximity_(_depth_) of the _currentRoundAnchor_, that node may compute an\\n * _obfuscatedHash_ by providing their _overlay_, reported storage _depth_, reserve commitment _hash_ and a\\n * randomly generated, and secret _revealNonce_ to the _wrapCommit_ method.\\n * @param _obfuscatedHash The calculated hash resultant of the required pre-image values.\\n * and be derived from the same key pair as the message sender.\\n * @param _roundNumber Node needs to provide round number for which commit is valid\\n */\\n function commit(bytes32 _obfuscatedHash, uint64 _roundNumber) external whenNotPaused {\\n uint64 cr = currentRound();\\n bytes32 _overlay = Stakes.overlayOfAddress(msg.sender);\\n uint256 _stake = Stakes.nodeEffectiveStake(msg.sender);\\n uint256 _lastUpdate = Stakes.lastUpdatedBlockNumberOfAddress(msg.sender);\\n uint8 _height = Stakes.heightOfAddress(msg.sender);\\n\\n if (!currentPhaseCommit()) {\\n revert NotCommitPhase();\\n }\\n if (block.number % ROUND_LENGTH == (ROUND_LENGTH / 4) - 1) {\\n revert PhaseLastBlock();\\n }\\n\\n if (cr > _roundNumber) {\\n revert CommitRoundOver();\\n }\\n\\n if (cr < _roundNumber) {\\n revert CommitRoundNotStarted();\\n }\\n\\n if (_lastUpdate == 0) {\\n revert NotStaked();\\n }\\n\\n if (_lastUpdate >= block.number - 2 * ROUND_LENGTH) {\\n revert MustStake2Rounds();\\n }\\n\\n // if we are in a new commit phase, reset the array of commits and\\n // set the currentCommitRound to be the current one\\n if (cr != currentCommitRound) {\\n delete currentCommits;\\n currentCommitRound = cr;\\n }\\n\\n uint256 commitsArrayLength = currentCommits.length;\\n\\n for (uint256 i = 0; i < commitsArrayLength; ) {\\n if (currentCommits[i].overlay == _overlay) {\\n revert AlreadyCommitted();\\n }\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n currentCommits.push(\\n Commit({\\n overlay: _overlay,\\n owner: msg.sender,\\n revealed: false,\\n height: _height,\\n stake: _stake,\\n obfuscatedHash: _obfuscatedHash,\\n revealIndex: 0\\n })\\n );\\n\\n emit Committed(_roundNumber, _overlay);\\n }\\n\\n /**\\n * @notice Reveal the pre-image values used to generate commit provided during this round's commit phase.\\n * @param _depth The reported depth.\\n * @param _hash The reserve commitment hash.\\n * @param _revealNonce The nonce used to generate the commit that is being revealed.\\n */\\n function reveal(uint8 _depth, bytes32 _hash, bytes32 _revealNonce) external whenNotPaused {\\n uint64 cr = currentRound();\\n bytes32 _overlay = Stakes.overlayOfAddress(msg.sender);\\n\\n if (_depth < currentMinimumDepth()) {\\n revert OutOfDepth();\\n }\\n\\n if (!currentPhaseReveal()) {\\n revert NotRevealPhase();\\n }\\n\\n if (cr != currentCommitRound) {\\n revert NoCommitsReceived();\\n }\\n\\n if (cr != currentRevealRound) {\\n currentRevealRoundAnchor = currentRoundAnchor();\\n delete currentReveals;\\n // We set currentRevealRound ONLY after we set current anchor\\n currentRevealRound = cr;\\n emit CurrentRevealAnchor(cr, currentRevealRoundAnchor);\\n updateRandomness();\\n }\\n\\n bytes32 obfuscatedHash = wrapCommit(_overlay, _depth, _hash, _revealNonce);\\n uint256 id = findCommit(_overlay, obfuscatedHash);\\n Commit memory revealedCommit = currentCommits[id];\\n uint8 depthResponsibility = _depth - revealedCommit.height;\\n\\n // Check that commit is in proximity of the current anchor\\n if (!inProximity(revealedCommit.overlay, currentRevealRoundAnchor, depthResponsibility)) {\\n revert OutOfDepthReveal(currentRevealRoundAnchor);\\n }\\n // Check that the commit has not already been revealed\\n if (revealedCommit.revealed) {\\n revert AlreadyRevealed();\\n }\\n\\n currentCommits[id].revealed = true;\\n currentCommits[id].revealIndex = currentReveals.length;\\n\\n currentReveals.push(\\n Reveal({\\n overlay: revealedCommit.overlay,\\n owner: revealedCommit.owner,\\n depth: _depth,\\n stake: revealedCommit.stake,\\n stakeDensity: revealedCommit.stake * uint256(2 ** depthResponsibility),\\n hash: _hash\\n })\\n );\\n\\n emit Revealed(\\n cr,\\n revealedCommit.overlay,\\n revealedCommit.stake,\\n revealedCommit.stake * uint256(2 ** depthResponsibility),\\n _hash,\\n _depth\\n );\\n }\\n\\n /**\\n * @notice Helper function to get this round truth\\n * @dev\\n */\\n function claim(\\n ChunkInclusionProof calldata entryProof1,\\n ChunkInclusionProof calldata entryProof2,\\n ChunkInclusionProof calldata entryProofLast\\n ) external whenNotPaused {\\n winnerSelection();\\n\\n Reveal memory winnerSelected = winner;\\n uint256 indexInRC1;\\n uint256 indexInRC2;\\n bytes32 _currentRevealRoundAnchor = currentRevealRoundAnchor;\\n bytes32 _seed = seed;\\n\\n // rand(14)\\n indexInRC1 = uint256(_seed) % 15;\\n // rand(13)\\n indexInRC2 = uint256(_seed) % 14;\\n if (indexInRC2 >= indexInRC1) {\\n indexInRC2++;\\n }\\n\\n if (!inProximity(entryProofLast.proveSegment, _currentRevealRoundAnchor, winnerSelected.depth)) {\\n revert OutOfDepthClaim(3);\\n }\\n\\n inclusionFunction(entryProofLast, 30);\\n stampFunction(entryProofLast);\\n socFunction(entryProofLast);\\n\\n if (!inProximity(entryProof1.proveSegment, _currentRevealRoundAnchor, winnerSelected.depth)) {\\n revert OutOfDepthClaim(2);\\n }\\n\\n inclusionFunction(entryProof1, indexInRC1 * 2);\\n stampFunction(entryProof1);\\n socFunction(entryProof1);\\n\\n if (!inProximity(entryProof2.proveSegment, _currentRevealRoundAnchor, winnerSelected.depth)) {\\n revert OutOfDepthClaim(1);\\n }\\n\\n inclusionFunction(entryProof2, indexInRC2 * 2);\\n stampFunction(entryProof2);\\n socFunction(entryProof2);\\n\\n checkOrder(\\n indexInRC1,\\n indexInRC2,\\n entryProof1.proofSegments[0],\\n entryProof2.proofSegments[0],\\n entryProofLast.proofSegments[0]\\n );\\n\\n estimateSize(entryProofLast.proofSegments[0]);\\n\\n // Do the check if the withdraw was success\\n (bool success, ) = address(PostageContract).call(\\n abi.encodeWithSignature(\\\"withdraw(address)\\\", winnerSelected.owner)\\n );\\n if (!success) {\\n emit WithdrawFailed(winnerSelected.owner);\\n }\\n\\n emit WinnerSelected(winnerSelected);\\n emit ChunkCount(PostageContract.validChunkCount());\\n }\\n\\n function winnerSelection() internal {\\n uint64 cr = currentRound();\\n\\n if (!currentPhaseClaim()) {\\n revert NotClaimPhase();\\n }\\n\\n if (cr != currentRevealRound) {\\n revert NoReveals();\\n }\\n\\n if (cr <= currentClaimRound) {\\n revert AlreadyClaimed();\\n }\\n\\n uint256 currentWinnerSelectionSum = 0;\\n uint256 redundancyCount = 0;\\n bytes32 randomNumber;\\n uint256 randomNumberTrunc;\\n\\n bytes32 truthRevealedHash;\\n uint8 truthRevealedDepth;\\n uint256 currentCommitsLength = currentCommits.length;\\n\\n emit CountCommits(currentCommitsLength);\\n emit CountReveals(currentReveals.length);\\n\\n (truthRevealedHash, truthRevealedDepth) = getCurrentTruth();\\n emit TruthSelected(truthRevealedHash, truthRevealedDepth);\\n string memory winnerSelectionAnchor = currentWinnerSelectionAnchor();\\n\\n for (uint256 i = 0; i < currentCommitsLength; ) {\\n Commit memory currentCommit = currentCommits[i];\\n uint256 revIndex = currentCommit.revealIndex;\\n Reveal memory currentReveal = currentReveals[revIndex];\\n\\n // Select winner with valid truth\\n if (\\n currentCommit.revealed &&\\n truthRevealedHash == currentReveal.hash &&\\n truthRevealedDepth == currentReveal.depth\\n ) {\\n currentWinnerSelectionSum += currentReveal.stakeDensity;\\n randomNumber = keccak256(abi.encodePacked(winnerSelectionAnchor, redundancyCount));\\n randomNumberTrunc = uint256(randomNumber & MAX_H);\\n\\n if (randomNumberTrunc * currentWinnerSelectionSum < currentReveal.stakeDensity * (uint256(MAX_H) + 1)) {\\n winner = currentReveal;\\n }\\n\\n redundancyCount++;\\n }\\n\\n // Freeze deposit if any truth is false, make it a penaltyRandomFactor chance for this to happen\\n if (\\n currentCommit.revealed &&\\n (truthRevealedHash != currentReveal.hash || truthRevealedDepth != currentReveal.depth) &&\\n (block.prevrandao % 100 < penaltyRandomFactor)\\n ) {\\n Stakes.freezeDeposit(\\n currentReveal.owner,\\n penaltyMultiplierDisagreement * ROUND_LENGTH * uint256(2 ** truthRevealedDepth)\\n );\\n }\\n\\n // Slash deposits if revealed is false\\n if (!currentCommit.revealed) {\\n // slash in later phase (ph5)\\n // Stakes.slashDeposit(currentCommits[i].overlay, currentCommits[i].stake);\\n Stakes.freezeDeposit(\\n currentCommit.owner,\\n penaltyMultiplierNonRevealed * ROUND_LENGTH * uint256(2 ** truthRevealedDepth)\\n );\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n bool success = OracleContract.adjustPrice(uint16(redundancyCount));\\n if (!success) {\\n emit PriceAdjustmentSkipped(uint16(redundancyCount));\\n }\\n currentClaimRound = cr;\\n }\\n\\n function inclusionFunction(ChunkInclusionProof calldata entryProof, uint256 indexInRC) internal {\\n uint256 randomChunkSegmentIndex = uint256(seed) % 128;\\n bytes32 calculatedTransformedAddr = TransformedBMTChunk.transformedChunkAddressFromInclusionProof(\\n entryProof.proofSegments3,\\n entryProof.proveSegment2,\\n randomChunkSegmentIndex,\\n entryProof.chunkSpan,\\n currentRevealRoundAnchor\\n );\\n\\n emit transformedChunkAddressFromInclusionProof(indexInRC, calculatedTransformedAddr);\\n\\n if (\\n winner.hash !=\\n BMTChunk.chunkAddressFromInclusionProof(\\n entryProof.proofSegments,\\n entryProof.proveSegment,\\n indexInRC,\\n 32 * 32\\n )\\n ) {\\n revert InclusionProofFailed(1, calculatedTransformedAddr);\\n }\\n\\n if (entryProof.proofSegments2[0] != entryProof.proofSegments3[0]) {\\n revert InclusionProofFailed(2, calculatedTransformedAddr);\\n }\\n\\n bytes32 originalAddress = entryProof.socProof.length > 0\\n ? entryProof.socProof[0].chunkAddr // soc attestation in socFunction\\n : entryProof.proveSegment;\\n\\n if (\\n originalAddress !=\\n BMTChunk.chunkAddressFromInclusionProof(\\n entryProof.proofSegments2,\\n entryProof.proveSegment2,\\n randomChunkSegmentIndex,\\n entryProof.chunkSpan\\n )\\n ) {\\n revert InclusionProofFailed(3, calculatedTransformedAddr);\\n }\\n\\n // In case of SOC, the transformed address is hashed together with its address in the sample\\n if (entryProof.socProof.length > 0) {\\n calculatedTransformedAddr = keccak256(\\n abi.encode(\\n entryProof.proveSegment, // SOC address\\n calculatedTransformedAddr\\n )\\n );\\n }\\n\\n if (entryProof.proofSegments[0] != calculatedTransformedAddr) {\\n revert InclusionProofFailed(4, calculatedTransformedAddr);\\n }\\n }\\n\\n /**\\n * @notice Set freezing parameters\\n */\\n function setFreezingParams(\\n uint8 _penaltyMultiplierDisagreement,\\n uint8 _penaltyMultiplierNonRevealed,\\n uint8 _penaltyRandomFactor\\n ) external {\\n if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert NotAdmin();\\n }\\n\\n penaltyMultiplierDisagreement = _penaltyMultiplierDisagreement;\\n penaltyMultiplierNonRevealed = _penaltyMultiplierNonRevealed;\\n penaltyRandomFactor = _penaltyRandomFactor;\\n }\\n\\n /**\\n * @notice changes the max sample value used for reserve estimation\\n */\\n function setSampleMaxValue(uint256 _sampleMaxValue) external {\\n if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert NotAdmin();\\n }\\n\\n sampleMaxValue = _sampleMaxValue;\\n }\\n\\n /**\\n * @notice Updates the source of randomness. Uses block.difficulty in pre-merge chains, this is substituted\\n * to block.prevrandao in post merge chains.\\n */\\n function updateRandomness() private {\\n seed = keccak256(abi.encode(seed, block.prevrandao));\\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 if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert OnlyPauser();\\n }\\n\\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 if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert OnlyPauser();\\n }\\n _unpause();\\n }\\n\\n ////////////////////////////////////////\\n // STATE READING //\\n ////////////////////////////////////////\\n\\n // ----------------------------- Anchor calculations ------------------------------\\n\\n /**\\n * @notice Returns the current random seed which is used to determine later utilised random numbers.\\n * If rounds have elapsed without reveals, hash the seed with an incremented nonce to produce a new\\n * random seed and hence a new round anchor.\\n */\\n function currentSeed() public view returns (bytes32) {\\n uint64 cr = currentRound();\\n bytes32 currentSeedValue = seed;\\n\\n if (cr > currentRevealRound + 1) {\\n uint256 difference = cr - currentRevealRound - 1;\\n currentSeedValue = keccak256(abi.encodePacked(currentSeedValue, difference));\\n }\\n\\n return currentSeedValue;\\n }\\n\\n /**\\n * @notice Returns the seed which will become current once the next commit phase begins.\\n * Used to determine what the next round's anchor will be.\\n */\\n function nextSeed() public view returns (bytes32) {\\n uint64 cr = currentRound() + 1;\\n bytes32 currentSeedValue = seed;\\n\\n if (cr > currentRevealRound + 1) {\\n uint256 difference = cr - currentRevealRound - 1;\\n currentSeedValue = keccak256(abi.encodePacked(currentSeedValue, difference));\\n }\\n\\n return currentSeedValue;\\n }\\n\\n /**\\n * @notice The random value used to choose the selected truth teller.\\n */\\n function currentTruthSelectionAnchor() private view returns (string memory) {\\n if (!currentPhaseClaim()) {\\n revert NotClaimPhase();\\n }\\n\\n uint64 cr = currentRound();\\n if (cr != currentRevealRound) {\\n revert NoReveals();\\n }\\n\\n return string(abi.encodePacked(seed, \\\"0\\\"));\\n }\\n\\n /**\\n * @notice The random value used to choose the selected beneficiary.\\n */\\n function currentWinnerSelectionAnchor() private view returns (string memory) {\\n if (!currentPhaseClaim()) {\\n revert NotClaimPhase();\\n }\\n uint64 cr = currentRound();\\n if (cr != currentRevealRound) {\\n revert NoReveals();\\n }\\n\\n return string(abi.encodePacked(seed, \\\"1\\\"));\\n }\\n\\n /**\\n * @notice The anchor used to determine eligibility for the current round.\\n * @dev A node must be within proximity order of less than or equal to the storage depth they intend to report.\\n */\\n function currentRoundAnchor() public view returns (bytes32 returnVal) {\\n // This will be called in reveal phase and set as currentRevealRoundAnchor or in\\n // commit phase when checking eligibility for next round by isParticipatingInUpcomingRound\\n if (currentPhaseCommit() || (currentRound() > currentRevealRound && !currentPhaseClaim())) {\\n return currentSeed();\\n }\\n\\n // This will be called by isParticipatingInUpcomingRound check in claim phase\\n if (currentPhaseClaim()) {\\n return nextSeed();\\n }\\n\\n // Without this, this function will output 0x0 after first reveal which is value and we prefere it reverts\\n if (currentPhaseReveal() && currentRound() == currentRevealRound) {\\n revert FirstRevealDone();\\n }\\n }\\n\\n /**\\n * @notice Returns true if an overlay address _A_ is within proximity order _minimum_ of _B_.\\n * @param A An overlay address to compare.\\n * @param B An overlay address to compare.\\n * @param minimum Minimum proximity order.\\n */\\n function inProximity(bytes32 A, bytes32 B, uint8 minimum) public pure returns (bool) {\\n if (minimum == 0) {\\n return true;\\n }\\n\\n return uint256(A ^ B) < uint256(2 ** (256 - minimum));\\n }\\n\\n // ----------------------------- Commit ------------------------------\\n\\n /**\\n * @notice The number of the current round.\\n */\\n function currentRound() public view returns (uint64) {\\n return uint64(block.number / ROUND_LENGTH);\\n }\\n\\n /**\\n * @notice Returns true if current block is during commit phase.\\n */\\n function currentPhaseCommit() public view returns (bool) {\\n if (block.number % ROUND_LENGTH < ROUND_LENGTH / 4) {\\n return true;\\n }\\n return false;\\n }\\n\\n /**\\n * @notice Determine if a the owner of a given overlay can participate in the upcoming round.\\n * @param _owner The address of the applicant from.\\n * @param _depth The storage depth the applicant intends to report.\\n */\\n function isParticipatingInUpcomingRound(address _owner, uint8 _depth) public view returns (bool) {\\n uint256 _lastUpdate = Stakes.lastUpdatedBlockNumberOfAddress(_owner);\\n uint8 _depthResponsibility = _depth - Stakes.heightOfAddress(_owner);\\n\\n if (currentPhaseReveal()) {\\n revert WrongPhase();\\n }\\n\\n if (_lastUpdate == 0) {\\n revert NotStaked();\\n }\\n\\n if (_lastUpdate >= block.number - 2 * ROUND_LENGTH) {\\n revert MustStake2Rounds();\\n }\\n\\n return inProximity(Stakes.overlayOfAddress(_owner), currentRoundAnchor(), _depthResponsibility);\\n }\\n\\n // ----------------------------- Reveal ------------------------------\\n\\n /**\\n * @notice Returns minimum depth reveal has to have to participate in this round\\n */\\n function currentMinimumDepth() public view returns (uint8) {\\n // We are checking value in reveal phase, as the currentCommitRound is set to the current round\\n // but the currentClaimRound is still set to the last time claim was made\\n // We add 1 to ensure that for the next round the minimum depth is the same as last winner depth\\n\\n uint256 difference = currentCommitRound - currentClaimRound;\\n uint8 skippedRounds = uint8(difference > 254 ? 254 : difference) + 1;\\n\\n uint8 lastWinnerDepth = winner.depth;\\n\\n // We ensure that skippedRounds is not bigger than lastWinnerDepth, because of overflow\\n return skippedRounds >= lastWinnerDepth ? 0 : lastWinnerDepth - skippedRounds;\\n }\\n\\n /**\\n * @notice Helper function to get this node reveal in commits\\n * @dev\\n */\\n function findCommit(bytes32 _overlay, bytes32 _obfuscatedHash) internal view returns (uint256) {\\n for (uint256 i = 0; i < currentCommits.length; ) {\\n if (currentCommits[i].overlay == _overlay && _obfuscatedHash == currentCommits[i].obfuscatedHash) {\\n return i;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n revert NoMatchingCommit();\\n }\\n\\n /**\\n * @notice Hash the pre-image values to the obsfucated hash.\\n * @dev _revealNonce_ must be randomly generated, used once and kept secret until the reveal phase.\\n * @param _overlay The overlay address of the applicant.\\n * @param _depth The reported depth.\\n * @param _hash The reserve commitment hash.\\n * @param revealNonce A random, single use, secret nonce.\\n */\\n function wrapCommit(\\n bytes32 _overlay,\\n uint8 _depth,\\n bytes32 _hash,\\n bytes32 revealNonce\\n ) public pure returns (bytes32) {\\n return keccak256(abi.encodePacked(_overlay, _depth, _hash, revealNonce));\\n }\\n\\n /**\\n * @notice Returns true if current block is during reveal phase.\\n */\\n function currentPhaseReveal() public view returns (bool) {\\n uint256 number = block.number % ROUND_LENGTH;\\n if (number >= ROUND_LENGTH / 4 && number < ROUND_LENGTH / 2) {\\n return true;\\n }\\n return false;\\n }\\n\\n /**\\n * @notice Returns true if current block is during reveal phase.\\n */\\n function currentRoundReveals() public view returns (Reveal[] memory) {\\n if (!currentPhaseClaim()) {\\n revert NotClaimPhase();\\n }\\n uint64 cr = currentRound();\\n if (cr != currentRevealRound) {\\n revert NoReveals();\\n }\\n\\n return currentReveals;\\n }\\n\\n // ----------------------------- Claim ------------------------------\\n\\n /**\\n * @notice Returns true if current block is during claim phase.\\n */\\n function currentPhaseClaim() public view returns (bool) {\\n if (block.number % ROUND_LENGTH >= ROUND_LENGTH / 2) {\\n return true;\\n }\\n return false;\\n }\\n\\n function getCurrentTruth() internal view returns (bytes32 Hash, uint8 Depth) {\\n uint256 currentSum;\\n bytes32 randomNumber;\\n uint256 randomNumberTrunc;\\n\\n bytes32 truthRevealedHash;\\n uint8 truthRevealedDepth;\\n uint256 revIndex;\\n string memory truthSelectionAnchor = currentTruthSelectionAnchor();\\n uint256 commitsArrayLength = currentCommits.length;\\n\\n for (uint256 i = 0; i < commitsArrayLength; ) {\\n if (currentCommits[i].revealed) {\\n revIndex = currentCommits[i].revealIndex;\\n currentSum += currentReveals[revIndex].stakeDensity;\\n randomNumber = keccak256(abi.encodePacked(truthSelectionAnchor, i));\\n randomNumberTrunc = uint256(randomNumber & MAX_H);\\n\\n // question is whether randomNumber / MAX_H < probability\\n // where probability is stakeDensity / currentSum\\n // to avoid resorting to floating points all divisions should be\\n // simplified with multiplying both sides (as long as divisor > 0)\\n // randomNumber / (MAX_H + 1) < stakeDensity / currentSum\\n // ( randomNumber / (MAX_H + 1) ) * currentSum < stakeDensity\\n // randomNumber * currentSum < stakeDensity * (MAX_H + 1)\\n if (randomNumberTrunc * currentSum < currentReveals[revIndex].stakeDensity * (uint256(MAX_H) + 1)) {\\n truthRevealedHash = currentReveals[revIndex].hash;\\n truthRevealedDepth = currentReveals[revIndex].depth;\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n return (truthRevealedHash, truthRevealedDepth);\\n }\\n\\n /**\\n * @notice Determine if a the owner of a given overlay will be the beneficiary of the claim phase.\\n * @param _overlay The overlay address of the applicant.\\n */\\n function isWinner(bytes32 _overlay) public view returns (bool) {\\n if (!currentPhaseClaim()) {\\n revert NotClaimPhase();\\n }\\n\\n uint64 cr = currentRound();\\n if (cr != currentRevealRound) {\\n revert NoReveals();\\n }\\n\\n if (cr <= currentClaimRound) {\\n revert AlreadyClaimed();\\n }\\n\\n uint256 currentWinnerSelectionSum;\\n bytes32 winnerIs;\\n bytes32 randomNumber;\\n uint256 randomNumberTrunc;\\n bytes32 truthRevealedHash;\\n uint8 truthRevealedDepth;\\n uint256 revIndex;\\n string memory winnerSelectionAnchor = currentWinnerSelectionAnchor();\\n uint256 redundancyCount = 0;\\n\\n // Get current truth\\n (truthRevealedHash, truthRevealedDepth) = getCurrentTruth();\\n uint256 commitsArrayLength = currentCommits.length;\\n\\n for (uint256 i = 0; i < commitsArrayLength; ) {\\n revIndex = currentCommits[i].revealIndex;\\n\\n // Deterministically read winner\\n if (\\n currentCommits[i].revealed &&\\n truthRevealedHash == currentReveals[revIndex].hash &&\\n truthRevealedDepth == currentReveals[revIndex].depth\\n ) {\\n currentWinnerSelectionSum += currentReveals[revIndex].stakeDensity;\\n randomNumber = keccak256(abi.encodePacked(winnerSelectionAnchor, redundancyCount));\\n randomNumberTrunc = uint256(randomNumber & MAX_H);\\n\\n if (\\n randomNumberTrunc * currentWinnerSelectionSum <\\n currentReveals[revIndex].stakeDensity * (uint256(MAX_H) + 1)\\n ) {\\n winnerIs = currentReveals[revIndex].overlay;\\n }\\n\\n redundancyCount++;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n return (winnerIs == _overlay);\\n }\\n\\n // ----------------------------- Claim verifications ------------------------------\\n\\n function socFunction(ChunkInclusionProof calldata entryProof) internal pure {\\n if (entryProof.socProof.length == 0) return;\\n\\n if (\\n !Signatures.socVerify(\\n entryProof.socProof[0].signer, // signer Ethereum address to check against\\n entryProof.socProof[0].signature,\\n entryProof.socProof[0].identifier,\\n entryProof.socProof[0].chunkAddr\\n )\\n ) {\\n revert SocVerificationFailed(entryProof.socProof[0].chunkAddr);\\n }\\n\\n if (\\n calculateSocAddress(entryProof.socProof[0].identifier, entryProof.socProof[0].signer) !=\\n entryProof.proveSegment\\n ) {\\n revert SocCalcNotMatching(entryProof.socProof[0].chunkAddr);\\n }\\n }\\n\\n function stampFunction(ChunkInclusionProof calldata entryProof) internal view {\\n // authentic\\n (address batchOwner, uint8 batchDepth, uint8 bucketDepth, , , ) = PostageContract.batches(\\n entryProof.postageProof.postageId\\n );\\n\\n // alive\\n if (batchOwner == address(0)) {\\n revert BatchDoesNotExist(entryProof.postageProof.postageId); // Batch does not exist or expired\\n }\\n\\n uint32 postageIndex = getPostageIndex(entryProof.postageProof.index);\\n uint256 maxPostageIndex = postageStampIndexCount(batchDepth, bucketDepth);\\n // available\\n if (postageIndex >= maxPostageIndex) {\\n revert IndexOutsideSet(entryProof.postageProof.postageId);\\n }\\n\\n // aligned\\n uint64 postageBucket = getPostageBucket(entryProof.postageProof.index);\\n uint64 addressBucket = addressToBucket(entryProof.proveSegment, bucketDepth);\\n if (postageBucket != addressBucket) {\\n revert BucketDiffers(entryProof.postageProof.postageId);\\n }\\n\\n // authorized\\n if (\\n !Signatures.postageVerify(\\n batchOwner,\\n entryProof.postageProof.signature,\\n entryProof.proveSegment,\\n entryProof.postageProof.postageId,\\n entryProof.postageProof.index,\\n entryProof.postageProof.timeStamp\\n )\\n ) {\\n revert SigRecoveryFailed(entryProof.postageProof.postageId);\\n }\\n }\\n\\n function addressToBucket(bytes32 swarmAddress, uint8 bucketDepth) internal pure returns (uint32) {\\n uint32 prefix = uint32(uint256(swarmAddress) >> (256 - 32));\\n return prefix >> (32 - bucketDepth);\\n }\\n\\n function postageStampIndexCount(uint8 postageDepth, uint8 bucketDepth) internal pure returns (uint256) {\\n return 1 << (postageDepth - bucketDepth);\\n }\\n\\n function getPostageIndex(uint64 signedIndex) internal pure returns (uint32) {\\n return uint32(signedIndex);\\n }\\n\\n function getPostageBucket(uint64 signedIndex) internal pure returns (uint64) {\\n return uint32(signedIndex >> 32);\\n }\\n\\n function calculateSocAddress(bytes32 identifier, address signer) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(identifier, signer));\\n }\\n\\n function checkOrder(uint256 a, uint256 b, bytes32 trA1, bytes32 trA2, bytes32 trALast) internal pure {\\n if (a < b) {\\n if (uint256(trA1) >= uint256(trA2)) {\\n revert RandomElementCheckFailed();\\n }\\n if (uint256(trA2) >= uint256(trALast)) {\\n revert LastElementCheckFailed();\\n }\\n } else {\\n if (uint256(trA2) >= uint256(trA1)) {\\n revert RandomElementCheckFailed();\\n }\\n if (uint256(trA1) >= uint256(trALast)) {\\n revert LastElementCheckFailed();\\n }\\n }\\n }\\n\\n function estimateSize(bytes32 trALast) internal view {\\n if (uint256(trALast) >= sampleMaxValue) {\\n revert ReserveCheckFailed(trALast);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe81060e24baf7ad67b4e26841635070f7b68cc54ed49b0983b0b87947ea2d7d1\",\"license\":\"BSD-3-Clause\"},\"src/Util/ChunkProof.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nlibrary BMTChunk {\\n // max chunk payload size\\n uint256 public constant MAX_CHUNK_PAYLOAD_SIZE = 4096;\\n // segment byte size\\n uint256 public constant SEGMENT_SIZE = 32;\\n\\n /**\\n * @notice Changes the endianness of a uint64.\\n * @dev https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel\\n * @param _b The unsigned integer to reverse\\n * @return v - The reversed value\\n */\\n function reverseUint64(uint64 _b) public pure returns (uint64) {\\n uint256 v = _b;\\n\\n // swap bytes\\n v =\\n ((v >> 8) & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) |\\n ((v & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) << 8);\\n // swap 2-byte long pairs\\n v =\\n ((v >> 16) & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) |\\n ((v & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) << 16);\\n // swap 4-byte long pairs\\n v =\\n ((v >> 32) & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) |\\n ((v & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) << 32);\\n\\n return uint64(v);\\n }\\n\\n /** Calculates the root hash from the provided inclusion proof segments and its corresponding segment index\\n * @param _proofSegments Proof segments.\\n * @param _proveSegment Segment to prove.\\n * @param _proveSegmentIndex Prove segment index\\n * @return _calculatedHash chunk hash\\n */\\n function rootHashFromInclusionProof(\\n bytes32[] memory _proofSegments,\\n bytes32 _proveSegment,\\n uint256 _proveSegmentIndex\\n ) internal pure returns (bytes32 _calculatedHash) {\\n _calculatedHash = _proveSegment;\\n for (uint256 i = 0; i < _proofSegments.length; i++) {\\n bool mergeFromRight = _proveSegmentIndex % 2 == 0;\\n _calculatedHash = mergeSegment(_calculatedHash, _proofSegments[i], mergeFromRight);\\n _proveSegmentIndex >>= 1;\\n }\\n return _calculatedHash;\\n }\\n\\n /**\\n * Calculate the chunk address from the Binary Merkle Tree of the chunk data\\n *\\n * The BMT chunk address is the hash of the 8 byte span and the root\\n * hash of a binary Merkle tree (BMT) built on the 32-byte segments\\n * of the underlying data.\\n * @param _proofSegments Proof segments.\\n * @param _proveSegment Segment to prove.\\n * @param _proveSegmentIndex Prove segment index\\n * @param _chunkSpan chunk bytes length\\n * @return _chunkHash chunk hash\\n */\\n function chunkAddressFromInclusionProof(\\n bytes32[] memory _proofSegments,\\n bytes32 _proveSegment,\\n uint256 _proveSegmentIndex,\\n uint64 _chunkSpan\\n ) internal pure returns (bytes32) {\\n bytes32 rootHash = rootHashFromInclusionProof(_proofSegments, _proveSegment, _proveSegmentIndex);\\n return keccak256(abi.encodePacked(reverseUint64(_chunkSpan), rootHash));\\n }\\n\\n function mergeSegment(\\n bytes32 _calculatedHash,\\n bytes32 _proofSegment,\\n bool mergeFromRight\\n ) internal pure returns (bytes32 res) {\\n if (mergeFromRight) {\\n res = keccak256(abi.encode(_calculatedHash, _proofSegment));\\n } else {\\n res = keccak256(abi.encode(_proofSegment, _calculatedHash));\\n }\\n return res;\\n }\\n}\\n\",\"keccak256\":\"0xe4a86f2002b8b8fc4c955537d6b80ba42fb04a816e783ddbd05f0484b013938a\",\"license\":\"MIT\"},\"src/Util/Signatures.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nlibrary Signatures {\\n error InvalidSignatureLength();\\n\\n /** Hash of the message to sign */\\n function getPostageMessageHash(\\n bytes32 _chunkAddr,\\n bytes32 _batchId,\\n uint64 _index,\\n uint64 _timeStamp\\n ) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(_chunkAddr, _batchId, _index, _timeStamp));\\n }\\n\\n function postageVerify(\\n address _signer, // signer Ethereum address to check against\\n bytes memory _signature,\\n bytes32 _chunkAddr,\\n bytes32 _postageId,\\n uint64 _index,\\n uint64 _timeStamp\\n ) internal pure returns (bool) {\\n bytes32 messageHash = getPostageMessageHash(_chunkAddr, _postageId, _index, _timeStamp);\\n bytes32 ethMessageHash = getEthSignedMessageHash(messageHash);\\n\\n return recoverSigner(ethMessageHash, _signature) == _signer;\\n }\\n\\n function getEthSignedMessageHash(bytes32 _messageHash) internal pure returns (bytes32) {\\n /*\\n Signature is produced by signing a keccak256 hash with the following format:\\n \\\"\\\\x19Ethereum Signed Message\\\\n\\\" + len(msg) + msg\\n */\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", _messageHash));\\n }\\n\\n function recoverSigner(\\n bytes32 _ethSignedMessageHash, // it has to be prefixed message: https://ethereum.stackexchange.com/questions/19582/does-ecrecover-in-solidity-expects-the-x19ethereum-signed-message-n-prefix/21037\\n bytes memory _signature\\n ) internal pure returns (address) {\\n (bytes32 r, bytes32 s, uint8 v) = splitSignature(_signature);\\n\\n return ecrecover(_ethSignedMessageHash, v, r, s);\\n }\\n\\n function splitSignature(bytes memory sig) internal pure returns (bytes32 r_, bytes32 s_, uint8 v_) {\\n if (sig.length != 65) {\\n revert InvalidSignatureLength();\\n }\\n\\n assembly {\\n /*\\n verbose explanation: https://ethereum.stackexchange.com/questions/135591/split-signature-function-in-solidity-by-example-docs\\n First 32 bytes stores the length of the signature\\n add(sig, 32) = pointer of sig + 32\\n effectively, skips first 32 bytes of signature\\n mload(p) loads next 32 bytes starting at the memory address p into memory\\n */\\n\\n // first 32 bytes, after the length prefix\\n r_ := mload(add(sig, 32))\\n // second 32 bytes\\n s_ := mload(add(sig, 64))\\n // final byte (first byte of the next 32 bytes)\\n v_ := byte(0, mload(add(sig, 96)))\\n }\\n\\n // implicitly return (r, s, v)\\n }\\n\\n function getSocMessageHash(bytes32 _identifier, bytes32 _chunkAddr) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(_identifier, _chunkAddr));\\n }\\n\\n function socVerify(\\n address _signer, // signer Ethereum address to check against\\n bytes memory _signature,\\n bytes32 _identifier,\\n bytes32 _chunkAddr\\n ) internal pure returns (bool) {\\n bytes32 messageHash = getSocMessageHash(_identifier, _chunkAddr);\\n bytes32 ethMessageHash = getEthSignedMessageHash(messageHash);\\n\\n return recoverSigner(ethMessageHash, _signature) == _signer;\\n }\\n}\\n\",\"keccak256\":\"0x11762639cfa5bd2ea21922f762254c776ce890ab9e4085b3e3d45dbe21867ac8\",\"license\":\"MIT\"},\"src/Util/TransformedChunkProof.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nlibrary TransformedBMTChunk {\\n // max chunk payload size\\n uint256 public constant MAX_CHUNK_PAYLOAD_SIZE = 4096;\\n // segment byte size\\n uint256 public constant SEGMENT_SIZE = 32;\\n\\n /** Calculates the root hash from the provided inclusion proof segments and its corresponding segment index\\n * @param _proofSegments Proof segments.\\n * @param _proveSegment Segment to prove.\\n * @param _proveSegmentIndex Prove segment index\\n * @return _calculatedHash chunk hash\\n */\\n function transformedRootHashFromInclusionProof(\\n bytes32[] memory _proofSegments,\\n bytes32 _proveSegment,\\n uint256 _proveSegmentIndex,\\n bytes32 key\\n ) internal pure returns (bytes32 _calculatedHash) {\\n _calculatedHash = _proveSegment;\\n for (uint256 i = 0; i < _proofSegments.length; i++) {\\n bool mergeFromRight = _proveSegmentIndex % 2 == 0 ? true : false;\\n _calculatedHash = transformedMergeSegment(_calculatedHash, _proofSegments[i], mergeFromRight, key);\\n _proveSegmentIndex >>= 1;\\n }\\n\\n return _calculatedHash;\\n }\\n\\n /**\\n * @notice Changes the endianness of a uint64.\\n * @dev https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel\\n * @param _b The unsigned integer to reverse\\n * @return v - The reversed value\\n */\\n function reverseUint64(uint64 _b) public pure returns (uint64) {\\n uint256 v = _b;\\n\\n // swap bytes\\n v =\\n ((v >> 8) & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) |\\n ((v & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) << 8);\\n // swap 2-byte long pairs\\n v =\\n ((v >> 16) & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) |\\n ((v & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) << 16);\\n // swap 4-byte long pairs\\n v =\\n ((v >> 32) & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) |\\n ((v & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) << 32);\\n\\n return uint64(v);\\n }\\n\\n /**\\n * Calculate the chunk address from the Binary Merkle Tree of the chunk data\\n *\\n * The BMT chunk address is the hash of the 8 byte span and the root\\n * hash of a binary Merkle tree (BMT) built on the 32-byte segments\\n * of the underlying data.\\n * @param _proofSegments Proof segments.\\n * @param _proveSegment Segment to prove.\\n * @param _proveSegmentIndex Prove segment index\\n * @param _chunkSpan chunk bytes length\\n * @return _chunkHash chunk hash\\n */\\n function transformedChunkAddressFromInclusionProof(\\n bytes32[] memory _proofSegments,\\n bytes32 _proveSegment,\\n uint256 _proveSegmentIndex,\\n uint64 _chunkSpan,\\n bytes32 key\\n ) internal pure returns (bytes32) {\\n bytes32 rootHash = transformedRootHashFromInclusionProof(\\n _proofSegments,\\n _proveSegment,\\n _proveSegmentIndex,\\n key\\n );\\n return keccak256(abi.encodePacked(key, reverseUint64(_chunkSpan), rootHash));\\n }\\n\\n function transformedMergeSegment(\\n bytes32 _calculatedHash,\\n bytes32 _proofSegment,\\n bool mergeFromRight,\\n bytes32 key\\n ) internal pure returns (bytes32 res) {\\n if (mergeFromRight) {\\n res = keccak256(abi.encode(key, _calculatedHash, _proofSegment));\\n } else {\\n res = keccak256(abi.encode(key, _proofSegment, _calculatedHash));\\n }\\n return res;\\n }\\n}\\n\",\"keccak256\":\"0xf36473af0bec0de80c769b139a09bc0329807cb5c3b6234473601081da14350c\",\"license\":\"MIT\"},\"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 setPrice(uint256 _price) 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 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\":\"0xb46f1043bf7fdc22d5f719ab97341211fa30fff499de3cf079be715079b965ad\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", - "bytecode": "0x60806040526008805462ffffff60c01b19166264020160c01b1790557dba1914b54e0348a1028d1a103a95ed55c4004b9d332400000000000000006009553480156200004a57600080fd5b5060405162004e0838038062004e088339810160408190526200006d916200019d565b60018054600380546001600160a01b03199081166001600160a01b03888116919091179092556001600160a81b0319909216610100868316021790925560028054909116918316919091179055620000c7600033620000d0565b505050620001e7565b620000dc8282620000e0565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000dc576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200013c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b80516001600160a01b03811681146200019857600080fd5b919050565b600080600060608486031215620001b357600080fd5b620001be8462000180565b9250620001ce6020850162000180565b9150620001de6040850162000180565b90509250925092565b614c1180620001f76000396000f3fe608060405234801561001057600080fd5b50600436106102775760003560e01c806377c75d1011610160578063b6cd5822116100d8578063dfbf53ae1161008c578063f69ee1d111610071578063f69ee1d1146105df578063f7b188a5146105f2578063fb00f2f3146105fa57600080fd5b8063dfbf53ae1461059c578063f4e6fcca146105cc57600080fd5b8063ce987745116100bd578063ce9877451461056e578063d1e8b63d14610581578063d547741f1461058957600080fd5b8063b6cd582214610541578063c46b40291461055457600080fd5b80638456cb591161012f5780638d8b6428116101145780638d8b6428146104fa57806391d1485414610502578063a217fddf1461053957600080fd5b80638456cb59146104ea5780638a19c8bc146104f257600080fd5b806377c75d10146104645780637fe019c61461047757806382b39b1b1461049257806383220626146104e257600080fd5b80635c975abb116101f357806364c34a85116101c257806369da9114116101a757806369da9114146103de5780636f94aaf2146103f157806372286cba1461040c57600080fd5b806364c34a85146103a957806369bfac01146103b157600080fd5b80635c975abb146103705780635d4844ea1461037b57806362fd29ae1461038e57806363f5cf7c1461039657600080fd5b80632a4e62491161024a5780632f3906da1161022f5780632f3906da1461034257806336568abe1461034a5780635838d6731461035d57600080fd5b80632a4e6249146103185780632f2ff15d1461032d57600080fd5b806301ffc9a71461027c5780631736d472146102a457806318350096146102b7578063248a9ca3146102e7575b600080fd5b61028f61028a366004614312565b61060d565b60405190151581526020015b60405180910390f35b61028f6102b2366004614360565b610676565b6001546102cf9061010090046001600160a01b031681565b6040516001600160a01b03909116815260200161029b565b61030a6102f5366004614399565b60009081526020819052604090206001015490565b60405190815260200161029b565b610320610883565b60405161029b91906143b2565b61034061033b366004614441565b610990565b005b61028f6109ba565b610340610358366004614441565b610a04565b61034061036b366004614483565b610a95565b60015460ff1661028f565b6003546102cf906001600160a01b031681565b61030a611025565b6103406103a43660046144c8565b6110f1565b61030a611526565b6008546103c59067ffffffffffffffff1681565b60405167ffffffffffffffff909116815260200161029b565b6002546102cf906001600160a01b031681565b6008546103c590600160801b900467ffffffffffffffff1681565b61041f61041a366004614399565b611606565b604080519788526001600160a01b0390961660208801529315159486019490945260ff9091166060850152608084015260a083019190915260c082015260e00161029b565b61028f610472366004614399565b611664565b6008546103c590600160401b900467ffffffffffffffff1681565b6104a56104a0366004614399565b611914565b604080519687526001600160a01b03909516602087015260ff909316938501939093526060840152608083019190915260a082015260c00161029b565b61030a61196b565b610340611976565b6103c56119cf565b61028f6119dc565b61028f610510366004614441565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61030a600081565b61034061054f366004614550565b611a06565b61055c611f60565b60405160ff909116815260200161029b565b61030a61057c366004614585565b611fe5565b61028f612054565b610340610597366004614441565b612079565b600a54600b54600c54600d54600e546104a594936001600160a01b03811693600160a01b90910460ff1692909186565b6103406105da3660046145c2565b61209e565b6103406105ed366004614399565b612185565b6103406121d9565b61028f61060836600461460d565b612230565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061067057507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b60035460405163d1052d1f60e01b81526001600160a01b038481166004830152600092839291169063d1052d1f90602401602060405180830381865afa1580156106c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e8919061463b565b600354604051631d54805360e01b81526001600160a01b03878116600483015292935060009290911690631d54805390602401602060405180830381865afa158015610738573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075c9190614654565b6107669085614687565b90506107706109ba565b156107a7576040517fe2586bcc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816000036107c7576040516273e5c360e31b815260040160405180910390fd5b6107d3609860026146a0565b6107dd90436146b7565b82106107fc57604051630a0744c560e01b815260040160405180910390fd5b6003546040516397adedb560e01b81526001600160a01b03878116600483015261087a9216906397adedb590602401602060405180830381865afa158015610848573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086c919061463b565b610874611526565b83612230565b95945050505050565b606061088d6119dc565b6108aa57604051633788c6c160e11b815260040160405180910390fd5b60006108b46119cf565b60085490915067ffffffffffffffff808316600160401b90920416146108ed57604051636fbabc7760e01b815260040160405180910390fd5b6005805480602002602001604051908101604052809291908181526020016000905b828210156109865760008481526020908190206040805160c08101825260058602909201805483526001808201546001600160a01b03811685870152600160a01b900460ff169284019290925260028101546060840152600381015460808401526004015460a0830152908352909201910161090f565b5050505091505090565b6000828152602081905260409020600101546109ab8161226d565b6109b5838361227a565b505050565b6000806109c86098436146e0565b90506109d6600460986146f4565b81101580156109ef57506109ec600260986146f4565b81105b156109fc57600191505090565b600091505090565b6001600160a01b0381163314610a875760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a918282612318565b5050565b610a9d612397565b6000610aa76119cf565b6003546040516397adedb560e01b81523360048201529192506000916001600160a01b03909116906397adedb590602401602060405180830381865afa158015610af5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b19919061463b565b6003546040517f830a053e0000000000000000000000000000000000000000000000000000000081523360048201529192506000916001600160a01b039091169063830a053e90602401602060405180830381865afa158015610b80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba4919061463b565b60035460405163d1052d1f60e01b81523360048201529192506000916001600160a01b039091169063d1052d1f90602401602060405180830381865afa158015610bf2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c16919061463b565b600354604051631d54805360e01b81523360048201529192506000916001600160a01b0390911690631d54805390602401602060405180830381865afa158015610c64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c889190614654565b9050610c92612054565b610cc8576040517fdc816a8700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001610cd6600460986146f4565b610ce091906146b7565b610ceb6098436146e0565b03610d22576040517f5baef6b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8567ffffffffffffffff168567ffffffffffffffff161115610d70576040517f50ff7c0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8567ffffffffffffffff168567ffffffffffffffff161015610dbe576040517f7a0c0fd600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600003610dde576040516273e5c360e31b815260040160405180910390fd5b610dea609860026146a0565b610df490436146b7565b8210610e1357604051630a0744c560e01b815260040160405180910390fd5b60085467ffffffffffffffff868116911614610e5357610e3560046000614230565b6008805467ffffffffffffffff191667ffffffffffffffff87161790555b60045460005b81811015610ec6578560048281548110610e7557610e75614708565b90600052602060002090600502016000015403610ebe576040517fbfec555800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101610e59565b5060046040518060e00160405280878152602001336001600160a01b031681526020016000151581526020018460ff1681526020018681526020018a8152602001600081525090806001815401808255809150506001900390600052602060002090600502016000909190919091506000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160146101000a81548160ff02191690831515021790555060608201518160010160156101000a81548160ff021916908360ff1602179055506080820151816002015560a0820151816003015560c0820151816004015550507f68e0867601a98978930107aee7f425665e61edd70ca594c68ca5da9e81f84c29878660405161101392919067ffffffffffffffff929092168252602082015260400190565b60405180910390a15050505050505050565b6000806110306119cf565b61103b90600161471e565b6007546008549192509061106190600160401b900467ffffffffffffffff16600161471e565b67ffffffffffffffff168267ffffffffffffffff161115610670576008546000906001906110a090600160401b900467ffffffffffffffff1685614746565b6110aa9190614746565b67ffffffffffffffff16905081816040516020016110d2929190918252602082015260400190565b6040516020818303038152906040528051906020012091505092915050565b6110f9612397565b6111016123ea565b6040805160c081018252600a548152600b546001600160a01b0381166020830152600160a01b900460ff1691810191909152600c546060820152600d546080820152600e5460a08201526006546007546000918291611161600f826146e0565b935061116e600e826146e0565b9250838310611185578261118181614767565b9350505b6111988660200135838760400151612230565b6111b857604051633b5f43a360e01b815260036004820152602401610a7e565b6111c386601e612a59565b6111cc86612d6b565b6111d586613078565b6111e88860200135838760400151612230565b61120857604051633b5f43a360e01b815260026004820152602401610a7e565b61121c886112178660026146a0565b612a59565b61122588612d6b565b61122e88613078565b6112418760200135838760400151612230565b61126157604051633b5f43a360e01b815260016004820152602401610a7e565b611270876112178560026146a0565b61127987612d6b565b61128287613078565b6112f884846112918b80614780565b60008181106112a2576112a2614708565b602002919091013590506112b68b80614780565b60008181106112c7576112c7614708565b602002919091013590506112db8b80614780565b60008181106112ec576112ec614708565b9050602002013561330c565b6113226113058780614780565b600081811061131657611316614708565b90506020020135613399565b60015460208601516040516001600160a01b03918216602482015260009261010090049091169060440160408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f51cff8d900000000000000000000000000000000000000000000000000000000179052516113af91906147f5565b6000604051808303816000865af19150503d80600081146113ec576040519150601f19603f3d011682016040523d82523d6000602084013e6113f1565b606091505b505090508061143c576020808701516040516001600160a01b0390911681527f7ae187a0c04cf55b655ca83fa11d37854c882bf1fdcb588469b414731bb0e05a910160405180910390a15b7f788e77979e6e6a8a6a5d2c19c58b1ff9671298f54c85ac6f6aa30379aed5861a8660405161146b9190614811565b60405180910390a17fbee3fc8a3523c1a65fa9308ce1f2b8fd90c24975b141b754603194597846e4dd60018054906101000a90046001600160a01b03166001600160a01b0316638a5e8e326040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114e5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611509919061463b565b6040519081526020015b60405180910390a1505050505050505050565b6000611530612054565b8061156e5750600854600160401b900467ffffffffffffffff166115526119cf565b67ffffffffffffffff1611801561156e575061156c6119dc565b155b156115805761157b61196b565b905090565b6115886119dc565b156115955761157b611025565b61159d6109ba565b80156115cc5750600854600160401b900467ffffffffffffffff166115c06119cf565b67ffffffffffffffff16145b15611603576040517f36b7884b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b90565b6004818154811061161657600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294506001600160a01b0382169360ff600160a01b8404811694600160a81b909404169287565b600061166e6119dc565b61168b57604051633788c6c160e11b815260040160405180910390fd5b60006116956119cf565b60085490915067ffffffffffffffff808316600160401b90920416146116ce57604051636fbabc7760e01b815260040160405180910390fd5b60085467ffffffffffffffff600160801b90910481169082161161170557604051630c8d9eab60e31b815260040160405180910390fd5b6000806000806000806000806117196133d7565b90506000611725613491565b600454919650945060005b81811015611900576004818154811061174b5761174b614708565b90600052602060002090600502016004015494506004818154811061177257611772614708565b906000526020600020906005020160010160149054906101000a900460ff1680156117c05750600585815481106117ab576117ab614708565b90600052602060002090600502016004015487145b80156117fe5750600585815481106117da576117da614708565b600091825260209091206001600590920201015460ff878116600160a01b90920416145b156118f8576005858154811061181657611816614708565b9060005260206000209060050201600301548b6118339190614860565b9a508383604051602001611848929190614873565b60408051601f19818403018152919052805160209091012098506fffffffffffffffffffffffffffffffff808a169850611883906001614860565b6005868154811061189657611896614708565b9060005260206000209060050201600301546118b291906146a0565b6118bc8c8a6146a0565b10156118ea57600585815481106118d5576118d5614708565b90600052602060002090600502016000015499505b826118f481614767565b9350505b600101611730565b505050959099149998505050505050505050565b6005818154811061192457600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294506001600160a01b03821693600160a01b90920460ff169290919086565b60008061103b6119cf565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166119c557604051631d77d47760e21b815260040160405180910390fd5b6119cd61364a565b565b600061157b6098436146f4565b60006119ea600260986146f4565b6119f56098436146e0565b10611a005750600190565b50600090565b611a0e612397565b6000611a186119cf565b6003546040516397adedb560e01b81523360048201529192506000916001600160a01b03909116906397adedb590602401602060405180830381865afa158015611a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8a919061463b565b9050611a94611f60565b60ff168560ff161015611ad3576040517f83d9b7bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611adb6109ba565b611b11576040517fd1088db600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085467ffffffffffffffff838116911614611b59576040517f842a9e0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085467ffffffffffffffff838116600160401b9092041614611c4157611b7e611526565b600655611b8d60056000614251565b600880547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff16600160401b67ffffffffffffffff8516908102919091179091556006546040805192835260208301919091527ff0ae472da9c8da86bda4991a549c03a3cb328b5f360ea11a5b8814f32bb85176910160405180910390a1611c41600754604080516020810192909252449082015260600160408051601f198184030181529190528051602090910120600755565b6000611c4f82878787611fe5565b90506000611c5d838361369e565b9050600060048281548110611c7457611c74614708565b600091825260208083206040805160e08101825260059094029091018054845260018101546001600160a01b0381169385019390935260ff600160a01b84048116151592850192909252600160a81b909204166060830181905260028201546080840152600382015460a084015260049091015460c0830152909250611cfa908a614687565b9050611d0d826000015160065483612230565b611d49576006546040517f14ebbbe4000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b816040015115611d85576040517fa89ac15100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160048481548110611d9a57611d9a614708565b906000526020600020906005020160010160146101000a81548160ff02191690831515021790555060058054905060048481548110611ddb57611ddb614708565b90600052602060002090600502016004018190555060056040518060c001604052808460000151815260200184602001516001600160a01b031681526020018b60ff16815260200184608001518152602001836002611e3a9190614979565b8560800151611e4991906146a0565b815260209081018b90528254600181810185556000948552938290208351600590920201908155908201519281018054604084015160ff16600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199091166001600160a01b0390951694909417939093179092556060810151600280840191909155608080830151600385015560a0909201516004909301929092558351908401517f13fc17fd71632266fe82092de6dd91a06b4fa68d8dc950492e5421cbed55a6a59289929190611f16908690614979565b8660800151611f2591906146a0565b6040805167ffffffffffffffff90951685526020850193909352918301526060820152608081018a905260ff8b1660a082015260c001611513565b6008546000908190611f859067ffffffffffffffff600160801b820481169116614746565b67ffffffffffffffff169050600060fe8211611fa15781611fa4565b60fe5b611faf906001614988565b600b5490915060ff600160a01b9091048116908216811115611fda57611fd58282614687565b611fdd565b60005b935050505090565b60408051602081018690527fff0000000000000000000000000000000000000000000000000000000000000060f886901b169181019190915260418101839052606181018290526000906081015b6040516020818303038152906040528051906020012090505b949350505050565b6000612062600460986146f4565b61206d6098436146e0565b1015611a005750600190565b6000828152602081905260409020600101546120948161226d565b6109b58383612318565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166120ed57604051637bfa4b9f60e01b815260040160405180910390fd5b600880547fffffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b60ff958616027fffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffff1617600160c81b93851693909302929092177fffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffff16600160d01b9190931602919091179055565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166121d457604051637bfa4b9f60e01b815260040160405180910390fd5b600955565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661222857604051631d77d47760e21b815260040160405180910390fd5b6119cd613749565b60008160ff1660000361224557506001612266565b61225460ff83166101006149a1565b61225f9060026149bc565b8484181090505b9392505050565b6122778133613782565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a91576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556122d43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610a91576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60015460ff16156119cd5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a7e565b60006123f46119cf565b90506123fe6119dc565b61241b57604051633788c6c160e11b815260040160405180910390fd5b60085467ffffffffffffffff828116600160401b909204161461245157604051636fbabc7760e01b815260040160405180910390fd5b60085467ffffffffffffffff600160801b90910481169082161161248857604051630c8d9eab60e31b815260040160405180910390fd5b600454604051818152600091829182918291829182917f6752c5e71c95fb93bc7137adeb115a33fa4e54e2683e33d3f90c2bb1c4b6c2a59060200160405180910390a16005546040519081527f4c03de6a759749c0c9387b7014634dc5c6af610e1366023d90751c783a998f8d9060200160405180910390a1612509613491565b6040805183815260ff831660208201529295509093507f34e8eda4cd857cd2865becf58a47748f31415f4a382cbb2cc0c64b9a27c717be910160405180910390a160006125546133d7565b905060005b828110156129415760006004828154811061257657612576614708565b600091825260208083206040805160e08101825260059485029092018054835260018101546001600160a01b0381169484019490945260ff600160a01b85048116151592840192909252600160a81b90930416606082015260028201546080820152600382015460a082015260049091015460c0820181905282549194509291908390811061260757612607614708565b60009182526020918290206040805160c0810182526005939093029091018054835260018101546001600160a01b03811694840194909452600160a01b90930460ff1682820152600283015460608301526003830154608083015260049092015460a082015290840151909150801561268357508060a0015188145b80156126985750806040015160ff168760ff16145b1561278d5760808101516126ac908d614860565b9b50848b6040516020016126c1929190614873565b60408051601f19818403018152919052805160209091012099506fffffffffffffffffffffffffffffffff808b1699506126fc906001614860565b816080015161270b91906146a0565b6127158d8b6146a0565b101561277f578051600a556020810151600b8054604084015160ff16600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199091166001600160a01b03909316929092179190911790556060810151600c556080810151600d5560a0810151600e555b8a61278981614767565b9b50505b826040015180156127b657508060a00151881415806127b65750806040015160ff168760ff1614155b80156127d75750600854600160d01b900460ff166127d56064446146e0565b105b156128835760035460208201516001600160a01b039091169063d009b2d6906128018a6002614979565b60085461281a90609890600160c01b900460ff166146a0565b61282491906146a0565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561286a57600080fd5b505af115801561287e573d6000803e3d6000fd5b505050505b82604001516129335760035460208401516001600160a01b039091169063d009b2d6906128b18a6002614979565b6008546128ca90609890600160c81b900460ff166146a0565b6128d491906146a0565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561291a57600080fd5b505af115801561292e573d6000803e3d6000fd5b505050505b836001019350505050612559565b506002546040517fffb98fe300000000000000000000000000000000000000000000000000000000815261ffff891660048201526000916001600160a01b03169063ffb98fe3906024016020604051808303816000875af11580156129aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ce91906149dc565b905080612a0d5760405161ffff891681527f20378e5d379eabfa30444ecc5eb2b87d0d77bdbf5a58d80d008673b0ca6421419060200160405180910390a15b50506008805467ffffffffffffffff909916600160801b027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff9099169890981790975550505050505050565b600754600090612a6b906080906146e0565b90506000612ace612a7f60a0860186614780565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505050606086013584612ac660a0890160808a016149f7565b6006546137f5565b60408051858152602081018390529192507f94e252069a85aa79db21f5bd8ca4e14dd3a3927aa492711017a2c8ddad95af00910160405180910390a1612b56612b178580614780565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060208601358561040061396d565b600e5414612b815760405163755f0a2560e01b81526001600482015260248101829052604401610a7e565b612b8e60a0850185614780565b6000818110612b9f57612b9f614708565b90506020020135848060400190612bb69190614780565b6000818110612bc757612bc7614708565b9050602002013514612bf65760405163755f0a2560e01b81526002600482015260248101829052604401610a7e565b600080612c0660e0870187614780565b905011612c17578460200135612c4c565b612c2460e0860186614780565b6000818110612c3557612c35614708565b9050602002810190612c479190614a12565b606001355b9050612caa612c5e6040870187614780565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505050606087013585612ca560a08a0160808b016149f7565b61396d565b8114612cd35760405163755f0a2560e01b81526003600482015260248101839052604401610a7e565b6000612ce260e0870187614780565b90501115612d1a5760408051602080880135908201529081018390526060016040516020818303038152906040528051906020012091505b81612d258680614780565b6000818110612d3657612d36614708565b9050602002013514612d645760405163755f0a2560e01b815260048181015260248101839052604401610a7e565b5050505050565b6001546000908190819061010090046001600160a01b031663c81e25ab612d9560c0870187614a12565b602001356040518263ffffffff1660e01b8152600401612db791815260200190565b60c060405180830381865afa158015612dd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612df89190614a28565b509396509194509250506001600160a01b0384169050612e5857612e1f60c0850185614a12565b602001356040517f2396d34e000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b6000612e7b612e6a60c0870187614a12565b6116039060608101906040016149f7565b90506000612e898484613adb565b9050808263ffffffff1610612ede57612ea560c0870187614a12565b602001356040517f1362e4a0000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b6000612f0d612ef060c0890189614a12565b612f019060608101906040016149f7565b60201c63ffffffff1690565b90506000612f1f886020013586613af6565b63ffffffff16905067ffffffffffffffff82168114612f7e57612f4560c0890189614a12565b602001356040517f6dd6a24f000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b61302487612f8f60c08b018b614a12565b612f999080614a96565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060208b0135612fdf60c08d018d614a12565b60200135612ff060c08e018e614a12565b6130019060608101906040016149f7565b61300e60c08f018f614a12565b61301f9060808101906060016149f7565b613b1d565b61306e5761303560c0890189614a12565b602001356040517fdb12fb9d000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b5050505050505050565b61308560e0820182614780565b90506000036130915750565b6131b26130a160e0830183614780565b60008181106130b2576130b2614708565b90506020028101906130c49190614a12565b6130d2906020810190614add565b6130df60e0840184614780565b60008181106130f0576130f0614708565b90506020028101906131029190614a12565b613110906020810190614a96565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506131529250505060e0850185614780565b600081811061316357613163614708565b90506020028101906131759190614a12565b6040013561318660e0860186614780565b600081811061319757613197614708565b90506020028101906131a99190614a12565b60600135613bb4565b61321f576131c360e0820182614780565b60008181106131d4576131d4614708565b90506020028101906131e69190614a12565b606001356040517fd740df61000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b602081013561329e61323460e0840184614780565b600081811061324557613245614708565b90506020028101906132579190614a12565b6040013561326860e0850185614780565b600081811061327957613279614708565b905060200281019061328b9190614a12565b613299906020810190614add565b613c47565b14612277576132b060e0820182614780565b60008181106132c1576132c1614708565b90506020028101906132d39190614a12565b606001356040517f82f2469d000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b838510156133595781831061333457604051633d386eb360e11b815260040160405180910390fd5b80821061335457604051633588c6d360e11b815260040160405180910390fd5b612d64565b82821061337957604051633d386eb360e11b815260040160405180910390fd5b808310612d6457604051633588c6d360e11b815260040160405180910390fd5b6009548110612277576040517fb6052cdf00000000000000000000000000000000000000000000000000000000815260048101829052602401610a7e565b60606133e16119dc565b6133fe57604051633788c6c160e11b815260040160405180910390fd5b60006134086119cf565b60085490915067ffffffffffffffff808316600160401b909204161461344157604051636fbabc7760e01b815260040160405180910390fd5b60075460405160200161347c9181527f3100000000000000000000000000000000000000000000000000000000000000602082015260210190565b60405160208183030381529060405291505090565b60008060008060008060008060006134a7613c95565b60045490915060005b8181101561363957600481815481106134cb576134cb614708565b906000526020600020906005020160010160149054906101000a900460ff1615613631576004818154811061350257613502614708565b90600052602060002090600502016004015493506005848154811061352957613529614708565b906000526020600020906005020160030154896135469190614860565b9850828160405160200161355b929190614873565b60408051601f19818403018152919052805160209091012097506fffffffffffffffffffffffffffffffff8089169750613596906001614860565b600585815481106135a9576135a9614708565b9060005260206000209060050201600301546135c591906146a0565b6135cf8a896146a0565b101561363157600584815481106135e8576135e8614708565b90600052602060002090600502016004015495506005848154811061360f5761360f614708565b906000526020600020906005020160010160149054906101000a900460ff1694505b6001016134b0565b509399929850919650505050505050565b613652612397565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b6000805b6004548110156137165783600482815481106136c0576136c0614708565b9060005260206000209060050201600001541480156137025750600481815481106136ed576136ed614708565b90600052602060002090600502016003015483145b1561370e579050610670565b6001016136a2565b506040517fd950091500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613751613d1e565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613681565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a91576137b381613d70565b6137be836020613d82565b6040516020016137cf929190614afa565b60408051601f198184030181529082905262461bcd60e51b8252610a7e91600401614b7b565b60008061380487878786613f47565b905082613909856000808267ffffffffffffffff1690506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b600882901c7eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff161790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b601082901c7dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff161790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b602082901c7bffffffff00000000ffffffff00000000ffffffff00000000ffffffff1617905080915050919050565b8260405160200161394b9392919092835260c09190911b77ffffffffffffffffffffffffffffffffffffffffffffffff19166020830152602882015260480190565b6040516020818303038152906040528051906020012091505095945050505050565b60008061397b868686613fbd565b9050613a7f836000808267ffffffffffffffff1690506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b600882901c7eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff161790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b601082901c7dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff161790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b602082901c7bffffffff00000000ffffffff00000000ffffffff00000000ffffffff1617905080915050919050565b81604051602001613aba92919060c09290921b77ffffffffffffffffffffffffffffffffffffffffffffffff19168252600882015260280190565b60405160208183030381529060405280519060200120915050949350505050565b6000613ae78284614687565b60ff166001901b905092915050565b600060e083901c613b08836020614687565b60ff168163ffffffff16901c91505092915050565b600080613b2c86868686614025565b90506000613b87826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050886001600160a01b0316613b9d828a614070565b6001600160a01b0316149998505050505050505050565b600080613bc184846140ef565b90506000613c1c826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050866001600160a01b0316613c328288614070565b6001600160a01b031614979650505050505050565b60008282604051602001613c7792919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b60405160208183030381529060405280519060200120905092915050565b6060613c9f6119dc565b613cbc57604051633788c6c160e11b815260040160405180910390fd5b6000613cc66119cf565b60085490915067ffffffffffffffff808316600160401b9092041614613cff57604051636fbabc7760e01b815260040160405180910390fd5b60075460405160200161347c918152600360fc1b602082015260210190565b60015460ff166119cd5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610a7e565b60606106706001600160a01b03831660145b60606000613d918360026146a0565b613d9c906002614860565b67ffffffffffffffff811115613db457613db4614bae565b6040519080825280601f01601f191660200182016040528015613dde576020820181803683370190505b509050600360fc1b81600081518110613df957613df9614708565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613e4457613e44614708565b60200101906001600160f81b031916908160001a9053506000613e688460026146a0565b613e73906001614860565b90505b6001811115613ef8577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613eb457613eb4614708565b1a60f81b828281518110613eca57613eca614708565b60200101906001600160f81b031916908160001a90535060049490941c93613ef181614bc4565b9050613e76565b5083156122665760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a7e565b8260005b8551811015613fb4576000613f616002866146e0565b15613f6d576000613f70565b60015b9050613f9783888481518110613f8857613f88614708565b6020026020010151838761410b565b9250600185901c9450508080613fac90614767565b915050613f4b565b50949350505050565b8160005b845181101561401d576000613fd76002856146e0565b600014905061400083878481518110613ff257613ff2614708565b60200260200101518361416b565b9250600184901c935050808061401590614767565b915050613fc1565b509392505050565b604080516020810186905290810184905277ffffffffffffffffffffffffffffffffffffffffffffffff1960c084811b8216606084015283901b166068820152600090607001612033565b60008060008061407f856141d2565b6040805160008152602081018083528b905260ff8316918101919091526060810184905260808101839052929550909350915060019060a0016020604051602081039080840390855afa1580156140da573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b6040805160208101849052908101829052600090606001613c77565b6000821561414b5760408051602081018490529081018690526060810185905260800160405160208183030381529060405280519060200120905061204c565b604080516020810184905290810185905260608101869052608001612033565b600081156141a4576040805160208101869052908101849052606001604051602081830303815290604052805190602001209050612266565b5050604080516020808201939093528082019390935280518084038201815260609093019052815191012090565b60008060008351604114614212576040517f4be6321b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505060208101516040820151606090920151909260009190911a90565b50805460008255600502906000526020600020908101906122779190614272565b508054600082556005029060005260206000209081019061227791906142c9565b5b808211156142c55760008082556001820180547fffffffffffffffffffff0000000000000000000000000000000000000000000016905560028201819055600382018190556004820155600501614273565b5090565b5b808211156142c557600080825560018201805474ffffffffffffffffffffffffffffffffffffffffff19169055600282018190556003820181905560048201556005016142ca565b60006020828403121561432457600080fd5b81356001600160e01b03198116811461226657600080fd5b6001600160a01b038116811461227757600080fd5b60ff8116811461227757600080fd5b6000806040838503121561437357600080fd5b823561437e8161433c565b9150602083013561438e81614351565b809150509250929050565b6000602082840312156143ab57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b8181101561443557614422838551805182526001600160a01b03602082015116602083015260ff6040820151166040830152606081015160608301526080810151608083015260a081015160a08301525050565b9284019260c092909201916001016143ce565b50909695505050505050565b6000806040838503121561445457600080fd5b82359150602083013561438e8161433c565b803567ffffffffffffffff8116811461447e57600080fd5b919050565b6000806040838503121561449657600080fd5b823591506144a660208401614466565b90509250929050565b600061010082840312156144c257600080fd5b50919050565b6000806000606084860312156144dd57600080fd5b833567ffffffffffffffff808211156144f557600080fd5b614501878388016144af565b9450602086013591508082111561451757600080fd5b614523878388016144af565b9350604086013591508082111561453957600080fd5b50614546868287016144af565b9150509250925092565b60008060006060848603121561456557600080fd5b833561457081614351565b95602085013595506040909401359392505050565b6000806000806080858703121561459b57600080fd5b8435935060208501356145ad81614351565b93969395505050506040820135916060013590565b6000806000606084860312156145d757600080fd5b83356145e281614351565b925060208401356145f281614351565b9150604084013561460281614351565b809150509250925092565b60008060006060848603121561462257600080fd5b8335925060208401359150604084013561460281614351565b60006020828403121561464d57600080fd5b5051919050565b60006020828403121561466657600080fd5b815161226681614351565b634e487b7160e01b600052601160045260246000fd5b60ff828116828216039081111561067057610670614671565b808202811582820484141761067057610670614671565b8181038181111561067057610670614671565b634e487b7160e01b600052601260045260246000fd5b6000826146ef576146ef6146ca565b500690565b600082614703576147036146ca565b500490565b634e487b7160e01b600052603260045260246000fd5b67ffffffffffffffff81811683821601908082111561473f5761473f614671565b5092915050565b67ffffffffffffffff82811682821603908082111561473f5761473f614671565b60006001820161477957614779614671565b5060010190565b6000808335601e1984360301811261479757600080fd5b83018035915067ffffffffffffffff8211156147b257600080fd5b6020019150600581901b36038213156147ca57600080fd5b9250929050565b60005b838110156147ec5781810151838201526020016147d4565b50506000910152565b600082516148078184602087016147d1565b9190910192915050565b60c081016106708284805182526001600160a01b03602082015116602083015260ff6040820151166040830152606081015160608301526080810151608083015260a081015160a08301525050565b8082018082111561067057610670614671565b600083516148858184602088016147d1565b9190910191825250602001919050565b600181815b808511156148d05781600019048211156148b6576148b6614671565b808516156148c357918102915b93841c939080029061489a565b509250929050565b6000826148e757506001610670565b816148f457506000610670565b816001811461490a576002811461491457614930565b6001915050610670565b60ff84111561492557614925614671565b50506001821b610670565b5060208310610133831016604e8410600b8410161715614953575081810a610670565b61495d8383614895565b806000190482111561497157614971614671565b029392505050565b600061226660ff8416836148d8565b60ff818116838216019081111561067057610670614671565b61ffff82811682821603908082111561473f5761473f614671565b600061226661ffff8416836148d8565b8051801515811461447e57600080fd5b6000602082840312156149ee57600080fd5b612266826149cc565b600060208284031215614a0957600080fd5b61226682614466565b60008235607e1983360301811261480757600080fd5b60008060008060008060c08789031215614a4157600080fd5b8651614a4c8161433c565b6020880151909650614a5d81614351565b6040880151909550614a6e81614351565b9350614a7c606088016149cc565b92506080870151915060a087015190509295509295509295565b6000808335601e19843603018112614aad57600080fd5b83018035915067ffffffffffffffff821115614ac857600080fd5b6020019150368190038213156147ca57600080fd5b600060208284031215614aef57600080fd5b81356122668161433c565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614b328160178501602088016147d1565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614b6f8160288401602088016147d1565b01602801949350505050565b6020815260008251806020840152614b9a8160408501602087016147d1565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b600081614bd357614bd3614671565b50600019019056fea2646970667358221220bfb91c91c1b7acac1e1e0c04feef5d4b5547a65013c587ca7b8653505ea7ffe564736f6c63430008130033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102775760003560e01c806377c75d1011610160578063b6cd5822116100d8578063dfbf53ae1161008c578063f69ee1d111610071578063f69ee1d1146105df578063f7b188a5146105f2578063fb00f2f3146105fa57600080fd5b8063dfbf53ae1461059c578063f4e6fcca146105cc57600080fd5b8063ce987745116100bd578063ce9877451461056e578063d1e8b63d14610581578063d547741f1461058957600080fd5b8063b6cd582214610541578063c46b40291461055457600080fd5b80638456cb591161012f5780638d8b6428116101145780638d8b6428146104fa57806391d1485414610502578063a217fddf1461053957600080fd5b80638456cb59146104ea5780638a19c8bc146104f257600080fd5b806377c75d10146104645780637fe019c61461047757806382b39b1b1461049257806383220626146104e257600080fd5b80635c975abb116101f357806364c34a85116101c257806369da9114116101a757806369da9114146103de5780636f94aaf2146103f157806372286cba1461040c57600080fd5b806364c34a85146103a957806369bfac01146103b157600080fd5b80635c975abb146103705780635d4844ea1461037b57806362fd29ae1461038e57806363f5cf7c1461039657600080fd5b80632a4e62491161024a5780632f3906da1161022f5780632f3906da1461034257806336568abe1461034a5780635838d6731461035d57600080fd5b80632a4e6249146103185780632f2ff15d1461032d57600080fd5b806301ffc9a71461027c5780631736d472146102a457806318350096146102b7578063248a9ca3146102e7575b600080fd5b61028f61028a366004614312565b61060d565b60405190151581526020015b60405180910390f35b61028f6102b2366004614360565b610676565b6001546102cf9061010090046001600160a01b031681565b6040516001600160a01b03909116815260200161029b565b61030a6102f5366004614399565b60009081526020819052604090206001015490565b60405190815260200161029b565b610320610883565b60405161029b91906143b2565b61034061033b366004614441565b610990565b005b61028f6109ba565b610340610358366004614441565b610a04565b61034061036b366004614483565b610a95565b60015460ff1661028f565b6003546102cf906001600160a01b031681565b61030a611025565b6103406103a43660046144c8565b6110f1565b61030a611526565b6008546103c59067ffffffffffffffff1681565b60405167ffffffffffffffff909116815260200161029b565b6002546102cf906001600160a01b031681565b6008546103c590600160801b900467ffffffffffffffff1681565b61041f61041a366004614399565b611606565b604080519788526001600160a01b0390961660208801529315159486019490945260ff9091166060850152608084015260a083019190915260c082015260e00161029b565b61028f610472366004614399565b611664565b6008546103c590600160401b900467ffffffffffffffff1681565b6104a56104a0366004614399565b611914565b604080519687526001600160a01b03909516602087015260ff909316938501939093526060840152608083019190915260a082015260c00161029b565b61030a61196b565b610340611976565b6103c56119cf565b61028f6119dc565b61028f610510366004614441565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61030a600081565b61034061054f366004614550565b611a06565b61055c611f60565b60405160ff909116815260200161029b565b61030a61057c366004614585565b611fe5565b61028f612054565b610340610597366004614441565b612079565b600a54600b54600c54600d54600e546104a594936001600160a01b03811693600160a01b90910460ff1692909186565b6103406105da3660046145c2565b61209e565b6103406105ed366004614399565b612185565b6103406121d9565b61028f61060836600461460d565b612230565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061067057507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b60035460405163d1052d1f60e01b81526001600160a01b038481166004830152600092839291169063d1052d1f90602401602060405180830381865afa1580156106c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e8919061463b565b600354604051631d54805360e01b81526001600160a01b03878116600483015292935060009290911690631d54805390602401602060405180830381865afa158015610738573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075c9190614654565b6107669085614687565b90506107706109ba565b156107a7576040517fe2586bcc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816000036107c7576040516273e5c360e31b815260040160405180910390fd5b6107d3609860026146a0565b6107dd90436146b7565b82106107fc57604051630a0744c560e01b815260040160405180910390fd5b6003546040516397adedb560e01b81526001600160a01b03878116600483015261087a9216906397adedb590602401602060405180830381865afa158015610848573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086c919061463b565b610874611526565b83612230565b95945050505050565b606061088d6119dc565b6108aa57604051633788c6c160e11b815260040160405180910390fd5b60006108b46119cf565b60085490915067ffffffffffffffff808316600160401b90920416146108ed57604051636fbabc7760e01b815260040160405180910390fd5b6005805480602002602001604051908101604052809291908181526020016000905b828210156109865760008481526020908190206040805160c08101825260058602909201805483526001808201546001600160a01b03811685870152600160a01b900460ff169284019290925260028101546060840152600381015460808401526004015460a0830152908352909201910161090f565b5050505091505090565b6000828152602081905260409020600101546109ab8161226d565b6109b5838361227a565b505050565b6000806109c86098436146e0565b90506109d6600460986146f4565b81101580156109ef57506109ec600260986146f4565b81105b156109fc57600191505090565b600091505090565b6001600160a01b0381163314610a875760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a918282612318565b5050565b610a9d612397565b6000610aa76119cf565b6003546040516397adedb560e01b81523360048201529192506000916001600160a01b03909116906397adedb590602401602060405180830381865afa158015610af5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b19919061463b565b6003546040517f830a053e0000000000000000000000000000000000000000000000000000000081523360048201529192506000916001600160a01b039091169063830a053e90602401602060405180830381865afa158015610b80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba4919061463b565b60035460405163d1052d1f60e01b81523360048201529192506000916001600160a01b039091169063d1052d1f90602401602060405180830381865afa158015610bf2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c16919061463b565b600354604051631d54805360e01b81523360048201529192506000916001600160a01b0390911690631d54805390602401602060405180830381865afa158015610c64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c889190614654565b9050610c92612054565b610cc8576040517fdc816a8700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001610cd6600460986146f4565b610ce091906146b7565b610ceb6098436146e0565b03610d22576040517f5baef6b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8567ffffffffffffffff168567ffffffffffffffff161115610d70576040517f50ff7c0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8567ffffffffffffffff168567ffffffffffffffff161015610dbe576040517f7a0c0fd600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600003610dde576040516273e5c360e31b815260040160405180910390fd5b610dea609860026146a0565b610df490436146b7565b8210610e1357604051630a0744c560e01b815260040160405180910390fd5b60085467ffffffffffffffff868116911614610e5357610e3560046000614230565b6008805467ffffffffffffffff191667ffffffffffffffff87161790555b60045460005b81811015610ec6578560048281548110610e7557610e75614708565b90600052602060002090600502016000015403610ebe576040517fbfec555800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101610e59565b5060046040518060e00160405280878152602001336001600160a01b031681526020016000151581526020018460ff1681526020018681526020018a8152602001600081525090806001815401808255809150506001900390600052602060002090600502016000909190919091506000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160146101000a81548160ff02191690831515021790555060608201518160010160156101000a81548160ff021916908360ff1602179055506080820151816002015560a0820151816003015560c0820151816004015550507f68e0867601a98978930107aee7f425665e61edd70ca594c68ca5da9e81f84c29878660405161101392919067ffffffffffffffff929092168252602082015260400190565b60405180910390a15050505050505050565b6000806110306119cf565b61103b90600161471e565b6007546008549192509061106190600160401b900467ffffffffffffffff16600161471e565b67ffffffffffffffff168267ffffffffffffffff161115610670576008546000906001906110a090600160401b900467ffffffffffffffff1685614746565b6110aa9190614746565b67ffffffffffffffff16905081816040516020016110d2929190918252602082015260400190565b6040516020818303038152906040528051906020012091505092915050565b6110f9612397565b6111016123ea565b6040805160c081018252600a548152600b546001600160a01b0381166020830152600160a01b900460ff1691810191909152600c546060820152600d546080820152600e5460a08201526006546007546000918291611161600f826146e0565b935061116e600e826146e0565b9250838310611185578261118181614767565b9350505b6111988660200135838760400151612230565b6111b857604051633b5f43a360e01b815260036004820152602401610a7e565b6111c386601e612a59565b6111cc86612d6b565b6111d586613078565b6111e88860200135838760400151612230565b61120857604051633b5f43a360e01b815260026004820152602401610a7e565b61121c886112178660026146a0565b612a59565b61122588612d6b565b61122e88613078565b6112418760200135838760400151612230565b61126157604051633b5f43a360e01b815260016004820152602401610a7e565b611270876112178560026146a0565b61127987612d6b565b61128287613078565b6112f884846112918b80614780565b60008181106112a2576112a2614708565b602002919091013590506112b68b80614780565b60008181106112c7576112c7614708565b602002919091013590506112db8b80614780565b60008181106112ec576112ec614708565b9050602002013561330c565b6113226113058780614780565b600081811061131657611316614708565b90506020020135613399565b60015460208601516040516001600160a01b03918216602482015260009261010090049091169060440160408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f51cff8d900000000000000000000000000000000000000000000000000000000179052516113af91906147f5565b6000604051808303816000865af19150503d80600081146113ec576040519150601f19603f3d011682016040523d82523d6000602084013e6113f1565b606091505b505090508061143c576020808701516040516001600160a01b0390911681527f7ae187a0c04cf55b655ca83fa11d37854c882bf1fdcb588469b414731bb0e05a910160405180910390a15b7f788e77979e6e6a8a6a5d2c19c58b1ff9671298f54c85ac6f6aa30379aed5861a8660405161146b9190614811565b60405180910390a17fbee3fc8a3523c1a65fa9308ce1f2b8fd90c24975b141b754603194597846e4dd60018054906101000a90046001600160a01b03166001600160a01b0316638a5e8e326040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114e5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611509919061463b565b6040519081526020015b60405180910390a1505050505050505050565b6000611530612054565b8061156e5750600854600160401b900467ffffffffffffffff166115526119cf565b67ffffffffffffffff1611801561156e575061156c6119dc565b155b156115805761157b61196b565b905090565b6115886119dc565b156115955761157b611025565b61159d6109ba565b80156115cc5750600854600160401b900467ffffffffffffffff166115c06119cf565b67ffffffffffffffff16145b15611603576040517f36b7884b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b90565b6004818154811061161657600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294506001600160a01b0382169360ff600160a01b8404811694600160a81b909404169287565b600061166e6119dc565b61168b57604051633788c6c160e11b815260040160405180910390fd5b60006116956119cf565b60085490915067ffffffffffffffff808316600160401b90920416146116ce57604051636fbabc7760e01b815260040160405180910390fd5b60085467ffffffffffffffff600160801b90910481169082161161170557604051630c8d9eab60e31b815260040160405180910390fd5b6000806000806000806000806117196133d7565b90506000611725613491565b600454919650945060005b81811015611900576004818154811061174b5761174b614708565b90600052602060002090600502016004015494506004818154811061177257611772614708565b906000526020600020906005020160010160149054906101000a900460ff1680156117c05750600585815481106117ab576117ab614708565b90600052602060002090600502016004015487145b80156117fe5750600585815481106117da576117da614708565b600091825260209091206001600590920201015460ff878116600160a01b90920416145b156118f8576005858154811061181657611816614708565b9060005260206000209060050201600301548b6118339190614860565b9a508383604051602001611848929190614873565b60408051601f19818403018152919052805160209091012098506fffffffffffffffffffffffffffffffff808a169850611883906001614860565b6005868154811061189657611896614708565b9060005260206000209060050201600301546118b291906146a0565b6118bc8c8a6146a0565b10156118ea57600585815481106118d5576118d5614708565b90600052602060002090600502016000015499505b826118f481614767565b9350505b600101611730565b505050959099149998505050505050505050565b6005818154811061192457600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294506001600160a01b03821693600160a01b90920460ff169290919086565b60008061103b6119cf565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166119c557604051631d77d47760e21b815260040160405180910390fd5b6119cd61364a565b565b600061157b6098436146f4565b60006119ea600260986146f4565b6119f56098436146e0565b10611a005750600190565b50600090565b611a0e612397565b6000611a186119cf565b6003546040516397adedb560e01b81523360048201529192506000916001600160a01b03909116906397adedb590602401602060405180830381865afa158015611a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8a919061463b565b9050611a94611f60565b60ff168560ff161015611ad3576040517f83d9b7bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611adb6109ba565b611b11576040517fd1088db600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085467ffffffffffffffff838116911614611b59576040517f842a9e0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085467ffffffffffffffff838116600160401b9092041614611c4157611b7e611526565b600655611b8d60056000614251565b600880547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff16600160401b67ffffffffffffffff8516908102919091179091556006546040805192835260208301919091527ff0ae472da9c8da86bda4991a549c03a3cb328b5f360ea11a5b8814f32bb85176910160405180910390a1611c41600754604080516020810192909252449082015260600160408051601f198184030181529190528051602090910120600755565b6000611c4f82878787611fe5565b90506000611c5d838361369e565b9050600060048281548110611c7457611c74614708565b600091825260208083206040805160e08101825260059094029091018054845260018101546001600160a01b0381169385019390935260ff600160a01b84048116151592850192909252600160a81b909204166060830181905260028201546080840152600382015460a084015260049091015460c0830152909250611cfa908a614687565b9050611d0d826000015160065483612230565b611d49576006546040517f14ebbbe4000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b816040015115611d85576040517fa89ac15100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160048481548110611d9a57611d9a614708565b906000526020600020906005020160010160146101000a81548160ff02191690831515021790555060058054905060048481548110611ddb57611ddb614708565b90600052602060002090600502016004018190555060056040518060c001604052808460000151815260200184602001516001600160a01b031681526020018b60ff16815260200184608001518152602001836002611e3a9190614979565b8560800151611e4991906146a0565b815260209081018b90528254600181810185556000948552938290208351600590920201908155908201519281018054604084015160ff16600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199091166001600160a01b0390951694909417939093179092556060810151600280840191909155608080830151600385015560a0909201516004909301929092558351908401517f13fc17fd71632266fe82092de6dd91a06b4fa68d8dc950492e5421cbed55a6a59289929190611f16908690614979565b8660800151611f2591906146a0565b6040805167ffffffffffffffff90951685526020850193909352918301526060820152608081018a905260ff8b1660a082015260c001611513565b6008546000908190611f859067ffffffffffffffff600160801b820481169116614746565b67ffffffffffffffff169050600060fe8211611fa15781611fa4565b60fe5b611faf906001614988565b600b5490915060ff600160a01b9091048116908216811115611fda57611fd58282614687565b611fdd565b60005b935050505090565b60408051602081018690527fff0000000000000000000000000000000000000000000000000000000000000060f886901b169181019190915260418101839052606181018290526000906081015b6040516020818303038152906040528051906020012090505b949350505050565b6000612062600460986146f4565b61206d6098436146e0565b1015611a005750600190565b6000828152602081905260409020600101546120948161226d565b6109b58383612318565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166120ed57604051637bfa4b9f60e01b815260040160405180910390fd5b600880547fffffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b60ff958616027fffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffff1617600160c81b93851693909302929092177fffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffff16600160d01b9190931602919091179055565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166121d457604051637bfa4b9f60e01b815260040160405180910390fd5b600955565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661222857604051631d77d47760e21b815260040160405180910390fd5b6119cd613749565b60008160ff1660000361224557506001612266565b61225460ff83166101006149a1565b61225f9060026149bc565b8484181090505b9392505050565b6122778133613782565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a91576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556122d43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610a91576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60015460ff16156119cd5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a7e565b60006123f46119cf565b90506123fe6119dc565b61241b57604051633788c6c160e11b815260040160405180910390fd5b60085467ffffffffffffffff828116600160401b909204161461245157604051636fbabc7760e01b815260040160405180910390fd5b60085467ffffffffffffffff600160801b90910481169082161161248857604051630c8d9eab60e31b815260040160405180910390fd5b600454604051818152600091829182918291829182917f6752c5e71c95fb93bc7137adeb115a33fa4e54e2683e33d3f90c2bb1c4b6c2a59060200160405180910390a16005546040519081527f4c03de6a759749c0c9387b7014634dc5c6af610e1366023d90751c783a998f8d9060200160405180910390a1612509613491565b6040805183815260ff831660208201529295509093507f34e8eda4cd857cd2865becf58a47748f31415f4a382cbb2cc0c64b9a27c717be910160405180910390a160006125546133d7565b905060005b828110156129415760006004828154811061257657612576614708565b600091825260208083206040805160e08101825260059485029092018054835260018101546001600160a01b0381169484019490945260ff600160a01b85048116151592840192909252600160a81b90930416606082015260028201546080820152600382015460a082015260049091015460c0820181905282549194509291908390811061260757612607614708565b60009182526020918290206040805160c0810182526005939093029091018054835260018101546001600160a01b03811694840194909452600160a01b90930460ff1682820152600283015460608301526003830154608083015260049092015460a082015290840151909150801561268357508060a0015188145b80156126985750806040015160ff168760ff16145b1561278d5760808101516126ac908d614860565b9b50848b6040516020016126c1929190614873565b60408051601f19818403018152919052805160209091012099506fffffffffffffffffffffffffffffffff808b1699506126fc906001614860565b816080015161270b91906146a0565b6127158d8b6146a0565b101561277f578051600a556020810151600b8054604084015160ff16600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199091166001600160a01b03909316929092179190911790556060810151600c556080810151600d5560a0810151600e555b8a61278981614767565b9b50505b826040015180156127b657508060a00151881415806127b65750806040015160ff168760ff1614155b80156127d75750600854600160d01b900460ff166127d56064446146e0565b105b156128835760035460208201516001600160a01b039091169063d009b2d6906128018a6002614979565b60085461281a90609890600160c01b900460ff166146a0565b61282491906146a0565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561286a57600080fd5b505af115801561287e573d6000803e3d6000fd5b505050505b82604001516129335760035460208401516001600160a01b039091169063d009b2d6906128b18a6002614979565b6008546128ca90609890600160c81b900460ff166146a0565b6128d491906146a0565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561291a57600080fd5b505af115801561292e573d6000803e3d6000fd5b505050505b836001019350505050612559565b506002546040517fffb98fe300000000000000000000000000000000000000000000000000000000815261ffff891660048201526000916001600160a01b03169063ffb98fe3906024016020604051808303816000875af11580156129aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ce91906149dc565b905080612a0d5760405161ffff891681527f20378e5d379eabfa30444ecc5eb2b87d0d77bdbf5a58d80d008673b0ca6421419060200160405180910390a15b50506008805467ffffffffffffffff909916600160801b027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff9099169890981790975550505050505050565b600754600090612a6b906080906146e0565b90506000612ace612a7f60a0860186614780565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505050606086013584612ac660a0890160808a016149f7565b6006546137f5565b60408051858152602081018390529192507f94e252069a85aa79db21f5bd8ca4e14dd3a3927aa492711017a2c8ddad95af00910160405180910390a1612b56612b178580614780565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060208601358561040061396d565b600e5414612b815760405163755f0a2560e01b81526001600482015260248101829052604401610a7e565b612b8e60a0850185614780565b6000818110612b9f57612b9f614708565b90506020020135848060400190612bb69190614780565b6000818110612bc757612bc7614708565b9050602002013514612bf65760405163755f0a2560e01b81526002600482015260248101829052604401610a7e565b600080612c0660e0870187614780565b905011612c17578460200135612c4c565b612c2460e0860186614780565b6000818110612c3557612c35614708565b9050602002810190612c479190614a12565b606001355b9050612caa612c5e6040870187614780565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505050606087013585612ca560a08a0160808b016149f7565b61396d565b8114612cd35760405163755f0a2560e01b81526003600482015260248101839052604401610a7e565b6000612ce260e0870187614780565b90501115612d1a5760408051602080880135908201529081018390526060016040516020818303038152906040528051906020012091505b81612d258680614780565b6000818110612d3657612d36614708565b9050602002013514612d645760405163755f0a2560e01b815260048181015260248101839052604401610a7e565b5050505050565b6001546000908190819061010090046001600160a01b031663c81e25ab612d9560c0870187614a12565b602001356040518263ffffffff1660e01b8152600401612db791815260200190565b60c060405180830381865afa158015612dd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612df89190614a28565b509396509194509250506001600160a01b0384169050612e5857612e1f60c0850185614a12565b602001356040517f2396d34e000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b6000612e7b612e6a60c0870187614a12565b6116039060608101906040016149f7565b90506000612e898484613adb565b9050808263ffffffff1610612ede57612ea560c0870187614a12565b602001356040517f1362e4a0000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b6000612f0d612ef060c0890189614a12565b612f019060608101906040016149f7565b60201c63ffffffff1690565b90506000612f1f886020013586613af6565b63ffffffff16905067ffffffffffffffff82168114612f7e57612f4560c0890189614a12565b602001356040517f6dd6a24f000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b61302487612f8f60c08b018b614a12565b612f999080614a96565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060208b0135612fdf60c08d018d614a12565b60200135612ff060c08e018e614a12565b6130019060608101906040016149f7565b61300e60c08f018f614a12565b61301f9060808101906060016149f7565b613b1d565b61306e5761303560c0890189614a12565b602001356040517fdb12fb9d000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b5050505050505050565b61308560e0820182614780565b90506000036130915750565b6131b26130a160e0830183614780565b60008181106130b2576130b2614708565b90506020028101906130c49190614a12565b6130d2906020810190614add565b6130df60e0840184614780565b60008181106130f0576130f0614708565b90506020028101906131029190614a12565b613110906020810190614a96565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506131529250505060e0850185614780565b600081811061316357613163614708565b90506020028101906131759190614a12565b6040013561318660e0860186614780565b600081811061319757613197614708565b90506020028101906131a99190614a12565b60600135613bb4565b61321f576131c360e0820182614780565b60008181106131d4576131d4614708565b90506020028101906131e69190614a12565b606001356040517fd740df61000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b602081013561329e61323460e0840184614780565b600081811061324557613245614708565b90506020028101906132579190614a12565b6040013561326860e0850185614780565b600081811061327957613279614708565b905060200281019061328b9190614a12565b613299906020810190614add565b613c47565b14612277576132b060e0820182614780565b60008181106132c1576132c1614708565b90506020028101906132d39190614a12565b606001356040517f82f2469d000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b838510156133595781831061333457604051633d386eb360e11b815260040160405180910390fd5b80821061335457604051633588c6d360e11b815260040160405180910390fd5b612d64565b82821061337957604051633d386eb360e11b815260040160405180910390fd5b808310612d6457604051633588c6d360e11b815260040160405180910390fd5b6009548110612277576040517fb6052cdf00000000000000000000000000000000000000000000000000000000815260048101829052602401610a7e565b60606133e16119dc565b6133fe57604051633788c6c160e11b815260040160405180910390fd5b60006134086119cf565b60085490915067ffffffffffffffff808316600160401b909204161461344157604051636fbabc7760e01b815260040160405180910390fd5b60075460405160200161347c9181527f3100000000000000000000000000000000000000000000000000000000000000602082015260210190565b60405160208183030381529060405291505090565b60008060008060008060008060006134a7613c95565b60045490915060005b8181101561363957600481815481106134cb576134cb614708565b906000526020600020906005020160010160149054906101000a900460ff1615613631576004818154811061350257613502614708565b90600052602060002090600502016004015493506005848154811061352957613529614708565b906000526020600020906005020160030154896135469190614860565b9850828160405160200161355b929190614873565b60408051601f19818403018152919052805160209091012097506fffffffffffffffffffffffffffffffff8089169750613596906001614860565b600585815481106135a9576135a9614708565b9060005260206000209060050201600301546135c591906146a0565b6135cf8a896146a0565b101561363157600584815481106135e8576135e8614708565b90600052602060002090600502016004015495506005848154811061360f5761360f614708565b906000526020600020906005020160010160149054906101000a900460ff1694505b6001016134b0565b509399929850919650505050505050565b613652612397565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b6000805b6004548110156137165783600482815481106136c0576136c0614708565b9060005260206000209060050201600001541480156137025750600481815481106136ed576136ed614708565b90600052602060002090600502016003015483145b1561370e579050610670565b6001016136a2565b506040517fd950091500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613751613d1e565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613681565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a91576137b381613d70565b6137be836020613d82565b6040516020016137cf929190614afa565b60408051601f198184030181529082905262461bcd60e51b8252610a7e91600401614b7b565b60008061380487878786613f47565b905082613909856000808267ffffffffffffffff1690506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b600882901c7eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff161790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b601082901c7dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff161790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b602082901c7bffffffff00000000ffffffff00000000ffffffff00000000ffffffff1617905080915050919050565b8260405160200161394b9392919092835260c09190911b77ffffffffffffffffffffffffffffffffffffffffffffffff19166020830152602882015260480190565b6040516020818303038152906040528051906020012091505095945050505050565b60008061397b868686613fbd565b9050613a7f836000808267ffffffffffffffff1690506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b600882901c7eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff161790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b601082901c7dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff161790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b602082901c7bffffffff00000000ffffffff00000000ffffffff00000000ffffffff1617905080915050919050565b81604051602001613aba92919060c09290921b77ffffffffffffffffffffffffffffffffffffffffffffffff19168252600882015260280190565b60405160208183030381529060405280519060200120915050949350505050565b6000613ae78284614687565b60ff166001901b905092915050565b600060e083901c613b08836020614687565b60ff168163ffffffff16901c91505092915050565b600080613b2c86868686614025565b90506000613b87826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050886001600160a01b0316613b9d828a614070565b6001600160a01b0316149998505050505050505050565b600080613bc184846140ef565b90506000613c1c826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050866001600160a01b0316613c328288614070565b6001600160a01b031614979650505050505050565b60008282604051602001613c7792919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b60405160208183030381529060405280519060200120905092915050565b6060613c9f6119dc565b613cbc57604051633788c6c160e11b815260040160405180910390fd5b6000613cc66119cf565b60085490915067ffffffffffffffff808316600160401b9092041614613cff57604051636fbabc7760e01b815260040160405180910390fd5b60075460405160200161347c918152600360fc1b602082015260210190565b60015460ff166119cd5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610a7e565b60606106706001600160a01b03831660145b60606000613d918360026146a0565b613d9c906002614860565b67ffffffffffffffff811115613db457613db4614bae565b6040519080825280601f01601f191660200182016040528015613dde576020820181803683370190505b509050600360fc1b81600081518110613df957613df9614708565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613e4457613e44614708565b60200101906001600160f81b031916908160001a9053506000613e688460026146a0565b613e73906001614860565b90505b6001811115613ef8577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613eb457613eb4614708565b1a60f81b828281518110613eca57613eca614708565b60200101906001600160f81b031916908160001a90535060049490941c93613ef181614bc4565b9050613e76565b5083156122665760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a7e565b8260005b8551811015613fb4576000613f616002866146e0565b15613f6d576000613f70565b60015b9050613f9783888481518110613f8857613f88614708565b6020026020010151838761410b565b9250600185901c9450508080613fac90614767565b915050613f4b565b50949350505050565b8160005b845181101561401d576000613fd76002856146e0565b600014905061400083878481518110613ff257613ff2614708565b60200260200101518361416b565b9250600184901c935050808061401590614767565b915050613fc1565b509392505050565b604080516020810186905290810184905277ffffffffffffffffffffffffffffffffffffffffffffffff1960c084811b8216606084015283901b166068820152600090607001612033565b60008060008061407f856141d2565b6040805160008152602081018083528b905260ff8316918101919091526060810184905260808101839052929550909350915060019060a0016020604051602081039080840390855afa1580156140da573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b6040805160208101849052908101829052600090606001613c77565b6000821561414b5760408051602081018490529081018690526060810185905260800160405160208183030381529060405280519060200120905061204c565b604080516020810184905290810185905260608101869052608001612033565b600081156141a4576040805160208101869052908101849052606001604051602081830303815290604052805190602001209050612266565b5050604080516020808201939093528082019390935280518084038201815260609093019052815191012090565b60008060008351604114614212576040517f4be6321b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505060208101516040820151606090920151909260009190911a90565b50805460008255600502906000526020600020908101906122779190614272565b508054600082556005029060005260206000209081019061227791906142c9565b5b808211156142c55760008082556001820180547fffffffffffffffffffff0000000000000000000000000000000000000000000016905560028201819055600382018190556004820155600501614273565b5090565b5b808211156142c557600080825560018201805474ffffffffffffffffffffffffffffffffffffffffff19169055600282018190556003820181905560048201556005016142ca565b60006020828403121561432457600080fd5b81356001600160e01b03198116811461226657600080fd5b6001600160a01b038116811461227757600080fd5b60ff8116811461227757600080fd5b6000806040838503121561437357600080fd5b823561437e8161433c565b9150602083013561438e81614351565b809150509250929050565b6000602082840312156143ab57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b8181101561443557614422838551805182526001600160a01b03602082015116602083015260ff6040820151166040830152606081015160608301526080810151608083015260a081015160a08301525050565b9284019260c092909201916001016143ce565b50909695505050505050565b6000806040838503121561445457600080fd5b82359150602083013561438e8161433c565b803567ffffffffffffffff8116811461447e57600080fd5b919050565b6000806040838503121561449657600080fd5b823591506144a660208401614466565b90509250929050565b600061010082840312156144c257600080fd5b50919050565b6000806000606084860312156144dd57600080fd5b833567ffffffffffffffff808211156144f557600080fd5b614501878388016144af565b9450602086013591508082111561451757600080fd5b614523878388016144af565b9350604086013591508082111561453957600080fd5b50614546868287016144af565b9150509250925092565b60008060006060848603121561456557600080fd5b833561457081614351565b95602085013595506040909401359392505050565b6000806000806080858703121561459b57600080fd5b8435935060208501356145ad81614351565b93969395505050506040820135916060013590565b6000806000606084860312156145d757600080fd5b83356145e281614351565b925060208401356145f281614351565b9150604084013561460281614351565b809150509250925092565b60008060006060848603121561462257600080fd5b8335925060208401359150604084013561460281614351565b60006020828403121561464d57600080fd5b5051919050565b60006020828403121561466657600080fd5b815161226681614351565b634e487b7160e01b600052601160045260246000fd5b60ff828116828216039081111561067057610670614671565b808202811582820484141761067057610670614671565b8181038181111561067057610670614671565b634e487b7160e01b600052601260045260246000fd5b6000826146ef576146ef6146ca565b500690565b600082614703576147036146ca565b500490565b634e487b7160e01b600052603260045260246000fd5b67ffffffffffffffff81811683821601908082111561473f5761473f614671565b5092915050565b67ffffffffffffffff82811682821603908082111561473f5761473f614671565b60006001820161477957614779614671565b5060010190565b6000808335601e1984360301811261479757600080fd5b83018035915067ffffffffffffffff8211156147b257600080fd5b6020019150600581901b36038213156147ca57600080fd5b9250929050565b60005b838110156147ec5781810151838201526020016147d4565b50506000910152565b600082516148078184602087016147d1565b9190910192915050565b60c081016106708284805182526001600160a01b03602082015116602083015260ff6040820151166040830152606081015160608301526080810151608083015260a081015160a08301525050565b8082018082111561067057610670614671565b600083516148858184602088016147d1565b9190910191825250602001919050565b600181815b808511156148d05781600019048211156148b6576148b6614671565b808516156148c357918102915b93841c939080029061489a565b509250929050565b6000826148e757506001610670565b816148f457506000610670565b816001811461490a576002811461491457614930565b6001915050610670565b60ff84111561492557614925614671565b50506001821b610670565b5060208310610133831016604e8410600b8410161715614953575081810a610670565b61495d8383614895565b806000190482111561497157614971614671565b029392505050565b600061226660ff8416836148d8565b60ff818116838216019081111561067057610670614671565b61ffff82811682821603908082111561473f5761473f614671565b600061226661ffff8416836148d8565b8051801515811461447e57600080fd5b6000602082840312156149ee57600080fd5b612266826149cc565b600060208284031215614a0957600080fd5b61226682614466565b60008235607e1983360301811261480757600080fd5b60008060008060008060c08789031215614a4157600080fd5b8651614a4c8161433c565b6020880151909650614a5d81614351565b6040880151909550614a6e81614351565b9350614a7c606088016149cc565b92506080870151915060a087015190509295509295509295565b6000808335601e19843603018112614aad57600080fd5b83018035915067ffffffffffffffff821115614ac857600080fd5b6020019150368190038213156147ca57600080fd5b600060208284031215614aef57600080fd5b81356122668161433c565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614b328160178501602088016147d1565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614b6f8160288401602088016147d1565b01602801949350505050565b6020815260008251806020840152614b9a8160408501602087016147d1565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b600081614bd357614bd3614671565b50600019019056fea2646970667358221220bfb91c91c1b7acac1e1e0c04feef5d4b5547a65013c587ca7b8653505ea7ffe564736f6c63430008130033", + "numDeployments": 10, + "solcInputHash": "be98d61f2910c0140b59702042017efa", + "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staking\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"postageContract\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"oracleContract\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyClaimed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyCommitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyRevealed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"BatchDoesNotExist\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"BucketDiffers\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitRoundNotStarted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CommitRoundOver\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FirstRevealDone\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"InclusionProofFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"IndexOutsideSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"LastElementCheckFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustStake2Rounds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoCommitsReceived\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoMatchingCommit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoReveals\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotClaimPhase\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotCommitPhase\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotMatchingOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotRevealPhase\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotStaked\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyPauser\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OutOfDepth\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"OutOfDepthClaim\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"OutOfDepthReveal\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PhaseLastBlock\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RandomElementCheckFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"trALast\",\"type\":\"bytes32\"}],\"name\":\"ReserveCheckFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"SigRecoveryFailed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"SocCalcNotMatching\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"SocVerificationFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrongPhase\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"validChunkCount\",\"type\":\"uint256\"}],\"name\":\"ChunkCount\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"roundNumber\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"height\",\"type\":\"uint8\"}],\"name\":\"Committed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"CountCommits\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"CountReveals\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"roundNumber\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"anchor\",\"type\":\"bytes32\"}],\"name\":\"CurrentRevealAnchor\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint16\",\"name\":\"redundancyCount\",\"type\":\"uint16\"}],\"name\":\"PriceAdjustmentSkipped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"roundNumber\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"stakeDensity\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"reserveCommitment\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"}],\"name\":\"Revealed\",\"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\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"}],\"name\":\"TruthSelected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakeDensity\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"indexed\":false,\"internalType\":\"struct Redistribution.Reveal\",\"name\":\"winner\",\"type\":\"tuple\"}],\"name\":\"WinnerSelected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"WithdrawFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"indexInRC\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"chunkAddress\",\"type\":\"bytes32\"}],\"name\":\"transformedChunkAddressFromInclusionProof\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OracleContract\",\"outputs\":[{\"internalType\":\"contract IPriceOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PostageContract\",\"outputs\":[{\"internalType\":\"contract IPostageStamp\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"Stakes\",\"outputs\":[{\"internalType\":\"contract IStakeRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"proveSegment\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments2\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"proveSegment2\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"chunkSpan\",\"type\":\"uint64\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments3\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"postageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"index\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timeStamp\",\"type\":\"uint64\"}],\"internalType\":\"struct Redistribution.PostageProof\",\"name\":\"postageProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"identifier\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"chunkAddr\",\"type\":\"bytes32\"}],\"internalType\":\"struct Redistribution.SOCProof[]\",\"name\":\"socProof\",\"type\":\"tuple[]\"}],\"internalType\":\"struct Redistribution.ChunkInclusionProof\",\"name\":\"entryProof1\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"proveSegment\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments2\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"proveSegment2\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"chunkSpan\",\"type\":\"uint64\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments3\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"postageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"index\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timeStamp\",\"type\":\"uint64\"}],\"internalType\":\"struct Redistribution.PostageProof\",\"name\":\"postageProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"identifier\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"chunkAddr\",\"type\":\"bytes32\"}],\"internalType\":\"struct Redistribution.SOCProof[]\",\"name\":\"socProof\",\"type\":\"tuple[]\"}],\"internalType\":\"struct Redistribution.ChunkInclusionProof\",\"name\":\"entryProof2\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"proveSegment\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments2\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"proveSegment2\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"chunkSpan\",\"type\":\"uint64\"},{\"internalType\":\"bytes32[]\",\"name\":\"proofSegments3\",\"type\":\"bytes32[]\"},{\"components\":[{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"postageId\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"index\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"timeStamp\",\"type\":\"uint64\"}],\"internalType\":\"struct Redistribution.PostageProof\",\"name\":\"postageProof\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"identifier\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"chunkAddr\",\"type\":\"bytes32\"}],\"internalType\":\"struct Redistribution.SOCProof[]\",\"name\":\"socProof\",\"type\":\"tuple[]\"}],\"internalType\":\"struct Redistribution.ChunkInclusionProof\",\"name\":\"entryProofLast\",\"type\":\"tuple\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_obfuscatedHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"_roundNumber\",\"type\":\"uint64\"}],\"name\":\"commit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentClaimRound\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentCommitRound\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"currentCommits\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"revealed\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"height\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"obfuscatedHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"revealIndex\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentMinimumDepth\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentPhaseClaim\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentPhaseCommit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentPhaseReveal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentRevealRound\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"currentReveals\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakeDensity\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentRound\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentRoundAnchor\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"returnVal\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentRoundReveals\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakeDensity\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"internalType\":\"struct Redistribution.Reveal[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentSeed\",\"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\":\"A\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"B\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"minimum\",\"type\":\"uint8\"}],\"name\":\"inProximity\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_depth\",\"type\":\"uint8\"}],\"name\":\"isParticipatingInUpcomingRound\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_overlay\",\"type\":\"bytes32\"}],\"name\":\"isWinner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextSeed\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"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\":\"uint8\",\"name\":\"_depth\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"_hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"_revealNonce\",\"type\":\"bytes32\"}],\"name\":\"reveal\",\"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\":\"uint8\",\"name\":\"_penaltyMultiplierDisagreement\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"_penaltyMultiplierNonRevealed\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"_penaltyRandomFactor\",\"type\":\"uint8\"}],\"name\":\"setFreezingParams\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sampleMaxValue\",\"type\":\"uint256\"}],\"name\":\"setSampleMaxValue\",\"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\"},{\"inputs\":[],\"name\":\"winner\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"overlay\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"depth\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"stake\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakeDensity\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_overlay\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"_depth\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"_hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"revealNonce\",\"type\":\"bytes32\"}],\"name\":\"wrapCommit\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"The Swarm Authors\",\"details\":\"Implements a Schelling Co-ordination game to form consensus around the Reserve Commitment hash. This takes place in three phases: _commit_, _reveal_ and _claim_. A node, upon establishing that it _isParticipatingInUpcomingRound_, i.e. it's overlay falls within proximity order of its reported depth with the _currentRoundAnchor_, prepares a \\\"reserve commitment hash\\\" using the chunks it currently stores in its reserve and calculates the \\\"storage depth\\\" (see Bee for details). These values, if calculated honestly, and with the right chunks stored, should be the same for every node in a neighbourhood. This is the Schelling point. Each eligible node can then use these values, together with a random, single use, secret _revealNonce_ and their _overlay_ as the pre-image values for the obsfucated _commit_, using the _wrapCommit_ method. Once the _commit_ round has elapsed, participating nodes must provide the values used to calculate their obsfucated _commit_ hash, which, once verified for correctness and proximity to the anchor are retained in the _currentReveals_. Nodes that have committed but do not reveal the correct values used to create the pre-image will have their stake \\\"frozen\\\" for a period of rounds proportional to their reported depth. During the _reveal_ round, randomness is updated after every successful reveal. Once the reveal round is concluded, the _currentRoundAnchor_ is updated and users can determine if they will be eligible their overlay will be eligible for the next commit phase using _isParticipatingInUpcomingRound_. When the _reveal_ phase has been concluded, the claim phase can begin. At this point, the truth teller and winner are already determined. By calling _isWinner_, an applicant node can run the relevant logic to determine if they have been selected as the beneficiary of this round. When calling _claim_, the current pot from the PostageStamp contract is withdrawn and transferred to that beneficiaries address. Nodes that have revealed values that differ from the truth, have their stakes \\\"frozen\\\" for a period of rounds proportional to their reported depth.\",\"events\":{\"ChunkCount(uint256)\":{\"details\":\"Emit from Postagestamp contract valid chunk count at the end of claim\"},\"Committed(uint256,bytes32,uint8)\":{\"details\":\"Logs that an overlay has committed\"},\"CountCommits(uint256)\":{\"details\":\"Emits the number of commits being processed by the claim phase.\"},\"CountReveals(uint256)\":{\"details\":\"Emits the number of reveals being processed by the claim phase.\"},\"CurrentRevealAnchor(uint256,bytes32)\":{\"details\":\"Bytes32 anhor of current reveal round\"},\"Paused(address)\":{\"details\":\"Emitted when the pause is triggered by `account`.\"},\"PriceAdjustmentSkipped(uint16)\":{\"details\":\"Output external call status\"},\"Revealed(uint256,bytes32,uint256,uint256,bytes32,uint8)\":{\"details\":\"Logs that an overlay has revealed\"},\"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`)\"},\"TruthSelected(bytes32,uint8)\":{\"details\":\"Emitted when the truth oracle of a round is selected in the claim phase.\"},\"Unpaused(address)\":{\"details\":\"Emitted when the pause is lifted by `account`.\"},\"WinnerSelected((bytes32,address,uint8,uint256,uint256,bytes32))\":{\"details\":\"Emitted when the winner of a round is selected in the claim phase\"},\"WithdrawFailed(address)\":{\"details\":\"Withdraw not successful in claim\"},\"transformedChunkAddressFromInclusionProof(uint256,bytes32)\":{\"details\":\"Logs for inclusion proof\"}},\"kind\":\"dev\",\"methods\":{\"commit(bytes32,uint64)\":{\"details\":\"If a node's overlay is _inProximity_(_depth_) of the _currentRoundAnchor_, that node may compute an _obfuscatedHash_ by providing their _overlay_, reported storage _depth_, reserve commitment _hash_ and a randomly generated, and secret _revealNonce_ to the _wrapCommit_ method.\",\"params\":{\"_obfuscatedHash\":\"The calculated hash resultant of the required pre-image values. and be derived from the same key pair as the message sender.\",\"_roundNumber\":\"Node needs to provide round number for which commit is valid\"}},\"constructor\":{\"params\":{\"oracleContract\":\"the address of the linked PriceOracle contract.\",\"postageContract\":\"the address of the linked PostageStamp contract.\",\"staking\":\"the address of the linked Staking contract.\"}},\"currentRoundAnchor()\":{\"details\":\"A node must be within proximity order of less than or equal to the storage depth they intend to report.\"},\"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`.\"},\"inProximity(bytes32,bytes32,uint8)\":{\"params\":{\"A\":\"An overlay address to compare.\",\"B\":\"An overlay address to compare.\",\"minimum\":\"Minimum proximity order.\"}},\"isParticipatingInUpcomingRound(address,uint8)\":{\"params\":{\"_depth\":\"The storage depth the applicant intends to report.\",\"_owner\":\"The address of the applicant from.\"}},\"isWinner(bytes32)\":{\"params\":{\"_overlay\":\"The overlay address of the applicant.\"}},\"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.\"},\"reveal(uint8,bytes32,bytes32)\":{\"params\":{\"_depth\":\"The reported depth.\",\"_hash\":\"The reserve commitment hash.\",\"_revealNonce\":\"The nonce used to generate the commit that is being revealed.\"}},\"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.\"},\"supportsInterface(bytes4)\":{\"details\":\"See {IERC165-supportsInterface}.\"},\"unPause()\":{\"details\":\"Unpause the contract, can only be called by the pauser when paused\"},\"wrapCommit(bytes32,uint8,bytes32,bytes32)\":{\"details\":\"_revealNonce_ must be randomly generated, used once and kept secret until the reveal phase.\",\"params\":{\"_depth\":\"The reported depth.\",\"_hash\":\"The reserve commitment hash.\",\"_overlay\":\"The overlay address of the applicant.\",\"revealNonce\":\"A random, single use, secret nonce.\"}}},\"title\":\"Redistribution contract\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"claim((bytes32[],bytes32,bytes32[],bytes32,uint64,bytes32[],(bytes,bytes32,uint64,uint64),(address,bytes,bytes32,bytes32)[]),(bytes32[],bytes32,bytes32[],bytes32,uint64,bytes32[],(bytes,bytes32,uint64,uint64),(address,bytes,bytes32,bytes32)[]),(bytes32[],bytes32,bytes32[],bytes32,uint64,bytes32[],(bytes,bytes32,uint64,uint64),(address,bytes,bytes32,bytes32)[]))\":{\"notice\":\"Helper function to get this round truth\"},\"commit(bytes32,uint64)\":{\"notice\":\"Begin application for a round if eligible. Commit a hashed value for which the pre-image will be subsequently revealed.\"},\"currentMinimumDepth()\":{\"notice\":\"Returns minimum depth reveal has to have to participate in this round\"},\"currentPhaseClaim()\":{\"notice\":\"Returns true if current block is during claim phase.\"},\"currentPhaseCommit()\":{\"notice\":\"Returns true if current block is during commit phase.\"},\"currentPhaseReveal()\":{\"notice\":\"Returns true if current block is during reveal phase.\"},\"currentRound()\":{\"notice\":\"The number of the current round.\"},\"currentRoundAnchor()\":{\"notice\":\"The anchor used to determine eligibility for the current round.\"},\"currentRoundReveals()\":{\"notice\":\"Returns true if current block is during reveal phase.\"},\"currentSeed()\":{\"notice\":\"Returns the current random seed which is used to determine later utilised random numbers. If rounds have elapsed without reveals, hash the seed with an incremented nonce to produce a new random seed and hence a new round anchor.\"},\"inProximity(bytes32,bytes32,uint8)\":{\"notice\":\"Returns true if an overlay address _A_ is within proximity order _minimum_ of _B_.\"},\"isParticipatingInUpcomingRound(address,uint8)\":{\"notice\":\"Determine if a the owner of a given overlay can participate in the upcoming round.\"},\"isWinner(bytes32)\":{\"notice\":\"Determine if a the owner of a given overlay will be the beneficiary of the claim phase.\"},\"nextSeed()\":{\"notice\":\"Returns the seed which will become current once the next commit phase begins. Used to determine what the next round's anchor will be.\"},\"reveal(uint8,bytes32,bytes32)\":{\"notice\":\"Reveal the pre-image values used to generate commit provided during this round's commit phase.\"},\"setFreezingParams(uint8,uint8,uint8)\":{\"notice\":\"Set freezing parameters\"},\"setSampleMaxValue(uint256)\":{\"notice\":\"changes the max sample value used for reserve estimation\"},\"wrapCommit(bytes32,uint8,bytes32,bytes32)\":{\"notice\":\"Hash the pre-image values to the obsfucated hash.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/Redistribution.sol\":\"Redistribution\"},\"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/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/Redistribution.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.19;\\nimport \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"./Util/TransformedChunkProof.sol\\\";\\nimport \\\"./Util/ChunkProof.sol\\\";\\nimport \\\"./Util/Signatures.sol\\\";\\nimport \\\"./interface/IPostageStamp.sol\\\";\\n\\ninterface IPriceOracle {\\n function adjustPrice(uint16 redundancy) external returns (bool);\\n}\\n\\ninterface IStakeRegistry {\\n struct Stake {\\n bytes32 overlay;\\n uint256 stakeAmount;\\n uint256 lastUpdatedBlockNumber;\\n }\\n\\n function freezeDeposit(address _owner, uint256 _time) external;\\n\\n function lastUpdatedBlockNumberOfAddress(address _owner) external view returns (uint256);\\n\\n function overlayOfAddress(address _owner) external view returns (bytes32);\\n\\n function heightOfAddress(address _owner) external view returns (uint8);\\n\\n function nodeEffectiveStake(address _owner) external view returns (uint256);\\n}\\n\\n/**\\n * @title Redistribution contract\\n * @author The Swarm Authors\\n * @dev Implements a Schelling Co-ordination game to form consensus around the Reserve Commitment hash. This takes\\n * place in three phases: _commit_, _reveal_ and _claim_.\\n *\\n * A node, upon establishing that it _isParticipatingInUpcomingRound_, i.e. it's overlay falls within proximity order\\n * of its reported depth with the _currentRoundAnchor_, prepares a \\\"reserve commitment hash\\\" using the chunks\\n * it currently stores in its reserve and calculates the \\\"storage depth\\\" (see Bee for details). These values, if calculated\\n * honestly, and with the right chunks stored, should be the same for every node in a neighbourhood. This is the Schelling point.\\n * Each eligible node can then use these values, together with a random, single use, secret _revealNonce_ and their\\n * _overlay_ as the pre-image values for the obsfucated _commit_, using the _wrapCommit_ method.\\n *\\n * Once the _commit_ round has elapsed, participating nodes must provide the values used to calculate their obsfucated\\n * _commit_ hash, which, once verified for correctness and proximity to the anchor are retained in the _currentReveals_.\\n * Nodes that have committed but do not reveal the correct values used to create the pre-image will have their stake\\n * \\\"frozen\\\" for a period of rounds proportional to their reported depth.\\n *\\n * During the _reveal_ round, randomness is updated after every successful reveal. Once the reveal round is concluded,\\n * the _currentRoundAnchor_ is updated and users can determine if they will be eligible their overlay will be eligible\\n * for the next commit phase using _isParticipatingInUpcomingRound_.\\n *\\n * When the _reveal_ phase has been concluded, the claim phase can begin. At this point, the truth teller and winner\\n * are already determined. By calling _isWinner_, an applicant node can run the relevant logic to determine if they have\\n * been selected as the beneficiary of this round. When calling _claim_, the current pot from the PostageStamp contract\\n * is withdrawn and transferred to that beneficiaries address. Nodes that have revealed values that differ from the truth,\\n * have their stakes \\\"frozen\\\" for a period of rounds proportional to their reported depth.\\n */\\n\\ncontract Redistribution is AccessControl, Pausable {\\n // ----------------------------- Type declarations ------------------------------\\n\\n // An eligible user may commit to an _obfuscatedHash_ during the commit phase...\\n struct Commit {\\n bytes32 overlay;\\n address owner;\\n bool revealed;\\n uint8 height;\\n uint256 stake;\\n bytes32 obfuscatedHash;\\n uint256 revealIndex;\\n }\\n // ...then provide the actual values that are the constituents of the pre-image of the _obfuscatedHash_\\n // during the reveal phase.\\n struct Reveal {\\n bytes32 overlay;\\n address owner;\\n uint8 depth;\\n uint256 stake;\\n uint256 stakeDensity;\\n bytes32 hash;\\n }\\n\\n struct ChunkInclusionProof {\\n bytes32[] proofSegments;\\n bytes32 proveSegment;\\n // _RCspan is known for RC 32*32\\n\\n // Inclusion proof of transformed address\\n bytes32[] proofSegments2;\\n bytes32 proveSegment2;\\n // proveSegmentIndex2 known from deterministic random selection;\\n uint64 chunkSpan;\\n bytes32[] proofSegments3;\\n // _proveSegment3 known, is equal _proveSegment2\\n // proveSegmentIndex3 know, is equal _proveSegmentIndex2;\\n // chunkSpan2 is equal to chunkSpan (as the data is the same)\\n //\\n PostageProof postageProof;\\n SOCProof[] socProof;\\n }\\n\\n struct SOCProof {\\n address signer; // signer Ethereum address to check against\\n bytes signature;\\n bytes32 identifier; //\\n bytes32 chunkAddr; // wrapped chunk address\\n }\\n\\n struct PostageProof {\\n bytes signature;\\n bytes32 postageId;\\n uint64 index;\\n uint64 timeStamp;\\n // address signer; it is provided by the postage stamp contract\\n // bytes32 chunkAddr; it equals to the proveSegment argument\\n }\\n\\n // The address of the linked PostageStamp contract.\\n IPostageStamp public PostageContract;\\n // The address of the linked PriceOracle contract.\\n IPriceOracle public OracleContract;\\n // The address of the linked Staking contract.\\n IStakeRegistry public Stakes;\\n\\n // Commits for the current round.\\n Commit[] public currentCommits;\\n // Reveals for the current round.\\n Reveal[] public currentReveals;\\n\\n // The current anchor that being processed for the reveal and claim phases of the round.\\n bytes32 private currentRevealRoundAnchor;\\n\\n // The current random value from which we will random.\\n // inputs for selection of the truth teller and beneficiary.\\n bytes32 private seed;\\n\\n // The number of the currently active round phases.\\n uint64 public currentCommitRound;\\n uint64 public currentRevealRound;\\n uint64 public currentClaimRound;\\n\\n // Settings for slashing and freezing\\n uint8 private penaltyMultiplierDisagreement = 1;\\n uint8 private penaltyMultiplierNonRevealed = 2;\\n uint8 private penaltyRandomFactor = 100; // Use 100 as value to ignore random factor in freezing penalty\\n\\n // alpha=0.097612 beta=0.0716570 k=16\\n uint256 private sampleMaxValue = 1284401000000000000000000000000000000000000000000000000000000000000000000;\\n\\n // The reveal of the winner of the last round.\\n Reveal public winner;\\n\\n // The length of a round in blocks.\\n uint256 private constant ROUND_LENGTH = 152;\\n\\n // Maximum value of the keccack256 hash.\\n bytes32 private constant MAX_H = 0x00000000000000000000000000000000ffffffffffffffffffffffffffffffff;\\n\\n // ----------------------------- Events ------------------------------\\n\\n /**\\n * @dev Emitted when the winner of a round is selected in the claim phase\\n */\\n event WinnerSelected(Reveal winner);\\n\\n /**\\n * @dev Emitted when the truth oracle of a round is selected in the claim phase.\\n */\\n event TruthSelected(bytes32 hash, uint8 depth);\\n\\n // Next two events to be removed after testing phase pending some other usefulness being found.\\n /**\\n * @dev Emits the number of commits being processed by the claim phase.\\n */\\n event CountCommits(uint256 _count);\\n\\n /**\\n * @dev Emits the number of reveals being processed by the claim phase.\\n */\\n event CountReveals(uint256 _count);\\n\\n /**\\n * @dev Logs that an overlay has committed\\n */\\n event Committed(uint256 roundNumber, bytes32 overlay, uint8 height);\\n /**\\n * @dev Emit from Postagestamp contract valid chunk count at the end of claim\\n */\\n event ChunkCount(uint256 validChunkCount);\\n\\n /**\\n * @dev Bytes32 anhor of current reveal round\\n */\\n event CurrentRevealAnchor(uint256 roundNumber, bytes32 anchor);\\n\\n /**\\n * @dev Output external call status\\n */\\n event PriceAdjustmentSkipped(uint16 redundancyCount);\\n\\n /**\\n * @dev Withdraw not successful in claim\\n */\\n event WithdrawFailed(address owner);\\n\\n /**\\n * @dev Logs that an overlay has revealed\\n */\\n event Revealed(\\n uint256 roundNumber,\\n bytes32 overlay,\\n uint256 stake,\\n uint256 stakeDensity,\\n bytes32 reserveCommitment,\\n uint8 depth\\n );\\n\\n /**\\n * @dev Logs for inclusion proof\\n */\\n event transformedChunkAddressFromInclusionProof(uint256 indexInRC, bytes32 chunkAddress);\\n\\n // ----------------------------- Errors ------------------------------\\n\\n error NotCommitPhase(); // Game is not in commit phase\\n error NoCommitsReceived(); // Round didn't receive any commits\\n error PhaseLastBlock(); // We don't permit commits in last block of the phase\\n error CommitRoundOver(); // Commit phase in this round is over\\n error CommitRoundNotStarted(); // Commit phase in this round has not started yet\\n error NotMatchingOwner(); // Sender of commit is not matching the overlay address\\n error MustStake2Rounds(); // Before entering the game node must stake 2 rounds prior\\n error NotStaked(); // Node didn't add any staking\\n error WrongPhase(); // Checking in wrong phase, need to check duing claim phase of current round for next round or commit in current round\\n error AlreadyCommitted(); // Node already committed in this round\\n error NotRevealPhase(); // Game is not in reveal phase\\n error OutOfDepthReveal(bytes32); // Anchor is out of reported depth in Reveal phase, anchor data available as argument\\n error OutOfDepthClaim(uint8); // Anchor is out of reported depth in Claim phase, entryProof index is argument\\n error OutOfDepth(); // Anchor is out of reported depth\\n error AlreadyRevealed(); // Node already revealed\\n error NoMatchingCommit(); // No matching commit and hash\\n error NotClaimPhase(); // Game is not in the claim phase\\n error NoReveals(); // Round did not receive any reveals\\n error FirstRevealDone(); // We don't want to return value after first reveal\\n error AlreadyClaimed(); // This round was already claimed\\n error NotAdmin(); // Caller of trx is not admin\\n error OnlyPauser(); // Only account with pauser role can call pause/unpause\\n error SocVerificationFailed(bytes32); // Soc verification failed for this element\\n error SocCalcNotMatching(bytes32); // Soc address calculation does not match with the witness\\n error IndexOutsideSet(bytes32); // Stamp available: index resides outside of the valid index set\\n error SigRecoveryFailed(bytes32); // Stamp authorized: signature recovery failed for element\\n error BatchDoesNotExist(bytes32); // Stamp alive: batch remaining balance validation failed for attached stamp\\n error BucketDiffers(bytes32); // Stamp aligned: postage bucket differs from address bucket\\n error InclusionProofFailed(uint8, bytes32);\\n // 1 = RC inclusion proof failed for element\\n // 2 = First sister segment in data must match,\\n // 3 = Inclusion proof failed for original address of element\\n // 4 = Inclusion proof failed for transformed address of element\\n error RandomElementCheckFailed(); // Random element order check failed\\n error LastElementCheckFailed(); // Last element order check failed\\n error ReserveCheckFailed(bytes32 trALast); // Reserve size estimation check failed\\n\\n // ----------------------------- CONSTRUCTOR ------------------------------\\n\\n /**\\n * @param staking the address of the linked Staking contract.\\n * @param postageContract the address of the linked PostageStamp contract.\\n * @param oracleContract the address of the linked PriceOracle contract.\\n */\\n constructor(address staking, address postageContract, address oracleContract) {\\n Stakes = IStakeRegistry(staking);\\n PostageContract = IPostageStamp(postageContract);\\n OracleContract = IPriceOracle(oracleContract);\\n _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n }\\n\\n ////////////////////////////////////////\\n // STATE CHANGING //\\n ////////////////////////////////////////\\n\\n /**\\n * @notice Begin application for a round if eligible. Commit a hashed value for which the pre-image will be\\n * subsequently revealed.\\n * @dev If a node's overlay is _inProximity_(_depth_) of the _currentRoundAnchor_, that node may compute an\\n * _obfuscatedHash_ by providing their _overlay_, reported storage _depth_, reserve commitment _hash_ and a\\n * randomly generated, and secret _revealNonce_ to the _wrapCommit_ method.\\n * @param _obfuscatedHash The calculated hash resultant of the required pre-image values.\\n * and be derived from the same key pair as the message sender.\\n * @param _roundNumber Node needs to provide round number for which commit is valid\\n */\\n function commit(bytes32 _obfuscatedHash, uint64 _roundNumber) external whenNotPaused {\\n uint64 cr = currentRound();\\n bytes32 _overlay = Stakes.overlayOfAddress(msg.sender);\\n uint256 _stake = Stakes.nodeEffectiveStake(msg.sender);\\n uint256 _lastUpdate = Stakes.lastUpdatedBlockNumberOfAddress(msg.sender);\\n uint8 _height = Stakes.heightOfAddress(msg.sender);\\n\\n if (!currentPhaseCommit()) {\\n revert NotCommitPhase();\\n }\\n if (block.number % ROUND_LENGTH == (ROUND_LENGTH / 4) - 1) {\\n revert PhaseLastBlock();\\n }\\n\\n if (cr > _roundNumber) {\\n revert CommitRoundOver();\\n }\\n\\n if (cr < _roundNumber) {\\n revert CommitRoundNotStarted();\\n }\\n\\n if (_lastUpdate == 0) {\\n revert NotStaked();\\n }\\n\\n if (_lastUpdate >= block.number - 2 * ROUND_LENGTH) {\\n revert MustStake2Rounds();\\n }\\n\\n // if we are in a new commit phase, reset the array of commits and\\n // set the currentCommitRound to be the current one\\n if (cr != currentCommitRound) {\\n delete currentCommits;\\n currentCommitRound = cr;\\n }\\n\\n uint256 commitsArrayLength = currentCommits.length;\\n\\n for (uint256 i = 0; i < commitsArrayLength; ) {\\n if (currentCommits[i].overlay == _overlay) {\\n revert AlreadyCommitted();\\n }\\n\\n unchecked {\\n ++i;\\n }\\n }\\n\\n currentCommits.push(\\n Commit({\\n overlay: _overlay,\\n owner: msg.sender,\\n revealed: false,\\n height: _height,\\n stake: _stake,\\n obfuscatedHash: _obfuscatedHash,\\n revealIndex: 0\\n })\\n );\\n\\n emit Committed(_roundNumber, _overlay, _height);\\n }\\n\\n /**\\n * @notice Reveal the pre-image values used to generate commit provided during this round's commit phase.\\n * @param _depth The reported depth.\\n * @param _hash The reserve commitment hash.\\n * @param _revealNonce The nonce used to generate the commit that is being revealed.\\n */\\n function reveal(uint8 _depth, bytes32 _hash, bytes32 _revealNonce) external whenNotPaused {\\n uint64 cr = currentRound();\\n bytes32 _overlay = Stakes.overlayOfAddress(msg.sender);\\n\\n if (_depth < currentMinimumDepth()) {\\n revert OutOfDepth();\\n }\\n\\n if (!currentPhaseReveal()) {\\n revert NotRevealPhase();\\n }\\n\\n if (cr != currentCommitRound) {\\n revert NoCommitsReceived();\\n }\\n\\n if (cr != currentRevealRound) {\\n currentRevealRoundAnchor = currentRoundAnchor();\\n delete currentReveals;\\n // We set currentRevealRound ONLY after we set current anchor\\n currentRevealRound = cr;\\n emit CurrentRevealAnchor(cr, currentRevealRoundAnchor);\\n updateRandomness();\\n }\\n\\n bytes32 obfuscatedHash = wrapCommit(_overlay, _depth, _hash, _revealNonce);\\n uint256 id = findCommit(_overlay, obfuscatedHash);\\n Commit memory revealedCommit = currentCommits[id];\\n uint8 depthResponsibility = _depth - revealedCommit.height;\\n\\n // Check that commit is in proximity of the current anchor\\n if (!inProximity(revealedCommit.overlay, currentRevealRoundAnchor, depthResponsibility)) {\\n revert OutOfDepthReveal(currentRevealRoundAnchor);\\n }\\n // Check that the commit has not already been revealed\\n if (revealedCommit.revealed) {\\n revert AlreadyRevealed();\\n }\\n\\n currentCommits[id].revealed = true;\\n currentCommits[id].revealIndex = currentReveals.length;\\n\\n currentReveals.push(\\n Reveal({\\n overlay: revealedCommit.overlay,\\n owner: revealedCommit.owner,\\n depth: _depth,\\n stake: revealedCommit.stake,\\n stakeDensity: revealedCommit.stake * uint256(2 ** depthResponsibility),\\n hash: _hash\\n })\\n );\\n\\n emit Revealed(\\n cr,\\n revealedCommit.overlay,\\n revealedCommit.stake,\\n revealedCommit.stake * uint256(2 ** depthResponsibility),\\n _hash,\\n _depth\\n );\\n }\\n\\n /**\\n * @notice Helper function to get this round truth\\n * @dev\\n */\\n function claim(\\n ChunkInclusionProof calldata entryProof1,\\n ChunkInclusionProof calldata entryProof2,\\n ChunkInclusionProof calldata entryProofLast\\n ) external whenNotPaused {\\n winnerSelection();\\n\\n Reveal memory winnerSelected = winner;\\n uint256 indexInRC1;\\n uint256 indexInRC2;\\n bytes32 _currentRevealRoundAnchor = currentRevealRoundAnchor;\\n bytes32 _seed = seed;\\n\\n // rand(14)\\n indexInRC1 = uint256(_seed) % 15;\\n // rand(13)\\n indexInRC2 = uint256(_seed) % 14;\\n if (indexInRC2 >= indexInRC1) {\\n indexInRC2++;\\n }\\n\\n if (!inProximity(entryProofLast.proveSegment, _currentRevealRoundAnchor, winnerSelected.depth)) {\\n revert OutOfDepthClaim(3);\\n }\\n\\n inclusionFunction(entryProofLast, 30);\\n stampFunction(entryProofLast);\\n socFunction(entryProofLast);\\n\\n if (!inProximity(entryProof1.proveSegment, _currentRevealRoundAnchor, winnerSelected.depth)) {\\n revert OutOfDepthClaim(2);\\n }\\n\\n inclusionFunction(entryProof1, indexInRC1 * 2);\\n stampFunction(entryProof1);\\n socFunction(entryProof1);\\n\\n if (!inProximity(entryProof2.proveSegment, _currentRevealRoundAnchor, winnerSelected.depth)) {\\n revert OutOfDepthClaim(1);\\n }\\n\\n inclusionFunction(entryProof2, indexInRC2 * 2);\\n stampFunction(entryProof2);\\n socFunction(entryProof2);\\n\\n checkOrder(\\n indexInRC1,\\n indexInRC2,\\n entryProof1.proofSegments[0],\\n entryProof2.proofSegments[0],\\n entryProofLast.proofSegments[0]\\n );\\n\\n estimateSize(entryProofLast.proofSegments[0]);\\n\\n // Do the check if the withdraw was success\\n (bool success, ) = address(PostageContract).call(\\n abi.encodeWithSignature(\\\"withdraw(address)\\\", winnerSelected.owner)\\n );\\n if (!success) {\\n emit WithdrawFailed(winnerSelected.owner);\\n }\\n\\n emit WinnerSelected(winnerSelected);\\n emit ChunkCount(PostageContract.validChunkCount());\\n }\\n\\n function winnerSelection() internal {\\n uint64 cr = currentRound();\\n\\n if (!currentPhaseClaim()) {\\n revert NotClaimPhase();\\n }\\n\\n if (cr != currentRevealRound) {\\n revert NoReveals();\\n }\\n\\n if (cr <= currentClaimRound) {\\n revert AlreadyClaimed();\\n }\\n\\n uint256 currentWinnerSelectionSum = 0;\\n uint256 redundancyCount = 0;\\n bytes32 randomNumber;\\n uint256 randomNumberTrunc;\\n\\n bytes32 truthRevealedHash;\\n uint8 truthRevealedDepth;\\n uint256 currentCommitsLength = currentCommits.length;\\n\\n emit CountCommits(currentCommitsLength);\\n emit CountReveals(currentReveals.length);\\n\\n (truthRevealedHash, truthRevealedDepth) = getCurrentTruth();\\n emit TruthSelected(truthRevealedHash, truthRevealedDepth);\\n string memory winnerSelectionAnchor = currentWinnerSelectionAnchor();\\n\\n for (uint256 i = 0; i < currentCommitsLength; ) {\\n Commit memory currentCommit = currentCommits[i];\\n uint256 revIndex = currentCommit.revealIndex;\\n Reveal memory currentReveal = currentReveals[revIndex];\\n\\n // Select winner with valid truth\\n if (\\n currentCommit.revealed &&\\n truthRevealedHash == currentReveal.hash &&\\n truthRevealedDepth == currentReveal.depth\\n ) {\\n currentWinnerSelectionSum += currentReveal.stakeDensity;\\n randomNumber = keccak256(abi.encodePacked(winnerSelectionAnchor, redundancyCount));\\n randomNumberTrunc = uint256(randomNumber & MAX_H);\\n\\n if (randomNumberTrunc * currentWinnerSelectionSum < currentReveal.stakeDensity * (uint256(MAX_H) + 1)) {\\n winner = currentReveal;\\n }\\n\\n redundancyCount++;\\n }\\n\\n // Freeze deposit if any truth is false, make it a penaltyRandomFactor chance for this to happen\\n if (\\n currentCommit.revealed &&\\n (truthRevealedHash != currentReveal.hash || truthRevealedDepth != currentReveal.depth) &&\\n (block.prevrandao % 100 < penaltyRandomFactor)\\n ) {\\n Stakes.freezeDeposit(\\n currentReveal.owner,\\n penaltyMultiplierDisagreement * ROUND_LENGTH * uint256(2 ** truthRevealedDepth)\\n );\\n }\\n\\n // Slash deposits if revealed is false\\n if (!currentCommit.revealed) {\\n // slash in later phase (ph5)\\n // Stakes.slashDeposit(currentCommits[i].overlay, currentCommits[i].stake);\\n Stakes.freezeDeposit(\\n currentCommit.owner,\\n penaltyMultiplierNonRevealed * ROUND_LENGTH * uint256(2 ** truthRevealedDepth)\\n );\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n bool success = OracleContract.adjustPrice(uint16(redundancyCount));\\n if (!success) {\\n emit PriceAdjustmentSkipped(uint16(redundancyCount));\\n }\\n currentClaimRound = cr;\\n }\\n\\n function inclusionFunction(ChunkInclusionProof calldata entryProof, uint256 indexInRC) internal {\\n uint256 randomChunkSegmentIndex = uint256(seed) % 128;\\n bytes32 calculatedTransformedAddr = TransformedBMTChunk.transformedChunkAddressFromInclusionProof(\\n entryProof.proofSegments3,\\n entryProof.proveSegment2,\\n randomChunkSegmentIndex,\\n entryProof.chunkSpan,\\n currentRevealRoundAnchor\\n );\\n\\n emit transformedChunkAddressFromInclusionProof(indexInRC, calculatedTransformedAddr);\\n\\n if (\\n winner.hash !=\\n BMTChunk.chunkAddressFromInclusionProof(\\n entryProof.proofSegments,\\n entryProof.proveSegment,\\n indexInRC,\\n 32 * 32\\n )\\n ) {\\n revert InclusionProofFailed(1, calculatedTransformedAddr);\\n }\\n\\n if (entryProof.proofSegments2[0] != entryProof.proofSegments3[0]) {\\n revert InclusionProofFailed(2, calculatedTransformedAddr);\\n }\\n\\n bytes32 originalAddress = entryProof.socProof.length > 0\\n ? entryProof.socProof[0].chunkAddr // soc attestation in socFunction\\n : entryProof.proveSegment;\\n\\n if (\\n originalAddress !=\\n BMTChunk.chunkAddressFromInclusionProof(\\n entryProof.proofSegments2,\\n entryProof.proveSegment2,\\n randomChunkSegmentIndex,\\n entryProof.chunkSpan\\n )\\n ) {\\n revert InclusionProofFailed(3, calculatedTransformedAddr);\\n }\\n\\n // In case of SOC, the transformed address is hashed together with its address in the sample\\n if (entryProof.socProof.length > 0) {\\n calculatedTransformedAddr = keccak256(\\n abi.encode(\\n entryProof.proveSegment, // SOC address\\n calculatedTransformedAddr\\n )\\n );\\n }\\n\\n if (entryProof.proofSegments[0] != calculatedTransformedAddr) {\\n revert InclusionProofFailed(4, calculatedTransformedAddr);\\n }\\n }\\n\\n /**\\n * @notice Set freezing parameters\\n */\\n function setFreezingParams(\\n uint8 _penaltyMultiplierDisagreement,\\n uint8 _penaltyMultiplierNonRevealed,\\n uint8 _penaltyRandomFactor\\n ) external {\\n if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert NotAdmin();\\n }\\n\\n penaltyMultiplierDisagreement = _penaltyMultiplierDisagreement;\\n penaltyMultiplierNonRevealed = _penaltyMultiplierNonRevealed;\\n penaltyRandomFactor = _penaltyRandomFactor;\\n }\\n\\n /**\\n * @notice changes the max sample value used for reserve estimation\\n */\\n function setSampleMaxValue(uint256 _sampleMaxValue) external {\\n if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert NotAdmin();\\n }\\n\\n sampleMaxValue = _sampleMaxValue;\\n }\\n\\n /**\\n * @notice Updates the source of randomness. Uses block.difficulty in pre-merge chains, this is substituted\\n * to block.prevrandao in post merge chains.\\n */\\n function updateRandomness() private {\\n seed = keccak256(abi.encode(seed, block.prevrandao));\\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 if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert OnlyPauser();\\n }\\n\\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 if (!hasRole(DEFAULT_ADMIN_ROLE, msg.sender)) {\\n revert OnlyPauser();\\n }\\n _unpause();\\n }\\n\\n ////////////////////////////////////////\\n // STATE READING //\\n ////////////////////////////////////////\\n\\n // ----------------------------- Anchor calculations ------------------------------\\n\\n /**\\n * @notice Returns the current random seed which is used to determine later utilised random numbers.\\n * If rounds have elapsed without reveals, hash the seed with an incremented nonce to produce a new\\n * random seed and hence a new round anchor.\\n */\\n function currentSeed() public view returns (bytes32) {\\n uint64 cr = currentRound();\\n bytes32 currentSeedValue = seed;\\n\\n if (cr > currentRevealRound + 1) {\\n uint256 difference = cr - currentRevealRound - 1;\\n currentSeedValue = keccak256(abi.encodePacked(currentSeedValue, difference));\\n }\\n\\n return currentSeedValue;\\n }\\n\\n /**\\n * @notice Returns the seed which will become current once the next commit phase begins.\\n * Used to determine what the next round's anchor will be.\\n */\\n function nextSeed() public view returns (bytes32) {\\n uint64 cr = currentRound() + 1;\\n bytes32 currentSeedValue = seed;\\n\\n if (cr > currentRevealRound + 1) {\\n uint256 difference = cr - currentRevealRound - 1;\\n currentSeedValue = keccak256(abi.encodePacked(currentSeedValue, difference));\\n }\\n\\n return currentSeedValue;\\n }\\n\\n /**\\n * @notice The random value used to choose the selected truth teller.\\n */\\n function currentTruthSelectionAnchor() private view returns (string memory) {\\n if (!currentPhaseClaim()) {\\n revert NotClaimPhase();\\n }\\n\\n uint64 cr = currentRound();\\n if (cr != currentRevealRound) {\\n revert NoReveals();\\n }\\n\\n return string(abi.encodePacked(seed, \\\"0\\\"));\\n }\\n\\n /**\\n * @notice The random value used to choose the selected beneficiary.\\n */\\n function currentWinnerSelectionAnchor() private view returns (string memory) {\\n if (!currentPhaseClaim()) {\\n revert NotClaimPhase();\\n }\\n uint64 cr = currentRound();\\n if (cr != currentRevealRound) {\\n revert NoReveals();\\n }\\n\\n return string(abi.encodePacked(seed, \\\"1\\\"));\\n }\\n\\n /**\\n * @notice The anchor used to determine eligibility for the current round.\\n * @dev A node must be within proximity order of less than or equal to the storage depth they intend to report.\\n */\\n function currentRoundAnchor() public view returns (bytes32 returnVal) {\\n // This will be called in reveal phase and set as currentRevealRoundAnchor or in\\n // commit phase when checking eligibility for next round by isParticipatingInUpcomingRound\\n if (currentPhaseCommit() || (currentRound() > currentRevealRound && !currentPhaseClaim())) {\\n return currentSeed();\\n }\\n\\n // This will be called by isParticipatingInUpcomingRound check in claim phase\\n if (currentPhaseClaim()) {\\n return nextSeed();\\n }\\n\\n // Without this, this function will output 0x0 after first reveal which is value and we prefere it reverts\\n if (currentPhaseReveal() && currentRound() == currentRevealRound) {\\n revert FirstRevealDone();\\n }\\n }\\n\\n /**\\n * @notice Returns true if an overlay address _A_ is within proximity order _minimum_ of _B_.\\n * @param A An overlay address to compare.\\n * @param B An overlay address to compare.\\n * @param minimum Minimum proximity order.\\n */\\n function inProximity(bytes32 A, bytes32 B, uint8 minimum) public pure returns (bool) {\\n if (minimum == 0) {\\n return true;\\n }\\n\\n return uint256(A ^ B) < uint256(2 ** (256 - minimum));\\n }\\n\\n // ----------------------------- Commit ------------------------------\\n\\n /**\\n * @notice The number of the current round.\\n */\\n function currentRound() public view returns (uint64) {\\n return uint64(block.number / ROUND_LENGTH);\\n }\\n\\n /**\\n * @notice Returns true if current block is during commit phase.\\n */\\n function currentPhaseCommit() public view returns (bool) {\\n if (block.number % ROUND_LENGTH < ROUND_LENGTH / 4) {\\n return true;\\n }\\n return false;\\n }\\n\\n /**\\n * @notice Determine if a the owner of a given overlay can participate in the upcoming round.\\n * @param _owner The address of the applicant from.\\n * @param _depth The storage depth the applicant intends to report.\\n */\\n function isParticipatingInUpcomingRound(address _owner, uint8 _depth) public view returns (bool) {\\n uint256 _lastUpdate = Stakes.lastUpdatedBlockNumberOfAddress(_owner);\\n uint8 _depthResponsibility = _depth - Stakes.heightOfAddress(_owner);\\n\\n if (currentPhaseReveal()) {\\n revert WrongPhase();\\n }\\n\\n if (_lastUpdate == 0) {\\n revert NotStaked();\\n }\\n\\n if (_lastUpdate >= block.number - 2 * ROUND_LENGTH) {\\n revert MustStake2Rounds();\\n }\\n\\n return inProximity(Stakes.overlayOfAddress(_owner), currentRoundAnchor(), _depthResponsibility);\\n }\\n\\n // ----------------------------- Reveal ------------------------------\\n\\n /**\\n * @notice Returns minimum depth reveal has to have to participate in this round\\n */\\n function currentMinimumDepth() public view returns (uint8) {\\n // We are checking value in reveal phase, as the currentCommitRound is set to the current round\\n // but the currentClaimRound is still set to the last time claim was made\\n // We add 1 to ensure that for the next round the minimum depth is the same as last winner depth\\n\\n uint256 difference = currentCommitRound - currentClaimRound;\\n uint8 skippedRounds = uint8(difference > 254 ? 254 : difference) + 1;\\n\\n uint8 lastWinnerDepth = winner.depth;\\n\\n // We ensure that skippedRounds is not bigger than lastWinnerDepth, because of overflow\\n return skippedRounds >= lastWinnerDepth ? 0 : lastWinnerDepth - skippedRounds;\\n }\\n\\n /**\\n * @notice Helper function to get this node reveal in commits\\n * @dev\\n */\\n function findCommit(bytes32 _overlay, bytes32 _obfuscatedHash) internal view returns (uint256) {\\n for (uint256 i = 0; i < currentCommits.length; ) {\\n if (currentCommits[i].overlay == _overlay && _obfuscatedHash == currentCommits[i].obfuscatedHash) {\\n return i;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n revert NoMatchingCommit();\\n }\\n\\n /**\\n * @notice Hash the pre-image values to the obsfucated hash.\\n * @dev _revealNonce_ must be randomly generated, used once and kept secret until the reveal phase.\\n * @param _overlay The overlay address of the applicant.\\n * @param _depth The reported depth.\\n * @param _hash The reserve commitment hash.\\n * @param revealNonce A random, single use, secret nonce.\\n */\\n function wrapCommit(\\n bytes32 _overlay,\\n uint8 _depth,\\n bytes32 _hash,\\n bytes32 revealNonce\\n ) public pure returns (bytes32) {\\n return keccak256(abi.encodePacked(_overlay, _depth, _hash, revealNonce));\\n }\\n\\n /**\\n * @notice Returns true if current block is during reveal phase.\\n */\\n function currentPhaseReveal() public view returns (bool) {\\n uint256 number = block.number % ROUND_LENGTH;\\n if (number >= ROUND_LENGTH / 4 && number < ROUND_LENGTH / 2) {\\n return true;\\n }\\n return false;\\n }\\n\\n /**\\n * @notice Returns true if current block is during reveal phase.\\n */\\n function currentRoundReveals() public view returns (Reveal[] memory) {\\n if (!currentPhaseClaim()) {\\n revert NotClaimPhase();\\n }\\n uint64 cr = currentRound();\\n if (cr != currentRevealRound) {\\n revert NoReveals();\\n }\\n\\n return currentReveals;\\n }\\n\\n // ----------------------------- Claim ------------------------------\\n\\n /**\\n * @notice Returns true if current block is during claim phase.\\n */\\n function currentPhaseClaim() public view returns (bool) {\\n if (block.number % ROUND_LENGTH >= ROUND_LENGTH / 2) {\\n return true;\\n }\\n return false;\\n }\\n\\n function getCurrentTruth() internal view returns (bytes32 Hash, uint8 Depth) {\\n uint256 currentSum;\\n bytes32 randomNumber;\\n uint256 randomNumberTrunc;\\n\\n bytes32 truthRevealedHash;\\n uint8 truthRevealedDepth;\\n uint256 revIndex;\\n string memory truthSelectionAnchor = currentTruthSelectionAnchor();\\n uint256 commitsArrayLength = currentCommits.length;\\n\\n for (uint256 i = 0; i < commitsArrayLength; ) {\\n if (currentCommits[i].revealed) {\\n revIndex = currentCommits[i].revealIndex;\\n currentSum += currentReveals[revIndex].stakeDensity;\\n randomNumber = keccak256(abi.encodePacked(truthSelectionAnchor, i));\\n randomNumberTrunc = uint256(randomNumber & MAX_H);\\n\\n // question is whether randomNumber / MAX_H < probability\\n // where probability is stakeDensity / currentSum\\n // to avoid resorting to floating points all divisions should be\\n // simplified with multiplying both sides (as long as divisor > 0)\\n // randomNumber / (MAX_H + 1) < stakeDensity / currentSum\\n // ( randomNumber / (MAX_H + 1) ) * currentSum < stakeDensity\\n // randomNumber * currentSum < stakeDensity * (MAX_H + 1)\\n if (randomNumberTrunc * currentSum < currentReveals[revIndex].stakeDensity * (uint256(MAX_H) + 1)) {\\n truthRevealedHash = currentReveals[revIndex].hash;\\n truthRevealedDepth = currentReveals[revIndex].depth;\\n }\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n return (truthRevealedHash, truthRevealedDepth);\\n }\\n\\n /**\\n * @notice Determine if a the owner of a given overlay will be the beneficiary of the claim phase.\\n * @param _overlay The overlay address of the applicant.\\n */\\n function isWinner(bytes32 _overlay) public view returns (bool) {\\n if (!currentPhaseClaim()) {\\n revert NotClaimPhase();\\n }\\n\\n uint64 cr = currentRound();\\n if (cr != currentRevealRound) {\\n revert NoReveals();\\n }\\n\\n if (cr <= currentClaimRound) {\\n revert AlreadyClaimed();\\n }\\n\\n uint256 currentWinnerSelectionSum;\\n bytes32 winnerIs;\\n bytes32 randomNumber;\\n uint256 randomNumberTrunc;\\n bytes32 truthRevealedHash;\\n uint8 truthRevealedDepth;\\n uint256 revIndex;\\n string memory winnerSelectionAnchor = currentWinnerSelectionAnchor();\\n uint256 redundancyCount = 0;\\n\\n // Get current truth\\n (truthRevealedHash, truthRevealedDepth) = getCurrentTruth();\\n uint256 commitsArrayLength = currentCommits.length;\\n\\n for (uint256 i = 0; i < commitsArrayLength; ) {\\n revIndex = currentCommits[i].revealIndex;\\n\\n // Deterministically read winner\\n if (\\n currentCommits[i].revealed &&\\n truthRevealedHash == currentReveals[revIndex].hash &&\\n truthRevealedDepth == currentReveals[revIndex].depth\\n ) {\\n currentWinnerSelectionSum += currentReveals[revIndex].stakeDensity;\\n randomNumber = keccak256(abi.encodePacked(winnerSelectionAnchor, redundancyCount));\\n randomNumberTrunc = uint256(randomNumber & MAX_H);\\n\\n if (\\n randomNumberTrunc * currentWinnerSelectionSum <\\n currentReveals[revIndex].stakeDensity * (uint256(MAX_H) + 1)\\n ) {\\n winnerIs = currentReveals[revIndex].overlay;\\n }\\n\\n redundancyCount++;\\n }\\n unchecked {\\n ++i;\\n }\\n }\\n\\n return (winnerIs == _overlay);\\n }\\n\\n // ----------------------------- Claim verifications ------------------------------\\n\\n function socFunction(ChunkInclusionProof calldata entryProof) internal pure {\\n if (entryProof.socProof.length == 0) return;\\n\\n if (\\n !Signatures.socVerify(\\n entryProof.socProof[0].signer, // signer Ethereum address to check against\\n entryProof.socProof[0].signature,\\n entryProof.socProof[0].identifier,\\n entryProof.socProof[0].chunkAddr\\n )\\n ) {\\n revert SocVerificationFailed(entryProof.socProof[0].chunkAddr);\\n }\\n\\n if (\\n calculateSocAddress(entryProof.socProof[0].identifier, entryProof.socProof[0].signer) !=\\n entryProof.proveSegment\\n ) {\\n revert SocCalcNotMatching(entryProof.socProof[0].chunkAddr);\\n }\\n }\\n\\n function stampFunction(ChunkInclusionProof calldata entryProof) internal view {\\n // authentic\\n (address batchOwner, uint8 batchDepth, uint8 bucketDepth, , , ) = PostageContract.batches(\\n entryProof.postageProof.postageId\\n );\\n\\n // alive\\n if (batchOwner == address(0)) {\\n revert BatchDoesNotExist(entryProof.postageProof.postageId); // Batch does not exist or expired\\n }\\n\\n uint32 postageIndex = getPostageIndex(entryProof.postageProof.index);\\n uint256 maxPostageIndex = postageStampIndexCount(batchDepth, bucketDepth);\\n // available\\n if (postageIndex >= maxPostageIndex) {\\n revert IndexOutsideSet(entryProof.postageProof.postageId);\\n }\\n\\n // aligned\\n uint64 postageBucket = getPostageBucket(entryProof.postageProof.index);\\n uint64 addressBucket = addressToBucket(entryProof.proveSegment, bucketDepth);\\n if (postageBucket != addressBucket) {\\n revert BucketDiffers(entryProof.postageProof.postageId);\\n }\\n\\n // authorized\\n if (\\n !Signatures.postageVerify(\\n batchOwner,\\n entryProof.postageProof.signature,\\n entryProof.proveSegment,\\n entryProof.postageProof.postageId,\\n entryProof.postageProof.index,\\n entryProof.postageProof.timeStamp\\n )\\n ) {\\n revert SigRecoveryFailed(entryProof.postageProof.postageId);\\n }\\n }\\n\\n function addressToBucket(bytes32 swarmAddress, uint8 bucketDepth) internal pure returns (uint32) {\\n uint32 prefix = uint32(uint256(swarmAddress) >> (256 - 32));\\n return prefix >> (32 - bucketDepth);\\n }\\n\\n function postageStampIndexCount(uint8 postageDepth, uint8 bucketDepth) internal pure returns (uint256) {\\n return 1 << (postageDepth - bucketDepth);\\n }\\n\\n function getPostageIndex(uint64 signedIndex) internal pure returns (uint32) {\\n return uint32(signedIndex);\\n }\\n\\n function getPostageBucket(uint64 signedIndex) internal pure returns (uint64) {\\n return uint32(signedIndex >> 32);\\n }\\n\\n function calculateSocAddress(bytes32 identifier, address signer) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(identifier, signer));\\n }\\n\\n function checkOrder(uint256 a, uint256 b, bytes32 trA1, bytes32 trA2, bytes32 trALast) internal pure {\\n if (a < b) {\\n if (uint256(trA1) >= uint256(trA2)) {\\n revert RandomElementCheckFailed();\\n }\\n if (uint256(trA2) >= uint256(trALast)) {\\n revert LastElementCheckFailed();\\n }\\n } else {\\n if (uint256(trA2) >= uint256(trA1)) {\\n revert RandomElementCheckFailed();\\n }\\n if (uint256(trA1) >= uint256(trALast)) {\\n revert LastElementCheckFailed();\\n }\\n }\\n }\\n\\n function estimateSize(bytes32 trALast) internal view {\\n if (uint256(trALast) >= sampleMaxValue) {\\n revert ReserveCheckFailed(trALast);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xecc576245f09eba122643ca2fda047487c76cca36ebe50509ccc5eb99e7eb3a6\",\"license\":\"BSD-3-Clause\"},\"src/Util/ChunkProof.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nlibrary BMTChunk {\\n // max chunk payload size\\n uint256 public constant MAX_CHUNK_PAYLOAD_SIZE = 4096;\\n // segment byte size\\n uint256 public constant SEGMENT_SIZE = 32;\\n\\n /**\\n * @notice Changes the endianness of a uint64.\\n * @dev https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel\\n * @param _b The unsigned integer to reverse\\n * @return v - The reversed value\\n */\\n function reverseUint64(uint64 _b) public pure returns (uint64) {\\n uint256 v = _b;\\n\\n // swap bytes\\n v =\\n ((v >> 8) & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) |\\n ((v & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) << 8);\\n // swap 2-byte long pairs\\n v =\\n ((v >> 16) & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) |\\n ((v & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) << 16);\\n // swap 4-byte long pairs\\n v =\\n ((v >> 32) & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) |\\n ((v & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) << 32);\\n\\n return uint64(v);\\n }\\n\\n /** Calculates the root hash from the provided inclusion proof segments and its corresponding segment index\\n * @param _proofSegments Proof segments.\\n * @param _proveSegment Segment to prove.\\n * @param _proveSegmentIndex Prove segment index\\n * @return _calculatedHash chunk hash\\n */\\n function rootHashFromInclusionProof(\\n bytes32[] memory _proofSegments,\\n bytes32 _proveSegment,\\n uint256 _proveSegmentIndex\\n ) internal pure returns (bytes32 _calculatedHash) {\\n _calculatedHash = _proveSegment;\\n for (uint256 i = 0; i < _proofSegments.length; i++) {\\n bool mergeFromRight = _proveSegmentIndex % 2 == 0;\\n _calculatedHash = mergeSegment(_calculatedHash, _proofSegments[i], mergeFromRight);\\n _proveSegmentIndex >>= 1;\\n }\\n return _calculatedHash;\\n }\\n\\n /**\\n * Calculate the chunk address from the Binary Merkle Tree of the chunk data\\n *\\n * The BMT chunk address is the hash of the 8 byte span and the root\\n * hash of a binary Merkle tree (BMT) built on the 32-byte segments\\n * of the underlying data.\\n * @param _proofSegments Proof segments.\\n * @param _proveSegment Segment to prove.\\n * @param _proveSegmentIndex Prove segment index\\n * @param _chunkSpan chunk bytes length\\n * @return _chunkHash chunk hash\\n */\\n function chunkAddressFromInclusionProof(\\n bytes32[] memory _proofSegments,\\n bytes32 _proveSegment,\\n uint256 _proveSegmentIndex,\\n uint64 _chunkSpan\\n ) internal pure returns (bytes32) {\\n bytes32 rootHash = rootHashFromInclusionProof(_proofSegments, _proveSegment, _proveSegmentIndex);\\n return keccak256(abi.encodePacked(reverseUint64(_chunkSpan), rootHash));\\n }\\n\\n function mergeSegment(\\n bytes32 _calculatedHash,\\n bytes32 _proofSegment,\\n bool mergeFromRight\\n ) internal pure returns (bytes32 res) {\\n if (mergeFromRight) {\\n res = keccak256(abi.encode(_calculatedHash, _proofSegment));\\n } else {\\n res = keccak256(abi.encode(_proofSegment, _calculatedHash));\\n }\\n return res;\\n }\\n}\\n\",\"keccak256\":\"0xe4a86f2002b8b8fc4c955537d6b80ba42fb04a816e783ddbd05f0484b013938a\",\"license\":\"MIT\"},\"src/Util/Signatures.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nlibrary Signatures {\\n error InvalidSignatureLength();\\n\\n /** Hash of the message to sign */\\n function getPostageMessageHash(\\n bytes32 _chunkAddr,\\n bytes32 _batchId,\\n uint64 _index,\\n uint64 _timeStamp\\n ) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(_chunkAddr, _batchId, _index, _timeStamp));\\n }\\n\\n function postageVerify(\\n address _signer, // signer Ethereum address to check against\\n bytes memory _signature,\\n bytes32 _chunkAddr,\\n bytes32 _postageId,\\n uint64 _index,\\n uint64 _timeStamp\\n ) internal pure returns (bool) {\\n bytes32 messageHash = getPostageMessageHash(_chunkAddr, _postageId, _index, _timeStamp);\\n bytes32 ethMessageHash = getEthSignedMessageHash(messageHash);\\n\\n return recoverSigner(ethMessageHash, _signature) == _signer;\\n }\\n\\n function getEthSignedMessageHash(bytes32 _messageHash) internal pure returns (bytes32) {\\n /*\\n Signature is produced by signing a keccak256 hash with the following format:\\n \\\"\\\\x19Ethereum Signed Message\\\\n\\\" + len(msg) + msg\\n */\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", _messageHash));\\n }\\n\\n function recoverSigner(\\n bytes32 _ethSignedMessageHash, // it has to be prefixed message: https://ethereum.stackexchange.com/questions/19582/does-ecrecover-in-solidity-expects-the-x19ethereum-signed-message-n-prefix/21037\\n bytes memory _signature\\n ) internal pure returns (address) {\\n (bytes32 r, bytes32 s, uint8 v) = splitSignature(_signature);\\n\\n return ecrecover(_ethSignedMessageHash, v, r, s);\\n }\\n\\n function splitSignature(bytes memory sig) internal pure returns (bytes32 r_, bytes32 s_, uint8 v_) {\\n if (sig.length != 65) {\\n revert InvalidSignatureLength();\\n }\\n\\n assembly {\\n /*\\n verbose explanation: https://ethereum.stackexchange.com/questions/135591/split-signature-function-in-solidity-by-example-docs\\n First 32 bytes stores the length of the signature\\n add(sig, 32) = pointer of sig + 32\\n effectively, skips first 32 bytes of signature\\n mload(p) loads next 32 bytes starting at the memory address p into memory\\n */\\n\\n // first 32 bytes, after the length prefix\\n r_ := mload(add(sig, 32))\\n // second 32 bytes\\n s_ := mload(add(sig, 64))\\n // final byte (first byte of the next 32 bytes)\\n v_ := byte(0, mload(add(sig, 96)))\\n }\\n\\n // implicitly return (r, s, v)\\n }\\n\\n function getSocMessageHash(bytes32 _identifier, bytes32 _chunkAddr) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(_identifier, _chunkAddr));\\n }\\n\\n function socVerify(\\n address _signer, // signer Ethereum address to check against\\n bytes memory _signature,\\n bytes32 _identifier,\\n bytes32 _chunkAddr\\n ) internal pure returns (bool) {\\n bytes32 messageHash = getSocMessageHash(_identifier, _chunkAddr);\\n bytes32 ethMessageHash = getEthSignedMessageHash(messageHash);\\n\\n return recoverSigner(ethMessageHash, _signature) == _signer;\\n }\\n}\\n\",\"keccak256\":\"0x11762639cfa5bd2ea21922f762254c776ce890ab9e4085b3e3d45dbe21867ac8\",\"license\":\"MIT\"},\"src/Util/TransformedChunkProof.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.19;\\n\\nlibrary TransformedBMTChunk {\\n // max chunk payload size\\n uint256 public constant MAX_CHUNK_PAYLOAD_SIZE = 4096;\\n // segment byte size\\n uint256 public constant SEGMENT_SIZE = 32;\\n\\n /** Calculates the root hash from the provided inclusion proof segments and its corresponding segment index\\n * @param _proofSegments Proof segments.\\n * @param _proveSegment Segment to prove.\\n * @param _proveSegmentIndex Prove segment index\\n * @return _calculatedHash chunk hash\\n */\\n function transformedRootHashFromInclusionProof(\\n bytes32[] memory _proofSegments,\\n bytes32 _proveSegment,\\n uint256 _proveSegmentIndex,\\n bytes32 key\\n ) internal pure returns (bytes32 _calculatedHash) {\\n _calculatedHash = _proveSegment;\\n for (uint256 i = 0; i < _proofSegments.length; i++) {\\n bool mergeFromRight = _proveSegmentIndex % 2 == 0 ? true : false;\\n _calculatedHash = transformedMergeSegment(_calculatedHash, _proofSegments[i], mergeFromRight, key);\\n _proveSegmentIndex >>= 1;\\n }\\n\\n return _calculatedHash;\\n }\\n\\n /**\\n * @notice Changes the endianness of a uint64.\\n * @dev https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel\\n * @param _b The unsigned integer to reverse\\n * @return v - The reversed value\\n */\\n function reverseUint64(uint64 _b) public pure returns (uint64) {\\n uint256 v = _b;\\n\\n // swap bytes\\n v =\\n ((v >> 8) & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) |\\n ((v & 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF) << 8);\\n // swap 2-byte long pairs\\n v =\\n ((v >> 16) & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) |\\n ((v & 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) << 16);\\n // swap 4-byte long pairs\\n v =\\n ((v >> 32) & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) |\\n ((v & 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) << 32);\\n\\n return uint64(v);\\n }\\n\\n /**\\n * Calculate the chunk address from the Binary Merkle Tree of the chunk data\\n *\\n * The BMT chunk address is the hash of the 8 byte span and the root\\n * hash of a binary Merkle tree (BMT) built on the 32-byte segments\\n * of the underlying data.\\n * @param _proofSegments Proof segments.\\n * @param _proveSegment Segment to prove.\\n * @param _proveSegmentIndex Prove segment index\\n * @param _chunkSpan chunk bytes length\\n * @return _chunkHash chunk hash\\n */\\n function transformedChunkAddressFromInclusionProof(\\n bytes32[] memory _proofSegments,\\n bytes32 _proveSegment,\\n uint256 _proveSegmentIndex,\\n uint64 _chunkSpan,\\n bytes32 key\\n ) internal pure returns (bytes32) {\\n bytes32 rootHash = transformedRootHashFromInclusionProof(\\n _proofSegments,\\n _proveSegment,\\n _proveSegmentIndex,\\n key\\n );\\n return keccak256(abi.encodePacked(key, reverseUint64(_chunkSpan), rootHash));\\n }\\n\\n function transformedMergeSegment(\\n bytes32 _calculatedHash,\\n bytes32 _proofSegment,\\n bool mergeFromRight,\\n bytes32 key\\n ) internal pure returns (bytes32 res) {\\n if (mergeFromRight) {\\n res = keccak256(abi.encode(key, _calculatedHash, _proofSegment));\\n } else {\\n res = keccak256(abi.encode(key, _proofSegment, _calculatedHash));\\n }\\n return res;\\n }\\n}\\n\",\"keccak256\":\"0xf36473af0bec0de80c769b139a09bc0329807cb5c3b6234473601081da14350c\",\"license\":\"MIT\"},\"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 setPrice(uint256 _price) 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 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\":\"0xb46f1043bf7fdc22d5f719ab97341211fa30fff499de3cf079be715079b965ad\",\"license\":\"BSD-3-Clause\"}},\"version\":1}", + "bytecode": "0x60806040526008805462ffffff60c01b19166264020160c01b1790557dba1914b54e0348a1028d1a103a95ed55c4004b9d332400000000000000006009553480156200004a57600080fd5b5060405162004e1538038062004e158339810160408190526200006d916200019d565b60018054600380546001600160a01b03199081166001600160a01b03888116919091179092556001600160a81b0319909216610100868316021790925560028054909116918316919091179055620000c7600033620000d0565b505050620001e7565b620000dc8282620000e0565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000dc576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200013c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b80516001600160a01b03811681146200019857600080fd5b919050565b600080600060608486031215620001b357600080fd5b620001be8462000180565b9250620001ce6020850162000180565b9150620001de6040850162000180565b90509250925092565b614c1e80620001f76000396000f3fe608060405234801561001057600080fd5b50600436106102775760003560e01c806377c75d1011610160578063b6cd5822116100d8578063dfbf53ae1161008c578063f69ee1d111610071578063f69ee1d1146105df578063f7b188a5146105f2578063fb00f2f3146105fa57600080fd5b8063dfbf53ae1461059c578063f4e6fcca146105cc57600080fd5b8063ce987745116100bd578063ce9877451461056e578063d1e8b63d14610581578063d547741f1461058957600080fd5b8063b6cd582214610541578063c46b40291461055457600080fd5b80638456cb591161012f5780638d8b6428116101145780638d8b6428146104fa57806391d1485414610502578063a217fddf1461053957600080fd5b80638456cb59146104ea5780638a19c8bc146104f257600080fd5b806377c75d10146104645780637fe019c61461047757806382b39b1b1461049257806383220626146104e257600080fd5b80635c975abb116101f357806364c34a85116101c257806369da9114116101a757806369da9114146103de5780636f94aaf2146103f157806372286cba1461040c57600080fd5b806364c34a85146103a957806369bfac01146103b157600080fd5b80635c975abb146103705780635d4844ea1461037b57806362fd29ae1461038e57806363f5cf7c1461039657600080fd5b80632a4e62491161024a5780632f3906da1161022f5780632f3906da1461034257806336568abe1461034a5780635838d6731461035d57600080fd5b80632a4e6249146103185780632f2ff15d1461032d57600080fd5b806301ffc9a71461027c5780631736d472146102a457806318350096146102b7578063248a9ca3146102e7575b600080fd5b61028f61028a36600461431f565b61060d565b60405190151581526020015b60405180910390f35b61028f6102b236600461436d565b610676565b6001546102cf9061010090046001600160a01b031681565b6040516001600160a01b03909116815260200161029b565b61030a6102f53660046143a6565b60009081526020819052604090206001015490565b60405190815260200161029b565b610320610883565b60405161029b91906143bf565b61034061033b36600461444e565b610990565b005b61028f6109ba565b61034061035836600461444e565b610a04565b61034061036b366004614490565b610a95565b60015460ff1661028f565b6003546102cf906001600160a01b031681565b61030a611032565b6103406103a43660046144d5565b6110fe565b61030a611533565b6008546103c59067ffffffffffffffff1681565b60405167ffffffffffffffff909116815260200161029b565b6002546102cf906001600160a01b031681565b6008546103c590600160801b900467ffffffffffffffff1681565b61041f61041a3660046143a6565b611613565b604080519788526001600160a01b0390961660208801529315159486019490945260ff9091166060850152608084015260a083019190915260c082015260e00161029b565b61028f6104723660046143a6565b611671565b6008546103c590600160401b900467ffffffffffffffff1681565b6104a56104a03660046143a6565b611921565b604080519687526001600160a01b03909516602087015260ff909316938501939093526060840152608083019190915260a082015260c00161029b565b61030a611978565b610340611983565b6103c56119dc565b61028f6119e9565b61028f61051036600461444e565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61030a600081565b61034061054f36600461455d565b611a13565b61055c611f6d565b60405160ff909116815260200161029b565b61030a61057c366004614592565b611ff2565b61028f612061565b61034061059736600461444e565b612086565b600a54600b54600c54600d54600e546104a594936001600160a01b03811693600160a01b90910460ff1692909186565b6103406105da3660046145cf565b6120ab565b6103406105ed3660046143a6565b612192565b6103406121e6565b61028f61060836600461461a565b61223d565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061067057507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b60035460405163d1052d1f60e01b81526001600160a01b038481166004830152600092839291169063d1052d1f90602401602060405180830381865afa1580156106c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e89190614648565b600354604051631d54805360e01b81526001600160a01b03878116600483015292935060009290911690631d54805390602401602060405180830381865afa158015610738573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075c9190614661565b6107669085614694565b90506107706109ba565b156107a7576040517fe2586bcc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816000036107c7576040516273e5c360e31b815260040160405180910390fd5b6107d3609860026146ad565b6107dd90436146c4565b82106107fc57604051630a0744c560e01b815260040160405180910390fd5b6003546040516397adedb560e01b81526001600160a01b03878116600483015261087a9216906397adedb590602401602060405180830381865afa158015610848573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086c9190614648565b610874611533565b8361223d565b95945050505050565b606061088d6119e9565b6108aa57604051633788c6c160e11b815260040160405180910390fd5b60006108b46119dc565b60085490915067ffffffffffffffff808316600160401b90920416146108ed57604051636fbabc7760e01b815260040160405180910390fd5b6005805480602002602001604051908101604052809291908181526020016000905b828210156109865760008481526020908190206040805160c08101825260058602909201805483526001808201546001600160a01b03811685870152600160a01b900460ff169284019290925260028101546060840152600381015460808401526004015460a0830152908352909201910161090f565b5050505091505090565b6000828152602081905260409020600101546109ab8161227a565b6109b58383612287565b505050565b6000806109c86098436146ed565b90506109d660046098614701565b81101580156109ef57506109ec60026098614701565b81105b156109fc57600191505090565b600091505090565b6001600160a01b0381163314610a875760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a918282612325565b5050565b610a9d6123a4565b6000610aa76119dc565b6003546040516397adedb560e01b81523360048201529192506000916001600160a01b03909116906397adedb590602401602060405180830381865afa158015610af5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b199190614648565b6003546040517f830a053e0000000000000000000000000000000000000000000000000000000081523360048201529192506000916001600160a01b039091169063830a053e90602401602060405180830381865afa158015610b80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba49190614648565b60035460405163d1052d1f60e01b81523360048201529192506000916001600160a01b039091169063d1052d1f90602401602060405180830381865afa158015610bf2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c169190614648565b600354604051631d54805360e01b81523360048201529192506000916001600160a01b0390911690631d54805390602401602060405180830381865afa158015610c64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c889190614661565b9050610c92612061565b610cc8576040517fdc816a8700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001610cd660046098614701565b610ce091906146c4565b610ceb6098436146ed565b03610d22576040517f5baef6b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8567ffffffffffffffff168567ffffffffffffffff161115610d70576040517f50ff7c0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8567ffffffffffffffff168567ffffffffffffffff161015610dbe576040517f7a0c0fd600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600003610dde576040516273e5c360e31b815260040160405180910390fd5b610dea609860026146ad565b610df490436146c4565b8210610e1357604051630a0744c560e01b815260040160405180910390fd5b60085467ffffffffffffffff868116911614610e5357610e356004600061423d565b6008805467ffffffffffffffff191667ffffffffffffffff87161790555b60045460005b81811015610ec6578560048281548110610e7557610e75614715565b90600052602060002090600502016000015403610ebe576040517fbfec555800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101610e59565b5060046040518060e00160405280878152602001336001600160a01b031681526020016000151581526020018460ff1681526020018681526020018a8152602001600081525090806001815401808255809150506001900390600052602060002090600502016000909190919091506000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160146101000a81548160ff02191690831515021790555060608201518160010160156101000a81548160ff021916908360ff1602179055506080820151816002015560a0820151816003015560c0820151816004015550507faadc88121471799d39ee2bbe1dd30a4ab57510e2a33bd6e537de5fafd2daa8868786846040516110209392919067ffffffffffffffff939093168352602083019190915260ff16604082015260600190565b60405180910390a15050505050505050565b60008061103d6119dc565b61104890600161472b565b6007546008549192509061106e90600160401b900467ffffffffffffffff16600161472b565b67ffffffffffffffff168267ffffffffffffffff161115610670576008546000906001906110ad90600160401b900467ffffffffffffffff1685614753565b6110b79190614753565b67ffffffffffffffff16905081816040516020016110df929190918252602082015260400190565b6040516020818303038152906040528051906020012091505092915050565b6111066123a4565b61110e6123f7565b6040805160c081018252600a548152600b546001600160a01b0381166020830152600160a01b900460ff1691810191909152600c546060820152600d546080820152600e5460a0820152600654600754600091829161116e600f826146ed565b935061117b600e826146ed565b9250838310611192578261118e81614774565b9350505b6111a5866020013583876040015161223d565b6111c557604051633b5f43a360e01b815260036004820152602401610a7e565b6111d086601e612a66565b6111d986612d78565b6111e286613085565b6111f5886020013583876040015161223d565b61121557604051633b5f43a360e01b815260026004820152602401610a7e565b611229886112248660026146ad565b612a66565b61123288612d78565b61123b88613085565b61124e876020013583876040015161223d565b61126e57604051633b5f43a360e01b815260016004820152602401610a7e565b61127d876112248560026146ad565b61128687612d78565b61128f87613085565b611305848461129e8b8061478d565b60008181106112af576112af614715565b602002919091013590506112c38b8061478d565b60008181106112d4576112d4614715565b602002919091013590506112e88b8061478d565b60008181106112f9576112f9614715565b90506020020135613319565b61132f611312878061478d565b600081811061132357611323614715565b905060200201356133a6565b60015460208601516040516001600160a01b03918216602482015260009261010090049091169060440160408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f51cff8d900000000000000000000000000000000000000000000000000000000179052516113bc9190614802565b6000604051808303816000865af19150503d80600081146113f9576040519150601f19603f3d011682016040523d82523d6000602084013e6113fe565b606091505b5050905080611449576020808701516040516001600160a01b0390911681527f7ae187a0c04cf55b655ca83fa11d37854c882bf1fdcb588469b414731bb0e05a910160405180910390a15b7f788e77979e6e6a8a6a5d2c19c58b1ff9671298f54c85ac6f6aa30379aed5861a86604051611478919061481e565b60405180910390a17fbee3fc8a3523c1a65fa9308ce1f2b8fd90c24975b141b754603194597846e4dd60018054906101000a90046001600160a01b03166001600160a01b0316638a5e8e326040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115169190614648565b6040519081526020015b60405180910390a1505050505050505050565b600061153d612061565b8061157b5750600854600160401b900467ffffffffffffffff1661155f6119dc565b67ffffffffffffffff1611801561157b57506115796119e9565b155b1561158d57611588611978565b905090565b6115956119e9565b156115a257611588611032565b6115aa6109ba565b80156115d95750600854600160401b900467ffffffffffffffff166115cd6119dc565b67ffffffffffffffff16145b15611610576040517f36b7884b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b90565b6004818154811061162357600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294506001600160a01b0382169360ff600160a01b8404811694600160a81b909404169287565b600061167b6119e9565b61169857604051633788c6c160e11b815260040160405180910390fd5b60006116a26119dc565b60085490915067ffffffffffffffff808316600160401b90920416146116db57604051636fbabc7760e01b815260040160405180910390fd5b60085467ffffffffffffffff600160801b90910481169082161161171257604051630c8d9eab60e31b815260040160405180910390fd5b6000806000806000806000806117266133e4565b9050600061173261349e565b600454919650945060005b8181101561190d576004818154811061175857611758614715565b90600052602060002090600502016004015494506004818154811061177f5761177f614715565b906000526020600020906005020160010160149054906101000a900460ff1680156117cd5750600585815481106117b8576117b8614715565b90600052602060002090600502016004015487145b801561180b5750600585815481106117e7576117e7614715565b600091825260209091206001600590920201015460ff878116600160a01b90920416145b15611905576005858154811061182357611823614715565b9060005260206000209060050201600301548b611840919061486d565b9a508383604051602001611855929190614880565b60408051601f19818403018152919052805160209091012098506fffffffffffffffffffffffffffffffff808a16985061189090600161486d565b600586815481106118a3576118a3614715565b9060005260206000209060050201600301546118bf91906146ad565b6118c98c8a6146ad565b10156118f757600585815481106118e2576118e2614715565b90600052602060002090600502016000015499505b8261190181614774565b9350505b60010161173d565b505050959099149998505050505050505050565b6005818154811061193157600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294506001600160a01b03821693600160a01b90920460ff169290919086565b6000806110486119dc565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166119d257604051631d77d47760e21b815260040160405180910390fd5b6119da613657565b565b6000611588609843614701565b60006119f760026098614701565b611a026098436146ed565b10611a0d5750600190565b50600090565b611a1b6123a4565b6000611a256119dc565b6003546040516397adedb560e01b81523360048201529192506000916001600160a01b03909116906397adedb590602401602060405180830381865afa158015611a73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a979190614648565b9050611aa1611f6d565b60ff168560ff161015611ae0576040517f83d9b7bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ae86109ba565b611b1e576040517fd1088db600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085467ffffffffffffffff838116911614611b66576040517f842a9e0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085467ffffffffffffffff838116600160401b9092041614611c4e57611b8b611533565b600655611b9a6005600061425e565b600880547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff16600160401b67ffffffffffffffff8516908102919091179091556006546040805192835260208301919091527ff0ae472da9c8da86bda4991a549c03a3cb328b5f360ea11a5b8814f32bb85176910160405180910390a1611c4e600754604080516020810192909252449082015260600160408051601f198184030181529190528051602090910120600755565b6000611c5c82878787611ff2565b90506000611c6a83836136ab565b9050600060048281548110611c8157611c81614715565b600091825260208083206040805160e08101825260059094029091018054845260018101546001600160a01b0381169385019390935260ff600160a01b84048116151592850192909252600160a81b909204166060830181905260028201546080840152600382015460a084015260049091015460c0830152909250611d07908a614694565b9050611d1a82600001516006548361223d565b611d56576006546040517f14ebbbe4000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b816040015115611d92576040517fa89ac15100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160048481548110611da757611da7614715565b906000526020600020906005020160010160146101000a81548160ff02191690831515021790555060058054905060048481548110611de857611de8614715565b90600052602060002090600502016004018190555060056040518060c001604052808460000151815260200184602001516001600160a01b031681526020018b60ff16815260200184608001518152602001836002611e479190614986565b8560800151611e5691906146ad565b815260209081018b90528254600181810185556000948552938290208351600590920201908155908201519281018054604084015160ff16600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199091166001600160a01b0390951694909417939093179092556060810151600280840191909155608080830151600385015560a0909201516004909301929092558351908401517f13fc17fd71632266fe82092de6dd91a06b4fa68d8dc950492e5421cbed55a6a59289929190611f23908690614986565b8660800151611f3291906146ad565b6040805167ffffffffffffffff90951685526020850193909352918301526060820152608081018a905260ff8b1660a082015260c001611520565b6008546000908190611f929067ffffffffffffffff600160801b820481169116614753565b67ffffffffffffffff169050600060fe8211611fae5781611fb1565b60fe5b611fbc906001614995565b600b5490915060ff600160a01b9091048116908216811115611fe757611fe28282614694565b611fea565b60005b935050505090565b60408051602081018690527fff0000000000000000000000000000000000000000000000000000000000000060f886901b169181019190915260418101839052606181018290526000906081015b6040516020818303038152906040528051906020012090505b949350505050565b600061206f60046098614701565b61207a6098436146ed565b1015611a0d5750600190565b6000828152602081905260409020600101546120a18161227a565b6109b58383612325565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166120fa57604051637bfa4b9f60e01b815260040160405180910390fd5b600880547fffffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b60ff958616027fffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffff1617600160c81b93851693909302929092177fffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffff16600160d01b9190931602919091179055565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166121e157604051637bfa4b9f60e01b815260040160405180910390fd5b600955565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661223557604051631d77d47760e21b815260040160405180910390fd5b6119da613756565b60008160ff1660000361225257506001612273565b61226160ff83166101006149ae565b61226c9060026149c9565b8484181090505b9392505050565b612284813361378f565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a91576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556122e13390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610a91576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60015460ff16156119da5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a7e565b60006124016119dc565b905061240b6119e9565b61242857604051633788c6c160e11b815260040160405180910390fd5b60085467ffffffffffffffff828116600160401b909204161461245e57604051636fbabc7760e01b815260040160405180910390fd5b60085467ffffffffffffffff600160801b90910481169082161161249557604051630c8d9eab60e31b815260040160405180910390fd5b600454604051818152600091829182918291829182917f6752c5e71c95fb93bc7137adeb115a33fa4e54e2683e33d3f90c2bb1c4b6c2a59060200160405180910390a16005546040519081527f4c03de6a759749c0c9387b7014634dc5c6af610e1366023d90751c783a998f8d9060200160405180910390a161251661349e565b6040805183815260ff831660208201529295509093507f34e8eda4cd857cd2865becf58a47748f31415f4a382cbb2cc0c64b9a27c717be910160405180910390a160006125616133e4565b905060005b8281101561294e5760006004828154811061258357612583614715565b600091825260208083206040805160e08101825260059485029092018054835260018101546001600160a01b0381169484019490945260ff600160a01b85048116151592840192909252600160a81b90930416606082015260028201546080820152600382015460a082015260049091015460c0820181905282549194509291908390811061261457612614614715565b60009182526020918290206040805160c0810182526005939093029091018054835260018101546001600160a01b03811694840194909452600160a01b90930460ff1682820152600283015460608301526003830154608083015260049092015460a082015290840151909150801561269057508060a0015188145b80156126a55750806040015160ff168760ff16145b1561279a5760808101516126b9908d61486d565b9b50848b6040516020016126ce929190614880565b60408051601f19818403018152919052805160209091012099506fffffffffffffffffffffffffffffffff808b16995061270990600161486d565b816080015161271891906146ad565b6127228d8b6146ad565b101561278c578051600a556020810151600b8054604084015160ff16600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199091166001600160a01b03909316929092179190911790556060810151600c556080810151600d5560a0810151600e555b8a61279681614774565b9b50505b826040015180156127c357508060a00151881415806127c35750806040015160ff168760ff1614155b80156127e45750600854600160d01b900460ff166127e26064446146ed565b105b156128905760035460208201516001600160a01b039091169063d009b2d69061280e8a6002614986565b60085461282790609890600160c01b900460ff166146ad565b61283191906146ad565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561287757600080fd5b505af115801561288b573d6000803e3d6000fd5b505050505b82604001516129405760035460208401516001600160a01b039091169063d009b2d6906128be8a6002614986565b6008546128d790609890600160c81b900460ff166146ad565b6128e191906146ad565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561292757600080fd5b505af115801561293b573d6000803e3d6000fd5b505050505b836001019350505050612566565b506002546040517fffb98fe300000000000000000000000000000000000000000000000000000000815261ffff891660048201526000916001600160a01b03169063ffb98fe3906024016020604051808303816000875af11580156129b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129db91906149e9565b905080612a1a5760405161ffff891681527f20378e5d379eabfa30444ecc5eb2b87d0d77bdbf5a58d80d008673b0ca6421419060200160405180910390a15b50506008805467ffffffffffffffff909916600160801b027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff9099169890981790975550505050505050565b600754600090612a78906080906146ed565b90506000612adb612a8c60a086018661478d565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505050606086013584612ad360a0890160808a01614a04565b600654613802565b60408051858152602081018390529192507f94e252069a85aa79db21f5bd8ca4e14dd3a3927aa492711017a2c8ddad95af00910160405180910390a1612b63612b24858061478d565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060208601358561040061397a565b600e5414612b8e5760405163755f0a2560e01b81526001600482015260248101829052604401610a7e565b612b9b60a085018561478d565b6000818110612bac57612bac614715565b90506020020135848060400190612bc3919061478d565b6000818110612bd457612bd4614715565b9050602002013514612c035760405163755f0a2560e01b81526002600482015260248101829052604401610a7e565b600080612c1360e087018761478d565b905011612c24578460200135612c59565b612c3160e086018661478d565b6000818110612c4257612c42614715565b9050602002810190612c549190614a1f565b606001355b9050612cb7612c6b604087018761478d565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505050606087013585612cb260a08a0160808b01614a04565b61397a565b8114612ce05760405163755f0a2560e01b81526003600482015260248101839052604401610a7e565b6000612cef60e087018761478d565b90501115612d275760408051602080880135908201529081018390526060016040516020818303038152906040528051906020012091505b81612d32868061478d565b6000818110612d4357612d43614715565b9050602002013514612d715760405163755f0a2560e01b815260048181015260248101839052604401610a7e565b5050505050565b6001546000908190819061010090046001600160a01b031663c81e25ab612da260c0870187614a1f565b602001356040518263ffffffff1660e01b8152600401612dc491815260200190565b60c060405180830381865afa158015612de1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e059190614a35565b509396509194509250506001600160a01b0384169050612e6557612e2c60c0850185614a1f565b602001356040517f2396d34e000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b6000612e88612e7760c0870187614a1f565b611610906060810190604001614a04565b90506000612e968484613ae8565b9050808263ffffffff1610612eeb57612eb260c0870187614a1f565b602001356040517f1362e4a0000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b6000612f1a612efd60c0890189614a1f565b612f0e906060810190604001614a04565b60201c63ffffffff1690565b90506000612f2c886020013586613b03565b63ffffffff16905067ffffffffffffffff82168114612f8b57612f5260c0890189614a1f565b602001356040517f6dd6a24f000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b61303187612f9c60c08b018b614a1f565b612fa69080614aa3565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060208b0135612fec60c08d018d614a1f565b60200135612ffd60c08e018e614a1f565b61300e906060810190604001614a04565b61301b60c08f018f614a1f565b61302c906080810190606001614a04565b613b2a565b61307b5761304260c0890189614a1f565b602001356040517fdb12fb9d000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b5050505050505050565b61309260e082018261478d565b905060000361309e5750565b6131bf6130ae60e083018361478d565b60008181106130bf576130bf614715565b90506020028101906130d19190614a1f565b6130df906020810190614aea565b6130ec60e084018461478d565b60008181106130fd576130fd614715565b905060200281019061310f9190614a1f565b61311d906020810190614aa3565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061315f9250505060e085018561478d565b600081811061317057613170614715565b90506020028101906131829190614a1f565b6040013561319360e086018661478d565b60008181106131a4576131a4614715565b90506020028101906131b69190614a1f565b60600135613bc1565b61322c576131d060e082018261478d565b60008181106131e1576131e1614715565b90506020028101906131f39190614a1f565b606001356040517fd740df61000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b60208101356132ab61324160e084018461478d565b600081811061325257613252614715565b90506020028101906132649190614a1f565b6040013561327560e085018561478d565b600081811061328657613286614715565b90506020028101906132989190614a1f565b6132a6906020810190614aea565b613c54565b14612284576132bd60e082018261478d565b60008181106132ce576132ce614715565b90506020028101906132e09190614a1f565b606001356040517f82f2469d000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b838510156133665781831061334157604051633d386eb360e11b815260040160405180910390fd5b80821061336157604051633588c6d360e11b815260040160405180910390fd5b612d71565b82821061338657604051633d386eb360e11b815260040160405180910390fd5b808310612d7157604051633588c6d360e11b815260040160405180910390fd5b6009548110612284576040517fb6052cdf00000000000000000000000000000000000000000000000000000000815260048101829052602401610a7e565b60606133ee6119e9565b61340b57604051633788c6c160e11b815260040160405180910390fd5b60006134156119dc565b60085490915067ffffffffffffffff808316600160401b909204161461344e57604051636fbabc7760e01b815260040160405180910390fd5b6007546040516020016134899181527f3100000000000000000000000000000000000000000000000000000000000000602082015260210190565b60405160208183030381529060405291505090565b60008060008060008060008060006134b4613ca2565b60045490915060005b8181101561364657600481815481106134d8576134d8614715565b906000526020600020906005020160010160149054906101000a900460ff161561363e576004818154811061350f5761350f614715565b90600052602060002090600502016004015493506005848154811061353657613536614715565b90600052602060002090600502016003015489613553919061486d565b98508281604051602001613568929190614880565b60408051601f19818403018152919052805160209091012097506fffffffffffffffffffffffffffffffff80891697506135a390600161486d565b600585815481106135b6576135b6614715565b9060005260206000209060050201600301546135d291906146ad565b6135dc8a896146ad565b101561363e57600584815481106135f5576135f5614715565b90600052602060002090600502016004015495506005848154811061361c5761361c614715565b906000526020600020906005020160010160149054906101000a900460ff1694505b6001016134bd565b509399929850919650505050505050565b61365f6123a4565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b6000805b6004548110156137235783600482815481106136cd576136cd614715565b90600052602060002090600502016000015414801561370f5750600481815481106136fa576136fa614715565b90600052602060002090600502016003015483145b1561371b579050610670565b6001016136af565b506040517fd950091500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61375e613d2b565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa3361368e565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a91576137c081613d7d565b6137cb836020613d8f565b6040516020016137dc929190614b07565b60408051601f198184030181529082905262461bcd60e51b8252610a7e91600401614b88565b60008061381187878786613f54565b905082613916856000808267ffffffffffffffff1690506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b600882901c7eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff161790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b601082901c7dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff161790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b602082901c7bffffffff00000000ffffffff00000000ffffffff00000000ffffffff1617905080915050919050565b826040516020016139589392919092835260c09190911b77ffffffffffffffffffffffffffffffffffffffffffffffff19166020830152602882015260480190565b6040516020818303038152906040528051906020012091505095945050505050565b600080613988868686613fca565b9050613a8c836000808267ffffffffffffffff1690506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b600882901c7eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff161790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b601082901c7dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff161790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b602082901c7bffffffff00000000ffffffff00000000ffffffff00000000ffffffff1617905080915050919050565b81604051602001613ac792919060c09290921b77ffffffffffffffffffffffffffffffffffffffffffffffff19168252600882015260280190565b60405160208183030381529060405280519060200120915050949350505050565b6000613af48284614694565b60ff166001901b905092915050565b600060e083901c613b15836020614694565b60ff168163ffffffff16901c91505092915050565b600080613b3986868686614032565b90506000613b94826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050886001600160a01b0316613baa828a61407d565b6001600160a01b0316149998505050505050505050565b600080613bce84846140fc565b90506000613c29826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050866001600160a01b0316613c3f828861407d565b6001600160a01b031614979650505050505050565b60008282604051602001613c8492919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b60405160208183030381529060405280519060200120905092915050565b6060613cac6119e9565b613cc957604051633788c6c160e11b815260040160405180910390fd5b6000613cd36119dc565b60085490915067ffffffffffffffff808316600160401b9092041614613d0c57604051636fbabc7760e01b815260040160405180910390fd5b600754604051602001613489918152600360fc1b602082015260210190565b60015460ff166119da5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610a7e565b60606106706001600160a01b03831660145b60606000613d9e8360026146ad565b613da990600261486d565b67ffffffffffffffff811115613dc157613dc1614bbb565b6040519080825280601f01601f191660200182016040528015613deb576020820181803683370190505b509050600360fc1b81600081518110613e0657613e06614715565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613e5157613e51614715565b60200101906001600160f81b031916908160001a9053506000613e758460026146ad565b613e8090600161486d565b90505b6001811115613f05577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613ec157613ec1614715565b1a60f81b828281518110613ed757613ed7614715565b60200101906001600160f81b031916908160001a90535060049490941c93613efe81614bd1565b9050613e83565b5083156122735760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a7e565b8260005b8551811015613fc1576000613f6e6002866146ed565b15613f7a576000613f7d565b60015b9050613fa483888481518110613f9557613f95614715565b60200260200101518387614118565b9250600185901c9450508080613fb990614774565b915050613f58565b50949350505050565b8160005b845181101561402a576000613fe46002856146ed565b600014905061400d83878481518110613fff57613fff614715565b602002602001015183614178565b9250600184901c935050808061402290614774565b915050613fce565b509392505050565b604080516020810186905290810184905277ffffffffffffffffffffffffffffffffffffffffffffffff1960c084811b8216606084015283901b166068820152600090607001612040565b60008060008061408c856141df565b6040805160008152602081018083528b905260ff8316918101919091526060810184905260808101839052929550909350915060019060a0016020604051602081039080840390855afa1580156140e7573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b6040805160208101849052908101829052600090606001613c84565b6000821561415857604080516020810184905290810186905260608101859052608001604051602081830303815290604052805190602001209050612059565b604080516020810184905290810185905260608101869052608001612040565b600081156141b1576040805160208101869052908101849052606001604051602081830303815290604052805190602001209050612273565b5050604080516020808201939093528082019390935280518084038201815260609093019052815191012090565b6000806000835160411461421f576040517f4be6321b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505060208101516040820151606090920151909260009190911a90565b5080546000825560050290600052602060002090810190612284919061427f565b508054600082556005029060005260206000209081019061228491906142d6565b5b808211156142d25760008082556001820180547fffffffffffffffffffff0000000000000000000000000000000000000000000016905560028201819055600382018190556004820155600501614280565b5090565b5b808211156142d257600080825560018201805474ffffffffffffffffffffffffffffffffffffffffff19169055600282018190556003820181905560048201556005016142d7565b60006020828403121561433157600080fd5b81356001600160e01b03198116811461227357600080fd5b6001600160a01b038116811461228457600080fd5b60ff8116811461228457600080fd5b6000806040838503121561438057600080fd5b823561438b81614349565b9150602083013561439b8161435e565b809150509250929050565b6000602082840312156143b857600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b818110156144425761442f838551805182526001600160a01b03602082015116602083015260ff6040820151166040830152606081015160608301526080810151608083015260a081015160a08301525050565b9284019260c092909201916001016143db565b50909695505050505050565b6000806040838503121561446157600080fd5b82359150602083013561439b81614349565b803567ffffffffffffffff8116811461448b57600080fd5b919050565b600080604083850312156144a357600080fd5b823591506144b360208401614473565b90509250929050565b600061010082840312156144cf57600080fd5b50919050565b6000806000606084860312156144ea57600080fd5b833567ffffffffffffffff8082111561450257600080fd5b61450e878388016144bc565b9450602086013591508082111561452457600080fd5b614530878388016144bc565b9350604086013591508082111561454657600080fd5b50614553868287016144bc565b9150509250925092565b60008060006060848603121561457257600080fd5b833561457d8161435e565b95602085013595506040909401359392505050565b600080600080608085870312156145a857600080fd5b8435935060208501356145ba8161435e565b93969395505050506040820135916060013590565b6000806000606084860312156145e457600080fd5b83356145ef8161435e565b925060208401356145ff8161435e565b9150604084013561460f8161435e565b809150509250925092565b60008060006060848603121561462f57600080fd5b8335925060208401359150604084013561460f8161435e565b60006020828403121561465a57600080fd5b5051919050565b60006020828403121561467357600080fd5b81516122738161435e565b634e487b7160e01b600052601160045260246000fd5b60ff82811682821603908111156106705761067061467e565b80820281158282048414176106705761067061467e565b818103818111156106705761067061467e565b634e487b7160e01b600052601260045260246000fd5b6000826146fc576146fc6146d7565b500690565b600082614710576147106146d7565b500490565b634e487b7160e01b600052603260045260246000fd5b67ffffffffffffffff81811683821601908082111561474c5761474c61467e565b5092915050565b67ffffffffffffffff82811682821603908082111561474c5761474c61467e565b6000600182016147865761478661467e565b5060010190565b6000808335601e198436030181126147a457600080fd5b83018035915067ffffffffffffffff8211156147bf57600080fd5b6020019150600581901b36038213156147d757600080fd5b9250929050565b60005b838110156147f95781810151838201526020016147e1565b50506000910152565b600082516148148184602087016147de565b9190910192915050565b60c081016106708284805182526001600160a01b03602082015116602083015260ff6040820151166040830152606081015160608301526080810151608083015260a081015160a08301525050565b808201808211156106705761067061467e565b600083516148928184602088016147de565b9190910191825250602001919050565b600181815b808511156148dd5781600019048211156148c3576148c361467e565b808516156148d057918102915b93841c93908002906148a7565b509250929050565b6000826148f457506001610670565b8161490157506000610670565b816001811461491757600281146149215761493d565b6001915050610670565b60ff8411156149325761493261467e565b50506001821b610670565b5060208310610133831016604e8410600b8410161715614960575081810a610670565b61496a83836148a2565b806000190482111561497e5761497e61467e565b029392505050565b600061227360ff8416836148e5565b60ff81811683821601908111156106705761067061467e565b61ffff82811682821603908082111561474c5761474c61467e565b600061227361ffff8416836148e5565b8051801515811461448b57600080fd5b6000602082840312156149fb57600080fd5b612273826149d9565b600060208284031215614a1657600080fd5b61227382614473565b60008235607e1983360301811261481457600080fd5b60008060008060008060c08789031215614a4e57600080fd5b8651614a5981614349565b6020880151909650614a6a8161435e565b6040880151909550614a7b8161435e565b9350614a89606088016149d9565b92506080870151915060a087015190509295509295509295565b6000808335601e19843603018112614aba57600080fd5b83018035915067ffffffffffffffff821115614ad557600080fd5b6020019150368190038213156147d757600080fd5b600060208284031215614afc57600080fd5b813561227381614349565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614b3f8160178501602088016147de565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614b7c8160288401602088016147de565b01602801949350505050565b6020815260008251806020840152614ba78160408501602087016147de565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b600081614be057614be061467e565b50600019019056fea2646970667358221220e6d529c753301d40b88db1b0768955eec9895788418077bb895e8f7739fb1b6964736f6c63430008130033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102775760003560e01c806377c75d1011610160578063b6cd5822116100d8578063dfbf53ae1161008c578063f69ee1d111610071578063f69ee1d1146105df578063f7b188a5146105f2578063fb00f2f3146105fa57600080fd5b8063dfbf53ae1461059c578063f4e6fcca146105cc57600080fd5b8063ce987745116100bd578063ce9877451461056e578063d1e8b63d14610581578063d547741f1461058957600080fd5b8063b6cd582214610541578063c46b40291461055457600080fd5b80638456cb591161012f5780638d8b6428116101145780638d8b6428146104fa57806391d1485414610502578063a217fddf1461053957600080fd5b80638456cb59146104ea5780638a19c8bc146104f257600080fd5b806377c75d10146104645780637fe019c61461047757806382b39b1b1461049257806383220626146104e257600080fd5b80635c975abb116101f357806364c34a85116101c257806369da9114116101a757806369da9114146103de5780636f94aaf2146103f157806372286cba1461040c57600080fd5b806364c34a85146103a957806369bfac01146103b157600080fd5b80635c975abb146103705780635d4844ea1461037b57806362fd29ae1461038e57806363f5cf7c1461039657600080fd5b80632a4e62491161024a5780632f3906da1161022f5780632f3906da1461034257806336568abe1461034a5780635838d6731461035d57600080fd5b80632a4e6249146103185780632f2ff15d1461032d57600080fd5b806301ffc9a71461027c5780631736d472146102a457806318350096146102b7578063248a9ca3146102e7575b600080fd5b61028f61028a36600461431f565b61060d565b60405190151581526020015b60405180910390f35b61028f6102b236600461436d565b610676565b6001546102cf9061010090046001600160a01b031681565b6040516001600160a01b03909116815260200161029b565b61030a6102f53660046143a6565b60009081526020819052604090206001015490565b60405190815260200161029b565b610320610883565b60405161029b91906143bf565b61034061033b36600461444e565b610990565b005b61028f6109ba565b61034061035836600461444e565b610a04565b61034061036b366004614490565b610a95565b60015460ff1661028f565b6003546102cf906001600160a01b031681565b61030a611032565b6103406103a43660046144d5565b6110fe565b61030a611533565b6008546103c59067ffffffffffffffff1681565b60405167ffffffffffffffff909116815260200161029b565b6002546102cf906001600160a01b031681565b6008546103c590600160801b900467ffffffffffffffff1681565b61041f61041a3660046143a6565b611613565b604080519788526001600160a01b0390961660208801529315159486019490945260ff9091166060850152608084015260a083019190915260c082015260e00161029b565b61028f6104723660046143a6565b611671565b6008546103c590600160401b900467ffffffffffffffff1681565b6104a56104a03660046143a6565b611921565b604080519687526001600160a01b03909516602087015260ff909316938501939093526060840152608083019190915260a082015260c00161029b565b61030a611978565b610340611983565b6103c56119dc565b61028f6119e9565b61028f61051036600461444e565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61030a600081565b61034061054f36600461455d565b611a13565b61055c611f6d565b60405160ff909116815260200161029b565b61030a61057c366004614592565b611ff2565b61028f612061565b61034061059736600461444e565b612086565b600a54600b54600c54600d54600e546104a594936001600160a01b03811693600160a01b90910460ff1692909186565b6103406105da3660046145cf565b6120ab565b6103406105ed3660046143a6565b612192565b6103406121e6565b61028f61060836600461461a565b61223d565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061067057507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b60035460405163d1052d1f60e01b81526001600160a01b038481166004830152600092839291169063d1052d1f90602401602060405180830381865afa1580156106c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e89190614648565b600354604051631d54805360e01b81526001600160a01b03878116600483015292935060009290911690631d54805390602401602060405180830381865afa158015610738573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075c9190614661565b6107669085614694565b90506107706109ba565b156107a7576040517fe2586bcc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816000036107c7576040516273e5c360e31b815260040160405180910390fd5b6107d3609860026146ad565b6107dd90436146c4565b82106107fc57604051630a0744c560e01b815260040160405180910390fd5b6003546040516397adedb560e01b81526001600160a01b03878116600483015261087a9216906397adedb590602401602060405180830381865afa158015610848573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086c9190614648565b610874611533565b8361223d565b95945050505050565b606061088d6119e9565b6108aa57604051633788c6c160e11b815260040160405180910390fd5b60006108b46119dc565b60085490915067ffffffffffffffff808316600160401b90920416146108ed57604051636fbabc7760e01b815260040160405180910390fd5b6005805480602002602001604051908101604052809291908181526020016000905b828210156109865760008481526020908190206040805160c08101825260058602909201805483526001808201546001600160a01b03811685870152600160a01b900460ff169284019290925260028101546060840152600381015460808401526004015460a0830152908352909201910161090f565b5050505091505090565b6000828152602081905260409020600101546109ab8161227a565b6109b58383612287565b505050565b6000806109c86098436146ed565b90506109d660046098614701565b81101580156109ef57506109ec60026098614701565b81105b156109fc57600191505090565b600091505090565b6001600160a01b0381163314610a875760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a918282612325565b5050565b610a9d6123a4565b6000610aa76119dc565b6003546040516397adedb560e01b81523360048201529192506000916001600160a01b03909116906397adedb590602401602060405180830381865afa158015610af5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b199190614648565b6003546040517f830a053e0000000000000000000000000000000000000000000000000000000081523360048201529192506000916001600160a01b039091169063830a053e90602401602060405180830381865afa158015610b80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba49190614648565b60035460405163d1052d1f60e01b81523360048201529192506000916001600160a01b039091169063d1052d1f90602401602060405180830381865afa158015610bf2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c169190614648565b600354604051631d54805360e01b81523360048201529192506000916001600160a01b0390911690631d54805390602401602060405180830381865afa158015610c64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c889190614661565b9050610c92612061565b610cc8576040517fdc816a8700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001610cd660046098614701565b610ce091906146c4565b610ceb6098436146ed565b03610d22576040517f5baef6b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8567ffffffffffffffff168567ffffffffffffffff161115610d70576040517f50ff7c0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8567ffffffffffffffff168567ffffffffffffffff161015610dbe576040517f7a0c0fd600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600003610dde576040516273e5c360e31b815260040160405180910390fd5b610dea609860026146ad565b610df490436146c4565b8210610e1357604051630a0744c560e01b815260040160405180910390fd5b60085467ffffffffffffffff868116911614610e5357610e356004600061423d565b6008805467ffffffffffffffff191667ffffffffffffffff87161790555b60045460005b81811015610ec6578560048281548110610e7557610e75614715565b90600052602060002090600502016000015403610ebe576040517fbfec555800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101610e59565b5060046040518060e00160405280878152602001336001600160a01b031681526020016000151581526020018460ff1681526020018681526020018a8152602001600081525090806001815401808255809150506001900390600052602060002090600502016000909190919091506000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160146101000a81548160ff02191690831515021790555060608201518160010160156101000a81548160ff021916908360ff1602179055506080820151816002015560a0820151816003015560c0820151816004015550507faadc88121471799d39ee2bbe1dd30a4ab57510e2a33bd6e537de5fafd2daa8868786846040516110209392919067ffffffffffffffff939093168352602083019190915260ff16604082015260600190565b60405180910390a15050505050505050565b60008061103d6119dc565b61104890600161472b565b6007546008549192509061106e90600160401b900467ffffffffffffffff16600161472b565b67ffffffffffffffff168267ffffffffffffffff161115610670576008546000906001906110ad90600160401b900467ffffffffffffffff1685614753565b6110b79190614753565b67ffffffffffffffff16905081816040516020016110df929190918252602082015260400190565b6040516020818303038152906040528051906020012091505092915050565b6111066123a4565b61110e6123f7565b6040805160c081018252600a548152600b546001600160a01b0381166020830152600160a01b900460ff1691810191909152600c546060820152600d546080820152600e5460a0820152600654600754600091829161116e600f826146ed565b935061117b600e826146ed565b9250838310611192578261118e81614774565b9350505b6111a5866020013583876040015161223d565b6111c557604051633b5f43a360e01b815260036004820152602401610a7e565b6111d086601e612a66565b6111d986612d78565b6111e286613085565b6111f5886020013583876040015161223d565b61121557604051633b5f43a360e01b815260026004820152602401610a7e565b611229886112248660026146ad565b612a66565b61123288612d78565b61123b88613085565b61124e876020013583876040015161223d565b61126e57604051633b5f43a360e01b815260016004820152602401610a7e565b61127d876112248560026146ad565b61128687612d78565b61128f87613085565b611305848461129e8b8061478d565b60008181106112af576112af614715565b602002919091013590506112c38b8061478d565b60008181106112d4576112d4614715565b602002919091013590506112e88b8061478d565b60008181106112f9576112f9614715565b90506020020135613319565b61132f611312878061478d565b600081811061132357611323614715565b905060200201356133a6565b60015460208601516040516001600160a01b03918216602482015260009261010090049091169060440160408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f51cff8d900000000000000000000000000000000000000000000000000000000179052516113bc9190614802565b6000604051808303816000865af19150503d80600081146113f9576040519150601f19603f3d011682016040523d82523d6000602084013e6113fe565b606091505b5050905080611449576020808701516040516001600160a01b0390911681527f7ae187a0c04cf55b655ca83fa11d37854c882bf1fdcb588469b414731bb0e05a910160405180910390a15b7f788e77979e6e6a8a6a5d2c19c58b1ff9671298f54c85ac6f6aa30379aed5861a86604051611478919061481e565b60405180910390a17fbee3fc8a3523c1a65fa9308ce1f2b8fd90c24975b141b754603194597846e4dd60018054906101000a90046001600160a01b03166001600160a01b0316638a5e8e326040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115169190614648565b6040519081526020015b60405180910390a1505050505050505050565b600061153d612061565b8061157b5750600854600160401b900467ffffffffffffffff1661155f6119dc565b67ffffffffffffffff1611801561157b57506115796119e9565b155b1561158d57611588611978565b905090565b6115956119e9565b156115a257611588611032565b6115aa6109ba565b80156115d95750600854600160401b900467ffffffffffffffff166115cd6119dc565b67ffffffffffffffff16145b15611610576040517f36b7884b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b90565b6004818154811061162357600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294506001600160a01b0382169360ff600160a01b8404811694600160a81b909404169287565b600061167b6119e9565b61169857604051633788c6c160e11b815260040160405180910390fd5b60006116a26119dc565b60085490915067ffffffffffffffff808316600160401b90920416146116db57604051636fbabc7760e01b815260040160405180910390fd5b60085467ffffffffffffffff600160801b90910481169082161161171257604051630c8d9eab60e31b815260040160405180910390fd5b6000806000806000806000806117266133e4565b9050600061173261349e565b600454919650945060005b8181101561190d576004818154811061175857611758614715565b90600052602060002090600502016004015494506004818154811061177f5761177f614715565b906000526020600020906005020160010160149054906101000a900460ff1680156117cd5750600585815481106117b8576117b8614715565b90600052602060002090600502016004015487145b801561180b5750600585815481106117e7576117e7614715565b600091825260209091206001600590920201015460ff878116600160a01b90920416145b15611905576005858154811061182357611823614715565b9060005260206000209060050201600301548b611840919061486d565b9a508383604051602001611855929190614880565b60408051601f19818403018152919052805160209091012098506fffffffffffffffffffffffffffffffff808a16985061189090600161486d565b600586815481106118a3576118a3614715565b9060005260206000209060050201600301546118bf91906146ad565b6118c98c8a6146ad565b10156118f757600585815481106118e2576118e2614715565b90600052602060002090600502016000015499505b8261190181614774565b9350505b60010161173d565b505050959099149998505050505050505050565b6005818154811061193157600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294506001600160a01b03821693600160a01b90920460ff169290919086565b6000806110486119dc565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166119d257604051631d77d47760e21b815260040160405180910390fd5b6119da613657565b565b6000611588609843614701565b60006119f760026098614701565b611a026098436146ed565b10611a0d5750600190565b50600090565b611a1b6123a4565b6000611a256119dc565b6003546040516397adedb560e01b81523360048201529192506000916001600160a01b03909116906397adedb590602401602060405180830381865afa158015611a73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a979190614648565b9050611aa1611f6d565b60ff168560ff161015611ae0576040517f83d9b7bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ae86109ba565b611b1e576040517fd1088db600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085467ffffffffffffffff838116911614611b66576040517f842a9e0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085467ffffffffffffffff838116600160401b9092041614611c4e57611b8b611533565b600655611b9a6005600061425e565b600880547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff16600160401b67ffffffffffffffff8516908102919091179091556006546040805192835260208301919091527ff0ae472da9c8da86bda4991a549c03a3cb328b5f360ea11a5b8814f32bb85176910160405180910390a1611c4e600754604080516020810192909252449082015260600160408051601f198184030181529190528051602090910120600755565b6000611c5c82878787611ff2565b90506000611c6a83836136ab565b9050600060048281548110611c8157611c81614715565b600091825260208083206040805160e08101825260059094029091018054845260018101546001600160a01b0381169385019390935260ff600160a01b84048116151592850192909252600160a81b909204166060830181905260028201546080840152600382015460a084015260049091015460c0830152909250611d07908a614694565b9050611d1a82600001516006548361223d565b611d56576006546040517f14ebbbe4000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b816040015115611d92576040517fa89ac15100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160048481548110611da757611da7614715565b906000526020600020906005020160010160146101000a81548160ff02191690831515021790555060058054905060048481548110611de857611de8614715565b90600052602060002090600502016004018190555060056040518060c001604052808460000151815260200184602001516001600160a01b031681526020018b60ff16815260200184608001518152602001836002611e479190614986565b8560800151611e5691906146ad565b815260209081018b90528254600181810185556000948552938290208351600590920201908155908201519281018054604084015160ff16600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199091166001600160a01b0390951694909417939093179092556060810151600280840191909155608080830151600385015560a0909201516004909301929092558351908401517f13fc17fd71632266fe82092de6dd91a06b4fa68d8dc950492e5421cbed55a6a59289929190611f23908690614986565b8660800151611f3291906146ad565b6040805167ffffffffffffffff90951685526020850193909352918301526060820152608081018a905260ff8b1660a082015260c001611520565b6008546000908190611f929067ffffffffffffffff600160801b820481169116614753565b67ffffffffffffffff169050600060fe8211611fae5781611fb1565b60fe5b611fbc906001614995565b600b5490915060ff600160a01b9091048116908216811115611fe757611fe28282614694565b611fea565b60005b935050505090565b60408051602081018690527fff0000000000000000000000000000000000000000000000000000000000000060f886901b169181019190915260418101839052606181018290526000906081015b6040516020818303038152906040528051906020012090505b949350505050565b600061206f60046098614701565b61207a6098436146ed565b1015611a0d5750600190565b6000828152602081905260409020600101546120a18161227a565b6109b58383612325565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166120fa57604051637bfa4b9f60e01b815260040160405180910390fd5b600880547fffffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b60ff958616027fffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffff1617600160c81b93851693909302929092177fffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffff16600160d01b9190931602919091179055565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166121e157604051637bfa4b9f60e01b815260040160405180910390fd5b600955565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661223557604051631d77d47760e21b815260040160405180910390fd5b6119da613756565b60008160ff1660000361225257506001612273565b61226160ff83166101006149ae565b61226c9060026149c9565b8484181090505b9392505050565b612284813361378f565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a91576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556122e13390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610a91576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60015460ff16156119da5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a7e565b60006124016119dc565b905061240b6119e9565b61242857604051633788c6c160e11b815260040160405180910390fd5b60085467ffffffffffffffff828116600160401b909204161461245e57604051636fbabc7760e01b815260040160405180910390fd5b60085467ffffffffffffffff600160801b90910481169082161161249557604051630c8d9eab60e31b815260040160405180910390fd5b600454604051818152600091829182918291829182917f6752c5e71c95fb93bc7137adeb115a33fa4e54e2683e33d3f90c2bb1c4b6c2a59060200160405180910390a16005546040519081527f4c03de6a759749c0c9387b7014634dc5c6af610e1366023d90751c783a998f8d9060200160405180910390a161251661349e565b6040805183815260ff831660208201529295509093507f34e8eda4cd857cd2865becf58a47748f31415f4a382cbb2cc0c64b9a27c717be910160405180910390a160006125616133e4565b905060005b8281101561294e5760006004828154811061258357612583614715565b600091825260208083206040805160e08101825260059485029092018054835260018101546001600160a01b0381169484019490945260ff600160a01b85048116151592840192909252600160a81b90930416606082015260028201546080820152600382015460a082015260049091015460c0820181905282549194509291908390811061261457612614614715565b60009182526020918290206040805160c0810182526005939093029091018054835260018101546001600160a01b03811694840194909452600160a01b90930460ff1682820152600283015460608301526003830154608083015260049092015460a082015290840151909150801561269057508060a0015188145b80156126a55750806040015160ff168760ff16145b1561279a5760808101516126b9908d61486d565b9b50848b6040516020016126ce929190614880565b60408051601f19818403018152919052805160209091012099506fffffffffffffffffffffffffffffffff808b16995061270990600161486d565b816080015161271891906146ad565b6127228d8b6146ad565b101561278c578051600a556020810151600b8054604084015160ff16600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199091166001600160a01b03909316929092179190911790556060810151600c556080810151600d5560a0810151600e555b8a61279681614774565b9b50505b826040015180156127c357508060a00151881415806127c35750806040015160ff168760ff1614155b80156127e45750600854600160d01b900460ff166127e26064446146ed565b105b156128905760035460208201516001600160a01b039091169063d009b2d69061280e8a6002614986565b60085461282790609890600160c01b900460ff166146ad565b61283191906146ad565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561287757600080fd5b505af115801561288b573d6000803e3d6000fd5b505050505b82604001516129405760035460208401516001600160a01b039091169063d009b2d6906128be8a6002614986565b6008546128d790609890600160c81b900460ff166146ad565b6128e191906146ad565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561292757600080fd5b505af115801561293b573d6000803e3d6000fd5b505050505b836001019350505050612566565b506002546040517fffb98fe300000000000000000000000000000000000000000000000000000000815261ffff891660048201526000916001600160a01b03169063ffb98fe3906024016020604051808303816000875af11580156129b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129db91906149e9565b905080612a1a5760405161ffff891681527f20378e5d379eabfa30444ecc5eb2b87d0d77bdbf5a58d80d008673b0ca6421419060200160405180910390a15b50506008805467ffffffffffffffff909916600160801b027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff9099169890981790975550505050505050565b600754600090612a78906080906146ed565b90506000612adb612a8c60a086018661478d565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505050606086013584612ad360a0890160808a01614a04565b600654613802565b60408051858152602081018390529192507f94e252069a85aa79db21f5bd8ca4e14dd3a3927aa492711017a2c8ddad95af00910160405180910390a1612b63612b24858061478d565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060208601358561040061397a565b600e5414612b8e5760405163755f0a2560e01b81526001600482015260248101829052604401610a7e565b612b9b60a085018561478d565b6000818110612bac57612bac614715565b90506020020135848060400190612bc3919061478d565b6000818110612bd457612bd4614715565b9050602002013514612c035760405163755f0a2560e01b81526002600482015260248101829052604401610a7e565b600080612c1360e087018761478d565b905011612c24578460200135612c59565b612c3160e086018661478d565b6000818110612c4257612c42614715565b9050602002810190612c549190614a1f565b606001355b9050612cb7612c6b604087018761478d565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505050606087013585612cb260a08a0160808b01614a04565b61397a565b8114612ce05760405163755f0a2560e01b81526003600482015260248101839052604401610a7e565b6000612cef60e087018761478d565b90501115612d275760408051602080880135908201529081018390526060016040516020818303038152906040528051906020012091505b81612d32868061478d565b6000818110612d4357612d43614715565b9050602002013514612d715760405163755f0a2560e01b815260048181015260248101839052604401610a7e565b5050505050565b6001546000908190819061010090046001600160a01b031663c81e25ab612da260c0870187614a1f565b602001356040518263ffffffff1660e01b8152600401612dc491815260200190565b60c060405180830381865afa158015612de1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e059190614a35565b509396509194509250506001600160a01b0384169050612e6557612e2c60c0850185614a1f565b602001356040517f2396d34e000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b6000612e88612e7760c0870187614a1f565b611610906060810190604001614a04565b90506000612e968484613ae8565b9050808263ffffffff1610612eeb57612eb260c0870187614a1f565b602001356040517f1362e4a0000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b6000612f1a612efd60c0890189614a1f565b612f0e906060810190604001614a04565b60201c63ffffffff1690565b90506000612f2c886020013586613b03565b63ffffffff16905067ffffffffffffffff82168114612f8b57612f5260c0890189614a1f565b602001356040517f6dd6a24f000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b61303187612f9c60c08b018b614a1f565b612fa69080614aa3565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060208b0135612fec60c08d018d614a1f565b60200135612ffd60c08e018e614a1f565b61300e906060810190604001614a04565b61301b60c08f018f614a1f565b61302c906080810190606001614a04565b613b2a565b61307b5761304260c0890189614a1f565b602001356040517fdb12fb9d000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b5050505050505050565b61309260e082018261478d565b905060000361309e5750565b6131bf6130ae60e083018361478d565b60008181106130bf576130bf614715565b90506020028101906130d19190614a1f565b6130df906020810190614aea565b6130ec60e084018461478d565b60008181106130fd576130fd614715565b905060200281019061310f9190614a1f565b61311d906020810190614aa3565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061315f9250505060e085018561478d565b600081811061317057613170614715565b90506020028101906131829190614a1f565b6040013561319360e086018661478d565b60008181106131a4576131a4614715565b90506020028101906131b69190614a1f565b60600135613bc1565b61322c576131d060e082018261478d565b60008181106131e1576131e1614715565b90506020028101906131f39190614a1f565b606001356040517fd740df61000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b60208101356132ab61324160e084018461478d565b600081811061325257613252614715565b90506020028101906132649190614a1f565b6040013561327560e085018561478d565b600081811061328657613286614715565b90506020028101906132989190614a1f565b6132a6906020810190614aea565b613c54565b14612284576132bd60e082018261478d565b60008181106132ce576132ce614715565b90506020028101906132e09190614a1f565b606001356040517f82f2469d000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b838510156133665781831061334157604051633d386eb360e11b815260040160405180910390fd5b80821061336157604051633588c6d360e11b815260040160405180910390fd5b612d71565b82821061338657604051633d386eb360e11b815260040160405180910390fd5b808310612d7157604051633588c6d360e11b815260040160405180910390fd5b6009548110612284576040517fb6052cdf00000000000000000000000000000000000000000000000000000000815260048101829052602401610a7e565b60606133ee6119e9565b61340b57604051633788c6c160e11b815260040160405180910390fd5b60006134156119dc565b60085490915067ffffffffffffffff808316600160401b909204161461344e57604051636fbabc7760e01b815260040160405180910390fd5b6007546040516020016134899181527f3100000000000000000000000000000000000000000000000000000000000000602082015260210190565b60405160208183030381529060405291505090565b60008060008060008060008060006134b4613ca2565b60045490915060005b8181101561364657600481815481106134d8576134d8614715565b906000526020600020906005020160010160149054906101000a900460ff161561363e576004818154811061350f5761350f614715565b90600052602060002090600502016004015493506005848154811061353657613536614715565b90600052602060002090600502016003015489613553919061486d565b98508281604051602001613568929190614880565b60408051601f19818403018152919052805160209091012097506fffffffffffffffffffffffffffffffff80891697506135a390600161486d565b600585815481106135b6576135b6614715565b9060005260206000209060050201600301546135d291906146ad565b6135dc8a896146ad565b101561363e57600584815481106135f5576135f5614715565b90600052602060002090600502016004015495506005848154811061361c5761361c614715565b906000526020600020906005020160010160149054906101000a900460ff1694505b6001016134bd565b509399929850919650505050505050565b61365f6123a4565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b6000805b6004548110156137235783600482815481106136cd576136cd614715565b90600052602060002090600502016000015414801561370f5750600481815481106136fa576136fa614715565b90600052602060002090600502016003015483145b1561371b579050610670565b6001016136af565b506040517fd950091500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61375e613d2b565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa3361368e565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a91576137c081613d7d565b6137cb836020613d8f565b6040516020016137dc929190614b07565b60408051601f198184030181529082905262461bcd60e51b8252610a7e91600401614b88565b60008061381187878786613f54565b905082613916856000808267ffffffffffffffff1690506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b600882901c7eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff161790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b601082901c7dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff161790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b602082901c7bffffffff00000000ffffffff00000000ffffffff00000000ffffffff1617905080915050919050565b826040516020016139589392919092835260c09190911b77ffffffffffffffffffffffffffffffffffffffffffffffff19166020830152602882015260480190565b6040516020818303038152906040528051906020012091505095945050505050565b600080613988868686613fca565b9050613a8c836000808267ffffffffffffffff1690506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b600882901c7eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff161790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b601082901c7dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff161790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b602082901c7bffffffff00000000ffffffff00000000ffffffff00000000ffffffff1617905080915050919050565b81604051602001613ac792919060c09290921b77ffffffffffffffffffffffffffffffffffffffffffffffff19168252600882015260280190565b60405160208183030381529060405280519060200120915050949350505050565b6000613af48284614694565b60ff166001901b905092915050565b600060e083901c613b15836020614694565b60ff168163ffffffff16901c91505092915050565b600080613b3986868686614032565b90506000613b94826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050886001600160a01b0316613baa828a61407d565b6001600160a01b0316149998505050505050505050565b600080613bce84846140fc565b90506000613c29826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050866001600160a01b0316613c3f828861407d565b6001600160a01b031614979650505050505050565b60008282604051602001613c8492919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b60405160208183030381529060405280519060200120905092915050565b6060613cac6119e9565b613cc957604051633788c6c160e11b815260040160405180910390fd5b6000613cd36119dc565b60085490915067ffffffffffffffff808316600160401b9092041614613d0c57604051636fbabc7760e01b815260040160405180910390fd5b600754604051602001613489918152600360fc1b602082015260210190565b60015460ff166119da5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610a7e565b60606106706001600160a01b03831660145b60606000613d9e8360026146ad565b613da990600261486d565b67ffffffffffffffff811115613dc157613dc1614bbb565b6040519080825280601f01601f191660200182016040528015613deb576020820181803683370190505b509050600360fc1b81600081518110613e0657613e06614715565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613e5157613e51614715565b60200101906001600160f81b031916908160001a9053506000613e758460026146ad565b613e8090600161486d565b90505b6001811115613f05577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613ec157613ec1614715565b1a60f81b828281518110613ed757613ed7614715565b60200101906001600160f81b031916908160001a90535060049490941c93613efe81614bd1565b9050613e83565b5083156122735760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a7e565b8260005b8551811015613fc1576000613f6e6002866146ed565b15613f7a576000613f7d565b60015b9050613fa483888481518110613f9557613f95614715565b60200260200101518387614118565b9250600185901c9450508080613fb990614774565b915050613f58565b50949350505050565b8160005b845181101561402a576000613fe46002856146ed565b600014905061400d83878481518110613fff57613fff614715565b602002602001015183614178565b9250600184901c935050808061402290614774565b915050613fce565b509392505050565b604080516020810186905290810184905277ffffffffffffffffffffffffffffffffffffffffffffffff1960c084811b8216606084015283901b166068820152600090607001612040565b60008060008061408c856141df565b6040805160008152602081018083528b905260ff8316918101919091526060810184905260808101839052929550909350915060019060a0016020604051602081039080840390855afa1580156140e7573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b6040805160208101849052908101829052600090606001613c84565b6000821561415857604080516020810184905290810186905260608101859052608001604051602081830303815290604052805190602001209050612059565b604080516020810184905290810185905260608101869052608001612040565b600081156141b1576040805160208101869052908101849052606001604051602081830303815290604052805190602001209050612273565b5050604080516020808201939093528082019390935280518084038201815260609093019052815191012090565b6000806000835160411461421f576040517f4be6321b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505060208101516040820151606090920151909260009190911a90565b5080546000825560050290600052602060002090810190612284919061427f565b508054600082556005029060005260206000209081019061228491906142d6565b5b808211156142d25760008082556001820180547fffffffffffffffffffff0000000000000000000000000000000000000000000016905560028201819055600382018190556004820155600501614280565b5090565b5b808211156142d257600080825560018201805474ffffffffffffffffffffffffffffffffffffffffff19169055600282018190556003820181905560048201556005016142d7565b60006020828403121561433157600080fd5b81356001600160e01b03198116811461227357600080fd5b6001600160a01b038116811461228457600080fd5b60ff8116811461228457600080fd5b6000806040838503121561438057600080fd5b823561438b81614349565b9150602083013561439b8161435e565b809150509250929050565b6000602082840312156143b857600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b818110156144425761442f838551805182526001600160a01b03602082015116602083015260ff6040820151166040830152606081015160608301526080810151608083015260a081015160a08301525050565b9284019260c092909201916001016143db565b50909695505050505050565b6000806040838503121561446157600080fd5b82359150602083013561439b81614349565b803567ffffffffffffffff8116811461448b57600080fd5b919050565b600080604083850312156144a357600080fd5b823591506144b360208401614473565b90509250929050565b600061010082840312156144cf57600080fd5b50919050565b6000806000606084860312156144ea57600080fd5b833567ffffffffffffffff8082111561450257600080fd5b61450e878388016144bc565b9450602086013591508082111561452457600080fd5b614530878388016144bc565b9350604086013591508082111561454657600080fd5b50614553868287016144bc565b9150509250925092565b60008060006060848603121561457257600080fd5b833561457d8161435e565b95602085013595506040909401359392505050565b600080600080608085870312156145a857600080fd5b8435935060208501356145ba8161435e565b93969395505050506040820135916060013590565b6000806000606084860312156145e457600080fd5b83356145ef8161435e565b925060208401356145ff8161435e565b9150604084013561460f8161435e565b809150509250925092565b60008060006060848603121561462f57600080fd5b8335925060208401359150604084013561460f8161435e565b60006020828403121561465a57600080fd5b5051919050565b60006020828403121561467357600080fd5b81516122738161435e565b634e487b7160e01b600052601160045260246000fd5b60ff82811682821603908111156106705761067061467e565b80820281158282048414176106705761067061467e565b818103818111156106705761067061467e565b634e487b7160e01b600052601260045260246000fd5b6000826146fc576146fc6146d7565b500690565b600082614710576147106146d7565b500490565b634e487b7160e01b600052603260045260246000fd5b67ffffffffffffffff81811683821601908082111561474c5761474c61467e565b5092915050565b67ffffffffffffffff82811682821603908082111561474c5761474c61467e565b6000600182016147865761478661467e565b5060010190565b6000808335601e198436030181126147a457600080fd5b83018035915067ffffffffffffffff8211156147bf57600080fd5b6020019150600581901b36038213156147d757600080fd5b9250929050565b60005b838110156147f95781810151838201526020016147e1565b50506000910152565b600082516148148184602087016147de565b9190910192915050565b60c081016106708284805182526001600160a01b03602082015116602083015260ff6040820151166040830152606081015160608301526080810151608083015260a081015160a08301525050565b808201808211156106705761067061467e565b600083516148928184602088016147de565b9190910191825250602001919050565b600181815b808511156148dd5781600019048211156148c3576148c361467e565b808516156148d057918102915b93841c93908002906148a7565b509250929050565b6000826148f457506001610670565b8161490157506000610670565b816001811461491757600281146149215761493d565b6001915050610670565b60ff8411156149325761493261467e565b50506001821b610670565b5060208310610133831016604e8410600b8410161715614960575081810a610670565b61496a83836148a2565b806000190482111561497e5761497e61467e565b029392505050565b600061227360ff8416836148e5565b60ff81811683821601908111156106705761067061467e565b61ffff82811682821603908082111561474c5761474c61467e565b600061227361ffff8416836148e5565b8051801515811461448b57600080fd5b6000602082840312156149fb57600080fd5b612273826149d9565b600060208284031215614a1657600080fd5b61227382614473565b60008235607e1983360301811261481457600080fd5b60008060008060008060c08789031215614a4e57600080fd5b8651614a5981614349565b6020880151909650614a6a8161435e565b6040880151909550614a7b8161435e565b9350614a89606088016149d9565b92506080870151915060a087015190509295509295509295565b6000808335601e19843603018112614aba57600080fd5b83018035915067ffffffffffffffff821115614ad557600080fd5b6020019150368190038213156147d757600080fd5b600060208284031215614afc57600080fd5b813561227381614349565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614b3f8160178501602088016147de565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614b7c8160288401602088016147de565b01602801949350505050565b6020815260008251806020840152614ba78160408501602087016147de565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b600081614be057614be061467e565b50600019019056fea2646970667358221220e6d529c753301d40b88db1b0768955eec9895788418077bb895e8f7739fb1b6964736f6c63430008130033", "devdoc": { "author": "The Swarm Authors", "details": "Implements a Schelling Co-ordination game to form consensus around the Reserve Commitment hash. This takes place in three phases: _commit_, _reveal_ and _claim_. A node, upon establishing that it _isParticipatingInUpcomingRound_, i.e. it's overlay falls within proximity order of its reported depth with the _currentRoundAnchor_, prepares a \"reserve commitment hash\" using the chunks it currently stores in its reserve and calculates the \"storage depth\" (see Bee for details). These values, if calculated honestly, and with the right chunks stored, should be the same for every node in a neighbourhood. This is the Schelling point. Each eligible node can then use these values, together with a random, single use, secret _revealNonce_ and their _overlay_ as the pre-image values for the obsfucated _commit_, using the _wrapCommit_ method. Once the _commit_ round has elapsed, participating nodes must provide the values used to calculate their obsfucated _commit_ hash, which, once verified for correctness and proximity to the anchor are retained in the _currentReveals_. Nodes that have committed but do not reveal the correct values used to create the pre-image will have their stake \"frozen\" for a period of rounds proportional to their reported depth. During the _reveal_ round, randomness is updated after every successful reveal. Once the reveal round is concluded, the _currentRoundAnchor_ is updated and users can determine if they will be eligible their overlay will be eligible for the next commit phase using _isParticipatingInUpcomingRound_. When the _reveal_ phase has been concluded, the claim phase can begin. At this point, the truth teller and winner are already determined. By calling _isWinner_, an applicant node can run the relevant logic to determine if they have been selected as the beneficiary of this round. When calling _claim_, the current pot from the PostageStamp contract is withdrawn and transferred to that beneficiaries address. Nodes that have revealed values that differ from the truth, have their stakes \"frozen\" for a period of rounds proportional to their reported depth.", @@ -1610,7 +1616,7 @@ "ChunkCount(uint256)": { "details": "Emit from Postagestamp contract valid chunk count at the end of claim" }, - "Committed(uint256,bytes32)": { + "Committed(uint256,bytes32,uint8)": { "details": "Logs that an overlay has committed" }, "CountCommits(uint256)": { @@ -1824,7 +1830,7 @@ "label": "PostageContract", "offset": 1, "slot": "1", - "type": "t_contract(IPostageStamp)11335" + "type": "t_contract(IPostageStamp)11338" }, { "astId": 7299, @@ -1967,7 +1973,7 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(IPostageStamp)11335": { + "t_contract(IPostageStamp)11338": { "encoding": "inplace", "label": "contract IPostageStamp", "numberOfBytes": "20" diff --git a/testnet_deployed.json b/testnet_deployed.json index 45db7987..11352b76 100644 --- a/testnet_deployed.json +++ b/testnet_deployed.json @@ -3275,6 +3275,12 @@ "internalType": "bytes32", "name": "overlay", "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "height", + "type": "uint8" } ], "name": "Committed", @@ -4557,10 +4563,10 @@ "type": "function" } ], - "bytecode": "0x60806040526008805462ffffff60c01b19166264020160c01b1790557dba1914b54e0348a1028d1a103a95ed55c4004b9d332400000000000000006009553480156200004a57600080fd5b5060405162004e0838038062004e088339810160408190526200006d916200019d565b60018054600380546001600160a01b03199081166001600160a01b03888116919091179092556001600160a81b0319909216610100868316021790925560028054909116918316919091179055620000c7600033620000d0565b505050620001e7565b620000dc8282620000e0565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000dc576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200013c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b80516001600160a01b03811681146200019857600080fd5b919050565b600080600060608486031215620001b357600080fd5b620001be8462000180565b9250620001ce6020850162000180565b9150620001de6040850162000180565b90509250925092565b614c1180620001f76000396000f3fe608060405234801561001057600080fd5b50600436106102775760003560e01c806377c75d1011610160578063b6cd5822116100d8578063dfbf53ae1161008c578063f69ee1d111610071578063f69ee1d1146105df578063f7b188a5146105f2578063fb00f2f3146105fa57600080fd5b8063dfbf53ae1461059c578063f4e6fcca146105cc57600080fd5b8063ce987745116100bd578063ce9877451461056e578063d1e8b63d14610581578063d547741f1461058957600080fd5b8063b6cd582214610541578063c46b40291461055457600080fd5b80638456cb591161012f5780638d8b6428116101145780638d8b6428146104fa57806391d1485414610502578063a217fddf1461053957600080fd5b80638456cb59146104ea5780638a19c8bc146104f257600080fd5b806377c75d10146104645780637fe019c61461047757806382b39b1b1461049257806383220626146104e257600080fd5b80635c975abb116101f357806364c34a85116101c257806369da9114116101a757806369da9114146103de5780636f94aaf2146103f157806372286cba1461040c57600080fd5b806364c34a85146103a957806369bfac01146103b157600080fd5b80635c975abb146103705780635d4844ea1461037b57806362fd29ae1461038e57806363f5cf7c1461039657600080fd5b80632a4e62491161024a5780632f3906da1161022f5780632f3906da1461034257806336568abe1461034a5780635838d6731461035d57600080fd5b80632a4e6249146103185780632f2ff15d1461032d57600080fd5b806301ffc9a71461027c5780631736d472146102a457806318350096146102b7578063248a9ca3146102e7575b600080fd5b61028f61028a366004614312565b61060d565b60405190151581526020015b60405180910390f35b61028f6102b2366004614360565b610676565b6001546102cf9061010090046001600160a01b031681565b6040516001600160a01b03909116815260200161029b565b61030a6102f5366004614399565b60009081526020819052604090206001015490565b60405190815260200161029b565b610320610883565b60405161029b91906143b2565b61034061033b366004614441565b610990565b005b61028f6109ba565b610340610358366004614441565b610a04565b61034061036b366004614483565b610a95565b60015460ff1661028f565b6003546102cf906001600160a01b031681565b61030a611025565b6103406103a43660046144c8565b6110f1565b61030a611526565b6008546103c59067ffffffffffffffff1681565b60405167ffffffffffffffff909116815260200161029b565b6002546102cf906001600160a01b031681565b6008546103c590600160801b900467ffffffffffffffff1681565b61041f61041a366004614399565b611606565b604080519788526001600160a01b0390961660208801529315159486019490945260ff9091166060850152608084015260a083019190915260c082015260e00161029b565b61028f610472366004614399565b611664565b6008546103c590600160401b900467ffffffffffffffff1681565b6104a56104a0366004614399565b611914565b604080519687526001600160a01b03909516602087015260ff909316938501939093526060840152608083019190915260a082015260c00161029b565b61030a61196b565b610340611976565b6103c56119cf565b61028f6119dc565b61028f610510366004614441565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61030a600081565b61034061054f366004614550565b611a06565b61055c611f60565b60405160ff909116815260200161029b565b61030a61057c366004614585565b611fe5565b61028f612054565b610340610597366004614441565b612079565b600a54600b54600c54600d54600e546104a594936001600160a01b03811693600160a01b90910460ff1692909186565b6103406105da3660046145c2565b61209e565b6103406105ed366004614399565b612185565b6103406121d9565b61028f61060836600461460d565b612230565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061067057507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b60035460405163d1052d1f60e01b81526001600160a01b038481166004830152600092839291169063d1052d1f90602401602060405180830381865afa1580156106c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e8919061463b565b600354604051631d54805360e01b81526001600160a01b03878116600483015292935060009290911690631d54805390602401602060405180830381865afa158015610738573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075c9190614654565b6107669085614687565b90506107706109ba565b156107a7576040517fe2586bcc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816000036107c7576040516273e5c360e31b815260040160405180910390fd5b6107d3609860026146a0565b6107dd90436146b7565b82106107fc57604051630a0744c560e01b815260040160405180910390fd5b6003546040516397adedb560e01b81526001600160a01b03878116600483015261087a9216906397adedb590602401602060405180830381865afa158015610848573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086c919061463b565b610874611526565b83612230565b95945050505050565b606061088d6119dc565b6108aa57604051633788c6c160e11b815260040160405180910390fd5b60006108b46119cf565b60085490915067ffffffffffffffff808316600160401b90920416146108ed57604051636fbabc7760e01b815260040160405180910390fd5b6005805480602002602001604051908101604052809291908181526020016000905b828210156109865760008481526020908190206040805160c08101825260058602909201805483526001808201546001600160a01b03811685870152600160a01b900460ff169284019290925260028101546060840152600381015460808401526004015460a0830152908352909201910161090f565b5050505091505090565b6000828152602081905260409020600101546109ab8161226d565b6109b5838361227a565b505050565b6000806109c86098436146e0565b90506109d6600460986146f4565b81101580156109ef57506109ec600260986146f4565b81105b156109fc57600191505090565b600091505090565b6001600160a01b0381163314610a875760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a918282612318565b5050565b610a9d612397565b6000610aa76119cf565b6003546040516397adedb560e01b81523360048201529192506000916001600160a01b03909116906397adedb590602401602060405180830381865afa158015610af5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b19919061463b565b6003546040517f830a053e0000000000000000000000000000000000000000000000000000000081523360048201529192506000916001600160a01b039091169063830a053e90602401602060405180830381865afa158015610b80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba4919061463b565b60035460405163d1052d1f60e01b81523360048201529192506000916001600160a01b039091169063d1052d1f90602401602060405180830381865afa158015610bf2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c16919061463b565b600354604051631d54805360e01b81523360048201529192506000916001600160a01b0390911690631d54805390602401602060405180830381865afa158015610c64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c889190614654565b9050610c92612054565b610cc8576040517fdc816a8700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001610cd6600460986146f4565b610ce091906146b7565b610ceb6098436146e0565b03610d22576040517f5baef6b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8567ffffffffffffffff168567ffffffffffffffff161115610d70576040517f50ff7c0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8567ffffffffffffffff168567ffffffffffffffff161015610dbe576040517f7a0c0fd600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600003610dde576040516273e5c360e31b815260040160405180910390fd5b610dea609860026146a0565b610df490436146b7565b8210610e1357604051630a0744c560e01b815260040160405180910390fd5b60085467ffffffffffffffff868116911614610e5357610e3560046000614230565b6008805467ffffffffffffffff191667ffffffffffffffff87161790555b60045460005b81811015610ec6578560048281548110610e7557610e75614708565b90600052602060002090600502016000015403610ebe576040517fbfec555800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101610e59565b5060046040518060e00160405280878152602001336001600160a01b031681526020016000151581526020018460ff1681526020018681526020018a8152602001600081525090806001815401808255809150506001900390600052602060002090600502016000909190919091506000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160146101000a81548160ff02191690831515021790555060608201518160010160156101000a81548160ff021916908360ff1602179055506080820151816002015560a0820151816003015560c0820151816004015550507f68e0867601a98978930107aee7f425665e61edd70ca594c68ca5da9e81f84c29878660405161101392919067ffffffffffffffff929092168252602082015260400190565b60405180910390a15050505050505050565b6000806110306119cf565b61103b90600161471e565b6007546008549192509061106190600160401b900467ffffffffffffffff16600161471e565b67ffffffffffffffff168267ffffffffffffffff161115610670576008546000906001906110a090600160401b900467ffffffffffffffff1685614746565b6110aa9190614746565b67ffffffffffffffff16905081816040516020016110d2929190918252602082015260400190565b6040516020818303038152906040528051906020012091505092915050565b6110f9612397565b6111016123ea565b6040805160c081018252600a548152600b546001600160a01b0381166020830152600160a01b900460ff1691810191909152600c546060820152600d546080820152600e5460a08201526006546007546000918291611161600f826146e0565b935061116e600e826146e0565b9250838310611185578261118181614767565b9350505b6111988660200135838760400151612230565b6111b857604051633b5f43a360e01b815260036004820152602401610a7e565b6111c386601e612a59565b6111cc86612d6b565b6111d586613078565b6111e88860200135838760400151612230565b61120857604051633b5f43a360e01b815260026004820152602401610a7e565b61121c886112178660026146a0565b612a59565b61122588612d6b565b61122e88613078565b6112418760200135838760400151612230565b61126157604051633b5f43a360e01b815260016004820152602401610a7e565b611270876112178560026146a0565b61127987612d6b565b61128287613078565b6112f884846112918b80614780565b60008181106112a2576112a2614708565b602002919091013590506112b68b80614780565b60008181106112c7576112c7614708565b602002919091013590506112db8b80614780565b60008181106112ec576112ec614708565b9050602002013561330c565b6113226113058780614780565b600081811061131657611316614708565b90506020020135613399565b60015460208601516040516001600160a01b03918216602482015260009261010090049091169060440160408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f51cff8d900000000000000000000000000000000000000000000000000000000179052516113af91906147f5565b6000604051808303816000865af19150503d80600081146113ec576040519150601f19603f3d011682016040523d82523d6000602084013e6113f1565b606091505b505090508061143c576020808701516040516001600160a01b0390911681527f7ae187a0c04cf55b655ca83fa11d37854c882bf1fdcb588469b414731bb0e05a910160405180910390a15b7f788e77979e6e6a8a6a5d2c19c58b1ff9671298f54c85ac6f6aa30379aed5861a8660405161146b9190614811565b60405180910390a17fbee3fc8a3523c1a65fa9308ce1f2b8fd90c24975b141b754603194597846e4dd60018054906101000a90046001600160a01b03166001600160a01b0316638a5e8e326040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114e5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611509919061463b565b6040519081526020015b60405180910390a1505050505050505050565b6000611530612054565b8061156e5750600854600160401b900467ffffffffffffffff166115526119cf565b67ffffffffffffffff1611801561156e575061156c6119dc565b155b156115805761157b61196b565b905090565b6115886119dc565b156115955761157b611025565b61159d6109ba565b80156115cc5750600854600160401b900467ffffffffffffffff166115c06119cf565b67ffffffffffffffff16145b15611603576040517f36b7884b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b90565b6004818154811061161657600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294506001600160a01b0382169360ff600160a01b8404811694600160a81b909404169287565b600061166e6119dc565b61168b57604051633788c6c160e11b815260040160405180910390fd5b60006116956119cf565b60085490915067ffffffffffffffff808316600160401b90920416146116ce57604051636fbabc7760e01b815260040160405180910390fd5b60085467ffffffffffffffff600160801b90910481169082161161170557604051630c8d9eab60e31b815260040160405180910390fd5b6000806000806000806000806117196133d7565b90506000611725613491565b600454919650945060005b81811015611900576004818154811061174b5761174b614708565b90600052602060002090600502016004015494506004818154811061177257611772614708565b906000526020600020906005020160010160149054906101000a900460ff1680156117c05750600585815481106117ab576117ab614708565b90600052602060002090600502016004015487145b80156117fe5750600585815481106117da576117da614708565b600091825260209091206001600590920201015460ff878116600160a01b90920416145b156118f8576005858154811061181657611816614708565b9060005260206000209060050201600301548b6118339190614860565b9a508383604051602001611848929190614873565b60408051601f19818403018152919052805160209091012098506fffffffffffffffffffffffffffffffff808a169850611883906001614860565b6005868154811061189657611896614708565b9060005260206000209060050201600301546118b291906146a0565b6118bc8c8a6146a0565b10156118ea57600585815481106118d5576118d5614708565b90600052602060002090600502016000015499505b826118f481614767565b9350505b600101611730565b505050959099149998505050505050505050565b6005818154811061192457600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294506001600160a01b03821693600160a01b90920460ff169290919086565b60008061103b6119cf565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166119c557604051631d77d47760e21b815260040160405180910390fd5b6119cd61364a565b565b600061157b6098436146f4565b60006119ea600260986146f4565b6119f56098436146e0565b10611a005750600190565b50600090565b611a0e612397565b6000611a186119cf565b6003546040516397adedb560e01b81523360048201529192506000916001600160a01b03909116906397adedb590602401602060405180830381865afa158015611a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8a919061463b565b9050611a94611f60565b60ff168560ff161015611ad3576040517f83d9b7bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611adb6109ba565b611b11576040517fd1088db600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085467ffffffffffffffff838116911614611b59576040517f842a9e0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085467ffffffffffffffff838116600160401b9092041614611c4157611b7e611526565b600655611b8d60056000614251565b600880547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff16600160401b67ffffffffffffffff8516908102919091179091556006546040805192835260208301919091527ff0ae472da9c8da86bda4991a549c03a3cb328b5f360ea11a5b8814f32bb85176910160405180910390a1611c41600754604080516020810192909252449082015260600160408051601f198184030181529190528051602090910120600755565b6000611c4f82878787611fe5565b90506000611c5d838361369e565b9050600060048281548110611c7457611c74614708565b600091825260208083206040805160e08101825260059094029091018054845260018101546001600160a01b0381169385019390935260ff600160a01b84048116151592850192909252600160a81b909204166060830181905260028201546080840152600382015460a084015260049091015460c0830152909250611cfa908a614687565b9050611d0d826000015160065483612230565b611d49576006546040517f14ebbbe4000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b816040015115611d85576040517fa89ac15100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160048481548110611d9a57611d9a614708565b906000526020600020906005020160010160146101000a81548160ff02191690831515021790555060058054905060048481548110611ddb57611ddb614708565b90600052602060002090600502016004018190555060056040518060c001604052808460000151815260200184602001516001600160a01b031681526020018b60ff16815260200184608001518152602001836002611e3a9190614979565b8560800151611e4991906146a0565b815260209081018b90528254600181810185556000948552938290208351600590920201908155908201519281018054604084015160ff16600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199091166001600160a01b0390951694909417939093179092556060810151600280840191909155608080830151600385015560a0909201516004909301929092558351908401517f13fc17fd71632266fe82092de6dd91a06b4fa68d8dc950492e5421cbed55a6a59289929190611f16908690614979565b8660800151611f2591906146a0565b6040805167ffffffffffffffff90951685526020850193909352918301526060820152608081018a905260ff8b1660a082015260c001611513565b6008546000908190611f859067ffffffffffffffff600160801b820481169116614746565b67ffffffffffffffff169050600060fe8211611fa15781611fa4565b60fe5b611faf906001614988565b600b5490915060ff600160a01b9091048116908216811115611fda57611fd58282614687565b611fdd565b60005b935050505090565b60408051602081018690527fff0000000000000000000000000000000000000000000000000000000000000060f886901b169181019190915260418101839052606181018290526000906081015b6040516020818303038152906040528051906020012090505b949350505050565b6000612062600460986146f4565b61206d6098436146e0565b1015611a005750600190565b6000828152602081905260409020600101546120948161226d565b6109b58383612318565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166120ed57604051637bfa4b9f60e01b815260040160405180910390fd5b600880547fffffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b60ff958616027fffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffff1617600160c81b93851693909302929092177fffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffff16600160d01b9190931602919091179055565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166121d457604051637bfa4b9f60e01b815260040160405180910390fd5b600955565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661222857604051631d77d47760e21b815260040160405180910390fd5b6119cd613749565b60008160ff1660000361224557506001612266565b61225460ff83166101006149a1565b61225f9060026149bc565b8484181090505b9392505050565b6122778133613782565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a91576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556122d43390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610a91576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60015460ff16156119cd5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a7e565b60006123f46119cf565b90506123fe6119dc565b61241b57604051633788c6c160e11b815260040160405180910390fd5b60085467ffffffffffffffff828116600160401b909204161461245157604051636fbabc7760e01b815260040160405180910390fd5b60085467ffffffffffffffff600160801b90910481169082161161248857604051630c8d9eab60e31b815260040160405180910390fd5b600454604051818152600091829182918291829182917f6752c5e71c95fb93bc7137adeb115a33fa4e54e2683e33d3f90c2bb1c4b6c2a59060200160405180910390a16005546040519081527f4c03de6a759749c0c9387b7014634dc5c6af610e1366023d90751c783a998f8d9060200160405180910390a1612509613491565b6040805183815260ff831660208201529295509093507f34e8eda4cd857cd2865becf58a47748f31415f4a382cbb2cc0c64b9a27c717be910160405180910390a160006125546133d7565b905060005b828110156129415760006004828154811061257657612576614708565b600091825260208083206040805160e08101825260059485029092018054835260018101546001600160a01b0381169484019490945260ff600160a01b85048116151592840192909252600160a81b90930416606082015260028201546080820152600382015460a082015260049091015460c0820181905282549194509291908390811061260757612607614708565b60009182526020918290206040805160c0810182526005939093029091018054835260018101546001600160a01b03811694840194909452600160a01b90930460ff1682820152600283015460608301526003830154608083015260049092015460a082015290840151909150801561268357508060a0015188145b80156126985750806040015160ff168760ff16145b1561278d5760808101516126ac908d614860565b9b50848b6040516020016126c1929190614873565b60408051601f19818403018152919052805160209091012099506fffffffffffffffffffffffffffffffff808b1699506126fc906001614860565b816080015161270b91906146a0565b6127158d8b6146a0565b101561277f578051600a556020810151600b8054604084015160ff16600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199091166001600160a01b03909316929092179190911790556060810151600c556080810151600d5560a0810151600e555b8a61278981614767565b9b50505b826040015180156127b657508060a00151881415806127b65750806040015160ff168760ff1614155b80156127d75750600854600160d01b900460ff166127d56064446146e0565b105b156128835760035460208201516001600160a01b039091169063d009b2d6906128018a6002614979565b60085461281a90609890600160c01b900460ff166146a0565b61282491906146a0565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561286a57600080fd5b505af115801561287e573d6000803e3d6000fd5b505050505b82604001516129335760035460208401516001600160a01b039091169063d009b2d6906128b18a6002614979565b6008546128ca90609890600160c81b900460ff166146a0565b6128d491906146a0565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561291a57600080fd5b505af115801561292e573d6000803e3d6000fd5b505050505b836001019350505050612559565b506002546040517fffb98fe300000000000000000000000000000000000000000000000000000000815261ffff891660048201526000916001600160a01b03169063ffb98fe3906024016020604051808303816000875af11580156129aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ce91906149dc565b905080612a0d5760405161ffff891681527f20378e5d379eabfa30444ecc5eb2b87d0d77bdbf5a58d80d008673b0ca6421419060200160405180910390a15b50506008805467ffffffffffffffff909916600160801b027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff9099169890981790975550505050505050565b600754600090612a6b906080906146e0565b90506000612ace612a7f60a0860186614780565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505050606086013584612ac660a0890160808a016149f7565b6006546137f5565b60408051858152602081018390529192507f94e252069a85aa79db21f5bd8ca4e14dd3a3927aa492711017a2c8ddad95af00910160405180910390a1612b56612b178580614780565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060208601358561040061396d565b600e5414612b815760405163755f0a2560e01b81526001600482015260248101829052604401610a7e565b612b8e60a0850185614780565b6000818110612b9f57612b9f614708565b90506020020135848060400190612bb69190614780565b6000818110612bc757612bc7614708565b9050602002013514612bf65760405163755f0a2560e01b81526002600482015260248101829052604401610a7e565b600080612c0660e0870187614780565b905011612c17578460200135612c4c565b612c2460e0860186614780565b6000818110612c3557612c35614708565b9050602002810190612c479190614a12565b606001355b9050612caa612c5e6040870187614780565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505050606087013585612ca560a08a0160808b016149f7565b61396d565b8114612cd35760405163755f0a2560e01b81526003600482015260248101839052604401610a7e565b6000612ce260e0870187614780565b90501115612d1a5760408051602080880135908201529081018390526060016040516020818303038152906040528051906020012091505b81612d258680614780565b6000818110612d3657612d36614708565b9050602002013514612d645760405163755f0a2560e01b815260048181015260248101839052604401610a7e565b5050505050565b6001546000908190819061010090046001600160a01b031663c81e25ab612d9560c0870187614a12565b602001356040518263ffffffff1660e01b8152600401612db791815260200190565b60c060405180830381865afa158015612dd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612df89190614a28565b509396509194509250506001600160a01b0384169050612e5857612e1f60c0850185614a12565b602001356040517f2396d34e000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b6000612e7b612e6a60c0870187614a12565b6116039060608101906040016149f7565b90506000612e898484613adb565b9050808263ffffffff1610612ede57612ea560c0870187614a12565b602001356040517f1362e4a0000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b6000612f0d612ef060c0890189614a12565b612f019060608101906040016149f7565b60201c63ffffffff1690565b90506000612f1f886020013586613af6565b63ffffffff16905067ffffffffffffffff82168114612f7e57612f4560c0890189614a12565b602001356040517f6dd6a24f000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b61302487612f8f60c08b018b614a12565b612f999080614a96565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060208b0135612fdf60c08d018d614a12565b60200135612ff060c08e018e614a12565b6130019060608101906040016149f7565b61300e60c08f018f614a12565b61301f9060808101906060016149f7565b613b1d565b61306e5761303560c0890189614a12565b602001356040517fdb12fb9d000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b5050505050505050565b61308560e0820182614780565b90506000036130915750565b6131b26130a160e0830183614780565b60008181106130b2576130b2614708565b90506020028101906130c49190614a12565b6130d2906020810190614add565b6130df60e0840184614780565b60008181106130f0576130f0614708565b90506020028101906131029190614a12565b613110906020810190614a96565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506131529250505060e0850185614780565b600081811061316357613163614708565b90506020028101906131759190614a12565b6040013561318660e0860186614780565b600081811061319757613197614708565b90506020028101906131a99190614a12565b60600135613bb4565b61321f576131c360e0820182614780565b60008181106131d4576131d4614708565b90506020028101906131e69190614a12565b606001356040517fd740df61000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b602081013561329e61323460e0840184614780565b600081811061324557613245614708565b90506020028101906132579190614a12565b6040013561326860e0850185614780565b600081811061327957613279614708565b905060200281019061328b9190614a12565b613299906020810190614add565b613c47565b14612277576132b060e0820182614780565b60008181106132c1576132c1614708565b90506020028101906132d39190614a12565b606001356040517f82f2469d000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b838510156133595781831061333457604051633d386eb360e11b815260040160405180910390fd5b80821061335457604051633588c6d360e11b815260040160405180910390fd5b612d64565b82821061337957604051633d386eb360e11b815260040160405180910390fd5b808310612d6457604051633588c6d360e11b815260040160405180910390fd5b6009548110612277576040517fb6052cdf00000000000000000000000000000000000000000000000000000000815260048101829052602401610a7e565b60606133e16119dc565b6133fe57604051633788c6c160e11b815260040160405180910390fd5b60006134086119cf565b60085490915067ffffffffffffffff808316600160401b909204161461344157604051636fbabc7760e01b815260040160405180910390fd5b60075460405160200161347c9181527f3100000000000000000000000000000000000000000000000000000000000000602082015260210190565b60405160208183030381529060405291505090565b60008060008060008060008060006134a7613c95565b60045490915060005b8181101561363957600481815481106134cb576134cb614708565b906000526020600020906005020160010160149054906101000a900460ff1615613631576004818154811061350257613502614708565b90600052602060002090600502016004015493506005848154811061352957613529614708565b906000526020600020906005020160030154896135469190614860565b9850828160405160200161355b929190614873565b60408051601f19818403018152919052805160209091012097506fffffffffffffffffffffffffffffffff8089169750613596906001614860565b600585815481106135a9576135a9614708565b9060005260206000209060050201600301546135c591906146a0565b6135cf8a896146a0565b101561363157600584815481106135e8576135e8614708565b90600052602060002090600502016004015495506005848154811061360f5761360f614708565b906000526020600020906005020160010160149054906101000a900460ff1694505b6001016134b0565b509399929850919650505050505050565b613652612397565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b6000805b6004548110156137165783600482815481106136c0576136c0614708565b9060005260206000209060050201600001541480156137025750600481815481106136ed576136ed614708565b90600052602060002090600502016003015483145b1561370e579050610670565b6001016136a2565b506040517fd950091500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613751613d1e565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33613681565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a91576137b381613d70565b6137be836020613d82565b6040516020016137cf929190614afa565b60408051601f198184030181529082905262461bcd60e51b8252610a7e91600401614b7b565b60008061380487878786613f47565b905082613909856000808267ffffffffffffffff1690506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b600882901c7eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff161790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b601082901c7dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff161790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b602082901c7bffffffff00000000ffffffff00000000ffffffff00000000ffffffff1617905080915050919050565b8260405160200161394b9392919092835260c09190911b77ffffffffffffffffffffffffffffffffffffffffffffffff19166020830152602882015260480190565b6040516020818303038152906040528051906020012091505095945050505050565b60008061397b868686613fbd565b9050613a7f836000808267ffffffffffffffff1690506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b600882901c7eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff161790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b601082901c7dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff161790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b602082901c7bffffffff00000000ffffffff00000000ffffffff00000000ffffffff1617905080915050919050565b81604051602001613aba92919060c09290921b77ffffffffffffffffffffffffffffffffffffffffffffffff19168252600882015260280190565b60405160208183030381529060405280519060200120915050949350505050565b6000613ae78284614687565b60ff166001901b905092915050565b600060e083901c613b08836020614687565b60ff168163ffffffff16901c91505092915050565b600080613b2c86868686614025565b90506000613b87826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050886001600160a01b0316613b9d828a614070565b6001600160a01b0316149998505050505050505050565b600080613bc184846140ef565b90506000613c1c826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050866001600160a01b0316613c328288614070565b6001600160a01b031614979650505050505050565b60008282604051602001613c7792919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b60405160208183030381529060405280519060200120905092915050565b6060613c9f6119dc565b613cbc57604051633788c6c160e11b815260040160405180910390fd5b6000613cc66119cf565b60085490915067ffffffffffffffff808316600160401b9092041614613cff57604051636fbabc7760e01b815260040160405180910390fd5b60075460405160200161347c918152600360fc1b602082015260210190565b60015460ff166119cd5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610a7e565b60606106706001600160a01b03831660145b60606000613d918360026146a0565b613d9c906002614860565b67ffffffffffffffff811115613db457613db4614bae565b6040519080825280601f01601f191660200182016040528015613dde576020820181803683370190505b509050600360fc1b81600081518110613df957613df9614708565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613e4457613e44614708565b60200101906001600160f81b031916908160001a9053506000613e688460026146a0565b613e73906001614860565b90505b6001811115613ef8577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613eb457613eb4614708565b1a60f81b828281518110613eca57613eca614708565b60200101906001600160f81b031916908160001a90535060049490941c93613ef181614bc4565b9050613e76565b5083156122665760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a7e565b8260005b8551811015613fb4576000613f616002866146e0565b15613f6d576000613f70565b60015b9050613f9783888481518110613f8857613f88614708565b6020026020010151838761410b565b9250600185901c9450508080613fac90614767565b915050613f4b565b50949350505050565b8160005b845181101561401d576000613fd76002856146e0565b600014905061400083878481518110613ff257613ff2614708565b60200260200101518361416b565b9250600184901c935050808061401590614767565b915050613fc1565b509392505050565b604080516020810186905290810184905277ffffffffffffffffffffffffffffffffffffffffffffffff1960c084811b8216606084015283901b166068820152600090607001612033565b60008060008061407f856141d2565b6040805160008152602081018083528b905260ff8316918101919091526060810184905260808101839052929550909350915060019060a0016020604051602081039080840390855afa1580156140da573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b6040805160208101849052908101829052600090606001613c77565b6000821561414b5760408051602081018490529081018690526060810185905260800160405160208183030381529060405280519060200120905061204c565b604080516020810184905290810185905260608101869052608001612033565b600081156141a4576040805160208101869052908101849052606001604051602081830303815290604052805190602001209050612266565b5050604080516020808201939093528082019390935280518084038201815260609093019052815191012090565b60008060008351604114614212576040517f4be6321b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505060208101516040820151606090920151909260009190911a90565b50805460008255600502906000526020600020908101906122779190614272565b508054600082556005029060005260206000209081019061227791906142c9565b5b808211156142c55760008082556001820180547fffffffffffffffffffff0000000000000000000000000000000000000000000016905560028201819055600382018190556004820155600501614273565b5090565b5b808211156142c557600080825560018201805474ffffffffffffffffffffffffffffffffffffffffff19169055600282018190556003820181905560048201556005016142ca565b60006020828403121561432457600080fd5b81356001600160e01b03198116811461226657600080fd5b6001600160a01b038116811461227757600080fd5b60ff8116811461227757600080fd5b6000806040838503121561437357600080fd5b823561437e8161433c565b9150602083013561438e81614351565b809150509250929050565b6000602082840312156143ab57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b8181101561443557614422838551805182526001600160a01b03602082015116602083015260ff6040820151166040830152606081015160608301526080810151608083015260a081015160a08301525050565b9284019260c092909201916001016143ce565b50909695505050505050565b6000806040838503121561445457600080fd5b82359150602083013561438e8161433c565b803567ffffffffffffffff8116811461447e57600080fd5b919050565b6000806040838503121561449657600080fd5b823591506144a660208401614466565b90509250929050565b600061010082840312156144c257600080fd5b50919050565b6000806000606084860312156144dd57600080fd5b833567ffffffffffffffff808211156144f557600080fd5b614501878388016144af565b9450602086013591508082111561451757600080fd5b614523878388016144af565b9350604086013591508082111561453957600080fd5b50614546868287016144af565b9150509250925092565b60008060006060848603121561456557600080fd5b833561457081614351565b95602085013595506040909401359392505050565b6000806000806080858703121561459b57600080fd5b8435935060208501356145ad81614351565b93969395505050506040820135916060013590565b6000806000606084860312156145d757600080fd5b83356145e281614351565b925060208401356145f281614351565b9150604084013561460281614351565b809150509250925092565b60008060006060848603121561462257600080fd5b8335925060208401359150604084013561460281614351565b60006020828403121561464d57600080fd5b5051919050565b60006020828403121561466657600080fd5b815161226681614351565b634e487b7160e01b600052601160045260246000fd5b60ff828116828216039081111561067057610670614671565b808202811582820484141761067057610670614671565b8181038181111561067057610670614671565b634e487b7160e01b600052601260045260246000fd5b6000826146ef576146ef6146ca565b500690565b600082614703576147036146ca565b500490565b634e487b7160e01b600052603260045260246000fd5b67ffffffffffffffff81811683821601908082111561473f5761473f614671565b5092915050565b67ffffffffffffffff82811682821603908082111561473f5761473f614671565b60006001820161477957614779614671565b5060010190565b6000808335601e1984360301811261479757600080fd5b83018035915067ffffffffffffffff8211156147b257600080fd5b6020019150600581901b36038213156147ca57600080fd5b9250929050565b60005b838110156147ec5781810151838201526020016147d4565b50506000910152565b600082516148078184602087016147d1565b9190910192915050565b60c081016106708284805182526001600160a01b03602082015116602083015260ff6040820151166040830152606081015160608301526080810151608083015260a081015160a08301525050565b8082018082111561067057610670614671565b600083516148858184602088016147d1565b9190910191825250602001919050565b600181815b808511156148d05781600019048211156148b6576148b6614671565b808516156148c357918102915b93841c939080029061489a565b509250929050565b6000826148e757506001610670565b816148f457506000610670565b816001811461490a576002811461491457614930565b6001915050610670565b60ff84111561492557614925614671565b50506001821b610670565b5060208310610133831016604e8410600b8410161715614953575081810a610670565b61495d8383614895565b806000190482111561497157614971614671565b029392505050565b600061226660ff8416836148d8565b60ff818116838216019081111561067057610670614671565b61ffff82811682821603908082111561473f5761473f614671565b600061226661ffff8416836148d8565b8051801515811461447e57600080fd5b6000602082840312156149ee57600080fd5b612266826149cc565b600060208284031215614a0957600080fd5b61226682614466565b60008235607e1983360301811261480757600080fd5b60008060008060008060c08789031215614a4157600080fd5b8651614a4c8161433c565b6020880151909650614a5d81614351565b6040880151909550614a6e81614351565b9350614a7c606088016149cc565b92506080870151915060a087015190509295509295509295565b6000808335601e19843603018112614aad57600080fd5b83018035915067ffffffffffffffff821115614ac857600080fd5b6020019150368190038213156147ca57600080fd5b600060208284031215614aef57600080fd5b81356122668161433c565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614b328160178501602088016147d1565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614b6f8160288401602088016147d1565b01602801949350505050565b6020815260008251806020840152614b9a8160408501602087016147d1565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b600081614bd357614bd3614671565b50600019019056fea2646970667358221220bfb91c91c1b7acac1e1e0c04feef5d4b5547a65013c587ca7b8653505ea7ffe564736f6c63430008130033", - "address": "0x817418a474D1c6de116f1DF7613553bA95965223", - "block": 6964638, - "url": "https://sepolia.etherscan.io/address/0x817418a474D1c6de116f1DF7613553bA95965223" + "bytecode": "0x60806040526008805462ffffff60c01b19166264020160c01b1790557dba1914b54e0348a1028d1a103a95ed55c4004b9d332400000000000000006009553480156200004a57600080fd5b5060405162004e1538038062004e158339810160408190526200006d916200019d565b60018054600380546001600160a01b03199081166001600160a01b03888116919091179092556001600160a81b0319909216610100868316021790925560028054909116918316919091179055620000c7600033620000d0565b505050620001e7565b620000dc8282620000e0565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000dc576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200013c3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b80516001600160a01b03811681146200019857600080fd5b919050565b600080600060608486031215620001b357600080fd5b620001be8462000180565b9250620001ce6020850162000180565b9150620001de6040850162000180565b90509250925092565b614c1e80620001f76000396000f3fe608060405234801561001057600080fd5b50600436106102775760003560e01c806377c75d1011610160578063b6cd5822116100d8578063dfbf53ae1161008c578063f69ee1d111610071578063f69ee1d1146105df578063f7b188a5146105f2578063fb00f2f3146105fa57600080fd5b8063dfbf53ae1461059c578063f4e6fcca146105cc57600080fd5b8063ce987745116100bd578063ce9877451461056e578063d1e8b63d14610581578063d547741f1461058957600080fd5b8063b6cd582214610541578063c46b40291461055457600080fd5b80638456cb591161012f5780638d8b6428116101145780638d8b6428146104fa57806391d1485414610502578063a217fddf1461053957600080fd5b80638456cb59146104ea5780638a19c8bc146104f257600080fd5b806377c75d10146104645780637fe019c61461047757806382b39b1b1461049257806383220626146104e257600080fd5b80635c975abb116101f357806364c34a85116101c257806369da9114116101a757806369da9114146103de5780636f94aaf2146103f157806372286cba1461040c57600080fd5b806364c34a85146103a957806369bfac01146103b157600080fd5b80635c975abb146103705780635d4844ea1461037b57806362fd29ae1461038e57806363f5cf7c1461039657600080fd5b80632a4e62491161024a5780632f3906da1161022f5780632f3906da1461034257806336568abe1461034a5780635838d6731461035d57600080fd5b80632a4e6249146103185780632f2ff15d1461032d57600080fd5b806301ffc9a71461027c5780631736d472146102a457806318350096146102b7578063248a9ca3146102e7575b600080fd5b61028f61028a36600461431f565b61060d565b60405190151581526020015b60405180910390f35b61028f6102b236600461436d565b610676565b6001546102cf9061010090046001600160a01b031681565b6040516001600160a01b03909116815260200161029b565b61030a6102f53660046143a6565b60009081526020819052604090206001015490565b60405190815260200161029b565b610320610883565b60405161029b91906143bf565b61034061033b36600461444e565b610990565b005b61028f6109ba565b61034061035836600461444e565b610a04565b61034061036b366004614490565b610a95565b60015460ff1661028f565b6003546102cf906001600160a01b031681565b61030a611032565b6103406103a43660046144d5565b6110fe565b61030a611533565b6008546103c59067ffffffffffffffff1681565b60405167ffffffffffffffff909116815260200161029b565b6002546102cf906001600160a01b031681565b6008546103c590600160801b900467ffffffffffffffff1681565b61041f61041a3660046143a6565b611613565b604080519788526001600160a01b0390961660208801529315159486019490945260ff9091166060850152608084015260a083019190915260c082015260e00161029b565b61028f6104723660046143a6565b611671565b6008546103c590600160401b900467ffffffffffffffff1681565b6104a56104a03660046143a6565b611921565b604080519687526001600160a01b03909516602087015260ff909316938501939093526060840152608083019190915260a082015260c00161029b565b61030a611978565b610340611983565b6103c56119dc565b61028f6119e9565b61028f61051036600461444e565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b61030a600081565b61034061054f36600461455d565b611a13565b61055c611f6d565b60405160ff909116815260200161029b565b61030a61057c366004614592565b611ff2565b61028f612061565b61034061059736600461444e565b612086565b600a54600b54600c54600d54600e546104a594936001600160a01b03811693600160a01b90910460ff1692909186565b6103406105da3660046145cf565b6120ab565b6103406105ed3660046143a6565b612192565b6103406121e6565b61028f61060836600461461a565b61223d565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061067057507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b60035460405163d1052d1f60e01b81526001600160a01b038481166004830152600092839291169063d1052d1f90602401602060405180830381865afa1580156106c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e89190614648565b600354604051631d54805360e01b81526001600160a01b03878116600483015292935060009290911690631d54805390602401602060405180830381865afa158015610738573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075c9190614661565b6107669085614694565b90506107706109ba565b156107a7576040517fe2586bcc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816000036107c7576040516273e5c360e31b815260040160405180910390fd5b6107d3609860026146ad565b6107dd90436146c4565b82106107fc57604051630a0744c560e01b815260040160405180910390fd5b6003546040516397adedb560e01b81526001600160a01b03878116600483015261087a9216906397adedb590602401602060405180830381865afa158015610848573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086c9190614648565b610874611533565b8361223d565b95945050505050565b606061088d6119e9565b6108aa57604051633788c6c160e11b815260040160405180910390fd5b60006108b46119dc565b60085490915067ffffffffffffffff808316600160401b90920416146108ed57604051636fbabc7760e01b815260040160405180910390fd5b6005805480602002602001604051908101604052809291908181526020016000905b828210156109865760008481526020908190206040805160c08101825260058602909201805483526001808201546001600160a01b03811685870152600160a01b900460ff169284019290925260028101546060840152600381015460808401526004015460a0830152908352909201910161090f565b5050505091505090565b6000828152602081905260409020600101546109ab8161227a565b6109b58383612287565b505050565b6000806109c86098436146ed565b90506109d660046098614701565b81101580156109ef57506109ec60026098614701565b81105b156109fc57600191505090565b600091505090565b6001600160a01b0381163314610a875760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610a918282612325565b5050565b610a9d6123a4565b6000610aa76119dc565b6003546040516397adedb560e01b81523360048201529192506000916001600160a01b03909116906397adedb590602401602060405180830381865afa158015610af5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b199190614648565b6003546040517f830a053e0000000000000000000000000000000000000000000000000000000081523360048201529192506000916001600160a01b039091169063830a053e90602401602060405180830381865afa158015610b80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba49190614648565b60035460405163d1052d1f60e01b81523360048201529192506000916001600160a01b039091169063d1052d1f90602401602060405180830381865afa158015610bf2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c169190614648565b600354604051631d54805360e01b81523360048201529192506000916001600160a01b0390911690631d54805390602401602060405180830381865afa158015610c64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c889190614661565b9050610c92612061565b610cc8576040517fdc816a8700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001610cd660046098614701565b610ce091906146c4565b610ceb6098436146ed565b03610d22576040517f5baef6b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8567ffffffffffffffff168567ffffffffffffffff161115610d70576040517f50ff7c0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8567ffffffffffffffff168567ffffffffffffffff161015610dbe576040517f7a0c0fd600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600003610dde576040516273e5c360e31b815260040160405180910390fd5b610dea609860026146ad565b610df490436146c4565b8210610e1357604051630a0744c560e01b815260040160405180910390fd5b60085467ffffffffffffffff868116911614610e5357610e356004600061423d565b6008805467ffffffffffffffff191667ffffffffffffffff87161790555b60045460005b81811015610ec6578560048281548110610e7557610e75614715565b90600052602060002090600502016000015403610ebe576040517fbfec555800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600101610e59565b5060046040518060e00160405280878152602001336001600160a01b031681526020016000151581526020018460ff1681526020018681526020018a8152602001600081525090806001815401808255809150506001900390600052602060002090600502016000909190919091506000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160146101000a81548160ff02191690831515021790555060608201518160010160156101000a81548160ff021916908360ff1602179055506080820151816002015560a0820151816003015560c0820151816004015550507faadc88121471799d39ee2bbe1dd30a4ab57510e2a33bd6e537de5fafd2daa8868786846040516110209392919067ffffffffffffffff939093168352602083019190915260ff16604082015260600190565b60405180910390a15050505050505050565b60008061103d6119dc565b61104890600161472b565b6007546008549192509061106e90600160401b900467ffffffffffffffff16600161472b565b67ffffffffffffffff168267ffffffffffffffff161115610670576008546000906001906110ad90600160401b900467ffffffffffffffff1685614753565b6110b79190614753565b67ffffffffffffffff16905081816040516020016110df929190918252602082015260400190565b6040516020818303038152906040528051906020012091505092915050565b6111066123a4565b61110e6123f7565b6040805160c081018252600a548152600b546001600160a01b0381166020830152600160a01b900460ff1691810191909152600c546060820152600d546080820152600e5460a0820152600654600754600091829161116e600f826146ed565b935061117b600e826146ed565b9250838310611192578261118e81614774565b9350505b6111a5866020013583876040015161223d565b6111c557604051633b5f43a360e01b815260036004820152602401610a7e565b6111d086601e612a66565b6111d986612d78565b6111e286613085565b6111f5886020013583876040015161223d565b61121557604051633b5f43a360e01b815260026004820152602401610a7e565b611229886112248660026146ad565b612a66565b61123288612d78565b61123b88613085565b61124e876020013583876040015161223d565b61126e57604051633b5f43a360e01b815260016004820152602401610a7e565b61127d876112248560026146ad565b61128687612d78565b61128f87613085565b611305848461129e8b8061478d565b60008181106112af576112af614715565b602002919091013590506112c38b8061478d565b60008181106112d4576112d4614715565b602002919091013590506112e88b8061478d565b60008181106112f9576112f9614715565b90506020020135613319565b61132f611312878061478d565b600081811061132357611323614715565b905060200201356133a6565b60015460208601516040516001600160a01b03918216602482015260009261010090049091169060440160408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f51cff8d900000000000000000000000000000000000000000000000000000000179052516113bc9190614802565b6000604051808303816000865af19150503d80600081146113f9576040519150601f19603f3d011682016040523d82523d6000602084013e6113fe565b606091505b5050905080611449576020808701516040516001600160a01b0390911681527f7ae187a0c04cf55b655ca83fa11d37854c882bf1fdcb588469b414731bb0e05a910160405180910390a15b7f788e77979e6e6a8a6a5d2c19c58b1ff9671298f54c85ac6f6aa30379aed5861a86604051611478919061481e565b60405180910390a17fbee3fc8a3523c1a65fa9308ce1f2b8fd90c24975b141b754603194597846e4dd60018054906101000a90046001600160a01b03166001600160a01b0316638a5e8e326040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115169190614648565b6040519081526020015b60405180910390a1505050505050505050565b600061153d612061565b8061157b5750600854600160401b900467ffffffffffffffff1661155f6119dc565b67ffffffffffffffff1611801561157b57506115796119e9565b155b1561158d57611588611978565b905090565b6115956119e9565b156115a257611588611032565b6115aa6109ba565b80156115d95750600854600160401b900467ffffffffffffffff166115cd6119dc565b67ffffffffffffffff16145b15611610576040517f36b7884b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b90565b6004818154811061162357600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294506001600160a01b0382169360ff600160a01b8404811694600160a81b909404169287565b600061167b6119e9565b61169857604051633788c6c160e11b815260040160405180910390fd5b60006116a26119dc565b60085490915067ffffffffffffffff808316600160401b90920416146116db57604051636fbabc7760e01b815260040160405180910390fd5b60085467ffffffffffffffff600160801b90910481169082161161171257604051630c8d9eab60e31b815260040160405180910390fd5b6000806000806000806000806117266133e4565b9050600061173261349e565b600454919650945060005b8181101561190d576004818154811061175857611758614715565b90600052602060002090600502016004015494506004818154811061177f5761177f614715565b906000526020600020906005020160010160149054906101000a900460ff1680156117cd5750600585815481106117b8576117b8614715565b90600052602060002090600502016004015487145b801561180b5750600585815481106117e7576117e7614715565b600091825260209091206001600590920201015460ff878116600160a01b90920416145b15611905576005858154811061182357611823614715565b9060005260206000209060050201600301548b611840919061486d565b9a508383604051602001611855929190614880565b60408051601f19818403018152919052805160209091012098506fffffffffffffffffffffffffffffffff808a16985061189090600161486d565b600586815481106118a3576118a3614715565b9060005260206000209060050201600301546118bf91906146ad565b6118c98c8a6146ad565b10156118f757600585815481106118e2576118e2614715565b90600052602060002090600502016000015499505b8261190181614774565b9350505b60010161173d565b505050959099149998505050505050505050565b6005818154811061193157600080fd5b6000918252602090912060059091020180546001820154600283015460038401546004909401549294506001600160a01b03821693600160a01b90920460ff169290919086565b6000806110486119dc565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166119d257604051631d77d47760e21b815260040160405180910390fd5b6119da613657565b565b6000611588609843614701565b60006119f760026098614701565b611a026098436146ed565b10611a0d5750600190565b50600090565b611a1b6123a4565b6000611a256119dc565b6003546040516397adedb560e01b81523360048201529192506000916001600160a01b03909116906397adedb590602401602060405180830381865afa158015611a73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a979190614648565b9050611aa1611f6d565b60ff168560ff161015611ae0576040517f83d9b7bd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611ae86109ba565b611b1e576040517fd1088db600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085467ffffffffffffffff838116911614611b66576040517f842a9e0a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60085467ffffffffffffffff838116600160401b9092041614611c4e57611b8b611533565b600655611b9a6005600061425e565b600880547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff16600160401b67ffffffffffffffff8516908102919091179091556006546040805192835260208301919091527ff0ae472da9c8da86bda4991a549c03a3cb328b5f360ea11a5b8814f32bb85176910160405180910390a1611c4e600754604080516020810192909252449082015260600160408051601f198184030181529190528051602090910120600755565b6000611c5c82878787611ff2565b90506000611c6a83836136ab565b9050600060048281548110611c8157611c81614715565b600091825260208083206040805160e08101825260059094029091018054845260018101546001600160a01b0381169385019390935260ff600160a01b84048116151592850192909252600160a81b909204166060830181905260028201546080840152600382015460a084015260049091015460c0830152909250611d07908a614694565b9050611d1a82600001516006548361223d565b611d56576006546040517f14ebbbe4000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b816040015115611d92576040517fa89ac15100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600160048481548110611da757611da7614715565b906000526020600020906005020160010160146101000a81548160ff02191690831515021790555060058054905060048481548110611de857611de8614715565b90600052602060002090600502016004018190555060056040518060c001604052808460000151815260200184602001516001600160a01b031681526020018b60ff16815260200184608001518152602001836002611e479190614986565b8560800151611e5691906146ad565b815260209081018b90528254600181810185556000948552938290208351600590920201908155908201519281018054604084015160ff16600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199091166001600160a01b0390951694909417939093179092556060810151600280840191909155608080830151600385015560a0909201516004909301929092558351908401517f13fc17fd71632266fe82092de6dd91a06b4fa68d8dc950492e5421cbed55a6a59289929190611f23908690614986565b8660800151611f3291906146ad565b6040805167ffffffffffffffff90951685526020850193909352918301526060820152608081018a905260ff8b1660a082015260c001611520565b6008546000908190611f929067ffffffffffffffff600160801b820481169116614753565b67ffffffffffffffff169050600060fe8211611fae5781611fb1565b60fe5b611fbc906001614995565b600b5490915060ff600160a01b9091048116908216811115611fe757611fe28282614694565b611fea565b60005b935050505090565b60408051602081018690527fff0000000000000000000000000000000000000000000000000000000000000060f886901b169181019190915260418101839052606181018290526000906081015b6040516020818303038152906040528051906020012090505b949350505050565b600061206f60046098614701565b61207a6098436146ed565b1015611a0d5750600190565b6000828152602081905260409020600101546120a18161227a565b6109b58383612325565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166120fa57604051637bfa4b9f60e01b815260040160405180910390fd5b600880547fffffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b60ff958616027fffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffff1617600160c81b93851693909302929092177fffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffff16600160d01b9190931602919091179055565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff166121e157604051637bfa4b9f60e01b815260040160405180910390fd5b600955565b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff1661223557604051631d77d47760e21b815260040160405180910390fd5b6119da613756565b60008160ff1660000361225257506001612273565b61226160ff83166101006149ae565b61226c9060026149c9565b8484181090505b9392505050565b612284813361378f565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a91576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556122e13390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610a91576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60015460ff16156119da5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610a7e565b60006124016119dc565b905061240b6119e9565b61242857604051633788c6c160e11b815260040160405180910390fd5b60085467ffffffffffffffff828116600160401b909204161461245e57604051636fbabc7760e01b815260040160405180910390fd5b60085467ffffffffffffffff600160801b90910481169082161161249557604051630c8d9eab60e31b815260040160405180910390fd5b600454604051818152600091829182918291829182917f6752c5e71c95fb93bc7137adeb115a33fa4e54e2683e33d3f90c2bb1c4b6c2a59060200160405180910390a16005546040519081527f4c03de6a759749c0c9387b7014634dc5c6af610e1366023d90751c783a998f8d9060200160405180910390a161251661349e565b6040805183815260ff831660208201529295509093507f34e8eda4cd857cd2865becf58a47748f31415f4a382cbb2cc0c64b9a27c717be910160405180910390a160006125616133e4565b905060005b8281101561294e5760006004828154811061258357612583614715565b600091825260208083206040805160e08101825260059485029092018054835260018101546001600160a01b0381169484019490945260ff600160a01b85048116151592840192909252600160a81b90930416606082015260028201546080820152600382015460a082015260049091015460c0820181905282549194509291908390811061261457612614614715565b60009182526020918290206040805160c0810182526005939093029091018054835260018101546001600160a01b03811694840194909452600160a01b90930460ff1682820152600283015460608301526003830154608083015260049092015460a082015290840151909150801561269057508060a0015188145b80156126a55750806040015160ff168760ff16145b1561279a5760808101516126b9908d61486d565b9b50848b6040516020016126ce929190614880565b60408051601f19818403018152919052805160209091012099506fffffffffffffffffffffffffffffffff808b16995061270990600161486d565b816080015161271891906146ad565b6127228d8b6146ad565b101561278c578051600a556020810151600b8054604084015160ff16600160a01b0274ffffffffffffffffffffffffffffffffffffffffff199091166001600160a01b03909316929092179190911790556060810151600c556080810151600d5560a0810151600e555b8a61279681614774565b9b50505b826040015180156127c357508060a00151881415806127c35750806040015160ff168760ff1614155b80156127e45750600854600160d01b900460ff166127e26064446146ed565b105b156128905760035460208201516001600160a01b039091169063d009b2d69061280e8a6002614986565b60085461282790609890600160c01b900460ff166146ad565b61283191906146ad565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561287757600080fd5b505af115801561288b573d6000803e3d6000fd5b505050505b82604001516129405760035460208401516001600160a01b039091169063d009b2d6906128be8a6002614986565b6008546128d790609890600160c81b900460ff166146ad565b6128e191906146ad565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561292757600080fd5b505af115801561293b573d6000803e3d6000fd5b505050505b836001019350505050612566565b506002546040517fffb98fe300000000000000000000000000000000000000000000000000000000815261ffff891660048201526000916001600160a01b03169063ffb98fe3906024016020604051808303816000875af11580156129b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129db91906149e9565b905080612a1a5760405161ffff891681527f20378e5d379eabfa30444ecc5eb2b87d0d77bdbf5a58d80d008673b0ca6421419060200160405180910390a15b50506008805467ffffffffffffffff909916600160801b027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff9099169890981790975550505050505050565b600754600090612a78906080906146ed565b90506000612adb612a8c60a086018661478d565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505050606086013584612ad360a0890160808a01614a04565b600654613802565b60408051858152602081018390529192507f94e252069a85aa79db21f5bd8ca4e14dd3a3927aa492711017a2c8ddad95af00910160405180910390a1612b63612b24858061478d565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060208601358561040061397a565b600e5414612b8e5760405163755f0a2560e01b81526001600482015260248101829052604401610a7e565b612b9b60a085018561478d565b6000818110612bac57612bac614715565b90506020020135848060400190612bc3919061478d565b6000818110612bd457612bd4614715565b9050602002013514612c035760405163755f0a2560e01b81526002600482015260248101829052604401610a7e565b600080612c1360e087018761478d565b905011612c24578460200135612c59565b612c3160e086018661478d565b6000818110612c4257612c42614715565b9050602002810190612c549190614a1f565b606001355b9050612cb7612c6b604087018761478d565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250505050606087013585612cb260a08a0160808b01614a04565b61397a565b8114612ce05760405163755f0a2560e01b81526003600482015260248101839052604401610a7e565b6000612cef60e087018761478d565b90501115612d275760408051602080880135908201529081018390526060016040516020818303038152906040528051906020012091505b81612d32868061478d565b6000818110612d4357612d43614715565b9050602002013514612d715760405163755f0a2560e01b815260048181015260248101839052604401610a7e565b5050505050565b6001546000908190819061010090046001600160a01b031663c81e25ab612da260c0870187614a1f565b602001356040518263ffffffff1660e01b8152600401612dc491815260200190565b60c060405180830381865afa158015612de1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e059190614a35565b509396509194509250506001600160a01b0384169050612e6557612e2c60c0850185614a1f565b602001356040517f2396d34e000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b6000612e88612e7760c0870187614a1f565b611610906060810190604001614a04565b90506000612e968484613ae8565b9050808263ffffffff1610612eeb57612eb260c0870187614a1f565b602001356040517f1362e4a0000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b6000612f1a612efd60c0890189614a1f565b612f0e906060810190604001614a04565b60201c63ffffffff1690565b90506000612f2c886020013586613b03565b63ffffffff16905067ffffffffffffffff82168114612f8b57612f5260c0890189614a1f565b602001356040517f6dd6a24f000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b61303187612f9c60c08b018b614a1f565b612fa69080614aa3565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060208b0135612fec60c08d018d614a1f565b60200135612ffd60c08e018e614a1f565b61300e906060810190604001614a04565b61301b60c08f018f614a1f565b61302c906080810190606001614a04565b613b2a565b61307b5761304260c0890189614a1f565b602001356040517fdb12fb9d000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b5050505050505050565b61309260e082018261478d565b905060000361309e5750565b6131bf6130ae60e083018361478d565b60008181106130bf576130bf614715565b90506020028101906130d19190614a1f565b6130df906020810190614aea565b6130ec60e084018461478d565b60008181106130fd576130fd614715565b905060200281019061310f9190614a1f565b61311d906020810190614aa3565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061315f9250505060e085018561478d565b600081811061317057613170614715565b90506020028101906131829190614a1f565b6040013561319360e086018661478d565b60008181106131a4576131a4614715565b90506020028101906131b69190614a1f565b60600135613bc1565b61322c576131d060e082018261478d565b60008181106131e1576131e1614715565b90506020028101906131f39190614a1f565b606001356040517fd740df61000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b60208101356132ab61324160e084018461478d565b600081811061325257613252614715565b90506020028101906132649190614a1f565b6040013561327560e085018561478d565b600081811061328657613286614715565b90506020028101906132989190614a1f565b6132a6906020810190614aea565b613c54565b14612284576132bd60e082018261478d565b60008181106132ce576132ce614715565b90506020028101906132e09190614a1f565b606001356040517f82f2469d000000000000000000000000000000000000000000000000000000008152600401610a7e91815260200190565b838510156133665781831061334157604051633d386eb360e11b815260040160405180910390fd5b80821061336157604051633588c6d360e11b815260040160405180910390fd5b612d71565b82821061338657604051633d386eb360e11b815260040160405180910390fd5b808310612d7157604051633588c6d360e11b815260040160405180910390fd5b6009548110612284576040517fb6052cdf00000000000000000000000000000000000000000000000000000000815260048101829052602401610a7e565b60606133ee6119e9565b61340b57604051633788c6c160e11b815260040160405180910390fd5b60006134156119dc565b60085490915067ffffffffffffffff808316600160401b909204161461344e57604051636fbabc7760e01b815260040160405180910390fd5b6007546040516020016134899181527f3100000000000000000000000000000000000000000000000000000000000000602082015260210190565b60405160208183030381529060405291505090565b60008060008060008060008060006134b4613ca2565b60045490915060005b8181101561364657600481815481106134d8576134d8614715565b906000526020600020906005020160010160149054906101000a900460ff161561363e576004818154811061350f5761350f614715565b90600052602060002090600502016004015493506005848154811061353657613536614715565b90600052602060002090600502016003015489613553919061486d565b98508281604051602001613568929190614880565b60408051601f19818403018152919052805160209091012097506fffffffffffffffffffffffffffffffff80891697506135a390600161486d565b600585815481106135b6576135b6614715565b9060005260206000209060050201600301546135d291906146ad565b6135dc8a896146ad565b101561363e57600584815481106135f5576135f5614715565b90600052602060002090600502016004015495506005848154811061361c5761361c614715565b906000526020600020906005020160010160149054906101000a900460ff1694505b6001016134bd565b509399929850919650505050505050565b61365f6123a4565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258335b6040516001600160a01b03909116815260200160405180910390a1565b6000805b6004548110156137235783600482815481106136cd576136cd614715565b90600052602060002090600502016000015414801561370f5750600481815481106136fa576136fa614715565b90600052602060002090600502016003015483145b1561371b579050610670565b6001016136af565b506040517fd950091500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61375e613d2b565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa3361368e565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a91576137c081613d7d565b6137cb836020613d8f565b6040516020016137dc929190614b07565b60408051601f198184030181529082905262461bcd60e51b8252610a7e91600401614b88565b60008061381187878786613f54565b905082613916856000808267ffffffffffffffff1690506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b600882901c7eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff161790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b601082901c7dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff161790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b602082901c7bffffffff00000000ffffffff00000000ffffffff00000000ffffffff1617905080915050919050565b826040516020016139589392919092835260c09190911b77ffffffffffffffffffffffffffffffffffffffffffffffff19166020830152602882015260480190565b6040516020818303038152906040528051906020012091505095945050505050565b600080613988868686613fca565b9050613a8c836000808267ffffffffffffffff1690506008817eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff16901b600882901c7eff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff161790506010817dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff16901b601082901c7dffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff0000ffff161790506020817bffffffff00000000ffffffff00000000ffffffff00000000ffffffff16901b602082901c7bffffffff00000000ffffffff00000000ffffffff00000000ffffffff1617905080915050919050565b81604051602001613ac792919060c09290921b77ffffffffffffffffffffffffffffffffffffffffffffffff19168252600882015260280190565b60405160208183030381529060405280519060200120915050949350505050565b6000613af48284614694565b60ff166001901b905092915050565b600060e083901c613b15836020614694565b60ff168163ffffffff16901c91505092915050565b600080613b3986868686614032565b90506000613b94826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050886001600160a01b0316613baa828a61407d565b6001600160a01b0316149998505050505050505050565b600080613bce84846140fc565b90506000613c29826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b9050866001600160a01b0316613c3f828861407d565b6001600160a01b031614979650505050505050565b60008282604051602001613c8492919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b60405160208183030381529060405280519060200120905092915050565b6060613cac6119e9565b613cc957604051633788c6c160e11b815260040160405180910390fd5b6000613cd36119dc565b60085490915067ffffffffffffffff808316600160401b9092041614613d0c57604051636fbabc7760e01b815260040160405180910390fd5b600754604051602001613489918152600360fc1b602082015260210190565b60015460ff166119da5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610a7e565b60606106706001600160a01b03831660145b60606000613d9e8360026146ad565b613da990600261486d565b67ffffffffffffffff811115613dc157613dc1614bbb565b6040519080825280601f01601f191660200182016040528015613deb576020820181803683370190505b509050600360fc1b81600081518110613e0657613e06614715565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613e5157613e51614715565b60200101906001600160f81b031916908160001a9053506000613e758460026146ad565b613e8090600161486d565b90505b6001811115613f05577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613ec157613ec1614715565b1a60f81b828281518110613ed757613ed7614715565b60200101906001600160f81b031916908160001a90535060049490941c93613efe81614bd1565b9050613e83565b5083156122735760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a7e565b8260005b8551811015613fc1576000613f6e6002866146ed565b15613f7a576000613f7d565b60015b9050613fa483888481518110613f9557613f95614715565b60200260200101518387614118565b9250600185901c9450508080613fb990614774565b915050613f58565b50949350505050565b8160005b845181101561402a576000613fe46002856146ed565b600014905061400d83878481518110613fff57613fff614715565b602002602001015183614178565b9250600184901c935050808061402290614774565b915050613fce565b509392505050565b604080516020810186905290810184905277ffffffffffffffffffffffffffffffffffffffffffffffff1960c084811b8216606084015283901b166068820152600090607001612040565b60008060008061408c856141df565b6040805160008152602081018083528b905260ff8316918101919091526060810184905260808101839052929550909350915060019060a0016020604051602081039080840390855afa1580156140e7573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b6040805160208101849052908101829052600090606001613c84565b6000821561415857604080516020810184905290810186905260608101859052608001604051602081830303815290604052805190602001209050612059565b604080516020810184905290810185905260608101869052608001612040565b600081156141b1576040805160208101869052908101849052606001604051602081830303815290604052805190602001209050612273565b5050604080516020808201939093528082019390935280518084038201815260609093019052815191012090565b6000806000835160411461421f576040517f4be6321b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505060208101516040820151606090920151909260009190911a90565b5080546000825560050290600052602060002090810190612284919061427f565b508054600082556005029060005260206000209081019061228491906142d6565b5b808211156142d25760008082556001820180547fffffffffffffffffffff0000000000000000000000000000000000000000000016905560028201819055600382018190556004820155600501614280565b5090565b5b808211156142d257600080825560018201805474ffffffffffffffffffffffffffffffffffffffffff19169055600282018190556003820181905560048201556005016142d7565b60006020828403121561433157600080fd5b81356001600160e01b03198116811461227357600080fd5b6001600160a01b038116811461228457600080fd5b60ff8116811461228457600080fd5b6000806040838503121561438057600080fd5b823561438b81614349565b9150602083013561439b8161435e565b809150509250929050565b6000602082840312156143b857600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b818110156144425761442f838551805182526001600160a01b03602082015116602083015260ff6040820151166040830152606081015160608301526080810151608083015260a081015160a08301525050565b9284019260c092909201916001016143db565b50909695505050505050565b6000806040838503121561446157600080fd5b82359150602083013561439b81614349565b803567ffffffffffffffff8116811461448b57600080fd5b919050565b600080604083850312156144a357600080fd5b823591506144b360208401614473565b90509250929050565b600061010082840312156144cf57600080fd5b50919050565b6000806000606084860312156144ea57600080fd5b833567ffffffffffffffff8082111561450257600080fd5b61450e878388016144bc565b9450602086013591508082111561452457600080fd5b614530878388016144bc565b9350604086013591508082111561454657600080fd5b50614553868287016144bc565b9150509250925092565b60008060006060848603121561457257600080fd5b833561457d8161435e565b95602085013595506040909401359392505050565b600080600080608085870312156145a857600080fd5b8435935060208501356145ba8161435e565b93969395505050506040820135916060013590565b6000806000606084860312156145e457600080fd5b83356145ef8161435e565b925060208401356145ff8161435e565b9150604084013561460f8161435e565b809150509250925092565b60008060006060848603121561462f57600080fd5b8335925060208401359150604084013561460f8161435e565b60006020828403121561465a57600080fd5b5051919050565b60006020828403121561467357600080fd5b81516122738161435e565b634e487b7160e01b600052601160045260246000fd5b60ff82811682821603908111156106705761067061467e565b80820281158282048414176106705761067061467e565b818103818111156106705761067061467e565b634e487b7160e01b600052601260045260246000fd5b6000826146fc576146fc6146d7565b500690565b600082614710576147106146d7565b500490565b634e487b7160e01b600052603260045260246000fd5b67ffffffffffffffff81811683821601908082111561474c5761474c61467e565b5092915050565b67ffffffffffffffff82811682821603908082111561474c5761474c61467e565b6000600182016147865761478661467e565b5060010190565b6000808335601e198436030181126147a457600080fd5b83018035915067ffffffffffffffff8211156147bf57600080fd5b6020019150600581901b36038213156147d757600080fd5b9250929050565b60005b838110156147f95781810151838201526020016147e1565b50506000910152565b600082516148148184602087016147de565b9190910192915050565b60c081016106708284805182526001600160a01b03602082015116602083015260ff6040820151166040830152606081015160608301526080810151608083015260a081015160a08301525050565b808201808211156106705761067061467e565b600083516148928184602088016147de565b9190910191825250602001919050565b600181815b808511156148dd5781600019048211156148c3576148c361467e565b808516156148d057918102915b93841c93908002906148a7565b509250929050565b6000826148f457506001610670565b8161490157506000610670565b816001811461491757600281146149215761493d565b6001915050610670565b60ff8411156149325761493261467e565b50506001821b610670565b5060208310610133831016604e8410600b8410161715614960575081810a610670565b61496a83836148a2565b806000190482111561497e5761497e61467e565b029392505050565b600061227360ff8416836148e5565b60ff81811683821601908111156106705761067061467e565b61ffff82811682821603908082111561474c5761474c61467e565b600061227361ffff8416836148e5565b8051801515811461448b57600080fd5b6000602082840312156149fb57600080fd5b612273826149d9565b600060208284031215614a1657600080fd5b61227382614473565b60008235607e1983360301811261481457600080fd5b60008060008060008060c08789031215614a4e57600080fd5b8651614a5981614349565b6020880151909650614a6a8161435e565b6040880151909550614a7b8161435e565b9350614a89606088016149d9565b92506080870151915060a087015190509295509295509295565b6000808335601e19843603018112614aba57600080fd5b83018035915067ffffffffffffffff821115614ad557600080fd5b6020019150368190038213156147d757600080fd5b600060208284031215614afc57600080fd5b813561227381614349565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614b3f8160178501602088016147de565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614b7c8160288401602088016147de565b01602801949350505050565b6020815260008251806020840152614ba78160408501602087016147de565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b600081614be057614be061467e565b50600019019056fea2646970667358221220e6d529c753301d40b88db1b0768955eec9895788418077bb895e8f7739fb1b6964736f6c63430008130033", + "address": "0xF7c43aEfD3bCC308A5515D421d51DeC6aB97EaDb", + "block": 6984307, + "url": "https://sepolia.etherscan.io/address/0xF7c43aEfD3bCC308A5515D421d51DeC6aB97EaDb" } } }