@keep-network/tbtc-v2 1.2.0-goerli.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/artifacts/.chainId +1 -1
  2. package/artifacts/Bank.json +23 -23
  3. package/artifacts/Bridge.json +27 -63
  4. package/artifacts/BridgeGovernance.json +25 -25
  5. package/artifacts/BridgeGovernanceParameters.json +10 -10
  6. package/artifacts/Deposit.json +14 -14
  7. package/artifacts/DepositSweep.json +13 -13
  8. package/artifacts/DonationVault.json +14 -14
  9. package/artifacts/Fraud.json +13 -13
  10. package/artifacts/LightRelay.json +65 -55
  11. package/artifacts/MaintainerProxy.json +47 -47
  12. package/artifacts/MovingFunds.json +13 -13
  13. package/artifacts/Redemption.json +13 -13
  14. package/artifacts/TBTC.json +36 -37
  15. package/artifacts/TBTCVault.json +47 -47
  16. package/artifacts/VendingMachine.json +34 -35
  17. package/artifacts/VendingMachineV2.json +360 -0
  18. package/artifacts/VendingMachineV3.json +405 -0
  19. package/artifacts/Wallets.json +13 -13
  20. package/artifacts/solcInputs/7cc3eda3cb3ff2522d18b5e7b31ea228.json +102 -0
  21. package/artifacts/solcInputs/802132f7da69a8a4226cb9424480847b.json +218 -0
  22. package/artifacts/solcInputs/{f862bd134ddc06352fa5be0644481600.json → 887fad6b16575ba42183543c324eeb0e.json} +6 -6
  23. package/artifacts/solcInputs/b0025f1f7efe4824592ac0c9793776c3.json +392 -0
  24. package/artifacts/solcInputs/{deff85fc9ae9b5be07226c67809262df.json → fccb130292c8c7cc958ab4fa31a3e180.json} +3 -3
  25. package/build/contracts/GovernanceUtils.sol/GovernanceUtils.dbg.json +1 -1
  26. package/build/contracts/bank/Bank.sol/Bank.dbg.json +1 -1
  27. package/build/contracts/bank/IReceiveBalanceApproval.sol/IReceiveBalanceApproval.dbg.json +1 -1
  28. package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.dbg.json +1 -1
  29. package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.json +2 -2
  30. package/build/contracts/bridge/Bridge.sol/Bridge.dbg.json +1 -1
  31. package/build/contracts/bridge/Bridge.sol/Bridge.json +2 -2
  32. package/build/contracts/bridge/BridgeGovernance.sol/BridgeGovernance.dbg.json +1 -1
  33. package/build/contracts/bridge/BridgeGovernance.sol/BridgeGovernance.json +2 -2
  34. package/build/contracts/bridge/BridgeGovernanceParameters.sol/BridgeGovernanceParameters.dbg.json +1 -1
  35. package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +1 -1
  36. package/build/contracts/bridge/BridgeState.sol/BridgeState.json +2 -2
  37. package/build/contracts/bridge/Deposit.sol/Deposit.dbg.json +1 -1
  38. package/build/contracts/bridge/Deposit.sol/Deposit.json +2 -2
  39. package/build/contracts/bridge/DepositSweep.sol/DepositSweep.dbg.json +1 -1
  40. package/build/contracts/bridge/DepositSweep.sol/DepositSweep.json +2 -2
  41. package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.dbg.json +1 -1
  42. package/build/contracts/bridge/Fraud.sol/Fraud.dbg.json +1 -1
  43. package/build/contracts/bridge/Fraud.sol/Fraud.json +2 -2
  44. package/build/contracts/bridge/Heartbeat.sol/Heartbeat.dbg.json +1 -1
  45. package/build/contracts/bridge/IRelay.sol/IRelay.dbg.json +1 -1
  46. package/build/contracts/bridge/MovingFunds.sol/MovingFunds.dbg.json +1 -1
  47. package/build/contracts/bridge/MovingFunds.sol/MovingFunds.json +2 -2
  48. package/build/contracts/bridge/Redemption.sol/OutboundTx.dbg.json +1 -1
  49. package/build/contracts/bridge/Redemption.sol/OutboundTx.json +2 -2
  50. package/build/contracts/bridge/Redemption.sol/Redemption.dbg.json +1 -1
  51. package/build/contracts/bridge/Redemption.sol/Redemption.json +2 -2
  52. package/build/contracts/bridge/VendingMachine.sol/VendingMachine.dbg.json +1 -1
  53. package/build/contracts/bridge/VendingMachineV2.sol/VendingMachineV2.dbg.json +1 -1
  54. package/build/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.dbg.json +1 -1
  55. package/build/contracts/bridge/Wallets.sol/Wallets.dbg.json +1 -1
  56. package/build/contracts/bridge/Wallets.sol/Wallets.json +2 -2
  57. package/build/contracts/l2/L2TBTC.sol/L2TBTC.dbg.json +1 -1
  58. package/build/contracts/l2/L2WormholeGateway.sol/IWormholeTokenBridge.dbg.json +1 -1
  59. package/build/contracts/l2/L2WormholeGateway.sol/L2WormholeGateway.dbg.json +1 -1
  60. package/build/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.dbg.json +1 -1
  61. package/build/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.json +2 -2
  62. package/build/contracts/relay/LightRelay.sol/ILightRelay.dbg.json +1 -1
  63. package/build/contracts/relay/LightRelay.sol/LightRelay.dbg.json +1 -1
  64. package/build/contracts/relay/LightRelay.sol/RelayUtils.dbg.json +1 -1
  65. package/build/contracts/token/TBTC.sol/TBTC.dbg.json +1 -1
  66. package/build/contracts/vault/DonationVault.sol/DonationVault.dbg.json +1 -1
  67. package/build/contracts/vault/IVault.sol/IVault.dbg.json +1 -1
  68. package/build/contracts/vault/TBTCOptimisticMinting.sol/TBTCOptimisticMinting.dbg.json +1 -1
  69. package/build/contracts/vault/TBTCVault.sol/TBTCVault.dbg.json +1 -1
  70. package/build/contracts/vault/TBTCVault.sol/TBTCVault.json +2 -2
  71. package/export/artifacts/@keep-network/ecdsa/contracts/EcdsaDkgValidator.sol/EcdsaDkgValidator.json +29 -29
  72. package/export/artifacts/@keep-network/ecdsa/contracts/WalletRegistry.sol/WalletRegistry.json +245 -245
  73. package/export/artifacts/@keep-network/ecdsa/contracts/libraries/EcdsaDkg.sol/EcdsaDkg.json +7 -7
  74. package/export/artifacts/@keep-network/ecdsa/contracts/libraries/EcdsaInactivity.sol/EcdsaInactivity.json +28 -28
  75. package/export/artifacts/@keep-network/random-beacon/contracts/ReimbursementPool.sol/ReimbursementPool.json +53 -53
  76. package/export/artifacts/@keep-network/sortition-pools/contracts/Chaosnet.sol/Chaosnet.json +21 -21
  77. package/export/artifacts/@keep-network/sortition-pools/contracts/Rewards.sol/Rewards.json +16 -16
  78. package/export/artifacts/@keep-network/sortition-pools/contracts/SortitionPool.sol/SortitionPool.json +1054 -1054
  79. package/export/artifacts/@keep-network/sortition-pools/contracts/SortitionTree.sol/SortitionTree.json +26 -26
  80. package/export/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.json +46 -46
  81. package/export/artifacts/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol/ProxyAdmin.json +36 -36
  82. package/export/artifacts/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json +78 -78
  83. package/export/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.json +68 -68
  84. package/export/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol/ERC20Upgradeable.json +43 -43
  85. package/export/artifacts/@thesis/solidity-contracts/contracts/token/ERC20WithPermit.sol/ERC20WithPermit.json +79 -79
  86. package/export/artifacts/@thesis/solidity-contracts/contracts/token/MisfundRecovery.sol/MisfundRecovery.json +42 -42
  87. package/export/artifacts/contracts/bank/Bank.sol/Bank.json +77 -77
  88. package/export/artifacts/contracts/bridge/Bridge.sol/Bridge.json +325 -325
  89. package/export/artifacts/contracts/bridge/BridgeGovernance.sol/BridgeGovernance.json +223 -223
  90. package/export/artifacts/contracts/bridge/VendingMachine.sol/VendingMachine.json +108 -108
  91. package/export/artifacts/contracts/bridge/VendingMachineV2.sol/VendingMachineV2.json +63 -63
  92. package/export/artifacts/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.json +65 -65
  93. package/export/artifacts/contracts/l2/L2TBTC.sol/L2TBTC.json +194 -194
  94. package/export/artifacts/contracts/l2/L2WormholeGateway.sol/L2WormholeGateway.json +100 -100
  95. package/export/artifacts/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.json +154 -154
  96. package/export/artifacts/contracts/relay/LightRelay.sol/LightRelay.json +76 -76
  97. package/export/artifacts/contracts/token/TBTC.sol/TBTC.json +104 -104
  98. package/export/artifacts/contracts/vault/DonationVault.sol/DonationVault.json +19 -19
  99. package/export/artifacts/contracts/vault/TBTCVault.sol/TBTCVault.json +189 -189
  100. package/export/deploy/00_resolve_relay.js +83 -0
  101. package/export/deploy/01_deploy_tbtc_v2_token.js +70 -0
  102. package/export/deploy/02_deploy_vending_machine.js +84 -0
  103. package/export/deploy/03_transfer_vending_machine_roles.js +69 -0
  104. package/export/deploy/04_deploy_bank.js +73 -0
  105. package/export/deploy/05_deploy_bridge.js +178 -0
  106. package/export/deploy/06_deploy_tbtc_vault.js +80 -0
  107. package/export/deploy/07_deploy_bridge_governance.js +87 -0
  108. package/export/deploy/08_deploy_maintainer_proxy.js +80 -0
  109. package/export/deploy/09_bank_update_bridge.js +63 -0
  110. package/export/deploy/10_authorize_spv_maintainer_in_bridge.js +61 -0
  111. package/export/deploy/11_transfer_bank_ownership.js +60 -0
  112. package/export/deploy/12_transfer_bridge_governance.js +63 -0
  113. package/export/deploy/13_transfer_bridge_governance_ownership.js +60 -0
  114. package/export/deploy/14_transfer_tbtc_vault_ownership.js +60 -0
  115. package/export/deploy/15_transfer_maintainer_proxy_ownership.js +60 -0
  116. package/export/deploy/16_initialize_wallet_owner.js +63 -0
  117. package/export/deploy/16_transfer_proxy_admin_ownership.js +73 -0
  118. package/export/deploy/17_authorize_maintainer_proxy_in_bridge.js +63 -0
  119. package/export/deploy/17_transfer_proxy_admin_ownership.js +73 -0
  120. package/export/deploy/18_authorize_maintainer_proxy_in_bridge.js +63 -0
  121. package/export/deploy/18_authorize_maintainer_proxy_in_reimbursement_pool.js +63 -0
  122. package/export/deploy/19_authorize_bridge_in_reimbursement_pool.js +63 -0
  123. package/export/deploy/19_authorize_maintainer_proxy_in_reimbursement_pool.js +63 -0
  124. package/export/deploy/20_authorize_bridge_in_reimbursement_pool.js +63 -0
  125. package/export/deploy/20_deploy_proxy_admin_with_deputy.js +80 -0
  126. package/export/deploy/21_transfer_reimbursement_pool_ownership.js +60 -0
  127. package/export/deploy/22_deploy_proxy_admin_with_deputy.js +80 -0
  128. package/export/deploy/24_transfer_maintainer_proxy_ownership.js +60 -0
  129. package/export/deploy/25_transfer_proxy_admin_ownership.js +73 -0
  130. package/export/deploy/26_authorize_maintainer_proxy_in_reimbursement_pool.js +70 -0
  131. package/export/deploy/27_authorize_bridge_in_reimbursement_pool.js +70 -0
  132. package/export/deploy/28_deploy_proxy_admin_with_deputy.js +80 -0
  133. package/export/typechain/RelayStub.js +2 -0
  134. package/export/typechain/TestRelay.js +2 -0
  135. package/export/typechain/factories/BridgeGovernance__factory.js +1 -1
  136. package/export/typechain/factories/BridgeState__factory.js +1 -1
  137. package/export/typechain/factories/BridgeStub__factory.js +1 -1
  138. package/export/typechain/factories/Bridge__factory.js +1 -1
  139. package/export/typechain/factories/DepositSweep__factory.js +1 -1
  140. package/export/typechain/factories/Deposit__factory.js +1 -1
  141. package/export/typechain/factories/EcdsaAuthorization__factory.js +1 -1
  142. package/export/typechain/factories/EcdsaDkgValidator__factory.js +1 -1
  143. package/export/typechain/factories/EcdsaDkg__factory.js +1 -1
  144. package/export/typechain/factories/EcdsaInactivity__factory.js +1 -1
  145. package/export/typechain/factories/Fraud__factory.js +1 -1
  146. package/export/typechain/factories/MaintainerProxy__factory.js +1 -1
  147. package/export/typechain/factories/MovingFunds__factory.js +1 -1
  148. package/export/typechain/factories/Redemption__factory.js +1 -1
  149. package/export/typechain/factories/RelayStub__factory.js +546 -0
  150. package/export/typechain/factories/SortitionPool__factory.js +1 -1
  151. package/export/typechain/factories/SystemTestRelay__factory.js +1 -1
  152. package/export/typechain/factories/TBTCVault__factory.js +1 -1
  153. package/export/typechain/factories/TestRelay__factory.js +168 -0
  154. package/export/typechain/factories/WalletRegistry__factory.js +1 -1
  155. package/export/typechain/factories/Wallets__factory.js +1 -1
  156. package/export.json +7879 -37568
  157. package/package.json +7 -5
@@ -402,8 +402,8 @@
402
402
  "type": "function"
403
403
  }
404
404
  ],
405
- "bytecode": "0x60a060405234801561001057600080fd5b5060405161192338038061192383398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b60805161188a610099600039600081816101650152818161073b0152610d5d015261188a6000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c806389ef44b011610081578063b54a23741161005b578063b54a237414610160578063e7667aba1461019f578063e7d10d9b146101b257600080fd5b806389ef44b0146101225780639617c2a81461012a578063b2d44fce1461014d57600080fd5b80632c5c72df116100b25780632c5c72df146100f157806363b635ea146101125780636dcc64f81461011a57600080fd5b806305f8ae15146100ce578063281efe71146100e9575b600080fd5b6100d6604081565b6040519081526020015b60405180910390f35b6100d6605a81565b6101046100ff366004611238565b6101c5565b6040516100e0929190611275565b6100d6606481565b6100d6603381565b6100d6604181565b61013d6101383660046112cd565b6106ec565b60405190151581526020016100e0565b61013d61015b366004611238565b610854565b6101877f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100e0565b6101046101ad366004611312565b610a61565b61013d6101c03660046112cd565b610b9a565b6000606060406101d86020850185611360565b90501461021d57505060408051808201909152601a81527f4d616c666f726d65642067726f7570207075626c6963206b65790000000000006020820152600092909150565b36600061022d60408601866113a7565b9092509050605a61023f826064611407565b101561026b57600060405180606001604052806027815260200161180a60279139935093505050915091565b60018111156103b4576001828260008181106102895761028961141a565b905060200201602081019061029e9190611446565b60ff1610806102e05750606482826102b7600182611407565b8181106102c6576102c661141a565b90506020020160208101906102db9190611446565b60ff16115b1561030b57600060405180606001604052806024815260200161183160249139935093505050915091565b60015b818110156103b2578282828181106103285761032861141a565b905060200201602081019061033d9190611446565b60ff16838361034d600185611407565b81811061035c5761035c61141a565b90506020020160208101906103719190611446565b60ff16106103a05760006040518060600160405280602481526020016118316024913994509450505050915091565b806103aa81611468565b91505061030e565b505b600060416103c56060880188611360565b6103d0929150611497565b90506103df6060870187611360565b905060000361042c5760006040518060400160405280601681526020017f4e6f207369676e6174757265732070726f76696465640000000000000000000081525094509450505050915091565b604161043b6060880188611360565b6104469291506114ab565b1561048f5760006040518060400160405280601a81526020017f4d616c666f726d6564207369676e61747572657320617272617900000000000081525094509450505050915091565b36600061049f60808901896113a7565b90925090508281146104f15760006040518060400160405280601b81526020017f556e6578706563746564207369676e61747572657320636f756e740000000000815250965096505050505050915091565b60338310156105405760006040518060400160405280601281526020017f546f6f20666577207369676e6174757265730000000000000000000000000000815250965096505050505050915091565b606483111561058f5760006040518060400160405280601381526020017f546f6f206d616e79207369676e61747572657300000000000000000000000000815250965096505050505050915091565b6001828260008181106105a4576105a461141a565b9050602002013510806105d95750606482826105c1600182611407565b8181106105d0576105d061141a565b90506020020135115b156106245760006040518060400160405280602081526020017f436f72727570746564207369676e696e67206d656d62657220696e6469636573815250965096505050505050915091565b60015b818110156106cb578282828181106106415761064161141a565b9050602002013583836001846106579190611407565b8181106106665761066661141a565b90506020020135106106b95760006040518060400160405280602081526020017f436f72727570746564207369676e696e67206d656d62657220696e646963657381525097509750505050505050915091565b806106c381611468565b915050610627565b50600160405180602001604052806000815250965096505050505050915091565b600036816106fd60a08601866113a7565b6040517f6c2530b9000000000000000000000000000000000000000000000000000000008152606460048201526024810187905291935091506000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636c2530b990604401600060405180830381865afa15801561078a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107b2919081019061153c565b805190915082146107c9576000935050505061084e565b60005b82811015610845578181815181106107e6576107e661141a565b602002602001015163ffffffff168484838181106108065761080661141a565b905060200201602081019061081b91906115db565b63ffffffff161461083357600094505050505061084e565b8061083d81611468565b9150506107cc565b50600193505050505b92915050565b60008061086460408401846113a7565b90501115610a2057600061087b60408401846113a7565b905061088a60a08501856113a7565b610895929150611407565b67ffffffffffffffff8111156108ad576108ad6114bf565b6040519080825280602002602001820160405280156108d6578160200160208202803683370190505b50905060008060005b6108ec60a08701876113a7565b90508110156109e857600161090460408801886113a7565b858181106109145761091461141a565b90506020020160208101906109299190611446565b61093391906115f8565b60ff1681146109a75761094960a08701876113a7565b828181106109595761095961141a565b905060200201602081019061096e91906115db565b8483815181106109805761098061141a565b63ffffffff909216602092830291909101909101528161099f81611468565b9250506109d6565b60016109b660408801886113a7565b6109c1929150611407565b8310156109d657826109d281611468565b9350505b806109e081611468565b9150506108df565b508460c00135836040516020016109ff9190611611565b60405160208183030381529060405280519060200120149350505050919050565b60c0820135610a3260a08401846113a7565b604051602001610a4392919061165b565b60405160208183030381529060405280519060200120149050919050565b60006060600080610a71876101c5565b9150915081610a8757600093509150610b929050565b610a918786610b9a565b610ad85760006040518060400160405280601281526020017f496e76616c6964207369676e6174757265730000000000000000000000000000815250935093505050610b92565b610ae287876106ec565b610b295760006040518060400160405280601581526020017f496e76616c69642067726f7570206d656d626572730000000000000000000000815250935093505050610b92565b610b3287610854565b610b795760006040518060400160405280601481526020017f496e76616c6964206d656d626572732068617368000000000000000000000000815250935093505050610b92565b6001604051806020016040528060008152509350935050505b935093915050565b600080610c3146610bae6020870187611360565b610bbb60408901896113a7565b88604051602001610bd1969594939291906116a6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b9050366000610c4360808701876113a7565b909250905060008167ffffffffffffffff811115610c6357610c636114bf565b604051908082528060200260200182016040528015610c8c578160200160208202803683370190505b50905060005b82811015610d2957610ca760a08901896113a7565b6001868685818110610cbb57610cbb61141a565b90506020020135610ccc9190611407565b818110610cdb57610cdb61141a565b9050602002016020810190610cf091906115db565b828281518110610d0257610d0261141a565b63ffffffff9092166020928302919091019091015280610d2181611468565b915050610c92565b506040517ff7f9a8fa0000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f7f9a8fa90610d92908590600401611611565b600060405180830381865afa158015610daf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610dd7919081019061172d565b9050606060006041610deb8b84018c611360565b610df6929150611497565b905060005b81811015610ec557610e5e610e118260416117c9565b6041610e2060608f018f611360565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929493925050610ed69050565b92506000610e6c8985610f8b565b9050806001600160a01b0316858381518110610e8a57610e8a61141a565b60200260200101516001600160a01b031614610eb2576000995050505050505050505061084e565b5080610ebd81611468565b915050610dfb565b5060019a9950505050505050505050565b60606000610ee483856117e0565b90508381118015610ef6575080855110155b610f475760405162461bcd60e51b815260206004820152601360248201527f536c696365206f7574206f6620626f756e64730000000000000000000000000060448201526064015b60405180910390fd5b604051915082604083010160405282825283850182038460208701018481015b80821015610f8057815183830152602082019150610f67565b505050509392505050565b6000806000610f9a8585610faf565b91509150610fa781610ff4565b509392505050565b6000808251604103610fe55760208301516040840151606085015160001a610fd98782858561115c565b94509450505050610fed565b506000905060025b9250929050565b6000816004811115611008576110086117f3565b036110105750565b6001816004811115611024576110246117f3565b036110715760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610f3e565b6002816004811115611085576110856117f3565b036110d25760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610f3e565b60038160048111156110e6576110e66117f3565b036111595760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610f3e565b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156111935750600090506003611217565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156111e7573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661121057600060019250925050611217565b9150600090505b94509492505050565b600060e0828403121561123257600080fd5b50919050565b60006020828403121561124a57600080fd5b813567ffffffffffffffff81111561126157600080fd5b61126d84828501611220565b949350505050565b821515815260006020604081840152835180604085015260005b818110156112ab5785810183015185820160600152820161128f565b506000606082860101526060601f19601f830116850101925050509392505050565b600080604083850312156112e057600080fd5b823567ffffffffffffffff8111156112f757600080fd5b61130385828601611220565b95602094909401359450505050565b60008060006060848603121561132757600080fd5b833567ffffffffffffffff81111561133e57600080fd5b61134a86828701611220565b9660208601359650604090950135949350505050565b6000808335601e1984360301811261137757600080fd5b83018035915067ffffffffffffffff82111561139257600080fd5b602001915036819003821315610fed57600080fd5b6000808335601e198436030181126113be57600080fd5b83018035915067ffffffffffffffff8211156113d957600080fd5b6020019150600581901b3603821315610fed57600080fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561084e5761084e6113f1565b634e487b7160e01b600052603260045260246000fd5b803560ff8116811461144157600080fd5b919050565b60006020828403121561145857600080fd5b61146182611430565b9392505050565b60006001820161147a5761147a6113f1565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826114a6576114a6611481565b500490565b6000826114ba576114ba611481565b500690565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156114fe576114fe6114bf565b604052919050565b600067ffffffffffffffff821115611520576115206114bf565b5060051b60200190565b63ffffffff8116811461115957600080fd5b6000602080838503121561154f57600080fd5b825167ffffffffffffffff81111561156657600080fd5b8301601f8101851361157757600080fd5b805161158a61158582611506565b6114d5565b81815260059190911b820183019083810190878311156115a957600080fd5b928401925b828410156115d05783516115c18161152a565b825292840192908401906115ae565b979650505050505050565b6000602082840312156115ed57600080fd5b81356114618161152a565b60ff828116828216039081111561084e5761084e6113f1565b6020808252825182820181905260009190848201906040850190845b8181101561164f57835163ffffffff168352928401929184019160010161162d565b50909695505050505050565b60208082528181018390526000908460408401835b8681101561169b5782356116838161152a565b63ffffffff1682529183019190830190600101611670565b509695505050505050565b86815260006020608081840152866080840152868860a0850137600060a08885018101829052601f19601f8a011685018581038201604087015290810187905287919060c0015b878210156117155760ff61170084611430565b168152918301916001919091019083016116ed565b80945050505050826060830152979650505050505050565b6000602080838503121561174057600080fd5b825167ffffffffffffffff81111561175757600080fd5b8301601f8101851361176857600080fd5b805161177661158582611506565b81815260059190911b8201830190838101908783111561179557600080fd5b928401925b828410156115d05783516001600160a01b03811681146117ba5760008081fd5b8252928401929084019061179a565b808202811582820484141761084e5761084e6113f1565b8082018082111561084e5761084e6113f1565b634e487b7160e01b600052602160045260246000fdfe546f6f206d616e79206d656d62657273206d69736265686176696e6720647572696e6720444b47436f72727570746564206d697362656861766564206d656d6265727320696e6469636573a2646970667358221220da804f172d275e8dde5a51d58a2763832eb88326a25537137ad01c33759f2b8964736f6c63430008110033",
406
- "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100c95760003560e01c806389ef44b011610081578063b54a23741161005b578063b54a237414610160578063e7667aba1461019f578063e7d10d9b146101b257600080fd5b806389ef44b0146101225780639617c2a81461012a578063b2d44fce1461014d57600080fd5b80632c5c72df116100b25780632c5c72df146100f157806363b635ea146101125780636dcc64f81461011a57600080fd5b806305f8ae15146100ce578063281efe71146100e9575b600080fd5b6100d6604081565b6040519081526020015b60405180910390f35b6100d6605a81565b6101046100ff366004611238565b6101c5565b6040516100e0929190611275565b6100d6606481565b6100d6603381565b6100d6604181565b61013d6101383660046112cd565b6106ec565b60405190151581526020016100e0565b61013d61015b366004611238565b610854565b6101877f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100e0565b6101046101ad366004611312565b610a61565b61013d6101c03660046112cd565b610b9a565b6000606060406101d86020850185611360565b90501461021d57505060408051808201909152601a81527f4d616c666f726d65642067726f7570207075626c6963206b65790000000000006020820152600092909150565b36600061022d60408601866113a7565b9092509050605a61023f826064611407565b101561026b57600060405180606001604052806027815260200161180a60279139935093505050915091565b60018111156103b4576001828260008181106102895761028961141a565b905060200201602081019061029e9190611446565b60ff1610806102e05750606482826102b7600182611407565b8181106102c6576102c661141a565b90506020020160208101906102db9190611446565b60ff16115b1561030b57600060405180606001604052806024815260200161183160249139935093505050915091565b60015b818110156103b2578282828181106103285761032861141a565b905060200201602081019061033d9190611446565b60ff16838361034d600185611407565b81811061035c5761035c61141a565b90506020020160208101906103719190611446565b60ff16106103a05760006040518060600160405280602481526020016118316024913994509450505050915091565b806103aa81611468565b91505061030e565b505b600060416103c56060880188611360565b6103d0929150611497565b90506103df6060870187611360565b905060000361042c5760006040518060400160405280601681526020017f4e6f207369676e6174757265732070726f76696465640000000000000000000081525094509450505050915091565b604161043b6060880188611360565b6104469291506114ab565b1561048f5760006040518060400160405280601a81526020017f4d616c666f726d6564207369676e61747572657320617272617900000000000081525094509450505050915091565b36600061049f60808901896113a7565b90925090508281146104f15760006040518060400160405280601b81526020017f556e6578706563746564207369676e61747572657320636f756e740000000000815250965096505050505050915091565b60338310156105405760006040518060400160405280601281526020017f546f6f20666577207369676e6174757265730000000000000000000000000000815250965096505050505050915091565b606483111561058f5760006040518060400160405280601381526020017f546f6f206d616e79207369676e61747572657300000000000000000000000000815250965096505050505050915091565b6001828260008181106105a4576105a461141a565b9050602002013510806105d95750606482826105c1600182611407565b8181106105d0576105d061141a565b90506020020135115b156106245760006040518060400160405280602081526020017f436f72727570746564207369676e696e67206d656d62657220696e6469636573815250965096505050505050915091565b60015b818110156106cb578282828181106106415761064161141a565b9050602002013583836001846106579190611407565b8181106106665761066661141a565b90506020020135106106b95760006040518060400160405280602081526020017f436f72727570746564207369676e696e67206d656d62657220696e646963657381525097509750505050505050915091565b806106c381611468565b915050610627565b50600160405180602001604052806000815250965096505050505050915091565b600036816106fd60a08601866113a7565b6040517f6c2530b9000000000000000000000000000000000000000000000000000000008152606460048201526024810187905291935091506000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636c2530b990604401600060405180830381865afa15801561078a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107b2919081019061153c565b805190915082146107c9576000935050505061084e565b60005b82811015610845578181815181106107e6576107e661141a565b602002602001015163ffffffff168484838181106108065761080661141a565b905060200201602081019061081b91906115db565b63ffffffff161461083357600094505050505061084e565b8061083d81611468565b9150506107cc565b50600193505050505b92915050565b60008061086460408401846113a7565b90501115610a2057600061087b60408401846113a7565b905061088a60a08501856113a7565b610895929150611407565b67ffffffffffffffff8111156108ad576108ad6114bf565b6040519080825280602002602001820160405280156108d6578160200160208202803683370190505b50905060008060005b6108ec60a08701876113a7565b90508110156109e857600161090460408801886113a7565b858181106109145761091461141a565b90506020020160208101906109299190611446565b61093391906115f8565b60ff1681146109a75761094960a08701876113a7565b828181106109595761095961141a565b905060200201602081019061096e91906115db565b8483815181106109805761098061141a565b63ffffffff909216602092830291909101909101528161099f81611468565b9250506109d6565b60016109b660408801886113a7565b6109c1929150611407565b8310156109d657826109d281611468565b9350505b806109e081611468565b9150506108df565b508460c00135836040516020016109ff9190611611565b60405160208183030381529060405280519060200120149350505050919050565b60c0820135610a3260a08401846113a7565b604051602001610a4392919061165b565b60405160208183030381529060405280519060200120149050919050565b60006060600080610a71876101c5565b9150915081610a8757600093509150610b929050565b610a918786610b9a565b610ad85760006040518060400160405280601281526020017f496e76616c6964207369676e6174757265730000000000000000000000000000815250935093505050610b92565b610ae287876106ec565b610b295760006040518060400160405280601581526020017f496e76616c69642067726f7570206d656d626572730000000000000000000000815250935093505050610b92565b610b3287610854565b610b795760006040518060400160405280601481526020017f496e76616c6964206d656d626572732068617368000000000000000000000000815250935093505050610b92565b6001604051806020016040528060008152509350935050505b935093915050565b600080610c3146610bae6020870187611360565b610bbb60408901896113a7565b88604051602001610bd1969594939291906116a6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b9050366000610c4360808701876113a7565b909250905060008167ffffffffffffffff811115610c6357610c636114bf565b604051908082528060200260200182016040528015610c8c578160200160208202803683370190505b50905060005b82811015610d2957610ca760a08901896113a7565b6001868685818110610cbb57610cbb61141a565b90506020020135610ccc9190611407565b818110610cdb57610cdb61141a565b9050602002016020810190610cf091906115db565b828281518110610d0257610d0261141a565b63ffffffff9092166020928302919091019091015280610d2181611468565b915050610c92565b506040517ff7f9a8fa0000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f7f9a8fa90610d92908590600401611611565b600060405180830381865afa158015610daf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610dd7919081019061172d565b9050606060006041610deb8b84018c611360565b610df6929150611497565b905060005b81811015610ec557610e5e610e118260416117c9565b6041610e2060608f018f611360565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929493925050610ed69050565b92506000610e6c8985610f8b565b9050806001600160a01b0316858381518110610e8a57610e8a61141a565b60200260200101516001600160a01b031614610eb2576000995050505050505050505061084e565b5080610ebd81611468565b915050610dfb565b5060019a9950505050505050505050565b60606000610ee483856117e0565b90508381118015610ef6575080855110155b610f475760405162461bcd60e51b815260206004820152601360248201527f536c696365206f7574206f6620626f756e64730000000000000000000000000060448201526064015b60405180910390fd5b604051915082604083010160405282825283850182038460208701018481015b80821015610f8057815183830152602082019150610f67565b505050509392505050565b6000806000610f9a8585610faf565b91509150610fa781610ff4565b509392505050565b6000808251604103610fe55760208301516040840151606085015160001a610fd98782858561115c565b94509450505050610fed565b506000905060025b9250929050565b6000816004811115611008576110086117f3565b036110105750565b6001816004811115611024576110246117f3565b036110715760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610f3e565b6002816004811115611085576110856117f3565b036110d25760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610f3e565b60038160048111156110e6576110e66117f3565b036111595760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610f3e565b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156111935750600090506003611217565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156111e7573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661121057600060019250925050611217565b9150600090505b94509492505050565b600060e0828403121561123257600080fd5b50919050565b60006020828403121561124a57600080fd5b813567ffffffffffffffff81111561126157600080fd5b61126d84828501611220565b949350505050565b821515815260006020604081840152835180604085015260005b818110156112ab5785810183015185820160600152820161128f565b506000606082860101526060601f19601f830116850101925050509392505050565b600080604083850312156112e057600080fd5b823567ffffffffffffffff8111156112f757600080fd5b61130385828601611220565b95602094909401359450505050565b60008060006060848603121561132757600080fd5b833567ffffffffffffffff81111561133e57600080fd5b61134a86828701611220565b9660208601359650604090950135949350505050565b6000808335601e1984360301811261137757600080fd5b83018035915067ffffffffffffffff82111561139257600080fd5b602001915036819003821315610fed57600080fd5b6000808335601e198436030181126113be57600080fd5b83018035915067ffffffffffffffff8211156113d957600080fd5b6020019150600581901b3603821315610fed57600080fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561084e5761084e6113f1565b634e487b7160e01b600052603260045260246000fd5b803560ff8116811461144157600080fd5b919050565b60006020828403121561145857600080fd5b61146182611430565b9392505050565b60006001820161147a5761147a6113f1565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826114a6576114a6611481565b500490565b6000826114ba576114ba611481565b500690565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156114fe576114fe6114bf565b604052919050565b600067ffffffffffffffff821115611520576115206114bf565b5060051b60200190565b63ffffffff8116811461115957600080fd5b6000602080838503121561154f57600080fd5b825167ffffffffffffffff81111561156657600080fd5b8301601f8101851361157757600080fd5b805161158a61158582611506565b6114d5565b81815260059190911b820183019083810190878311156115a957600080fd5b928401925b828410156115d05783516115c18161152a565b825292840192908401906115ae565b979650505050505050565b6000602082840312156115ed57600080fd5b81356114618161152a565b60ff828116828216039081111561084e5761084e6113f1565b6020808252825182820181905260009190848201906040850190845b8181101561164f57835163ffffffff168352928401929184019160010161162d565b50909695505050505050565b60208082528181018390526000908460408401835b8681101561169b5782356116838161152a565b63ffffffff1682529183019190830190600101611670565b509695505050505050565b86815260006020608081840152866080840152868860a0850137600060a08885018101829052601f19601f8a011685018581038201604087015290810187905287919060c0015b878210156117155760ff61170084611430565b168152918301916001919091019083016116ed565b80945050505050826060830152979650505050505050565b6000602080838503121561174057600080fd5b825167ffffffffffffffff81111561175757600080fd5b8301601f8101851361176857600080fd5b805161177661158582611506565b81815260059190911b8201830190838101908783111561179557600080fd5b928401925b828410156115d05783516001600160a01b03811681146117ba5760008081fd5b8252928401929084019061179a565b808202811582820484141761084e5761084e6113f1565b8082018082111561084e5761084e6113f1565b634e487b7160e01b600052602160045260246000fdfe546f6f206d616e79206d656d62657273206d69736265686176696e6720647572696e6720444b47436f72727570746564206d697362656861766564206d656d6265727320696e6469636573a2646970667358221220da804f172d275e8dde5a51d58a2763832eb88326a25537137ad01c33759f2b8964736f6c63430008110033",
405
+ "bytecode": "0x60a060405234801561001057600080fd5b5060405161192338038061192383398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b60805161188a610099600039600081816101650152818161073b0152610d5d015261188a6000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c806389ef44b011610081578063b54a23741161005b578063b54a237414610160578063e7667aba1461019f578063e7d10d9b146101b257600080fd5b806389ef44b0146101225780639617c2a81461012a578063b2d44fce1461014d57600080fd5b80632c5c72df116100b25780632c5c72df146100f157806363b635ea146101125780636dcc64f81461011a57600080fd5b806305f8ae15146100ce578063281efe71146100e9575b600080fd5b6100d6604081565b6040519081526020015b60405180910390f35b6100d6605a81565b6101046100ff366004611238565b6101c5565b6040516100e0929190611275565b6100d6606481565b6100d6603381565b6100d6604181565b61013d6101383660046112cd565b6106ec565b60405190151581526020016100e0565b61013d61015b366004611238565b610854565b6101877f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100e0565b6101046101ad366004611312565b610a61565b61013d6101c03660046112cd565b610b9a565b6000606060406101d86020850185611360565b90501461021d57505060408051808201909152601a81527f4d616c666f726d65642067726f7570207075626c6963206b65790000000000006020820152600092909150565b36600061022d60408601866113a7565b9092509050605a61023f826064611407565b101561026b57600060405180606001604052806027815260200161180a60279139935093505050915091565b60018111156103b4576001828260008181106102895761028961141a565b905060200201602081019061029e9190611446565b60ff1610806102e05750606482826102b7600182611407565b8181106102c6576102c661141a565b90506020020160208101906102db9190611446565b60ff16115b1561030b57600060405180606001604052806024815260200161183160249139935093505050915091565b60015b818110156103b2578282828181106103285761032861141a565b905060200201602081019061033d9190611446565b60ff16838361034d600185611407565b81811061035c5761035c61141a565b90506020020160208101906103719190611446565b60ff16106103a05760006040518060600160405280602481526020016118316024913994509450505050915091565b806103aa81611468565b91505061030e565b505b600060416103c56060880188611360565b6103d0929150611497565b90506103df6060870187611360565b905060000361042c5760006040518060400160405280601681526020017f4e6f207369676e6174757265732070726f76696465640000000000000000000081525094509450505050915091565b604161043b6060880188611360565b6104469291506114ab565b1561048f5760006040518060400160405280601a81526020017f4d616c666f726d6564207369676e61747572657320617272617900000000000081525094509450505050915091565b36600061049f60808901896113a7565b90925090508281146104f15760006040518060400160405280601b81526020017f556e6578706563746564207369676e61747572657320636f756e740000000000815250965096505050505050915091565b60338310156105405760006040518060400160405280601281526020017f546f6f20666577207369676e6174757265730000000000000000000000000000815250965096505050505050915091565b606483111561058f5760006040518060400160405280601381526020017f546f6f206d616e79207369676e61747572657300000000000000000000000000815250965096505050505050915091565b6001828260008181106105a4576105a461141a565b9050602002013510806105d95750606482826105c1600182611407565b8181106105d0576105d061141a565b90506020020135115b156106245760006040518060400160405280602081526020017f436f72727570746564207369676e696e67206d656d62657220696e6469636573815250965096505050505050915091565b60015b818110156106cb578282828181106106415761064161141a565b9050602002013583836001846106579190611407565b8181106106665761066661141a565b90506020020135106106b95760006040518060400160405280602081526020017f436f72727570746564207369676e696e67206d656d62657220696e646963657381525097509750505050505050915091565b806106c381611468565b915050610627565b50600160405180602001604052806000815250965096505050505050915091565b600036816106fd60a08601866113a7565b6040517f6c2530b9000000000000000000000000000000000000000000000000000000008152606460048201526024810187905291935091506000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636c2530b990604401600060405180830381865afa15801561078a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107b2919081019061153c565b805190915082146107c9576000935050505061084e565b60005b82811015610845578181815181106107e6576107e661141a565b602002602001015163ffffffff168484838181106108065761080661141a565b905060200201602081019061081b91906115db565b63ffffffff161461083357600094505050505061084e565b8061083d81611468565b9150506107cc565b50600193505050505b92915050565b60008061086460408401846113a7565b90501115610a2057600061087b60408401846113a7565b905061088a60a08501856113a7565b610895929150611407565b67ffffffffffffffff8111156108ad576108ad6114bf565b6040519080825280602002602001820160405280156108d6578160200160208202803683370190505b50905060008060005b6108ec60a08701876113a7565b90508110156109e857600161090460408801886113a7565b858181106109145761091461141a565b90506020020160208101906109299190611446565b61093391906115f8565b60ff1681146109a75761094960a08701876113a7565b828181106109595761095961141a565b905060200201602081019061096e91906115db565b8483815181106109805761098061141a565b63ffffffff909216602092830291909101909101528161099f81611468565b9250506109d6565b60016109b660408801886113a7565b6109c1929150611407565b8310156109d657826109d281611468565b9350505b806109e081611468565b9150506108df565b508460c00135836040516020016109ff9190611611565b60405160208183030381529060405280519060200120149350505050919050565b60c0820135610a3260a08401846113a7565b604051602001610a4392919061165b565b60405160208183030381529060405280519060200120149050919050565b60006060600080610a71876101c5565b9150915081610a8757600093509150610b929050565b610a918786610b9a565b610ad85760006040518060400160405280601281526020017f496e76616c6964207369676e6174757265730000000000000000000000000000815250935093505050610b92565b610ae287876106ec565b610b295760006040518060400160405280601581526020017f496e76616c69642067726f7570206d656d626572730000000000000000000000815250935093505050610b92565b610b3287610854565b610b795760006040518060400160405280601481526020017f496e76616c6964206d656d626572732068617368000000000000000000000000815250935093505050610b92565b6001604051806020016040528060008152509350935050505b935093915050565b600080610c3146610bae6020870187611360565b610bbb60408901896113a7565b88604051602001610bd1969594939291906116a6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b9050366000610c4360808701876113a7565b909250905060008167ffffffffffffffff811115610c6357610c636114bf565b604051908082528060200260200182016040528015610c8c578160200160208202803683370190505b50905060005b82811015610d2957610ca760a08901896113a7565b6001868685818110610cbb57610cbb61141a565b90506020020135610ccc9190611407565b818110610cdb57610cdb61141a565b9050602002016020810190610cf091906115db565b828281518110610d0257610d0261141a565b63ffffffff9092166020928302919091019091015280610d2181611468565b915050610c92565b506040517ff7f9a8fa0000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f7f9a8fa90610d92908590600401611611565b600060405180830381865afa158015610daf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610dd7919081019061172d565b9050606060006041610deb8b84018c611360565b610df6929150611497565b905060005b81811015610ec557610e5e610e118260416117c9565b6041610e2060608f018f611360565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929493925050610ed69050565b92506000610e6c8985610f8b565b9050806001600160a01b0316858381518110610e8a57610e8a61141a565b60200260200101516001600160a01b031614610eb2576000995050505050505050505061084e565b5080610ebd81611468565b915050610dfb565b5060019a9950505050505050505050565b60606000610ee483856117e0565b90508381118015610ef6575080855110155b610f475760405162461bcd60e51b815260206004820152601360248201527f536c696365206f7574206f6620626f756e64730000000000000000000000000060448201526064015b60405180910390fd5b604051915082604083010160405282825283850182038460208701018481015b80821015610f8057815183830152602082019150610f67565b505050509392505050565b6000806000610f9a8585610faf565b91509150610fa781610ff4565b509392505050565b6000808251604103610fe55760208301516040840151606085015160001a610fd98782858561115c565b94509450505050610fed565b506000905060025b9250929050565b6000816004811115611008576110086117f3565b036110105750565b6001816004811115611024576110246117f3565b036110715760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610f3e565b6002816004811115611085576110856117f3565b036110d25760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610f3e565b60038160048111156110e6576110e66117f3565b036111595760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610f3e565b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156111935750600090506003611217565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156111e7573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661121057600060019250925050611217565b9150600090505b94509492505050565b600060e0828403121561123257600080fd5b50919050565b60006020828403121561124a57600080fd5b813567ffffffffffffffff81111561126157600080fd5b61126d84828501611220565b949350505050565b821515815260006020604081840152835180604085015260005b818110156112ab5785810183015185820160600152820161128f565b506000606082860101526060601f19601f830116850101925050509392505050565b600080604083850312156112e057600080fd5b823567ffffffffffffffff8111156112f757600080fd5b61130385828601611220565b95602094909401359450505050565b60008060006060848603121561132757600080fd5b833567ffffffffffffffff81111561133e57600080fd5b61134a86828701611220565b9660208601359650604090950135949350505050565b6000808335601e1984360301811261137757600080fd5b83018035915067ffffffffffffffff82111561139257600080fd5b602001915036819003821315610fed57600080fd5b6000808335601e198436030181126113be57600080fd5b83018035915067ffffffffffffffff8211156113d957600080fd5b6020019150600581901b3603821315610fed57600080fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561084e5761084e6113f1565b634e487b7160e01b600052603260045260246000fd5b803560ff8116811461144157600080fd5b919050565b60006020828403121561145857600080fd5b61146182611430565b9392505050565b60006001820161147a5761147a6113f1565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826114a6576114a6611481565b500490565b6000826114ba576114ba611481565b500690565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156114fe576114fe6114bf565b604052919050565b600067ffffffffffffffff821115611520576115206114bf565b5060051b60200190565b63ffffffff8116811461115957600080fd5b6000602080838503121561154f57600080fd5b825167ffffffffffffffff81111561156657600080fd5b8301601f8101851361157757600080fd5b805161158a61158582611506565b6114d5565b81815260059190911b820183019083810190878311156115a957600080fd5b928401925b828410156115d05783516115c18161152a565b825292840192908401906115ae565b979650505050505050565b6000602082840312156115ed57600080fd5b81356114618161152a565b60ff828116828216039081111561084e5761084e6113f1565b6020808252825182820181905260009190848201906040850190845b8181101561164f57835163ffffffff168352928401929184019160010161162d565b50909695505050505050565b60208082528181018390526000908460408401835b8681101561169b5782356116838161152a565b63ffffffff1682529183019190830190600101611670565b509695505050505050565b86815260006020608081840152866080840152868860a0850137600060a08885018101829052601f19601f8a011685018581038201604087015290810187905287919060c0015b878210156117155760ff61170084611430565b168152918301916001919091019083016116ed565b80945050505050826060830152979650505050505050565b6000602080838503121561174057600080fd5b825167ffffffffffffffff81111561175757600080fd5b8301601f8101851361176857600080fd5b805161177661158582611506565b81815260059190911b8201830190838101908783111561179557600080fd5b928401925b828410156115d05783516001600160a01b03811681146117ba5760008081fd5b8252928401929084019061179a565b808202811582820484141761084e5761084e6113f1565b8082018082111561084e5761084e6113f1565b634e487b7160e01b600052602160045260246000fdfe546f6f206d616e79206d656d62657273206d69736265686176696e6720647572696e6720444b47436f72727570746564206d697362656861766564206d656d6265727320696e6469636573a2646970667358221220415b55cf751a3504ed115144c6aa809f8c56c6f584cf33c4ad0052c98442bc7e64736f6c63430008110033",
406
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100c95760003560e01c806389ef44b011610081578063b54a23741161005b578063b54a237414610160578063e7667aba1461019f578063e7d10d9b146101b257600080fd5b806389ef44b0146101225780639617c2a81461012a578063b2d44fce1461014d57600080fd5b80632c5c72df116100b25780632c5c72df146100f157806363b635ea146101125780636dcc64f81461011a57600080fd5b806305f8ae15146100ce578063281efe71146100e9575b600080fd5b6100d6604081565b6040519081526020015b60405180910390f35b6100d6605a81565b6101046100ff366004611238565b6101c5565b6040516100e0929190611275565b6100d6606481565b6100d6603381565b6100d6604181565b61013d6101383660046112cd565b6106ec565b60405190151581526020016100e0565b61013d61015b366004611238565b610854565b6101877f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100e0565b6101046101ad366004611312565b610a61565b61013d6101c03660046112cd565b610b9a565b6000606060406101d86020850185611360565b90501461021d57505060408051808201909152601a81527f4d616c666f726d65642067726f7570207075626c6963206b65790000000000006020820152600092909150565b36600061022d60408601866113a7565b9092509050605a61023f826064611407565b101561026b57600060405180606001604052806027815260200161180a60279139935093505050915091565b60018111156103b4576001828260008181106102895761028961141a565b905060200201602081019061029e9190611446565b60ff1610806102e05750606482826102b7600182611407565b8181106102c6576102c661141a565b90506020020160208101906102db9190611446565b60ff16115b1561030b57600060405180606001604052806024815260200161183160249139935093505050915091565b60015b818110156103b2578282828181106103285761032861141a565b905060200201602081019061033d9190611446565b60ff16838361034d600185611407565b81811061035c5761035c61141a565b90506020020160208101906103719190611446565b60ff16106103a05760006040518060600160405280602481526020016118316024913994509450505050915091565b806103aa81611468565b91505061030e565b505b600060416103c56060880188611360565b6103d0929150611497565b90506103df6060870187611360565b905060000361042c5760006040518060400160405280601681526020017f4e6f207369676e6174757265732070726f76696465640000000000000000000081525094509450505050915091565b604161043b6060880188611360565b6104469291506114ab565b1561048f5760006040518060400160405280601a81526020017f4d616c666f726d6564207369676e61747572657320617272617900000000000081525094509450505050915091565b36600061049f60808901896113a7565b90925090508281146104f15760006040518060400160405280601b81526020017f556e6578706563746564207369676e61747572657320636f756e740000000000815250965096505050505050915091565b60338310156105405760006040518060400160405280601281526020017f546f6f20666577207369676e6174757265730000000000000000000000000000815250965096505050505050915091565b606483111561058f5760006040518060400160405280601381526020017f546f6f206d616e79207369676e61747572657300000000000000000000000000815250965096505050505050915091565b6001828260008181106105a4576105a461141a565b9050602002013510806105d95750606482826105c1600182611407565b8181106105d0576105d061141a565b90506020020135115b156106245760006040518060400160405280602081526020017f436f72727570746564207369676e696e67206d656d62657220696e6469636573815250965096505050505050915091565b60015b818110156106cb578282828181106106415761064161141a565b9050602002013583836001846106579190611407565b8181106106665761066661141a565b90506020020135106106b95760006040518060400160405280602081526020017f436f72727570746564207369676e696e67206d656d62657220696e646963657381525097509750505050505050915091565b806106c381611468565b915050610627565b50600160405180602001604052806000815250965096505050505050915091565b600036816106fd60a08601866113a7565b6040517f6c2530b9000000000000000000000000000000000000000000000000000000008152606460048201526024810187905291935091506000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636c2530b990604401600060405180830381865afa15801561078a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107b2919081019061153c565b805190915082146107c9576000935050505061084e565b60005b82811015610845578181815181106107e6576107e661141a565b602002602001015163ffffffff168484838181106108065761080661141a565b905060200201602081019061081b91906115db565b63ffffffff161461083357600094505050505061084e565b8061083d81611468565b9150506107cc565b50600193505050505b92915050565b60008061086460408401846113a7565b90501115610a2057600061087b60408401846113a7565b905061088a60a08501856113a7565b610895929150611407565b67ffffffffffffffff8111156108ad576108ad6114bf565b6040519080825280602002602001820160405280156108d6578160200160208202803683370190505b50905060008060005b6108ec60a08701876113a7565b90508110156109e857600161090460408801886113a7565b858181106109145761091461141a565b90506020020160208101906109299190611446565b61093391906115f8565b60ff1681146109a75761094960a08701876113a7565b828181106109595761095961141a565b905060200201602081019061096e91906115db565b8483815181106109805761098061141a565b63ffffffff909216602092830291909101909101528161099f81611468565b9250506109d6565b60016109b660408801886113a7565b6109c1929150611407565b8310156109d657826109d281611468565b9350505b806109e081611468565b9150506108df565b508460c00135836040516020016109ff9190611611565b60405160208183030381529060405280519060200120149350505050919050565b60c0820135610a3260a08401846113a7565b604051602001610a4392919061165b565b60405160208183030381529060405280519060200120149050919050565b60006060600080610a71876101c5565b9150915081610a8757600093509150610b929050565b610a918786610b9a565b610ad85760006040518060400160405280601281526020017f496e76616c6964207369676e6174757265730000000000000000000000000000815250935093505050610b92565b610ae287876106ec565b610b295760006040518060400160405280601581526020017f496e76616c69642067726f7570206d656d626572730000000000000000000000815250935093505050610b92565b610b3287610854565b610b795760006040518060400160405280601481526020017f496e76616c6964206d656d626572732068617368000000000000000000000000815250935093505050610b92565b6001604051806020016040528060008152509350935050505b935093915050565b600080610c3146610bae6020870187611360565b610bbb60408901896113a7565b88604051602001610bd1969594939291906116a6565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b9050366000610c4360808701876113a7565b909250905060008167ffffffffffffffff811115610c6357610c636114bf565b604051908082528060200260200182016040528015610c8c578160200160208202803683370190505b50905060005b82811015610d2957610ca760a08901896113a7565b6001868685818110610cbb57610cbb61141a565b90506020020135610ccc9190611407565b818110610cdb57610cdb61141a565b9050602002016020810190610cf091906115db565b828281518110610d0257610d0261141a565b63ffffffff9092166020928302919091019091015280610d2181611468565b915050610c92565b506040517ff7f9a8fa0000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f7f9a8fa90610d92908590600401611611565b600060405180830381865afa158015610daf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610dd7919081019061172d565b9050606060006041610deb8b84018c611360565b610df6929150611497565b905060005b81811015610ec557610e5e610e118260416117c9565b6041610e2060608f018f611360565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929493925050610ed69050565b92506000610e6c8985610f8b565b9050806001600160a01b0316858381518110610e8a57610e8a61141a565b60200260200101516001600160a01b031614610eb2576000995050505050505050505061084e565b5080610ebd81611468565b915050610dfb565b5060019a9950505050505050505050565b60606000610ee483856117e0565b90508381118015610ef6575080855110155b610f475760405162461bcd60e51b815260206004820152601360248201527f536c696365206f7574206f6620626f756e64730000000000000000000000000060448201526064015b60405180910390fd5b604051915082604083010160405282825283850182038460208701018481015b80821015610f8057815183830152602082019150610f67565b505050509392505050565b6000806000610f9a8585610faf565b91509150610fa781610ff4565b509392505050565b6000808251604103610fe55760208301516040840151606085015160001a610fd98782858561115c565b94509450505050610fed565b506000905060025b9250929050565b6000816004811115611008576110086117f3565b036110105750565b6001816004811115611024576110246117f3565b036110715760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610f3e565b6002816004811115611085576110856117f3565b036110d25760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610f3e565b60038160048111156110e6576110e66117f3565b036111595760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610f3e565b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156111935750600090506003611217565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156111e7573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661121057600060019250925050611217565b9150600090505b94509492505050565b600060e0828403121561123257600080fd5b50919050565b60006020828403121561124a57600080fd5b813567ffffffffffffffff81111561126157600080fd5b61126d84828501611220565b949350505050565b821515815260006020604081840152835180604085015260005b818110156112ab5785810183015185820160600152820161128f565b506000606082860101526060601f19601f830116850101925050509392505050565b600080604083850312156112e057600080fd5b823567ffffffffffffffff8111156112f757600080fd5b61130385828601611220565b95602094909401359450505050565b60008060006060848603121561132757600080fd5b833567ffffffffffffffff81111561133e57600080fd5b61134a86828701611220565b9660208601359650604090950135949350505050565b6000808335601e1984360301811261137757600080fd5b83018035915067ffffffffffffffff82111561139257600080fd5b602001915036819003821315610fed57600080fd5b6000808335601e198436030181126113be57600080fd5b83018035915067ffffffffffffffff8211156113d957600080fd5b6020019150600581901b3603821315610fed57600080fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561084e5761084e6113f1565b634e487b7160e01b600052603260045260246000fd5b803560ff8116811461144157600080fd5b919050565b60006020828403121561145857600080fd5b61146182611430565b9392505050565b60006001820161147a5761147a6113f1565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826114a6576114a6611481565b500490565b6000826114ba576114ba611481565b500690565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156114fe576114fe6114bf565b604052919050565b600067ffffffffffffffff821115611520576115206114bf565b5060051b60200190565b63ffffffff8116811461115957600080fd5b6000602080838503121561154f57600080fd5b825167ffffffffffffffff81111561156657600080fd5b8301601f8101851361157757600080fd5b805161158a61158582611506565b6114d5565b81815260059190911b820183019083810190878311156115a957600080fd5b928401925b828410156115d05783516115c18161152a565b825292840192908401906115ae565b979650505050505050565b6000602082840312156115ed57600080fd5b81356114618161152a565b60ff828116828216039081111561084e5761084e6113f1565b6020808252825182820181905260009190848201906040850190845b8181101561164f57835163ffffffff168352928401929184019160010161162d565b50909695505050505050565b60208082528181018390526000908460408401835b8681101561169b5782356116838161152a565b63ffffffff1682529183019190830190600101611670565b509695505050505050565b86815260006020608081840152866080840152868860a0850137600060a08885018101829052601f19601f8a011685018581038201604087015290810187905287919060c0015b878210156117155760ff61170084611430565b168152918301916001919091019083016116ed565b80945050505050826060830152979650505050505050565b6000602080838503121561174057600080fd5b825167ffffffffffffffff81111561175757600080fd5b8301601f8101851361176857600080fd5b805161177661158582611506565b81815260059190911b8201830190838101908783111561179557600080fd5b928401925b828410156115d05783516001600160a01b03811681146117ba5760008081fd5b8252928401929084019061179a565b808202811582820484141761084e5761084e6113f1565b8082018082111561084e5761084e6113f1565b634e487b7160e01b600052602160045260246000fdfe546f6f206d616e79206d656d62657273206d69736265686176696e6720647572696e6720444b47436f72727570746564206d697362656861766564206d656d6265727320696e6469636573a2646970667358221220415b55cf751a3504ed115144c6aa809f8c56c6f584cf33c4ad0052c98442bc7e64736f6c63430008110033",
407
407
  "linkReferences": {},
408
408
  "deployedLinkReferences": {},
409
409
  "devdoc": {
@@ -479,7 +479,7 @@
479
479
  "parameterSlots": 1,
480
480
  "returnSlots": 0
481
481
  },
482
- "abi_decode_tuple_t_contract$_SortitionPool_$11053_fromMemory": {
482
+ "abi_decode_tuple_t_contract$_SortitionPool_$11057_fromMemory": {
483
483
  "entryPoint": 64,
484
484
  "id": null,
485
485
  "parameterSlots": 2,
@@ -751,7 +751,7 @@
751
751
  }
752
752
  ]
753
753
  },
754
- "name": "abi_decode_tuple_t_contract$_SortitionPool_$11053_fromMemory",
754
+ "name": "abi_decode_tuple_t_contract$_SortitionPool_$11057_fromMemory",
755
755
  "nodeType": "YulFunctionDefinition",
756
756
  "parameters": [
757
757
  {
@@ -779,21 +779,21 @@
779
779
  }
780
780
  ]
781
781
  },
782
- "contents": "{\n { }\n function abi_decode_tuple_t_contract$_SortitionPool_$11053_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := mload(headStart)\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n value0 := value\n }\n}",
782
+ "contents": "{\n { }\n function abi_decode_tuple_t_contract$_SortitionPool_$11057_fromMemory(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := mload(headStart)\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n value0 := value\n }\n}",
783
783
  "id": 123,
784
784
  "language": "Yul",
785
785
  "name": "#utility.yul"
786
786
  }
787
787
  ],
788
788
  "linkReferences": {},
789
- "opcodes": "PUSH1 0xA0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x1923 CODESIZE SUB DUP1 PUSH2 0x1923 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH2 0x2F SWAP2 PUSH2 0x40 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x80 MSTORE PUSH2 0x70 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x52 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x69 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH2 0x188A PUSH2 0x99 PUSH1 0x0 CODECOPY PUSH1 0x0 DUP2 DUP2 PUSH2 0x165 ADD MSTORE DUP2 DUP2 PUSH2 0x73B ADD MSTORE PUSH2 0xD5D ADD MSTORE PUSH2 0x188A PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0xC9 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x89EF44B0 GT PUSH2 0x81 JUMPI DUP1 PUSH4 0xB54A2374 GT PUSH2 0x5B JUMPI DUP1 PUSH4 0xB54A2374 EQ PUSH2 0x160 JUMPI DUP1 PUSH4 0xE7667ABA EQ PUSH2 0x19F JUMPI DUP1 PUSH4 0xE7D10D9B EQ PUSH2 0x1B2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x89EF44B0 EQ PUSH2 0x122 JUMPI DUP1 PUSH4 0x9617C2A8 EQ PUSH2 0x12A JUMPI DUP1 PUSH4 0xB2D44FCE EQ PUSH2 0x14D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x2C5C72DF GT PUSH2 0xB2 JUMPI DUP1 PUSH4 0x2C5C72DF EQ PUSH2 0xF1 JUMPI DUP1 PUSH4 0x63B635EA EQ PUSH2 0x112 JUMPI DUP1 PUSH4 0x6DCC64F8 EQ PUSH2 0x11A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x5F8AE15 EQ PUSH2 0xCE JUMPI DUP1 PUSH4 0x281EFE71 EQ PUSH2 0xE9 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xD6 PUSH1 0x40 DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xD6 PUSH1 0x5A DUP2 JUMP JUMPDEST PUSH2 0x104 PUSH2 0xFF CALLDATASIZE PUSH1 0x4 PUSH2 0x1238 JUMP JUMPDEST PUSH2 0x1C5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xE0 SWAP3 SWAP2 SWAP1 PUSH2 0x1275 JUMP JUMPDEST PUSH2 0xD6 PUSH1 0x64 DUP2 JUMP JUMPDEST PUSH2 0xD6 PUSH1 0x33 DUP2 JUMP JUMPDEST PUSH2 0xD6 PUSH1 0x41 DUP2 JUMP JUMPDEST PUSH2 0x13D PUSH2 0x138 CALLDATASIZE PUSH1 0x4 PUSH2 0x12CD JUMP JUMPDEST PUSH2 0x6EC JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xE0 JUMP JUMPDEST PUSH2 0x13D PUSH2 0x15B CALLDATASIZE PUSH1 0x4 PUSH2 0x1238 JUMP JUMPDEST PUSH2 0x854 JUMP JUMPDEST PUSH2 0x187 PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xE0 JUMP JUMPDEST PUSH2 0x104 PUSH2 0x1AD CALLDATASIZE PUSH1 0x4 PUSH2 0x1312 JUMP JUMPDEST PUSH2 0xA61 JUMP JUMPDEST PUSH2 0x13D PUSH2 0x1C0 CALLDATASIZE PUSH1 0x4 PUSH2 0x12CD JUMP JUMPDEST PUSH2 0xB9A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x40 PUSH2 0x1D8 PUSH1 0x20 DUP6 ADD DUP6 PUSH2 0x1360 JUMP JUMPDEST SWAP1 POP EQ PUSH2 0x21D JUMPI POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x1A DUP2 MSTORE PUSH32 0x4D616C666F726D65642067726F7570207075626C6963206B6579000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x0 SWAP3 SWAP1 SWAP2 POP JUMP JUMPDEST CALLDATASIZE PUSH1 0x0 PUSH2 0x22D PUSH1 0x40 DUP7 ADD DUP7 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP PUSH1 0x5A PUSH2 0x23F DUP3 PUSH1 0x64 PUSH2 0x1407 JUMP JUMPDEST LT ISZERO PUSH2 0x26B JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x27 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x180A PUSH1 0x27 SWAP2 CODECOPY SWAP4 POP SWAP4 POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x3B4 JUMPI PUSH1 0x1 DUP3 DUP3 PUSH1 0x0 DUP2 DUP2 LT PUSH2 0x289 JUMPI PUSH2 0x289 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x29E SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH1 0xFF AND LT DUP1 PUSH2 0x2E0 JUMPI POP PUSH1 0x64 DUP3 DUP3 PUSH2 0x2B7 PUSH1 0x1 DUP3 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0x2C6 JUMPI PUSH2 0x2C6 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x2DB SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH1 0xFF AND GT JUMPDEST ISZERO PUSH2 0x30B JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x24 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1831 PUSH1 0x24 SWAP2 CODECOPY SWAP4 POP SWAP4 POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x1 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x3B2 JUMPI DUP3 DUP3 DUP3 DUP2 DUP2 LT PUSH2 0x328 JUMPI PUSH2 0x328 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x33D SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH1 0xFF AND DUP4 DUP4 PUSH2 0x34D PUSH1 0x1 DUP6 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0x35C JUMPI PUSH2 0x35C PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x371 SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH1 0xFF AND LT PUSH2 0x3A0 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x24 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1831 PUSH1 0x24 SWAP2 CODECOPY SWAP5 POP SWAP5 POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST DUP1 PUSH2 0x3AA DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x30E JUMP JUMPDEST POP JUMPDEST PUSH1 0x0 PUSH1 0x41 PUSH2 0x3C5 PUSH1 0x60 DUP9 ADD DUP9 PUSH2 0x1360 JUMP JUMPDEST PUSH2 0x3D0 SWAP3 SWAP2 POP PUSH2 0x1497 JUMP JUMPDEST SWAP1 POP PUSH2 0x3DF PUSH1 0x60 DUP8 ADD DUP8 PUSH2 0x1360 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 SUB PUSH2 0x42C JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x16 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4E6F207369676E6174757265732070726F766964656400000000000000000000 DUP2 MSTORE POP SWAP5 POP SWAP5 POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x41 PUSH2 0x43B PUSH1 0x60 DUP9 ADD DUP9 PUSH2 0x1360 JUMP JUMPDEST PUSH2 0x446 SWAP3 SWAP2 POP PUSH2 0x14AB JUMP JUMPDEST ISZERO PUSH2 0x48F JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1A DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4D616C666F726D6564207369676E617475726573206172726179000000000000 DUP2 MSTORE POP SWAP5 POP SWAP5 POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST CALLDATASIZE PUSH1 0x0 PUSH2 0x49F PUSH1 0x80 DUP10 ADD DUP10 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP DUP3 DUP2 EQ PUSH2 0x4F1 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1B DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x556E6578706563746564207369676E61747572657320636F756E740000000000 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x33 DUP4 LT ISZERO PUSH2 0x540 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x12 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x546F6F20666577207369676E6174757265730000000000000000000000000000 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x64 DUP4 GT ISZERO PUSH2 0x58F JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x13 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x546F6F206D616E79207369676E61747572657300000000000000000000000000 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x1 DUP3 DUP3 PUSH1 0x0 DUP2 DUP2 LT PUSH2 0x5A4 JUMPI PUSH2 0x5A4 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD LT DUP1 PUSH2 0x5D9 JUMPI POP PUSH1 0x64 DUP3 DUP3 PUSH2 0x5C1 PUSH1 0x1 DUP3 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0x5D0 JUMPI PUSH2 0x5D0 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD GT JUMPDEST ISZERO PUSH2 0x624 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x20 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x436F72727570746564207369676E696E67206D656D62657220696E6469636573 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x1 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x6CB JUMPI DUP3 DUP3 DUP3 DUP2 DUP2 LT PUSH2 0x641 JUMPI PUSH2 0x641 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD DUP4 DUP4 PUSH1 0x1 DUP5 PUSH2 0x657 SWAP2 SWAP1 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0x666 JUMPI PUSH2 0x666 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD LT PUSH2 0x6B9 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x20 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x436F72727570746564207369676E696E67206D656D62657220696E6469636573 DUP2 MSTORE POP SWAP8 POP SWAP8 POP POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST DUP1 PUSH2 0x6C3 DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x627 JUMP JUMPDEST POP PUSH1 0x1 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x0 CALLDATASIZE DUP2 PUSH2 0x6FD PUSH1 0xA0 DUP7 ADD DUP7 PUSH2 0x13A7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x6C2530B900000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x64 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 DUP2 ADD DUP8 SWAP1 MSTORE SWAP2 SWAP4 POP SWAP2 POP PUSH1 0x0 SWAP1 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x6C2530B9 SWAP1 PUSH1 0x44 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x78A JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x7B2 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x153C JUMP JUMPDEST DUP1 MLOAD SWAP1 SWAP2 POP DUP3 EQ PUSH2 0x7C9 JUMPI PUSH1 0x0 SWAP4 POP POP POP POP PUSH2 0x84E JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x845 JUMPI DUP2 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x7E6 JUMPI PUSH2 0x7E6 PUSH2 0x141A JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH4 0xFFFFFFFF AND DUP5 DUP5 DUP4 DUP2 DUP2 LT PUSH2 0x806 JUMPI PUSH2 0x806 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x81B SWAP2 SWAP1 PUSH2 0x15DB JUMP JUMPDEST PUSH4 0xFFFFFFFF AND EQ PUSH2 0x833 JUMPI PUSH1 0x0 SWAP5 POP POP POP POP POP PUSH2 0x84E JUMP JUMPDEST DUP1 PUSH2 0x83D DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x7CC JUMP JUMPDEST POP PUSH1 0x1 SWAP4 POP POP POP POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x864 PUSH1 0x40 DUP5 ADD DUP5 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 POP GT ISZERO PUSH2 0xA20 JUMPI PUSH1 0x0 PUSH2 0x87B PUSH1 0x40 DUP5 ADD DUP5 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 POP PUSH2 0x88A PUSH1 0xA0 DUP6 ADD DUP6 PUSH2 0x13A7 JUMP JUMPDEST PUSH2 0x895 SWAP3 SWAP2 POP PUSH2 0x1407 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x8AD JUMPI PUSH2 0x8AD PUSH2 0x14BF JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x8D6 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 PUSH1 0x0 JUMPDEST PUSH2 0x8EC PUSH1 0xA0 DUP8 ADD DUP8 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 POP DUP2 LT ISZERO PUSH2 0x9E8 JUMPI PUSH1 0x1 PUSH2 0x904 PUSH1 0x40 DUP9 ADD DUP9 PUSH2 0x13A7 JUMP JUMPDEST DUP6 DUP2 DUP2 LT PUSH2 0x914 JUMPI PUSH2 0x914 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x929 SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH2 0x933 SWAP2 SWAP1 PUSH2 0x15F8 JUMP JUMPDEST PUSH1 0xFF AND DUP2 EQ PUSH2 0x9A7 JUMPI PUSH2 0x949 PUSH1 0xA0 DUP8 ADD DUP8 PUSH2 0x13A7 JUMP JUMPDEST DUP3 DUP2 DUP2 LT PUSH2 0x959 JUMPI PUSH2 0x959 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x96E SWAP2 SWAP1 PUSH2 0x15DB JUMP JUMPDEST DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x980 JUMPI PUSH2 0x980 PUSH2 0x141A JUMP JUMPDEST PUSH4 0xFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP2 SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE DUP2 PUSH2 0x99F DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP3 POP POP PUSH2 0x9D6 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x9B6 PUSH1 0x40 DUP9 ADD DUP9 PUSH2 0x13A7 JUMP JUMPDEST PUSH2 0x9C1 SWAP3 SWAP2 POP PUSH2 0x1407 JUMP JUMPDEST DUP4 LT ISZERO PUSH2 0x9D6 JUMPI DUP3 PUSH2 0x9D2 DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP4 POP POP JUMPDEST DUP1 PUSH2 0x9E0 DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x8DF JUMP JUMPDEST POP DUP5 PUSH1 0xC0 ADD CALLDATALOAD DUP4 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x9FF SWAP2 SWAP1 PUSH2 0x1611 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 EQ SWAP4 POP POP POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0xC0 DUP3 ADD CALLDATALOAD PUSH2 0xA32 PUSH1 0xA0 DUP5 ADD DUP5 PUSH2 0x13A7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xA43 SWAP3 SWAP2 SWAP1 PUSH2 0x165B JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 EQ SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 DUP1 PUSH2 0xA71 DUP8 PUSH2 0x1C5 JUMP JUMPDEST SWAP2 POP SWAP2 POP DUP2 PUSH2 0xA87 JUMPI PUSH1 0x0 SWAP4 POP SWAP2 POP PUSH2 0xB92 SWAP1 POP JUMP JUMPDEST PUSH2 0xA91 DUP8 DUP7 PUSH2 0xB9A JUMP JUMPDEST PUSH2 0xAD8 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x12 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x496E76616C6964207369676E6174757265730000000000000000000000000000 DUP2 MSTORE POP SWAP4 POP SWAP4 POP POP POP PUSH2 0xB92 JUMP JUMPDEST PUSH2 0xAE2 DUP8 DUP8 PUSH2 0x6EC JUMP JUMPDEST PUSH2 0xB29 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x15 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x496E76616C69642067726F7570206D656D626572730000000000000000000000 DUP2 MSTORE POP SWAP4 POP SWAP4 POP POP POP PUSH2 0xB92 JUMP JUMPDEST PUSH2 0xB32 DUP8 PUSH2 0x854 JUMP JUMPDEST PUSH2 0xB79 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x14 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x496E76616C6964206D656D626572732068617368000000000000000000000000 DUP2 MSTORE POP SWAP4 POP SWAP4 POP POP POP PUSH2 0xB92 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP4 POP SWAP4 POP POP POP JUMPDEST SWAP4 POP SWAP4 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0xC31 CHAINID PUSH2 0xBAE PUSH1 0x20 DUP8 ADD DUP8 PUSH2 0x1360 JUMP JUMPDEST PUSH2 0xBBB PUSH1 0x40 DUP10 ADD DUP10 PUSH2 0x13A7 JUMP JUMPDEST DUP9 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xBD1 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x16A6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE DUP3 DUP3 MSTORE DUP1 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD KECCAK256 PUSH32 0x19457468657265756D205369676E6564204D6573736167653A0A333200000000 DUP5 DUP4 ADD MSTORE PUSH1 0x3C DUP1 DUP6 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP3 MLOAD DUP1 DUP6 SUB SWAP1 SWAP2 ADD DUP2 MSTORE PUSH1 0x5C SWAP1 SWAP4 ADD SWAP1 SWAP2 MSTORE DUP2 MLOAD SWAP2 ADD KECCAK256 SWAP1 JUMP JUMPDEST SWAP1 POP CALLDATASIZE PUSH1 0x0 PUSH2 0xC43 PUSH1 0x80 DUP8 ADD DUP8 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP PUSH1 0x0 DUP2 PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xC63 JUMPI PUSH2 0xC63 PUSH2 0x14BF JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xC8C JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0xD29 JUMPI PUSH2 0xCA7 PUSH1 0xA0 DUP10 ADD DUP10 PUSH2 0x13A7 JUMP JUMPDEST PUSH1 0x1 DUP7 DUP7 DUP6 DUP2 DUP2 LT PUSH2 0xCBB JUMPI PUSH2 0xCBB PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD PUSH2 0xCCC SWAP2 SWAP1 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0xCDB JUMPI PUSH2 0xCDB PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0xCF0 SWAP2 SWAP1 PUSH2 0x15DB JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xD02 JUMPI PUSH2 0xD02 PUSH2 0x141A JUMP JUMPDEST PUSH4 0xFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP2 SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE DUP1 PUSH2 0xD21 DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0xC92 JUMP JUMPDEST POP PUSH1 0x40 MLOAD PUSH32 0xF7F9A8FA00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 AND SWAP1 PUSH4 0xF7F9A8FA SWAP1 PUSH2 0xD92 SWAP1 DUP6 SWAP1 PUSH1 0x4 ADD PUSH2 0x1611 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xDAF JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0xDD7 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x172D JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH1 0x0 PUSH1 0x41 PUSH2 0xDEB DUP12 DUP5 ADD DUP13 PUSH2 0x1360 JUMP JUMPDEST PUSH2 0xDF6 SWAP3 SWAP2 POP PUSH2 0x1497 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xEC5 JUMPI PUSH2 0xE5E PUSH2 0xE11 DUP3 PUSH1 0x41 PUSH2 0x17C9 JUMP JUMPDEST PUSH1 0x41 PUSH2 0xE20 PUSH1 0x60 DUP16 ADD DUP16 PUSH2 0x1360 JUMP JUMPDEST DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP5 SWAP4 SWAP3 POP POP PUSH2 0xED6 SWAP1 POP JUMP JUMPDEST SWAP3 POP PUSH1 0x0 PUSH2 0xE6C DUP10 DUP6 PUSH2 0xF8B JUMP JUMPDEST SWAP1 POP DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xE8A JUMPI PUSH2 0xE8A PUSH2 0x141A JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0xEB2 JUMPI PUSH1 0x0 SWAP10 POP POP POP POP POP POP POP POP POP POP PUSH2 0x84E JUMP JUMPDEST POP DUP1 PUSH2 0xEBD DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0xDFB JUMP JUMPDEST POP PUSH1 0x1 SWAP11 SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0xEE4 DUP4 DUP6 PUSH2 0x17E0 JUMP JUMPDEST SWAP1 POP DUP4 DUP2 GT DUP1 ISZERO PUSH2 0xEF6 JUMPI POP DUP1 DUP6 MLOAD LT ISZERO JUMPDEST PUSH2 0xF47 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x13 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x536C696365206F7574206F6620626F756E647300000000000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x40 MLOAD SWAP2 POP DUP3 PUSH1 0x40 DUP4 ADD ADD PUSH1 0x40 MSTORE DUP3 DUP3 MSTORE DUP4 DUP6 ADD DUP3 SUB DUP5 PUSH1 0x20 DUP8 ADD ADD DUP5 DUP2 ADD JUMPDEST DUP1 DUP3 LT ISZERO PUSH2 0xF80 JUMPI DUP2 MLOAD DUP4 DUP4 ADD MSTORE PUSH1 0x20 DUP3 ADD SWAP2 POP PUSH2 0xF67 JUMP JUMPDEST POP POP POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0xF9A DUP6 DUP6 PUSH2 0xFAF JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0xFA7 DUP2 PUSH2 0xFF4 JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 MLOAD PUSH1 0x41 SUB PUSH2 0xFE5 JUMPI PUSH1 0x20 DUP4 ADD MLOAD PUSH1 0x40 DUP5 ADD MLOAD PUSH1 0x60 DUP6 ADD MLOAD PUSH1 0x0 BYTE PUSH2 0xFD9 DUP8 DUP3 DUP6 DUP6 PUSH2 0x115C JUMP JUMPDEST SWAP5 POP SWAP5 POP POP POP POP PUSH2 0xFED JUMP JUMPDEST POP PUSH1 0x0 SWAP1 POP PUSH1 0x2 JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x1008 JUMPI PUSH2 0x1008 PUSH2 0x17F3 JUMP JUMPDEST SUB PUSH2 0x1010 JUMPI POP JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x1024 JUMPI PUSH2 0x1024 PUSH2 0x17F3 JUMP JUMPDEST SUB PUSH2 0x1071 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x18 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x45434453413A20696E76616C6964207369676E61747572650000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0xF3E JUMP JUMPDEST PUSH1 0x2 DUP2 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x1085 JUMPI PUSH2 0x1085 PUSH2 0x17F3 JUMP JUMPDEST SUB PUSH2 0x10D2 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1F PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x45434453413A20696E76616C6964207369676E6174757265206C656E67746800 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0xF3E JUMP JUMPDEST PUSH1 0x3 DUP2 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x10E6 JUMPI PUSH2 0x10E6 PUSH2 0x17F3 JUMP JUMPDEST SUB PUSH2 0x1159 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x22 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x45434453413A20696E76616C6964207369676E6174757265202773272076616C PUSH1 0x44 DUP3 ADD MSTORE PUSH32 0x7565000000000000000000000000000000000000000000000000000000000000 PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0xF3E JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH32 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0 DUP4 GT ISZERO PUSH2 0x1193 JUMPI POP PUSH1 0x0 SWAP1 POP PUSH1 0x3 PUSH2 0x1217 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP1 DUP5 MSTORE DUP10 SWAP1 MSTORE PUSH1 0xFF DUP9 AND SWAP3 DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x60 DUP2 ADD DUP7 SWAP1 MSTORE PUSH1 0x80 DUP2 ADD DUP6 SWAP1 MSTORE PUSH1 0x1 SWAP1 PUSH1 0xA0 ADD PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x11E7 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x1210 JUMPI PUSH1 0x0 PUSH1 0x1 SWAP3 POP SWAP3 POP POP PUSH2 0x1217 JUMP JUMPDEST SWAP2 POP PUSH1 0x0 SWAP1 POP JUMPDEST SWAP5 POP SWAP5 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0xE0 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1232 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x124A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1261 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x126D DUP5 DUP3 DUP6 ADD PUSH2 0x1220 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST DUP3 ISZERO ISZERO DUP2 MSTORE PUSH1 0x0 PUSH1 0x20 PUSH1 0x40 DUP2 DUP5 ADD MSTORE DUP4 MLOAD DUP1 PUSH1 0x40 DUP6 ADD MSTORE PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x12AB JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x60 ADD MSTORE DUP3 ADD PUSH2 0x128F JUMP JUMPDEST POP PUSH1 0x0 PUSH1 0x60 DUP3 DUP7 ADD ADD MSTORE PUSH1 0x60 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND DUP6 ADD ADD SWAP3 POP POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x12E0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x12F7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1303 DUP6 DUP3 DUP7 ADD PUSH2 0x1220 JUMP JUMPDEST SWAP6 PUSH1 0x20 SWAP5 SWAP1 SWAP5 ADD CALLDATALOAD SWAP5 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x1327 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x133E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x134A DUP7 DUP3 DUP8 ADD PUSH2 0x1220 JUMP JUMPDEST SWAP7 PUSH1 0x20 DUP7 ADD CALLDATALOAD SWAP7 POP PUSH1 0x40 SWAP1 SWAP6 ADD CALLDATALOAD SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0x1377 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1392 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP CALLDATASIZE DUP2 SWAP1 SUB DUP3 SGT ISZERO PUSH2 0xFED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0x13BE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x13D9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP PUSH1 0x5 DUP2 SWAP1 SHL CALLDATASIZE SUB DUP3 SGT ISZERO PUSH2 0xFED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST DUP2 DUP2 SUB DUP2 DUP2 GT ISZERO PUSH2 0x84E JUMPI PUSH2 0x84E PUSH2 0x13F1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x1441 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1458 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1461 DUP3 PUSH2 0x1430 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP3 ADD PUSH2 0x147A JUMPI PUSH2 0x147A PUSH2 0x13F1 JUMP JUMPDEST POP PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x12 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x14A6 JUMPI PUSH2 0x14A6 PUSH2 0x1481 JUMP JUMPDEST POP DIV SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x14BA JUMPI PUSH2 0x14BA PUSH2 0x1481 JUMP JUMPDEST POP MOD SWAP1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x14FE JUMPI PUSH2 0x14FE PUSH2 0x14BF JUMP JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1520 JUMPI PUSH2 0x1520 PUSH2 0x14BF JUMP JUMPDEST POP PUSH1 0x5 SHL PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x1159 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x154F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1566 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD PUSH1 0x1F DUP2 ADD DUP6 SGT PUSH2 0x1577 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 MLOAD PUSH2 0x158A PUSH2 0x1585 DUP3 PUSH2 0x1506 JUMP JUMPDEST PUSH2 0x14D5 JUMP JUMPDEST DUP2 DUP2 MSTORE PUSH1 0x5 SWAP2 SWAP1 SWAP2 SHL DUP3 ADD DUP4 ADD SWAP1 DUP4 DUP2 ADD SWAP1 DUP8 DUP4 GT ISZERO PUSH2 0x15A9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 DUP5 ADD SWAP3 JUMPDEST DUP3 DUP5 LT ISZERO PUSH2 0x15D0 JUMPI DUP4 MLOAD PUSH2 0x15C1 DUP2 PUSH2 0x152A JUMP JUMPDEST DUP3 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP1 DUP5 ADD SWAP1 PUSH2 0x15AE JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x15ED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1461 DUP2 PUSH2 0x152A JUMP JUMPDEST PUSH1 0xFF DUP3 DUP2 AND DUP3 DUP3 AND SUB SWAP1 DUP2 GT ISZERO PUSH2 0x84E JUMPI PUSH2 0x84E PUSH2 0x13F1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP3 MLOAD DUP3 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP2 SWAP1 DUP5 DUP3 ADD SWAP1 PUSH1 0x40 DUP6 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x164F JUMPI DUP4 MLOAD PUSH4 0xFFFFFFFF AND DUP4 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP2 DUP5 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0x162D JUMP JUMPDEST POP SWAP1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 DUP2 ADD DUP4 SWAP1 MSTORE PUSH1 0x0 SWAP1 DUP5 PUSH1 0x40 DUP5 ADD DUP4 JUMPDEST DUP7 DUP2 LT ISZERO PUSH2 0x169B JUMPI DUP3 CALLDATALOAD PUSH2 0x1683 DUP2 PUSH2 0x152A JUMP JUMPDEST PUSH4 0xFFFFFFFF AND DUP3 MSTORE SWAP2 DUP4 ADD SWAP2 SWAP1 DUP4 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x1670 JUMP JUMPDEST POP SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST DUP7 DUP2 MSTORE PUSH1 0x0 PUSH1 0x20 PUSH1 0x80 DUP2 DUP5 ADD MSTORE DUP7 PUSH1 0x80 DUP5 ADD MSTORE DUP7 DUP9 PUSH1 0xA0 DUP6 ADD CALLDATACOPY PUSH1 0x0 PUSH1 0xA0 DUP9 DUP6 ADD DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP11 ADD AND DUP6 ADD DUP6 DUP2 SUB DUP3 ADD PUSH1 0x40 DUP8 ADD MSTORE SWAP1 DUP2 ADD DUP8 SWAP1 MSTORE DUP8 SWAP2 SWAP1 PUSH1 0xC0 ADD JUMPDEST DUP8 DUP3 LT ISZERO PUSH2 0x1715 JUMPI PUSH1 0xFF PUSH2 0x1700 DUP5 PUSH2 0x1430 JUMP JUMPDEST AND DUP2 MSTORE SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD SWAP1 DUP4 ADD PUSH2 0x16ED JUMP JUMPDEST DUP1 SWAP5 POP POP POP POP POP DUP3 PUSH1 0x60 DUP4 ADD MSTORE SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x1740 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1757 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD PUSH1 0x1F DUP2 ADD DUP6 SGT PUSH2 0x1768 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 MLOAD PUSH2 0x1776 PUSH2 0x1585 DUP3 PUSH2 0x1506 JUMP JUMPDEST DUP2 DUP2 MSTORE PUSH1 0x5 SWAP2 SWAP1 SWAP2 SHL DUP3 ADD DUP4 ADD SWAP1 DUP4 DUP2 ADD SWAP1 DUP8 DUP4 GT ISZERO PUSH2 0x1795 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 DUP5 ADD SWAP3 JUMPDEST DUP3 DUP5 LT ISZERO PUSH2 0x15D0 JUMPI DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x17BA JUMPI PUSH1 0x0 DUP1 DUP2 REVERT JUMPDEST DUP3 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP1 DUP5 ADD SWAP1 PUSH2 0x179A JUMP JUMPDEST DUP1 DUP3 MUL DUP2 ISZERO DUP3 DUP3 DIV DUP5 EQ OR PUSH2 0x84E JUMPI PUSH2 0x84E PUSH2 0x13F1 JUMP JUMPDEST DUP1 DUP3 ADD DUP1 DUP3 GT ISZERO PUSH2 0x84E JUMPI PUSH2 0x84E PUSH2 0x13F1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x21 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT INVALID SLOAD PUSH16 0x6F206D616E79206D656D62657273206D PUSH10 0x736265686176696E6720 PUSH5 0x7572696E67 KECCAK256 DIFFICULTY 0x4B SELFBALANCE NUMBER PUSH16 0x72727570746564206D69736265686176 PUSH6 0x64206D656D62 PUSH6 0x727320696E64 PUSH10 0x636573A2646970667358 0x22 SLT KECCAK256 0xDA DUP1 0x4F OR 0x2D 0x27 0x5E DUP14 0xDE GAS MLOAD 0xD5 DUP11 0x27 PUSH4 0x832EB883 0x26 LOG2 SSTORE CALLDATACOPY SGT PUSH27 0xD01C33759F2B8964736F6C63430008110033000000000000000000 ",
789
+ "opcodes": "PUSH1 0xA0 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x40 MLOAD PUSH2 0x1923 CODESIZE SUB DUP1 PUSH2 0x1923 DUP4 CODECOPY DUP2 ADD PUSH1 0x40 DUP2 SWAP1 MSTORE PUSH2 0x2F SWAP2 PUSH2 0x40 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND PUSH1 0x80 MSTORE PUSH2 0x70 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x52 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x69 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x80 MLOAD PUSH2 0x188A PUSH2 0x99 PUSH1 0x0 CODECOPY PUSH1 0x0 DUP2 DUP2 PUSH2 0x165 ADD MSTORE DUP2 DUP2 PUSH2 0x73B ADD MSTORE PUSH2 0xD5D ADD MSTORE PUSH2 0x188A PUSH1 0x0 RETURN INVALID PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0xC9 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x89EF44B0 GT PUSH2 0x81 JUMPI DUP1 PUSH4 0xB54A2374 GT PUSH2 0x5B JUMPI DUP1 PUSH4 0xB54A2374 EQ PUSH2 0x160 JUMPI DUP1 PUSH4 0xE7667ABA EQ PUSH2 0x19F JUMPI DUP1 PUSH4 0xE7D10D9B EQ PUSH2 0x1B2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x89EF44B0 EQ PUSH2 0x122 JUMPI DUP1 PUSH4 0x9617C2A8 EQ PUSH2 0x12A JUMPI DUP1 PUSH4 0xB2D44FCE EQ PUSH2 0x14D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x2C5C72DF GT PUSH2 0xB2 JUMPI DUP1 PUSH4 0x2C5C72DF EQ PUSH2 0xF1 JUMPI DUP1 PUSH4 0x63B635EA EQ PUSH2 0x112 JUMPI DUP1 PUSH4 0x6DCC64F8 EQ PUSH2 0x11A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x5F8AE15 EQ PUSH2 0xCE JUMPI DUP1 PUSH4 0x281EFE71 EQ PUSH2 0xE9 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xD6 PUSH1 0x40 DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xD6 PUSH1 0x5A DUP2 JUMP JUMPDEST PUSH2 0x104 PUSH2 0xFF CALLDATASIZE PUSH1 0x4 PUSH2 0x1238 JUMP JUMPDEST PUSH2 0x1C5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xE0 SWAP3 SWAP2 SWAP1 PUSH2 0x1275 JUMP JUMPDEST PUSH2 0xD6 PUSH1 0x64 DUP2 JUMP JUMPDEST PUSH2 0xD6 PUSH1 0x33 DUP2 JUMP JUMPDEST PUSH2 0xD6 PUSH1 0x41 DUP2 JUMP JUMPDEST PUSH2 0x13D PUSH2 0x138 CALLDATASIZE PUSH1 0x4 PUSH2 0x12CD JUMP JUMPDEST PUSH2 0x6EC JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xE0 JUMP JUMPDEST PUSH2 0x13D PUSH2 0x15B CALLDATASIZE PUSH1 0x4 PUSH2 0x1238 JUMP JUMPDEST PUSH2 0x854 JUMP JUMPDEST PUSH2 0x187 PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xE0 JUMP JUMPDEST PUSH2 0x104 PUSH2 0x1AD CALLDATASIZE PUSH1 0x4 PUSH2 0x1312 JUMP JUMPDEST PUSH2 0xA61 JUMP JUMPDEST PUSH2 0x13D PUSH2 0x1C0 CALLDATASIZE PUSH1 0x4 PUSH2 0x12CD JUMP JUMPDEST PUSH2 0xB9A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x40 PUSH2 0x1D8 PUSH1 0x20 DUP6 ADD DUP6 PUSH2 0x1360 JUMP JUMPDEST SWAP1 POP EQ PUSH2 0x21D JUMPI POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x1A DUP2 MSTORE PUSH32 0x4D616C666F726D65642067726F7570207075626C6963206B6579000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x0 SWAP3 SWAP1 SWAP2 POP JUMP JUMPDEST CALLDATASIZE PUSH1 0x0 PUSH2 0x22D PUSH1 0x40 DUP7 ADD DUP7 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP PUSH1 0x5A PUSH2 0x23F DUP3 PUSH1 0x64 PUSH2 0x1407 JUMP JUMPDEST LT ISZERO PUSH2 0x26B JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x27 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x180A PUSH1 0x27 SWAP2 CODECOPY SWAP4 POP SWAP4 POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x3B4 JUMPI PUSH1 0x1 DUP3 DUP3 PUSH1 0x0 DUP2 DUP2 LT PUSH2 0x289 JUMPI PUSH2 0x289 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x29E SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH1 0xFF AND LT DUP1 PUSH2 0x2E0 JUMPI POP PUSH1 0x64 DUP3 DUP3 PUSH2 0x2B7 PUSH1 0x1 DUP3 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0x2C6 JUMPI PUSH2 0x2C6 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x2DB SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH1 0xFF AND GT JUMPDEST ISZERO PUSH2 0x30B JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x24 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1831 PUSH1 0x24 SWAP2 CODECOPY SWAP4 POP SWAP4 POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x1 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x3B2 JUMPI DUP3 DUP3 DUP3 DUP2 DUP2 LT PUSH2 0x328 JUMPI PUSH2 0x328 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x33D SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH1 0xFF AND DUP4 DUP4 PUSH2 0x34D PUSH1 0x1 DUP6 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0x35C JUMPI PUSH2 0x35C PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x371 SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH1 0xFF AND LT PUSH2 0x3A0 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x24 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1831 PUSH1 0x24 SWAP2 CODECOPY SWAP5 POP SWAP5 POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST DUP1 PUSH2 0x3AA DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x30E JUMP JUMPDEST POP JUMPDEST PUSH1 0x0 PUSH1 0x41 PUSH2 0x3C5 PUSH1 0x60 DUP9 ADD DUP9 PUSH2 0x1360 JUMP JUMPDEST PUSH2 0x3D0 SWAP3 SWAP2 POP PUSH2 0x1497 JUMP JUMPDEST SWAP1 POP PUSH2 0x3DF PUSH1 0x60 DUP8 ADD DUP8 PUSH2 0x1360 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 SUB PUSH2 0x42C JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x16 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4E6F207369676E6174757265732070726F766964656400000000000000000000 DUP2 MSTORE POP SWAP5 POP SWAP5 POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x41 PUSH2 0x43B PUSH1 0x60 DUP9 ADD DUP9 PUSH2 0x1360 JUMP JUMPDEST PUSH2 0x446 SWAP3 SWAP2 POP PUSH2 0x14AB JUMP JUMPDEST ISZERO PUSH2 0x48F JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1A DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4D616C666F726D6564207369676E617475726573206172726179000000000000 DUP2 MSTORE POP SWAP5 POP SWAP5 POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST CALLDATASIZE PUSH1 0x0 PUSH2 0x49F PUSH1 0x80 DUP10 ADD DUP10 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP DUP3 DUP2 EQ PUSH2 0x4F1 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1B DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x556E6578706563746564207369676E61747572657320636F756E740000000000 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x33 DUP4 LT ISZERO PUSH2 0x540 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x12 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x546F6F20666577207369676E6174757265730000000000000000000000000000 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x64 DUP4 GT ISZERO PUSH2 0x58F JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x13 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x546F6F206D616E79207369676E61747572657300000000000000000000000000 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x1 DUP3 DUP3 PUSH1 0x0 DUP2 DUP2 LT PUSH2 0x5A4 JUMPI PUSH2 0x5A4 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD LT DUP1 PUSH2 0x5D9 JUMPI POP PUSH1 0x64 DUP3 DUP3 PUSH2 0x5C1 PUSH1 0x1 DUP3 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0x5D0 JUMPI PUSH2 0x5D0 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD GT JUMPDEST ISZERO PUSH2 0x624 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x20 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x436F72727570746564207369676E696E67206D656D62657220696E6469636573 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x1 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x6CB JUMPI DUP3 DUP3 DUP3 DUP2 DUP2 LT PUSH2 0x641 JUMPI PUSH2 0x641 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD DUP4 DUP4 PUSH1 0x1 DUP5 PUSH2 0x657 SWAP2 SWAP1 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0x666 JUMPI PUSH2 0x666 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD LT PUSH2 0x6B9 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x20 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x436F72727570746564207369676E696E67206D656D62657220696E6469636573 DUP2 MSTORE POP SWAP8 POP SWAP8 POP POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST DUP1 PUSH2 0x6C3 DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x627 JUMP JUMPDEST POP PUSH1 0x1 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x0 CALLDATASIZE DUP2 PUSH2 0x6FD PUSH1 0xA0 DUP7 ADD DUP7 PUSH2 0x13A7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x6C2530B900000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x64 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 DUP2 ADD DUP8 SWAP1 MSTORE SWAP2 SWAP4 POP SWAP2 POP PUSH1 0x0 SWAP1 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x6C2530B9 SWAP1 PUSH1 0x44 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x78A JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x7B2 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x153C JUMP JUMPDEST DUP1 MLOAD SWAP1 SWAP2 POP DUP3 EQ PUSH2 0x7C9 JUMPI PUSH1 0x0 SWAP4 POP POP POP POP PUSH2 0x84E JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x845 JUMPI DUP2 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x7E6 JUMPI PUSH2 0x7E6 PUSH2 0x141A JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH4 0xFFFFFFFF AND DUP5 DUP5 DUP4 DUP2 DUP2 LT PUSH2 0x806 JUMPI PUSH2 0x806 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x81B SWAP2 SWAP1 PUSH2 0x15DB JUMP JUMPDEST PUSH4 0xFFFFFFFF AND EQ PUSH2 0x833 JUMPI PUSH1 0x0 SWAP5 POP POP POP POP POP PUSH2 0x84E JUMP JUMPDEST DUP1 PUSH2 0x83D DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x7CC JUMP JUMPDEST POP PUSH1 0x1 SWAP4 POP POP POP POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x864 PUSH1 0x40 DUP5 ADD DUP5 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 POP GT ISZERO PUSH2 0xA20 JUMPI PUSH1 0x0 PUSH2 0x87B PUSH1 0x40 DUP5 ADD DUP5 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 POP PUSH2 0x88A PUSH1 0xA0 DUP6 ADD DUP6 PUSH2 0x13A7 JUMP JUMPDEST PUSH2 0x895 SWAP3 SWAP2 POP PUSH2 0x1407 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x8AD JUMPI PUSH2 0x8AD PUSH2 0x14BF JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x8D6 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 PUSH1 0x0 JUMPDEST PUSH2 0x8EC PUSH1 0xA0 DUP8 ADD DUP8 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 POP DUP2 LT ISZERO PUSH2 0x9E8 JUMPI PUSH1 0x1 PUSH2 0x904 PUSH1 0x40 DUP9 ADD DUP9 PUSH2 0x13A7 JUMP JUMPDEST DUP6 DUP2 DUP2 LT PUSH2 0x914 JUMPI PUSH2 0x914 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x929 SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH2 0x933 SWAP2 SWAP1 PUSH2 0x15F8 JUMP JUMPDEST PUSH1 0xFF AND DUP2 EQ PUSH2 0x9A7 JUMPI PUSH2 0x949 PUSH1 0xA0 DUP8 ADD DUP8 PUSH2 0x13A7 JUMP JUMPDEST DUP3 DUP2 DUP2 LT PUSH2 0x959 JUMPI PUSH2 0x959 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x96E SWAP2 SWAP1 PUSH2 0x15DB JUMP JUMPDEST DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x980 JUMPI PUSH2 0x980 PUSH2 0x141A JUMP JUMPDEST PUSH4 0xFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP2 SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE DUP2 PUSH2 0x99F DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP3 POP POP PUSH2 0x9D6 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x9B6 PUSH1 0x40 DUP9 ADD DUP9 PUSH2 0x13A7 JUMP JUMPDEST PUSH2 0x9C1 SWAP3 SWAP2 POP PUSH2 0x1407 JUMP JUMPDEST DUP4 LT ISZERO PUSH2 0x9D6 JUMPI DUP3 PUSH2 0x9D2 DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP4 POP POP JUMPDEST DUP1 PUSH2 0x9E0 DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x8DF JUMP JUMPDEST POP DUP5 PUSH1 0xC0 ADD CALLDATALOAD DUP4 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x9FF SWAP2 SWAP1 PUSH2 0x1611 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 EQ SWAP4 POP POP POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0xC0 DUP3 ADD CALLDATALOAD PUSH2 0xA32 PUSH1 0xA0 DUP5 ADD DUP5 PUSH2 0x13A7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xA43 SWAP3 SWAP2 SWAP1 PUSH2 0x165B JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 EQ SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 DUP1 PUSH2 0xA71 DUP8 PUSH2 0x1C5 JUMP JUMPDEST SWAP2 POP SWAP2 POP DUP2 PUSH2 0xA87 JUMPI PUSH1 0x0 SWAP4 POP SWAP2 POP PUSH2 0xB92 SWAP1 POP JUMP JUMPDEST PUSH2 0xA91 DUP8 DUP7 PUSH2 0xB9A JUMP JUMPDEST PUSH2 0xAD8 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x12 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x496E76616C6964207369676E6174757265730000000000000000000000000000 DUP2 MSTORE POP SWAP4 POP SWAP4 POP POP POP PUSH2 0xB92 JUMP JUMPDEST PUSH2 0xAE2 DUP8 DUP8 PUSH2 0x6EC JUMP JUMPDEST PUSH2 0xB29 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x15 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x496E76616C69642067726F7570206D656D626572730000000000000000000000 DUP2 MSTORE POP SWAP4 POP SWAP4 POP POP POP PUSH2 0xB92 JUMP JUMPDEST PUSH2 0xB32 DUP8 PUSH2 0x854 JUMP JUMPDEST PUSH2 0xB79 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x14 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x496E76616C6964206D656D626572732068617368000000000000000000000000 DUP2 MSTORE POP SWAP4 POP SWAP4 POP POP POP PUSH2 0xB92 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP4 POP SWAP4 POP POP POP JUMPDEST SWAP4 POP SWAP4 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0xC31 CHAINID PUSH2 0xBAE PUSH1 0x20 DUP8 ADD DUP8 PUSH2 0x1360 JUMP JUMPDEST PUSH2 0xBBB PUSH1 0x40 DUP10 ADD DUP10 PUSH2 0x13A7 JUMP JUMPDEST DUP9 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xBD1 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x16A6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE DUP3 DUP3 MSTORE DUP1 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD KECCAK256 PUSH32 0x19457468657265756D205369676E6564204D6573736167653A0A333200000000 DUP5 DUP4 ADD MSTORE PUSH1 0x3C DUP1 DUP6 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP3 MLOAD DUP1 DUP6 SUB SWAP1 SWAP2 ADD DUP2 MSTORE PUSH1 0x5C SWAP1 SWAP4 ADD SWAP1 SWAP2 MSTORE DUP2 MLOAD SWAP2 ADD KECCAK256 SWAP1 JUMP JUMPDEST SWAP1 POP CALLDATASIZE PUSH1 0x0 PUSH2 0xC43 PUSH1 0x80 DUP8 ADD DUP8 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP PUSH1 0x0 DUP2 PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xC63 JUMPI PUSH2 0xC63 PUSH2 0x14BF JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xC8C JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0xD29 JUMPI PUSH2 0xCA7 PUSH1 0xA0 DUP10 ADD DUP10 PUSH2 0x13A7 JUMP JUMPDEST PUSH1 0x1 DUP7 DUP7 DUP6 DUP2 DUP2 LT PUSH2 0xCBB JUMPI PUSH2 0xCBB PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD PUSH2 0xCCC SWAP2 SWAP1 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0xCDB JUMPI PUSH2 0xCDB PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0xCF0 SWAP2 SWAP1 PUSH2 0x15DB JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xD02 JUMPI PUSH2 0xD02 PUSH2 0x141A JUMP JUMPDEST PUSH4 0xFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP2 SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE DUP1 PUSH2 0xD21 DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0xC92 JUMP JUMPDEST POP PUSH1 0x40 MLOAD PUSH32 0xF7F9A8FA00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 AND SWAP1 PUSH4 0xF7F9A8FA SWAP1 PUSH2 0xD92 SWAP1 DUP6 SWAP1 PUSH1 0x4 ADD PUSH2 0x1611 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xDAF JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0xDD7 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x172D JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH1 0x0 PUSH1 0x41 PUSH2 0xDEB DUP12 DUP5 ADD DUP13 PUSH2 0x1360 JUMP JUMPDEST PUSH2 0xDF6 SWAP3 SWAP2 POP PUSH2 0x1497 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xEC5 JUMPI PUSH2 0xE5E PUSH2 0xE11 DUP3 PUSH1 0x41 PUSH2 0x17C9 JUMP JUMPDEST PUSH1 0x41 PUSH2 0xE20 PUSH1 0x60 DUP16 ADD DUP16 PUSH2 0x1360 JUMP JUMPDEST DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP5 SWAP4 SWAP3 POP POP PUSH2 0xED6 SWAP1 POP JUMP JUMPDEST SWAP3 POP PUSH1 0x0 PUSH2 0xE6C DUP10 DUP6 PUSH2 0xF8B JUMP JUMPDEST SWAP1 POP DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xE8A JUMPI PUSH2 0xE8A PUSH2 0x141A JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0xEB2 JUMPI PUSH1 0x0 SWAP10 POP POP POP POP POP POP POP POP POP POP PUSH2 0x84E JUMP JUMPDEST POP DUP1 PUSH2 0xEBD DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0xDFB JUMP JUMPDEST POP PUSH1 0x1 SWAP11 SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0xEE4 DUP4 DUP6 PUSH2 0x17E0 JUMP JUMPDEST SWAP1 POP DUP4 DUP2 GT DUP1 ISZERO PUSH2 0xEF6 JUMPI POP DUP1 DUP6 MLOAD LT ISZERO JUMPDEST PUSH2 0xF47 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x13 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x536C696365206F7574206F6620626F756E647300000000000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x40 MLOAD SWAP2 POP DUP3 PUSH1 0x40 DUP4 ADD ADD PUSH1 0x40 MSTORE DUP3 DUP3 MSTORE DUP4 DUP6 ADD DUP3 SUB DUP5 PUSH1 0x20 DUP8 ADD ADD DUP5 DUP2 ADD JUMPDEST DUP1 DUP3 LT ISZERO PUSH2 0xF80 JUMPI DUP2 MLOAD DUP4 DUP4 ADD MSTORE PUSH1 0x20 DUP3 ADD SWAP2 POP PUSH2 0xF67 JUMP JUMPDEST POP POP POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0xF9A DUP6 DUP6 PUSH2 0xFAF JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0xFA7 DUP2 PUSH2 0xFF4 JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 MLOAD PUSH1 0x41 SUB PUSH2 0xFE5 JUMPI PUSH1 0x20 DUP4 ADD MLOAD PUSH1 0x40 DUP5 ADD MLOAD PUSH1 0x60 DUP6 ADD MLOAD PUSH1 0x0 BYTE PUSH2 0xFD9 DUP8 DUP3 DUP6 DUP6 PUSH2 0x115C JUMP JUMPDEST SWAP5 POP SWAP5 POP POP POP POP PUSH2 0xFED JUMP JUMPDEST POP PUSH1 0x0 SWAP1 POP PUSH1 0x2 JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x1008 JUMPI PUSH2 0x1008 PUSH2 0x17F3 JUMP JUMPDEST SUB PUSH2 0x1010 JUMPI POP JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x1024 JUMPI PUSH2 0x1024 PUSH2 0x17F3 JUMP JUMPDEST SUB PUSH2 0x1071 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x18 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x45434453413A20696E76616C6964207369676E61747572650000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0xF3E JUMP JUMPDEST PUSH1 0x2 DUP2 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x1085 JUMPI PUSH2 0x1085 PUSH2 0x17F3 JUMP JUMPDEST SUB PUSH2 0x10D2 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1F PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x45434453413A20696E76616C6964207369676E6174757265206C656E67746800 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0xF3E JUMP JUMPDEST PUSH1 0x3 DUP2 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x10E6 JUMPI PUSH2 0x10E6 PUSH2 0x17F3 JUMP JUMPDEST SUB PUSH2 0x1159 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x22 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x45434453413A20696E76616C6964207369676E6174757265202773272076616C PUSH1 0x44 DUP3 ADD MSTORE PUSH32 0x7565000000000000000000000000000000000000000000000000000000000000 PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0xF3E JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH32 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0 DUP4 GT ISZERO PUSH2 0x1193 JUMPI POP PUSH1 0x0 SWAP1 POP PUSH1 0x3 PUSH2 0x1217 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP1 DUP5 MSTORE DUP10 SWAP1 MSTORE PUSH1 0xFF DUP9 AND SWAP3 DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x60 DUP2 ADD DUP7 SWAP1 MSTORE PUSH1 0x80 DUP2 ADD DUP6 SWAP1 MSTORE PUSH1 0x1 SWAP1 PUSH1 0xA0 ADD PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x11E7 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x1210 JUMPI PUSH1 0x0 PUSH1 0x1 SWAP3 POP SWAP3 POP POP PUSH2 0x1217 JUMP JUMPDEST SWAP2 POP PUSH1 0x0 SWAP1 POP JUMPDEST SWAP5 POP SWAP5 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0xE0 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1232 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x124A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1261 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x126D DUP5 DUP3 DUP6 ADD PUSH2 0x1220 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST DUP3 ISZERO ISZERO DUP2 MSTORE PUSH1 0x0 PUSH1 0x20 PUSH1 0x40 DUP2 DUP5 ADD MSTORE DUP4 MLOAD DUP1 PUSH1 0x40 DUP6 ADD MSTORE PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x12AB JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x60 ADD MSTORE DUP3 ADD PUSH2 0x128F JUMP JUMPDEST POP PUSH1 0x0 PUSH1 0x60 DUP3 DUP7 ADD ADD MSTORE PUSH1 0x60 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND DUP6 ADD ADD SWAP3 POP POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x12E0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x12F7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1303 DUP6 DUP3 DUP7 ADD PUSH2 0x1220 JUMP JUMPDEST SWAP6 PUSH1 0x20 SWAP5 SWAP1 SWAP5 ADD CALLDATALOAD SWAP5 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x1327 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x133E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x134A DUP7 DUP3 DUP8 ADD PUSH2 0x1220 JUMP JUMPDEST SWAP7 PUSH1 0x20 DUP7 ADD CALLDATALOAD SWAP7 POP PUSH1 0x40 SWAP1 SWAP6 ADD CALLDATALOAD SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0x1377 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1392 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP CALLDATASIZE DUP2 SWAP1 SUB DUP3 SGT ISZERO PUSH2 0xFED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0x13BE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x13D9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP PUSH1 0x5 DUP2 SWAP1 SHL CALLDATASIZE SUB DUP3 SGT ISZERO PUSH2 0xFED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST DUP2 DUP2 SUB DUP2 DUP2 GT ISZERO PUSH2 0x84E JUMPI PUSH2 0x84E PUSH2 0x13F1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x1441 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1458 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1461 DUP3 PUSH2 0x1430 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP3 ADD PUSH2 0x147A JUMPI PUSH2 0x147A PUSH2 0x13F1 JUMP JUMPDEST POP PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x12 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x14A6 JUMPI PUSH2 0x14A6 PUSH2 0x1481 JUMP JUMPDEST POP DIV SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x14BA JUMPI PUSH2 0x14BA PUSH2 0x1481 JUMP JUMPDEST POP MOD SWAP1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x14FE JUMPI PUSH2 0x14FE PUSH2 0x14BF JUMP JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1520 JUMPI PUSH2 0x1520 PUSH2 0x14BF JUMP JUMPDEST POP PUSH1 0x5 SHL PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x1159 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x154F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1566 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD PUSH1 0x1F DUP2 ADD DUP6 SGT PUSH2 0x1577 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 MLOAD PUSH2 0x158A PUSH2 0x1585 DUP3 PUSH2 0x1506 JUMP JUMPDEST PUSH2 0x14D5 JUMP JUMPDEST DUP2 DUP2 MSTORE PUSH1 0x5 SWAP2 SWAP1 SWAP2 SHL DUP3 ADD DUP4 ADD SWAP1 DUP4 DUP2 ADD SWAP1 DUP8 DUP4 GT ISZERO PUSH2 0x15A9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 DUP5 ADD SWAP3 JUMPDEST DUP3 DUP5 LT ISZERO PUSH2 0x15D0 JUMPI DUP4 MLOAD PUSH2 0x15C1 DUP2 PUSH2 0x152A JUMP JUMPDEST DUP3 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP1 DUP5 ADD SWAP1 PUSH2 0x15AE JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x15ED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1461 DUP2 PUSH2 0x152A JUMP JUMPDEST PUSH1 0xFF DUP3 DUP2 AND DUP3 DUP3 AND SUB SWAP1 DUP2 GT ISZERO PUSH2 0x84E JUMPI PUSH2 0x84E PUSH2 0x13F1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP3 MLOAD DUP3 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP2 SWAP1 DUP5 DUP3 ADD SWAP1 PUSH1 0x40 DUP6 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x164F JUMPI DUP4 MLOAD PUSH4 0xFFFFFFFF AND DUP4 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP2 DUP5 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0x162D JUMP JUMPDEST POP SWAP1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 DUP2 ADD DUP4 SWAP1 MSTORE PUSH1 0x0 SWAP1 DUP5 PUSH1 0x40 DUP5 ADD DUP4 JUMPDEST DUP7 DUP2 LT ISZERO PUSH2 0x169B JUMPI DUP3 CALLDATALOAD PUSH2 0x1683 DUP2 PUSH2 0x152A JUMP JUMPDEST PUSH4 0xFFFFFFFF AND DUP3 MSTORE SWAP2 DUP4 ADD SWAP2 SWAP1 DUP4 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x1670 JUMP JUMPDEST POP SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST DUP7 DUP2 MSTORE PUSH1 0x0 PUSH1 0x20 PUSH1 0x80 DUP2 DUP5 ADD MSTORE DUP7 PUSH1 0x80 DUP5 ADD MSTORE DUP7 DUP9 PUSH1 0xA0 DUP6 ADD CALLDATACOPY PUSH1 0x0 PUSH1 0xA0 DUP9 DUP6 ADD DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP11 ADD AND DUP6 ADD DUP6 DUP2 SUB DUP3 ADD PUSH1 0x40 DUP8 ADD MSTORE SWAP1 DUP2 ADD DUP8 SWAP1 MSTORE DUP8 SWAP2 SWAP1 PUSH1 0xC0 ADD JUMPDEST DUP8 DUP3 LT ISZERO PUSH2 0x1715 JUMPI PUSH1 0xFF PUSH2 0x1700 DUP5 PUSH2 0x1430 JUMP JUMPDEST AND DUP2 MSTORE SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD SWAP1 DUP4 ADD PUSH2 0x16ED JUMP JUMPDEST DUP1 SWAP5 POP POP POP POP POP DUP3 PUSH1 0x60 DUP4 ADD MSTORE SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x1740 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1757 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD PUSH1 0x1F DUP2 ADD DUP6 SGT PUSH2 0x1768 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 MLOAD PUSH2 0x1776 PUSH2 0x1585 DUP3 PUSH2 0x1506 JUMP JUMPDEST DUP2 DUP2 MSTORE PUSH1 0x5 SWAP2 SWAP1 SWAP2 SHL DUP3 ADD DUP4 ADD SWAP1 DUP4 DUP2 ADD SWAP1 DUP8 DUP4 GT ISZERO PUSH2 0x1795 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 DUP5 ADD SWAP3 JUMPDEST DUP3 DUP5 LT ISZERO PUSH2 0x15D0 JUMPI DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x17BA JUMPI PUSH1 0x0 DUP1 DUP2 REVERT JUMPDEST DUP3 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP1 DUP5 ADD SWAP1 PUSH2 0x179A JUMP JUMPDEST DUP1 DUP3 MUL DUP2 ISZERO DUP3 DUP3 DIV DUP5 EQ OR PUSH2 0x84E JUMPI PUSH2 0x84E PUSH2 0x13F1 JUMP JUMPDEST DUP1 DUP3 ADD DUP1 DUP3 GT ISZERO PUSH2 0x84E JUMPI PUSH2 0x84E PUSH2 0x13F1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x21 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT INVALID SLOAD PUSH16 0x6F206D616E79206D656D62657273206D PUSH10 0x736265686176696E6720 PUSH5 0x7572696E67 KECCAK256 DIFFICULTY 0x4B SELFBALANCE NUMBER PUSH16 0x72727570746564206D69736265686176 PUSH6 0x64206D656D62 PUSH6 0x727320696E64 PUSH10 0x636573A2646970667358 0x22 SLT KECCAK256 COINBASE JUMPDEST SSTORE 0xCF PUSH22 0x1A3504ED115144C6AA809F8C56C6F584CF33C4AD0052 0xC9 DUP5 TIMESTAMP 0xBC PUSH31 0x64736F6C634300081100330000000000000000000000000000000000000000 ",
790
790
  "sourceMap": "3178:10080:5:-:0;;;4472:89;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;4524:30:5;;;3178:10080;;14:313:123;107:6;160:2;148:9;139:7;135:23;131:32;128:52;;;176:1;173;166:12;128:52;202:16;;-1:-1:-1;;;;;247:31:123;;237:42;;227:70;;293:1;290;283:12;227:70;316:5;14:313;-1:-1:-1;;;14:313:123:o;:::-;3178:10080:5;;;;;;;;;;;;;;;;;;;;;;"
791
791
  },
792
792
  "deployedBytecode": {
793
793
  "functionDebugData": {
794
- "@_throwError_20306": {
794
+ "@_throwError_20310": {
795
795
  "entryPoint": 4084,
796
- "id": 20306,
796
+ "id": 20310,
797
797
  "parameterSlots": 1,
798
798
  "returnSlots": 0
799
799
  },
@@ -821,9 +821,9 @@
821
821
  "parameterSlots": 0,
822
822
  "returnSlots": 0
823
823
  },
824
- "@recover_20379": {
824
+ "@recover_20383": {
825
825
  "entryPoint": 3979,
826
- "id": 20379,
826
+ "id": 20383,
827
827
  "parameterSlots": 2,
828
828
  "returnSlots": 1
829
829
  },
@@ -833,9 +833,9 @@
833
833
  "parameterSlots": 0,
834
834
  "returnSlots": 0
835
835
  },
836
- "@slice_8913": {
836
+ "@slice_8915": {
837
837
  "entryPoint": 3798,
838
- "id": 8913,
838
+ "id": 8915,
839
839
  "parameterSlots": 3,
840
840
  "returnSlots": 1
841
841
  },
@@ -845,21 +845,21 @@
845
845
  "parameterSlots": 0,
846
846
  "returnSlots": 0
847
847
  },
848
- "@toEthSignedMessageHash_20570": {
848
+ "@toEthSignedMessageHash_20574": {
849
849
  "entryPoint": null,
850
- "id": 20570,
850
+ "id": 20574,
851
851
  "parameterSlots": 1,
852
852
  "returnSlots": 1
853
853
  },
854
- "@tryRecover_20352": {
854
+ "@tryRecover_20356": {
855
855
  "entryPoint": 4015,
856
- "id": 20352,
856
+ "id": 20356,
857
857
  "parameterSlots": 2,
858
858
  "returnSlots": 2
859
859
  },
860
- "@tryRecover_20520": {
860
+ "@tryRecover_20524": {
861
861
  "entryPoint": 4444,
862
- "id": 20520,
862
+ "id": 20524,
863
863
  "parameterSlots": 4,
864
864
  "returnSlots": 2
865
865
  },
@@ -911,19 +911,19 @@
911
911
  "parameterSlots": 2,
912
912
  "returnSlots": 1
913
913
  },
914
- "abi_decode_tuple_t_struct$_Result_$6858_calldata_ptr": {
914
+ "abi_decode_tuple_t_struct$_Result_$6860_calldata_ptr": {
915
915
  "entryPoint": 4664,
916
916
  "id": null,
917
917
  "parameterSlots": 2,
918
918
  "returnSlots": 1
919
919
  },
920
- "abi_decode_tuple_t_struct$_Result_$6858_calldata_ptrt_uint256": {
920
+ "abi_decode_tuple_t_struct$_Result_$6860_calldata_ptrt_uint256": {
921
921
  "entryPoint": 4813,
922
922
  "id": null,
923
923
  "parameterSlots": 2,
924
924
  "returnSlots": 2
925
925
  },
926
- "abi_decode_tuple_t_struct$_Result_$6858_calldata_ptrt_uint256t_uint256": {
926
+ "abi_decode_tuple_t_struct$_Result_$6860_calldata_ptrt_uint256t_uint256": {
927
927
  "entryPoint": 4882,
928
928
  "id": null,
929
929
  "parameterSlots": 2,
@@ -983,7 +983,7 @@
983
983
  "parameterSlots": 5,
984
984
  "returnSlots": 1
985
985
  },
986
- "abi_encode_tuple_t_contract$_SortitionPool_$11053__to_t_address__fromStack_reversed": {
986
+ "abi_encode_tuple_t_contract$_SortitionPool_$11057__to_t_address__fromStack_reversed": {
987
987
  "entryPoint": null,
988
988
  "id": null,
989
989
  "parameterSlots": 2,
@@ -1599,7 +1599,7 @@
1599
1599
  }
1600
1600
  ]
1601
1601
  },
1602
- "name": "abi_decode_tuple_t_struct$_Result_$6858_calldata_ptr",
1602
+ "name": "abi_decode_tuple_t_struct$_Result_$6860_calldata_ptr",
1603
1603
  "nodeType": "YulFunctionDefinition",
1604
1604
  "parameters": [
1605
1605
  {
@@ -2465,7 +2465,7 @@
2465
2465
  }
2466
2466
  ]
2467
2467
  },
2468
- "name": "abi_decode_tuple_t_struct$_Result_$6858_calldata_ptrt_uint256",
2468
+ "name": "abi_decode_tuple_t_struct$_Result_$6860_calldata_ptrt_uint256",
2469
2469
  "nodeType": "YulFunctionDefinition",
2470
2470
  "parameters": [
2471
2471
  {
@@ -2695,7 +2695,7 @@
2695
2695
  }
2696
2696
  ]
2697
2697
  },
2698
- "name": "abi_encode_tuple_t_contract$_SortitionPool_$11053__to_t_address__fromStack_reversed",
2698
+ "name": "abi_encode_tuple_t_contract$_SortitionPool_$11057__to_t_address__fromStack_reversed",
2699
2699
  "nodeType": "YulFunctionDefinition",
2700
2700
  "parameters": [
2701
2701
  {
@@ -3034,7 +3034,7 @@
3034
3034
  }
3035
3035
  ]
3036
3036
  },
3037
- "name": "abi_decode_tuple_t_struct$_Result_$6858_calldata_ptrt_uint256t_uint256",
3037
+ "name": "abi_decode_tuple_t_struct$_Result_$6860_calldata_ptrt_uint256t_uint256",
3038
3038
  "nodeType": "YulFunctionDefinition",
3039
3039
  "parameters": [
3040
3040
  {
@@ -11974,7 +11974,7 @@
11974
11974
  }
11975
11975
  ]
11976
11976
  },
11977
- "contents": "{\n { }\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n function abi_decode_struct_Result_calldata(offset, end) -> value\n {\n if slt(sub(end, offset), 224) { revert(0, 0) }\n value := offset\n }\n function abi_decode_tuple_t_struct$_Result_$6858_calldata_ptr(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let offset := calldataload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n value0 := abi_decode_struct_Result_calldata(add(headStart, offset), dataEnd)\n }\n function abi_encode_tuple_t_bool_t_string_memory_ptr__to_t_bool_t_string_memory_ptr__fromStack_reversed(headStart, value1, value0) -> tail\n {\n mstore(headStart, iszero(iszero(value0)))\n let _1 := 32\n mstore(add(headStart, _1), 64)\n let length := mload(value1)\n mstore(add(headStart, 64), length)\n let i := 0\n for { } lt(i, length) { i := add(i, _1) }\n {\n mstore(add(add(headStart, i), 96), mload(add(add(value1, i), _1)))\n }\n mstore(add(add(headStart, length), 96), 0)\n tail := add(add(headStart, and(add(length, 31), not(31))), 96)\n }\n function abi_decode_tuple_t_struct$_Result_$6858_calldata_ptrt_uint256(headStart, dataEnd) -> value0, value1\n {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n let offset := calldataload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n value0 := abi_decode_struct_Result_calldata(add(headStart, offset), dataEnd)\n value1 := calldataload(add(headStart, 32))\n }\n function abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, iszero(iszero(value0)))\n }\n function abi_encode_tuple_t_contract$_SortitionPool_$11053__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, 0xffffffffffffffffffffffffffffffffffffffff))\n }\n function abi_decode_tuple_t_struct$_Result_$6858_calldata_ptrt_uint256t_uint256(headStart, dataEnd) -> value0, value1, value2\n {\n if slt(sub(dataEnd, headStart), 96) { revert(0, 0) }\n let offset := calldataload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n value0 := abi_decode_struct_Result_calldata(add(headStart, offset), dataEnd)\n value1 := calldataload(add(headStart, 32))\n value2 := calldataload(add(headStart, 64))\n }\n function access_calldata_tail_t_bytes_calldata_ptr(base_ref, ptr_to_tail) -> addr, length\n {\n let rel_offset_of_tail := calldataload(ptr_to_tail)\n if iszero(slt(rel_offset_of_tail, add(sub(calldatasize(), base_ref), not(30)))) { revert(0, 0) }\n let addr_1 := add(base_ref, rel_offset_of_tail)\n length := calldataload(addr_1)\n if gt(length, 0xffffffffffffffff) { revert(0, 0) }\n addr := add(addr_1, 0x20)\n if sgt(addr, sub(calldatasize(), length)) { revert(0, 0) }\n }\n function access_calldata_tail_t_array$_t_uint8_$dyn_calldata_ptr(base_ref, ptr_to_tail) -> addr, length\n {\n let rel_offset_of_tail := calldataload(ptr_to_tail)\n if iszero(slt(rel_offset_of_tail, add(sub(calldatasize(), base_ref), not(30)))) { revert(0, 0) }\n let addr_1 := add(base_ref, rel_offset_of_tail)\n length := calldataload(addr_1)\n if gt(length, 0xffffffffffffffff) { revert(0, 0) }\n addr := add(addr_1, 0x20)\n if sgt(addr, sub(calldatasize(), shl(5, length))) { revert(0, 0) }\n }\n function panic_error_0x11()\n {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n function checked_sub_t_uint256(x, y) -> diff\n {\n diff := sub(x, y)\n if gt(diff, x) { panic_error_0x11() }\n }\n function panic_error_0x32()\n {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x32)\n revert(0, 0x24)\n }\n function abi_decode_uint8(offset) -> value\n {\n value := calldataload(offset)\n if iszero(eq(value, and(value, 0xff))) { revert(0, 0) }\n }\n function abi_decode_tuple_t_uint8(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := abi_decode_uint8(headStart)\n }\n function increment_t_uint256(value) -> ret\n {\n if eq(value, not(0)) { panic_error_0x11() }\n ret := add(value, 1)\n }\n function panic_error_0x12()\n {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x12)\n revert(0, 0x24)\n }\n function checked_div_t_uint256(x, y) -> r\n {\n if iszero(y) { panic_error_0x12() }\n r := div(x, y)\n }\n function mod_t_uint256(x, y) -> r\n {\n if iszero(y) { panic_error_0x12() }\n r := mod(x, y)\n }\n function access_calldata_tail_t_array$_t_uint256_$dyn_calldata_ptr(base_ref, ptr_to_tail) -> addr, length\n {\n let rel_offset_of_tail := calldataload(ptr_to_tail)\n if iszero(slt(rel_offset_of_tail, add(sub(calldatasize(), base_ref), not(30)))) { revert(0, 0) }\n let addr_1 := add(base_ref, rel_offset_of_tail)\n length := calldataload(addr_1)\n if gt(length, 0xffffffffffffffff) { revert(0, 0) }\n addr := add(addr_1, 0x20)\n if sgt(addr, sub(calldatasize(), shl(5, length))) { revert(0, 0) }\n }\n function access_calldata_tail_t_array$_t_uint32_$dyn_calldata_ptr(base_ref, ptr_to_tail) -> addr, length\n {\n let rel_offset_of_tail := calldataload(ptr_to_tail)\n if iszero(slt(rel_offset_of_tail, add(sub(calldatasize(), base_ref), not(30)))) { revert(0, 0) }\n let addr_1 := add(base_ref, rel_offset_of_tail)\n length := calldataload(addr_1)\n if gt(length, 0xffffffffffffffff) { revert(0, 0) }\n addr := add(addr_1, 0x20)\n if sgt(addr, sub(calldatasize(), shl(5, length))) { revert(0, 0) }\n }\n function abi_encode_tuple_t_uint256_t_bytes32__to_t_uint256_t_bytes32__fromStack_reversed(headStart, value1, value0) -> tail\n {\n tail := add(headStart, 64)\n mstore(headStart, value0)\n mstore(add(headStart, 32), value1)\n }\n function panic_error_0x41()\n {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n function allocate_memory(size) -> memPtr\n {\n memPtr := mload(64)\n let newFreePtr := add(memPtr, and(add(size, 31), not(31)))\n if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n }\n function array_allocation_size_array_uint32_dyn(length) -> size\n {\n if gt(length, 0xffffffffffffffff) { panic_error_0x41() }\n size := add(shl(5, length), 0x20)\n }\n function validator_revert_uint32(value)\n {\n if iszero(eq(value, and(value, 0xffffffff))) { revert(0, 0) }\n }\n function abi_decode_tuple_t_array$_t_uint32_$dyn_memory_ptr_fromMemory(headStart, dataEnd) -> value0\n {\n let _1 := 32\n if slt(sub(dataEnd, headStart), _1) { revert(0, 0) }\n let offset := mload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n let _2 := add(headStart, offset)\n if iszero(slt(add(_2, 0x1f), dataEnd)) { revert(0, 0) }\n let _3 := mload(_2)\n let dst := allocate_memory(array_allocation_size_array_uint32_dyn(_3))\n let dst_1 := dst\n mstore(dst, _3)\n dst := add(dst, _1)\n let srcEnd := add(add(_2, shl(5, _3)), _1)\n if gt(srcEnd, dataEnd) { revert(0, 0) }\n let src := add(_2, _1)\n for { } lt(src, srcEnd) { src := add(src, _1) }\n {\n let value := mload(src)\n validator_revert_uint32(value)\n mstore(dst, value)\n dst := add(dst, _1)\n }\n value0 := dst_1\n }\n function abi_decode_tuple_t_uint32(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := calldataload(headStart)\n validator_revert_uint32(value)\n value0 := value\n }\n function checked_sub_t_uint8(x, y) -> diff\n {\n diff := sub(and(x, 0xff), and(y, 0xff))\n if gt(diff, 0xff) { panic_error_0x11() }\n }\n function abi_encode_tuple_t_array$_t_uint32_$dyn_memory_ptr__to_t_array$_t_uint32_$dyn_memory_ptr__fromStack_reversed(headStart, value0) -> tail\n {\n let _1 := 32\n let tail_1 := add(headStart, _1)\n mstore(headStart, _1)\n let pos := tail_1\n let length := mload(value0)\n mstore(tail_1, length)\n pos := add(headStart, 64)\n let srcPtr := add(value0, _1)\n let i := 0\n for { } lt(i, length) { i := add(i, 1) }\n {\n mstore(pos, and(mload(srcPtr), 0xffffffff))\n pos := add(pos, _1)\n srcPtr := add(srcPtr, _1)\n }\n tail := pos\n }\n function abi_encode_tuple_t_array$_t_uint32_$dyn_calldata_ptr__to_t_array$_t_uint32_$dyn_memory_ptr__fromStack_reversed(headStart, value1, value0) -> tail\n {\n let _1 := 32\n let tail_1 := add(headStart, _1)\n mstore(headStart, _1)\n let pos := tail_1\n mstore(tail_1, value1)\n pos := add(headStart, 64)\n let srcPtr := value0\n let i := 0\n for { } lt(i, value1) { i := add(i, 1) }\n {\n let value := calldataload(srcPtr)\n validator_revert_uint32(value)\n mstore(pos, and(value, 0xffffffff))\n pos := add(pos, _1)\n srcPtr := add(srcPtr, _1)\n }\n tail := pos\n }\n function abi_encode_tuple_t_uint256_t_bytes_calldata_ptr_t_array$_t_uint8_$dyn_calldata_ptr_t_uint256__to_t_uint256_t_bytes_memory_ptr_t_array$_t_uint8_$dyn_memory_ptr_t_uint256__fromStack_reversed(headStart, value5, value4, value3, value2, value1, value0) -> tail\n {\n mstore(headStart, value0)\n let _1 := 32\n mstore(add(headStart, _1), 128)\n mstore(add(headStart, 128), value2)\n calldatacopy(add(headStart, 160), value1, value2)\n mstore(add(add(headStart, value2), 160), 0)\n let _2 := add(headStart, and(add(value2, 31), not(31)))\n let end := add(_2, 160)\n mstore(add(headStart, 64), add(sub(_2, headStart), 160))\n let pos := end\n mstore(end, value4)\n pos := add(_2, 192)\n let srcPtr := value3\n let i := 0\n for { } lt(i, value4) { i := add(i, 1) }\n {\n mstore(pos, and(abi_decode_uint8(srcPtr), 0xff))\n pos := add(pos, _1)\n srcPtr := add(srcPtr, _1)\n }\n tail := pos\n mstore(add(headStart, 96), value5)\n }\n function abi_decode_tuple_t_array$_t_address_$dyn_memory_ptr_fromMemory(headStart, dataEnd) -> value0\n {\n let _1 := 32\n if slt(sub(dataEnd, headStart), _1) { revert(0, 0) }\n let offset := mload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n let _2 := add(headStart, offset)\n if iszero(slt(add(_2, 0x1f), dataEnd)) { revert(0, 0) }\n let _3 := mload(_2)\n let dst := allocate_memory(array_allocation_size_array_uint32_dyn(_3))\n let dst_1 := dst\n mstore(dst, _3)\n dst := add(dst, _1)\n let srcEnd := add(add(_2, shl(5, _3)), _1)\n if gt(srcEnd, dataEnd) { revert(0, 0) }\n let src := add(_2, _1)\n for { } lt(src, srcEnd) { src := add(src, _1) }\n {\n let value := mload(src)\n if iszero(eq(value, and(value, 0xffffffffffffffffffffffffffffffffffffffff)))\n {\n let _4 := 0\n revert(_4, _4)\n }\n mstore(dst, value)\n dst := add(dst, _1)\n }\n value0 := dst_1\n }\n function checked_mul_t_uint256(x, y) -> product\n {\n product := mul(x, y)\n if iszero(or(iszero(x), eq(y, div(product, x)))) { panic_error_0x11() }\n }\n function abi_encode_tuple_packed_t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73_t_bytes32__to_t_string_memory_ptr_t_bytes32__nonPadded_inplace_fromStack_reversed(pos, value0) -> end\n {\n mstore(pos, 0x19457468657265756d205369676e6564204d6573736167653a0a333200000000)\n mstore(add(pos, 28), value0)\n end := add(pos, 60)\n }\n function checked_add_t_uint256(x, y) -> sum\n {\n sum := add(x, y)\n if gt(x, sum) { panic_error_0x11() }\n }\n function abi_encode_tuple_t_stringliteral_f1c269d7eab972b2fd4d87a15c317e920493e7eea923de7e48c0ebcb7f611fa9__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 19)\n mstore(add(headStart, 64), \"Slice out of bounds\")\n tail := add(headStart, 96)\n }\n function panic_error_0x21()\n {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x21)\n revert(0, 0x24)\n }\n function abi_encode_tuple_t_stringliteral_00043f6bf76368aa97c21698e9b9d4779e31902453daccf3525ddfb36e53e2be__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 24)\n mstore(add(headStart, 64), \"ECDSA: invalid signature\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_1669ff3ba3cdf64474e1193492d05b8434e29b0b495e60095eb5f5c8ec14ce77__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 31)\n mstore(add(headStart, 64), \"ECDSA: invalid signature length\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_520d1f787dbcafbbfc007fd2c4ecf3d2711ec587f3ee9a1215c0b646c3e530bd__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 34)\n mstore(add(headStart, 64), \"ECDSA: invalid signature 's' val\")\n mstore(add(headStart, 96), \"ue\")\n tail := add(headStart, 128)\n }\n function abi_encode_tuple_t_bytes32_t_uint8_t_bytes32_t_bytes32__to_t_bytes32_t_uint8_t_bytes32_t_bytes32__fromStack_reversed(headStart, value3, value2, value1, value0) -> tail\n {\n tail := add(headStart, 128)\n mstore(headStart, value0)\n mstore(add(headStart, 32), and(value1, 0xff))\n mstore(add(headStart, 64), value2)\n mstore(add(headStart, 96), value3)\n }\n}",
11977
+ "contents": "{\n { }\n function abi_encode_tuple_t_uint256__to_t_uint256__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, value0)\n }\n function abi_decode_struct_Result_calldata(offset, end) -> value\n {\n if slt(sub(end, offset), 224) { revert(0, 0) }\n value := offset\n }\n function abi_decode_tuple_t_struct$_Result_$6860_calldata_ptr(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let offset := calldataload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n value0 := abi_decode_struct_Result_calldata(add(headStart, offset), dataEnd)\n }\n function abi_encode_tuple_t_bool_t_string_memory_ptr__to_t_bool_t_string_memory_ptr__fromStack_reversed(headStart, value1, value0) -> tail\n {\n mstore(headStart, iszero(iszero(value0)))\n let _1 := 32\n mstore(add(headStart, _1), 64)\n let length := mload(value1)\n mstore(add(headStart, 64), length)\n let i := 0\n for { } lt(i, length) { i := add(i, _1) }\n {\n mstore(add(add(headStart, i), 96), mload(add(add(value1, i), _1)))\n }\n mstore(add(add(headStart, length), 96), 0)\n tail := add(add(headStart, and(add(length, 31), not(31))), 96)\n }\n function abi_decode_tuple_t_struct$_Result_$6860_calldata_ptrt_uint256(headStart, dataEnd) -> value0, value1\n {\n if slt(sub(dataEnd, headStart), 64) { revert(0, 0) }\n let offset := calldataload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n value0 := abi_decode_struct_Result_calldata(add(headStart, offset), dataEnd)\n value1 := calldataload(add(headStart, 32))\n }\n function abi_encode_tuple_t_bool__to_t_bool__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, iszero(iszero(value0)))\n }\n function abi_encode_tuple_t_contract$_SortitionPool_$11057__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, 0xffffffffffffffffffffffffffffffffffffffff))\n }\n function abi_decode_tuple_t_struct$_Result_$6860_calldata_ptrt_uint256t_uint256(headStart, dataEnd) -> value0, value1, value2\n {\n if slt(sub(dataEnd, headStart), 96) { revert(0, 0) }\n let offset := calldataload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n value0 := abi_decode_struct_Result_calldata(add(headStart, offset), dataEnd)\n value1 := calldataload(add(headStart, 32))\n value2 := calldataload(add(headStart, 64))\n }\n function access_calldata_tail_t_bytes_calldata_ptr(base_ref, ptr_to_tail) -> addr, length\n {\n let rel_offset_of_tail := calldataload(ptr_to_tail)\n if iszero(slt(rel_offset_of_tail, add(sub(calldatasize(), base_ref), not(30)))) { revert(0, 0) }\n let addr_1 := add(base_ref, rel_offset_of_tail)\n length := calldataload(addr_1)\n if gt(length, 0xffffffffffffffff) { revert(0, 0) }\n addr := add(addr_1, 0x20)\n if sgt(addr, sub(calldatasize(), length)) { revert(0, 0) }\n }\n function access_calldata_tail_t_array$_t_uint8_$dyn_calldata_ptr(base_ref, ptr_to_tail) -> addr, length\n {\n let rel_offset_of_tail := calldataload(ptr_to_tail)\n if iszero(slt(rel_offset_of_tail, add(sub(calldatasize(), base_ref), not(30)))) { revert(0, 0) }\n let addr_1 := add(base_ref, rel_offset_of_tail)\n length := calldataload(addr_1)\n if gt(length, 0xffffffffffffffff) { revert(0, 0) }\n addr := add(addr_1, 0x20)\n if sgt(addr, sub(calldatasize(), shl(5, length))) { revert(0, 0) }\n }\n function panic_error_0x11()\n {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x11)\n revert(0, 0x24)\n }\n function checked_sub_t_uint256(x, y) -> diff\n {\n diff := sub(x, y)\n if gt(diff, x) { panic_error_0x11() }\n }\n function panic_error_0x32()\n {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x32)\n revert(0, 0x24)\n }\n function abi_decode_uint8(offset) -> value\n {\n value := calldataload(offset)\n if iszero(eq(value, and(value, 0xff))) { revert(0, 0) }\n }\n function abi_decode_tuple_t_uint8(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n value0 := abi_decode_uint8(headStart)\n }\n function increment_t_uint256(value) -> ret\n {\n if eq(value, not(0)) { panic_error_0x11() }\n ret := add(value, 1)\n }\n function panic_error_0x12()\n {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x12)\n revert(0, 0x24)\n }\n function checked_div_t_uint256(x, y) -> r\n {\n if iszero(y) { panic_error_0x12() }\n r := div(x, y)\n }\n function mod_t_uint256(x, y) -> r\n {\n if iszero(y) { panic_error_0x12() }\n r := mod(x, y)\n }\n function access_calldata_tail_t_array$_t_uint256_$dyn_calldata_ptr(base_ref, ptr_to_tail) -> addr, length\n {\n let rel_offset_of_tail := calldataload(ptr_to_tail)\n if iszero(slt(rel_offset_of_tail, add(sub(calldatasize(), base_ref), not(30)))) { revert(0, 0) }\n let addr_1 := add(base_ref, rel_offset_of_tail)\n length := calldataload(addr_1)\n if gt(length, 0xffffffffffffffff) { revert(0, 0) }\n addr := add(addr_1, 0x20)\n if sgt(addr, sub(calldatasize(), shl(5, length))) { revert(0, 0) }\n }\n function access_calldata_tail_t_array$_t_uint32_$dyn_calldata_ptr(base_ref, ptr_to_tail) -> addr, length\n {\n let rel_offset_of_tail := calldataload(ptr_to_tail)\n if iszero(slt(rel_offset_of_tail, add(sub(calldatasize(), base_ref), not(30)))) { revert(0, 0) }\n let addr_1 := add(base_ref, rel_offset_of_tail)\n length := calldataload(addr_1)\n if gt(length, 0xffffffffffffffff) { revert(0, 0) }\n addr := add(addr_1, 0x20)\n if sgt(addr, sub(calldatasize(), shl(5, length))) { revert(0, 0) }\n }\n function abi_encode_tuple_t_uint256_t_bytes32__to_t_uint256_t_bytes32__fromStack_reversed(headStart, value1, value0) -> tail\n {\n tail := add(headStart, 64)\n mstore(headStart, value0)\n mstore(add(headStart, 32), value1)\n }\n function panic_error_0x41()\n {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x41)\n revert(0, 0x24)\n }\n function allocate_memory(size) -> memPtr\n {\n memPtr := mload(64)\n let newFreePtr := add(memPtr, and(add(size, 31), not(31)))\n if or(gt(newFreePtr, 0xffffffffffffffff), lt(newFreePtr, memPtr)) { panic_error_0x41() }\n mstore(64, newFreePtr)\n }\n function array_allocation_size_array_uint32_dyn(length) -> size\n {\n if gt(length, 0xffffffffffffffff) { panic_error_0x41() }\n size := add(shl(5, length), 0x20)\n }\n function validator_revert_uint32(value)\n {\n if iszero(eq(value, and(value, 0xffffffff))) { revert(0, 0) }\n }\n function abi_decode_tuple_t_array$_t_uint32_$dyn_memory_ptr_fromMemory(headStart, dataEnd) -> value0\n {\n let _1 := 32\n if slt(sub(dataEnd, headStart), _1) { revert(0, 0) }\n let offset := mload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n let _2 := add(headStart, offset)\n if iszero(slt(add(_2, 0x1f), dataEnd)) { revert(0, 0) }\n let _3 := mload(_2)\n let dst := allocate_memory(array_allocation_size_array_uint32_dyn(_3))\n let dst_1 := dst\n mstore(dst, _3)\n dst := add(dst, _1)\n let srcEnd := add(add(_2, shl(5, _3)), _1)\n if gt(srcEnd, dataEnd) { revert(0, 0) }\n let src := add(_2, _1)\n for { } lt(src, srcEnd) { src := add(src, _1) }\n {\n let value := mload(src)\n validator_revert_uint32(value)\n mstore(dst, value)\n dst := add(dst, _1)\n }\n value0 := dst_1\n }\n function abi_decode_tuple_t_uint32(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := calldataload(headStart)\n validator_revert_uint32(value)\n value0 := value\n }\n function checked_sub_t_uint8(x, y) -> diff\n {\n diff := sub(and(x, 0xff), and(y, 0xff))\n if gt(diff, 0xff) { panic_error_0x11() }\n }\n function abi_encode_tuple_t_array$_t_uint32_$dyn_memory_ptr__to_t_array$_t_uint32_$dyn_memory_ptr__fromStack_reversed(headStart, value0) -> tail\n {\n let _1 := 32\n let tail_1 := add(headStart, _1)\n mstore(headStart, _1)\n let pos := tail_1\n let length := mload(value0)\n mstore(tail_1, length)\n pos := add(headStart, 64)\n let srcPtr := add(value0, _1)\n let i := 0\n for { } lt(i, length) { i := add(i, 1) }\n {\n mstore(pos, and(mload(srcPtr), 0xffffffff))\n pos := add(pos, _1)\n srcPtr := add(srcPtr, _1)\n }\n tail := pos\n }\n function abi_encode_tuple_t_array$_t_uint32_$dyn_calldata_ptr__to_t_array$_t_uint32_$dyn_memory_ptr__fromStack_reversed(headStart, value1, value0) -> tail\n {\n let _1 := 32\n let tail_1 := add(headStart, _1)\n mstore(headStart, _1)\n let pos := tail_1\n mstore(tail_1, value1)\n pos := add(headStart, 64)\n let srcPtr := value0\n let i := 0\n for { } lt(i, value1) { i := add(i, 1) }\n {\n let value := calldataload(srcPtr)\n validator_revert_uint32(value)\n mstore(pos, and(value, 0xffffffff))\n pos := add(pos, _1)\n srcPtr := add(srcPtr, _1)\n }\n tail := pos\n }\n function abi_encode_tuple_t_uint256_t_bytes_calldata_ptr_t_array$_t_uint8_$dyn_calldata_ptr_t_uint256__to_t_uint256_t_bytes_memory_ptr_t_array$_t_uint8_$dyn_memory_ptr_t_uint256__fromStack_reversed(headStart, value5, value4, value3, value2, value1, value0) -> tail\n {\n mstore(headStart, value0)\n let _1 := 32\n mstore(add(headStart, _1), 128)\n mstore(add(headStart, 128), value2)\n calldatacopy(add(headStart, 160), value1, value2)\n mstore(add(add(headStart, value2), 160), 0)\n let _2 := add(headStart, and(add(value2, 31), not(31)))\n let end := add(_2, 160)\n mstore(add(headStart, 64), add(sub(_2, headStart), 160))\n let pos := end\n mstore(end, value4)\n pos := add(_2, 192)\n let srcPtr := value3\n let i := 0\n for { } lt(i, value4) { i := add(i, 1) }\n {\n mstore(pos, and(abi_decode_uint8(srcPtr), 0xff))\n pos := add(pos, _1)\n srcPtr := add(srcPtr, _1)\n }\n tail := pos\n mstore(add(headStart, 96), value5)\n }\n function abi_decode_tuple_t_array$_t_address_$dyn_memory_ptr_fromMemory(headStart, dataEnd) -> value0\n {\n let _1 := 32\n if slt(sub(dataEnd, headStart), _1) { revert(0, 0) }\n let offset := mload(headStart)\n if gt(offset, 0xffffffffffffffff) { revert(0, 0) }\n let _2 := add(headStart, offset)\n if iszero(slt(add(_2, 0x1f), dataEnd)) { revert(0, 0) }\n let _3 := mload(_2)\n let dst := allocate_memory(array_allocation_size_array_uint32_dyn(_3))\n let dst_1 := dst\n mstore(dst, _3)\n dst := add(dst, _1)\n let srcEnd := add(add(_2, shl(5, _3)), _1)\n if gt(srcEnd, dataEnd) { revert(0, 0) }\n let src := add(_2, _1)\n for { } lt(src, srcEnd) { src := add(src, _1) }\n {\n let value := mload(src)\n if iszero(eq(value, and(value, 0xffffffffffffffffffffffffffffffffffffffff)))\n {\n let _4 := 0\n revert(_4, _4)\n }\n mstore(dst, value)\n dst := add(dst, _1)\n }\n value0 := dst_1\n }\n function checked_mul_t_uint256(x, y) -> product\n {\n product := mul(x, y)\n if iszero(or(iszero(x), eq(y, div(product, x)))) { panic_error_0x11() }\n }\n function abi_encode_tuple_packed_t_stringliteral_178a2411ab6fbc1ba11064408972259c558d0e82fd48b0aba3ad81d14f065e73_t_bytes32__to_t_string_memory_ptr_t_bytes32__nonPadded_inplace_fromStack_reversed(pos, value0) -> end\n {\n mstore(pos, 0x19457468657265756d205369676e6564204d6573736167653a0a333200000000)\n mstore(add(pos, 28), value0)\n end := add(pos, 60)\n }\n function checked_add_t_uint256(x, y) -> sum\n {\n sum := add(x, y)\n if gt(x, sum) { panic_error_0x11() }\n }\n function abi_encode_tuple_t_stringliteral_f1c269d7eab972b2fd4d87a15c317e920493e7eea923de7e48c0ebcb7f611fa9__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 19)\n mstore(add(headStart, 64), \"Slice out of bounds\")\n tail := add(headStart, 96)\n }\n function panic_error_0x21()\n {\n mstore(0, 35408467139433450592217433187231851964531694900788300625387963629091585785856)\n mstore(4, 0x21)\n revert(0, 0x24)\n }\n function abi_encode_tuple_t_stringliteral_00043f6bf76368aa97c21698e9b9d4779e31902453daccf3525ddfb36e53e2be__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 24)\n mstore(add(headStart, 64), \"ECDSA: invalid signature\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_1669ff3ba3cdf64474e1193492d05b8434e29b0b495e60095eb5f5c8ec14ce77__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 31)\n mstore(add(headStart, 64), \"ECDSA: invalid signature length\")\n tail := add(headStart, 96)\n }\n function abi_encode_tuple_t_stringliteral_520d1f787dbcafbbfc007fd2c4ecf3d2711ec587f3ee9a1215c0b646c3e530bd__to_t_string_memory_ptr__fromStack_reversed(headStart) -> tail\n {\n mstore(headStart, 32)\n mstore(add(headStart, 32), 34)\n mstore(add(headStart, 64), \"ECDSA: invalid signature 's' val\")\n mstore(add(headStart, 96), \"ue\")\n tail := add(headStart, 128)\n }\n function abi_encode_tuple_t_bytes32_t_uint8_t_bytes32_t_bytes32__to_t_bytes32_t_uint8_t_bytes32_t_bytes32__fromStack_reversed(headStart, value3, value2, value1, value0) -> tail\n {\n tail := add(headStart, 128)\n mstore(headStart, value0)\n mstore(add(headStart, 32), and(value1, 0xff))\n mstore(add(headStart, 64), value2)\n mstore(add(headStart, 96), value3)\n }\n}",
11978
11978
  "id": 123,
11979
11979
  "language": "Yul",
11980
11980
  "name": "#utility.yul"
@@ -11997,7 +11997,7 @@
11997
11997
  ]
11998
11998
  },
11999
11999
  "linkReferences": {},
12000
- "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0xC9 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x89EF44B0 GT PUSH2 0x81 JUMPI DUP1 PUSH4 0xB54A2374 GT PUSH2 0x5B JUMPI DUP1 PUSH4 0xB54A2374 EQ PUSH2 0x160 JUMPI DUP1 PUSH4 0xE7667ABA EQ PUSH2 0x19F JUMPI DUP1 PUSH4 0xE7D10D9B EQ PUSH2 0x1B2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x89EF44B0 EQ PUSH2 0x122 JUMPI DUP1 PUSH4 0x9617C2A8 EQ PUSH2 0x12A JUMPI DUP1 PUSH4 0xB2D44FCE EQ PUSH2 0x14D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x2C5C72DF GT PUSH2 0xB2 JUMPI DUP1 PUSH4 0x2C5C72DF EQ PUSH2 0xF1 JUMPI DUP1 PUSH4 0x63B635EA EQ PUSH2 0x112 JUMPI DUP1 PUSH4 0x6DCC64F8 EQ PUSH2 0x11A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x5F8AE15 EQ PUSH2 0xCE JUMPI DUP1 PUSH4 0x281EFE71 EQ PUSH2 0xE9 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xD6 PUSH1 0x40 DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xD6 PUSH1 0x5A DUP2 JUMP JUMPDEST PUSH2 0x104 PUSH2 0xFF CALLDATASIZE PUSH1 0x4 PUSH2 0x1238 JUMP JUMPDEST PUSH2 0x1C5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xE0 SWAP3 SWAP2 SWAP1 PUSH2 0x1275 JUMP JUMPDEST PUSH2 0xD6 PUSH1 0x64 DUP2 JUMP JUMPDEST PUSH2 0xD6 PUSH1 0x33 DUP2 JUMP JUMPDEST PUSH2 0xD6 PUSH1 0x41 DUP2 JUMP JUMPDEST PUSH2 0x13D PUSH2 0x138 CALLDATASIZE PUSH1 0x4 PUSH2 0x12CD JUMP JUMPDEST PUSH2 0x6EC JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xE0 JUMP JUMPDEST PUSH2 0x13D PUSH2 0x15B CALLDATASIZE PUSH1 0x4 PUSH2 0x1238 JUMP JUMPDEST PUSH2 0x854 JUMP JUMPDEST PUSH2 0x187 PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xE0 JUMP JUMPDEST PUSH2 0x104 PUSH2 0x1AD CALLDATASIZE PUSH1 0x4 PUSH2 0x1312 JUMP JUMPDEST PUSH2 0xA61 JUMP JUMPDEST PUSH2 0x13D PUSH2 0x1C0 CALLDATASIZE PUSH1 0x4 PUSH2 0x12CD JUMP JUMPDEST PUSH2 0xB9A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x40 PUSH2 0x1D8 PUSH1 0x20 DUP6 ADD DUP6 PUSH2 0x1360 JUMP JUMPDEST SWAP1 POP EQ PUSH2 0x21D JUMPI POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x1A DUP2 MSTORE PUSH32 0x4D616C666F726D65642067726F7570207075626C6963206B6579000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x0 SWAP3 SWAP1 SWAP2 POP JUMP JUMPDEST CALLDATASIZE PUSH1 0x0 PUSH2 0x22D PUSH1 0x40 DUP7 ADD DUP7 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP PUSH1 0x5A PUSH2 0x23F DUP3 PUSH1 0x64 PUSH2 0x1407 JUMP JUMPDEST LT ISZERO PUSH2 0x26B JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x27 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x180A PUSH1 0x27 SWAP2 CODECOPY SWAP4 POP SWAP4 POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x3B4 JUMPI PUSH1 0x1 DUP3 DUP3 PUSH1 0x0 DUP2 DUP2 LT PUSH2 0x289 JUMPI PUSH2 0x289 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x29E SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH1 0xFF AND LT DUP1 PUSH2 0x2E0 JUMPI POP PUSH1 0x64 DUP3 DUP3 PUSH2 0x2B7 PUSH1 0x1 DUP3 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0x2C6 JUMPI PUSH2 0x2C6 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x2DB SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH1 0xFF AND GT JUMPDEST ISZERO PUSH2 0x30B JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x24 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1831 PUSH1 0x24 SWAP2 CODECOPY SWAP4 POP SWAP4 POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x1 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x3B2 JUMPI DUP3 DUP3 DUP3 DUP2 DUP2 LT PUSH2 0x328 JUMPI PUSH2 0x328 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x33D SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH1 0xFF AND DUP4 DUP4 PUSH2 0x34D PUSH1 0x1 DUP6 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0x35C JUMPI PUSH2 0x35C PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x371 SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH1 0xFF AND LT PUSH2 0x3A0 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x24 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1831 PUSH1 0x24 SWAP2 CODECOPY SWAP5 POP SWAP5 POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST DUP1 PUSH2 0x3AA DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x30E JUMP JUMPDEST POP JUMPDEST PUSH1 0x0 PUSH1 0x41 PUSH2 0x3C5 PUSH1 0x60 DUP9 ADD DUP9 PUSH2 0x1360 JUMP JUMPDEST PUSH2 0x3D0 SWAP3 SWAP2 POP PUSH2 0x1497 JUMP JUMPDEST SWAP1 POP PUSH2 0x3DF PUSH1 0x60 DUP8 ADD DUP8 PUSH2 0x1360 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 SUB PUSH2 0x42C JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x16 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4E6F207369676E6174757265732070726F766964656400000000000000000000 DUP2 MSTORE POP SWAP5 POP SWAP5 POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x41 PUSH2 0x43B PUSH1 0x60 DUP9 ADD DUP9 PUSH2 0x1360 JUMP JUMPDEST PUSH2 0x446 SWAP3 SWAP2 POP PUSH2 0x14AB JUMP JUMPDEST ISZERO PUSH2 0x48F JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1A DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4D616C666F726D6564207369676E617475726573206172726179000000000000 DUP2 MSTORE POP SWAP5 POP SWAP5 POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST CALLDATASIZE PUSH1 0x0 PUSH2 0x49F PUSH1 0x80 DUP10 ADD DUP10 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP DUP3 DUP2 EQ PUSH2 0x4F1 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1B DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x556E6578706563746564207369676E61747572657320636F756E740000000000 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x33 DUP4 LT ISZERO PUSH2 0x540 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x12 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x546F6F20666577207369676E6174757265730000000000000000000000000000 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x64 DUP4 GT ISZERO PUSH2 0x58F JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x13 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x546F6F206D616E79207369676E61747572657300000000000000000000000000 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x1 DUP3 DUP3 PUSH1 0x0 DUP2 DUP2 LT PUSH2 0x5A4 JUMPI PUSH2 0x5A4 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD LT DUP1 PUSH2 0x5D9 JUMPI POP PUSH1 0x64 DUP3 DUP3 PUSH2 0x5C1 PUSH1 0x1 DUP3 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0x5D0 JUMPI PUSH2 0x5D0 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD GT JUMPDEST ISZERO PUSH2 0x624 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x20 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x436F72727570746564207369676E696E67206D656D62657220696E6469636573 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x1 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x6CB JUMPI DUP3 DUP3 DUP3 DUP2 DUP2 LT PUSH2 0x641 JUMPI PUSH2 0x641 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD DUP4 DUP4 PUSH1 0x1 DUP5 PUSH2 0x657 SWAP2 SWAP1 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0x666 JUMPI PUSH2 0x666 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD LT PUSH2 0x6B9 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x20 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x436F72727570746564207369676E696E67206D656D62657220696E6469636573 DUP2 MSTORE POP SWAP8 POP SWAP8 POP POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST DUP1 PUSH2 0x6C3 DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x627 JUMP JUMPDEST POP PUSH1 0x1 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x0 CALLDATASIZE DUP2 PUSH2 0x6FD PUSH1 0xA0 DUP7 ADD DUP7 PUSH2 0x13A7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x6C2530B900000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x64 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 DUP2 ADD DUP8 SWAP1 MSTORE SWAP2 SWAP4 POP SWAP2 POP PUSH1 0x0 SWAP1 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x6C2530B9 SWAP1 PUSH1 0x44 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x78A JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x7B2 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x153C JUMP JUMPDEST DUP1 MLOAD SWAP1 SWAP2 POP DUP3 EQ PUSH2 0x7C9 JUMPI PUSH1 0x0 SWAP4 POP POP POP POP PUSH2 0x84E JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x845 JUMPI DUP2 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x7E6 JUMPI PUSH2 0x7E6 PUSH2 0x141A JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH4 0xFFFFFFFF AND DUP5 DUP5 DUP4 DUP2 DUP2 LT PUSH2 0x806 JUMPI PUSH2 0x806 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x81B SWAP2 SWAP1 PUSH2 0x15DB JUMP JUMPDEST PUSH4 0xFFFFFFFF AND EQ PUSH2 0x833 JUMPI PUSH1 0x0 SWAP5 POP POP POP POP POP PUSH2 0x84E JUMP JUMPDEST DUP1 PUSH2 0x83D DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x7CC JUMP JUMPDEST POP PUSH1 0x1 SWAP4 POP POP POP POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x864 PUSH1 0x40 DUP5 ADD DUP5 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 POP GT ISZERO PUSH2 0xA20 JUMPI PUSH1 0x0 PUSH2 0x87B PUSH1 0x40 DUP5 ADD DUP5 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 POP PUSH2 0x88A PUSH1 0xA0 DUP6 ADD DUP6 PUSH2 0x13A7 JUMP JUMPDEST PUSH2 0x895 SWAP3 SWAP2 POP PUSH2 0x1407 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x8AD JUMPI PUSH2 0x8AD PUSH2 0x14BF JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x8D6 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 PUSH1 0x0 JUMPDEST PUSH2 0x8EC PUSH1 0xA0 DUP8 ADD DUP8 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 POP DUP2 LT ISZERO PUSH2 0x9E8 JUMPI PUSH1 0x1 PUSH2 0x904 PUSH1 0x40 DUP9 ADD DUP9 PUSH2 0x13A7 JUMP JUMPDEST DUP6 DUP2 DUP2 LT PUSH2 0x914 JUMPI PUSH2 0x914 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x929 SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH2 0x933 SWAP2 SWAP1 PUSH2 0x15F8 JUMP JUMPDEST PUSH1 0xFF AND DUP2 EQ PUSH2 0x9A7 JUMPI PUSH2 0x949 PUSH1 0xA0 DUP8 ADD DUP8 PUSH2 0x13A7 JUMP JUMPDEST DUP3 DUP2 DUP2 LT PUSH2 0x959 JUMPI PUSH2 0x959 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x96E SWAP2 SWAP1 PUSH2 0x15DB JUMP JUMPDEST DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x980 JUMPI PUSH2 0x980 PUSH2 0x141A JUMP JUMPDEST PUSH4 0xFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP2 SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE DUP2 PUSH2 0x99F DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP3 POP POP PUSH2 0x9D6 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x9B6 PUSH1 0x40 DUP9 ADD DUP9 PUSH2 0x13A7 JUMP JUMPDEST PUSH2 0x9C1 SWAP3 SWAP2 POP PUSH2 0x1407 JUMP JUMPDEST DUP4 LT ISZERO PUSH2 0x9D6 JUMPI DUP3 PUSH2 0x9D2 DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP4 POP POP JUMPDEST DUP1 PUSH2 0x9E0 DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x8DF JUMP JUMPDEST POP DUP5 PUSH1 0xC0 ADD CALLDATALOAD DUP4 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x9FF SWAP2 SWAP1 PUSH2 0x1611 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 EQ SWAP4 POP POP POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0xC0 DUP3 ADD CALLDATALOAD PUSH2 0xA32 PUSH1 0xA0 DUP5 ADD DUP5 PUSH2 0x13A7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xA43 SWAP3 SWAP2 SWAP1 PUSH2 0x165B JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 EQ SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 DUP1 PUSH2 0xA71 DUP8 PUSH2 0x1C5 JUMP JUMPDEST SWAP2 POP SWAP2 POP DUP2 PUSH2 0xA87 JUMPI PUSH1 0x0 SWAP4 POP SWAP2 POP PUSH2 0xB92 SWAP1 POP JUMP JUMPDEST PUSH2 0xA91 DUP8 DUP7 PUSH2 0xB9A JUMP JUMPDEST PUSH2 0xAD8 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x12 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x496E76616C6964207369676E6174757265730000000000000000000000000000 DUP2 MSTORE POP SWAP4 POP SWAP4 POP POP POP PUSH2 0xB92 JUMP JUMPDEST PUSH2 0xAE2 DUP8 DUP8 PUSH2 0x6EC JUMP JUMPDEST PUSH2 0xB29 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x15 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x496E76616C69642067726F7570206D656D626572730000000000000000000000 DUP2 MSTORE POP SWAP4 POP SWAP4 POP POP POP PUSH2 0xB92 JUMP JUMPDEST PUSH2 0xB32 DUP8 PUSH2 0x854 JUMP JUMPDEST PUSH2 0xB79 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x14 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x496E76616C6964206D656D626572732068617368000000000000000000000000 DUP2 MSTORE POP SWAP4 POP SWAP4 POP POP POP PUSH2 0xB92 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP4 POP SWAP4 POP POP POP JUMPDEST SWAP4 POP SWAP4 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0xC31 CHAINID PUSH2 0xBAE PUSH1 0x20 DUP8 ADD DUP8 PUSH2 0x1360 JUMP JUMPDEST PUSH2 0xBBB PUSH1 0x40 DUP10 ADD DUP10 PUSH2 0x13A7 JUMP JUMPDEST DUP9 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xBD1 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x16A6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE DUP3 DUP3 MSTORE DUP1 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD KECCAK256 PUSH32 0x19457468657265756D205369676E6564204D6573736167653A0A333200000000 DUP5 DUP4 ADD MSTORE PUSH1 0x3C DUP1 DUP6 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP3 MLOAD DUP1 DUP6 SUB SWAP1 SWAP2 ADD DUP2 MSTORE PUSH1 0x5C SWAP1 SWAP4 ADD SWAP1 SWAP2 MSTORE DUP2 MLOAD SWAP2 ADD KECCAK256 SWAP1 JUMP JUMPDEST SWAP1 POP CALLDATASIZE PUSH1 0x0 PUSH2 0xC43 PUSH1 0x80 DUP8 ADD DUP8 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP PUSH1 0x0 DUP2 PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xC63 JUMPI PUSH2 0xC63 PUSH2 0x14BF JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xC8C JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0xD29 JUMPI PUSH2 0xCA7 PUSH1 0xA0 DUP10 ADD DUP10 PUSH2 0x13A7 JUMP JUMPDEST PUSH1 0x1 DUP7 DUP7 DUP6 DUP2 DUP2 LT PUSH2 0xCBB JUMPI PUSH2 0xCBB PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD PUSH2 0xCCC SWAP2 SWAP1 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0xCDB JUMPI PUSH2 0xCDB PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0xCF0 SWAP2 SWAP1 PUSH2 0x15DB JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xD02 JUMPI PUSH2 0xD02 PUSH2 0x141A JUMP JUMPDEST PUSH4 0xFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP2 SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE DUP1 PUSH2 0xD21 DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0xC92 JUMP JUMPDEST POP PUSH1 0x40 MLOAD PUSH32 0xF7F9A8FA00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 AND SWAP1 PUSH4 0xF7F9A8FA SWAP1 PUSH2 0xD92 SWAP1 DUP6 SWAP1 PUSH1 0x4 ADD PUSH2 0x1611 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xDAF JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0xDD7 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x172D JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH1 0x0 PUSH1 0x41 PUSH2 0xDEB DUP12 DUP5 ADD DUP13 PUSH2 0x1360 JUMP JUMPDEST PUSH2 0xDF6 SWAP3 SWAP2 POP PUSH2 0x1497 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xEC5 JUMPI PUSH2 0xE5E PUSH2 0xE11 DUP3 PUSH1 0x41 PUSH2 0x17C9 JUMP JUMPDEST PUSH1 0x41 PUSH2 0xE20 PUSH1 0x60 DUP16 ADD DUP16 PUSH2 0x1360 JUMP JUMPDEST DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP5 SWAP4 SWAP3 POP POP PUSH2 0xED6 SWAP1 POP JUMP JUMPDEST SWAP3 POP PUSH1 0x0 PUSH2 0xE6C DUP10 DUP6 PUSH2 0xF8B JUMP JUMPDEST SWAP1 POP DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xE8A JUMPI PUSH2 0xE8A PUSH2 0x141A JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0xEB2 JUMPI PUSH1 0x0 SWAP10 POP POP POP POP POP POP POP POP POP POP PUSH2 0x84E JUMP JUMPDEST POP DUP1 PUSH2 0xEBD DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0xDFB JUMP JUMPDEST POP PUSH1 0x1 SWAP11 SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0xEE4 DUP4 DUP6 PUSH2 0x17E0 JUMP JUMPDEST SWAP1 POP DUP4 DUP2 GT DUP1 ISZERO PUSH2 0xEF6 JUMPI POP DUP1 DUP6 MLOAD LT ISZERO JUMPDEST PUSH2 0xF47 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x13 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x536C696365206F7574206F6620626F756E647300000000000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x40 MLOAD SWAP2 POP DUP3 PUSH1 0x40 DUP4 ADD ADD PUSH1 0x40 MSTORE DUP3 DUP3 MSTORE DUP4 DUP6 ADD DUP3 SUB DUP5 PUSH1 0x20 DUP8 ADD ADD DUP5 DUP2 ADD JUMPDEST DUP1 DUP3 LT ISZERO PUSH2 0xF80 JUMPI DUP2 MLOAD DUP4 DUP4 ADD MSTORE PUSH1 0x20 DUP3 ADD SWAP2 POP PUSH2 0xF67 JUMP JUMPDEST POP POP POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0xF9A DUP6 DUP6 PUSH2 0xFAF JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0xFA7 DUP2 PUSH2 0xFF4 JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 MLOAD PUSH1 0x41 SUB PUSH2 0xFE5 JUMPI PUSH1 0x20 DUP4 ADD MLOAD PUSH1 0x40 DUP5 ADD MLOAD PUSH1 0x60 DUP6 ADD MLOAD PUSH1 0x0 BYTE PUSH2 0xFD9 DUP8 DUP3 DUP6 DUP6 PUSH2 0x115C JUMP JUMPDEST SWAP5 POP SWAP5 POP POP POP POP PUSH2 0xFED JUMP JUMPDEST POP PUSH1 0x0 SWAP1 POP PUSH1 0x2 JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x1008 JUMPI PUSH2 0x1008 PUSH2 0x17F3 JUMP JUMPDEST SUB PUSH2 0x1010 JUMPI POP JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x1024 JUMPI PUSH2 0x1024 PUSH2 0x17F3 JUMP JUMPDEST SUB PUSH2 0x1071 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x18 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x45434453413A20696E76616C6964207369676E61747572650000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0xF3E JUMP JUMPDEST PUSH1 0x2 DUP2 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x1085 JUMPI PUSH2 0x1085 PUSH2 0x17F3 JUMP JUMPDEST SUB PUSH2 0x10D2 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1F PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x45434453413A20696E76616C6964207369676E6174757265206C656E67746800 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0xF3E JUMP JUMPDEST PUSH1 0x3 DUP2 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x10E6 JUMPI PUSH2 0x10E6 PUSH2 0x17F3 JUMP JUMPDEST SUB PUSH2 0x1159 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x22 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x45434453413A20696E76616C6964207369676E6174757265202773272076616C PUSH1 0x44 DUP3 ADD MSTORE PUSH32 0x7565000000000000000000000000000000000000000000000000000000000000 PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0xF3E JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH32 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0 DUP4 GT ISZERO PUSH2 0x1193 JUMPI POP PUSH1 0x0 SWAP1 POP PUSH1 0x3 PUSH2 0x1217 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP1 DUP5 MSTORE DUP10 SWAP1 MSTORE PUSH1 0xFF DUP9 AND SWAP3 DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x60 DUP2 ADD DUP7 SWAP1 MSTORE PUSH1 0x80 DUP2 ADD DUP6 SWAP1 MSTORE PUSH1 0x1 SWAP1 PUSH1 0xA0 ADD PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x11E7 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x1210 JUMPI PUSH1 0x0 PUSH1 0x1 SWAP3 POP SWAP3 POP POP PUSH2 0x1217 JUMP JUMPDEST SWAP2 POP PUSH1 0x0 SWAP1 POP JUMPDEST SWAP5 POP SWAP5 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0xE0 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1232 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x124A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1261 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x126D DUP5 DUP3 DUP6 ADD PUSH2 0x1220 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST DUP3 ISZERO ISZERO DUP2 MSTORE PUSH1 0x0 PUSH1 0x20 PUSH1 0x40 DUP2 DUP5 ADD MSTORE DUP4 MLOAD DUP1 PUSH1 0x40 DUP6 ADD MSTORE PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x12AB JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x60 ADD MSTORE DUP3 ADD PUSH2 0x128F JUMP JUMPDEST POP PUSH1 0x0 PUSH1 0x60 DUP3 DUP7 ADD ADD MSTORE PUSH1 0x60 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND DUP6 ADD ADD SWAP3 POP POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x12E0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x12F7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1303 DUP6 DUP3 DUP7 ADD PUSH2 0x1220 JUMP JUMPDEST SWAP6 PUSH1 0x20 SWAP5 SWAP1 SWAP5 ADD CALLDATALOAD SWAP5 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x1327 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x133E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x134A DUP7 DUP3 DUP8 ADD PUSH2 0x1220 JUMP JUMPDEST SWAP7 PUSH1 0x20 DUP7 ADD CALLDATALOAD SWAP7 POP PUSH1 0x40 SWAP1 SWAP6 ADD CALLDATALOAD SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0x1377 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1392 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP CALLDATASIZE DUP2 SWAP1 SUB DUP3 SGT ISZERO PUSH2 0xFED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0x13BE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x13D9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP PUSH1 0x5 DUP2 SWAP1 SHL CALLDATASIZE SUB DUP3 SGT ISZERO PUSH2 0xFED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST DUP2 DUP2 SUB DUP2 DUP2 GT ISZERO PUSH2 0x84E JUMPI PUSH2 0x84E PUSH2 0x13F1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x1441 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1458 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1461 DUP3 PUSH2 0x1430 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP3 ADD PUSH2 0x147A JUMPI PUSH2 0x147A PUSH2 0x13F1 JUMP JUMPDEST POP PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x12 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x14A6 JUMPI PUSH2 0x14A6 PUSH2 0x1481 JUMP JUMPDEST POP DIV SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x14BA JUMPI PUSH2 0x14BA PUSH2 0x1481 JUMP JUMPDEST POP MOD SWAP1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x14FE JUMPI PUSH2 0x14FE PUSH2 0x14BF JUMP JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1520 JUMPI PUSH2 0x1520 PUSH2 0x14BF JUMP JUMPDEST POP PUSH1 0x5 SHL PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x1159 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x154F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1566 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD PUSH1 0x1F DUP2 ADD DUP6 SGT PUSH2 0x1577 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 MLOAD PUSH2 0x158A PUSH2 0x1585 DUP3 PUSH2 0x1506 JUMP JUMPDEST PUSH2 0x14D5 JUMP JUMPDEST DUP2 DUP2 MSTORE PUSH1 0x5 SWAP2 SWAP1 SWAP2 SHL DUP3 ADD DUP4 ADD SWAP1 DUP4 DUP2 ADD SWAP1 DUP8 DUP4 GT ISZERO PUSH2 0x15A9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 DUP5 ADD SWAP3 JUMPDEST DUP3 DUP5 LT ISZERO PUSH2 0x15D0 JUMPI DUP4 MLOAD PUSH2 0x15C1 DUP2 PUSH2 0x152A JUMP JUMPDEST DUP3 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP1 DUP5 ADD SWAP1 PUSH2 0x15AE JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x15ED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1461 DUP2 PUSH2 0x152A JUMP JUMPDEST PUSH1 0xFF DUP3 DUP2 AND DUP3 DUP3 AND SUB SWAP1 DUP2 GT ISZERO PUSH2 0x84E JUMPI PUSH2 0x84E PUSH2 0x13F1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP3 MLOAD DUP3 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP2 SWAP1 DUP5 DUP3 ADD SWAP1 PUSH1 0x40 DUP6 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x164F JUMPI DUP4 MLOAD PUSH4 0xFFFFFFFF AND DUP4 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP2 DUP5 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0x162D JUMP JUMPDEST POP SWAP1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 DUP2 ADD DUP4 SWAP1 MSTORE PUSH1 0x0 SWAP1 DUP5 PUSH1 0x40 DUP5 ADD DUP4 JUMPDEST DUP7 DUP2 LT ISZERO PUSH2 0x169B JUMPI DUP3 CALLDATALOAD PUSH2 0x1683 DUP2 PUSH2 0x152A JUMP JUMPDEST PUSH4 0xFFFFFFFF AND DUP3 MSTORE SWAP2 DUP4 ADD SWAP2 SWAP1 DUP4 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x1670 JUMP JUMPDEST POP SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST DUP7 DUP2 MSTORE PUSH1 0x0 PUSH1 0x20 PUSH1 0x80 DUP2 DUP5 ADD MSTORE DUP7 PUSH1 0x80 DUP5 ADD MSTORE DUP7 DUP9 PUSH1 0xA0 DUP6 ADD CALLDATACOPY PUSH1 0x0 PUSH1 0xA0 DUP9 DUP6 ADD DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP11 ADD AND DUP6 ADD DUP6 DUP2 SUB DUP3 ADD PUSH1 0x40 DUP8 ADD MSTORE SWAP1 DUP2 ADD DUP8 SWAP1 MSTORE DUP8 SWAP2 SWAP1 PUSH1 0xC0 ADD JUMPDEST DUP8 DUP3 LT ISZERO PUSH2 0x1715 JUMPI PUSH1 0xFF PUSH2 0x1700 DUP5 PUSH2 0x1430 JUMP JUMPDEST AND DUP2 MSTORE SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD SWAP1 DUP4 ADD PUSH2 0x16ED JUMP JUMPDEST DUP1 SWAP5 POP POP POP POP POP DUP3 PUSH1 0x60 DUP4 ADD MSTORE SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x1740 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1757 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD PUSH1 0x1F DUP2 ADD DUP6 SGT PUSH2 0x1768 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 MLOAD PUSH2 0x1776 PUSH2 0x1585 DUP3 PUSH2 0x1506 JUMP JUMPDEST DUP2 DUP2 MSTORE PUSH1 0x5 SWAP2 SWAP1 SWAP2 SHL DUP3 ADD DUP4 ADD SWAP1 DUP4 DUP2 ADD SWAP1 DUP8 DUP4 GT ISZERO PUSH2 0x1795 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 DUP5 ADD SWAP3 JUMPDEST DUP3 DUP5 LT ISZERO PUSH2 0x15D0 JUMPI DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x17BA JUMPI PUSH1 0x0 DUP1 DUP2 REVERT JUMPDEST DUP3 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP1 DUP5 ADD SWAP1 PUSH2 0x179A JUMP JUMPDEST DUP1 DUP3 MUL DUP2 ISZERO DUP3 DUP3 DIV DUP5 EQ OR PUSH2 0x84E JUMPI PUSH2 0x84E PUSH2 0x13F1 JUMP JUMPDEST DUP1 DUP3 ADD DUP1 DUP3 GT ISZERO PUSH2 0x84E JUMPI PUSH2 0x84E PUSH2 0x13F1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x21 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT INVALID SLOAD PUSH16 0x6F206D616E79206D656D62657273206D PUSH10 0x736265686176696E6720 PUSH5 0x7572696E67 KECCAK256 DIFFICULTY 0x4B SELFBALANCE NUMBER PUSH16 0x72727570746564206D69736265686176 PUSH6 0x64206D656D62 PUSH6 0x727320696E64 PUSH10 0x636573A2646970667358 0x22 SLT KECCAK256 0xDA DUP1 0x4F OR 0x2D 0x27 0x5E DUP14 0xDE GAS MLOAD 0xD5 DUP11 0x27 PUSH4 0x832EB883 0x26 LOG2 SSTORE CALLDATACOPY SGT PUSH27 0xD01C33759F2B8964736F6C63430008110033000000000000000000 ",
12000
+ "opcodes": "PUSH1 0x80 PUSH1 0x40 MSTORE CALLVALUE DUP1 ISZERO PUSH2 0x10 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP PUSH1 0x4 CALLDATASIZE LT PUSH2 0xC9 JUMPI PUSH1 0x0 CALLDATALOAD PUSH1 0xE0 SHR DUP1 PUSH4 0x89EF44B0 GT PUSH2 0x81 JUMPI DUP1 PUSH4 0xB54A2374 GT PUSH2 0x5B JUMPI DUP1 PUSH4 0xB54A2374 EQ PUSH2 0x160 JUMPI DUP1 PUSH4 0xE7667ABA EQ PUSH2 0x19F JUMPI DUP1 PUSH4 0xE7D10D9B EQ PUSH2 0x1B2 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x89EF44B0 EQ PUSH2 0x122 JUMPI DUP1 PUSH4 0x9617C2A8 EQ PUSH2 0x12A JUMPI DUP1 PUSH4 0xB2D44FCE EQ PUSH2 0x14D JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x2C5C72DF GT PUSH2 0xB2 JUMPI DUP1 PUSH4 0x2C5C72DF EQ PUSH2 0xF1 JUMPI DUP1 PUSH4 0x63B635EA EQ PUSH2 0x112 JUMPI DUP1 PUSH4 0x6DCC64F8 EQ PUSH2 0x11A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 PUSH4 0x5F8AE15 EQ PUSH2 0xCE JUMPI DUP1 PUSH4 0x281EFE71 EQ PUSH2 0xE9 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0xD6 PUSH1 0x40 DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP2 MSTORE PUSH1 0x20 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST PUSH2 0xD6 PUSH1 0x5A DUP2 JUMP JUMPDEST PUSH2 0x104 PUSH2 0xFF CALLDATASIZE PUSH1 0x4 PUSH2 0x1238 JUMP JUMPDEST PUSH2 0x1C5 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH2 0xE0 SWAP3 SWAP2 SWAP1 PUSH2 0x1275 JUMP JUMPDEST PUSH2 0xD6 PUSH1 0x64 DUP2 JUMP JUMPDEST PUSH2 0xD6 PUSH1 0x33 DUP2 JUMP JUMPDEST PUSH2 0xD6 PUSH1 0x41 DUP2 JUMP JUMPDEST PUSH2 0x13D PUSH2 0x138 CALLDATASIZE PUSH1 0x4 PUSH2 0x12CD JUMP JUMPDEST PUSH2 0x6EC JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 ISZERO ISZERO DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xE0 JUMP JUMPDEST PUSH2 0x13D PUSH2 0x15B CALLDATASIZE PUSH1 0x4 PUSH2 0x1238 JUMP JUMPDEST PUSH2 0x854 JUMP JUMPDEST PUSH2 0x187 PUSH32 0x0 DUP2 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB SWAP1 SWAP2 AND DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0xE0 JUMP JUMPDEST PUSH2 0x104 PUSH2 0x1AD CALLDATASIZE PUSH1 0x4 PUSH2 0x1312 JUMP JUMPDEST PUSH2 0xA61 JUMP JUMPDEST PUSH2 0x13D PUSH2 0x1C0 CALLDATASIZE PUSH1 0x4 PUSH2 0x12CD JUMP JUMPDEST PUSH2 0xB9A JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x40 PUSH2 0x1D8 PUSH1 0x20 DUP6 ADD DUP6 PUSH2 0x1360 JUMP JUMPDEST SWAP1 POP EQ PUSH2 0x21D JUMPI POP POP PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x1A DUP2 MSTORE PUSH32 0x4D616C666F726D65642067726F7570207075626C6963206B6579000000000000 PUSH1 0x20 DUP3 ADD MSTORE PUSH1 0x0 SWAP3 SWAP1 SWAP2 POP JUMP JUMPDEST CALLDATASIZE PUSH1 0x0 PUSH2 0x22D PUSH1 0x40 DUP7 ADD DUP7 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP PUSH1 0x5A PUSH2 0x23F DUP3 PUSH1 0x64 PUSH2 0x1407 JUMP JUMPDEST LT ISZERO PUSH2 0x26B JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x27 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x180A PUSH1 0x27 SWAP2 CODECOPY SWAP4 POP SWAP4 POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x1 DUP2 GT ISZERO PUSH2 0x3B4 JUMPI PUSH1 0x1 DUP3 DUP3 PUSH1 0x0 DUP2 DUP2 LT PUSH2 0x289 JUMPI PUSH2 0x289 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x29E SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH1 0xFF AND LT DUP1 PUSH2 0x2E0 JUMPI POP PUSH1 0x64 DUP3 DUP3 PUSH2 0x2B7 PUSH1 0x1 DUP3 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0x2C6 JUMPI PUSH2 0x2C6 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x2DB SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH1 0xFF AND GT JUMPDEST ISZERO PUSH2 0x30B JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x24 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1831 PUSH1 0x24 SWAP2 CODECOPY SWAP4 POP SWAP4 POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x1 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x3B2 JUMPI DUP3 DUP3 DUP3 DUP2 DUP2 LT PUSH2 0x328 JUMPI PUSH2 0x328 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x33D SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH1 0xFF AND DUP4 DUP4 PUSH2 0x34D PUSH1 0x1 DUP6 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0x35C JUMPI PUSH2 0x35C PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x371 SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH1 0xFF AND LT PUSH2 0x3A0 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x60 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x24 DUP2 MSTORE PUSH1 0x20 ADD PUSH2 0x1831 PUSH1 0x24 SWAP2 CODECOPY SWAP5 POP SWAP5 POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST DUP1 PUSH2 0x3AA DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x30E JUMP JUMPDEST POP JUMPDEST PUSH1 0x0 PUSH1 0x41 PUSH2 0x3C5 PUSH1 0x60 DUP9 ADD DUP9 PUSH2 0x1360 JUMP JUMPDEST PUSH2 0x3D0 SWAP3 SWAP2 POP PUSH2 0x1497 JUMP JUMPDEST SWAP1 POP PUSH2 0x3DF PUSH1 0x60 DUP8 ADD DUP8 PUSH2 0x1360 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 SUB PUSH2 0x42C JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x16 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4E6F207369676E6174757265732070726F766964656400000000000000000000 DUP2 MSTORE POP SWAP5 POP SWAP5 POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x41 PUSH2 0x43B PUSH1 0x60 DUP9 ADD DUP9 PUSH2 0x1360 JUMP JUMPDEST PUSH2 0x446 SWAP3 SWAP2 POP PUSH2 0x14AB JUMP JUMPDEST ISZERO PUSH2 0x48F JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1A DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x4D616C666F726D6564207369676E617475726573206172726179000000000000 DUP2 MSTORE POP SWAP5 POP SWAP5 POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST CALLDATASIZE PUSH1 0x0 PUSH2 0x49F PUSH1 0x80 DUP10 ADD DUP10 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP DUP3 DUP2 EQ PUSH2 0x4F1 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x1B DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x556E6578706563746564207369676E61747572657320636F756E740000000000 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x33 DUP4 LT ISZERO PUSH2 0x540 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x12 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x546F6F20666577207369676E6174757265730000000000000000000000000000 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x64 DUP4 GT ISZERO PUSH2 0x58F JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x13 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x546F6F206D616E79207369676E61747572657300000000000000000000000000 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x1 DUP3 DUP3 PUSH1 0x0 DUP2 DUP2 LT PUSH2 0x5A4 JUMPI PUSH2 0x5A4 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD LT DUP1 PUSH2 0x5D9 JUMPI POP PUSH1 0x64 DUP3 DUP3 PUSH2 0x5C1 PUSH1 0x1 DUP3 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0x5D0 JUMPI PUSH2 0x5D0 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD GT JUMPDEST ISZERO PUSH2 0x624 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x20 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x436F72727570746564207369676E696E67206D656D62657220696E6469636573 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x1 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x6CB JUMPI DUP3 DUP3 DUP3 DUP2 DUP2 LT PUSH2 0x641 JUMPI PUSH2 0x641 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD DUP4 DUP4 PUSH1 0x1 DUP5 PUSH2 0x657 SWAP2 SWAP1 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0x666 JUMPI PUSH2 0x666 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD LT PUSH2 0x6B9 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x20 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x436F72727570746564207369676E696E67206D656D62657220696E6469636573 DUP2 MSTORE POP SWAP8 POP SWAP8 POP POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST DUP1 PUSH2 0x6C3 DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x627 JUMP JUMPDEST POP PUSH1 0x1 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP7 POP SWAP7 POP POP POP POP POP POP SWAP2 POP SWAP2 JUMP JUMPDEST PUSH1 0x0 CALLDATASIZE DUP2 PUSH2 0x6FD PUSH1 0xA0 DUP7 ADD DUP7 PUSH2 0x13A7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH32 0x6C2530B900000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x64 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x24 DUP2 ADD DUP8 SWAP1 MSTORE SWAP2 SWAP4 POP SWAP2 POP PUSH1 0x0 SWAP1 PUSH32 0x0 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND SWAP1 PUSH4 0x6C2530B9 SWAP1 PUSH1 0x44 ADD PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x78A JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0x7B2 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x153C JUMP JUMPDEST DUP1 MLOAD SWAP1 SWAP2 POP DUP3 EQ PUSH2 0x7C9 JUMPI PUSH1 0x0 SWAP4 POP POP POP POP PUSH2 0x84E JUMP JUMPDEST PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0x845 JUMPI DUP2 DUP2 DUP2 MLOAD DUP2 LT PUSH2 0x7E6 JUMPI PUSH2 0x7E6 PUSH2 0x141A JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH4 0xFFFFFFFF AND DUP5 DUP5 DUP4 DUP2 DUP2 LT PUSH2 0x806 JUMPI PUSH2 0x806 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x81B SWAP2 SWAP1 PUSH2 0x15DB JUMP JUMPDEST PUSH4 0xFFFFFFFF AND EQ PUSH2 0x833 JUMPI PUSH1 0x0 SWAP5 POP POP POP POP POP PUSH2 0x84E JUMP JUMPDEST DUP1 PUSH2 0x83D DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x7CC JUMP JUMPDEST POP PUSH1 0x1 SWAP4 POP POP POP POP JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0x864 PUSH1 0x40 DUP5 ADD DUP5 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 POP GT ISZERO PUSH2 0xA20 JUMPI PUSH1 0x0 PUSH2 0x87B PUSH1 0x40 DUP5 ADD DUP5 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 POP PUSH2 0x88A PUSH1 0xA0 DUP6 ADD DUP6 PUSH2 0x13A7 JUMP JUMPDEST PUSH2 0x895 SWAP3 SWAP2 POP PUSH2 0x1407 JUMP JUMPDEST PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x8AD JUMPI PUSH2 0x8AD PUSH2 0x14BF JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0x8D6 JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 DUP1 PUSH1 0x0 JUMPDEST PUSH2 0x8EC PUSH1 0xA0 DUP8 ADD DUP8 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 POP DUP2 LT ISZERO PUSH2 0x9E8 JUMPI PUSH1 0x1 PUSH2 0x904 PUSH1 0x40 DUP9 ADD DUP9 PUSH2 0x13A7 JUMP JUMPDEST DUP6 DUP2 DUP2 LT PUSH2 0x914 JUMPI PUSH2 0x914 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x929 SWAP2 SWAP1 PUSH2 0x1446 JUMP JUMPDEST PUSH2 0x933 SWAP2 SWAP1 PUSH2 0x15F8 JUMP JUMPDEST PUSH1 0xFF AND DUP2 EQ PUSH2 0x9A7 JUMPI PUSH2 0x949 PUSH1 0xA0 DUP8 ADD DUP8 PUSH2 0x13A7 JUMP JUMPDEST DUP3 DUP2 DUP2 LT PUSH2 0x959 JUMPI PUSH2 0x959 PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0x96E SWAP2 SWAP1 PUSH2 0x15DB JUMP JUMPDEST DUP5 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0x980 JUMPI PUSH2 0x980 PUSH2 0x141A JUMP JUMPDEST PUSH4 0xFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP2 SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE DUP2 PUSH2 0x99F DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP3 POP POP PUSH2 0x9D6 JUMP JUMPDEST PUSH1 0x1 PUSH2 0x9B6 PUSH1 0x40 DUP9 ADD DUP9 PUSH2 0x13A7 JUMP JUMPDEST PUSH2 0x9C1 SWAP3 SWAP2 POP PUSH2 0x1407 JUMP JUMPDEST DUP4 LT ISZERO PUSH2 0x9D6 JUMPI DUP3 PUSH2 0x9D2 DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP4 POP POP JUMPDEST DUP1 PUSH2 0x9E0 DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0x8DF JUMP JUMPDEST POP DUP5 PUSH1 0xC0 ADD CALLDATALOAD DUP4 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0x9FF SWAP2 SWAP1 PUSH2 0x1611 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 EQ SWAP4 POP POP POP POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0xC0 DUP3 ADD CALLDATALOAD PUSH2 0xA32 PUSH1 0xA0 DUP5 ADD DUP5 PUSH2 0x13A7 JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xA43 SWAP3 SWAP2 SWAP1 PUSH2 0x165B JUMP JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 DUP4 SUB SUB DUP2 MSTORE SWAP1 PUSH1 0x40 MSTORE DUP1 MLOAD SWAP1 PUSH1 0x20 ADD KECCAK256 EQ SWAP1 POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x60 PUSH1 0x0 DUP1 PUSH2 0xA71 DUP8 PUSH2 0x1C5 JUMP JUMPDEST SWAP2 POP SWAP2 POP DUP2 PUSH2 0xA87 JUMPI PUSH1 0x0 SWAP4 POP SWAP2 POP PUSH2 0xB92 SWAP1 POP JUMP JUMPDEST PUSH2 0xA91 DUP8 DUP7 PUSH2 0xB9A JUMP JUMPDEST PUSH2 0xAD8 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x12 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x496E76616C6964207369676E6174757265730000000000000000000000000000 DUP2 MSTORE POP SWAP4 POP SWAP4 POP POP POP PUSH2 0xB92 JUMP JUMPDEST PUSH2 0xAE2 DUP8 DUP8 PUSH2 0x6EC JUMP JUMPDEST PUSH2 0xB29 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x15 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x496E76616C69642067726F7570206D656D626572730000000000000000000000 DUP2 MSTORE POP SWAP4 POP SWAP4 POP POP POP PUSH2 0xB92 JUMP JUMPDEST PUSH2 0xB32 DUP8 PUSH2 0x854 JUMP JUMPDEST PUSH2 0xB79 JUMPI PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 PUSH1 0x40 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x14 DUP2 MSTORE PUSH1 0x20 ADD PUSH32 0x496E76616C6964206D656D626572732068617368000000000000000000000000 DUP2 MSTORE POP SWAP4 POP SWAP4 POP POP POP PUSH2 0xB92 JUMP JUMPDEST PUSH1 0x1 PUSH1 0x40 MLOAD DUP1 PUSH1 0x20 ADD PUSH1 0x40 MSTORE DUP1 PUSH1 0x0 DUP2 MSTORE POP SWAP4 POP SWAP4 POP POP POP JUMPDEST SWAP4 POP SWAP4 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH2 0xC31 CHAINID PUSH2 0xBAE PUSH1 0x20 DUP8 ADD DUP8 PUSH2 0x1360 JUMP JUMPDEST PUSH2 0xBBB PUSH1 0x40 DUP10 ADD DUP10 PUSH2 0x13A7 JUMP JUMPDEST DUP9 PUSH1 0x40 MLOAD PUSH1 0x20 ADD PUSH2 0xBD1 SWAP7 SWAP6 SWAP5 SWAP4 SWAP3 SWAP2 SWAP1 PUSH2 0x16A6 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x1F NOT DUP2 DUP5 SUB ADD DUP2 MSTORE DUP3 DUP3 MSTORE DUP1 MLOAD PUSH1 0x20 SWAP2 DUP3 ADD KECCAK256 PUSH32 0x19457468657265756D205369676E6564204D6573736167653A0A333200000000 DUP5 DUP4 ADD MSTORE PUSH1 0x3C DUP1 DUP6 ADD SWAP2 SWAP1 SWAP2 MSTORE DUP3 MLOAD DUP1 DUP6 SUB SWAP1 SWAP2 ADD DUP2 MSTORE PUSH1 0x5C SWAP1 SWAP4 ADD SWAP1 SWAP2 MSTORE DUP2 MLOAD SWAP2 ADD KECCAK256 SWAP1 JUMP JUMPDEST SWAP1 POP CALLDATASIZE PUSH1 0x0 PUSH2 0xC43 PUSH1 0x80 DUP8 ADD DUP8 PUSH2 0x13A7 JUMP JUMPDEST SWAP1 SWAP3 POP SWAP1 POP PUSH1 0x0 DUP2 PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0xC63 JUMPI PUSH2 0xC63 PUSH2 0x14BF JUMP JUMPDEST PUSH1 0x40 MLOAD SWAP1 DUP1 DUP3 MSTORE DUP1 PUSH1 0x20 MUL PUSH1 0x20 ADD DUP3 ADD PUSH1 0x40 MSTORE DUP1 ISZERO PUSH2 0xC8C JUMPI DUP2 PUSH1 0x20 ADD PUSH1 0x20 DUP3 MUL DUP1 CALLDATASIZE DUP4 CALLDATACOPY ADD SWAP1 POP JUMPDEST POP SWAP1 POP PUSH1 0x0 JUMPDEST DUP3 DUP2 LT ISZERO PUSH2 0xD29 JUMPI PUSH2 0xCA7 PUSH1 0xA0 DUP10 ADD DUP10 PUSH2 0x13A7 JUMP JUMPDEST PUSH1 0x1 DUP7 DUP7 DUP6 DUP2 DUP2 LT PUSH2 0xCBB JUMPI PUSH2 0xCBB PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD CALLDATALOAD PUSH2 0xCCC SWAP2 SWAP1 PUSH2 0x1407 JUMP JUMPDEST DUP2 DUP2 LT PUSH2 0xCDB JUMPI PUSH2 0xCDB PUSH2 0x141A JUMP JUMPDEST SWAP1 POP PUSH1 0x20 MUL ADD PUSH1 0x20 DUP2 ADD SWAP1 PUSH2 0xCF0 SWAP2 SWAP1 PUSH2 0x15DB JUMP JUMPDEST DUP3 DUP3 DUP2 MLOAD DUP2 LT PUSH2 0xD02 JUMPI PUSH2 0xD02 PUSH2 0x141A JUMP JUMPDEST PUSH4 0xFFFFFFFF SWAP1 SWAP3 AND PUSH1 0x20 SWAP3 DUP4 MUL SWAP2 SWAP1 SWAP2 ADD SWAP1 SWAP2 ADD MSTORE DUP1 PUSH2 0xD21 DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0xC92 JUMP JUMPDEST POP PUSH1 0x40 MLOAD PUSH32 0xF7F9A8FA00000000000000000000000000000000000000000000000000000000 DUP2 MSTORE PUSH1 0x0 SWAP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB PUSH32 0x0 AND SWAP1 PUSH4 0xF7F9A8FA SWAP1 PUSH2 0xD92 SWAP1 DUP6 SWAP1 PUSH1 0x4 ADD PUSH2 0x1611 JUMP JUMPDEST PUSH1 0x0 PUSH1 0x40 MLOAD DUP1 DUP4 SUB DUP2 DUP7 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0xDAF JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP POP POP PUSH1 0x40 MLOAD RETURNDATASIZE PUSH1 0x0 DUP3 RETURNDATACOPY PUSH1 0x1F RETURNDATASIZE SWAP1 DUP2 ADD PUSH1 0x1F NOT AND DUP3 ADD PUSH1 0x40 MSTORE PUSH2 0xDD7 SWAP2 SWAP1 DUP2 ADD SWAP1 PUSH2 0x172D JUMP JUMPDEST SWAP1 POP PUSH1 0x60 PUSH1 0x0 PUSH1 0x41 PUSH2 0xDEB DUP12 DUP5 ADD DUP13 PUSH2 0x1360 JUMP JUMPDEST PUSH2 0xDF6 SWAP3 SWAP2 POP PUSH2 0x1497 JUMP JUMPDEST SWAP1 POP PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0xEC5 JUMPI PUSH2 0xE5E PUSH2 0xE11 DUP3 PUSH1 0x41 PUSH2 0x17C9 JUMP JUMPDEST PUSH1 0x41 PUSH2 0xE20 PUSH1 0x60 DUP16 ADD DUP16 PUSH2 0x1360 JUMP JUMPDEST DUP1 DUP1 PUSH1 0x1F ADD PUSH1 0x20 DUP1 SWAP2 DIV MUL PUSH1 0x20 ADD PUSH1 0x40 MLOAD SWAP1 DUP2 ADD PUSH1 0x40 MSTORE DUP1 SWAP4 SWAP3 SWAP2 SWAP1 DUP2 DUP2 MSTORE PUSH1 0x20 ADD DUP4 DUP4 DUP1 DUP3 DUP5 CALLDATACOPY PUSH1 0x0 SWAP3 ADD SWAP2 SWAP1 SWAP2 MSTORE POP SWAP3 SWAP5 SWAP4 SWAP3 POP POP PUSH2 0xED6 SWAP1 POP JUMP JUMPDEST SWAP3 POP PUSH1 0x0 PUSH2 0xE6C DUP10 DUP6 PUSH2 0xF8B JUMP JUMPDEST SWAP1 POP DUP1 PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND DUP6 DUP4 DUP2 MLOAD DUP2 LT PUSH2 0xE8A JUMPI PUSH2 0xE8A PUSH2 0x141A JUMP JUMPDEST PUSH1 0x20 MUL PUSH1 0x20 ADD ADD MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB AND EQ PUSH2 0xEB2 JUMPI PUSH1 0x0 SWAP10 POP POP POP POP POP POP POP POP POP POP PUSH2 0x84E JUMP JUMPDEST POP DUP1 PUSH2 0xEBD DUP2 PUSH2 0x1468 JUMP JUMPDEST SWAP2 POP POP PUSH2 0xDFB JUMP JUMPDEST POP PUSH1 0x1 SWAP11 SWAP10 POP POP POP POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x60 PUSH1 0x0 PUSH2 0xEE4 DUP4 DUP6 PUSH2 0x17E0 JUMP JUMPDEST SWAP1 POP DUP4 DUP2 GT DUP1 ISZERO PUSH2 0xEF6 JUMPI POP DUP1 DUP6 MLOAD LT ISZERO JUMPDEST PUSH2 0xF47 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x13 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x536C696365206F7574206F6620626F756E647300000000000000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD JUMPDEST PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 REVERT JUMPDEST PUSH1 0x40 MLOAD SWAP2 POP DUP3 PUSH1 0x40 DUP4 ADD ADD PUSH1 0x40 MSTORE DUP3 DUP3 MSTORE DUP4 DUP6 ADD DUP3 SUB DUP5 PUSH1 0x20 DUP8 ADD ADD DUP5 DUP2 ADD JUMPDEST DUP1 DUP3 LT ISZERO PUSH2 0xF80 JUMPI DUP2 MLOAD DUP4 DUP4 ADD MSTORE PUSH1 0x20 DUP3 ADD SWAP2 POP PUSH2 0xF67 JUMP JUMPDEST POP POP POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH2 0xF9A DUP6 DUP6 PUSH2 0xFAF JUMP JUMPDEST SWAP2 POP SWAP2 POP PUSH2 0xFA7 DUP2 PUSH2 0xFF4 JUMP JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP3 MLOAD PUSH1 0x41 SUB PUSH2 0xFE5 JUMPI PUSH1 0x20 DUP4 ADD MLOAD PUSH1 0x40 DUP5 ADD MLOAD PUSH1 0x60 DUP6 ADD MLOAD PUSH1 0x0 BYTE PUSH2 0xFD9 DUP8 DUP3 DUP6 DUP6 PUSH2 0x115C JUMP JUMPDEST SWAP5 POP SWAP5 POP POP POP POP PUSH2 0xFED JUMP JUMPDEST POP PUSH1 0x0 SWAP1 POP PUSH1 0x2 JUMPDEST SWAP3 POP SWAP3 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 DUP2 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x1008 JUMPI PUSH2 0x1008 PUSH2 0x17F3 JUMP JUMPDEST SUB PUSH2 0x1010 JUMPI POP JUMP JUMPDEST PUSH1 0x1 DUP2 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x1024 JUMPI PUSH2 0x1024 PUSH2 0x17F3 JUMP JUMPDEST SUB PUSH2 0x1071 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x18 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x45434453413A20696E76616C6964207369676E61747572650000000000000000 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0xF3E JUMP JUMPDEST PUSH1 0x2 DUP2 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x1085 JUMPI PUSH2 0x1085 PUSH2 0x17F3 JUMP JUMPDEST SUB PUSH2 0x10D2 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x1F PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x45434453413A20696E76616C6964207369676E6174757265206C656E67746800 PUSH1 0x44 DUP3 ADD MSTORE PUSH1 0x64 ADD PUSH2 0xF3E JUMP JUMPDEST PUSH1 0x3 DUP2 PUSH1 0x4 DUP2 GT ISZERO PUSH2 0x10E6 JUMPI PUSH2 0x10E6 PUSH2 0x17F3 JUMP JUMPDEST SUB PUSH2 0x1159 JUMPI PUSH1 0x40 MLOAD PUSH3 0x461BCD PUSH1 0xE5 SHL DUP2 MSTORE PUSH1 0x20 PUSH1 0x4 DUP3 ADD MSTORE PUSH1 0x22 PUSH1 0x24 DUP3 ADD MSTORE PUSH32 0x45434453413A20696E76616C6964207369676E6174757265202773272076616C PUSH1 0x44 DUP3 ADD MSTORE PUSH32 0x7565000000000000000000000000000000000000000000000000000000000000 PUSH1 0x64 DUP3 ADD MSTORE PUSH1 0x84 ADD PUSH2 0xF3E JUMP JUMPDEST POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH32 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0 DUP4 GT ISZERO PUSH2 0x1193 JUMPI POP PUSH1 0x0 SWAP1 POP PUSH1 0x3 PUSH2 0x1217 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x0 DUP1 DUP3 MSTORE PUSH1 0x20 DUP3 ADD DUP1 DUP5 MSTORE DUP10 SWAP1 MSTORE PUSH1 0xFF DUP9 AND SWAP3 DUP3 ADD SWAP3 SWAP1 SWAP3 MSTORE PUSH1 0x60 DUP2 ADD DUP7 SWAP1 MSTORE PUSH1 0x80 DUP2 ADD DUP6 SWAP1 MSTORE PUSH1 0x1 SWAP1 PUSH1 0xA0 ADD PUSH1 0x20 PUSH1 0x40 MLOAD PUSH1 0x20 DUP2 SUB SWAP1 DUP1 DUP5 SUB SWAP1 DUP6 GAS STATICCALL ISZERO DUP1 ISZERO PUSH2 0x11E7 JUMPI RETURNDATASIZE PUSH1 0x0 DUP1 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST POP POP PUSH1 0x40 MLOAD PUSH1 0x1F NOT ADD MLOAD SWAP2 POP POP PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND PUSH2 0x1210 JUMPI PUSH1 0x0 PUSH1 0x1 SWAP3 POP SWAP3 POP POP PUSH2 0x1217 JUMP JUMPDEST SWAP2 POP PUSH1 0x0 SWAP1 POP JUMPDEST SWAP5 POP SWAP5 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0xE0 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1232 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST POP SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x124A JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1261 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x126D DUP5 DUP3 DUP6 ADD PUSH2 0x1220 JUMP JUMPDEST SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST DUP3 ISZERO ISZERO DUP2 MSTORE PUSH1 0x0 PUSH1 0x20 PUSH1 0x40 DUP2 DUP5 ADD MSTORE DUP4 MLOAD DUP1 PUSH1 0x40 DUP6 ADD MSTORE PUSH1 0x0 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x12AB JUMPI DUP6 DUP2 ADD DUP4 ADD MLOAD DUP6 DUP3 ADD PUSH1 0x60 ADD MSTORE DUP3 ADD PUSH2 0x128F JUMP JUMPDEST POP PUSH1 0x0 PUSH1 0x60 DUP3 DUP7 ADD ADD MSTORE PUSH1 0x60 PUSH1 0x1F NOT PUSH1 0x1F DUP4 ADD AND DUP6 ADD ADD SWAP3 POP POP POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x40 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x12E0 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x12F7 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1303 DUP6 DUP3 DUP7 ADD PUSH2 0x1220 JUMP JUMPDEST SWAP6 PUSH1 0x20 SWAP5 SWAP1 SWAP5 ADD CALLDATALOAD SWAP5 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 PUSH1 0x0 PUSH1 0x60 DUP5 DUP7 SUB SLT ISZERO PUSH2 0x1327 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 CALLDATALOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x133E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x134A DUP7 DUP3 DUP8 ADD PUSH2 0x1220 JUMP JUMPDEST SWAP7 PUSH1 0x20 DUP7 ADD CALLDATALOAD SWAP7 POP PUSH1 0x40 SWAP1 SWAP6 ADD CALLDATALOAD SWAP5 SWAP4 POP POP POP POP JUMP JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0x1377 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1392 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP CALLDATASIZE DUP2 SWAP1 SUB DUP3 SGT ISZERO PUSH2 0xFED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 DUP1 DUP4 CALLDATALOAD PUSH1 0x1E NOT DUP5 CALLDATASIZE SUB ADD DUP2 SLT PUSH2 0x13BE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD DUP1 CALLDATALOAD SWAP2 POP PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x13D9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x20 ADD SWAP2 POP PUSH1 0x5 DUP2 SWAP1 SHL CALLDATASIZE SUB DUP3 SGT ISZERO PUSH2 0xFED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x11 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST DUP2 DUP2 SUB DUP2 DUP2 GT ISZERO PUSH2 0x84E JUMPI PUSH2 0x84E PUSH2 0x13F1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x32 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST DUP1 CALLDATALOAD PUSH1 0xFF DUP2 AND DUP2 EQ PUSH2 0x1441 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x1458 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x1461 DUP3 PUSH2 0x1430 JUMP JUMPDEST SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x1 DUP3 ADD PUSH2 0x147A JUMPI PUSH2 0x147A PUSH2 0x13F1 JUMP JUMPDEST POP PUSH1 0x1 ADD SWAP1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x12 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x14A6 JUMPI PUSH2 0x14A6 PUSH2 0x1481 JUMP JUMPDEST POP DIV SWAP1 JUMP JUMPDEST PUSH1 0x0 DUP3 PUSH2 0x14BA JUMPI PUSH2 0x14BA PUSH2 0x1481 JUMP JUMPDEST POP MOD SWAP1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x41 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x40 MLOAD PUSH1 0x1F DUP3 ADD PUSH1 0x1F NOT AND DUP2 ADD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT DUP3 DUP3 LT OR ISZERO PUSH2 0x14FE JUMPI PUSH2 0x14FE PUSH2 0x14BF JUMP JUMPDEST PUSH1 0x40 MSTORE SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x0 PUSH8 0xFFFFFFFFFFFFFFFF DUP3 GT ISZERO PUSH2 0x1520 JUMPI PUSH2 0x1520 PUSH2 0x14BF JUMP JUMPDEST POP PUSH1 0x5 SHL PUSH1 0x20 ADD SWAP1 JUMP JUMPDEST PUSH4 0xFFFFFFFF DUP2 AND DUP2 EQ PUSH2 0x1159 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x154F JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1566 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD PUSH1 0x1F DUP2 ADD DUP6 SGT PUSH2 0x1577 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 MLOAD PUSH2 0x158A PUSH2 0x1585 DUP3 PUSH2 0x1506 JUMP JUMPDEST PUSH2 0x14D5 JUMP JUMPDEST DUP2 DUP2 MSTORE PUSH1 0x5 SWAP2 SWAP1 SWAP2 SHL DUP3 ADD DUP4 ADD SWAP1 DUP4 DUP2 ADD SWAP1 DUP8 DUP4 GT ISZERO PUSH2 0x15A9 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 DUP5 ADD SWAP3 JUMPDEST DUP3 DUP5 LT ISZERO PUSH2 0x15D0 JUMPI DUP4 MLOAD PUSH2 0x15C1 DUP2 PUSH2 0x152A JUMP JUMPDEST DUP3 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP1 DUP5 ADD SWAP1 PUSH2 0x15AE JUMP JUMPDEST SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP3 DUP5 SUB SLT ISZERO PUSH2 0x15ED JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP2 CALLDATALOAD PUSH2 0x1461 DUP2 PUSH2 0x152A JUMP JUMPDEST PUSH1 0xFF DUP3 DUP2 AND DUP3 DUP3 AND SUB SWAP1 DUP2 GT ISZERO PUSH2 0x84E JUMPI PUSH2 0x84E PUSH2 0x13F1 JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP3 MLOAD DUP3 DUP3 ADD DUP2 SWAP1 MSTORE PUSH1 0x0 SWAP2 SWAP1 DUP5 DUP3 ADD SWAP1 PUSH1 0x40 DUP6 ADD SWAP1 DUP5 JUMPDEST DUP2 DUP2 LT ISZERO PUSH2 0x164F JUMPI DUP4 MLOAD PUSH4 0xFFFFFFFF AND DUP4 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP2 DUP5 ADD SWAP2 PUSH1 0x1 ADD PUSH2 0x162D JUMP JUMPDEST POP SWAP1 SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x20 DUP1 DUP3 MSTORE DUP2 DUP2 ADD DUP4 SWAP1 MSTORE PUSH1 0x0 SWAP1 DUP5 PUSH1 0x40 DUP5 ADD DUP4 JUMPDEST DUP7 DUP2 LT ISZERO PUSH2 0x169B JUMPI DUP3 CALLDATALOAD PUSH2 0x1683 DUP2 PUSH2 0x152A JUMP JUMPDEST PUSH4 0xFFFFFFFF AND DUP3 MSTORE SWAP2 DUP4 ADD SWAP2 SWAP1 DUP4 ADD SWAP1 PUSH1 0x1 ADD PUSH2 0x1670 JUMP JUMPDEST POP SWAP7 SWAP6 POP POP POP POP POP POP JUMP JUMPDEST DUP7 DUP2 MSTORE PUSH1 0x0 PUSH1 0x20 PUSH1 0x80 DUP2 DUP5 ADD MSTORE DUP7 PUSH1 0x80 DUP5 ADD MSTORE DUP7 DUP9 PUSH1 0xA0 DUP6 ADD CALLDATACOPY PUSH1 0x0 PUSH1 0xA0 DUP9 DUP6 ADD DUP2 ADD DUP3 SWAP1 MSTORE PUSH1 0x1F NOT PUSH1 0x1F DUP11 ADD AND DUP6 ADD DUP6 DUP2 SUB DUP3 ADD PUSH1 0x40 DUP8 ADD MSTORE SWAP1 DUP2 ADD DUP8 SWAP1 MSTORE DUP8 SWAP2 SWAP1 PUSH1 0xC0 ADD JUMPDEST DUP8 DUP3 LT ISZERO PUSH2 0x1715 JUMPI PUSH1 0xFF PUSH2 0x1700 DUP5 PUSH2 0x1430 JUMP JUMPDEST AND DUP2 MSTORE SWAP2 DUP4 ADD SWAP2 PUSH1 0x1 SWAP2 SWAP1 SWAP2 ADD SWAP1 DUP4 ADD PUSH2 0x16ED JUMP JUMPDEST DUP1 SWAP5 POP POP POP POP POP DUP3 PUSH1 0x60 DUP4 ADD MSTORE SWAP8 SWAP7 POP POP POP POP POP POP POP JUMP JUMPDEST PUSH1 0x0 PUSH1 0x20 DUP1 DUP4 DUP6 SUB SLT ISZERO PUSH2 0x1740 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP3 MLOAD PUSH8 0xFFFFFFFFFFFFFFFF DUP2 GT ISZERO PUSH2 0x1757 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP4 ADD PUSH1 0x1F DUP2 ADD DUP6 SGT PUSH2 0x1768 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST DUP1 MLOAD PUSH2 0x1776 PUSH2 0x1585 DUP3 PUSH2 0x1506 JUMP JUMPDEST DUP2 DUP2 MSTORE PUSH1 0x5 SWAP2 SWAP1 SWAP2 SHL DUP3 ADD DUP4 ADD SWAP1 DUP4 DUP2 ADD SWAP1 DUP8 DUP4 GT ISZERO PUSH2 0x1795 JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST SWAP3 DUP5 ADD SWAP3 JUMPDEST DUP3 DUP5 LT ISZERO PUSH2 0x15D0 JUMPI DUP4 MLOAD PUSH1 0x1 PUSH1 0x1 PUSH1 0xA0 SHL SUB DUP2 AND DUP2 EQ PUSH2 0x17BA JUMPI PUSH1 0x0 DUP1 DUP2 REVERT JUMPDEST DUP3 MSTORE SWAP3 DUP5 ADD SWAP3 SWAP1 DUP5 ADD SWAP1 PUSH2 0x179A JUMP JUMPDEST DUP1 DUP3 MUL DUP2 ISZERO DUP3 DUP3 DIV DUP5 EQ OR PUSH2 0x84E JUMPI PUSH2 0x84E PUSH2 0x13F1 JUMP JUMPDEST DUP1 DUP3 ADD DUP1 DUP3 GT ISZERO PUSH2 0x84E JUMPI PUSH2 0x84E PUSH2 0x13F1 JUMP JUMPDEST PUSH4 0x4E487B71 PUSH1 0xE0 SHL PUSH1 0x0 MSTORE PUSH1 0x21 PUSH1 0x4 MSTORE PUSH1 0x24 PUSH1 0x0 REVERT INVALID SLOAD PUSH16 0x6F206D616E79206D656D62657273206D PUSH10 0x736265686176696E6720 PUSH5 0x7572696E67 KECCAK256 DIFFICULTY 0x4B SELFBALANCE NUMBER PUSH16 0x72727570746564206D69736265686176 PUSH6 0x64206D656D62 PUSH6 0x727320696E64 PUSH10 0x636573A2646970667358 0x22 SLT KECCAK256 COINBASE JUMPDEST SSTORE 0xCF PUSH22 0x1A3504ED115144C6AA809F8C56C6F584CF33C4AD0052 0xC9 DUP5 TIMESTAMP 0xBC PUSH31 0x64736F6C634300081100330000000000000000000000000000000000000000 ",
12001
12001
  "sourceMap": "3178:10080:5:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4209:46;;4253:2;4209:46;;;;;160:25:123;;;148:2;133:18;4209:46:5;;;;;;;;3991:44;;4033:2;3991:44;;6109:2994;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;3308:39::-;;3344:3;3308:39;;3625:43;;3666:2;3625:43;;4368:46;;4412:2;4368:46;;9393:627;;;;;;:::i;:::-;;:::i;:::-;;;1941:14:123;;1934:22;1916:41;;1904:2;1889:18;9393:627:5;1776:187:123;12151:1105:5;;;;;;:::i;:::-;;:::i;4421:44::-;;;;;;;;-1:-1:-1;;;;;2155:55:123;;;2137:74;;2125:2;2110:18;4421:44:5;1968:249:123;5055:782:5;;;;;;:::i;:::-;;:::i;10490:1402::-;;;;;;:::i;:::-;;:::i;6109:2994::-;6211:12;6225:22;4253:2;6267:18;;;;:6;:18;:::i;:::-;:25;;:46;6263:121;;-1:-1:-1;;6329:44:5;;;;;;;;;;;;;;;;;6337:5;;6329:44;;-1:-1:-1;6109:2994:5:o;6263:121::-;6591:41;;6635:44;;;;:6;:44;:::i;:::-;6591:88;;-1:-1:-1;6591:88:5;-1:-1:-1;4033:2:5;6693:43;6591:88;3344:3;6693:43;:::i;:::-;:61;6689:149;;;6778:5;6770:57;;;;;;;;;;;;;;;;;;;;;;;6109:2994;;;:::o;6689:149::-;6885:1;6851:35;;6847:656;;;6953:1;6923:24;;6948:1;6923:27;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;:31;;;:140;;;-1:-1:-1;3344:3:5;6974:24;;6999:35;7033:1;6974:24;6999:35;:::i;:::-;6974:61;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;:89;;;6923:140;6902:263;;;7104:5;7096:54;;;;;;;;;;;;;;;;;;;;;;;6109:2994;;;:::o;6902:263::-;7195:1;7178:315;7198:35;;;7178:315;;;7338:24;;7363:1;7338:27;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;7283:82;;:24;;7308:5;7312:1;7308;:5;:::i;:::-;7283:31;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;:82;;;7258:221;;7414:5;7406:54;;;;;;;;;;;;;;;;;;;;;;;;6109:2994;;;:::o;7258:221::-;7235:3;;;;:::i;:::-;;;;7178:315;;;;6847:656;7617:23;4412:2;7643:17;;;;:6;:17;:::i;:::-;:44;;;-1:-1:-1;7643:44:5;:::i;:::-;7617:70;-1:-1:-1;7701:17:5;;;;:6;:17;:::i;:::-;:24;;7729:1;7701:29;7697:100;;7754:5;7746:40;;;;;;;;;;;;;;;;;;;;;;;;6109:2994;;;:::o;7697:100::-;4412:2;7810:17;;;;:6;:17;:::i;:::-;:44;;;-1:-1:-1;7810:44:5;:::i;:::-;:49;7806:124;;7883:5;7875:44;;;;;;;;;;;;;;;;;;;;;;;;6109:2994;;;:::o;7806:124::-;8073:40;;8116:28;;;;:6;:28;:::i;:::-;8073:71;;-1:-1:-1;8073:71:5;-1:-1:-1;8158:47:5;;;8154:123;;8229:5;8221:45;;;;;;;;;;;;;;;;;;;;;;;;;;6109:2994;;;:::o;8154:123::-;3666:2;8290:15;:32;8286:99;;;8346:5;8338:36;;;;;;;;;;;;;;;;;;;;;;;;;;6109:2994;;;:::o;8286:99::-;3344:3;8398:15;:27;8394:95;;;8449:5;8441:37;;;;;;;;;;;;;;;;;;;;;;;;;;6109:2994;;;:::o;8394:95::-;8662:1;8635:21;;8657:1;8635:24;;;;;;;:::i;:::-;;;;;;;:28;:111;;;-1:-1:-1;3344:3:5;8679:21;;8701:32;8732:1;8679:21;8701:32;:::i;:::-;8679:55;;;;;;;:::i;:::-;;;;;;;:67;8635:111;8618:214;;;8779:5;8771:50;;;;;;;;;;;;;;;;;;;;;;;;;;6109:2994;;;:::o;8618:214::-;8858:1;8841:228;8861:32;;;8841:228;;;8950:21;;8972:1;8950:24;;;;;;;:::i;:::-;;;;;;;8918:21;;8944:1;8940;:5;;;;:::i;:::-;8918:28;;;;;;;:::i;:::-;;;;;;;:56;8914:145;;9002:5;8994:50;;;;;;;;;;;;;;;;;;;;;;;;;;;6109:2994;;;:::o;8914:145::-;8895:3;;;;:::i;:::-;;;;8841:228;;;;9087:4;9079:17;;;;;;;;;;;;;;;;;;;;;6109:2994;;;:::o;9393:627::-;9515:4;9535:31;9515:4;9569:14;;;;:6;:14;:::i;:::-;9630:85;;;;;3344:3;9630:85;;;6494:25:123;6535:18;;;6528:34;;;9535:48:5;;-1:-1:-1;9535:48:5;-1:-1:-1;9593:34:5;;9630:13;-1:-1:-1;;;;;9630:25:5;;;;6467:18:123;;9630:85:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;9630:85:5;;;;;;;;;;;;:::i;:::-;9753:25;;9593:122;;-1:-1:-1;9729:49:5;;9725:92;;9801:5;9794:12;;;;;;;9725:92;9831:9;9826:167;9846:24;;;9826:167;;;9915:18;9934:1;9915:21;;;;;;;;:::i;:::-;;;;;;;9895:41;;:13;;9909:1;9895:16;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;:41;;;9891:92;;9963:5;9956:12;;;;;;;;9891:92;9872:3;;;;:::i;:::-;;;;9826:167;;;;10009:4;10002:11;;;;;9393:627;;;;;:::o;12151:1105::-;12258:4;;12282:31;;;;:6;:31;:::i;:::-;:38;;:42;12278:895;;;12398:28;12483:31;;;;:6;:31;:::i;:::-;:38;-1:-1:-1;12459:14:5;;;;:6;:14;:::i;:::-;:62;;;-1:-1:-1;12459:62:5;:::i;:::-;12429:106;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12429:106:5;;12398:137;;12549:9;12606;12663;12658:426;12682:14;;;;:6;:14;:::i;:::-;:21;;12678:1;:25;12658:426;;;12864:1;12827:31;;;;:6;:31;:::i;:::-;12859:1;12827:34;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;:38;;;;:::i;:::-;12822:43;;:1;:43;12818:252;;12907:14;;;;:6;:14;:::i;:::-;12922:1;12907:17;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;12889:12;12902:1;12889:15;;;;;;;;:::i;:::-;:35;;;;:15;;;;;;;;;;;:35;12946:3;;;;:::i;:::-;;;;12818:252;;;13023:1;12982:31;;;;:6;:31;:::i;:::-;:42;;;-1:-1:-1;12982:42:5;:::i;:::-;12978:1;:46;12974:96;;;13048:3;;;;:::i;:::-;;;;12974:96;12705:3;;;;:::i;:::-;;;;12658:426;;;;13144:6;:18;;;13126:12;13115:24;;;;;;;;:::i;:::-;;;;;;;;;;;;;13105:35;;;;;;:57;13098:64;;;;;12151:1105;;;:::o;12278:895::-;13231:18;;;;13211:14;;;;13231:6;13211:14;:::i;:::-;13200:26;;;;;;;;;:::i;:::-;;;;;;;;;;;;;13190:37;;;;;;:59;13183:66;;12151:1105;;;:::o;5055:782::-;5193:12;5207:22;5242:19;5263;5286:22;5301:6;5286:14;:22::i;:::-;5241:67;;;;5323:14;5318:67;;5361:5;;-1:-1:-1;5368:5:5;-1:-1:-1;5353:21:5;;-1:-1:-1;5353:21:5;5318:67;5400:38;5419:6;5427:10;5400:18;:38::i;:::-;5395:106;;5462:5;5454:36;;;;;;;;;;;;;;;;;;;;;;;;;5395:106;5516:34;5537:6;5545:4;5516:20;:34::i;:::-;5511:105;;5574:5;5566:39;;;;;;;;;;;;;;;;;;;;;;;;;5511:105;5711:27;5731:6;5711:19;:27::i;:::-;5706:97;;5762:5;5754:38;;;;;;;;;;;;;;;;;;;;;;;;;5706:97;5821:4;5813:17;;;;;;;;;;;;;;;;;;5055:782;;;;;;;:::o;10490:1402::-;10614:4;;10645:226;10696:13;10727:18;;;;:6;:18;:::i;:::-;10763:31;;;;:6;:31;:::i;:::-;10812:10;10668:168;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;10668:168:5;;;;;;;;;10645:201;;10668:168;10645:201;;;;12657:66:123;7455:58:70;;;12645:79:123;12740:12;;;;12733:28;;;;7455:58:70;;;;;;;;;;12777:12:123;;;;7455:58:70;;;7445:69;;;;;;7256:265;10645:226:5;10630:241;-1:-1:-1;10882:40:5;;10925:28;;;;:6;:28;:::i;:::-;10882:71;;-1:-1:-1;10882:71:5;-1:-1:-1;10963:32:5;10882:71;10998:64;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10998:64:5;;10963:99;;11077:9;11072:150;11092:32;;;11072:150;;;11167:14;;;;:6;:14;:::i;:::-;11209:1;11182:21;;11204:1;11182:24;;;;;;;:::i;:::-;;;;;;;:28;;;;:::i;:::-;11167:44;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;11145:16;11162:1;11145:19;;;;;;;;:::i;:::-;:66;;;;:19;;;;;;;;;;;:66;11126:3;;;;:::i;:::-;;;;11072:150;;;-1:-1:-1;11274:68:5;;;;;11232:39;;-1:-1:-1;;;;;11274:13:5;:28;;;;:68;;11316:16;;11274:68;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;11274:68:5;;;;;;;;;;;;:::i;:::-;11232:110;-1:-1:-1;11353:20:5;11420:23;4412:2;11446:17;;;;:6;:17;:::i;:::-;:44;;;-1:-1:-1;11446:44:5;:::i;:::-;11420:70;;11505:9;11500:364;11524:15;11520:1;:19;11500:364;;;11570:111;11611:21;11631:1;4412:2;11611:21;:::i;:::-;4412:2;11570:17;;;;:6;:17;:::i;:::-;:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;11570:23:5;;:111;;-1:-1:-1;;11570:23:5;:111;-1:-1:-1;11570:111:5:i;:::-;11560:121;-1:-1:-1;11695:24:5;11722:21;:4;11560:121;11722:12;:21::i;:::-;11695:48;;11791:16;-1:-1:-1;;;;;11762:45:5;:22;11785:1;11762:25;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;11762:45:5;;11758:96;;11834:5;11827:12;;;;;;;;;;;;;11758:96;-1:-1:-1;11541:3:5;;;;:::i;:::-;;;;11500:364;;;-1:-1:-1;11881:4:5;;10490:1402;-1:-1:-1;;;;;;;;;;10490:1402:5:o;15356:898:18:-;15478:16;15506:12;15521:16;15530:7;15521:6;:16;:::i;:::-;15506:31;;15562:6;15555:4;:13;:38;;;;;15589:4;15572:6;:13;:21;;15555:38;15547:70;;;;-1:-1:-1;;;15547:70:18;;13132:2:123;15547:70:18;;;13114:21:123;13171:2;13151:18;;;13144:30;13210:21;13190:18;;;13183:49;13249:18;;15547:70:18;;;;;;;;;15754:4;15748:11;15741:18;;15803:7;15798:2;15793:3;15789:12;15785:26;15779:4;15772:40;15837:7;15832:3;15825:20;15964:6;15956;15952:19;15947:3;15943:29;16040:6;16035:2;16027:6;16023:15;16019:28;16084:7;16079:3;16075:17;15986:252;16115:3;16110;16107:12;15986:252;;;16219:3;16213:10;16206:4;16201:3;16197:14;16190:34;16154:2;16149:3;16145:12;16138:19;;15986:252;;;15990:116;;;15637:611;15356:898;;;;;:::o;3661:227:70:-;3739:7;3759:17;3778:18;3800:27;3811:4;3817:9;3800:10;:27::i;:::-;3758:69;;;;3837:18;3849:5;3837:11;:18::i;:::-;-1:-1:-1;3872:9:70;3661:227;-1:-1:-1;;;3661:227:70:o;2145:730::-;2226:7;2235:12;2263:9;:16;2283:2;2263:22;2259:610;;2599:4;2584:20;;2578:27;2648:4;2633:20;;2627:27;2705:4;2690:20;;2684:27;2301:9;2676:36;2746:25;2757:4;2676:36;2578:27;2627;2746:10;:25::i;:::-;2739:32;;;;;;;;;2259:610;-1:-1:-1;2818:1:70;;-1:-1:-1;2822:35:70;2259:610;2145:730;;;;;:::o;570:511::-;647:20;638:5;:29;;;;;;;;:::i;:::-;;634:441;;570:511;:::o;634:441::-;743:29;734:5;:38;;;;;;;;:::i;:::-;;730:345;;788:34;;-1:-1:-1;;;788:34:70;;13669:2:123;788:34:70;;;13651:21:123;13708:2;13688:18;;;13681:30;13747:26;13727:18;;;13720:54;13791:18;;788:34:70;13467:348:123;730:345:70;852:35;843:5;:44;;;;;;;;:::i;:::-;;839:236;;903:41;;-1:-1:-1;;;903:41:70;;14022:2:123;903:41:70;;;14004:21:123;14061:2;14041:18;;;14034:30;14100:33;14080:18;;;14073:61;14151:18;;903:41:70;13820:355:123;839:236:70;974:30;965:5;:39;;;;;;;;:::i;:::-;;961:114;;1020:44;;-1:-1:-1;;;1020:44:70;;14382:2:123;1020:44:70;;;14364:21:123;14421:2;14401:18;;;14394:30;14460:34;14440:18;;;14433:62;14531:4;14511:18;;;14504:32;14553:19;;1020:44:70;14180:398:123;961:114:70;570:511;:::o;5069:1494::-;5195:7;;6119:66;6106:79;;6102:161;;;-1:-1:-1;6217:1:70;;-1:-1:-1;6221:30:70;6201:51;;6102:161;6374:24;;;6357:14;6374:24;;;;;;;;;14810:25:123;;;14883:4;14871:17;;14851:18;;;14844:45;;;;14905:18;;;14898:34;;;14948:18;;;14941:34;;;6374:24:70;;14782:19:123;;6374:24:70;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6374:24:70;;-1:-1:-1;;6374:24:70;;;-1:-1:-1;;;;;;;6412:20:70;;6408:101;;6464:1;6468:29;6448:50;;;;;;;6408:101;6527:6;-1:-1:-1;6535:20:70;;-1:-1:-1;5069:1494:70;;;;;;;;:::o;196:155:123:-;255:5;300:3;291:6;286:3;282:16;278:26;275:46;;;317:1;314;307:12;275:46;-1:-1:-1;339:6:123;196:155;-1:-1:-1;196:155:123:o;356:354::-;441:6;494:2;482:9;473:7;469:23;465:32;462:52;;;510:1;507;500:12;462:52;550:9;537:23;583:18;575:6;572:30;569:50;;;615:1;612;605:12;569:50;638:66;696:7;687:6;676:9;672:22;638:66;:::i;:::-;628:76;356:354;-1:-1:-1;;;;356:354:123:o;715:629::-;900:6;893:14;886:22;875:9;868:41;849:4;928:2;966;961;950:9;946:18;939:30;998:6;992:13;1041:6;1036:2;1025:9;1021:18;1014:34;1066:1;1076:140;1090:6;1087:1;1084:13;1076:140;;;1185:14;;;1181:23;;1175:30;1151:17;;;1170:2;1147:26;1140:66;1105:10;;1076:140;;;1080:3;1265:1;1260:2;1251:6;1240:9;1236:22;1232:31;1225:42;1335:2;1328;1324:7;1319:2;1311:6;1307:15;1303:29;1292:9;1288:45;1284:54;1276:62;;;;715:629;;;;;:::o;1349:422::-;1443:6;1451;1504:2;1492:9;1483:7;1479:23;1475:32;1472:52;;;1520:1;1517;1510:12;1472:52;1560:9;1547:23;1593:18;1585:6;1582:30;1579:50;;;1625:1;1622;1615:12;1579:50;1648:66;1706:7;1697:6;1686:9;1682:22;1648:66;:::i;:::-;1638:76;1761:2;1746:18;;;;1733:32;;-1:-1:-1;;;;1349:422:123:o;2222:490::-;2325:6;2333;2341;2394:2;2382:9;2373:7;2369:23;2365:32;2362:52;;;2410:1;2407;2400:12;2362:52;2450:9;2437:23;2483:18;2475:6;2472:30;2469:50;;;2515:1;2512;2505:12;2469:50;2538:66;2596:7;2587:6;2576:9;2572:22;2538:66;:::i;:::-;2528:76;2651:2;2636:18;;2623:32;;-1:-1:-1;2702:2:123;2687:18;;;2674:32;;2222:490;-1:-1:-1;;;;2222:490:123:o;2717:521::-;2794:4;2800:6;2860:11;2847:25;2954:2;2950:7;2939:8;2923:14;2919:29;2915:43;2895:18;2891:68;2881:96;;2973:1;2970;2963:12;2881:96;3000:33;;3052:20;;;-1:-1:-1;3095:18:123;3084:30;;3081:50;;;3127:1;3124;3117:12;3081:50;3160:4;3148:17;;-1:-1:-1;3191:14:123;3187:27;;;3177:38;;3174:58;;;3228:1;3225;3218:12;3243:543;3334:4;3340:6;3400:11;3387:25;3494:2;3490:7;3479:8;3463:14;3459:29;3455:43;3435:18;3431:68;3421:96;;3513:1;3510;3503:12;3421:96;3540:33;;3592:20;;;-1:-1:-1;3635:18:123;3624:30;;3621:50;;;3667:1;3664;3657:12;3621:50;3700:4;3688:17;;-1:-1:-1;3751:1:123;3747:14;;;3731;3727:35;3717:46;;3714:66;;;3776:1;3773;3766:12;3791:184;-1:-1:-1;;;3840:1:123;3833:88;3940:4;3937:1;3930:15;3964:4;3961:1;3954:15;3980:128;4047:9;;;4068:11;;;4065:37;;;4082:18;;:::i;4113:184::-;-1:-1:-1;;;4162:1:123;4155:88;4262:4;4259:1;4252:15;4286:4;4283:1;4276:15;4302:156;4368:20;;4428:4;4417:16;;4407:27;;4397:55;;4448:1;4445;4438:12;4397:55;4302:156;;;:::o;4463:182::-;4520:6;4573:2;4561:9;4552:7;4548:23;4544:32;4541:52;;;4589:1;4586;4579:12;4541:52;4612:27;4629:9;4612:27;:::i;:::-;4602:37;4463:182;-1:-1:-1;;;4463:182:123:o;4650:135::-;4689:3;4710:17;;;4707:43;;4730:18;;:::i;:::-;-1:-1:-1;4777:1:123;4766:13;;4650:135::o;4790:184::-;-1:-1:-1;;;4839:1:123;4832:88;4939:4;4936:1;4929:15;4963:4;4960:1;4953:15;4979:120;5019:1;5045;5035:35;;5050:18;;:::i;:::-;-1:-1:-1;5084:9:123;;4979:120::o;5104:112::-;5136:1;5162;5152:35;;5167:18;;:::i;:::-;-1:-1:-1;5201:9:123;;5104:112::o;6573:184::-;-1:-1:-1;;;6622:1:123;6615:88;6722:4;6719:1;6712:15;6746:4;6743:1;6736:15;6762:275;6833:2;6827:9;6898:2;6879:13;;-1:-1:-1;;6875:27:123;6863:40;;6933:18;6918:34;;6954:22;;;6915:62;6912:88;;;6980:18;;:::i;:::-;7016:2;7009:22;6762:275;;-1:-1:-1;6762:275:123:o;7042:182::-;7101:4;7134:18;7126:6;7123:30;7120:56;;;7156:18;;:::i;:::-;-1:-1:-1;7201:1:123;7197:14;7213:4;7193:25;;7042:182::o;7229:121::-;7314:10;7307:5;7303:22;7296:5;7293:33;7283:61;;7340:1;7337;7330:12;7355:953;7449:6;7480:2;7523;7511:9;7502:7;7498:23;7494:32;7491:52;;;7539:1;7536;7529:12;7491:52;7572:9;7566:16;7605:18;7597:6;7594:30;7591:50;;;7637:1;7634;7627:12;7591:50;7660:22;;7713:4;7705:13;;7701:27;-1:-1:-1;7691:55:123;;7742:1;7739;7732:12;7691:55;7771:2;7765:9;7794:59;7810:42;7849:2;7810:42;:::i;:::-;7794:59;:::i;:::-;7887:15;;;7969:1;7965:10;;;;7957:19;;7953:28;;;7918:12;;;;7993:19;;;7990:39;;;8025:1;8022;8015:12;7990:39;8049:11;;;;8069:209;8085:6;8080:3;8077:15;8069:209;;;8158:3;8152:10;8175:30;8199:5;8175:30;:::i;:::-;8218:18;;8102:12;;;;8256;;;;8069:209;;;8297:5;7355:953;-1:-1:-1;;;;;;;7355:953:123:o;8313:245::-;8371:6;8424:2;8412:9;8403:7;8399:23;8395:32;8392:52;;;8440:1;8437;8430:12;8392:52;8479:9;8466:23;8498:30;8522:5;8498:30;:::i;8563:151::-;8653:4;8646:12;;;8632;;;8628:31;;8671:14;;8668:40;;;8688:18;;:::i;8719:647::-;8888:2;8940:21;;;9010:13;;8913:18;;;9032:22;;;8859:4;;8888:2;9111:15;;;;9085:2;9070:18;;;8859:4;9154:186;9168:6;9165:1;9162:13;9154:186;;;9233:13;;9248:10;9229:30;9217:43;;9315:15;;;;9280:12;;;;9190:1;9183:9;9154:186;;;-1:-1:-1;9357:3:123;;8719:647;-1:-1:-1;;;;;;8719:647:123:o;9371:693::-;9550:2;9602:21;;;9575:18;;;9658:22;;;9521:4;;9737:6;9711:2;9696:18;;9521:4;9771:267;9785:6;9782:1;9779:13;9771:267;;;9860:6;9847:20;9880:30;9904:5;9880:30;:::i;:::-;9946:10;9935:22;9923:35;;10013:15;;;;9978:12;;;;9807:1;9800:9;9771:267;;;-1:-1:-1;10055:3:123;9371:693;-1:-1:-1;;;;;;9371:693:123:o;10069:1076::-;10366:6;10355:9;10348:25;10329:4;10392:2;10430:3;10425:2;10414:9;10410:18;10403:31;10471:6;10465:3;10454:9;10450:19;10443:35;10529:6;10521;10515:3;10504:9;10500:19;10487:49;10586:1;10580:3;10556:22;;;10552:32;;10545:43;;;-1:-1:-1;;10647:2:123;10626:15;;10622:29;10607:45;;10724:18;;;10720:28;;10715:2;10700:18;;10693:56;10672:12;;;10781:19;;;10851:6;;10586:1;10824:3;10816:12;10885:191;10899:6;10896:1;10893:13;10885:191;;;10990:4;10964:24;10981:6;10964:24;:::i;:::-;10960:35;10948:48;;11051:15;;;;10921:1;10914:9;;;;;11016:12;;10885:191;;;11093:3;11085:11;;;;;;11132:6;11127:2;11116:9;11112:18;11105:34;10069:1076;;;;;;;;;:::o;11150:1087::-;11245:6;11276:2;11319;11307:9;11298:7;11294:23;11290:32;11287:52;;;11335:1;11332;11325:12;11287:52;11368:9;11362:16;11401:18;11393:6;11390:30;11387:50;;;11433:1;11430;11423:12;11387:50;11456:22;;11509:4;11501:13;;11497:27;-1:-1:-1;11487:55:123;;11538:1;11535;11528:12;11487:55;11567:2;11561:9;11590:59;11606:42;11645:2;11606:42;:::i;11590:59::-;11683:15;;;11765:1;11761:10;;;;11753:19;;11749:28;;;11714:12;;;;11789:19;;;11786:39;;;11821:1;11818;11811:12;11786:39;11845:11;;;;11865:342;11881:6;11876:3;11873:15;11865:342;;;11954:3;11948:10;-1:-1:-1;;;;;11995:5:123;11991:54;11984:5;11981:65;11971:163;;12088:1;12117:2;12113;12106:14;11971:163;12147:18;;11898:12;;;;12185;;;;11865:342;;12242:168;12315:9;;;12346;;12363:15;;;12357:22;;12343:37;12333:71;;12384:18;;:::i;12800:125::-;12865:9;;;12886:10;;;12883:36;;;12899:18;;:::i;13278:184::-;-1:-1:-1;;;13327:1:123;13320:88;13427:4;13424:1;13417:15;13451:4;13448:1;13441:15"
12002
12002
  },
12003
12003
  "gasEstimates": {
@@ -12034,7 +12034,7 @@
12034
12034
  "validateSignatures((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32),uint256)": "e7d10d9b"
12035
12035
  }
12036
12036
  },
12037
- "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract SortitionPool\",\"name\":\"_sortitionPool\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"activeThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"groupSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"groupThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"publicKeyByteSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"signatureByteSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionPool\",\"outputs\":[{\"internalType\":\"contract SortitionPool\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"struct EcdsaDkg.Result\",\"name\":\"result\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startBlock\",\"type\":\"uint256\"}],\"name\":\"validate\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isValid\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"errorMsg\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"struct EcdsaDkg.Result\",\"name\":\"result\",\"type\":\"tuple\"}],\"name\":\"validateFields\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isValid\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"errorMsg\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"struct EcdsaDkg.Result\",\"name\":\"result\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"}],\"name\":\"validateGroupMembers\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"struct EcdsaDkg.Result\",\"name\":\"result\",\"type\":\"tuple\"}],\"name\":\"validateMembersHash\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"struct EcdsaDkg.Result\",\"name\":\"result\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"startBlock\",\"type\":\"uint256\"}],\"name\":\"validateSignatures\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"validate((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32),uint256,uint256)\":{\"params\":{\"seed\":\"seed used to start the DKG and select group members\",\"startBlock\":\"DKG start block\"},\"returns\":{\"errorMsg\":\"validation error message; empty for a valid result\",\"isValid\":\"true if the result is valid, false otherwise\"}},\"validateFields((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32))\":{\"returns\":{\"errorMsg\":\"validation error message; empty for a valid result\",\"isValid\":\"true if the result is valid, false otherwise\"}},\"validateGroupMembers((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32),uint256)\":{\"params\":{\"seed\":\"seed used to start the DKG and select group members\"},\"returns\":{\"_0\":\"true if group members matches; false otherwise\"}},\"validateMembersHash((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32))\":{\"params\":{\"result\":\"DKG result\"},\"returns\":{\"_0\":\"true if calculated result's group members hash matches with the one that is challenged.\"}},\"validateSignatures((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32),uint256)\":{\"params\":{\"startBlock\":\"DKG start block\"},\"returns\":{\"_0\":\"true if group members matches; false otherwise\"}}},\"stateVariables\":{\"activeThreshold\":{\"details\":\"The minimum number of active and properly behaving group members during the DKG needed to accept the result. This number is higher than `groupThreshold` to keep a safety margin for members becoming inactive after DKG so that the group can still produce signature.\"},\"groupSize\":{\"details\":\"Size of a group in DKG.\"},\"groupThreshold\":{\"details\":\"The minimum number of group members needed to interact according to the protocol to produce a signature. The adversary can not learn anything about the key as long as it does not break into groupThreshold+1 of members.\"},\"publicKeyByteSize\":{\"details\":\"Size in bytes of a public key produced by group members during the the DKG. The length assumes uncompressed ECDSA public key.\"},\"signatureByteSize\":{\"details\":\"Size in bytes of a single signature produced by operator supporting DKG result.\"}},\"title\":\"DKG result validator\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"validate((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32),uint256,uint256)\":{\"notice\":\"Performs a full validation of DKG result, including checking the format of fields in the result, declared selected group members, and signatures of operators supporting the result.\"},\"validateFields((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32))\":{\"notice\":\"Performs a static validation of DKG result fields: lengths, ranges, and order of arrays.\"},\"validateGroupMembers((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32),uint256)\":{\"notice\":\"Performs validation of group members as declared in DKG result against group members selected by the sortition pool.\"},\"validateMembersHash((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32))\":{\"notice\":\"Performs validation of hashed group members that actively took part in DKG.\"},\"validateSignatures((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32),uint256)\":{\"notice\":\"Performs validation of signatures supplied in DKG result. Note that this function does not check if addresses which supplied signatures supporting the result are the ones selected to the group by sortition pool. This function should be used together with `validateGroupMembers`.\"}},\"notice\":\"EcdsaDkgValidator allows performing a full validation of DKG result, including checking the format of fields in the result, declared selected group members, and signatures of operators supporting the result. The operator submitting the result should perform the validation using a free contract call before submitting the result to ensure their result is valid and can not be challenged. All other network operators should perform validation of the submitted result using a free contract call and challenge the result if the validation fails.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"@keep-network/ecdsa/contracts/EcdsaDkgValidator.sol\":\"EcdsaDkgValidator\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[]},\"sources\":{\"@keep-network/ecdsa/contracts/EcdsaDkgValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n//\\n// \\u2593\\u2593\\u258c \\u2593\\u2593 \\u2590\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2584\\u2584 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2584\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2580\\u2580 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2580\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2580\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2588\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n//\\n// Trust math, not hardware.\\n\\n// Initial version copied from Keep Network Random Beacon:\\n// https://github.com/keep-network/keep-core/blob/5138c7628868dbeed3ae2164f76fccc6c1fbb9e8/solidity/random-beacon/contracts/DKGValidator.sol\\n//\\n// With the following differences:\\n// - group public key length,\\n// - group size and related thresholds,\\n// - documentation.\\n\\npragma solidity 0.8.17;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@keep-network/random-beacon/contracts/libraries/BytesLib.sol\\\";\\nimport \\\"@keep-network/sortition-pools/contracts/SortitionPool.sol\\\";\\nimport \\\"./libraries/EcdsaDkg.sol\\\";\\n\\n/// @title DKG result validator\\n/// @notice EcdsaDkgValidator allows performing a full validation of DKG result,\\n/// including checking the format of fields in the result, declared\\n/// selected group members, and signatures of operators supporting the\\n/// result. The operator submitting the result should perform the\\n/// validation using a free contract call before submitting the result\\n/// to ensure their result is valid and can not be challenged. All other\\n/// network operators should perform validation of the submitted result\\n/// using a free contract call and challenge the result if the\\n/// validation fails.\\ncontract EcdsaDkgValidator {\\n using BytesLib for bytes;\\n using ECDSA for bytes32;\\n\\n /// @dev Size of a group in DKG.\\n uint256 public constant groupSize = 100;\\n\\n /// @dev The minimum number of group members needed to interact according to\\n /// the protocol to produce a signature. The adversary can not learn\\n /// anything about the key as long as it does not break into\\n /// groupThreshold+1 of members.\\n uint256 public constant groupThreshold = 51;\\n\\n /// @dev The minimum number of active and properly behaving group members\\n /// during the DKG needed to accept the result. This number is higher\\n /// than `groupThreshold` to keep a safety margin for members becoming\\n /// inactive after DKG so that the group can still produce signature.\\n uint256 public constant activeThreshold = 90; // 90% of groupSize\\n\\n /// @dev Size in bytes of a public key produced by group members during the\\n /// the DKG. The length assumes uncompressed ECDSA public key.\\n uint256 public constant publicKeyByteSize = 64;\\n\\n /// @dev Size in bytes of a single signature produced by operator supporting\\n /// DKG result.\\n uint256 public constant signatureByteSize = 65;\\n\\n SortitionPool public immutable sortitionPool;\\n\\n constructor(SortitionPool _sortitionPool) {\\n sortitionPool = _sortitionPool;\\n }\\n\\n /// @notice Performs a full validation of DKG result, including checking the\\n /// format of fields in the result, declared selected group members,\\n /// and signatures of operators supporting the result.\\n /// @param seed seed used to start the DKG and select group members\\n /// @param startBlock DKG start block\\n /// @return isValid true if the result is valid, false otherwise\\n /// @return errorMsg validation error message; empty for a valid result\\n function validate(\\n EcdsaDkg.Result calldata result,\\n uint256 seed,\\n uint256 startBlock\\n ) external view returns (bool isValid, string memory errorMsg) {\\n (bool hasValidFields, string memory error) = validateFields(result);\\n if (!hasValidFields) {\\n return (false, error);\\n }\\n\\n if (!validateSignatures(result, startBlock)) {\\n return (false, \\\"Invalid signatures\\\");\\n }\\n\\n if (!validateGroupMembers(result, seed)) {\\n return (false, \\\"Invalid group members\\\");\\n }\\n\\n // At this point all group members and misbehaved members were verified\\n if (!validateMembersHash(result)) {\\n return (false, \\\"Invalid members hash\\\");\\n }\\n\\n return (true, \\\"\\\");\\n }\\n\\n /// @notice Performs a static validation of DKG result fields: lengths,\\n /// ranges, and order of arrays.\\n /// @return isValid true if the result is valid, false otherwise\\n /// @return errorMsg validation error message; empty for a valid result\\n function validateFields(EcdsaDkg.Result calldata result)\\n public\\n pure\\n returns (bool isValid, string memory errorMsg)\\n {\\n if (result.groupPubKey.length != publicKeyByteSize) {\\n return (false, \\\"Malformed group public key\\\");\\n }\\n\\n // The number of misbehaved members can not exceed the threshold.\\n // Misbehaved member indices needs to be unique, between [1, groupSize],\\n // and sorted in ascending order.\\n uint8[] calldata misbehavedMembersIndices = result\\n .misbehavedMembersIndices;\\n if (groupSize - misbehavedMembersIndices.length < activeThreshold) {\\n return (false, \\\"Too many members misbehaving during DKG\\\");\\n }\\n if (misbehavedMembersIndices.length > 1) {\\n if (\\n misbehavedMembersIndices[0] < 1 ||\\n misbehavedMembersIndices[misbehavedMembersIndices.length - 1] >\\n groupSize\\n ) {\\n return (false, \\\"Corrupted misbehaved members indices\\\");\\n }\\n for (uint256 i = 1; i < misbehavedMembersIndices.length; i++) {\\n if (\\n misbehavedMembersIndices[i - 1] >=\\n misbehavedMembersIndices[i]\\n ) {\\n return (false, \\\"Corrupted misbehaved members indices\\\");\\n }\\n }\\n }\\n\\n // Each signature needs to have a correct length and signatures need to\\n // be provided.\\n uint256 signaturesCount = result.signatures.length / signatureByteSize;\\n if (result.signatures.length == 0) {\\n return (false, \\\"No signatures provided\\\");\\n }\\n if (result.signatures.length % signatureByteSize != 0) {\\n return (false, \\\"Malformed signatures array\\\");\\n }\\n\\n // We expect the same amount of signatures as the number of declared\\n // group member indices that signed the result.\\n uint256[] calldata signingMembersIndices = result.signingMembersIndices;\\n if (signaturesCount != signingMembersIndices.length) {\\n return (false, \\\"Unexpected signatures count\\\");\\n }\\n if (signaturesCount < groupThreshold) {\\n return (false, \\\"Too few signatures\\\");\\n }\\n if (signaturesCount > groupSize) {\\n return (false, \\\"Too many signatures\\\");\\n }\\n\\n // Signing member indices needs to be unique, between [1,groupSize],\\n // and sorted in ascending order.\\n if (\\n signingMembersIndices[0] < 1 ||\\n signingMembersIndices[signingMembersIndices.length - 1] > groupSize\\n ) {\\n return (false, \\\"Corrupted signing member indices\\\");\\n }\\n for (uint256 i = 1; i < signingMembersIndices.length; i++) {\\n if (signingMembersIndices[i - 1] >= signingMembersIndices[i]) {\\n return (false, \\\"Corrupted signing member indices\\\");\\n }\\n }\\n\\n return (true, \\\"\\\");\\n }\\n\\n /// @notice Performs validation of group members as declared in DKG\\n /// result against group members selected by the sortition pool.\\n /// @param seed seed used to start the DKG and select group members\\n /// @return true if group members matches; false otherwise\\n function validateGroupMembers(EcdsaDkg.Result calldata result, uint256 seed)\\n public\\n view\\n returns (bool)\\n {\\n uint32[] calldata resultMembers = result.members;\\n uint32[] memory actualGroupMembers = sortitionPool.selectGroup(\\n groupSize,\\n bytes32(seed)\\n );\\n if (resultMembers.length != actualGroupMembers.length) {\\n return false;\\n }\\n for (uint256 i = 0; i < resultMembers.length; i++) {\\n if (resultMembers[i] != actualGroupMembers[i]) {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Performs validation of signatures supplied in DKG result.\\n /// Note that this function does not check if addresses which\\n /// supplied signatures supporting the result are the ones selected\\n /// to the group by sortition pool. This function should be used\\n /// together with `validateGroupMembers`.\\n /// @param startBlock DKG start block\\n /// @return true if group members matches; false otherwise\\n function validateSignatures(\\n EcdsaDkg.Result calldata result,\\n uint256 startBlock\\n ) public view returns (bool) {\\n bytes32 hash = keccak256(\\n abi.encode(\\n block.chainid,\\n result.groupPubKey,\\n result.misbehavedMembersIndices,\\n startBlock\\n )\\n ).toEthSignedMessageHash();\\n\\n uint256[] calldata signingMembersIndices = result.signingMembersIndices;\\n uint32[] memory signingMemberIds = new uint32[](\\n signingMembersIndices.length\\n );\\n for (uint256 i = 0; i < signingMembersIndices.length; i++) {\\n signingMemberIds[i] = result.members[signingMembersIndices[i] - 1];\\n }\\n\\n address[] memory signingMemberAddresses = sortitionPool.getIDOperators(\\n signingMemberIds\\n );\\n\\n bytes memory current; // Current signature to be checked.\\n\\n uint256 signaturesCount = result.signatures.length / signatureByteSize;\\n for (uint256 i = 0; i < signaturesCount; i++) {\\n current = result.signatures.slice(\\n signatureByteSize * i,\\n signatureByteSize\\n );\\n address recoveredAddress = hash.recover(current);\\n\\n if (signingMemberAddresses[i] != recoveredAddress) {\\n return false;\\n }\\n }\\n\\n return true;\\n }\\n\\n /// @notice Performs validation of hashed group members that actively took\\n /// part in DKG.\\n /// @param result DKG result\\n /// @return true if calculated result's group members hash matches with the\\n /// one that is challenged.\\n function validateMembersHash(EcdsaDkg.Result calldata result)\\n public\\n pure\\n returns (bool)\\n {\\n if (result.misbehavedMembersIndices.length > 0) {\\n // members that generated a group signing key\\n uint32[] memory groupMembers = new uint32[](\\n result.members.length - result.misbehavedMembersIndices.length\\n );\\n uint256 k = 0; // misbehaved members counter\\n uint256 j = 0; // group members counter\\n for (uint256 i = 0; i < result.members.length; i++) {\\n // misbehaved member indices start from 1, so we need to -1 on misbehaved\\n if (i != result.misbehavedMembersIndices[k] - 1) {\\n groupMembers[j] = result.members[i];\\n j++;\\n } else if (k < result.misbehavedMembersIndices.length - 1) {\\n k++;\\n }\\n }\\n\\n return keccak256(abi.encode(groupMembers)) == result.membersHash;\\n }\\n\\n return keccak256(abi.encode(result.members)) == result.membersHash;\\n }\\n}\\n\",\"keccak256\":\"0xe8f3d63ef4213ac71d447726be3971c5ed6b0b0eb145763d324faecdce707bf6\",\"license\":\"GPL-3.0-only\"},\"@keep-network/ecdsa/contracts/libraries/EcdsaDkg.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n//\\n// \\u2593\\u2593\\u258c \\u2593\\u2593 \\u2590\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2584\\u2584 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2584\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2580\\u2580 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2580\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2580\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2588\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n//\\n//\\n\\n// Initial version copied from Keep Network Random Beacon:\\n// https://github.com/keep-network/keep-core/blob/5138c7628868dbeed3ae2164f76fccc6c1fbb9e8/solidity/random-beacon/contracts/libraries/DKG.sol\\n//\\n// With the following differences:\\n// - the group size was set to 100,\\n// - offchainDkgTimeout was removed,\\n// - submission eligibility verification is not performed on-chain,\\n// - submission eligibility delay was replaced with a submission timeout,\\n// - seed timeout notification requires seedTimeout period to pass.\\n\\npragma solidity 0.8.17;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"@keep-network/sortition-pools/contracts/SortitionPool.sol\\\";\\nimport \\\"@keep-network/random-beacon/contracts/libraries/BytesLib.sol\\\";\\nimport \\\"../EcdsaDkgValidator.sol\\\";\\n\\nlibrary EcdsaDkg {\\n using BytesLib for bytes;\\n using ECDSAUpgradeable for bytes32;\\n\\n struct Parameters {\\n // Time in blocks during which a seed is expected to be delivered.\\n // DKG starts only after a seed is delivered. The time the contract\\n // awaits for a seed is not included in the DKG timeout.\\n uint256 seedTimeout;\\n // Time in blocks during which a submitted result can be challenged.\\n uint256 resultChallengePeriodLength;\\n // Extra gas required to be left at the end of the challenge DKG result\\n // transaction.\\n uint256 resultChallengeExtraGas;\\n // Time in blocks during which a result is expected to be submitted.\\n uint256 resultSubmissionTimeout;\\n // Time in blocks during which only the result submitter is allowed to\\n // approve it. Once this period ends and the submitter have not approved\\n // the result, anyone can do it.\\n uint256 submitterPrecedencePeriodLength;\\n // This struct doesn't contain `__gap` property as the structure is\\n // stored inside `Data` struct, that already have a gap that can be used\\n // on upgrade.\\n }\\n\\n struct Data {\\n // Address of the Sortition Pool contract.\\n SortitionPool sortitionPool;\\n // Address of the EcdsaDkgValidator contract.\\n EcdsaDkgValidator dkgValidator;\\n // DKG parameters. The parameters should persist between DKG executions.\\n // They should be updated with dedicated set functions only when DKG is not\\n // in progress.\\n Parameters parameters;\\n // Time in block at which DKG state was locked.\\n uint256 stateLockBlock;\\n // Time in blocks at which DKG started.\\n uint256 startBlock;\\n // Seed used to start DKG.\\n uint256 seed;\\n // Time in blocks that should be added to result submission eligibility\\n // delay calculation. It is used in case of a challenge to adjust\\n // DKG timeout calculation.\\n uint256 resultSubmissionStartBlockOffset;\\n // Hash of submitted DKG result.\\n bytes32 submittedResultHash;\\n // Block number from the moment of the DKG result submission.\\n uint256 submittedResultBlock;\\n // Reserved storage space in case we need to add more variables.\\n // See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n // slither-disable-next-line unused-state\\n uint256[38] __gap;\\n }\\n\\n /// @notice DKG result.\\n struct Result {\\n // Claimed submitter candidate group member index.\\n // Must be in range [1, groupSize].\\n uint256 submitterMemberIndex;\\n // Generated candidate group public key\\n bytes groupPubKey;\\n // Array of misbehaved members indices (disqualified or inactive).\\n // Indices must be in range [1, groupSize], unique, and sorted in ascending\\n // order.\\n uint8[] misbehavedMembersIndices;\\n // Concatenation of signatures from members supporting the result.\\n // The message to be signed by each member is keccak256 hash of the\\n // calculated group public key, misbehaved members indices and DKG\\n // start block. The calculated hash should be prefixed with prefixed with\\n // `\\\\x19Ethereum signed message:\\\\n` before signing, so the message to\\n // sign is:\\n // `\\\\x19Ethereum signed message:\\\\n${keccak256(\\n // groupPubKey, misbehavedMembersIndices, dkgStartBlock\\n // )}`\\n bytes signatures;\\n // Indices of members corresponding to each signature. Indices must be\\n // be in range [1, groupSize], unique, and sorted in ascending order.\\n uint256[] signingMembersIndices;\\n // Identifiers of candidate group members as outputted by the group\\n // selection protocol.\\n uint32[] members;\\n // Keccak256 hash of group members identifiers that actively took part\\n // in DKG (excluding IA/DQ members).\\n bytes32 membersHash;\\n // This struct doesn't contain `__gap` property as the structure is not\\n // stored, it is used as a function's calldata argument.\\n }\\n\\n /// @notice States for phases of group creation. The states doesn't include\\n /// timeouts which should be tracked and notified individually.\\n enum State {\\n // Group creation is not in progress. It is a state set after group creation\\n // completion either by timeout or by a result approval.\\n IDLE,\\n // Group creation is awaiting the seed and sortition pool is locked.\\n AWAITING_SEED,\\n // DKG protocol execution is in progress. A result is being calculated\\n // by the clients in this state and the contract awaits a result submission.\\n // This is a state to which group creation returns in case of a result\\n // challenge notification.\\n AWAITING_RESULT,\\n // DKG result was submitted and awaits an approval or a challenge. If a result\\n // gets challenge the state returns to `AWAITING_RESULT`. If a result gets\\n // approval the state changes to `IDLE`.\\n CHALLENGE\\n }\\n\\n /// @dev Size of a group in ECDSA wallet.\\n uint256 public constant groupSize = 100;\\n\\n event DkgStarted(uint256 indexed seed);\\n\\n // To recreate the members that actively took part in dkg, the selected members\\n // array should be filtered out from misbehavedMembersIndices.\\n event DkgResultSubmitted(\\n bytes32 indexed resultHash,\\n uint256 indexed seed,\\n Result result\\n );\\n\\n event DkgTimedOut();\\n\\n event DkgResultApproved(\\n bytes32 indexed resultHash,\\n address indexed approver\\n );\\n\\n event DkgResultChallenged(\\n bytes32 indexed resultHash,\\n address indexed challenger,\\n string reason\\n );\\n\\n event DkgStateLocked();\\n\\n event DkgSeedTimedOut();\\n\\n /// @notice Initializes SortitionPool and EcdsaDkgValidator addresses.\\n /// Can be performed only once.\\n /// @param _sortitionPool Sortition Pool reference\\n /// @param _dkgValidator EcdsaDkgValidator reference\\n function init(\\n Data storage self,\\n SortitionPool _sortitionPool,\\n EcdsaDkgValidator _dkgValidator\\n ) internal {\\n require(\\n address(self.sortitionPool) == address(0),\\n \\\"Sortition Pool address already set\\\"\\n );\\n\\n require(\\n address(self.dkgValidator) == address(0),\\n \\\"DKG Validator address already set\\\"\\n );\\n\\n self.sortitionPool = _sortitionPool;\\n self.dkgValidator = _dkgValidator;\\n }\\n\\n /// @notice Determines the current state of group creation. It doesn't take\\n /// timeouts into consideration. The timeouts should be tracked and\\n /// notified separately.\\n function currentState(Data storage self)\\n internal\\n view\\n returns (State state)\\n {\\n state = State.IDLE;\\n\\n if (self.sortitionPool.isLocked()) {\\n state = State.AWAITING_SEED;\\n\\n if (self.startBlock > 0) {\\n state = State.AWAITING_RESULT;\\n\\n if (self.submittedResultBlock > 0) {\\n state = State.CHALLENGE;\\n }\\n }\\n }\\n }\\n\\n /// @notice Locks the sortition pool and starts awaiting for the\\n /// group creation seed.\\n function lockState(Data storage self) internal {\\n require(currentState(self) == State.IDLE, \\\"Current state is not IDLE\\\");\\n\\n emit DkgStateLocked();\\n\\n self.sortitionPool.lock();\\n\\n self.stateLockBlock = block.number;\\n }\\n\\n function start(Data storage self, uint256 seed) internal {\\n require(\\n currentState(self) == State.AWAITING_SEED,\\n \\\"Current state is not AWAITING_SEED\\\"\\n );\\n\\n emit DkgStarted(seed);\\n\\n self.startBlock = block.number;\\n self.seed = seed;\\n }\\n\\n /// @notice Allows to submit a DKG result. The submitted result does not go\\n /// through a validation and before it gets accepted, it needs to\\n /// wait through the challenge period during which everyone has\\n /// a chance to challenge the result as invalid one. Submitter of\\n /// the result needs to be in the sortition pool and if the result\\n /// gets challenged, the submitter will get slashed.\\n function submitResult(Data storage self, Result calldata result) internal {\\n require(\\n currentState(self) == State.AWAITING_RESULT,\\n \\\"Current state is not AWAITING_RESULT\\\"\\n );\\n require(!hasDkgTimedOut(self), \\\"DKG timeout already passed\\\");\\n\\n SortitionPool sortitionPool = self.sortitionPool;\\n\\n // Submitter must be an operator in the sortition pool.\\n // Declared submitter's member index in the DKG result needs to match\\n // the address calling this function.\\n require(\\n sortitionPool.isOperatorInPool(msg.sender),\\n \\\"Submitter not in the sortition pool\\\"\\n );\\n require(\\n sortitionPool.getIDOperator(\\n result.members[result.submitterMemberIndex - 1]\\n ) == msg.sender,\\n \\\"Unexpected submitter index\\\"\\n );\\n\\n self.submittedResultHash = keccak256(abi.encode(result));\\n self.submittedResultBlock = block.number;\\n\\n emit DkgResultSubmitted(self.submittedResultHash, self.seed, result);\\n }\\n\\n /// @notice Checks if awaiting seed timed out.\\n /// @return True if awaiting seed timed out, false otherwise.\\n function hasSeedTimedOut(Data storage self) internal view returns (bool) {\\n return\\n currentState(self) == State.AWAITING_SEED &&\\n block.number > (self.stateLockBlock + self.parameters.seedTimeout);\\n }\\n\\n /// @notice Checks if DKG timed out. The DKG timeout period includes time required\\n /// for off-chain protocol execution and time for the result publication.\\n /// After this time a result cannot be submitted and DKG can be notified\\n /// about the timeout. DKG period is adjusted by result submission\\n /// offset that include blocks that were mined while invalid result\\n /// has been registered until it got challenged.\\n /// @return True if DKG timed out, false otherwise.\\n function hasDkgTimedOut(Data storage self) internal view returns (bool) {\\n return\\n currentState(self) == State.AWAITING_RESULT &&\\n block.number >\\n (self.startBlock +\\n self.resultSubmissionStartBlockOffset +\\n self.parameters.resultSubmissionTimeout);\\n }\\n\\n /// @notice Notifies about the seed was not delivered and restores the\\n /// initial DKG state (IDLE).\\n function notifySeedTimeout(Data storage self) internal {\\n require(hasSeedTimedOut(self), \\\"Awaiting seed has not timed out\\\");\\n\\n emit DkgSeedTimedOut();\\n\\n complete(self);\\n }\\n\\n /// @notice Notifies about DKG timeout.\\n function notifyDkgTimeout(Data storage self) internal {\\n require(hasDkgTimedOut(self), \\\"DKG has not timed out\\\");\\n\\n emit DkgTimedOut();\\n\\n complete(self);\\n }\\n\\n /// @notice Approves DKG result. Can be called when the challenge period for\\n /// the submitted result is finished. Considers the submitted result\\n /// as valid. For the first `submitterPrecedencePeriodLength`\\n /// blocks after the end of the challenge period can be called only\\n /// by the DKG result submitter. After that time, can be called by\\n /// anyone.\\n /// @dev Can be called after a challenge period for the submitted result.\\n /// @param result Result to approve. Must match the submitted result stored\\n /// during `submitResult`.\\n /// @return misbehavedMembers Identifiers of members who misbehaved during DKG.\\n function approveResult(Data storage self, Result calldata result)\\n internal\\n returns (uint32[] memory misbehavedMembers)\\n {\\n require(\\n currentState(self) == State.CHALLENGE,\\n \\\"Current state is not CHALLENGE\\\"\\n );\\n\\n uint256 challengePeriodEnd = self.submittedResultBlock +\\n self.parameters.resultChallengePeriodLength;\\n\\n require(\\n block.number > challengePeriodEnd,\\n \\\"Challenge period has not passed yet\\\"\\n );\\n\\n require(\\n keccak256(abi.encode(result)) == self.submittedResultHash,\\n \\\"Result under approval is different than the submitted one\\\"\\n );\\n\\n // Extract submitter member address. Submitter member index is in\\n // range [1, groupSize] so we need to -1 when fetching identifier from members\\n // array.\\n address submitterMember = self.sortitionPool.getIDOperator(\\n result.members[result.submitterMemberIndex - 1]\\n );\\n\\n require(\\n msg.sender == submitterMember ||\\n block.number >\\n challengePeriodEnd +\\n self.parameters.submitterPrecedencePeriodLength,\\n \\\"Only the DKG result submitter can approve the result at this moment\\\"\\n );\\n\\n // Extract misbehaved members identifiers. Misbehaved members indices\\n // are in range [1, groupSize], so we need to -1 when fetching identifiers from\\n // members array.\\n misbehavedMembers = new uint32[](\\n result.misbehavedMembersIndices.length\\n );\\n for (uint256 i = 0; i < result.misbehavedMembersIndices.length; i++) {\\n misbehavedMembers[i] = result.members[\\n result.misbehavedMembersIndices[i] - 1\\n ];\\n }\\n\\n emit DkgResultApproved(self.submittedResultHash, msg.sender);\\n\\n return misbehavedMembers;\\n }\\n\\n /// @notice Challenges DKG result. If the submitted result is proved to be\\n /// invalid it reverts the DKG back to the result submission phase.\\n /// @dev Can be called during a challenge period for the submitted result.\\n /// @param result Result to challenge. Must match the submitted result\\n /// stored during `submitResult`.\\n /// @return maliciousResultHash Hash of the malicious result.\\n /// @return maliciousSubmitter Identifier of the malicious submitter.\\n function challengeResult(Data storage self, Result calldata result)\\n internal\\n returns (bytes32 maliciousResultHash, uint32 maliciousSubmitter)\\n {\\n require(\\n currentState(self) == State.CHALLENGE,\\n \\\"Current state is not CHALLENGE\\\"\\n );\\n\\n require(\\n block.number <=\\n self.submittedResultBlock +\\n self.parameters.resultChallengePeriodLength,\\n \\\"Challenge period has already passed\\\"\\n );\\n\\n require(\\n keccak256(abi.encode(result)) == self.submittedResultHash,\\n \\\"Result under challenge is different than the submitted one\\\"\\n );\\n\\n // https://github.com/crytic/slither/issues/982\\n // slither-disable-next-line unused-return\\n try\\n self.dkgValidator.validate(result, self.seed, self.startBlock)\\n returns (\\n // slither-disable-next-line uninitialized-local,variable-scope\\n bool isValid,\\n // slither-disable-next-line uninitialized-local,variable-scope\\n string memory errorMsg\\n ) {\\n if (isValid) {\\n revert(\\\"unjustified challenge\\\");\\n }\\n\\n emit DkgResultChallenged(\\n self.submittedResultHash,\\n msg.sender,\\n errorMsg\\n );\\n } catch {\\n // if the validation reverted we consider the DKG result as invalid\\n emit DkgResultChallenged(\\n self.submittedResultHash,\\n msg.sender,\\n \\\"validation reverted\\\"\\n );\\n }\\n\\n // Consider result hash as malicious.\\n maliciousResultHash = self.submittedResultHash;\\n maliciousSubmitter = result.members[result.submitterMemberIndex - 1];\\n\\n // Adjust DKG result submission block start, so submission stage starts\\n // from the beginning.\\n self.resultSubmissionStartBlockOffset = block.number - self.startBlock;\\n\\n submittedResultCleanup(self);\\n\\n return (maliciousResultHash, maliciousSubmitter);\\n }\\n\\n /// @notice Due to EIP150, 1/64 of the gas is not forwarded to the call, and\\n /// will be kept to execute the remaining operations in the function\\n /// after the call inside the try-catch.\\n ///\\n /// To ensure there is no way for the caller to manipulate gas limit\\n /// in such a way that the call inside try-catch fails with out-of-gas\\n /// and the rest of the function is executed with the remaining\\n /// 1/64 of gas, we require an extra gas amount to be left at the\\n /// end of the call to the function challenging DKG result and\\n /// wrapping the call to EcdsaDkgValidator and TokenStaking\\n /// contracts inside a try-catch.\\n function requireChallengeExtraGas(Data storage self) internal view {\\n require(\\n gasleft() >= self.parameters.resultChallengeExtraGas,\\n \\\"Not enough extra gas left\\\"\\n );\\n }\\n\\n /// @notice Checks if DKG result is valid for the current DKG.\\n /// @param result DKG result.\\n /// @return True if the result is valid. If the result is invalid it returns\\n /// false and an error message.\\n function isResultValid(Data storage self, Result calldata result)\\n internal\\n view\\n returns (bool, string memory)\\n {\\n require(self.startBlock > 0, \\\"DKG has not been started\\\");\\n\\n return self.dkgValidator.validate(result, self.seed, self.startBlock);\\n }\\n\\n /// @notice Set setSeedTimeout parameter.\\n function setSeedTimeout(Data storage self, uint256 newSeedTimeout)\\n internal\\n {\\n require(currentState(self) == State.IDLE, \\\"Current state is not IDLE\\\");\\n\\n require(newSeedTimeout > 0, \\\"New value should be greater than zero\\\");\\n\\n self.parameters.seedTimeout = newSeedTimeout;\\n }\\n\\n /// @notice Set resultChallengePeriodLength parameter.\\n function setResultChallengePeriodLength(\\n Data storage self,\\n uint256 newResultChallengePeriodLength\\n ) internal {\\n require(currentState(self) == State.IDLE, \\\"Current state is not IDLE\\\");\\n\\n require(\\n newResultChallengePeriodLength > 0,\\n \\\"New value should be greater than zero\\\"\\n );\\n\\n self\\n .parameters\\n .resultChallengePeriodLength = newResultChallengePeriodLength;\\n }\\n\\n /// @notice Set resultChallengeExtraGas parameter.\\n function setResultChallengeExtraGas(\\n Data storage self,\\n uint256 newResultChallengeExtraGas\\n ) internal {\\n require(currentState(self) == State.IDLE, \\\"Current state is not IDLE\\\");\\n\\n self.parameters.resultChallengeExtraGas = newResultChallengeExtraGas;\\n }\\n\\n /// @notice Set resultSubmissionTimeout parameter.\\n function setResultSubmissionTimeout(\\n Data storage self,\\n uint256 newResultSubmissionTimeout\\n ) internal {\\n require(currentState(self) == State.IDLE, \\\"Current state is not IDLE\\\");\\n\\n require(\\n newResultSubmissionTimeout > 0,\\n \\\"New value should be greater than zero\\\"\\n );\\n\\n self.parameters.resultSubmissionTimeout = newResultSubmissionTimeout;\\n }\\n\\n /// @notice Set submitterPrecedencePeriodLength parameter.\\n function setSubmitterPrecedencePeriodLength(\\n Data storage self,\\n uint256 newSubmitterPrecedencePeriodLength\\n ) internal {\\n require(currentState(self) == State.IDLE, \\\"Current state is not IDLE\\\");\\n\\n require(\\n newSubmitterPrecedencePeriodLength <\\n self.parameters.resultSubmissionTimeout,\\n \\\"New value should be less than result submission period length\\\"\\n );\\n\\n self\\n .parameters\\n .submitterPrecedencePeriodLength = newSubmitterPrecedencePeriodLength;\\n }\\n\\n /// @notice Completes DKG by cleaning up state.\\n /// @dev Should be called after DKG times out or a result is approved.\\n function complete(Data storage self) internal {\\n delete self.startBlock;\\n delete self.seed;\\n delete self.resultSubmissionStartBlockOffset;\\n submittedResultCleanup(self);\\n self.sortitionPool.unlock();\\n }\\n\\n /// @notice Cleans up submitted result state either after DKG completion\\n /// (as part of `complete` method) or after justified challenge.\\n function submittedResultCleanup(Data storage self) private {\\n delete self.submittedResultHash;\\n delete self.submittedResultBlock;\\n }\\n}\\n\",\"keccak256\":\"0xd6c442e1db2dc95730443fb6496d47889a69bed2fbace466b27f9727484c25ec\",\"license\":\"GPL-3.0-only\"},\"@keep-network/random-beacon/contracts/libraries/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n//\\n// \\u2593\\u2593\\u258c \\u2593\\u2593 \\u2590\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2584\\u2584 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2584\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2580\\u2580 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2580\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2580\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2588\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n//\\n//\\n\\npragma solidity 0.8.17;\\n\\n/*\\nVersion pulled from keep-core v1:\\nhttps://github.com/keep-network/keep-core/blob/f297202db00c027978ad8e7103a356503de5773c/solidity-v1/contracts/utils/BytesLib.sol\\n\\nTo compile it with solidity 0.8 `_preBytes_slot` was replaced with `_preBytes.slot`.\\n*/\\n\\n/*\\nhttps://github.com/GNSPS/solidity-bytes-utils/\\nThis is free and unencumbered software released into the public domain.\\nAnyone is free to copy, modify, publish, use, compile, sell, or\\ndistribute this software, either in source code form or as a compiled\\nbinary, for any purpose, commercial or non-commercial, and by any\\nmeans.\\nIn jurisdictions that recognize copyright laws, the author or authors\\nof this software dedicate any and all copyright interest in the\\nsoftware to the public domain. We make this dedication for the benefit\\nof the public at large and to the detriment of our heirs and\\nsuccessors. We intend this dedication to be an overt act of\\nrelinquishment in perpetuity of all present and future rights to this\\nsoftware under copyright law.\\nTHE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND,\\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\\nOTHER DEALINGS IN THE SOFTWARE.\\nFor more information, please refer to <https://unlicense.org>\\n*/\\n\\n/** @title BytesLib **/\\n/** @author https://github.com/GNSPS **/\\n\\nlibrary BytesLib {\\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes)\\n internal\\n {\\n assembly {\\n // Read the first 32 bytes of _preBytes storage, which is the length\\n // of the array. (We don't need to use the offset into the slot\\n // because arrays use the entire slot.)\\n let fslot := sload(_preBytes.slot)\\n // Arrays of 31 bytes or less have an even value in their slot,\\n // while longer arrays have an odd value. The actual length is\\n // the slot divided by two for odd values, and the lowest order\\n // byte divided by two for even values.\\n // If the slot is even, bitwise and the slot with 255 and divide by\\n // two to get the length. If the slot is odd, bitwise and the slot\\n // with -1 and divide by two.\\n let slength := div(\\n and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)),\\n 2\\n )\\n let mlength := mload(_postBytes)\\n let newlength := add(slength, mlength)\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n switch add(lt(slength, 32), lt(newlength, 32))\\n case 2 {\\n // Since the new array still fits in the slot, we just need to\\n // update the contents of the slot.\\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\\n sstore(\\n _preBytes.slot,\\n // all the modifications to the slot are inside this\\n // next block\\n add(\\n // we can just add to the slot contents because the\\n // bytes we want to change are the LSBs\\n fslot,\\n add(\\n mul(\\n div(\\n // load the bytes from memory\\n mload(add(_postBytes, 0x20)),\\n // zero all bytes to the right\\n exp(0x100, sub(32, mlength))\\n ),\\n // and now shift left the number of bytes to\\n // leave space for the length in the slot\\n exp(0x100, sub(32, newlength))\\n ),\\n // increase length by the double of the memory\\n // bytes length\\n mul(mlength, 2)\\n )\\n )\\n )\\n }\\n case 1 {\\n // The stored value fits in the slot, but the combined value\\n // will exceed it.\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // The contents of the _postBytes array start 32 bytes into\\n // the structure. Our first read should obtain the `submod`\\n // bytes that can fit into the unused space in the last word\\n // of the stored array. To get this, we read 32 bytes starting\\n // from `submod`, so the data we read overlaps with the array\\n // contents by `submod` bytes. Masking the lowest-order\\n // `submod` bytes allows us to add that value directly to the\\n // stored value.\\n\\n let submod := sub(32, slength)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(\\n sc,\\n add(\\n and(\\n fslot,\\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00\\n ),\\n and(mload(mc), mask)\\n )\\n )\\n\\n for {\\n mc := add(mc, 0x20)\\n sc := add(sc, 1)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n default {\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n // Start copying to the last used word of the stored array.\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // Copy over the first `submod` bytes of the new data as in\\n // case 1 above.\\n let slengthmod := mod(slength, 32)\\n let submod := sub(32, slengthmod)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\\n\\n for {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n }\\n }\\n\\n function equalStorage(bytes storage _preBytes, bytes memory _postBytes)\\n internal\\n view\\n returns (bool)\\n {\\n bool success = true;\\n\\n assembly {\\n // we know _preBytes_offset is 0\\n let fslot := sload(_preBytes.slot)\\n // Decode the length of the stored array like in concatStorage().\\n let slength := div(\\n and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)),\\n 2\\n )\\n let mlength := mload(_postBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(slength, mlength)\\n case 1 {\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n if iszero(iszero(slength)) {\\n switch lt(slength, 32)\\n case 1 {\\n // blank the last byte which is the length\\n fslot := mul(div(fslot, 0x100), 0x100)\\n\\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\\n // unsuccess:\\n success := 0\\n }\\n }\\n default {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := keccak256(0x0, 0x20)\\n\\n let mc := add(_postBytes, 0x20)\\n let end := add(mc, mlength)\\n\\n // the next line is the loop condition:\\n // while(uint(mc < end) + cb == 2)\\n for {\\n\\n } eq(add(lt(mc, end), cb), 2) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n if iszero(eq(sload(sc), mload(mc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function concat(bytes memory _preBytes, bytes memory _postBytes)\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes memory tempBytes;\\n\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(\\n 0x40,\\n and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n )\\n )\\n }\\n\\n return tempBytes;\\n }\\n\\n function slice(\\n bytes memory _bytes,\\n uint256 _start,\\n uint256 _length\\n ) internal pure returns (bytes memory res) {\\n uint256 _end = _start + _length;\\n require(_end > _start && _bytes.length >= _end, \\\"Slice out of bounds\\\");\\n\\n assembly {\\n // Alloc bytes array with additional 32 bytes afterspace and assign it's size\\n res := mload(0x40)\\n mstore(0x40, add(add(res, 64), _length))\\n mstore(res, _length)\\n\\n // Compute distance between source and destination pointers\\n let diff := sub(res, add(_bytes, _start))\\n\\n for {\\n let src := add(add(_bytes, 32), _start)\\n let end := add(src, _length)\\n } lt(src, end) {\\n src := add(src, 32)\\n } {\\n mstore(add(src, diff), mload(src))\\n }\\n }\\n }\\n\\n function toAddress(bytes memory _bytes, uint256 _start)\\n internal\\n pure\\n returns (address)\\n {\\n uint256 _totalLen = _start + 20;\\n require(\\n _totalLen > _start && _bytes.length >= _totalLen,\\n \\\"Address conversion out of bounds.\\\"\\n );\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(\\n mload(add(add(_bytes, 0x20), _start)),\\n 0x1000000000000000000000000\\n )\\n }\\n\\n return tempAddress;\\n }\\n\\n function toUint8(bytes memory _bytes, uint256 _start)\\n internal\\n pure\\n returns (uint8)\\n {\\n require(\\n _bytes.length >= (_start + 1),\\n \\\"Uint8 conversion out of bounds.\\\"\\n );\\n uint8 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x1), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint(bytes memory _bytes, uint256 _start)\\n internal\\n pure\\n returns (uint256)\\n {\\n uint256 _totalLen = _start + 32;\\n require(\\n _totalLen > _start && _bytes.length >= _totalLen,\\n \\\"Uint conversion out of bounds.\\\"\\n );\\n uint256 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function equal(bytes memory _preBytes, bytes memory _postBytes)\\n internal\\n pure\\n returns (bool)\\n {\\n bool success = true;\\n\\n assembly {\\n let length := mload(_preBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(length, mload(_postBytes))\\n case 1 {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n let mc := add(_preBytes, 0x20)\\n let end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n // the next line is the loop condition:\\n // while(uint(mc < end) + cb == 2)\\n } eq(add(lt(mc, end), cb), 2) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // if any of these checks fails then arrays are not equal\\n if iszero(eq(mload(mc), mload(cc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function toBytes32(bytes memory _source)\\n internal\\n pure\\n returns (bytes32 result)\\n {\\n if (_source.length == 0) {\\n return 0x0;\\n }\\n\\n assembly {\\n result := mload(add(_source, 32))\\n }\\n }\\n\\n function keccak256Slice(\\n bytes memory _bytes,\\n uint256 _start,\\n uint256 _length\\n ) internal pure returns (bytes32 result) {\\n uint256 _end = _start + _length;\\n require(_end > _start && _bytes.length >= _end, \\\"Slice out of bounds\\\");\\n\\n assembly {\\n result := keccak256(add(add(_bytes, 32), _start), _length)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3b76e2fe36eb777440250dcf2ea7a689375e8af22f3cc33521095ff6954becdb\",\"license\":\"GPL-3.0-only\"},\"@keep-network/sortition-pools/contracts/Branch.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\nimport \\\"./Constants.sol\\\";\\n\\n/// @notice The implicit 8-ary trees of the sortition pool\\n/// rely on packing 8 \\\"slots\\\" of 32-bit values into each uint256.\\n/// The Branch library permits efficient calculations on these slots.\\nlibrary Branch {\\n /// @notice Calculate the right shift required\\n /// to make the 32 least significant bits of an uint256\\n /// be the bits of the `position`th slot\\n /// when treating the uint256 as a uint32[8].\\n ///\\n /// @dev Not used for efficiency reasons,\\n /// but left to illustrate the meaning of a common pattern.\\n /// I wish solidity had macros, even C macros.\\n function slotShift(uint256 position) internal pure returns (uint256) {\\n unchecked {\\n return position * Constants.SLOT_WIDTH;\\n }\\n }\\n\\n /// @notice Return the `position`th slot of the `node`,\\n /// treating `node` as a uint32[32].\\n function getSlot(uint256 node, uint256 position)\\n internal\\n pure\\n returns (uint256)\\n {\\n unchecked {\\n uint256 shiftBits = position * Constants.SLOT_WIDTH;\\n // Doing a bitwise AND with `SLOT_MAX`\\n // clears all but the 32 least significant bits.\\n // Because of the right shift by `slotShift(position)` bits,\\n // those 32 bits contain the 32 bits in the `position`th slot of `node`.\\n return (node >> shiftBits) & Constants.SLOT_MAX;\\n }\\n }\\n\\n /// @notice Return `node` with the `position`th slot set to zero.\\n function clearSlot(uint256 node, uint256 position)\\n internal\\n pure\\n returns (uint256)\\n {\\n unchecked {\\n uint256 shiftBits = position * Constants.SLOT_WIDTH;\\n // Shifting `SLOT_MAX` left by `slotShift(position)` bits\\n // gives us a number where all bits of the `position`th slot are set,\\n // and all other bits are unset.\\n //\\n // Using a bitwise NOT on this number,\\n // we get a uint256 where all bits are set\\n // except for those of the `position`th slot.\\n //\\n // Bitwise ANDing the original `node` with this number\\n // sets the bits of `position`th slot to zero,\\n // leaving all other bits unchanged.\\n return node & ~(Constants.SLOT_MAX << shiftBits);\\n }\\n }\\n\\n /// @notice Return `node` with the `position`th slot set to `weight`.\\n ///\\n /// @param weight The weight of of the node.\\n /// Safely truncated to a 32-bit number,\\n /// but this should never be called with an overflowing weight regardless.\\n function setSlot(\\n uint256 node,\\n uint256 position,\\n uint256 weight\\n ) internal pure returns (uint256) {\\n unchecked {\\n uint256 shiftBits = position * Constants.SLOT_WIDTH;\\n // Clear the `position`th slot like in `clearSlot()`.\\n uint256 clearedNode = node & ~(Constants.SLOT_MAX << shiftBits);\\n // Bitwise AND `weight` with `SLOT_MAX`\\n // to clear all but the 32 least significant bits.\\n //\\n // Shift this left by `slotShift(position)` bits\\n // to obtain a uint256 with all bits unset\\n // except in the `position`th slot\\n // which contains the 32-bit value of `weight`.\\n uint256 shiftedWeight = (weight & Constants.SLOT_MAX) << shiftBits;\\n // When we bitwise OR these together,\\n // all other slots except the `position`th one come from the left argument,\\n // and the `position`th gets filled with `weight` from the right argument.\\n return clearedNode | shiftedWeight;\\n }\\n }\\n\\n /// @notice Calculate the summed weight of all slots in the `node`.\\n function sumWeight(uint256 node) internal pure returns (uint256 sum) {\\n unchecked {\\n sum = node & Constants.SLOT_MAX;\\n // Iterate through each slot\\n // by shifting `node` right in increments of 32 bits,\\n // and adding the 32 least significant bits to the `sum`.\\n uint256 newNode = node >> Constants.SLOT_WIDTH;\\n while (newNode > 0) {\\n sum += (newNode & Constants.SLOT_MAX);\\n newNode = newNode >> Constants.SLOT_WIDTH;\\n }\\n return sum;\\n }\\n }\\n\\n /// @notice Pick a slot in `node` that corresponds to `index`.\\n /// Treats the node like an array of virtual stakers,\\n /// the number of virtual stakers in each slot corresponding to its weight,\\n /// and picks which slot contains the `index`th virtual staker.\\n ///\\n /// @dev Requires that `index` be lower than `sumWeight(node)`.\\n /// However, this is not enforced for performance reasons.\\n /// If `index` exceeds the permitted range,\\n /// `pickWeightedSlot()` returns the rightmost slot\\n /// and an excessively high `newIndex`.\\n ///\\n /// @return slot The slot of `node` containing the `index`th virtual staker.\\n ///\\n /// @return newIndex The index of the `index`th virtual staker of `node`\\n /// within the returned slot.\\n function pickWeightedSlot(uint256 node, uint256 index)\\n internal\\n pure\\n returns (uint256 slot, uint256 newIndex)\\n {\\n unchecked {\\n newIndex = index;\\n uint256 newNode = node;\\n uint256 currentSlotWeight = newNode & Constants.SLOT_MAX;\\n while (newIndex >= currentSlotWeight) {\\n newIndex -= currentSlotWeight;\\n slot++;\\n newNode = newNode >> Constants.SLOT_WIDTH;\\n currentSlotWeight = newNode & Constants.SLOT_MAX;\\n }\\n return (slot, newIndex);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa7fb1c9c9789f30493e9a40e24a24f46875dc5e7630b4f67478167759f6d1882\"},\"@keep-network/sortition-pools/contracts/Chaosnet.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\n/// @title Chaosnet\\n/// @notice This is a beta staker program for stakers willing to go the extra\\n/// mile with monitoring, share their logs with the dev team, and allow to more\\n/// carefully monitor the bootstrapping network. As the network matures, the\\n/// beta program will be ended.\\ncontract Chaosnet {\\n /// @notice Indicates if the chaosnet is active. The chaosnet is active\\n /// after the contract deployment and can be ended with a call to\\n /// `deactivateChaosnet()`. Once deactivated chaosnet can not be activated\\n /// again.\\n bool public isChaosnetActive;\\n\\n /// @notice Indicates if the given operator is a beta operator for chaosnet.\\n mapping(address => bool) public isBetaOperator;\\n\\n /// @notice Address controlling chaosnet status and beta operator addresses.\\n address public chaosnetOwner;\\n\\n event BetaOperatorsAdded(address[] operators);\\n\\n event ChaosnetOwnerRoleTransferred(\\n address oldChaosnetOwner,\\n address newChaosnetOwner\\n );\\n\\n event ChaosnetDeactivated();\\n\\n constructor() {\\n _transferChaosnetOwner(msg.sender);\\n isChaosnetActive = true;\\n }\\n\\n modifier onlyChaosnetOwner() {\\n require(msg.sender == chaosnetOwner, \\\"Not the chaosnet owner\\\");\\n _;\\n }\\n\\n modifier onlyOnChaosnet() {\\n require(isChaosnetActive, \\\"Chaosnet is not active\\\");\\n _;\\n }\\n\\n /// @notice Adds beta operator to chaosnet. Can be called only by the\\n /// chaosnet owner when the chaosnet is active. Once the operator is added\\n /// as a beta operator, it can not be removed.\\n function addBetaOperators(address[] calldata operators)\\n public\\n onlyOnChaosnet\\n onlyChaosnetOwner\\n {\\n for (uint256 i = 0; i < operators.length; i++) {\\n isBetaOperator[operators[i]] = true;\\n }\\n\\n emit BetaOperatorsAdded(operators);\\n }\\n\\n /// @notice Deactivates the chaosnet. Can be called only by the chaosnet\\n /// owner. Once deactivated chaosnet can not be activated again.\\n function deactivateChaosnet() public onlyOnChaosnet onlyChaosnetOwner {\\n isChaosnetActive = false;\\n emit ChaosnetDeactivated();\\n }\\n\\n /// @notice Transfers the chaosnet owner role to another non-zero address.\\n function transferChaosnetOwnerRole(address newChaosnetOwner)\\n public\\n onlyChaosnetOwner\\n {\\n require(\\n newChaosnetOwner != address(0),\\n \\\"New chaosnet owner must not be zero address\\\"\\n );\\n _transferChaosnetOwner(newChaosnetOwner);\\n }\\n\\n function _transferChaosnetOwner(address newChaosnetOwner) internal {\\n address oldChaosnetOwner = chaosnetOwner;\\n chaosnetOwner = newChaosnetOwner;\\n emit ChaosnetOwnerRoleTransferred(oldChaosnetOwner, newChaosnetOwner);\\n }\\n}\\n\",\"keccak256\":\"0xeaf7bdd5626f88c329793a012621039692ce1b6e1f13013997ddb13d7e3032df\"},\"@keep-network/sortition-pools/contracts/Constants.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\nlibrary Constants {\\n ////////////////////////////////////////////////////////////////////////////\\n // Parameters for configuration\\n\\n // How many bits a position uses per level of the tree;\\n // each branch of the tree contains 2**SLOT_BITS slots.\\n uint256 constant SLOT_BITS = 3;\\n uint256 constant LEVELS = 7;\\n ////////////////////////////////////////////////////////////////////////////\\n\\n ////////////////////////////////////////////////////////////////////////////\\n // Derived constants, do not touch\\n uint256 constant SLOT_COUNT = 2**SLOT_BITS;\\n uint256 constant SLOT_WIDTH = 256 / SLOT_COUNT;\\n uint256 constant LAST_SLOT = SLOT_COUNT - 1;\\n uint256 constant SLOT_MAX = (2**SLOT_WIDTH) - 1;\\n uint256 constant POOL_CAPACITY = SLOT_COUNT**LEVELS;\\n\\n uint256 constant ID_WIDTH = SLOT_WIDTH;\\n uint256 constant ID_MAX = SLOT_MAX;\\n\\n uint256 constant BLOCKHEIGHT_WIDTH = 96 - ID_WIDTH;\\n uint256 constant BLOCKHEIGHT_MAX = (2**BLOCKHEIGHT_WIDTH) - 1;\\n\\n uint256 constant SLOT_POINTER_MAX = (2**SLOT_BITS) - 1;\\n uint256 constant LEAF_FLAG = 1 << 255;\\n\\n uint256 constant WEIGHT_WIDTH = 256 / SLOT_COUNT;\\n ////////////////////////////////////////////////////////////////////////////\\n}\\n\",\"keccak256\":\"0xaef690ced707935745ff1482b7bb9bd9eb77bf6a39c717465e64cf12db8a7d39\"},\"@keep-network/sortition-pools/contracts/Leaf.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\nimport \\\"./Constants.sol\\\";\\n\\nlibrary Leaf {\\n function make(\\n address _operator,\\n uint256 _creationBlock,\\n uint256 _id\\n ) internal pure returns (uint256) {\\n assert(_creationBlock <= type(uint64).max);\\n assert(_id <= type(uint32).max);\\n // Converting a bytesX type into a larger type\\n // adds zero bytes on the right.\\n uint256 op = uint256(bytes32(bytes20(_operator)));\\n // Bitwise AND the id to erase\\n // all but the 32 least significant bits\\n uint256 uid = _id & Constants.ID_MAX;\\n // Erase all but the 64 least significant bits,\\n // then shift left by 32 bits to make room for the id\\n uint256 cb = (_creationBlock & Constants.BLOCKHEIGHT_MAX) <<\\n Constants.ID_WIDTH;\\n // Bitwise OR them all together to get\\n // [address operator || uint64 creationBlock || uint32 id]\\n return (op | cb | uid);\\n }\\n\\n function operator(uint256 leaf) internal pure returns (address) {\\n // Converting a bytesX type into a smaller type\\n // truncates it on the right.\\n return address(bytes20(bytes32(leaf)));\\n }\\n\\n /// @notice Return the block number the leaf was created in.\\n function creationBlock(uint256 leaf) internal pure returns (uint256) {\\n return ((leaf >> Constants.ID_WIDTH) & Constants.BLOCKHEIGHT_MAX);\\n }\\n\\n function id(uint256 leaf) internal pure returns (uint32) {\\n // Id is stored in the 32 least significant bits.\\n // Bitwise AND ensures that we only get the contents of those bits.\\n return uint32(leaf & Constants.ID_MAX);\\n }\\n}\\n\",\"keccak256\":\"0xbd107a1a43e48884885e5e966ffcbcd8fa5e89863715d717bb4006e9f89cdc2b\"},\"@keep-network/sortition-pools/contracts/Position.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\nimport \\\"./Constants.sol\\\";\\n\\nlibrary Position {\\n // Return the last 3 bits of a position number,\\n // corresponding to its slot in its parent\\n function slot(uint256 a) internal pure returns (uint256) {\\n return a & Constants.SLOT_POINTER_MAX;\\n }\\n\\n // Return the parent of a position number\\n function parent(uint256 a) internal pure returns (uint256) {\\n return a >> Constants.SLOT_BITS;\\n }\\n\\n // Return the location of the child of a at the given slot\\n function child(uint256 a, uint256 s) internal pure returns (uint256) {\\n return (a << Constants.SLOT_BITS) | (s & Constants.SLOT_POINTER_MAX); // slot(s)\\n }\\n\\n // Return the uint p as a flagged position uint:\\n // the least significant 21 bits contain the position\\n // and the 22nd bit is set as a flag\\n // to distinguish the position 0x000000 from an empty field.\\n function setFlag(uint256 p) internal pure returns (uint256) {\\n return p | Constants.LEAF_FLAG;\\n }\\n\\n // Turn a flagged position into an unflagged position\\n // by removing the flag at the 22nd least significant bit.\\n //\\n // We shouldn't _actually_ need this\\n // as all position-manipulating code should ignore non-position bits anyway\\n // but it's cheap to call so might as well do it.\\n function unsetFlag(uint256 p) internal pure returns (uint256) {\\n return p & (~Constants.LEAF_FLAG);\\n }\\n}\\n\",\"keccak256\":\"0xd3a927908080ac21353a92a6bce3d69e94a5c30f6b51f16b271b6cc679f110e2\"},\"@keep-network/sortition-pools/contracts/RNG.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\nimport \\\"./Leaf.sol\\\";\\nimport \\\"./Constants.sol\\\";\\n\\nlibrary RNG {\\n /// @notice Get an index in the range `[0 .. range-1]`\\n /// and the new state of the RNG,\\n /// using the provided `state` of the RNG.\\n ///\\n /// @param range The upper bound of the index, exclusive.\\n ///\\n /// @param state The previous state of the RNG.\\n /// The initial state needs to be obtained\\n /// from a trusted randomness oracle (the random beacon),\\n /// or from a chain of earlier calls to `RNG.getIndex()`\\n /// on an originally trusted seed.\\n ///\\n /// @dev Calculates the number of bits required for the desired range,\\n /// takes the least significant bits of `state`\\n /// and checks if the obtained index is within the desired range.\\n /// The original state is hashed with `keccak256` to get a new state.\\n /// If the index is outside the range,\\n /// the function retries until it gets a suitable index.\\n ///\\n /// @return index A random integer between `0` and `range - 1`, inclusive.\\n ///\\n /// @return newState The new state of the RNG.\\n /// When `getIndex()` is called one or more times,\\n /// care must be taken to always use the output `state`\\n /// of the most recent call as the input `state` of a subsequent call.\\n /// At the end of a transaction calling `RNG.getIndex()`,\\n /// the previous stored state must be overwritten with the latest output.\\n function getIndex(\\n uint256 range,\\n bytes32 state,\\n uint256 bits\\n ) internal view returns (uint256, bytes32) {\\n bool found = false;\\n uint256 index = 0;\\n bytes32 newState = state;\\n while (!found) {\\n index = truncate(bits, uint256(newState));\\n newState = keccak256(abi.encodePacked(newState, address(this)));\\n if (index < range) {\\n found = true;\\n }\\n }\\n return (index, newState);\\n }\\n\\n /// @notice Calculate how many bits are required\\n /// for an index in the range `[0 .. range-1]`.\\n ///\\n /// @param range The upper bound of the desired range, exclusive.\\n ///\\n /// @return uint The smallest number of bits\\n /// that can contain the number `range-1`.\\n function bitsRequired(uint256 range) internal pure returns (uint256) {\\n unchecked {\\n if (range == 1) {\\n return 0;\\n }\\n\\n uint256 bits = Constants.WEIGHT_WIDTH - 1;\\n\\n // Left shift by `bits`,\\n // so we have a 1 in the (bits + 1)th least significant bit\\n // and 0 in other bits.\\n // If this number is equal or greater than `range`,\\n // the range [0, range-1] fits in `bits` bits.\\n //\\n // Because we loop from high bits to low bits,\\n // we find the highest number of bits that doesn't fit the range,\\n // and return that number + 1.\\n while (1 << bits >= range) {\\n bits--;\\n }\\n\\n return bits + 1;\\n }\\n }\\n\\n /// @notice Truncate `input` to the `bits` least significant bits.\\n function truncate(uint256 bits, uint256 input)\\n internal\\n pure\\n returns (uint256)\\n {\\n unchecked {\\n return input & ((1 << bits) - 1);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x67f87f589cd5123ffa32f883ea2f09b0e56258508bae82b8c655b3c27c71eb5e\"},\"@keep-network/sortition-pools/contracts/Rewards.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\n/// @title Rewards\\n/// @notice Rewards are allocated proportionally to operators\\n/// present in the pool at payout based on their weight in the pool.\\n///\\n/// To facilitate this, we use a global accumulator value\\n/// to track the total rewards one unit of weight would've earned\\n/// since the creation of the pool.\\n///\\n/// Whenever a reward is paid, the accumulator is increased\\n/// by the size of the reward divided by the total weight\\n/// of all eligible operators in the pool.\\n///\\n/// Each operator has an individual accumulator value,\\n/// set to equal the global accumulator when the operator joins the pool.\\n/// This accumulator reflects the amount of rewards\\n/// that have already been accounted for with that operator.\\n///\\n/// Whenever an operator's weight in the pool changes,\\n/// we can update the amount of rewards the operator has earned\\n/// by subtracting the operator's accumulator from the global accumulator.\\n/// This gives us the amount of rewards one unit of weight has earned\\n/// since the last time the operator's rewards have been updated.\\n/// Then we multiply that by the operator's previous (pre-change) weight\\n/// to determine how much rewards in total the operator has earned,\\n/// and add this to the operator's earned rewards.\\n/// Finally, we set the operator's accumulator to the global accumulator value.\\ncontract Rewards {\\n struct OperatorRewards {\\n // The state of the global accumulator\\n // when the operator's rewards were last updated\\n uint96 accumulated;\\n // The amount of rewards collected by the operator after the latest update.\\n // The amount the operator could withdraw may equal `available`\\n // or it may be greater, if more rewards have been paid in since then.\\n // To evaulate the most recent amount including rewards potentially paid\\n // since the last update, use `availableRewards` function.\\n uint96 available;\\n // If nonzero, the operator is ineligible for rewards\\n // and may only re-enable rewards after the specified timestamp.\\n // XXX: unsigned 32-bit integer unix seconds, will break around 2106\\n uint32 ineligibleUntil;\\n // Locally cached weight of the operator,\\n // used to reduce the cost of setting operators ineligible.\\n uint32 weight;\\n }\\n\\n // The global accumulator of how much rewards\\n // a hypothetical operator of weight 1 would have earned\\n // since the creation of the pool.\\n uint96 internal globalRewardAccumulator;\\n // If the amount of reward tokens paid in\\n // does not divide cleanly by pool weight,\\n // the difference is recorded as rounding dust\\n // and added to the next reward.\\n uint96 internal rewardRoundingDust;\\n\\n // The amount of rewards that would've been earned by ineligible operators\\n // had they not been ineligible.\\n uint96 public ineligibleEarnedRewards;\\n\\n // Ineligibility times are calculated from this offset,\\n // set at contract creation.\\n uint256 internal immutable ineligibleOffsetStart;\\n\\n mapping(uint32 => OperatorRewards) internal operatorRewards;\\n\\n constructor() {\\n // solhint-disable-next-line not-rely-on-time\\n ineligibleOffsetStart = block.timestamp;\\n }\\n\\n /// @notice Return whether the operator is eligible for rewards or not.\\n function isEligibleForRewards(uint32 operator) internal view returns (bool) {\\n return operatorRewards[operator].ineligibleUntil == 0;\\n }\\n\\n /// @notice Return the time the operator's reward eligibility can be restored.\\n function rewardsEligibilityRestorableAt(uint32 operator)\\n internal\\n view\\n returns (uint256)\\n {\\n uint32 until = operatorRewards[operator].ineligibleUntil;\\n require(until != 0, \\\"Operator already eligible\\\");\\n return (uint256(until) + ineligibleOffsetStart);\\n }\\n\\n /// @notice Return whether the operator is able to restore their eligibility\\n /// for rewards right away.\\n function canRestoreRewardEligibility(uint32 operator)\\n internal\\n view\\n returns (bool)\\n {\\n // solhint-disable-next-line not-rely-on-time\\n return rewardsEligibilityRestorableAt(operator) <= block.timestamp;\\n }\\n\\n /// @notice Internal function for updating the global state of rewards.\\n function addRewards(uint96 rewardAmount, uint32 currentPoolWeight) internal {\\n require(currentPoolWeight > 0, \\\"No recipients in pool\\\");\\n\\n uint96 totalAmount = rewardAmount + rewardRoundingDust;\\n uint96 perWeightReward = totalAmount / currentPoolWeight;\\n uint96 newRoundingDust = totalAmount % currentPoolWeight;\\n\\n globalRewardAccumulator += perWeightReward;\\n rewardRoundingDust = newRoundingDust;\\n }\\n\\n /// @notice Internal function for updating the operator's reward state.\\n function updateOperatorRewards(uint32 operator, uint32 newWeight) internal {\\n uint96 acc = globalRewardAccumulator;\\n OperatorRewards memory o = operatorRewards[operator];\\n uint96 accruedRewards = (acc - o.accumulated) * uint96(o.weight);\\n if (o.ineligibleUntil == 0) {\\n // If operator is not ineligible, update their earned rewards\\n o.available += accruedRewards;\\n } else {\\n // If ineligible, put the rewards into the ineligible pot\\n ineligibleEarnedRewards += accruedRewards;\\n }\\n // In any case, update their accumulator and weight\\n o.accumulated = acc;\\n o.weight = newWeight;\\n operatorRewards[operator] = o;\\n }\\n\\n /// @notice Set the amount of withdrawable tokens to zero\\n /// and return the previous withdrawable amount.\\n /// @dev Does not update the withdrawable amount,\\n /// but should usually be accompanied by an update.\\n function withdrawOperatorRewards(uint32 operator)\\n internal\\n returns (uint96 withdrawable)\\n {\\n OperatorRewards storage o = operatorRewards[operator];\\n withdrawable = o.available;\\n o.available = 0;\\n }\\n\\n /// @notice Set the amount of ineligible-earned tokens to zero\\n /// and return the previous amount.\\n function withdrawIneligibleRewards() internal returns (uint96 withdrawable) {\\n withdrawable = ineligibleEarnedRewards;\\n ineligibleEarnedRewards = 0;\\n }\\n\\n /// @notice Set the given operators as ineligible for rewards.\\n /// The operators can restore their eligibility at the given time.\\n function setIneligible(uint32[] memory operators, uint256 until) internal {\\n OperatorRewards memory o = OperatorRewards(0, 0, 0, 0);\\n uint96 globalAcc = globalRewardAccumulator;\\n uint96 accrued = 0;\\n // Record ineligibility as seconds after contract creation\\n uint32 _until = uint32(until - ineligibleOffsetStart);\\n\\n for (uint256 i = 0; i < operators.length; i++) {\\n uint32 operator = operators[i];\\n OperatorRewards storage r = operatorRewards[operator];\\n o.available = r.available;\\n o.accumulated = r.accumulated;\\n o.ineligibleUntil = r.ineligibleUntil;\\n o.weight = r.weight;\\n\\n if (o.ineligibleUntil != 0) {\\n // If operator is already ineligible,\\n // don't earn rewards or shorten its ineligibility\\n if (o.ineligibleUntil < _until) {\\n o.ineligibleUntil = _until;\\n }\\n } else {\\n // The operator becomes ineligible -> earn rewards\\n o.ineligibleUntil = _until;\\n accrued = (globalAcc - o.accumulated) * uint96(o.weight);\\n o.available += accrued;\\n }\\n o.accumulated = globalAcc;\\n\\n r.available = o.available;\\n r.accumulated = o.accumulated;\\n r.ineligibleUntil = o.ineligibleUntil;\\n r.weight = o.weight;\\n }\\n }\\n\\n /// @notice Restore the given operator's eligibility for rewards.\\n function restoreEligibility(uint32 operator) internal {\\n // solhint-disable-next-line not-rely-on-time\\n require(canRestoreRewardEligibility(operator), \\\"Operator still ineligible\\\");\\n uint96 acc = globalRewardAccumulator;\\n OperatorRewards memory o = operatorRewards[operator];\\n uint96 accruedRewards = (acc - o.accumulated) * uint96(o.weight);\\n ineligibleEarnedRewards += accruedRewards;\\n o.accumulated = acc;\\n o.ineligibleUntil = 0;\\n operatorRewards[operator] = o;\\n }\\n\\n /// @notice Returns the amount of rewards currently available for withdrawal\\n /// for the given operator.\\n function availableRewards(uint32 operator) internal view returns (uint96) {\\n uint96 acc = globalRewardAccumulator;\\n OperatorRewards memory o = operatorRewards[operator];\\n if (o.ineligibleUntil == 0) {\\n // If operator is not ineligible, calculate newly accrued rewards and add\\n // them to the available ones, calculated during the last update.\\n uint96 accruedRewards = (acc - o.accumulated) * uint96(o.weight);\\n return o.available + accruedRewards;\\n } else {\\n // If ineligible, return only the rewards calculated during the last\\n // update.\\n return o.available;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3a10abb408b44335a092387b2c7ee01db3b27997f1f2c888d9b7a2d92934c4e2\"},\"@keep-network/sortition-pools/contracts/SortitionPool.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\nimport \\\"@thesis/solidity-contracts/contracts/token/IERC20WithPermit.sol\\\";\\nimport \\\"@thesis/solidity-contracts/contracts/token/IReceiveApproval.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\nimport \\\"./RNG.sol\\\";\\nimport \\\"./SortitionTree.sol\\\";\\nimport \\\"./Rewards.sol\\\";\\nimport \\\"./Chaosnet.sol\\\";\\n\\n/// @title Sortition Pool\\n/// @notice A logarithmic data structure used to store the pool of eligible\\n/// operators weighted by their stakes. It allows to select a group of operators\\n/// based on the provided pseudo-random seed.\\ncontract SortitionPool is\\n SortitionTree,\\n Rewards,\\n Ownable,\\n Chaosnet,\\n IReceiveApproval\\n{\\n using Branch for uint256;\\n using Leaf for uint256;\\n using Position for uint256;\\n\\n IERC20WithPermit public immutable rewardToken;\\n\\n uint256 public immutable poolWeightDivisor;\\n\\n bool public isLocked;\\n\\n event IneligibleForRewards(uint32[] ids, uint256 until);\\n\\n event RewardEligibilityRestored(address indexed operator, uint32 indexed id);\\n\\n /// @notice Reverts if called while pool is locked.\\n modifier onlyUnlocked() {\\n require(!isLocked, \\\"Sortition pool locked\\\");\\n _;\\n }\\n\\n /// @notice Reverts if called while pool is unlocked.\\n modifier onlyLocked() {\\n require(isLocked, \\\"Sortition pool unlocked\\\");\\n _;\\n }\\n\\n constructor(IERC20WithPermit _rewardToken, uint256 _poolWeightDivisor) {\\n rewardToken = _rewardToken;\\n poolWeightDivisor = _poolWeightDivisor;\\n }\\n\\n function receiveApproval(\\n address sender,\\n uint256 amount,\\n address token,\\n bytes calldata\\n ) external override {\\n require(token == address(rewardToken), \\\"Unsupported token\\\");\\n rewardToken.transferFrom(sender, address(this), amount);\\n Rewards.addRewards(uint96(amount), uint32(root.sumWeight()));\\n }\\n\\n /// @notice Withdraws all available rewards for the given operator to the\\n /// given beneficiary.\\n /// @dev Can be called only be the owner. Does not validate if the provided\\n /// beneficiary is associated with the provided operator - this needs to\\n /// be done by the owner calling this function.\\n /// @return The amount of rewards withdrawn in this call.\\n function withdrawRewards(address operator, address beneficiary)\\n public\\n onlyOwner\\n returns (uint96)\\n {\\n uint32 id = getOperatorID(operator);\\n Rewards.updateOperatorRewards(id, uint32(getPoolWeight(operator)));\\n uint96 earned = Rewards.withdrawOperatorRewards(id);\\n rewardToken.transfer(beneficiary, uint256(earned));\\n return earned;\\n }\\n\\n /// @notice Withdraws rewards not allocated to operators marked as ineligible\\n /// to the given recipient address.\\n /// @dev Can be called only by the owner.\\n function withdrawIneligible(address recipient) public onlyOwner {\\n uint96 earned = Rewards.withdrawIneligibleRewards();\\n rewardToken.transfer(recipient, uint256(earned));\\n }\\n\\n /// @notice Locks the sortition pool. In locked state, members cannot be\\n /// inserted and removed from the pool. Members statuses cannot\\n /// be updated as well.\\n /// @dev Can be called only by the contract owner.\\n function lock() public onlyOwner {\\n isLocked = true;\\n }\\n\\n /// @notice Unlocks the sortition pool. Removes all restrictions set by\\n /// the `lock` method.\\n /// @dev Can be called only by the contract owner.\\n function unlock() public onlyOwner {\\n isLocked = false;\\n }\\n\\n /// @notice Inserts an operator to the pool. Reverts if the operator is\\n /// already present. Reverts if the operator is not eligible because of their\\n /// authorized stake. Reverts if the chaosnet is active and the operator is\\n /// not a beta operator.\\n /// @dev Can be called only by the contract owner.\\n /// @param operator Address of the inserted operator.\\n /// @param authorizedStake Inserted operator's authorized stake for the application.\\n function insertOperator(address operator, uint256 authorizedStake)\\n public\\n onlyOwner\\n // TODO: Disabled temporarily for a test environment. This should never be disabled\\n // in normal circumstances.\\n // onlyUnlocked\\n {\\n uint256 weight = getWeight(authorizedStake);\\n require(weight > 0, \\\"Operator not eligible\\\");\\n\\n if (isChaosnetActive) {\\n require(isBetaOperator[operator], \\\"Not beta operator for chaosnet\\\");\\n }\\n\\n _insertOperator(operator, weight);\\n uint32 id = getOperatorID(operator);\\n Rewards.updateOperatorRewards(id, uint32(weight));\\n }\\n\\n /// @notice Update the operator's weight if present and eligible,\\n /// or remove from the pool if present and ineligible.\\n /// @dev Can be called only by the contract owner.\\n /// @param operator Address of the updated operator.\\n /// @param authorizedStake Operator's authorized stake for the application.\\n function updateOperatorStatus(address operator, uint256 authorizedStake)\\n public\\n onlyOwner\\n onlyUnlocked\\n {\\n uint256 weight = getWeight(authorizedStake);\\n\\n uint32 id = getOperatorID(operator);\\n Rewards.updateOperatorRewards(id, uint32(weight));\\n\\n if (weight == 0) {\\n _removeOperator(operator);\\n } else {\\n updateOperator(operator, weight);\\n }\\n }\\n\\n /// @notice Set the given operators as ineligible for rewards.\\n /// The operators can restore their eligibility at the given time.\\n function setRewardIneligibility(uint32[] calldata operators, uint256 until)\\n public\\n onlyOwner\\n {\\n Rewards.setIneligible(operators, until);\\n emit IneligibleForRewards(operators, until);\\n }\\n\\n /// @notice Restores reward eligibility for the operator.\\n function restoreRewardEligibility(address operator) public {\\n uint32 id = getOperatorID(operator);\\n Rewards.restoreEligibility(id);\\n emit RewardEligibilityRestored(operator, id);\\n }\\n\\n /// @notice Returns whether the operator is eligible for rewards or not.\\n function isEligibleForRewards(address operator) public view returns (bool) {\\n uint32 id = getOperatorID(operator);\\n return Rewards.isEligibleForRewards(id);\\n }\\n\\n /// @notice Returns the time the operator's reward eligibility can be restored.\\n function rewardsEligibilityRestorableAt(address operator)\\n public\\n view\\n returns (uint256)\\n {\\n uint32 id = getOperatorID(operator);\\n return Rewards.rewardsEligibilityRestorableAt(id);\\n }\\n\\n /// @notice Returns whether the operator is able to restore their eligibility\\n /// for rewards right away.\\n function canRestoreRewardEligibility(address operator)\\n public\\n view\\n returns (bool)\\n {\\n uint32 id = getOperatorID(operator);\\n return Rewards.canRestoreRewardEligibility(id);\\n }\\n\\n /// @notice Returns the amount of rewards withdrawable for the given operator.\\n function getAvailableRewards(address operator) public view returns (uint96) {\\n uint32 id = getOperatorID(operator);\\n return availableRewards(id);\\n }\\n\\n /// @notice Return whether the operator is present in the pool.\\n function isOperatorInPool(address operator) public view returns (bool) {\\n return getFlaggedLeafPosition(operator) != 0;\\n }\\n\\n /// @notice Return whether the operator's weight in the pool\\n /// matches their eligible weight.\\n function isOperatorUpToDate(address operator, uint256 authorizedStake)\\n public\\n view\\n returns (bool)\\n {\\n return getWeight(authorizedStake) == getPoolWeight(operator);\\n }\\n\\n /// @notice Return the weight of the operator in the pool,\\n /// which may or may not be out of date.\\n function getPoolWeight(address operator) public view returns (uint256) {\\n uint256 flaggedPosition = getFlaggedLeafPosition(operator);\\n if (flaggedPosition == 0) {\\n return 0;\\n } else {\\n uint256 leafPosition = flaggedPosition.unsetFlag();\\n uint256 leafWeight = getLeafWeight(leafPosition);\\n return leafWeight;\\n }\\n }\\n\\n /// @notice Selects a new group of operators of the provided size based on\\n /// the provided pseudo-random seed. At least one operator has to be\\n /// registered in the pool, otherwise the function fails reverting the\\n /// transaction.\\n /// @param groupSize Size of the requested group\\n /// @param seed Pseudo-random number used to select operators to group\\n /// @return selected Members of the selected group\\n function selectGroup(uint256 groupSize, bytes32 seed)\\n public\\n view\\n onlyLocked\\n returns (uint32[] memory)\\n {\\n uint256 _root = root;\\n\\n bytes32 rngState = seed;\\n uint256 rngRange = _root.sumWeight();\\n require(rngRange > 0, \\\"Not enough operators in pool\\\");\\n uint256 currentIndex;\\n\\n uint256 bits = RNG.bitsRequired(rngRange);\\n\\n uint32[] memory selected = new uint32[](groupSize);\\n\\n for (uint256 i = 0; i < groupSize; i++) {\\n (currentIndex, rngState) = RNG.getIndex(rngRange, rngState, bits);\\n\\n uint256 leafPosition = pickWeightedLeaf(currentIndex, _root);\\n\\n uint256 leaf = leaves[leafPosition];\\n selected[i] = leaf.id();\\n }\\n return selected;\\n }\\n\\n function getWeight(uint256 authorization) internal view returns (uint256) {\\n return authorization / poolWeightDivisor;\\n }\\n}\\n\",\"keccak256\":\"0x3c330b682bcb722bba861077a229f0605cda2142c3f0d45aaf2ce6a295e80615\"},\"@keep-network/sortition-pools/contracts/SortitionTree.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\nimport \\\"./Branch.sol\\\";\\nimport \\\"./Position.sol\\\";\\nimport \\\"./Leaf.sol\\\";\\nimport \\\"./Constants.sol\\\";\\n\\ncontract SortitionTree {\\n using Branch for uint256;\\n using Position for uint256;\\n using Leaf for uint256;\\n\\n // implicit tree\\n // root 8\\n // level2 64\\n // level3 512\\n // level4 4k\\n // level5 32k\\n // level6 256k\\n // level7 2M\\n uint256 internal root;\\n\\n // A 2-index mapping from layer => (index (0-index) => branch). For example,\\n // to access the 6th branch in the 2nd layer (right below the root node; the\\n // first branch layer), call branches[2][5]. Mappings are used in place of\\n // arrays for efficiency. The root is the first layer, the branches occupy\\n // layers 2 through 7, and layer 8 is for the leaves. Following this\\n // convention, the first index in `branches` is `2`, and the last index is\\n // `7`.\\n mapping(uint256 => mapping(uint256 => uint256)) internal branches;\\n\\n // A 0-index mapping from index => leaf, acting as an array. For example, to\\n // access the 42nd leaf, call leaves[41].\\n mapping(uint256 => uint256) internal leaves;\\n\\n // the flagged (see setFlag() and unsetFlag() in Position.sol) positions\\n // of all operators present in the pool\\n mapping(address => uint256) internal flaggedLeafPosition;\\n\\n // the leaf after the rightmost occupied leaf of each stack\\n uint256 internal rightmostLeaf;\\n\\n // the empty leaves in each stack\\n // between 0 and the rightmost occupied leaf\\n uint256[] internal emptyLeaves;\\n\\n // Each operator has an uint32 ID number\\n // which is allocated when they first join the pool\\n // and remains unchanged even if they leave and rejoin the pool.\\n mapping(address => uint32) internal operatorID;\\n\\n // The idAddress array records the address corresponding to each ID number.\\n // The ID number 0 is initialized with a zero address and is not used.\\n address[] internal idAddress;\\n\\n constructor() {\\n root = 0;\\n rightmostLeaf = 0;\\n idAddress.push();\\n }\\n\\n /// @notice Return the ID number of the given operator address. An ID number\\n /// of 0 means the operator has not been allocated an ID number yet.\\n /// @param operator Address of the operator.\\n /// @return the ID number of the given operator address\\n function getOperatorID(address operator) public view returns (uint32) {\\n return operatorID[operator];\\n }\\n\\n /// @notice Get the operator address corresponding to the given ID number. A\\n /// zero address means the ID number has not been allocated yet.\\n /// @param id ID of the operator\\n /// @return the address of the operator\\n function getIDOperator(uint32 id) public view returns (address) {\\n return idAddress.length > id ? idAddress[id] : address(0);\\n }\\n\\n /// @notice Gets the operator addresses corresponding to the given ID\\n /// numbers. A zero address means the ID number has not been allocated yet.\\n /// This function works just like getIDOperator except that it allows to fetch\\n /// operator addresses for multiple IDs in one call.\\n /// @param ids the array of the operator ids\\n /// @return an array of the associated operator addresses\\n function getIDOperators(uint32[] calldata ids)\\n public\\n view\\n returns (address[] memory)\\n {\\n uint256 idCount = idAddress.length;\\n\\n address[] memory operators = new address[](ids.length);\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint32 id = ids[i];\\n operators[i] = idCount > id ? idAddress[id] : address(0);\\n }\\n return operators;\\n }\\n\\n /// @notice Checks if operator is already registered in the pool.\\n /// @param operator the address of the operator\\n /// @return whether or not the operator is already registered in the pool\\n function isOperatorRegistered(address operator) public view returns (bool) {\\n return getFlaggedLeafPosition(operator) != 0;\\n }\\n\\n /// @notice Sum the number of operators in each trunk.\\n /// @return the number of operators in the pool\\n function operatorsInPool() public view returns (uint256) {\\n // Get the number of leaves that might be occupied;\\n // if `rightmostLeaf` equals `firstLeaf()` the tree must be empty,\\n // otherwise the difference between these numbers\\n // gives the number of leaves that may be occupied.\\n uint256 nPossiblyUsedLeaves = rightmostLeaf;\\n // Get the number of empty leaves\\n // not accounted for by the `rightmostLeaf`\\n uint256 nEmptyLeaves = emptyLeaves.length;\\n\\n return (nPossiblyUsedLeaves - nEmptyLeaves);\\n }\\n\\n /// @notice Convenience method to return the total weight of the pool\\n /// @return the total weight of the pool\\n function totalWeight() public view returns (uint256) {\\n return root.sumWeight();\\n }\\n\\n /// @notice Give the operator a new ID number.\\n /// Does not check if the operator already has an ID number.\\n /// @param operator the address of the operator\\n /// @return a new ID for that operator\\n function allocateOperatorID(address operator) internal returns (uint256) {\\n uint256 id = idAddress.length;\\n\\n require(id <= type(uint32).max, \\\"Pool capacity exceeded\\\");\\n\\n operatorID[operator] = uint32(id);\\n idAddress.push(operator);\\n return id;\\n }\\n\\n /// @notice Inserts an operator into the sortition pool\\n /// @param operator the address of an operator to insert\\n /// @param weight how much weight that operator has in the pool\\n function _insertOperator(address operator, uint256 weight) internal {\\n require(\\n !isOperatorRegistered(operator),\\n \\\"Operator is already registered in the pool\\\"\\n );\\n\\n // Fetch the operator's ID, and if they don't have one, allocate them one.\\n uint256 id = getOperatorID(operator);\\n if (id == 0) {\\n id = allocateOperatorID(operator);\\n }\\n\\n // Determine which leaf to insert them into\\n uint256 position = getEmptyLeafPosition();\\n // Record the block the operator was inserted in\\n uint256 theLeaf = Leaf.make(operator, block.number, id);\\n\\n // Update the leaf, and propagate the weight changes all the way up to the\\n // root.\\n root = setLeaf(position, theLeaf, weight, root);\\n\\n // Without position flags,\\n // the position 0x000000 would be treated as empty\\n flaggedLeafPosition[operator] = position.setFlag();\\n }\\n\\n /// @notice Remove an operator (and their weight) from the pool.\\n /// @param operator the address of the operator to remove\\n function _removeOperator(address operator) internal {\\n uint256 flaggedPosition = getFlaggedLeafPosition(operator);\\n require(flaggedPosition != 0, \\\"Operator is not registered in the pool\\\");\\n uint256 unflaggedPosition = flaggedPosition.unsetFlag();\\n\\n // Update the leaf, and propagate the weight changes all the way up to the\\n // root.\\n root = removeLeaf(unflaggedPosition, root);\\n removeLeafPositionRecord(operator);\\n }\\n\\n /// @notice Update an operator's weight in the pool.\\n /// @param operator the address of the operator to update\\n /// @param weight the new weight\\n function updateOperator(address operator, uint256 weight) internal {\\n require(\\n isOperatorRegistered(operator),\\n \\\"Operator is not registered in the pool\\\"\\n );\\n\\n uint256 flaggedPosition = getFlaggedLeafPosition(operator);\\n uint256 unflaggedPosition = flaggedPosition.unsetFlag();\\n root = updateLeaf(unflaggedPosition, weight, root);\\n }\\n\\n /// @notice Helper method to remove a leaf position record for an operator.\\n /// @param operator the address of the operator to remove the record for\\n function removeLeafPositionRecord(address operator) internal {\\n flaggedLeafPosition[operator] = 0;\\n }\\n\\n /// @notice Removes the data and weight from a particular leaf.\\n /// @param position the leaf index to remove\\n /// @param _root the root node containing the leaf\\n /// @return the updated root node\\n function removeLeaf(uint256 position, uint256 _root)\\n internal\\n returns (uint256)\\n {\\n uint256 rightmostSubOne = rightmostLeaf - 1;\\n bool isRightmost = position == rightmostSubOne;\\n\\n // Clears out the data in the leaf node, and then propagates the weight\\n // changes all the way up to the root.\\n uint256 newRoot = setLeaf(position, 0, 0, _root);\\n\\n // Infer if need to fall back on emptyLeaves yet\\n if (isRightmost) {\\n rightmostLeaf = rightmostSubOne;\\n } else {\\n emptyLeaves.push(position);\\n }\\n return newRoot;\\n }\\n\\n /// @notice Updates the tree to give a particular leaf a new weight.\\n /// @param position the index of the leaf to update\\n /// @param weight the new weight\\n /// @param _root the root node containing the leaf\\n /// @return the updated root node\\n function updateLeaf(\\n uint256 position,\\n uint256 weight,\\n uint256 _root\\n ) internal returns (uint256) {\\n if (getLeafWeight(position) != weight) {\\n return updateTree(position, weight, _root);\\n } else {\\n return _root;\\n }\\n }\\n\\n /// @notice Places a leaf into a particular position, with a given weight and\\n /// propagates that change.\\n /// @param position the index to place the leaf in\\n /// @param theLeaf the new leaf to place in the position\\n /// @param leafWeight the weight of the leaf\\n /// @param _root the root containing the new leaf\\n /// @return the updated root node\\n function setLeaf(\\n uint256 position,\\n uint256 theLeaf,\\n uint256 leafWeight,\\n uint256 _root\\n ) internal returns (uint256) {\\n // set leaf\\n leaves[position] = theLeaf;\\n\\n return (updateTree(position, leafWeight, _root));\\n }\\n\\n /// @notice Propagates a weight change at a position through the tree,\\n /// eventually returning the updated root.\\n /// @param position the index of leaf to update\\n /// @param weight the new weight of the leaf\\n /// @param _root the root node containing the leaf\\n /// @return the updated root node\\n function updateTree(\\n uint256 position,\\n uint256 weight,\\n uint256 _root\\n ) internal returns (uint256) {\\n uint256 childSlot;\\n uint256 treeNode;\\n uint256 newNode;\\n uint256 nodeWeight = weight;\\n\\n uint256 parent = position;\\n // set levels 7 to 2\\n for (uint256 level = Constants.LEVELS; level >= 2; level--) {\\n childSlot = parent.slot();\\n parent = parent.parent();\\n treeNode = branches[level][parent];\\n newNode = treeNode.setSlot(childSlot, nodeWeight);\\n branches[level][parent] = newNode;\\n nodeWeight = newNode.sumWeight();\\n }\\n\\n // set level Root\\n childSlot = parent.slot();\\n return _root.setSlot(childSlot, nodeWeight);\\n }\\n\\n /// @notice Retrieves the next available empty leaf position. Tries to fill\\n /// left to right first, ignoring leaf removals, and then fills\\n /// most-recent-removals first.\\n /// @return the position of the empty leaf\\n function getEmptyLeafPosition() internal returns (uint256) {\\n uint256 rLeaf = rightmostLeaf;\\n bool spaceOnRight = (rLeaf + 1) < Constants.POOL_CAPACITY;\\n if (spaceOnRight) {\\n rightmostLeaf = rLeaf + 1;\\n return rLeaf;\\n } else {\\n uint256 emptyLeafCount = emptyLeaves.length;\\n require(emptyLeafCount > 0, \\\"Pool is full\\\");\\n uint256 emptyLeaf = emptyLeaves[emptyLeafCount - 1];\\n emptyLeaves.pop();\\n return emptyLeaf;\\n }\\n }\\n\\n /// @notice Gets the flagged leaf position for an operator.\\n /// @param operator the address of the operator\\n /// @return the leaf position of that operator\\n function getFlaggedLeafPosition(address operator)\\n internal\\n view\\n returns (uint256)\\n {\\n return flaggedLeafPosition[operator];\\n }\\n\\n /// @notice Gets the weight of a leaf at a particular position.\\n /// @param position the index of the leaf\\n /// @return the weight of the leaf at that position\\n function getLeafWeight(uint256 position) internal view returns (uint256) {\\n uint256 slot = position.slot();\\n uint256 parent = position.parent();\\n\\n // A leaf's weight information is stored a 32-bit slot in the branch layer\\n // directly above the leaf layer. To access it, we calculate that slot and\\n // parent position, and always know the hard-coded layer index.\\n uint256 node = branches[Constants.LEVELS][parent];\\n return node.getSlot(slot);\\n }\\n\\n /// @notice Picks a leaf given a random index.\\n /// @param index a number in `[0, _root.totalWeight())` used to decide\\n /// between leaves\\n /// @param _root the root of the tree\\n function pickWeightedLeaf(uint256 index, uint256 _root)\\n internal\\n view\\n returns (uint256 leafPosition)\\n {\\n uint256 currentIndex = index;\\n uint256 currentNode = _root;\\n uint256 currentPosition = 0;\\n uint256 currentSlot;\\n\\n require(index < currentNode.sumWeight(), \\\"Index exceeds weight\\\");\\n\\n // get root slot\\n (currentSlot, currentIndex) = currentNode.pickWeightedSlot(currentIndex);\\n\\n // get slots from levels 2 to 7\\n for (uint256 level = 2; level <= Constants.LEVELS; level++) {\\n currentPosition = currentPosition.child(currentSlot);\\n currentNode = branches[level][currentPosition];\\n (currentSlot, currentIndex) = currentNode.pickWeightedSlot(currentIndex);\\n }\\n\\n // get leaf position\\n leafPosition = currentPosition.child(currentSlot);\\n }\\n}\\n\",\"keccak256\":\"0x51daeca62ef52be78a1a9de4d2a1c5900c873165f59eda14d5965d7d7da90a03\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.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/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\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 = MathUpgradeable.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, MathUpgradeable.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\":\"0x6b9a5d35b744b25529a2856a8093e7c03fb35a34b1c4fb5499e560f8ade140da\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x12f297cafe6e2847ae0378502f155654d0764b532a9873c8afe4350950fa7971\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.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 MathUpgradeable {\\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\":\"0xc1bd5b53319c68f84e3becd75694d941e8f4be94049903232cd8bc7c535aaa5a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xa4d1d62251f8574deb032a35fc948386a9b4de74b812d4f545a1ac120486b48a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xda898fa084aa1ddfdb346e6a40459e00a59d87071cce7c315a46d648dd71d0ba\",\"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\"},\"@thesis/solidity-contracts/contracts/token/IApproveAndCall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.4;\\n\\n/// @notice An interface that should be implemented by tokens supporting\\n/// `approveAndCall`/`receiveApproval` pattern.\\ninterface IApproveAndCall {\\n /// @notice Executes `receiveApproval` function on spender as specified in\\n /// `IReceiveApproval` interface. Approves spender to withdraw from\\n /// the caller multiple times, up to the `amount`. If this\\n /// function is called again, it overwrites the current allowance\\n /// with `amount`. Reverts if the approval reverted or if\\n /// `receiveApproval` call on the spender reverted.\\n function approveAndCall(\\n address spender,\\n uint256 amount,\\n bytes memory extraData\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x393d18ef81a57dcc96fff4c340cc2945deaebb37b9796c322cf2bc96872c3df8\",\"license\":\"MIT\"},\"@thesis/solidity-contracts/contracts/token/IERC20WithPermit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.4;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\nimport \\\"./IApproveAndCall.sol\\\";\\n\\n/// @title IERC20WithPermit\\n/// @notice Burnable ERC20 token with EIP2612 permit functionality. User can\\n/// authorize a transfer of their token with a signature conforming\\n/// EIP712 standard instead of an on-chain transaction from their\\n/// address. Anyone can submit this signature on the user's behalf by\\n/// calling the permit function, as specified in EIP2612 standard,\\n/// paying gas fees, and possibly performing other actions in the same\\n/// transaction.\\ninterface IERC20WithPermit is IERC20, IERC20Metadata, IApproveAndCall {\\n /// @notice EIP2612 approval made with secp256k1 signature.\\n /// Users can authorize a transfer of their tokens with a signature\\n /// conforming EIP712 standard, rather than an on-chain transaction\\n /// from their address. Anyone can submit this signature on the\\n /// user's behalf by calling the permit function, paying gas fees,\\n /// and possibly performing other actions in the same transaction.\\n /// @dev The deadline argument can be set to `type(uint256).max to create\\n /// permits that effectively never expire.\\n function permit(\\n address owner,\\n address spender,\\n uint256 amount,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /// @notice Destroys `amount` tokens from the caller.\\n function burn(uint256 amount) external;\\n\\n /// @notice Destroys `amount` of tokens from `account`, deducting the amount\\n /// from caller's allowance.\\n function burnFrom(address account, uint256 amount) external;\\n\\n /// @notice Returns hash of EIP712 Domain struct with the token name as\\n /// a signing domain and token contract as a verifying contract.\\n /// Used to construct EIP2612 signature provided to `permit`\\n /// function.\\n /* solhint-disable-next-line func-name-mixedcase */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /// @notice Returns the current nonce for EIP2612 permission for the\\n /// provided token owner for a replay protection. Used to construct\\n /// EIP2612 signature provided to `permit` function.\\n function nonce(address owner) external view returns (uint256);\\n\\n /// @notice Returns EIP2612 Permit message hash. Used to construct EIP2612\\n /// signature provided to `permit` function.\\n /* solhint-disable-next-line func-name-mixedcase */\\n function PERMIT_TYPEHASH() external pure returns (bytes32);\\n}\\n\",\"keccak256\":\"0xdac9a5086c19a7128b505a7be1ab0ac1aa314f6989cb88d2417e9d7383f89fa9\",\"license\":\"MIT\"},\"@thesis/solidity-contracts/contracts/token/IReceiveApproval.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.4;\\n\\n/// @notice An interface that should be implemented by contracts supporting\\n/// `approveAndCall`/`receiveApproval` pattern.\\ninterface IReceiveApproval {\\n /// @notice Receives approval to spend tokens. Called as a result of\\n /// `approveAndCall` call on the token.\\n function receiveApproval(\\n address from,\\n uint256 amount,\\n address token,\\n bytes calldata extraData\\n ) external;\\n}\\n\",\"keccak256\":\"0x6a30d83ad230548b1e7839737affc8489a035314209de14b89dbef7fb0f66395\",\"license\":\"MIT\"}},\"version\":1}",
12037
+ "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract SortitionPool\",\"name\":\"_sortitionPool\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"activeThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"groupSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"groupThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"publicKeyByteSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"signatureByteSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sortitionPool\",\"outputs\":[{\"internalType\":\"contract SortitionPool\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"struct EcdsaDkg.Result\",\"name\":\"result\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"startBlock\",\"type\":\"uint256\"}],\"name\":\"validate\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isValid\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"errorMsg\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"struct EcdsaDkg.Result\",\"name\":\"result\",\"type\":\"tuple\"}],\"name\":\"validateFields\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isValid\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"errorMsg\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"struct EcdsaDkg.Result\",\"name\":\"result\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"seed\",\"type\":\"uint256\"}],\"name\":\"validateGroupMembers\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"struct EcdsaDkg.Result\",\"name\":\"result\",\"type\":\"tuple\"}],\"name\":\"validateMembersHash\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"submitterMemberIndex\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"groupPubKey\",\"type\":\"bytes\"},{\"internalType\":\"uint8[]\",\"name\":\"misbehavedMembersIndices\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes\",\"name\":\"signatures\",\"type\":\"bytes\"},{\"internalType\":\"uint256[]\",\"name\":\"signingMembersIndices\",\"type\":\"uint256[]\"},{\"internalType\":\"uint32[]\",\"name\":\"members\",\"type\":\"uint32[]\"},{\"internalType\":\"bytes32\",\"name\":\"membersHash\",\"type\":\"bytes32\"}],\"internalType\":\"struct EcdsaDkg.Result\",\"name\":\"result\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"startBlock\",\"type\":\"uint256\"}],\"name\":\"validateSignatures\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"validate((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32),uint256,uint256)\":{\"params\":{\"seed\":\"seed used to start the DKG and select group members\",\"startBlock\":\"DKG start block\"},\"returns\":{\"errorMsg\":\"validation error message; empty for a valid result\",\"isValid\":\"true if the result is valid, false otherwise\"}},\"validateFields((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32))\":{\"returns\":{\"errorMsg\":\"validation error message; empty for a valid result\",\"isValid\":\"true if the result is valid, false otherwise\"}},\"validateGroupMembers((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32),uint256)\":{\"params\":{\"seed\":\"seed used to start the DKG and select group members\"},\"returns\":{\"_0\":\"true if group members matches; false otherwise\"}},\"validateMembersHash((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32))\":{\"params\":{\"result\":\"DKG result\"},\"returns\":{\"_0\":\"true if calculated result's group members hash matches with the one that is challenged.\"}},\"validateSignatures((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32),uint256)\":{\"params\":{\"startBlock\":\"DKG start block\"},\"returns\":{\"_0\":\"true if group members matches; false otherwise\"}}},\"stateVariables\":{\"activeThreshold\":{\"details\":\"The minimum number of active and properly behaving group members during the DKG needed to accept the result. This number is higher than `groupThreshold` to keep a safety margin for members becoming inactive after DKG so that the group can still produce signature.\"},\"groupSize\":{\"details\":\"Size of a group in DKG.\"},\"groupThreshold\":{\"details\":\"The minimum number of group members needed to interact according to the protocol to produce a signature. The adversary can not learn anything about the key as long as it does not break into groupThreshold+1 of members.\"},\"publicKeyByteSize\":{\"details\":\"Size in bytes of a public key produced by group members during the the DKG. The length assumes uncompressed ECDSA public key.\"},\"signatureByteSize\":{\"details\":\"Size in bytes of a single signature produced by operator supporting DKG result.\"}},\"title\":\"DKG result validator\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"validate((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32),uint256,uint256)\":{\"notice\":\"Performs a full validation of DKG result, including checking the format of fields in the result, declared selected group members, and signatures of operators supporting the result.\"},\"validateFields((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32))\":{\"notice\":\"Performs a static validation of DKG result fields: lengths, ranges, and order of arrays.\"},\"validateGroupMembers((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32),uint256)\":{\"notice\":\"Performs validation of group members as declared in DKG result against group members selected by the sortition pool.\"},\"validateMembersHash((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32))\":{\"notice\":\"Performs validation of hashed group members that actively took part in DKG.\"},\"validateSignatures((uint256,bytes,uint8[],bytes,uint256[],uint32[],bytes32),uint256)\":{\"notice\":\"Performs validation of signatures supplied in DKG result. Note that this function does not check if addresses which supplied signatures supporting the result are the ones selected to the group by sortition pool. This function should be used together with `validateGroupMembers`.\"}},\"notice\":\"EcdsaDkgValidator allows performing a full validation of DKG result, including checking the format of fields in the result, declared selected group members, and signatures of operators supporting the result. The operator submitting the result should perform the validation using a free contract call before submitting the result to ensure their result is valid and can not be challenged. All other network operators should perform validation of the submitted result using a free contract call and challenge the result if the validation fails.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"@keep-network/ecdsa/contracts/EcdsaDkgValidator.sol\":\"EcdsaDkgValidator\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000},\"remappings\":[]},\"sources\":{\"@keep-network/ecdsa/contracts/EcdsaDkgValidator.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n//\\n// \\u2593\\u2593\\u258c \\u2593\\u2593 \\u2590\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2584\\u2584 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2584\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2580\\u2580 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2580\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2580\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2588\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n//\\n// Trust math, not hardware.\\n\\n// Initial version copied from Keep Network Random Beacon:\\n// https://github.com/keep-network/keep-core/blob/5138c7628868dbeed3ae2164f76fccc6c1fbb9e8/solidity/random-beacon/contracts/DKGValidator.sol\\n//\\n// With the following differences:\\n// - group public key length,\\n// - group size and related thresholds,\\n// - documentation.\\n\\npragma solidity 0.8.17;\\n\\nimport \\\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\\\";\\nimport \\\"@keep-network/random-beacon/contracts/libraries/BytesLib.sol\\\";\\nimport \\\"@keep-network/sortition-pools/contracts/SortitionPool.sol\\\";\\nimport \\\"./libraries/EcdsaDkg.sol\\\";\\n\\n/// @title DKG result validator\\n/// @notice EcdsaDkgValidator allows performing a full validation of DKG result,\\n/// including checking the format of fields in the result, declared\\n/// selected group members, and signatures of operators supporting the\\n/// result. The operator submitting the result should perform the\\n/// validation using a free contract call before submitting the result\\n/// to ensure their result is valid and can not be challenged. All other\\n/// network operators should perform validation of the submitted result\\n/// using a free contract call and challenge the result if the\\n/// validation fails.\\ncontract EcdsaDkgValidator {\\n using BytesLib for bytes;\\n using ECDSA for bytes32;\\n\\n /// @dev Size of a group in DKG.\\n uint256 public constant groupSize = 100;\\n\\n /// @dev The minimum number of group members needed to interact according to\\n /// the protocol to produce a signature. The adversary can not learn\\n /// anything about the key as long as it does not break into\\n /// groupThreshold+1 of members.\\n uint256 public constant groupThreshold = 51;\\n\\n /// @dev The minimum number of active and properly behaving group members\\n /// during the DKG needed to accept the result. This number is higher\\n /// than `groupThreshold` to keep a safety margin for members becoming\\n /// inactive after DKG so that the group can still produce signature.\\n uint256 public constant activeThreshold = 90; // 90% of groupSize\\n\\n /// @dev Size in bytes of a public key produced by group members during the\\n /// the DKG. The length assumes uncompressed ECDSA public key.\\n uint256 public constant publicKeyByteSize = 64;\\n\\n /// @dev Size in bytes of a single signature produced by operator supporting\\n /// DKG result.\\n uint256 public constant signatureByteSize = 65;\\n\\n SortitionPool public immutable sortitionPool;\\n\\n constructor(SortitionPool _sortitionPool) {\\n sortitionPool = _sortitionPool;\\n }\\n\\n /// @notice Performs a full validation of DKG result, including checking the\\n /// format of fields in the result, declared selected group members,\\n /// and signatures of operators supporting the result.\\n /// @param seed seed used to start the DKG and select group members\\n /// @param startBlock DKG start block\\n /// @return isValid true if the result is valid, false otherwise\\n /// @return errorMsg validation error message; empty for a valid result\\n function validate(\\n EcdsaDkg.Result calldata result,\\n uint256 seed,\\n uint256 startBlock\\n ) external view returns (bool isValid, string memory errorMsg) {\\n (bool hasValidFields, string memory error) = validateFields(result);\\n if (!hasValidFields) {\\n return (false, error);\\n }\\n\\n if (!validateSignatures(result, startBlock)) {\\n return (false, \\\"Invalid signatures\\\");\\n }\\n\\n if (!validateGroupMembers(result, seed)) {\\n return (false, \\\"Invalid group members\\\");\\n }\\n\\n // At this point all group members and misbehaved members were verified\\n if (!validateMembersHash(result)) {\\n return (false, \\\"Invalid members hash\\\");\\n }\\n\\n return (true, \\\"\\\");\\n }\\n\\n /// @notice Performs a static validation of DKG result fields: lengths,\\n /// ranges, and order of arrays.\\n /// @return isValid true if the result is valid, false otherwise\\n /// @return errorMsg validation error message; empty for a valid result\\n function validateFields(EcdsaDkg.Result calldata result)\\n public\\n pure\\n returns (bool isValid, string memory errorMsg)\\n {\\n if (result.groupPubKey.length != publicKeyByteSize) {\\n return (false, \\\"Malformed group public key\\\");\\n }\\n\\n // The number of misbehaved members can not exceed the threshold.\\n // Misbehaved member indices needs to be unique, between [1, groupSize],\\n // and sorted in ascending order.\\n uint8[] calldata misbehavedMembersIndices = result\\n .misbehavedMembersIndices;\\n if (groupSize - misbehavedMembersIndices.length < activeThreshold) {\\n return (false, \\\"Too many members misbehaving during DKG\\\");\\n }\\n if (misbehavedMembersIndices.length > 1) {\\n if (\\n misbehavedMembersIndices[0] < 1 ||\\n misbehavedMembersIndices[misbehavedMembersIndices.length - 1] >\\n groupSize\\n ) {\\n return (false, \\\"Corrupted misbehaved members indices\\\");\\n }\\n for (uint256 i = 1; i < misbehavedMembersIndices.length; i++) {\\n if (\\n misbehavedMembersIndices[i - 1] >=\\n misbehavedMembersIndices[i]\\n ) {\\n return (false, \\\"Corrupted misbehaved members indices\\\");\\n }\\n }\\n }\\n\\n // Each signature needs to have a correct length and signatures need to\\n // be provided.\\n uint256 signaturesCount = result.signatures.length / signatureByteSize;\\n if (result.signatures.length == 0) {\\n return (false, \\\"No signatures provided\\\");\\n }\\n if (result.signatures.length % signatureByteSize != 0) {\\n return (false, \\\"Malformed signatures array\\\");\\n }\\n\\n // We expect the same amount of signatures as the number of declared\\n // group member indices that signed the result.\\n uint256[] calldata signingMembersIndices = result.signingMembersIndices;\\n if (signaturesCount != signingMembersIndices.length) {\\n return (false, \\\"Unexpected signatures count\\\");\\n }\\n if (signaturesCount < groupThreshold) {\\n return (false, \\\"Too few signatures\\\");\\n }\\n if (signaturesCount > groupSize) {\\n return (false, \\\"Too many signatures\\\");\\n }\\n\\n // Signing member indices needs to be unique, between [1,groupSize],\\n // and sorted in ascending order.\\n if (\\n signingMembersIndices[0] < 1 ||\\n signingMembersIndices[signingMembersIndices.length - 1] > groupSize\\n ) {\\n return (false, \\\"Corrupted signing member indices\\\");\\n }\\n for (uint256 i = 1; i < signingMembersIndices.length; i++) {\\n if (signingMembersIndices[i - 1] >= signingMembersIndices[i]) {\\n return (false, \\\"Corrupted signing member indices\\\");\\n }\\n }\\n\\n return (true, \\\"\\\");\\n }\\n\\n /// @notice Performs validation of group members as declared in DKG\\n /// result against group members selected by the sortition pool.\\n /// @param seed seed used to start the DKG and select group members\\n /// @return true if group members matches; false otherwise\\n function validateGroupMembers(EcdsaDkg.Result calldata result, uint256 seed)\\n public\\n view\\n returns (bool)\\n {\\n uint32[] calldata resultMembers = result.members;\\n uint32[] memory actualGroupMembers = sortitionPool.selectGroup(\\n groupSize,\\n bytes32(seed)\\n );\\n if (resultMembers.length != actualGroupMembers.length) {\\n return false;\\n }\\n for (uint256 i = 0; i < resultMembers.length; i++) {\\n if (resultMembers[i] != actualGroupMembers[i]) {\\n return false;\\n }\\n }\\n return true;\\n }\\n\\n /// @notice Performs validation of signatures supplied in DKG result.\\n /// Note that this function does not check if addresses which\\n /// supplied signatures supporting the result are the ones selected\\n /// to the group by sortition pool. This function should be used\\n /// together with `validateGroupMembers`.\\n /// @param startBlock DKG start block\\n /// @return true if group members matches; false otherwise\\n function validateSignatures(\\n EcdsaDkg.Result calldata result,\\n uint256 startBlock\\n ) public view returns (bool) {\\n bytes32 hash = keccak256(\\n abi.encode(\\n block.chainid,\\n result.groupPubKey,\\n result.misbehavedMembersIndices,\\n startBlock\\n )\\n ).toEthSignedMessageHash();\\n\\n uint256[] calldata signingMembersIndices = result.signingMembersIndices;\\n uint32[] memory signingMemberIds = new uint32[](\\n signingMembersIndices.length\\n );\\n for (uint256 i = 0; i < signingMembersIndices.length; i++) {\\n signingMemberIds[i] = result.members[signingMembersIndices[i] - 1];\\n }\\n\\n address[] memory signingMemberAddresses = sortitionPool.getIDOperators(\\n signingMemberIds\\n );\\n\\n bytes memory current; // Current signature to be checked.\\n\\n uint256 signaturesCount = result.signatures.length / signatureByteSize;\\n for (uint256 i = 0; i < signaturesCount; i++) {\\n current = result.signatures.slice(\\n signatureByteSize * i,\\n signatureByteSize\\n );\\n address recoveredAddress = hash.recover(current);\\n\\n if (signingMemberAddresses[i] != recoveredAddress) {\\n return false;\\n }\\n }\\n\\n return true;\\n }\\n\\n /// @notice Performs validation of hashed group members that actively took\\n /// part in DKG.\\n /// @param result DKG result\\n /// @return true if calculated result's group members hash matches with the\\n /// one that is challenged.\\n function validateMembersHash(EcdsaDkg.Result calldata result)\\n public\\n pure\\n returns (bool)\\n {\\n if (result.misbehavedMembersIndices.length > 0) {\\n // members that generated a group signing key\\n uint32[] memory groupMembers = new uint32[](\\n result.members.length - result.misbehavedMembersIndices.length\\n );\\n uint256 k = 0; // misbehaved members counter\\n uint256 j = 0; // group members counter\\n for (uint256 i = 0; i < result.members.length; i++) {\\n // misbehaved member indices start from 1, so we need to -1 on misbehaved\\n if (i != result.misbehavedMembersIndices[k] - 1) {\\n groupMembers[j] = result.members[i];\\n j++;\\n } else if (k < result.misbehavedMembersIndices.length - 1) {\\n k++;\\n }\\n }\\n\\n return keccak256(abi.encode(groupMembers)) == result.membersHash;\\n }\\n\\n return keccak256(abi.encode(result.members)) == result.membersHash;\\n }\\n}\\n\",\"keccak256\":\"0xe8f3d63ef4213ac71d447726be3971c5ed6b0b0eb145763d324faecdce707bf6\",\"license\":\"GPL-3.0-only\"},\"@keep-network/ecdsa/contracts/libraries/EcdsaDkg.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n//\\n// \\u2593\\u2593\\u258c \\u2593\\u2593 \\u2590\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2584\\u2584 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2584\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2580\\u2580 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2580\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2580\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2588\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n//\\n//\\n\\n// Initial version copied from Keep Network Random Beacon:\\n// https://github.com/keep-network/keep-core/blob/5138c7628868dbeed3ae2164f76fccc6c1fbb9e8/solidity/random-beacon/contracts/libraries/DKG.sol\\n//\\n// With the following differences:\\n// - the group size was set to 100,\\n// - offchainDkgTimeout was removed,\\n// - submission eligibility verification is not performed on-chain,\\n// - submission eligibility delay was replaced with a submission timeout,\\n// - seed timeout notification requires seedTimeout period to pass.\\n\\npragma solidity 0.8.17;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\\\";\\nimport \\\"@keep-network/sortition-pools/contracts/SortitionPool.sol\\\";\\nimport \\\"@keep-network/random-beacon/contracts/libraries/BytesLib.sol\\\";\\nimport \\\"../EcdsaDkgValidator.sol\\\";\\n\\nlibrary EcdsaDkg {\\n using BytesLib for bytes;\\n using ECDSAUpgradeable for bytes32;\\n\\n struct Parameters {\\n // Time in blocks during which a seed is expected to be delivered.\\n // DKG starts only after a seed is delivered. The time the contract\\n // awaits for a seed is not included in the DKG timeout.\\n uint256 seedTimeout;\\n // Time in blocks during which a submitted result can be challenged.\\n uint256 resultChallengePeriodLength;\\n // Extra gas required to be left at the end of the challenge DKG result\\n // transaction.\\n uint256 resultChallengeExtraGas;\\n // Time in blocks during which a result is expected to be submitted.\\n uint256 resultSubmissionTimeout;\\n // Time in blocks during which only the result submitter is allowed to\\n // approve it. Once this period ends and the submitter have not approved\\n // the result, anyone can do it.\\n uint256 submitterPrecedencePeriodLength;\\n // This struct doesn't contain `__gap` property as the structure is\\n // stored inside `Data` struct, that already have a gap that can be used\\n // on upgrade.\\n }\\n\\n struct Data {\\n // Address of the Sortition Pool contract.\\n SortitionPool sortitionPool;\\n // Address of the EcdsaDkgValidator contract.\\n EcdsaDkgValidator dkgValidator;\\n // DKG parameters. The parameters should persist between DKG executions.\\n // They should be updated with dedicated set functions only when DKG is not\\n // in progress.\\n Parameters parameters;\\n // Time in block at which DKG state was locked.\\n uint256 stateLockBlock;\\n // Time in blocks at which DKG started.\\n uint256 startBlock;\\n // Seed used to start DKG.\\n uint256 seed;\\n // Time in blocks that should be added to result submission eligibility\\n // delay calculation. It is used in case of a challenge to adjust\\n // DKG timeout calculation.\\n uint256 resultSubmissionStartBlockOffset;\\n // Hash of submitted DKG result.\\n bytes32 submittedResultHash;\\n // Block number from the moment of the DKG result submission.\\n uint256 submittedResultBlock;\\n // Reserved storage space in case we need to add more variables.\\n // See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n // slither-disable-next-line unused-state\\n uint256[38] __gap;\\n }\\n\\n /// @notice DKG result.\\n struct Result {\\n // Claimed submitter candidate group member index.\\n // Must be in range [1, groupSize].\\n uint256 submitterMemberIndex;\\n // Generated candidate group public key\\n bytes groupPubKey;\\n // Array of misbehaved members indices (disqualified or inactive).\\n // Indices must be in range [1, groupSize], unique, and sorted in ascending\\n // order.\\n uint8[] misbehavedMembersIndices;\\n // Concatenation of signatures from members supporting the result.\\n // The message to be signed by each member is keccak256 hash of the\\n // calculated group public key, misbehaved members indices and DKG\\n // start block. The calculated hash should be prefixed with prefixed with\\n // `\\\\x19Ethereum signed message:\\\\n` before signing, so the message to\\n // sign is:\\n // `\\\\x19Ethereum signed message:\\\\n${keccak256(\\n // groupPubKey, misbehavedMembersIndices, dkgStartBlock\\n // )}`\\n bytes signatures;\\n // Indices of members corresponding to each signature. Indices must be\\n // be in range [1, groupSize], unique, and sorted in ascending order.\\n uint256[] signingMembersIndices;\\n // Identifiers of candidate group members as outputted by the group\\n // selection protocol.\\n uint32[] members;\\n // Keccak256 hash of group members identifiers that actively took part\\n // in DKG (excluding IA/DQ members).\\n bytes32 membersHash;\\n // This struct doesn't contain `__gap` property as the structure is not\\n // stored, it is used as a function's calldata argument.\\n }\\n\\n /// @notice States for phases of group creation. The states doesn't include\\n /// timeouts which should be tracked and notified individually.\\n enum State {\\n // Group creation is not in progress. It is a state set after group creation\\n // completion either by timeout or by a result approval.\\n IDLE,\\n // Group creation is awaiting the seed and sortition pool is locked.\\n AWAITING_SEED,\\n // DKG protocol execution is in progress. A result is being calculated\\n // by the clients in this state and the contract awaits a result submission.\\n // This is a state to which group creation returns in case of a result\\n // challenge notification.\\n AWAITING_RESULT,\\n // DKG result was submitted and awaits an approval or a challenge. If a result\\n // gets challenge the state returns to `AWAITING_RESULT`. If a result gets\\n // approval the state changes to `IDLE`.\\n CHALLENGE\\n }\\n\\n /// @dev Size of a group in ECDSA wallet.\\n uint256 public constant groupSize = 100;\\n\\n event DkgStarted(uint256 indexed seed);\\n\\n // To recreate the members that actively took part in dkg, the selected members\\n // array should be filtered out from misbehavedMembersIndices.\\n event DkgResultSubmitted(\\n bytes32 indexed resultHash,\\n uint256 indexed seed,\\n Result result\\n );\\n\\n event DkgTimedOut();\\n\\n event DkgResultApproved(\\n bytes32 indexed resultHash,\\n address indexed approver\\n );\\n\\n event DkgResultChallenged(\\n bytes32 indexed resultHash,\\n address indexed challenger,\\n string reason\\n );\\n\\n event DkgStateLocked();\\n\\n event DkgSeedTimedOut();\\n\\n /// @notice Initializes SortitionPool and EcdsaDkgValidator addresses.\\n /// Can be performed only once.\\n /// @param _sortitionPool Sortition Pool reference\\n /// @param _dkgValidator EcdsaDkgValidator reference\\n function init(\\n Data storage self,\\n SortitionPool _sortitionPool,\\n EcdsaDkgValidator _dkgValidator\\n ) internal {\\n require(\\n address(self.sortitionPool) == address(0),\\n \\\"Sortition Pool address already set\\\"\\n );\\n\\n require(\\n address(self.dkgValidator) == address(0),\\n \\\"DKG Validator address already set\\\"\\n );\\n\\n self.sortitionPool = _sortitionPool;\\n self.dkgValidator = _dkgValidator;\\n }\\n\\n /// @notice Determines the current state of group creation. It doesn't take\\n /// timeouts into consideration. The timeouts should be tracked and\\n /// notified separately.\\n function currentState(Data storage self)\\n internal\\n view\\n returns (State state)\\n {\\n state = State.IDLE;\\n\\n if (self.sortitionPool.isLocked()) {\\n state = State.AWAITING_SEED;\\n\\n if (self.startBlock > 0) {\\n state = State.AWAITING_RESULT;\\n\\n if (self.submittedResultBlock > 0) {\\n state = State.CHALLENGE;\\n }\\n }\\n }\\n }\\n\\n /// @notice Locks the sortition pool and starts awaiting for the\\n /// group creation seed.\\n function lockState(Data storage self) internal {\\n require(currentState(self) == State.IDLE, \\\"Current state is not IDLE\\\");\\n\\n emit DkgStateLocked();\\n\\n self.sortitionPool.lock();\\n\\n self.stateLockBlock = block.number;\\n }\\n\\n function start(Data storage self, uint256 seed) internal {\\n require(\\n currentState(self) == State.AWAITING_SEED,\\n \\\"Current state is not AWAITING_SEED\\\"\\n );\\n\\n emit DkgStarted(seed);\\n\\n self.startBlock = block.number;\\n self.seed = seed;\\n }\\n\\n /// @notice Allows to submit a DKG result. The submitted result does not go\\n /// through a validation and before it gets accepted, it needs to\\n /// wait through the challenge period during which everyone has\\n /// a chance to challenge the result as invalid one. Submitter of\\n /// the result needs to be in the sortition pool and if the result\\n /// gets challenged, the submitter will get slashed.\\n function submitResult(Data storage self, Result calldata result) internal {\\n require(\\n currentState(self) == State.AWAITING_RESULT,\\n \\\"Current state is not AWAITING_RESULT\\\"\\n );\\n require(!hasDkgTimedOut(self), \\\"DKG timeout already passed\\\");\\n\\n SortitionPool sortitionPool = self.sortitionPool;\\n\\n // Submitter must be an operator in the sortition pool.\\n // Declared submitter's member index in the DKG result needs to match\\n // the address calling this function.\\n require(\\n sortitionPool.isOperatorInPool(msg.sender),\\n \\\"Submitter not in the sortition pool\\\"\\n );\\n require(\\n sortitionPool.getIDOperator(\\n result.members[result.submitterMemberIndex - 1]\\n ) == msg.sender,\\n \\\"Unexpected submitter index\\\"\\n );\\n\\n self.submittedResultHash = keccak256(abi.encode(result));\\n self.submittedResultBlock = block.number;\\n\\n emit DkgResultSubmitted(self.submittedResultHash, self.seed, result);\\n }\\n\\n /// @notice Checks if awaiting seed timed out.\\n /// @return True if awaiting seed timed out, false otherwise.\\n function hasSeedTimedOut(Data storage self) internal view returns (bool) {\\n return\\n currentState(self) == State.AWAITING_SEED &&\\n block.number > (self.stateLockBlock + self.parameters.seedTimeout);\\n }\\n\\n /// @notice Checks if DKG timed out. The DKG timeout period includes time required\\n /// for off-chain protocol execution and time for the result publication.\\n /// After this time a result cannot be submitted and DKG can be notified\\n /// about the timeout. DKG period is adjusted by result submission\\n /// offset that include blocks that were mined while invalid result\\n /// has been registered until it got challenged.\\n /// @return True if DKG timed out, false otherwise.\\n function hasDkgTimedOut(Data storage self) internal view returns (bool) {\\n return\\n currentState(self) == State.AWAITING_RESULT &&\\n block.number >\\n (self.startBlock +\\n self.resultSubmissionStartBlockOffset +\\n self.parameters.resultSubmissionTimeout);\\n }\\n\\n /// @notice Notifies about the seed was not delivered and restores the\\n /// initial DKG state (IDLE).\\n function notifySeedTimeout(Data storage self) internal {\\n require(hasSeedTimedOut(self), \\\"Awaiting seed has not timed out\\\");\\n\\n emit DkgSeedTimedOut();\\n\\n complete(self);\\n }\\n\\n /// @notice Notifies about DKG timeout.\\n function notifyDkgTimeout(Data storage self) internal {\\n require(hasDkgTimedOut(self), \\\"DKG has not timed out\\\");\\n\\n emit DkgTimedOut();\\n\\n complete(self);\\n }\\n\\n /// @notice Approves DKG result. Can be called when the challenge period for\\n /// the submitted result is finished. Considers the submitted result\\n /// as valid. For the first `submitterPrecedencePeriodLength`\\n /// blocks after the end of the challenge period can be called only\\n /// by the DKG result submitter. After that time, can be called by\\n /// anyone.\\n /// @dev Can be called after a challenge period for the submitted result.\\n /// @param result Result to approve. Must match the submitted result stored\\n /// during `submitResult`.\\n /// @return misbehavedMembers Identifiers of members who misbehaved during DKG.\\n function approveResult(Data storage self, Result calldata result)\\n internal\\n returns (uint32[] memory misbehavedMembers)\\n {\\n require(\\n currentState(self) == State.CHALLENGE,\\n \\\"Current state is not CHALLENGE\\\"\\n );\\n\\n uint256 challengePeriodEnd = self.submittedResultBlock +\\n self.parameters.resultChallengePeriodLength;\\n\\n require(\\n block.number > challengePeriodEnd,\\n \\\"Challenge period has not passed yet\\\"\\n );\\n\\n require(\\n keccak256(abi.encode(result)) == self.submittedResultHash,\\n \\\"Result under approval is different than the submitted one\\\"\\n );\\n\\n // Extract submitter member address. Submitter member index is in\\n // range [1, groupSize] so we need to -1 when fetching identifier from members\\n // array.\\n address submitterMember = self.sortitionPool.getIDOperator(\\n result.members[result.submitterMemberIndex - 1]\\n );\\n\\n require(\\n msg.sender == submitterMember ||\\n block.number >\\n challengePeriodEnd +\\n self.parameters.submitterPrecedencePeriodLength,\\n \\\"Only the DKG result submitter can approve the result at this moment\\\"\\n );\\n\\n // Extract misbehaved members identifiers. Misbehaved members indices\\n // are in range [1, groupSize], so we need to -1 when fetching identifiers from\\n // members array.\\n misbehavedMembers = new uint32[](\\n result.misbehavedMembersIndices.length\\n );\\n for (uint256 i = 0; i < result.misbehavedMembersIndices.length; i++) {\\n misbehavedMembers[i] = result.members[\\n result.misbehavedMembersIndices[i] - 1\\n ];\\n }\\n\\n emit DkgResultApproved(self.submittedResultHash, msg.sender);\\n\\n return misbehavedMembers;\\n }\\n\\n /// @notice Challenges DKG result. If the submitted result is proved to be\\n /// invalid it reverts the DKG back to the result submission phase.\\n /// @dev Can be called during a challenge period for the submitted result.\\n /// @param result Result to challenge. Must match the submitted result\\n /// stored during `submitResult`.\\n /// @return maliciousResultHash Hash of the malicious result.\\n /// @return maliciousSubmitter Identifier of the malicious submitter.\\n function challengeResult(Data storage self, Result calldata result)\\n internal\\n returns (bytes32 maliciousResultHash, uint32 maliciousSubmitter)\\n {\\n require(\\n currentState(self) == State.CHALLENGE,\\n \\\"Current state is not CHALLENGE\\\"\\n );\\n\\n require(\\n block.number <=\\n self.submittedResultBlock +\\n self.parameters.resultChallengePeriodLength,\\n \\\"Challenge period has already passed\\\"\\n );\\n\\n require(\\n keccak256(abi.encode(result)) == self.submittedResultHash,\\n \\\"Result under challenge is different than the submitted one\\\"\\n );\\n\\n // https://github.com/crytic/slither/issues/982\\n // slither-disable-next-line unused-return\\n try\\n self.dkgValidator.validate(result, self.seed, self.startBlock)\\n returns (\\n // slither-disable-next-line uninitialized-local,variable-scope\\n bool isValid,\\n // slither-disable-next-line uninitialized-local,variable-scope\\n string memory errorMsg\\n ) {\\n if (isValid) {\\n revert(\\\"unjustified challenge\\\");\\n }\\n\\n emit DkgResultChallenged(\\n self.submittedResultHash,\\n msg.sender,\\n errorMsg\\n );\\n } catch {\\n // if the validation reverted we consider the DKG result as invalid\\n emit DkgResultChallenged(\\n self.submittedResultHash,\\n msg.sender,\\n \\\"validation reverted\\\"\\n );\\n }\\n\\n // Consider result hash as malicious.\\n maliciousResultHash = self.submittedResultHash;\\n maliciousSubmitter = result.members[result.submitterMemberIndex - 1];\\n\\n // Adjust DKG result submission block start, so submission stage starts\\n // from the beginning.\\n self.resultSubmissionStartBlockOffset = block.number - self.startBlock;\\n\\n submittedResultCleanup(self);\\n\\n return (maliciousResultHash, maliciousSubmitter);\\n }\\n\\n /// @notice Due to EIP150, 1/64 of the gas is not forwarded to the call, and\\n /// will be kept to execute the remaining operations in the function\\n /// after the call inside the try-catch.\\n ///\\n /// To ensure there is no way for the caller to manipulate gas limit\\n /// in such a way that the call inside try-catch fails with out-of-gas\\n /// and the rest of the function is executed with the remaining\\n /// 1/64 of gas, we require an extra gas amount to be left at the\\n /// end of the call to the function challenging DKG result and\\n /// wrapping the call to EcdsaDkgValidator and TokenStaking\\n /// contracts inside a try-catch.\\n function requireChallengeExtraGas(Data storage self) internal view {\\n require(\\n gasleft() >= self.parameters.resultChallengeExtraGas,\\n \\\"Not enough extra gas left\\\"\\n );\\n }\\n\\n /// @notice Checks if DKG result is valid for the current DKG.\\n /// @param result DKG result.\\n /// @return True if the result is valid. If the result is invalid it returns\\n /// false and an error message.\\n function isResultValid(Data storage self, Result calldata result)\\n internal\\n view\\n returns (bool, string memory)\\n {\\n require(self.startBlock > 0, \\\"DKG has not been started\\\");\\n\\n return self.dkgValidator.validate(result, self.seed, self.startBlock);\\n }\\n\\n /// @notice Set setSeedTimeout parameter.\\n function setSeedTimeout(Data storage self, uint256 newSeedTimeout)\\n internal\\n {\\n require(currentState(self) == State.IDLE, \\\"Current state is not IDLE\\\");\\n\\n require(newSeedTimeout > 0, \\\"New value should be greater than zero\\\");\\n\\n self.parameters.seedTimeout = newSeedTimeout;\\n }\\n\\n /// @notice Set resultChallengePeriodLength parameter.\\n function setResultChallengePeriodLength(\\n Data storage self,\\n uint256 newResultChallengePeriodLength\\n ) internal {\\n require(currentState(self) == State.IDLE, \\\"Current state is not IDLE\\\");\\n\\n require(\\n newResultChallengePeriodLength > 0,\\n \\\"New value should be greater than zero\\\"\\n );\\n\\n self\\n .parameters\\n .resultChallengePeriodLength = newResultChallengePeriodLength;\\n }\\n\\n /// @notice Set resultChallengeExtraGas parameter.\\n function setResultChallengeExtraGas(\\n Data storage self,\\n uint256 newResultChallengeExtraGas\\n ) internal {\\n require(currentState(self) == State.IDLE, \\\"Current state is not IDLE\\\");\\n\\n self.parameters.resultChallengeExtraGas = newResultChallengeExtraGas;\\n }\\n\\n /// @notice Set resultSubmissionTimeout parameter.\\n function setResultSubmissionTimeout(\\n Data storage self,\\n uint256 newResultSubmissionTimeout\\n ) internal {\\n require(currentState(self) == State.IDLE, \\\"Current state is not IDLE\\\");\\n\\n require(\\n newResultSubmissionTimeout > 0,\\n \\\"New value should be greater than zero\\\"\\n );\\n\\n self.parameters.resultSubmissionTimeout = newResultSubmissionTimeout;\\n }\\n\\n /// @notice Set submitterPrecedencePeriodLength parameter.\\n function setSubmitterPrecedencePeriodLength(\\n Data storage self,\\n uint256 newSubmitterPrecedencePeriodLength\\n ) internal {\\n require(currentState(self) == State.IDLE, \\\"Current state is not IDLE\\\");\\n\\n require(\\n newSubmitterPrecedencePeriodLength <\\n self.parameters.resultSubmissionTimeout,\\n \\\"New value should be less than result submission period length\\\"\\n );\\n\\n self\\n .parameters\\n .submitterPrecedencePeriodLength = newSubmitterPrecedencePeriodLength;\\n }\\n\\n /// @notice Completes DKG by cleaning up state.\\n /// @dev Should be called after DKG times out or a result is approved.\\n function complete(Data storage self) internal {\\n delete self.startBlock;\\n delete self.seed;\\n delete self.resultSubmissionStartBlockOffset;\\n submittedResultCleanup(self);\\n self.sortitionPool.unlock();\\n }\\n\\n /// @notice Cleans up submitted result state either after DKG completion\\n /// (as part of `complete` method) or after justified challenge.\\n function submittedResultCleanup(Data storage self) private {\\n delete self.submittedResultHash;\\n delete self.submittedResultBlock;\\n }\\n}\\n\",\"keccak256\":\"0xd6c442e1db2dc95730443fb6496d47889a69bed2fbace466b27f9727484c25ec\",\"license\":\"GPL-3.0-only\"},\"@keep-network/random-beacon/contracts/libraries/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-only\\n//\\n// \\u2593\\u2593\\u258c \\u2593\\u2593 \\u2590\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2584\\u2584 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584\\u2584\\u2584\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2580\\u2580 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\u2580\\u2580\\u2580 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2580\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2580\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2584 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u258c\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2588\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n// \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2590\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593 \\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\u2593\\n//\\n//\\n\\npragma solidity 0.8.17;\\n\\n/*\\nVersion pulled from keep-core v1:\\nhttps://github.com/keep-network/keep-core/blob/f297202db00c027978ad8e7103a356503de5773c/solidity-v1/contracts/utils/BytesLib.sol\\n\\nTo compile it with solidity 0.8 `_preBytes_slot` was replaced with `_preBytes.slot`.\\n*/\\n\\n/*\\nhttps://github.com/GNSPS/solidity-bytes-utils/\\nThis is free and unencumbered software released into the public domain.\\nAnyone is free to copy, modify, publish, use, compile, sell, or\\ndistribute this software, either in source code form or as a compiled\\nbinary, for any purpose, commercial or non-commercial, and by any\\nmeans.\\nIn jurisdictions that recognize copyright laws, the author or authors\\nof this software dedicate any and all copyright interest in the\\nsoftware to the public domain. We make this dedication for the benefit\\nof the public at large and to the detriment of our heirs and\\nsuccessors. We intend this dedication to be an overt act of\\nrelinquishment in perpetuity of all present and future rights to this\\nsoftware under copyright law.\\nTHE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND,\\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\\nOTHER DEALINGS IN THE SOFTWARE.\\nFor more information, please refer to <https://unlicense.org>\\n*/\\n\\n/** @title BytesLib **/\\n/** @author https://github.com/GNSPS **/\\n\\nlibrary BytesLib {\\n function concatStorage(bytes storage _preBytes, bytes memory _postBytes)\\n internal\\n {\\n assembly {\\n // Read the first 32 bytes of _preBytes storage, which is the length\\n // of the array. (We don't need to use the offset into the slot\\n // because arrays use the entire slot.)\\n let fslot := sload(_preBytes.slot)\\n // Arrays of 31 bytes or less have an even value in their slot,\\n // while longer arrays have an odd value. The actual length is\\n // the slot divided by two for odd values, and the lowest order\\n // byte divided by two for even values.\\n // If the slot is even, bitwise and the slot with 255 and divide by\\n // two to get the length. If the slot is odd, bitwise and the slot\\n // with -1 and divide by two.\\n let slength := div(\\n and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)),\\n 2\\n )\\n let mlength := mload(_postBytes)\\n let newlength := add(slength, mlength)\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n switch add(lt(slength, 32), lt(newlength, 32))\\n case 2 {\\n // Since the new array still fits in the slot, we just need to\\n // update the contents of the slot.\\n // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length\\n sstore(\\n _preBytes.slot,\\n // all the modifications to the slot are inside this\\n // next block\\n add(\\n // we can just add to the slot contents because the\\n // bytes we want to change are the LSBs\\n fslot,\\n add(\\n mul(\\n div(\\n // load the bytes from memory\\n mload(add(_postBytes, 0x20)),\\n // zero all bytes to the right\\n exp(0x100, sub(32, mlength))\\n ),\\n // and now shift left the number of bytes to\\n // leave space for the length in the slot\\n exp(0x100, sub(32, newlength))\\n ),\\n // increase length by the double of the memory\\n // bytes length\\n mul(mlength, 2)\\n )\\n )\\n )\\n }\\n case 1 {\\n // The stored value fits in the slot, but the combined value\\n // will exceed it.\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // The contents of the _postBytes array start 32 bytes into\\n // the structure. Our first read should obtain the `submod`\\n // bytes that can fit into the unused space in the last word\\n // of the stored array. To get this, we read 32 bytes starting\\n // from `submod`, so the data we read overlaps with the array\\n // contents by `submod` bytes. Masking the lowest-order\\n // `submod` bytes allows us to add that value directly to the\\n // stored value.\\n\\n let submod := sub(32, slength)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(\\n sc,\\n add(\\n and(\\n fslot,\\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00\\n ),\\n and(mload(mc), mask)\\n )\\n )\\n\\n for {\\n mc := add(mc, 0x20)\\n sc := add(sc, 1)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n default {\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n // Start copying to the last used word of the stored array.\\n let sc := add(keccak256(0x0, 0x20), div(slength, 32))\\n\\n // save new length\\n sstore(_preBytes.slot, add(mul(newlength, 2), 1))\\n\\n // Copy over the first `submod` bytes of the new data as in\\n // case 1 above.\\n let slengthmod := mod(slength, 32)\\n let submod := sub(32, slengthmod)\\n let mc := add(_postBytes, submod)\\n let end := add(_postBytes, mlength)\\n let mask := sub(exp(0x100, submod), 1)\\n\\n sstore(sc, add(sload(sc), and(mload(mc), mask)))\\n\\n for {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } lt(mc, end) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n sstore(sc, mload(mc))\\n }\\n\\n mask := exp(0x100, sub(mc, end))\\n\\n sstore(sc, mul(div(mload(mc), mask), mask))\\n }\\n }\\n }\\n\\n function equalStorage(bytes storage _preBytes, bytes memory _postBytes)\\n internal\\n view\\n returns (bool)\\n {\\n bool success = true;\\n\\n assembly {\\n // we know _preBytes_offset is 0\\n let fslot := sload(_preBytes.slot)\\n // Decode the length of the stored array like in concatStorage().\\n let slength := div(\\n and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)),\\n 2\\n )\\n let mlength := mload(_postBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(slength, mlength)\\n case 1 {\\n // slength can contain both the length and contents of the array\\n // if length < 32 bytes so let's prepare for that\\n // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage\\n if iszero(iszero(slength)) {\\n switch lt(slength, 32)\\n case 1 {\\n // blank the last byte which is the length\\n fslot := mul(div(fslot, 0x100), 0x100)\\n\\n if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {\\n // unsuccess:\\n success := 0\\n }\\n }\\n default {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n // get the keccak hash to get the contents of the array\\n mstore(0x0, _preBytes.slot)\\n let sc := keccak256(0x0, 0x20)\\n\\n let mc := add(_postBytes, 0x20)\\n let end := add(mc, mlength)\\n\\n // the next line is the loop condition:\\n // while(uint(mc < end) + cb == 2)\\n for {\\n\\n } eq(add(lt(mc, end), cb), 2) {\\n sc := add(sc, 1)\\n mc := add(mc, 0x20)\\n } {\\n if iszero(eq(sload(sc), mload(mc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function concat(bytes memory _preBytes, bytes memory _postBytes)\\n internal\\n pure\\n returns (bytes memory)\\n {\\n bytes memory tempBytes;\\n\\n assembly {\\n // Get a location of some free memory and store it in tempBytes as\\n // Solidity does for memory variables.\\n tempBytes := mload(0x40)\\n\\n // Store the length of the first bytes array at the beginning of\\n // the memory for tempBytes.\\n let length := mload(_preBytes)\\n mstore(tempBytes, length)\\n\\n // Maintain a memory counter for the current write location in the\\n // temp bytes array by adding the 32 bytes for the array length to\\n // the starting location.\\n let mc := add(tempBytes, 0x20)\\n // Stop copying when the memory counter reaches the length of the\\n // first bytes array.\\n let end := add(mc, length)\\n\\n for {\\n // Initialize a copy counter to the start of the _preBytes data,\\n // 32 bytes into its memory.\\n let cc := add(_preBytes, 0x20)\\n } lt(mc, end) {\\n // Increase both counters by 32 bytes each iteration.\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // Write the _preBytes data into the tempBytes memory 32 bytes\\n // at a time.\\n mstore(mc, mload(cc))\\n }\\n\\n // Add the length of _postBytes to the current length of tempBytes\\n // and store it as the new length in the first 32 bytes of the\\n // tempBytes memory.\\n length := mload(_postBytes)\\n mstore(tempBytes, add(length, mload(tempBytes)))\\n\\n // Move the memory counter back from a multiple of 0x20 to the\\n // actual end of the _preBytes data.\\n mc := end\\n // Stop copying when the memory counter reaches the new combined\\n // length of the arrays.\\n end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n } lt(mc, end) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n mstore(mc, mload(cc))\\n }\\n\\n // Update the free-memory pointer by padding our last write location\\n // to 32 bytes: add 31 bytes to the end of tempBytes to move to the\\n // next 32 byte block, then round down to the nearest multiple of\\n // 32. If the sum of the length of the two arrays is zero then add\\n // one before rounding down to leave a blank 32 bytes (the length block with 0).\\n mstore(\\n 0x40,\\n and(\\n add(add(end, iszero(add(length, mload(_preBytes)))), 31),\\n not(31) // Round down to the nearest 32 bytes.\\n )\\n )\\n }\\n\\n return tempBytes;\\n }\\n\\n function slice(\\n bytes memory _bytes,\\n uint256 _start,\\n uint256 _length\\n ) internal pure returns (bytes memory res) {\\n uint256 _end = _start + _length;\\n require(_end > _start && _bytes.length >= _end, \\\"Slice out of bounds\\\");\\n\\n assembly {\\n // Alloc bytes array with additional 32 bytes afterspace and assign it's size\\n res := mload(0x40)\\n mstore(0x40, add(add(res, 64), _length))\\n mstore(res, _length)\\n\\n // Compute distance between source and destination pointers\\n let diff := sub(res, add(_bytes, _start))\\n\\n for {\\n let src := add(add(_bytes, 32), _start)\\n let end := add(src, _length)\\n } lt(src, end) {\\n src := add(src, 32)\\n } {\\n mstore(add(src, diff), mload(src))\\n }\\n }\\n }\\n\\n function toAddress(bytes memory _bytes, uint256 _start)\\n internal\\n pure\\n returns (address)\\n {\\n uint256 _totalLen = _start + 20;\\n require(\\n _totalLen > _start && _bytes.length >= _totalLen,\\n \\\"Address conversion out of bounds.\\\"\\n );\\n address tempAddress;\\n\\n assembly {\\n tempAddress := div(\\n mload(add(add(_bytes, 0x20), _start)),\\n 0x1000000000000000000000000\\n )\\n }\\n\\n return tempAddress;\\n }\\n\\n function toUint8(bytes memory _bytes, uint256 _start)\\n internal\\n pure\\n returns (uint8)\\n {\\n require(\\n _bytes.length >= (_start + 1),\\n \\\"Uint8 conversion out of bounds.\\\"\\n );\\n uint8 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x1), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function toUint(bytes memory _bytes, uint256 _start)\\n internal\\n pure\\n returns (uint256)\\n {\\n uint256 _totalLen = _start + 32;\\n require(\\n _totalLen > _start && _bytes.length >= _totalLen,\\n \\\"Uint conversion out of bounds.\\\"\\n );\\n uint256 tempUint;\\n\\n assembly {\\n tempUint := mload(add(add(_bytes, 0x20), _start))\\n }\\n\\n return tempUint;\\n }\\n\\n function equal(bytes memory _preBytes, bytes memory _postBytes)\\n internal\\n pure\\n returns (bool)\\n {\\n bool success = true;\\n\\n assembly {\\n let length := mload(_preBytes)\\n\\n // if lengths don't match the arrays are not equal\\n switch eq(length, mload(_postBytes))\\n case 1 {\\n // cb is a circuit breaker in the for loop since there's\\n // no said feature for inline assembly loops\\n // cb = 1 - don't breaker\\n // cb = 0 - break\\n let cb := 1\\n\\n let mc := add(_preBytes, 0x20)\\n let end := add(mc, length)\\n\\n for {\\n let cc := add(_postBytes, 0x20)\\n // the next line is the loop condition:\\n // while(uint(mc < end) + cb == 2)\\n } eq(add(lt(mc, end), cb), 2) {\\n mc := add(mc, 0x20)\\n cc := add(cc, 0x20)\\n } {\\n // if any of these checks fails then arrays are not equal\\n if iszero(eq(mload(mc), mload(cc))) {\\n // unsuccess:\\n success := 0\\n cb := 0\\n }\\n }\\n }\\n default {\\n // unsuccess:\\n success := 0\\n }\\n }\\n\\n return success;\\n }\\n\\n function toBytes32(bytes memory _source)\\n internal\\n pure\\n returns (bytes32 result)\\n {\\n if (_source.length == 0) {\\n return 0x0;\\n }\\n\\n assembly {\\n result := mload(add(_source, 32))\\n }\\n }\\n\\n function keccak256Slice(\\n bytes memory _bytes,\\n uint256 _start,\\n uint256 _length\\n ) internal pure returns (bytes32 result) {\\n uint256 _end = _start + _length;\\n require(_end > _start && _bytes.length >= _end, \\\"Slice out of bounds\\\");\\n\\n assembly {\\n result := keccak256(add(add(_bytes, 32), _start), _length)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3b76e2fe36eb777440250dcf2ea7a689375e8af22f3cc33521095ff6954becdb\",\"license\":\"GPL-3.0-only\"},\"@keep-network/sortition-pools/contracts/Branch.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\nimport \\\"./Constants.sol\\\";\\n\\n/// @notice The implicit 8-ary trees of the sortition pool\\n/// rely on packing 8 \\\"slots\\\" of 32-bit values into each uint256.\\n/// The Branch library permits efficient calculations on these slots.\\nlibrary Branch {\\n /// @notice Calculate the right shift required\\n /// to make the 32 least significant bits of an uint256\\n /// be the bits of the `position`th slot\\n /// when treating the uint256 as a uint32[8].\\n ///\\n /// @dev Not used for efficiency reasons,\\n /// but left to illustrate the meaning of a common pattern.\\n /// I wish solidity had macros, even C macros.\\n function slotShift(uint256 position) internal pure returns (uint256) {\\n unchecked {\\n return position * Constants.SLOT_WIDTH;\\n }\\n }\\n\\n /// @notice Return the `position`th slot of the `node`,\\n /// treating `node` as a uint32[32].\\n function getSlot(uint256 node, uint256 position)\\n internal\\n pure\\n returns (uint256)\\n {\\n unchecked {\\n uint256 shiftBits = position * Constants.SLOT_WIDTH;\\n // Doing a bitwise AND with `SLOT_MAX`\\n // clears all but the 32 least significant bits.\\n // Because of the right shift by `slotShift(position)` bits,\\n // those 32 bits contain the 32 bits in the `position`th slot of `node`.\\n return (node >> shiftBits) & Constants.SLOT_MAX;\\n }\\n }\\n\\n /// @notice Return `node` with the `position`th slot set to zero.\\n function clearSlot(uint256 node, uint256 position)\\n internal\\n pure\\n returns (uint256)\\n {\\n unchecked {\\n uint256 shiftBits = position * Constants.SLOT_WIDTH;\\n // Shifting `SLOT_MAX` left by `slotShift(position)` bits\\n // gives us a number where all bits of the `position`th slot are set,\\n // and all other bits are unset.\\n //\\n // Using a bitwise NOT on this number,\\n // we get a uint256 where all bits are set\\n // except for those of the `position`th slot.\\n //\\n // Bitwise ANDing the original `node` with this number\\n // sets the bits of `position`th slot to zero,\\n // leaving all other bits unchanged.\\n return node & ~(Constants.SLOT_MAX << shiftBits);\\n }\\n }\\n\\n /// @notice Return `node` with the `position`th slot set to `weight`.\\n ///\\n /// @param weight The weight of of the node.\\n /// Safely truncated to a 32-bit number,\\n /// but this should never be called with an overflowing weight regardless.\\n function setSlot(\\n uint256 node,\\n uint256 position,\\n uint256 weight\\n ) internal pure returns (uint256) {\\n unchecked {\\n uint256 shiftBits = position * Constants.SLOT_WIDTH;\\n // Clear the `position`th slot like in `clearSlot()`.\\n uint256 clearedNode = node & ~(Constants.SLOT_MAX << shiftBits);\\n // Bitwise AND `weight` with `SLOT_MAX`\\n // to clear all but the 32 least significant bits.\\n //\\n // Shift this left by `slotShift(position)` bits\\n // to obtain a uint256 with all bits unset\\n // except in the `position`th slot\\n // which contains the 32-bit value of `weight`.\\n uint256 shiftedWeight = (weight & Constants.SLOT_MAX) << shiftBits;\\n // When we bitwise OR these together,\\n // all other slots except the `position`th one come from the left argument,\\n // and the `position`th gets filled with `weight` from the right argument.\\n return clearedNode | shiftedWeight;\\n }\\n }\\n\\n /// @notice Calculate the summed weight of all slots in the `node`.\\n function sumWeight(uint256 node) internal pure returns (uint256 sum) {\\n unchecked {\\n sum = node & Constants.SLOT_MAX;\\n // Iterate through each slot\\n // by shifting `node` right in increments of 32 bits,\\n // and adding the 32 least significant bits to the `sum`.\\n uint256 newNode = node >> Constants.SLOT_WIDTH;\\n while (newNode > 0) {\\n sum += (newNode & Constants.SLOT_MAX);\\n newNode = newNode >> Constants.SLOT_WIDTH;\\n }\\n return sum;\\n }\\n }\\n\\n /// @notice Pick a slot in `node` that corresponds to `index`.\\n /// Treats the node like an array of virtual stakers,\\n /// the number of virtual stakers in each slot corresponding to its weight,\\n /// and picks which slot contains the `index`th virtual staker.\\n ///\\n /// @dev Requires that `index` be lower than `sumWeight(node)`.\\n /// However, this is not enforced for performance reasons.\\n /// If `index` exceeds the permitted range,\\n /// `pickWeightedSlot()` returns the rightmost slot\\n /// and an excessively high `newIndex`.\\n ///\\n /// @return slot The slot of `node` containing the `index`th virtual staker.\\n ///\\n /// @return newIndex The index of the `index`th virtual staker of `node`\\n /// within the returned slot.\\n function pickWeightedSlot(uint256 node, uint256 index)\\n internal\\n pure\\n returns (uint256 slot, uint256 newIndex)\\n {\\n unchecked {\\n newIndex = index;\\n uint256 newNode = node;\\n uint256 currentSlotWeight = newNode & Constants.SLOT_MAX;\\n while (newIndex >= currentSlotWeight) {\\n newIndex -= currentSlotWeight;\\n slot++;\\n newNode = newNode >> Constants.SLOT_WIDTH;\\n currentSlotWeight = newNode & Constants.SLOT_MAX;\\n }\\n return (slot, newIndex);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa7fb1c9c9789f30493e9a40e24a24f46875dc5e7630b4f67478167759f6d1882\"},\"@keep-network/sortition-pools/contracts/Chaosnet.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\n/// @title Chaosnet\\n/// @notice This is a beta staker program for stakers willing to go the extra\\n/// mile with monitoring, share their logs with the dev team, and allow to more\\n/// carefully monitor the bootstrapping network. As the network matures, the\\n/// beta program will be ended.\\ncontract Chaosnet {\\n /// @notice Indicates if the chaosnet is active. The chaosnet is active\\n /// after the contract deployment and can be ended with a call to\\n /// `deactivateChaosnet()`. Once deactivated chaosnet can not be activated\\n /// again.\\n bool public isChaosnetActive;\\n\\n /// @notice Indicates if the given operator is a beta operator for chaosnet.\\n mapping(address => bool) public isBetaOperator;\\n\\n /// @notice Address controlling chaosnet status and beta operator addresses.\\n address public chaosnetOwner;\\n\\n event BetaOperatorsAdded(address[] operators);\\n\\n event ChaosnetOwnerRoleTransferred(\\n address oldChaosnetOwner,\\n address newChaosnetOwner\\n );\\n\\n event ChaosnetDeactivated();\\n\\n constructor() {\\n _transferChaosnetOwner(msg.sender);\\n isChaosnetActive = true;\\n }\\n\\n modifier onlyChaosnetOwner() {\\n require(msg.sender == chaosnetOwner, \\\"Not the chaosnet owner\\\");\\n _;\\n }\\n\\n modifier onlyOnChaosnet() {\\n require(isChaosnetActive, \\\"Chaosnet is not active\\\");\\n _;\\n }\\n\\n /// @notice Adds beta operator to chaosnet. Can be called only by the\\n /// chaosnet owner when the chaosnet is active. Once the operator is added\\n /// as a beta operator, it can not be removed.\\n function addBetaOperators(address[] calldata operators)\\n public\\n onlyOnChaosnet\\n onlyChaosnetOwner\\n {\\n for (uint256 i = 0; i < operators.length; i++) {\\n isBetaOperator[operators[i]] = true;\\n }\\n\\n emit BetaOperatorsAdded(operators);\\n }\\n\\n /// @notice Deactivates the chaosnet. Can be called only by the chaosnet\\n /// owner. Once deactivated chaosnet can not be activated again.\\n function deactivateChaosnet() public onlyOnChaosnet onlyChaosnetOwner {\\n isChaosnetActive = false;\\n emit ChaosnetDeactivated();\\n }\\n\\n /// @notice Transfers the chaosnet owner role to another non-zero address.\\n function transferChaosnetOwnerRole(address newChaosnetOwner)\\n public\\n onlyChaosnetOwner\\n {\\n require(\\n newChaosnetOwner != address(0),\\n \\\"New chaosnet owner must not be zero address\\\"\\n );\\n _transferChaosnetOwner(newChaosnetOwner);\\n }\\n\\n function _transferChaosnetOwner(address newChaosnetOwner) internal {\\n address oldChaosnetOwner = chaosnetOwner;\\n chaosnetOwner = newChaosnetOwner;\\n emit ChaosnetOwnerRoleTransferred(oldChaosnetOwner, newChaosnetOwner);\\n }\\n}\\n\",\"keccak256\":\"0xeaf7bdd5626f88c329793a012621039692ce1b6e1f13013997ddb13d7e3032df\"},\"@keep-network/sortition-pools/contracts/Constants.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\nlibrary Constants {\\n ////////////////////////////////////////////////////////////////////////////\\n // Parameters for configuration\\n\\n // How many bits a position uses per level of the tree;\\n // each branch of the tree contains 2**SLOT_BITS slots.\\n uint256 constant SLOT_BITS = 3;\\n uint256 constant LEVELS = 7;\\n ////////////////////////////////////////////////////////////////////////////\\n\\n ////////////////////////////////////////////////////////////////////////////\\n // Derived constants, do not touch\\n uint256 constant SLOT_COUNT = 2**SLOT_BITS;\\n uint256 constant SLOT_WIDTH = 256 / SLOT_COUNT;\\n uint256 constant LAST_SLOT = SLOT_COUNT - 1;\\n uint256 constant SLOT_MAX = (2**SLOT_WIDTH) - 1;\\n uint256 constant POOL_CAPACITY = SLOT_COUNT**LEVELS;\\n\\n uint256 constant ID_WIDTH = SLOT_WIDTH;\\n uint256 constant ID_MAX = SLOT_MAX;\\n\\n uint256 constant BLOCKHEIGHT_WIDTH = 96 - ID_WIDTH;\\n uint256 constant BLOCKHEIGHT_MAX = (2**BLOCKHEIGHT_WIDTH) - 1;\\n\\n uint256 constant SLOT_POINTER_MAX = (2**SLOT_BITS) - 1;\\n uint256 constant LEAF_FLAG = 1 << 255;\\n\\n uint256 constant WEIGHT_WIDTH = 256 / SLOT_COUNT;\\n ////////////////////////////////////////////////////////////////////////////\\n}\\n\",\"keccak256\":\"0xaef690ced707935745ff1482b7bb9bd9eb77bf6a39c717465e64cf12db8a7d39\"},\"@keep-network/sortition-pools/contracts/Leaf.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\nimport \\\"./Constants.sol\\\";\\n\\nlibrary Leaf {\\n function make(\\n address _operator,\\n uint256 _creationBlock,\\n uint256 _id\\n ) internal pure returns (uint256) {\\n assert(_creationBlock <= type(uint64).max);\\n assert(_id <= type(uint32).max);\\n // Converting a bytesX type into a larger type\\n // adds zero bytes on the right.\\n uint256 op = uint256(bytes32(bytes20(_operator)));\\n // Bitwise AND the id to erase\\n // all but the 32 least significant bits\\n uint256 uid = _id & Constants.ID_MAX;\\n // Erase all but the 64 least significant bits,\\n // then shift left by 32 bits to make room for the id\\n uint256 cb = (_creationBlock & Constants.BLOCKHEIGHT_MAX) <<\\n Constants.ID_WIDTH;\\n // Bitwise OR them all together to get\\n // [address operator || uint64 creationBlock || uint32 id]\\n return (op | cb | uid);\\n }\\n\\n function operator(uint256 leaf) internal pure returns (address) {\\n // Converting a bytesX type into a smaller type\\n // truncates it on the right.\\n return address(bytes20(bytes32(leaf)));\\n }\\n\\n /// @notice Return the block number the leaf was created in.\\n function creationBlock(uint256 leaf) internal pure returns (uint256) {\\n return ((leaf >> Constants.ID_WIDTH) & Constants.BLOCKHEIGHT_MAX);\\n }\\n\\n function id(uint256 leaf) internal pure returns (uint32) {\\n // Id is stored in the 32 least significant bits.\\n // Bitwise AND ensures that we only get the contents of those bits.\\n return uint32(leaf & Constants.ID_MAX);\\n }\\n}\\n\",\"keccak256\":\"0xbd107a1a43e48884885e5e966ffcbcd8fa5e89863715d717bb4006e9f89cdc2b\"},\"@keep-network/sortition-pools/contracts/Position.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\nimport \\\"./Constants.sol\\\";\\n\\nlibrary Position {\\n // Return the last 3 bits of a position number,\\n // corresponding to its slot in its parent\\n function slot(uint256 a) internal pure returns (uint256) {\\n return a & Constants.SLOT_POINTER_MAX;\\n }\\n\\n // Return the parent of a position number\\n function parent(uint256 a) internal pure returns (uint256) {\\n return a >> Constants.SLOT_BITS;\\n }\\n\\n // Return the location of the child of a at the given slot\\n function child(uint256 a, uint256 s) internal pure returns (uint256) {\\n return (a << Constants.SLOT_BITS) | (s & Constants.SLOT_POINTER_MAX); // slot(s)\\n }\\n\\n // Return the uint p as a flagged position uint:\\n // the least significant 21 bits contain the position\\n // and the 22nd bit is set as a flag\\n // to distinguish the position 0x000000 from an empty field.\\n function setFlag(uint256 p) internal pure returns (uint256) {\\n return p | Constants.LEAF_FLAG;\\n }\\n\\n // Turn a flagged position into an unflagged position\\n // by removing the flag at the 22nd least significant bit.\\n //\\n // We shouldn't _actually_ need this\\n // as all position-manipulating code should ignore non-position bits anyway\\n // but it's cheap to call so might as well do it.\\n function unsetFlag(uint256 p) internal pure returns (uint256) {\\n return p & (~Constants.LEAF_FLAG);\\n }\\n}\\n\",\"keccak256\":\"0xd3a927908080ac21353a92a6bce3d69e94a5c30f6b51f16b271b6cc679f110e2\"},\"@keep-network/sortition-pools/contracts/RNG.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\nimport \\\"./Leaf.sol\\\";\\nimport \\\"./Constants.sol\\\";\\n\\nlibrary RNG {\\n /// @notice Get an index in the range `[0 .. range-1]`\\n /// and the new state of the RNG,\\n /// using the provided `state` of the RNG.\\n ///\\n /// @param range The upper bound of the index, exclusive.\\n ///\\n /// @param state The previous state of the RNG.\\n /// The initial state needs to be obtained\\n /// from a trusted randomness oracle (the random beacon),\\n /// or from a chain of earlier calls to `RNG.getIndex()`\\n /// on an originally trusted seed.\\n ///\\n /// @dev Calculates the number of bits required for the desired range,\\n /// takes the least significant bits of `state`\\n /// and checks if the obtained index is within the desired range.\\n /// The original state is hashed with `keccak256` to get a new state.\\n /// If the index is outside the range,\\n /// the function retries until it gets a suitable index.\\n ///\\n /// @return index A random integer between `0` and `range - 1`, inclusive.\\n ///\\n /// @return newState The new state of the RNG.\\n /// When `getIndex()` is called one or more times,\\n /// care must be taken to always use the output `state`\\n /// of the most recent call as the input `state` of a subsequent call.\\n /// At the end of a transaction calling `RNG.getIndex()`,\\n /// the previous stored state must be overwritten with the latest output.\\n function getIndex(\\n uint256 range,\\n bytes32 state,\\n uint256 bits\\n ) internal view returns (uint256, bytes32) {\\n bool found = false;\\n uint256 index = 0;\\n bytes32 newState = state;\\n while (!found) {\\n index = truncate(bits, uint256(newState));\\n newState = keccak256(abi.encodePacked(newState, address(this)));\\n if (index < range) {\\n found = true;\\n }\\n }\\n return (index, newState);\\n }\\n\\n /// @notice Calculate how many bits are required\\n /// for an index in the range `[0 .. range-1]`.\\n ///\\n /// @param range The upper bound of the desired range, exclusive.\\n ///\\n /// @return uint The smallest number of bits\\n /// that can contain the number `range-1`.\\n function bitsRequired(uint256 range) internal pure returns (uint256) {\\n unchecked {\\n if (range == 1) {\\n return 0;\\n }\\n\\n uint256 bits = Constants.WEIGHT_WIDTH - 1;\\n\\n // Left shift by `bits`,\\n // so we have a 1 in the (bits + 1)th least significant bit\\n // and 0 in other bits.\\n // If this number is equal or greater than `range`,\\n // the range [0, range-1] fits in `bits` bits.\\n //\\n // Because we loop from high bits to low bits,\\n // we find the highest number of bits that doesn't fit the range,\\n // and return that number + 1.\\n while (1 << bits >= range) {\\n bits--;\\n }\\n\\n return bits + 1;\\n }\\n }\\n\\n /// @notice Truncate `input` to the `bits` least significant bits.\\n function truncate(uint256 bits, uint256 input)\\n internal\\n pure\\n returns (uint256)\\n {\\n unchecked {\\n return input & ((1 << bits) - 1);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x67f87f589cd5123ffa32f883ea2f09b0e56258508bae82b8c655b3c27c71eb5e\"},\"@keep-network/sortition-pools/contracts/Rewards.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\n/// @title Rewards\\n/// @notice Rewards are allocated proportionally to operators\\n/// present in the pool at payout based on their weight in the pool.\\n///\\n/// To facilitate this, we use a global accumulator value\\n/// to track the total rewards one unit of weight would've earned\\n/// since the creation of the pool.\\n///\\n/// Whenever a reward is paid, the accumulator is increased\\n/// by the size of the reward divided by the total weight\\n/// of all eligible operators in the pool.\\n///\\n/// Each operator has an individual accumulator value,\\n/// set to equal the global accumulator when the operator joins the pool.\\n/// This accumulator reflects the amount of rewards\\n/// that have already been accounted for with that operator.\\n///\\n/// Whenever an operator's weight in the pool changes,\\n/// we can update the amount of rewards the operator has earned\\n/// by subtracting the operator's accumulator from the global accumulator.\\n/// This gives us the amount of rewards one unit of weight has earned\\n/// since the last time the operator's rewards have been updated.\\n/// Then we multiply that by the operator's previous (pre-change) weight\\n/// to determine how much rewards in total the operator has earned,\\n/// and add this to the operator's earned rewards.\\n/// Finally, we set the operator's accumulator to the global accumulator value.\\ncontract Rewards {\\n struct OperatorRewards {\\n // The state of the global accumulator\\n // when the operator's rewards were last updated\\n uint96 accumulated;\\n // The amount of rewards collected by the operator after the latest update.\\n // The amount the operator could withdraw may equal `available`\\n // or it may be greater, if more rewards have been paid in since then.\\n // To evaulate the most recent amount including rewards potentially paid\\n // since the last update, use `availableRewards` function.\\n uint96 available;\\n // If nonzero, the operator is ineligible for rewards\\n // and may only re-enable rewards after the specified timestamp.\\n // XXX: unsigned 32-bit integer unix seconds, will break around 2106\\n uint32 ineligibleUntil;\\n // Locally cached weight of the operator,\\n // used to reduce the cost of setting operators ineligible.\\n uint32 weight;\\n }\\n\\n // The global accumulator of how much rewards\\n // a hypothetical operator of weight 1 would have earned\\n // since the creation of the pool.\\n uint96 internal globalRewardAccumulator;\\n // If the amount of reward tokens paid in\\n // does not divide cleanly by pool weight,\\n // the difference is recorded as rounding dust\\n // and added to the next reward.\\n uint96 internal rewardRoundingDust;\\n\\n // The amount of rewards that would've been earned by ineligible operators\\n // had they not been ineligible.\\n uint96 public ineligibleEarnedRewards;\\n\\n // Ineligibility times are calculated from this offset,\\n // set at contract creation.\\n uint256 internal immutable ineligibleOffsetStart;\\n\\n mapping(uint32 => OperatorRewards) internal operatorRewards;\\n\\n constructor() {\\n // solhint-disable-next-line not-rely-on-time\\n ineligibleOffsetStart = block.timestamp;\\n }\\n\\n /// @notice Return whether the operator is eligible for rewards or not.\\n function isEligibleForRewards(uint32 operator) internal view returns (bool) {\\n return operatorRewards[operator].ineligibleUntil == 0;\\n }\\n\\n /// @notice Return the time the operator's reward eligibility can be restored.\\n function rewardsEligibilityRestorableAt(uint32 operator)\\n internal\\n view\\n returns (uint256)\\n {\\n uint32 until = operatorRewards[operator].ineligibleUntil;\\n require(until != 0, \\\"Operator already eligible\\\");\\n return (uint256(until) + ineligibleOffsetStart);\\n }\\n\\n /// @notice Return whether the operator is able to restore their eligibility\\n /// for rewards right away.\\n function canRestoreRewardEligibility(uint32 operator)\\n internal\\n view\\n returns (bool)\\n {\\n // solhint-disable-next-line not-rely-on-time\\n return rewardsEligibilityRestorableAt(operator) <= block.timestamp;\\n }\\n\\n /// @notice Internal function for updating the global state of rewards.\\n function addRewards(uint96 rewardAmount, uint32 currentPoolWeight) internal {\\n require(currentPoolWeight > 0, \\\"No recipients in pool\\\");\\n\\n uint96 totalAmount = rewardAmount + rewardRoundingDust;\\n uint96 perWeightReward = totalAmount / currentPoolWeight;\\n uint96 newRoundingDust = totalAmount % currentPoolWeight;\\n\\n globalRewardAccumulator += perWeightReward;\\n rewardRoundingDust = newRoundingDust;\\n }\\n\\n /// @notice Internal function for updating the operator's reward state.\\n function updateOperatorRewards(uint32 operator, uint32 newWeight) internal {\\n uint96 acc = globalRewardAccumulator;\\n OperatorRewards memory o = operatorRewards[operator];\\n uint96 accruedRewards = (acc - o.accumulated) * uint96(o.weight);\\n if (o.ineligibleUntil == 0) {\\n // If operator is not ineligible, update their earned rewards\\n o.available += accruedRewards;\\n } else {\\n // If ineligible, put the rewards into the ineligible pot\\n ineligibleEarnedRewards += accruedRewards;\\n }\\n // In any case, update their accumulator and weight\\n o.accumulated = acc;\\n o.weight = newWeight;\\n operatorRewards[operator] = o;\\n }\\n\\n /// @notice Set the amount of withdrawable tokens to zero\\n /// and return the previous withdrawable amount.\\n /// @dev Does not update the withdrawable amount,\\n /// but should usually be accompanied by an update.\\n function withdrawOperatorRewards(uint32 operator)\\n internal\\n returns (uint96 withdrawable)\\n {\\n OperatorRewards storage o = operatorRewards[operator];\\n withdrawable = o.available;\\n o.available = 0;\\n }\\n\\n /// @notice Set the amount of ineligible-earned tokens to zero\\n /// and return the previous amount.\\n function withdrawIneligibleRewards() internal returns (uint96 withdrawable) {\\n withdrawable = ineligibleEarnedRewards;\\n ineligibleEarnedRewards = 0;\\n }\\n\\n /// @notice Set the given operators as ineligible for rewards.\\n /// The operators can restore their eligibility at the given time.\\n function setIneligible(uint32[] memory operators, uint256 until) internal {\\n OperatorRewards memory o = OperatorRewards(0, 0, 0, 0);\\n uint96 globalAcc = globalRewardAccumulator;\\n uint96 accrued = 0;\\n // Record ineligibility as seconds after contract creation\\n uint32 _until = uint32(until - ineligibleOffsetStart);\\n\\n for (uint256 i = 0; i < operators.length; i++) {\\n uint32 operator = operators[i];\\n OperatorRewards storage r = operatorRewards[operator];\\n o.available = r.available;\\n o.accumulated = r.accumulated;\\n o.ineligibleUntil = r.ineligibleUntil;\\n o.weight = r.weight;\\n\\n if (o.ineligibleUntil != 0) {\\n // If operator is already ineligible,\\n // don't earn rewards or shorten its ineligibility\\n if (o.ineligibleUntil < _until) {\\n o.ineligibleUntil = _until;\\n }\\n } else {\\n // The operator becomes ineligible -> earn rewards\\n o.ineligibleUntil = _until;\\n accrued = (globalAcc - o.accumulated) * uint96(o.weight);\\n o.available += accrued;\\n }\\n o.accumulated = globalAcc;\\n\\n r.available = o.available;\\n r.accumulated = o.accumulated;\\n r.ineligibleUntil = o.ineligibleUntil;\\n r.weight = o.weight;\\n }\\n }\\n\\n /// @notice Restore the given operator's eligibility for rewards.\\n function restoreEligibility(uint32 operator) internal {\\n // solhint-disable-next-line not-rely-on-time\\n require(canRestoreRewardEligibility(operator), \\\"Operator still ineligible\\\");\\n uint96 acc = globalRewardAccumulator;\\n OperatorRewards memory o = operatorRewards[operator];\\n uint96 accruedRewards = (acc - o.accumulated) * uint96(o.weight);\\n ineligibleEarnedRewards += accruedRewards;\\n o.accumulated = acc;\\n o.ineligibleUntil = 0;\\n operatorRewards[operator] = o;\\n }\\n\\n /// @notice Returns the amount of rewards currently available for withdrawal\\n /// for the given operator.\\n function availableRewards(uint32 operator) internal view returns (uint96) {\\n uint96 acc = globalRewardAccumulator;\\n OperatorRewards memory o = operatorRewards[operator];\\n if (o.ineligibleUntil == 0) {\\n // If operator is not ineligible, calculate newly accrued rewards and add\\n // them to the available ones, calculated during the last update.\\n uint96 accruedRewards = (acc - o.accumulated) * uint96(o.weight);\\n return o.available + accruedRewards;\\n } else {\\n // If ineligible, return only the rewards calculated during the last\\n // update.\\n return o.available;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x3a10abb408b44335a092387b2c7ee01db3b27997f1f2c888d9b7a2d92934c4e2\"},\"@keep-network/sortition-pools/contracts/SortitionPool.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\nimport \\\"@thesis/solidity-contracts/contracts/token/IERC20WithPermit.sol\\\";\\nimport \\\"@thesis/solidity-contracts/contracts/token/IReceiveApproval.sol\\\";\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\nimport \\\"./RNG.sol\\\";\\nimport \\\"./SortitionTree.sol\\\";\\nimport \\\"./Rewards.sol\\\";\\nimport \\\"./Chaosnet.sol\\\";\\n\\n/// @title Sortition Pool\\n/// @notice A logarithmic data structure used to store the pool of eligible\\n/// operators weighted by their stakes. It allows to select a group of operators\\n/// based on the provided pseudo-random seed.\\ncontract SortitionPool is\\n SortitionTree,\\n Rewards,\\n Ownable,\\n Chaosnet,\\n IReceiveApproval\\n{\\n using Branch for uint256;\\n using Leaf for uint256;\\n using Position for uint256;\\n\\n IERC20WithPermit public immutable rewardToken;\\n\\n uint256 public immutable poolWeightDivisor;\\n\\n bool public isLocked;\\n\\n event IneligibleForRewards(uint32[] ids, uint256 until);\\n\\n event RewardEligibilityRestored(address indexed operator, uint32 indexed id);\\n\\n /// @notice Reverts if called while pool is locked.\\n modifier onlyUnlocked() {\\n require(!isLocked, \\\"Sortition pool locked\\\");\\n _;\\n }\\n\\n /// @notice Reverts if called while pool is unlocked.\\n modifier onlyLocked() {\\n require(isLocked, \\\"Sortition pool unlocked\\\");\\n _;\\n }\\n\\n constructor(IERC20WithPermit _rewardToken, uint256 _poolWeightDivisor) {\\n rewardToken = _rewardToken;\\n poolWeightDivisor = _poolWeightDivisor;\\n }\\n\\n function receiveApproval(\\n address sender,\\n uint256 amount,\\n address token,\\n bytes calldata\\n ) external override {\\n require(token == address(rewardToken), \\\"Unsupported token\\\");\\n rewardToken.transferFrom(sender, address(this), amount);\\n Rewards.addRewards(uint96(amount), uint32(root.sumWeight()));\\n }\\n\\n /// @notice Withdraws all available rewards for the given operator to the\\n /// given beneficiary.\\n /// @dev Can be called only be the owner. Does not validate if the provided\\n /// beneficiary is associated with the provided operator - this needs to\\n /// be done by the owner calling this function.\\n /// @return The amount of rewards withdrawn in this call.\\n function withdrawRewards(address operator, address beneficiary)\\n public\\n onlyOwner\\n returns (uint96)\\n {\\n uint32 id = getOperatorID(operator);\\n Rewards.updateOperatorRewards(id, uint32(getPoolWeight(operator)));\\n uint96 earned = Rewards.withdrawOperatorRewards(id);\\n rewardToken.transfer(beneficiary, uint256(earned));\\n return earned;\\n }\\n\\n /// @notice Withdraws rewards not allocated to operators marked as ineligible\\n /// to the given recipient address.\\n /// @dev Can be called only by the owner.\\n function withdrawIneligible(address recipient) public onlyOwner {\\n uint96 earned = Rewards.withdrawIneligibleRewards();\\n rewardToken.transfer(recipient, uint256(earned));\\n }\\n\\n /// @notice Locks the sortition pool. In locked state, members cannot be\\n /// inserted and removed from the pool. Members statuses cannot\\n /// be updated as well.\\n /// @dev Can be called only by the contract owner.\\n function lock() public onlyOwner {\\n isLocked = true;\\n }\\n\\n /// @notice Unlocks the sortition pool. Removes all restrictions set by\\n /// the `lock` method.\\n /// @dev Can be called only by the contract owner.\\n function unlock() public onlyOwner {\\n isLocked = false;\\n }\\n\\n /// @notice Inserts an operator to the pool. Reverts if the operator is\\n /// already present. Reverts if the operator is not eligible because of their\\n /// authorized stake. Reverts if the chaosnet is active and the operator is\\n /// not a beta operator.\\n /// @dev Can be called only by the contract owner.\\n /// @param operator Address of the inserted operator.\\n /// @param authorizedStake Inserted operator's authorized stake for the application.\\n function insertOperator(address operator, uint256 authorizedStake)\\n public\\n onlyOwner\\n onlyUnlocked\\n {\\n uint256 weight = getWeight(authorizedStake);\\n require(weight > 0, \\\"Operator not eligible\\\");\\n\\n if (isChaosnetActive) {\\n require(isBetaOperator[operator], \\\"Not beta operator for chaosnet\\\");\\n }\\n\\n _insertOperator(operator, weight);\\n uint32 id = getOperatorID(operator);\\n Rewards.updateOperatorRewards(id, uint32(weight));\\n }\\n\\n /// @notice Update the operator's weight if present and eligible,\\n /// or remove from the pool if present and ineligible.\\n /// @dev Can be called only by the contract owner.\\n /// @param operator Address of the updated operator.\\n /// @param authorizedStake Operator's authorized stake for the application.\\n function updateOperatorStatus(address operator, uint256 authorizedStake)\\n public\\n onlyOwner\\n onlyUnlocked\\n {\\n uint256 weight = getWeight(authorizedStake);\\n\\n uint32 id = getOperatorID(operator);\\n Rewards.updateOperatorRewards(id, uint32(weight));\\n\\n if (weight == 0) {\\n _removeOperator(operator);\\n } else {\\n updateOperator(operator, weight);\\n }\\n }\\n\\n /// @notice Set the given operators as ineligible for rewards.\\n /// The operators can restore their eligibility at the given time.\\n function setRewardIneligibility(uint32[] calldata operators, uint256 until)\\n public\\n onlyOwner\\n {\\n Rewards.setIneligible(operators, until);\\n emit IneligibleForRewards(operators, until);\\n }\\n\\n /// @notice Restores reward eligibility for the operator.\\n function restoreRewardEligibility(address operator) public {\\n uint32 id = getOperatorID(operator);\\n Rewards.restoreEligibility(id);\\n emit RewardEligibilityRestored(operator, id);\\n }\\n\\n /// @notice Returns whether the operator is eligible for rewards or not.\\n function isEligibleForRewards(address operator) public view returns (bool) {\\n uint32 id = getOperatorID(operator);\\n return Rewards.isEligibleForRewards(id);\\n }\\n\\n /// @notice Returns the time the operator's reward eligibility can be restored.\\n function rewardsEligibilityRestorableAt(address operator)\\n public\\n view\\n returns (uint256)\\n {\\n uint32 id = getOperatorID(operator);\\n return Rewards.rewardsEligibilityRestorableAt(id);\\n }\\n\\n /// @notice Returns whether the operator is able to restore their eligibility\\n /// for rewards right away.\\n function canRestoreRewardEligibility(address operator)\\n public\\n view\\n returns (bool)\\n {\\n uint32 id = getOperatorID(operator);\\n return Rewards.canRestoreRewardEligibility(id);\\n }\\n\\n /// @notice Returns the amount of rewards withdrawable for the given operator.\\n function getAvailableRewards(address operator) public view returns (uint96) {\\n uint32 id = getOperatorID(operator);\\n return availableRewards(id);\\n }\\n\\n /// @notice Return whether the operator is present in the pool.\\n function isOperatorInPool(address operator) public view returns (bool) {\\n return getFlaggedLeafPosition(operator) != 0;\\n }\\n\\n /// @notice Return whether the operator's weight in the pool\\n /// matches their eligible weight.\\n function isOperatorUpToDate(address operator, uint256 authorizedStake)\\n public\\n view\\n returns (bool)\\n {\\n return getWeight(authorizedStake) == getPoolWeight(operator);\\n }\\n\\n /// @notice Return the weight of the operator in the pool,\\n /// which may or may not be out of date.\\n function getPoolWeight(address operator) public view returns (uint256) {\\n uint256 flaggedPosition = getFlaggedLeafPosition(operator);\\n if (flaggedPosition == 0) {\\n return 0;\\n } else {\\n uint256 leafPosition = flaggedPosition.unsetFlag();\\n uint256 leafWeight = getLeafWeight(leafPosition);\\n return leafWeight;\\n }\\n }\\n\\n /// @notice Selects a new group of operators of the provided size based on\\n /// the provided pseudo-random seed. At least one operator has to be\\n /// registered in the pool, otherwise the function fails reverting the\\n /// transaction.\\n /// @param groupSize Size of the requested group\\n /// @param seed Pseudo-random number used to select operators to group\\n /// @return selected Members of the selected group\\n function selectGroup(uint256 groupSize, bytes32 seed)\\n public\\n view\\n onlyLocked\\n returns (uint32[] memory)\\n {\\n uint256 _root = root;\\n\\n bytes32 rngState = seed;\\n uint256 rngRange = _root.sumWeight();\\n require(rngRange > 0, \\\"Not enough operators in pool\\\");\\n uint256 currentIndex;\\n\\n uint256 bits = RNG.bitsRequired(rngRange);\\n\\n uint32[] memory selected = new uint32[](groupSize);\\n\\n for (uint256 i = 0; i < groupSize; i++) {\\n (currentIndex, rngState) = RNG.getIndex(rngRange, rngState, bits);\\n\\n uint256 leafPosition = pickWeightedLeaf(currentIndex, _root);\\n\\n uint256 leaf = leaves[leafPosition];\\n selected[i] = leaf.id();\\n }\\n return selected;\\n }\\n\\n function getWeight(uint256 authorization) internal view returns (uint256) {\\n return authorization / poolWeightDivisor;\\n }\\n}\\n\",\"keccak256\":\"0xab42e7c5b1828f42a73f699eb2dc96d4f793572a6323b8b1fbd7c5e0c065bda7\"},\"@keep-network/sortition-pools/contracts/SortitionTree.sol\":{\"content\":\"pragma solidity 0.8.17;\\n\\nimport \\\"./Branch.sol\\\";\\nimport \\\"./Position.sol\\\";\\nimport \\\"./Leaf.sol\\\";\\nimport \\\"./Constants.sol\\\";\\n\\ncontract SortitionTree {\\n using Branch for uint256;\\n using Position for uint256;\\n using Leaf for uint256;\\n\\n // implicit tree\\n // root 8\\n // level2 64\\n // level3 512\\n // level4 4k\\n // level5 32k\\n // level6 256k\\n // level7 2M\\n uint256 internal root;\\n\\n // A 2-index mapping from layer => (index (0-index) => branch). For example,\\n // to access the 6th branch in the 2nd layer (right below the root node; the\\n // first branch layer), call branches[2][5]. Mappings are used in place of\\n // arrays for efficiency. The root is the first layer, the branches occupy\\n // layers 2 through 7, and layer 8 is for the leaves. Following this\\n // convention, the first index in `branches` is `2`, and the last index is\\n // `7`.\\n mapping(uint256 => mapping(uint256 => uint256)) internal branches;\\n\\n // A 0-index mapping from index => leaf, acting as an array. For example, to\\n // access the 42nd leaf, call leaves[41].\\n mapping(uint256 => uint256) internal leaves;\\n\\n // the flagged (see setFlag() and unsetFlag() in Position.sol) positions\\n // of all operators present in the pool\\n mapping(address => uint256) internal flaggedLeafPosition;\\n\\n // the leaf after the rightmost occupied leaf of each stack\\n uint256 internal rightmostLeaf;\\n\\n // the empty leaves in each stack\\n // between 0 and the rightmost occupied leaf\\n uint256[] internal emptyLeaves;\\n\\n // Each operator has an uint32 ID number\\n // which is allocated when they first join the pool\\n // and remains unchanged even if they leave and rejoin the pool.\\n mapping(address => uint32) internal operatorID;\\n\\n // The idAddress array records the address corresponding to each ID number.\\n // The ID number 0 is initialized with a zero address and is not used.\\n address[] internal idAddress;\\n\\n constructor() {\\n root = 0;\\n rightmostLeaf = 0;\\n idAddress.push();\\n }\\n\\n /// @notice Return the ID number of the given operator address. An ID number\\n /// of 0 means the operator has not been allocated an ID number yet.\\n /// @param operator Address of the operator.\\n /// @return the ID number of the given operator address\\n function getOperatorID(address operator) public view returns (uint32) {\\n return operatorID[operator];\\n }\\n\\n /// @notice Get the operator address corresponding to the given ID number. A\\n /// zero address means the ID number has not been allocated yet.\\n /// @param id ID of the operator\\n /// @return the address of the operator\\n function getIDOperator(uint32 id) public view returns (address) {\\n return idAddress.length > id ? idAddress[id] : address(0);\\n }\\n\\n /// @notice Gets the operator addresses corresponding to the given ID\\n /// numbers. A zero address means the ID number has not been allocated yet.\\n /// This function works just like getIDOperator except that it allows to fetch\\n /// operator addresses for multiple IDs in one call.\\n /// @param ids the array of the operator ids\\n /// @return an array of the associated operator addresses\\n function getIDOperators(uint32[] calldata ids)\\n public\\n view\\n returns (address[] memory)\\n {\\n uint256 idCount = idAddress.length;\\n\\n address[] memory operators = new address[](ids.length);\\n for (uint256 i = 0; i < ids.length; i++) {\\n uint32 id = ids[i];\\n operators[i] = idCount > id ? idAddress[id] : address(0);\\n }\\n return operators;\\n }\\n\\n /// @notice Checks if operator is already registered in the pool.\\n /// @param operator the address of the operator\\n /// @return whether or not the operator is already registered in the pool\\n function isOperatorRegistered(address operator) public view returns (bool) {\\n return getFlaggedLeafPosition(operator) != 0;\\n }\\n\\n /// @notice Sum the number of operators in each trunk.\\n /// @return the number of operators in the pool\\n function operatorsInPool() public view returns (uint256) {\\n // Get the number of leaves that might be occupied;\\n // if `rightmostLeaf` equals `firstLeaf()` the tree must be empty,\\n // otherwise the difference between these numbers\\n // gives the number of leaves that may be occupied.\\n uint256 nPossiblyUsedLeaves = rightmostLeaf;\\n // Get the number of empty leaves\\n // not accounted for by the `rightmostLeaf`\\n uint256 nEmptyLeaves = emptyLeaves.length;\\n\\n return (nPossiblyUsedLeaves - nEmptyLeaves);\\n }\\n\\n /// @notice Convenience method to return the total weight of the pool\\n /// @return the total weight of the pool\\n function totalWeight() public view returns (uint256) {\\n return root.sumWeight();\\n }\\n\\n /// @notice Give the operator a new ID number.\\n /// Does not check if the operator already has an ID number.\\n /// @param operator the address of the operator\\n /// @return a new ID for that operator\\n function allocateOperatorID(address operator) internal returns (uint256) {\\n uint256 id = idAddress.length;\\n\\n require(id <= type(uint32).max, \\\"Pool capacity exceeded\\\");\\n\\n operatorID[operator] = uint32(id);\\n idAddress.push(operator);\\n return id;\\n }\\n\\n /// @notice Inserts an operator into the sortition pool\\n /// @param operator the address of an operator to insert\\n /// @param weight how much weight that operator has in the pool\\n function _insertOperator(address operator, uint256 weight) internal {\\n require(\\n !isOperatorRegistered(operator),\\n \\\"Operator is already registered in the pool\\\"\\n );\\n\\n // Fetch the operator's ID, and if they don't have one, allocate them one.\\n uint256 id = getOperatorID(operator);\\n if (id == 0) {\\n id = allocateOperatorID(operator);\\n }\\n\\n // Determine which leaf to insert them into\\n uint256 position = getEmptyLeafPosition();\\n // Record the block the operator was inserted in\\n uint256 theLeaf = Leaf.make(operator, block.number, id);\\n\\n // Update the leaf, and propagate the weight changes all the way up to the\\n // root.\\n root = setLeaf(position, theLeaf, weight, root);\\n\\n // Without position flags,\\n // the position 0x000000 would be treated as empty\\n flaggedLeafPosition[operator] = position.setFlag();\\n }\\n\\n /// @notice Remove an operator (and their weight) from the pool.\\n /// @param operator the address of the operator to remove\\n function _removeOperator(address operator) internal {\\n uint256 flaggedPosition = getFlaggedLeafPosition(operator);\\n require(flaggedPosition != 0, \\\"Operator is not registered in the pool\\\");\\n uint256 unflaggedPosition = flaggedPosition.unsetFlag();\\n\\n // Update the leaf, and propagate the weight changes all the way up to the\\n // root.\\n root = removeLeaf(unflaggedPosition, root);\\n removeLeafPositionRecord(operator);\\n }\\n\\n /// @notice Update an operator's weight in the pool.\\n /// @param operator the address of the operator to update\\n /// @param weight the new weight\\n function updateOperator(address operator, uint256 weight) internal {\\n require(\\n isOperatorRegistered(operator),\\n \\\"Operator is not registered in the pool\\\"\\n );\\n\\n uint256 flaggedPosition = getFlaggedLeafPosition(operator);\\n uint256 unflaggedPosition = flaggedPosition.unsetFlag();\\n root = updateLeaf(unflaggedPosition, weight, root);\\n }\\n\\n /// @notice Helper method to remove a leaf position record for an operator.\\n /// @param operator the address of the operator to remove the record for\\n function removeLeafPositionRecord(address operator) internal {\\n flaggedLeafPosition[operator] = 0;\\n }\\n\\n /// @notice Removes the data and weight from a particular leaf.\\n /// @param position the leaf index to remove\\n /// @param _root the root node containing the leaf\\n /// @return the updated root node\\n function removeLeaf(uint256 position, uint256 _root)\\n internal\\n returns (uint256)\\n {\\n uint256 rightmostSubOne = rightmostLeaf - 1;\\n bool isRightmost = position == rightmostSubOne;\\n\\n // Clears out the data in the leaf node, and then propagates the weight\\n // changes all the way up to the root.\\n uint256 newRoot = setLeaf(position, 0, 0, _root);\\n\\n // Infer if need to fall back on emptyLeaves yet\\n if (isRightmost) {\\n rightmostLeaf = rightmostSubOne;\\n } else {\\n emptyLeaves.push(position);\\n }\\n return newRoot;\\n }\\n\\n /// @notice Updates the tree to give a particular leaf a new weight.\\n /// @param position the index of the leaf to update\\n /// @param weight the new weight\\n /// @param _root the root node containing the leaf\\n /// @return the updated root node\\n function updateLeaf(\\n uint256 position,\\n uint256 weight,\\n uint256 _root\\n ) internal returns (uint256) {\\n if (getLeafWeight(position) != weight) {\\n return updateTree(position, weight, _root);\\n } else {\\n return _root;\\n }\\n }\\n\\n /// @notice Places a leaf into a particular position, with a given weight and\\n /// propagates that change.\\n /// @param position the index to place the leaf in\\n /// @param theLeaf the new leaf to place in the position\\n /// @param leafWeight the weight of the leaf\\n /// @param _root the root containing the new leaf\\n /// @return the updated root node\\n function setLeaf(\\n uint256 position,\\n uint256 theLeaf,\\n uint256 leafWeight,\\n uint256 _root\\n ) internal returns (uint256) {\\n // set leaf\\n leaves[position] = theLeaf;\\n\\n return (updateTree(position, leafWeight, _root));\\n }\\n\\n /// @notice Propagates a weight change at a position through the tree,\\n /// eventually returning the updated root.\\n /// @param position the index of leaf to update\\n /// @param weight the new weight of the leaf\\n /// @param _root the root node containing the leaf\\n /// @return the updated root node\\n function updateTree(\\n uint256 position,\\n uint256 weight,\\n uint256 _root\\n ) internal returns (uint256) {\\n uint256 childSlot;\\n uint256 treeNode;\\n uint256 newNode;\\n uint256 nodeWeight = weight;\\n\\n uint256 parent = position;\\n // set levels 7 to 2\\n for (uint256 level = Constants.LEVELS; level >= 2; level--) {\\n childSlot = parent.slot();\\n parent = parent.parent();\\n treeNode = branches[level][parent];\\n newNode = treeNode.setSlot(childSlot, nodeWeight);\\n branches[level][parent] = newNode;\\n nodeWeight = newNode.sumWeight();\\n }\\n\\n // set level Root\\n childSlot = parent.slot();\\n return _root.setSlot(childSlot, nodeWeight);\\n }\\n\\n /// @notice Retrieves the next available empty leaf position. Tries to fill\\n /// left to right first, ignoring leaf removals, and then fills\\n /// most-recent-removals first.\\n /// @return the position of the empty leaf\\n function getEmptyLeafPosition() internal returns (uint256) {\\n uint256 rLeaf = rightmostLeaf;\\n bool spaceOnRight = (rLeaf + 1) < Constants.POOL_CAPACITY;\\n if (spaceOnRight) {\\n rightmostLeaf = rLeaf + 1;\\n return rLeaf;\\n } else {\\n uint256 emptyLeafCount = emptyLeaves.length;\\n require(emptyLeafCount > 0, \\\"Pool is full\\\");\\n uint256 emptyLeaf = emptyLeaves[emptyLeafCount - 1];\\n emptyLeaves.pop();\\n return emptyLeaf;\\n }\\n }\\n\\n /// @notice Gets the flagged leaf position for an operator.\\n /// @param operator the address of the operator\\n /// @return the leaf position of that operator\\n function getFlaggedLeafPosition(address operator)\\n internal\\n view\\n returns (uint256)\\n {\\n return flaggedLeafPosition[operator];\\n }\\n\\n /// @notice Gets the weight of a leaf at a particular position.\\n /// @param position the index of the leaf\\n /// @return the weight of the leaf at that position\\n function getLeafWeight(uint256 position) internal view returns (uint256) {\\n uint256 slot = position.slot();\\n uint256 parent = position.parent();\\n\\n // A leaf's weight information is stored a 32-bit slot in the branch layer\\n // directly above the leaf layer. To access it, we calculate that slot and\\n // parent position, and always know the hard-coded layer index.\\n uint256 node = branches[Constants.LEVELS][parent];\\n return node.getSlot(slot);\\n }\\n\\n /// @notice Picks a leaf given a random index.\\n /// @param index a number in `[0, _root.totalWeight())` used to decide\\n /// between leaves\\n /// @param _root the root of the tree\\n function pickWeightedLeaf(uint256 index, uint256 _root)\\n internal\\n view\\n returns (uint256 leafPosition)\\n {\\n uint256 currentIndex = index;\\n uint256 currentNode = _root;\\n uint256 currentPosition = 0;\\n uint256 currentSlot;\\n\\n require(index < currentNode.sumWeight(), \\\"Index exceeds weight\\\");\\n\\n // get root slot\\n (currentSlot, currentIndex) = currentNode.pickWeightedSlot(currentIndex);\\n\\n // get slots from levels 2 to 7\\n for (uint256 level = 2; level <= Constants.LEVELS; level++) {\\n currentPosition = currentPosition.child(currentSlot);\\n currentNode = branches[level][currentPosition];\\n (currentSlot, currentIndex) = currentNode.pickWeightedSlot(currentIndex);\\n }\\n\\n // get leaf position\\n leafPosition = currentPosition.child(currentSlot);\\n }\\n}\\n\",\"keccak256\":\"0x51daeca62ef52be78a1a9de4d2a1c5900c873165f59eda14d5965d7d7da90a03\"},\"@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.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/MathUpgradeable.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary StringsUpgradeable {\\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 = MathUpgradeable.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, MathUpgradeable.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\":\"0x6b9a5d35b744b25529a2856a8093e7c03fb35a34b1c4fb5499e560f8ade140da\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../StringsUpgradeable.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSAUpgradeable {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", StringsUpgradeable.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0x12f297cafe6e2847ae0378502f155654d0764b532a9873c8afe4350950fa7971\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/math/MathUpgradeable.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 MathUpgradeable {\\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\":\"0xc1bd5b53319c68f84e3becd75694d941e8f4be94049903232cd8bc7c535aaa5a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n */\\n function toString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n uint256 length = Math.log10(value) + 1;\\n string memory buffer = new string(length);\\n uint256 ptr;\\n /// @solidity memory-safe-assembly\\n assembly {\\n ptr := add(buffer, add(32, length))\\n }\\n while (true) {\\n ptr--;\\n /// @solidity memory-safe-assembly\\n assembly {\\n mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n }\\n value /= 10;\\n if (value == 0) break;\\n }\\n return buffer;\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n */\\n function toHexString(uint256 value) internal pure returns (string memory) {\\n unchecked {\\n return toHexString(value, Math.log256(value) + 1);\\n }\\n }\\n\\n /**\\n * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n */\\n function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n bytes memory buffer = new bytes(2 * length + 2);\\n buffer[0] = \\\"0\\\";\\n buffer[1] = \\\"x\\\";\\n for (uint256 i = 2 * length + 1; i > 1; --i) {\\n buffer[i] = _SYMBOLS[value & 0xf];\\n value >>= 4;\\n }\\n require(value == 0, \\\"Strings: hex length insufficient\\\");\\n return string(buffer);\\n }\\n\\n /**\\n * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n */\\n function toHexString(address addr) internal pure returns (string memory) {\\n return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n }\\n}\\n\",\"keccak256\":\"0xa4d1d62251f8574deb032a35fc948386a9b4de74b812d4f545a1ac120486b48a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/cryptography/ECDSA.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../Strings.sol\\\";\\n\\n/**\\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\\n *\\n * These functions can be used to verify that a message was signed by the holder\\n * of the private keys of a given address.\\n */\\nlibrary ECDSA {\\n enum RecoverError {\\n NoError,\\n InvalidSignature,\\n InvalidSignatureLength,\\n InvalidSignatureS,\\n InvalidSignatureV // Deprecated in v4.8\\n }\\n\\n function _throwError(RecoverError error) private pure {\\n if (error == RecoverError.NoError) {\\n return; // no error: do nothing\\n } else if (error == RecoverError.InvalidSignature) {\\n revert(\\\"ECDSA: invalid signature\\\");\\n } else if (error == RecoverError.InvalidSignatureLength) {\\n revert(\\\"ECDSA: invalid signature length\\\");\\n } else if (error == RecoverError.InvalidSignatureS) {\\n revert(\\\"ECDSA: invalid signature 's' value\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature` or error string. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n *\\n * Documentation for signature generation:\\n * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\\n * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n // ecrecover takes the signature parameters, and the only way to get them\\n // currently is to use assembly.\\n /// @solidity memory-safe-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n return tryRecover(hash, v, r, s);\\n } else {\\n return (address(0), RecoverError.InvalidSignatureLength);\\n }\\n }\\n\\n /**\\n * @dev Returns the address that signed a hashed message (`hash`) with\\n * `signature`. This address can then be used for verification purposes.\\n *\\n * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\\n * this function rejects them by requiring the `s` value to be in the lower\\n * half order, and the `v` value to be either 27 or 28.\\n *\\n * IMPORTANT: `hash` _must_ be the result of a hash operation for the\\n * verification to be secure: it is possible to craft signatures that\\n * recover to arbitrary addresses for non-hashed data. A safe way to ensure\\n * this is by receiving a hash of the original message (which may otherwise\\n * be too long), and then calling {toEthSignedMessageHash} on it.\\n */\\n function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, signature);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\\n *\\n * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address, RecoverError) {\\n bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\\n uint8 v = uint8((uint256(vs) >> 255) + 27);\\n return tryRecover(hash, v, r, s);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\\n *\\n * _Available since v4.2._\\n */\\n function recover(\\n bytes32 hash,\\n bytes32 r,\\n bytes32 vs\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, r, vs);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n *\\n * _Available since v4.3._\\n */\\n function tryRecover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address, RecoverError) {\\n // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\\n // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\\n // the valid range for s in (301): 0 < s < secp256k1n \\u00f7 2 + 1, and for v in (302): v \\u2208 {27, 28}. Most\\n // signatures from current libraries generate a unique signature with an s-value in the lower half order.\\n //\\n // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\\n // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\\n // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\\n // these malleable signatures as well.\\n if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\\n return (address(0), RecoverError.InvalidSignatureS);\\n }\\n\\n // If the signature is valid (and not malleable), return the signer address\\n address signer = ecrecover(hash, v, r, s);\\n if (signer == address(0)) {\\n return (address(0), RecoverError.InvalidSignature);\\n }\\n\\n return (signer, RecoverError.NoError);\\n }\\n\\n /**\\n * @dev Overload of {ECDSA-recover} that receives the `v`,\\n * `r` and `s` signature fields separately.\\n */\\n function recover(\\n bytes32 hash,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal pure returns (address) {\\n (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\\n _throwError(error);\\n return recovered;\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from a `hash`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\\n // 32 is the length in bytes of hash,\\n // enforced by the type signature above\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n32\\\", hash));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Message, created from `s`. This\\n * produces hash corresponding to the one signed with the\\n * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\\n * JSON-RPC method as part of EIP-191.\\n *\\n * See {recover}.\\n */\\n function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19Ethereum Signed Message:\\\\n\\\", Strings.toString(s.length), s));\\n }\\n\\n /**\\n * @dev Returns an Ethereum Signed Typed Data, created from a\\n * `domainSeparator` and a `structHash`. This produces hash corresponding\\n * to the one signed with the\\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\\n * JSON-RPC method as part of EIP-712.\\n *\\n * See {recover}.\\n */\\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n}\\n\",\"keccak256\":\"0xda898fa084aa1ddfdb346e6a40459e00a59d87071cce7c315a46d648dd71d0ba\",\"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\"},\"@thesis/solidity-contracts/contracts/token/IApproveAndCall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.4;\\n\\n/// @notice An interface that should be implemented by tokens supporting\\n/// `approveAndCall`/`receiveApproval` pattern.\\ninterface IApproveAndCall {\\n /// @notice Executes `receiveApproval` function on spender as specified in\\n /// `IReceiveApproval` interface. Approves spender to withdraw from\\n /// the caller multiple times, up to the `amount`. If this\\n /// function is called again, it overwrites the current allowance\\n /// with `amount`. Reverts if the approval reverted or if\\n /// `receiveApproval` call on the spender reverted.\\n function approveAndCall(\\n address spender,\\n uint256 amount,\\n bytes memory extraData\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x393d18ef81a57dcc96fff4c340cc2945deaebb37b9796c322cf2bc96872c3df8\",\"license\":\"MIT\"},\"@thesis/solidity-contracts/contracts/token/IERC20WithPermit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.4;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\nimport \\\"./IApproveAndCall.sol\\\";\\n\\n/// @title IERC20WithPermit\\n/// @notice Burnable ERC20 token with EIP2612 permit functionality. User can\\n/// authorize a transfer of their token with a signature conforming\\n/// EIP712 standard instead of an on-chain transaction from their\\n/// address. Anyone can submit this signature on the user's behalf by\\n/// calling the permit function, as specified in EIP2612 standard,\\n/// paying gas fees, and possibly performing other actions in the same\\n/// transaction.\\ninterface IERC20WithPermit is IERC20, IERC20Metadata, IApproveAndCall {\\n /// @notice EIP2612 approval made with secp256k1 signature.\\n /// Users can authorize a transfer of their tokens with a signature\\n /// conforming EIP712 standard, rather than an on-chain transaction\\n /// from their address. Anyone can submit this signature on the\\n /// user's behalf by calling the permit function, paying gas fees,\\n /// and possibly performing other actions in the same transaction.\\n /// @dev The deadline argument can be set to `type(uint256).max to create\\n /// permits that effectively never expire.\\n function permit(\\n address owner,\\n address spender,\\n uint256 amount,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /// @notice Destroys `amount` tokens from the caller.\\n function burn(uint256 amount) external;\\n\\n /// @notice Destroys `amount` of tokens from `account`, deducting the amount\\n /// from caller's allowance.\\n function burnFrom(address account, uint256 amount) external;\\n\\n /// @notice Returns hash of EIP712 Domain struct with the token name as\\n /// a signing domain and token contract as a verifying contract.\\n /// Used to construct EIP2612 signature provided to `permit`\\n /// function.\\n /* solhint-disable-next-line func-name-mixedcase */\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n\\n /// @notice Returns the current nonce for EIP2612 permission for the\\n /// provided token owner for a replay protection. Used to construct\\n /// EIP2612 signature provided to `permit` function.\\n function nonce(address owner) external view returns (uint256);\\n\\n /// @notice Returns EIP2612 Permit message hash. Used to construct EIP2612\\n /// signature provided to `permit` function.\\n /* solhint-disable-next-line func-name-mixedcase */\\n function PERMIT_TYPEHASH() external pure returns (bytes32);\\n}\\n\",\"keccak256\":\"0xdac9a5086c19a7128b505a7be1ab0ac1aa314f6989cb88d2417e9d7383f89fa9\",\"license\":\"MIT\"},\"@thesis/solidity-contracts/contracts/token/IReceiveApproval.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.4;\\n\\n/// @notice An interface that should be implemented by contracts supporting\\n/// `approveAndCall`/`receiveApproval` pattern.\\ninterface IReceiveApproval {\\n /// @notice Receives approval to spend tokens. Called as a result of\\n /// `approveAndCall` call on the token.\\n function receiveApproval(\\n address from,\\n uint256 amount,\\n address token,\\n bytes calldata extraData\\n ) external;\\n}\\n\",\"keccak256\":\"0x6a30d83ad230548b1e7839737affc8489a035314209de14b89dbef7fb0f66395\",\"license\":\"MIT\"}},\"version\":1}",
12038
12038
  "storageLayout": {
12039
12039
  "storage": [],
12040
12040
  "types": null