@keep-network/tbtc-v2 1.7.0 → 1.8.0-dev.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 (215) hide show
  1. package/artifacts/.chainId +1 -1
  2. package/artifacts/BLS.json +223 -0
  3. package/artifacts/Bank.json +50 -40
  4. package/artifacts/BeaconAuthorization.json +273 -0
  5. package/artifacts/BeaconDkg.json +241 -0
  6. package/artifacts/BeaconDkgValidator.json +501 -0
  7. package/artifacts/BeaconInactivity.json +151 -0
  8. package/artifacts/BeaconSortitionPool.json +1187 -0
  9. package/artifacts/Bridge.json +449 -32
  10. package/artifacts/BridgeGovernance.json +22 -22
  11. package/artifacts/BridgeGovernanceParameters.json +10 -10
  12. package/artifacts/Deposit.json +12 -12
  13. package/artifacts/DepositSweep.json +12 -12
  14. package/artifacts/DonationVault.json +17 -17
  15. package/artifacts/EcdsaDkgValidator.json +517 -0
  16. package/artifacts/EcdsaInactivity.json +156 -0
  17. package/artifacts/EcdsaSortitionPool.json +1187 -0
  18. package/artifacts/Fraud.json +12 -12
  19. package/artifacts/KeepRegistry.json +99 -0
  20. package/artifacts/KeepStake.json +286 -0
  21. package/artifacts/KeepToken.json +711 -0
  22. package/artifacts/KeepTokenStaking.json +483 -0
  23. package/artifacts/LightRelay.json +38 -38
  24. package/artifacts/LightRelayMaintainerProxy.json +31 -31
  25. package/artifacts/MaintainerProxy.json +48 -48
  26. package/artifacts/MovingFunds.json +12 -12
  27. package/artifacts/NuCypherStakingEscrow.json +287 -0
  28. package/artifacts/NuCypherToken.json +711 -0
  29. package/artifacts/RandomBeacon.json +3271 -0
  30. package/artifacts/RandomBeaconChaosnet.json +252 -0
  31. package/artifacts/RandomBeaconGovernance.json +3499 -0
  32. package/artifacts/Redemption.json +12 -12
  33. package/artifacts/RedemptionWatchtower.json +39 -39
  34. package/artifacts/ReimbursementPool.json +509 -0
  35. package/artifacts/T.json +1148 -0
  36. package/artifacts/TBTC.json +37 -36
  37. package/artifacts/TBTCToken.json +738 -0
  38. package/artifacts/TBTCVault.json +47 -47
  39. package/artifacts/Timelock.json +148 -148
  40. package/artifacts/TokenStaking.json +2269 -0
  41. package/artifacts/TokenholderGovernor.json +1795 -0
  42. package/artifacts/TokenholderTimelock.json +1058 -0
  43. package/artifacts/VendingMachine.json +35 -34
  44. package/artifacts/VendingMachineKeep.json +400 -0
  45. package/artifacts/VendingMachineNuCypher.json +400 -0
  46. package/artifacts/VendingMachineV2.json +21 -21
  47. package/artifacts/VendingMachineV3.json +21 -21
  48. package/artifacts/WalletProposalValidator.json +12 -12
  49. package/artifacts/WalletRegistry.json +1962 -0
  50. package/artifacts/WalletRegistryGovernance.json +2863 -0
  51. package/artifacts/Wallets.json +12 -12
  52. package/artifacts/solcInputs/{be146ce112252bdda3a03de3614fbbf1.json → fe0eebcebee1dc423b54e929e5519304.json} +31 -7
  53. package/build/contracts/GovernanceUtils.sol/GovernanceUtils.dbg.json +1 -1
  54. package/build/contracts/Timelock.sol/Timelock.dbg.json +1 -1
  55. package/build/contracts/bank/Bank.sol/Bank.dbg.json +1 -1
  56. package/build/contracts/bank/IReceiveBalanceApproval.sol/IReceiveBalanceApproval.dbg.json +1 -1
  57. package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.dbg.json +1 -1
  58. package/build/contracts/bridge/Bridge.sol/Bridge.dbg.json +1 -1
  59. package/build/contracts/bridge/BridgeGovernanceParameters.sol/BridgeGovernanceParameters.dbg.json +1 -1
  60. package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +1 -1
  61. package/build/contracts/bridge/Deposit.sol/Deposit.dbg.json +1 -1
  62. package/build/contracts/bridge/DepositSweep.sol/DepositSweep.dbg.json +1 -1
  63. package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.dbg.json +1 -1
  64. package/build/contracts/bridge/Fraud.sol/Fraud.dbg.json +1 -1
  65. package/build/contracts/bridge/Heartbeat.sol/Heartbeat.dbg.json +1 -1
  66. package/build/contracts/bridge/IRelay.sol/IRelay.dbg.json +1 -1
  67. package/build/contracts/bridge/MovingFunds.sol/MovingFunds.dbg.json +1 -1
  68. package/build/contracts/bridge/Redemption.sol/IRedemptionWatchtower.dbg.json +1 -1
  69. package/build/contracts/bridge/Redemption.sol/OutboundTx.dbg.json +1 -1
  70. package/build/contracts/bridge/Redemption.sol/Redemption.dbg.json +1 -1
  71. package/build/contracts/bridge/RedemptionWatchtower.sol/RedemptionWatchtower.dbg.json +1 -1
  72. package/build/contracts/bridge/VendingMachine.sol/VendingMachine.dbg.json +1 -1
  73. package/build/contracts/bridge/VendingMachineV2.sol/VendingMachineV2.dbg.json +1 -1
  74. package/build/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.dbg.json +1 -1
  75. package/build/contracts/bridge/WalletProposalValidator.sol/WalletProposalValidator.dbg.json +1 -1
  76. package/build/contracts/bridge/Wallets.sol/Wallets.dbg.json +1 -1
  77. package/build/contracts/integrator/AbstractTBTCDepositor.sol/AbstractTBTCDepositor.dbg.json +1 -1
  78. package/build/contracts/integrator/IBridge.sol/IBridge.dbg.json +1 -1
  79. package/build/contracts/integrator/IBridge.sol/IBridgeTypes.dbg.json +1 -1
  80. package/build/contracts/integrator/ITBTCVault.sol/ITBTCVault.dbg.json +1 -1
  81. package/build/contracts/l2/L1BitcoinDepositor.sol/L1BitcoinDepositor.dbg.json +1 -1
  82. package/build/contracts/l2/L1BitcoinDepositor.sol/L1BitcoinDepositor.json +41 -2
  83. package/build/contracts/l2/L2BitcoinDepositor.sol/IL2WormholeGateway.dbg.json +1 -1
  84. package/build/contracts/l2/L2BitcoinDepositor.sol/L2BitcoinDepositor.dbg.json +1 -1
  85. package/build/contracts/l2/L2TBTC.sol/L2TBTC.dbg.json +1 -1
  86. package/build/contracts/l2/L2WormholeGateway.sol/L2WormholeGateway.dbg.json +1 -1
  87. package/build/contracts/l2/Wormhole.sol/IWormhole.dbg.json +1 -1
  88. package/build/contracts/l2/Wormhole.sol/IWormholeReceiver.dbg.json +1 -1
  89. package/build/contracts/l2/Wormhole.sol/IWormholeRelayer.dbg.json +1 -1
  90. package/build/contracts/l2/Wormhole.sol/IWormholeTokenBridge.dbg.json +1 -1
  91. package/build/contracts/l2/Wormhole.sol/WormholeTypes.dbg.json +1 -1
  92. package/build/contracts/l2/Wormhole.sol/WormholeUtils.dbg.json +1 -1
  93. package/build/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.dbg.json +1 -1
  94. package/build/contracts/relay/LightRelay.sol/ILightRelay.dbg.json +1 -1
  95. package/build/contracts/relay/LightRelay.sol/LightRelay.dbg.json +1 -1
  96. package/build/contracts/relay/LightRelay.sol/RelayUtils.dbg.json +1 -1
  97. package/build/contracts/relay/LightRelayMaintainerProxy.sol/LightRelayMaintainerProxy.dbg.json +1 -1
  98. package/build/contracts/test/BankStub.sol/BankStub.dbg.json +1 -1
  99. package/build/contracts/test/BridgeStub.sol/BridgeStub.dbg.json +1 -1
  100. package/build/contracts/test/HeartbeatStub.sol/HeartbeatStub.dbg.json +1 -1
  101. package/build/contracts/test/LightRelayStub.sol/LightRelayStub.dbg.json +1 -1
  102. package/build/contracts/test/ReceiveApprovalStub.sol/ReceiveApprovalStub.dbg.json +1 -1
  103. package/build/contracts/test/SepoliaLightRelay.sol/SepoliaLightRelay.dbg.json +1 -1
  104. package/build/contracts/test/SystemTestRelay.sol/SystemTestRelay.dbg.json +1 -1
  105. package/build/contracts/test/TestBitcoinTx.sol/TestBitcoinTx.dbg.json +1 -1
  106. package/build/contracts/test/TestERC20.sol/TestERC20.dbg.json +1 -1
  107. package/build/contracts/test/TestERC721.sol/TestERC721.dbg.json +1 -1
  108. package/build/contracts/test/TestEcdsaLib.sol/TestEcdsaLib.dbg.json +1 -1
  109. package/build/contracts/test/TestTBTCDepositor.sol/MockBridge.dbg.json +1 -1
  110. package/build/contracts/test/TestTBTCDepositor.sol/MockTBTCVault.dbg.json +1 -1
  111. package/build/contracts/test/TestTBTCDepositor.sol/TestTBTCDepositor.dbg.json +1 -1
  112. package/build/contracts/test/WormholeBridgeStub.sol/WormholeBridgeStub.dbg.json +1 -1
  113. package/build/contracts/token/TBTC.sol/TBTC.dbg.json +1 -1
  114. package/build/contracts/vault/DonationVault.sol/DonationVault.dbg.json +1 -1
  115. package/build/contracts/vault/IVault.sol/IVault.dbg.json +1 -1
  116. package/build/contracts/vault/TBTCOptimisticMinting.sol/TBTCOptimisticMinting.dbg.json +1 -1
  117. package/build/contracts/vault/TBTCVault.sol/TBTCVault.dbg.json +1 -1
  118. package/contracts/l2/L1BitcoinDepositor.sol +31 -0
  119. package/export/artifacts/contracts/bridge/VendingMachine.sol/VendingMachine.json +6 -6
  120. package/export/artifacts/contracts/bridge/VendingMachineV2.sol/VendingMachineV2.json +6 -6
  121. package/export/artifacts/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.json +6 -6
  122. package/export/artifacts/contracts/l2/L1BitcoinDepositor.sol/L1BitcoinDepositor.json +4288 -4028
  123. package/export/artifacts/contracts/l2/L2BitcoinDepositor.sol/L2BitcoinDepositor.json +33 -33
  124. package/export/artifacts/contracts/l2/L2TBTC.sol/L2TBTC.json +40 -40
  125. package/export/artifacts/contracts/l2/L2WormholeGateway.sol/L2WormholeGateway.json +51 -51
  126. package/export/artifacts/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.json +88 -88
  127. package/export/artifacts/contracts/relay/LightRelay.sol/LightRelay.json +57 -57
  128. package/export/artifacts/contracts/relay/LightRelayMaintainerProxy.sol/LightRelayMaintainerProxy.json +31 -31
  129. package/export/artifacts/contracts/test/BankStub.sol/BankStub.json +2 -2
  130. package/export/artifacts/contracts/test/BridgeStub.sol/BridgeStub.json +30 -30
  131. package/export/artifacts/contracts/test/HeartbeatStub.sol/HeartbeatStub.json +2 -2
  132. package/export/artifacts/contracts/test/LightRelayStub.sol/LightRelayStub.json +59 -59
  133. package/export/artifacts/contracts/test/ReceiveApprovalStub.sol/ReceiveApprovalStub.json +7 -7
  134. package/export/artifacts/contracts/test/SepoliaLightRelay.sol/SepoliaLightRelay.json +59 -59
  135. package/export/artifacts/contracts/test/SystemTestRelay.sol/SystemTestRelay.json +14 -14
  136. package/export/artifacts/contracts/test/TestBitcoinTx.sol/TestBitcoinTx.json +5 -5
  137. package/export/artifacts/contracts/test/TestERC20.sol/TestERC20.json +6 -6
  138. package/export/artifacts/contracts/test/TestERC721.sol/TestERC721.json +8 -8
  139. package/export/artifacts/contracts/test/TestEcdsaLib.sol/TestEcdsaLib.json +2 -2
  140. package/export/artifacts/contracts/test/TestTBTCDepositor.sol/MockBridge.json +18 -18
  141. package/export/artifacts/contracts/test/TestTBTCDepositor.sol/MockTBTCVault.json +20 -20
  142. package/export/artifacts/contracts/test/TestTBTCDepositor.sol/TestTBTCDepositor.json +10 -10
  143. package/export/artifacts/contracts/test/WormholeBridgeStub.sol/WormholeBridgeStub.json +37 -37
  144. package/export/artifacts/contracts/token/TBTC.sol/TBTC.json +2 -2
  145. package/export/artifacts/contracts/vault/DonationVault.sol/DonationVault.json +11 -11
  146. package/export/artifacts/contracts/vault/TBTCVault.sol/TBTCVault.json +135 -135
  147. package/export/typechain/factories/L1BitcoinDepositor__factory.js +40 -1
  148. package/package.json +1 -1
  149. package/artifacts/solcInputs/7c1f8f1dbded4c787d87a982d1fc8349.json +0 -410
  150. package/artifacts/solcInputs/7cc3eda3cb3ff2522d18b5e7b31ea228.json +0 -102
  151. package/artifacts/solcInputs/802132f7da69a8a4226cb9424480847b.json +0 -218
  152. package/artifacts/solcInputs/887fad6b16575ba42183543c324eeb0e.json +0 -335
  153. package/artifacts/solcInputs/98e272e2fbf178ec895387b6c503f9de.json +0 -68
  154. package/artifacts/solcInputs/b0025f1f7efe4824592ac0c9793776c3.json +0 -392
  155. package/artifacts/solcInputs/b7c5f3550cc22e16e6b6ea9582ccbee3.json +0 -341
  156. package/artifacts/solcInputs/d71d4b4434e6669852eaf643ebd2a7bc.json +0 -209
  157. package/artifacts/solcInputs/fccb130292c8c7cc958ab4fa31a3e180.json +0 -187
  158. package/export/deploy/00_resolve_relay.js +0 -83
  159. package/export/deploy/01_deploy_tbtc_v2_token.js +0 -70
  160. package/export/deploy/02_deploy_vending_machine.js +0 -84
  161. package/export/deploy/03_transfer_vending_machine_roles.js +0 -69
  162. package/export/deploy/04_deploy_bank.js +0 -73
  163. package/export/deploy/05_deploy_bridge.js +0 -178
  164. package/export/deploy/06_deploy_tbtc_vault.js +0 -80
  165. package/export/deploy/07_deploy_bridge_governance.js +0 -87
  166. package/export/deploy/08_deploy_maintainer_proxy.js +0 -80
  167. package/export/deploy/09_bank_update_bridge.js +0 -63
  168. package/export/deploy/10_authorize_spv_maintainer_in_bridge.js +0 -61
  169. package/export/deploy/11_transfer_bank_ownership.js +0 -60
  170. package/export/deploy/12_transfer_bridge_governance.js +0 -63
  171. package/export/deploy/13_transfer_bridge_governance_ownership.js +0 -60
  172. package/export/deploy/14_transfer_tbtc_vault_ownership.js +0 -60
  173. package/export/deploy/15_transfer_maintainer_proxy_ownership.js +0 -60
  174. package/export/deploy/16_initialize_wallet_owner.js +0 -63
  175. package/export/deploy/16_transfer_proxy_admin_ownership.js +0 -73
  176. package/export/deploy/17_authorize_maintainer_proxy_in_bridge.js +0 -63
  177. package/export/deploy/17_transfer_proxy_admin_ownership.js +0 -73
  178. package/export/deploy/18_authorize_maintainer_proxy_in_bridge.js +0 -63
  179. package/export/deploy/18_authorize_maintainer_proxy_in_reimbursement_pool.js +0 -63
  180. package/export/deploy/19_authorize_bridge_in_reimbursement_pool.js +0 -63
  181. package/export/deploy/19_authorize_maintainer_proxy_in_reimbursement_pool.js +0 -63
  182. package/export/deploy/20_authorize_bridge_in_reimbursement_pool.js +0 -63
  183. package/export/deploy/20_deploy_proxy_admin_with_deputy.js +0 -80
  184. package/export/deploy/21_transfer_reimbursement_pool_ownership.js +0 -60
  185. package/export/deploy/22_deploy_proxy_admin_with_deputy.js +0 -80
  186. package/export/deploy/24_transfer_maintainer_proxy_ownership.js +0 -60
  187. package/export/deploy/25_transfer_proxy_admin_ownership.js +0 -73
  188. package/export/deploy/26_authorize_maintainer_proxy_in_reimbursement_pool.js +0 -70
  189. package/export/deploy/27_authorize_bridge_in_reimbursement_pool.js +0 -70
  190. package/export/deploy/28_deploy_proxy_admin_with_deputy.js +0 -80
  191. package/export/deploy/34_deploy_wallet_coordinator.js +0 -115
  192. package/export/deploy/35_add_coordinator_address.js +0 -60
  193. package/export/deploy/35_transfer_wallet_coordinator_ownership.js +0 -60
  194. package/export/deploy/36_deploy_light_relay_maintainer_proxy.js +0 -86
  195. package/export/deploy/36_transfer_wallet_coordinator_ownership.js +0 -60
  196. package/export/deploy/37_authorize_maintainer_in_light_relay_maintainer_proxy.js +0 -65
  197. package/export/deploy/37_deploy_light_relay_maintainer_proxy.js +0 -86
  198. package/export/deploy/37_transfer_light_relay_maintainer_proxy_ownership.js +0 -60
  199. package/export/deploy/38_authorize_light_relay_maintainer_proxy_in_reimbursement_pool.js +0 -70
  200. package/export/deploy/38_authorize_maintainer_in_light_relay_maintainer_proxy.js +0 -65
  201. package/export/deploy/38_transfer_light_relay_maintainer_proxy_ownership.js +0 -60
  202. package/export/deploy/39_authorize_light_relay_maintainer_proxy_in_light_relay.js +0 -63
  203. package/export/deploy/39_authorize_light_relay_maintainer_proxy_in_reimbursement_pool.js +0 -70
  204. package/export/deploy/39_transfer_light_relay_maintainer_proxy_ownership.js +0 -60
  205. package/export/deploy/40_authorize_light_relay_maintainer_proxy_in_light_relay.js +0 -66
  206. package/export/deploy/40_authorize_light_relay_maintainer_proxy_in_reimbursement_pool.js +0 -70
  207. package/export/deploy/41_authorize_light_relay_maintainer_proxy_in_light_relay.js +0 -66
  208. package/export/typechain/GoerliLightRelay.js +0 -2
  209. package/export/typechain/RelayStub.js +0 -2
  210. package/export/typechain/TestRelay.js +0 -2
  211. package/export/typechain/WalletCoordinator.js +0 -2
  212. package/export/typechain/factories/GoerliLightRelay__factory.js +0 -535
  213. package/export/typechain/factories/RelayStub__factory.js +0 -546
  214. package/export/typechain/factories/TestRelay__factory.js +0 -168
  215. package/export/typechain/factories/WalletCoordinator__factory.js +0 -1121
@@ -0,0 +1,99 @@
1
+ {
2
+ "address": "0x8464135c8F25Da09e49BC8782676a84730C318bC",
3
+ "abi": [
4
+ {
5
+ "inputs": [],
6
+ "stateMutability": "nonpayable",
7
+ "type": "constructor"
8
+ },
9
+ {
10
+ "anonymous": false,
11
+ "inputs": [
12
+ {
13
+ "indexed": false,
14
+ "internalType": "address",
15
+ "name": "operatorContract",
16
+ "type": "address"
17
+ }
18
+ ],
19
+ "name": "OperatorContractApproved",
20
+ "type": "event"
21
+ },
22
+ {
23
+ "inputs": [
24
+ {
25
+ "internalType": "address",
26
+ "name": "operatorContract",
27
+ "type": "address"
28
+ }
29
+ ],
30
+ "name": "approveOperatorContract",
31
+ "outputs": [],
32
+ "stateMutability": "nonpayable",
33
+ "type": "function"
34
+ },
35
+ {
36
+ "inputs": [],
37
+ "name": "registryKeeper",
38
+ "outputs": [
39
+ {
40
+ "internalType": "address",
41
+ "name": "",
42
+ "type": "address"
43
+ }
44
+ ],
45
+ "stateMutability": "view",
46
+ "type": "function"
47
+ }
48
+ ],
49
+ "transactionHash": "0xbd81a534c8665937baaa271ea505248871394e63eb1be00055d9d515bbb4776a",
50
+ "receipt": {
51
+ "to": null,
52
+ "from": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
53
+ "contractAddress": "0x8464135c8F25Da09e49BC8782676a84730C318bC",
54
+ "transactionIndex": 0,
55
+ "gasUsed": "137624",
56
+ "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
57
+ "blockHash": "0xf814ff08d88842e7faa287c7c14190acd5138825f5bfe7b4391aa7e452b01479",
58
+ "transactionHash": "0xbd81a534c8665937baaa271ea505248871394e63eb1be00055d9d515bbb4776a",
59
+ "logs": [],
60
+ "blockNumber": 1,
61
+ "cumulativeGasUsed": "137624",
62
+ "status": 1,
63
+ "byzantium": true
64
+ },
65
+ "args": [],
66
+ "numDeployments": 1,
67
+ "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operatorContract\",\"type\":\"address\"}],\"name\":\"OperatorContractApproved\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operatorContract\",\"type\":\"address\"}],\"name\":\"approveOperatorContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registryKeeper\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/test/KeepRegistryStub.sol\":\"KeepRegistryStub\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.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 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 /**\\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\",\"keccak256\":\"0xbbc8ac883ac3c0078ce5ad3e288fbb3ffcc8a30c3a98c0fda0114d64fc44fca2\",\"license\":\"MIT\"},\"contracts/test/IKeepRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n\\npragma solidity 0.8.9;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ninterface IKeepRegistry {\\n function approveOperatorContract(address operatorContract) external;\\n\\n function registryKeeper() external view returns (address);\\n}\\n\",\"keccak256\":\"0x9e4f76f7cca77209bf4020d80ba1b0f8ad836ff8b96386b9c05fe8661d249e7d\",\"license\":\"GPL-3.0-or-later\"},\"contracts/test/KeepRegistryStub.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n\\npragma solidity 0.8.9;\\n\\nimport \\\"./IKeepRegistry.sol\\\";\\n\\ncontract KeepRegistryStub is IKeepRegistry {\\n address public registryKeeper;\\n\\n event OperatorContractApproved(address operatorContract);\\n\\n constructor() {\\n registryKeeper = msg.sender;\\n }\\n\\n function approveOperatorContract(address operatorContract) external {\\n emit OperatorContractApproved(operatorContract);\\n }\\n}\\n\",\"keccak256\":\"0x94d07c42d995af1bcc73fa858f669ed462f462c1b353d01a773e1e22e0ffacda\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
68
+ "bytecode": "0x608060405234801561001057600080fd5b50600080546001600160a01b0319163317905561011e806100326000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c806302db580b14603757806384c07bd2146048575b600080fd5b6046604236600460a6565b606e565b005b600054605a906001600160a01b031681565b6040516065919060d4565b60405180910390f35b7fb5d7fbd1d67a09be2dd3ba169be0ebfb43f1d3fd31b12e9dc9e5bd98517bfafb81604051609b919060d4565b60405180910390a150565b60006020828403121560b757600080fd5b81356001600160a01b038116811460cd57600080fd5b9392505050565b6001600160a01b039190911681526020019056fea26469706673582212205025ad4fd36a48b48a85ed551a01dca55f96c2d167396cb805cde45fef5338c964736f6c63430008090033",
69
+ "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060325760003560e01c806302db580b14603757806384c07bd2146048575b600080fd5b6046604236600460a6565b606e565b005b600054605a906001600160a01b031681565b6040516065919060d4565b60405180910390f35b7fb5d7fbd1d67a09be2dd3ba169be0ebfb43f1d3fd31b12e9dc9e5bd98517bfafb81604051609b919060d4565b60405180910390a150565b60006020828403121560b757600080fd5b81356001600160a01b038116811460cd57600080fd5b9392505050565b6001600160a01b039190911681526020019056fea26469706673582212205025ad4fd36a48b48a85ed551a01dca55f96c2d167396cb805cde45fef5338c964736f6c63430008090033",
70
+ "devdoc": {
71
+ "kind": "dev",
72
+ "methods": {},
73
+ "version": 1
74
+ },
75
+ "userdoc": {
76
+ "kind": "user",
77
+ "methods": {},
78
+ "version": 1
79
+ },
80
+ "storageLayout": {
81
+ "storage": [
82
+ {
83
+ "astId": 16737,
84
+ "contract": "contracts/test/KeepRegistryStub.sol:KeepRegistryStub",
85
+ "label": "registryKeeper",
86
+ "offset": 0,
87
+ "slot": "0",
88
+ "type": "t_address"
89
+ }
90
+ ],
91
+ "types": {
92
+ "t_address": {
93
+ "encoding": "inplace",
94
+ "label": "address",
95
+ "numberOfBytes": "20"
96
+ }
97
+ }
98
+ }
99
+ }
@@ -0,0 +1,286 @@
1
+ {
2
+ "address": "0x2dE080e97B0caE9825375D31f5D0eD5751fDf16D",
3
+ "abi": [
4
+ {
5
+ "inputs": [
6
+ {
7
+ "internalType": "contract IKeepTokenStaking",
8
+ "name": "_keepTokenStaking",
9
+ "type": "address"
10
+ }
11
+ ],
12
+ "stateMutability": "nonpayable",
13
+ "type": "constructor"
14
+ },
15
+ {
16
+ "anonymous": false,
17
+ "inputs": [
18
+ {
19
+ "indexed": true,
20
+ "internalType": "address",
21
+ "name": "previousOwner",
22
+ "type": "address"
23
+ },
24
+ {
25
+ "indexed": true,
26
+ "internalType": "address",
27
+ "name": "newOwner",
28
+ "type": "address"
29
+ }
30
+ ],
31
+ "name": "OwnershipTransferred",
32
+ "type": "event"
33
+ },
34
+ {
35
+ "inputs": [],
36
+ "name": "keepTokenStaking",
37
+ "outputs": [
38
+ {
39
+ "internalType": "contract IKeepTokenStaking",
40
+ "name": "",
41
+ "type": "address"
42
+ }
43
+ ],
44
+ "stateMutability": "view",
45
+ "type": "function"
46
+ },
47
+ {
48
+ "inputs": [
49
+ {
50
+ "internalType": "address",
51
+ "name": "",
52
+ "type": "address"
53
+ }
54
+ ],
55
+ "name": "operatorToGrantee",
56
+ "outputs": [
57
+ {
58
+ "internalType": "address",
59
+ "name": "",
60
+ "type": "address"
61
+ }
62
+ ],
63
+ "stateMutability": "view",
64
+ "type": "function"
65
+ },
66
+ {
67
+ "inputs": [
68
+ {
69
+ "internalType": "address",
70
+ "name": "",
71
+ "type": "address"
72
+ }
73
+ ],
74
+ "name": "operatorToManagedGrant",
75
+ "outputs": [
76
+ {
77
+ "internalType": "address",
78
+ "name": "",
79
+ "type": "address"
80
+ }
81
+ ],
82
+ "stateMutability": "view",
83
+ "type": "function"
84
+ },
85
+ {
86
+ "inputs": [],
87
+ "name": "owner",
88
+ "outputs": [
89
+ {
90
+ "internalType": "address",
91
+ "name": "",
92
+ "type": "address"
93
+ }
94
+ ],
95
+ "stateMutability": "view",
96
+ "type": "function"
97
+ },
98
+ {
99
+ "inputs": [],
100
+ "name": "renounceOwnership",
101
+ "outputs": [],
102
+ "stateMutability": "nonpayable",
103
+ "type": "function"
104
+ },
105
+ {
106
+ "inputs": [
107
+ {
108
+ "internalType": "address",
109
+ "name": "operator",
110
+ "type": "address"
111
+ }
112
+ ],
113
+ "name": "resolveOwner",
114
+ "outputs": [
115
+ {
116
+ "internalType": "address",
117
+ "name": "",
118
+ "type": "address"
119
+ }
120
+ ],
121
+ "stateMutability": "view",
122
+ "type": "function"
123
+ },
124
+ {
125
+ "inputs": [
126
+ {
127
+ "internalType": "address",
128
+ "name": "operator",
129
+ "type": "address"
130
+ },
131
+ {
132
+ "internalType": "address",
133
+ "name": "grantee",
134
+ "type": "address"
135
+ }
136
+ ],
137
+ "name": "setGrantee",
138
+ "outputs": [],
139
+ "stateMutability": "nonpayable",
140
+ "type": "function"
141
+ },
142
+ {
143
+ "inputs": [
144
+ {
145
+ "internalType": "address",
146
+ "name": "operator",
147
+ "type": "address"
148
+ },
149
+ {
150
+ "internalType": "address",
151
+ "name": "managedGrant",
152
+ "type": "address"
153
+ }
154
+ ],
155
+ "name": "setManagedGrant",
156
+ "outputs": [],
157
+ "stateMutability": "nonpayable",
158
+ "type": "function"
159
+ },
160
+ {
161
+ "inputs": [
162
+ {
163
+ "internalType": "address",
164
+ "name": "newOwner",
165
+ "type": "address"
166
+ }
167
+ ],
168
+ "name": "transferOwnership",
169
+ "outputs": [],
170
+ "stateMutability": "nonpayable",
171
+ "type": "function"
172
+ }
173
+ ],
174
+ "transactionHash": "0x05d42422785a2c2dcd464b554a18a9b1f16510a0f5e02c4ed73b706e0d3e2d08",
175
+ "receipt": {
176
+ "to": null,
177
+ "from": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
178
+ "contractAddress": "0x2dE080e97B0caE9825375D31f5D0eD5751fDf16D",
179
+ "transactionIndex": 0,
180
+ "gasUsed": "1355541",
181
+ "logsBloom": "0x00000000000000000002000000000000040000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000001000000000000000000000000000000000900020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000001000000000000000000000000000000",
182
+ "blockHash": "0xebe4373d5ba3fbead705f08f75ef4392dd4311ff309da6c14afb2025db8253c0",
183
+ "transactionHash": "0x05d42422785a2c2dcd464b554a18a9b1f16510a0f5e02c4ed73b706e0d3e2d08",
184
+ "logs": [
185
+ {
186
+ "transactionIndex": 0,
187
+ "blockNumber": 14,
188
+ "transactionHash": "0x05d42422785a2c2dcd464b554a18a9b1f16510a0f5e02c4ed73b706e0d3e2d08",
189
+ "address": "0x2dE080e97B0caE9825375D31f5D0eD5751fDf16D",
190
+ "topics": [
191
+ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
192
+ "0x0000000000000000000000000000000000000000000000000000000000000000",
193
+ "0x00000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c8"
194
+ ],
195
+ "data": "0x",
196
+ "logIndex": 0,
197
+ "blockHash": "0xebe4373d5ba3fbead705f08f75ef4392dd4311ff309da6c14afb2025db8253c0"
198
+ }
199
+ ],
200
+ "blockNumber": 14,
201
+ "cumulativeGasUsed": "1355541",
202
+ "status": 1,
203
+ "byzantium": true
204
+ },
205
+ "args": [
206
+ "0x712516e61C8B383dF4A63CFe83d7701Bce54B03e"
207
+ ],
208
+ "numDeployments": 1,
209
+ "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IKeepTokenStaking\",\"name\":\"_keepTokenStaking\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"keepTokenStaking\",\"outputs\":[{\"internalType\":\"contract IKeepTokenStaking\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"operatorToGrantee\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"operatorToManagedGrant\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"resolveOwner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"grantee\",\"type\":\"address\"}],\"name\":\"setGrantee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"managedGrant\",\"type\":\"address\"}],\"name\":\"setManagedGrant\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"KEEP stake owner resolver\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"resolveOwner(address)\":{\"notice\":\"Resolves KEEP stake owner for the provided operator address. Reverts if could not resolve the owner.\"},\"setGrantee(address,address)\":{\"notice\":\"Allows the Governance to set new operator-grantee pair. This function should only be called for non-managed grants if the snapshot does include this pair.\"},\"setManagedGrant(address,address)\":{\"notice\":\"Allows the Governance to set new operator-managed grant pair. This function should only be called for managed grants if the snapshot does include this pair.\"}},\"notice\":\"T network staking contract supports existing KEEP stakes by allowing KEEP stakers to use their stakes in T network and weights them based on KEEP<>T token ratio. KEEP stake owner is cached in T staking contract and used to restrict access to all functions only owner or operator should call. To cache KEEP stake owner in T staking contract, T staking contract first needs to resolve the owner. Resolving liquid KEEP stake owner is easy. Resolving token grant stake owner is complicated and not possible to do on-chain from a contract external to KEEP TokenStaking contract. Keep TokenStaking knows the grant ID but does not expose it externally. KeepStake contract addresses this problem by exposing operator-owner mappings snapshotted off-chain based on events and information publicly available from KEEP TokenStaking contract and KEEP TokenGrant contract. Additionally, it gives the Governance ability to add new mappings in case they are ever needed; in practice, this will be needed only if someone decides to stake their KEEP token grant in KEEP network after 2021-11-11 when the snapshot was taken. Operator-owner pairs were snapshotted 2021-11-11 in the following way: 1. Fetch all TokenStaking events from KEEP staking contract. 2. Filter out undelegated operators. 3. Filter out canceled delegations. 4. Fetch grant stake information from KEEP TokenGrant for that operator to determine if we are dealing with grant delegation. 5. Fetch grantee address from KEEP TokenGrant contract. 6. Check if we are dealing with ManagedGrant by looking for all created ManagedGrants and comparing their address against grantee address fetched from TokenGrant contract.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/staking/KeepStake.sol\":\"KeepStake\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":10},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/staking/ILegacyTokenStaking.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n\\npragma solidity 0.8.9;\\n\\n/// @title IKeepTokenStaking\\n/// @notice Interface for Keep TokenStaking contract\\ninterface IKeepTokenStaking {\\n /// @notice Seize provided token amount from every member in the misbehaved\\n /// operators array. The tattletale is rewarded with 5% of the total seized\\n /// amount scaled by the reward adjustment parameter and the rest 95% is burned.\\n /// @param amountToSeize Token amount to seize from every misbehaved operator.\\n /// @param rewardMultiplier Reward adjustment in percentage. Min 1% and 100% max.\\n /// @param tattletale Address to receive the 5% reward.\\n /// @param misbehavedOperators Array of addresses to seize the tokens from.\\n function seize(\\n uint256 amountToSeize,\\n uint256 rewardMultiplier,\\n address tattletale,\\n address[] memory misbehavedOperators\\n ) external;\\n\\n /// @notice Gets stake delegation info for the given operator.\\n /// @param operator Operator address.\\n /// @return amount The amount of tokens the given operator delegated.\\n /// @return createdAt The time when the stake has been delegated.\\n /// @return undelegatedAt The time when undelegation has been requested.\\n /// If undelegation has not been requested, 0 is returned.\\n function getDelegationInfo(address operator)\\n external\\n view\\n returns (\\n uint256 amount,\\n uint256 createdAt,\\n uint256 undelegatedAt\\n );\\n\\n /// @notice Gets the stake owner for the specified operator address.\\n /// @return Stake owner address.\\n function ownerOf(address operator) external view returns (address);\\n\\n /// @notice Gets the beneficiary for the specified operator address.\\n /// @return Beneficiary address.\\n function beneficiaryOf(address operator)\\n external\\n view\\n returns (address payable);\\n\\n /// @notice Gets the authorizer for the specified operator address.\\n /// @return Authorizer address.\\n function authorizerOf(address operator) external view returns (address);\\n\\n /// @notice Gets the eligible stake balance of the specified address.\\n /// An eligible stake is a stake that passed the initialization period\\n /// and is not currently undelegating. Also, the operator had to approve\\n /// the specified operator contract.\\n ///\\n /// Operator with a minimum required amount of eligible stake can join the\\n /// network and participate in new work selection.\\n ///\\n /// @param operator address of stake operator.\\n /// @param operatorContract address of operator contract.\\n /// @return balance an uint256 representing the eligible stake balance.\\n function eligibleStake(address operator, address operatorContract)\\n external\\n view\\n returns (uint256 balance);\\n}\\n\\n/// @title INuCypherStakingEscrow\\n/// @notice Interface for NuCypher StakingEscrow contract\\ninterface INuCypherStakingEscrow {\\n /// @notice Slash the staker's stake and reward the investigator\\n /// @param staker Staker's address\\n /// @param penalty Penalty\\n /// @param investigator Investigator\\n /// @param reward Reward for the investigator\\n function slashStaker(\\n address staker,\\n uint256 penalty,\\n address investigator,\\n uint256 reward\\n ) external;\\n\\n /// @notice Request merge between NuCypher staking contract and T staking contract.\\n /// Returns amount of staked tokens\\n function requestMerge(address staker, address stakingProvider)\\n external\\n returns (uint256);\\n\\n /// @notice Get all tokens belonging to the staker\\n function getAllTokens(address staker) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x807d42d248e94c1f2269c7aa27031302a1225525e1405010424dd91adcc092ab\",\"license\":\"GPL-3.0-or-later\"},\"contracts/staking/KeepStake.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0-or-later\\n\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588 \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\u2588\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n// \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c \\u2590\\u2588\\u2588\\u2588\\u2588\\u258c\\n\\npragma solidity 0.8.9;\\n\\nimport \\\"./ILegacyTokenStaking.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n/// @title KEEP ManagedGrant contract interface\\ninterface IManagedGrant {\\n function grantee() external view returns (address);\\n}\\n\\n/// @title KEEP stake owner resolver\\n/// @notice T network staking contract supports existing KEEP stakes by allowing\\n/// KEEP stakers to use their stakes in T network and weights them based\\n/// on KEEP<>T token ratio. KEEP stake owner is cached in T staking\\n/// contract and used to restrict access to all functions only owner or\\n/// operator should call. To cache KEEP stake owner in T staking\\n/// contract, T staking contract first needs to resolve the owner.\\n///\\n/// Resolving liquid KEEP stake owner is easy. Resolving token grant\\n/// stake owner is complicated and not possible to do on-chain from\\n/// a contract external to KEEP TokenStaking contract. Keep TokenStaking\\n/// knows the grant ID but does not expose it externally.\\n///\\n/// KeepStake contract addresses this problem by exposing\\n/// operator-owner mappings snapshotted off-chain based on events and\\n/// information publicly available from KEEP TokenStaking contract and\\n/// KEEP TokenGrant contract. Additionally, it gives the Governance\\n/// ability to add new mappings in case they are ever needed; in\\n/// practice, this will be needed only if someone decides to stake their\\n/// KEEP token grant in KEEP network after 2021-11-11 when the snapshot\\n/// was taken.\\n///\\n/// Operator-owner pairs were snapshotted 2021-11-11 in the following\\n/// way:\\n/// 1. Fetch all TokenStaking events from KEEP staking contract.\\n/// 2. Filter out undelegated operators.\\n/// 3. Filter out canceled delegations.\\n/// 4. Fetch grant stake information from KEEP TokenGrant for that\\n/// operator to determine if we are dealing with grant delegation.\\n/// 5. Fetch grantee address from KEEP TokenGrant contract.\\n/// 6. Check if we are dealing with ManagedGrant by looking for all\\n/// created ManagedGrants and comparing their address against grantee\\n/// address fetched from TokenGrant contract.\\ncontract KeepStake is Ownable {\\n IKeepTokenStaking public immutable keepTokenStaking;\\n\\n mapping(address => address) public operatorToManagedGrant;\\n mapping(address => address) public operatorToGrantee;\\n\\n constructor(IKeepTokenStaking _keepTokenStaking) {\\n keepTokenStaking = _keepTokenStaking;\\n }\\n\\n /// @notice Allows the Governance to set new operator-managed grant pair.\\n /// This function should only be called for managed grants if\\n /// the snapshot does include this pair.\\n function setManagedGrant(address operator, address managedGrant)\\n external\\n onlyOwner\\n {\\n operatorToManagedGrant[operator] = managedGrant;\\n }\\n\\n /// @notice Allows the Governance to set new operator-grantee pair.\\n /// This function should only be called for non-managed grants if\\n /// the snapshot does include this pair.\\n function setGrantee(address operator, address grantee) external onlyOwner {\\n operatorToGrantee[operator] = grantee;\\n }\\n\\n /// @notice Resolves KEEP stake owner for the provided operator address.\\n /// Reverts if could not resolve the owner.\\n function resolveOwner(address operator) external view returns (address) {\\n address owner = operatorToManagedGrant[operator];\\n if (owner != address(0)) {\\n return IManagedGrant(owner).grantee();\\n }\\n\\n owner = operatorToGrantee[operator];\\n if (owner != address(0)) {\\n return owner;\\n }\\n\\n owner = resolveSnapshottedManagedGrantees(operator);\\n if (owner != address(0)) {\\n return owner;\\n }\\n\\n owner = resolveSnapshottedGrantees(operator);\\n if (owner != address(0)) {\\n return owner;\\n }\\n\\n owner = keepTokenStaking.ownerOf(operator);\\n require(owner != address(0), \\\"Could not resolve the owner\\\");\\n\\n return owner;\\n }\\n\\n function resolveSnapshottedManagedGrantees(address operator)\\n internal\\n view\\n returns (address)\\n {\\n if (operator == 0x855A951162B1B93D70724484d5bdc9D00B56236B) {\\n return\\n IManagedGrant(0xFADbF758307A054C57B365Db1De90acA71feaFE5)\\n .grantee();\\n }\\n if (operator == 0xF1De9490Bf7298b5F350cE74332Ad7cf8d5cB181) {\\n return\\n IManagedGrant(0xAEd493Aaf3E76E83b29E151848b71eF4544f92f1)\\n .grantee();\\n }\\n if (operator == 0x39d2aCBCD80d80080541C6eed7e9feBb8127B2Ab) {\\n return\\n IManagedGrant(0xA2fa09D6f8C251422F5fde29a0BAd1C53dEfAe66)\\n .grantee();\\n }\\n if (operator == 0xd66cAE89FfBc6E50e6b019e45c1aEc93Dec54781) {\\n return\\n IManagedGrant(0x306309f9d105F34132db0bFB3Ce3f5B0245Cd386)\\n .grantee();\\n }\\n if (operator == 0x2eBE08379f4fD866E871A9b9E1d5C695154C6A9F) {\\n return\\n IManagedGrant(0xd00c0d43b747C33726B3f0ff4BDA4b72dc53c6E9)\\n .grantee();\\n }\\n if (operator == 0xA97c34278162b556A527CFc01B53eb4DDeDFD223) {\\n return\\n IManagedGrant(0xB3E967355c456B1Bd43cB0188A321592D410D096)\\n .grantee();\\n }\\n if (operator == 0x6C76d49322C9f8761A1623CEd89A31490cdB649d) {\\n return\\n IManagedGrant(0xB3E967355c456B1Bd43cB0188A321592D410D096)\\n .grantee();\\n }\\n if (operator == 0x4a41c7a884d119eaaefE471D0B3a638226408382) {\\n return\\n IManagedGrant(0xcdf3d216d82a463Ce82971F2F5DA3d8f9C5f093A)\\n .grantee();\\n }\\n if (operator == 0x9c06Feb7Ebc8065ee11Cd5E8EEdaAFb2909A7087) {\\n return\\n IManagedGrant(0x45119cd98d145283762BA9eBCAea75F72D188733)\\n .grantee();\\n }\\n if (operator == 0x9bD818Ab6ACC974f2Cf2BD2EBA7a250126Accb9F) {\\n return\\n IManagedGrant(0x6E535043377067621954ee84065b0bd7357e7aBa)\\n .grantee();\\n }\\n if (operator == 0x1d803c89760F8B4057DB15BCb3B8929E0498D310) {\\n return\\n IManagedGrant(0xB3E967355c456B1Bd43cB0188A321592D410D096)\\n .grantee();\\n }\\n if (operator == 0x3101927DEeC27A2bfA6c4a6316e3A221f631dB91) {\\n return\\n IManagedGrant(0x178Bf1946feD0e2362fdF8bcD3f91F0701a012C6)\\n .grantee();\\n }\\n if (operator == 0x9d9b187E478bC62694A7bED216Fc365de87F280C) {\\n return\\n IManagedGrant(0xFBad17CFad6cb00D726c65501D69FdC13Ca5477c)\\n .grantee();\\n }\\n if (operator == 0xd977144724Bc77FaeFAe219F958AE3947205d0b5) {\\n return\\n IManagedGrant(0x087B442BFd4E42675cf2df5fa566F87d7A96Fb12)\\n .grantee();\\n }\\n if (operator == 0x045E511f53DeBF55c9C0B4522f14F602f7C7cA81) {\\n return\\n IManagedGrant(0xFcfe8C036C414a15cF871071c483687095caF7D6)\\n .grantee();\\n }\\n if (operator == 0x3Dd301b3c96A282d8092E1e6f6846f24172D45C1) {\\n return\\n IManagedGrant(0xb5Bdd2D9B3541fc8f581Af37430D26527e59aeF8)\\n .grantee();\\n }\\n if (operator == 0x5d84DEB482E770479154028788Df79aA7C563aA4) {\\n return\\n IManagedGrant(0x9D1a179c469a8BdD0b683A9f9250246cc47e8fBE)\\n .grantee();\\n }\\n if (operator == 0x1dF927B69A97E8140315536163C029d188e8573b) {\\n return\\n IManagedGrant(0xb5Bdd2D9B3541fc8f581Af37430D26527e59aeF8)\\n .grantee();\\n }\\n if (operator == 0x617daCE069Fbd41993491de211b4DfccdAcbd348) {\\n return\\n IManagedGrant(0xb5Bdd2D9B3541fc8f581Af37430D26527e59aeF8)\\n .grantee();\\n }\\n if (operator == 0x650A9eD18Df873cad98C88dcaC8170531cAD2399) {\\n return\\n IManagedGrant(0x1Df7324A3aD20526DFa02Cc803eD2D97Cac81F3b)\\n .grantee();\\n }\\n if (operator == 0x07C9a8f8264221906b7b8958951Ce4753D39628B) {\\n return\\n IManagedGrant(0x305D12b4d70529Cd618dA7399F5520701E510041)\\n .grantee();\\n }\\n if (operator == 0x63eB4c3DD0751F9BE7070A01156513C227fa1eF6) {\\n return\\n IManagedGrant(0x306309f9d105F34132db0bFB3Ce3f5B0245Cd386)\\n .grantee();\\n }\\n if (operator == 0xc6349eEC31048787676b6297ba71721376A8DdcF) {\\n return\\n IManagedGrant(0xac1a985E75C6a0b475b9c807Ad0705a988Be2D99)\\n .grantee();\\n }\\n if (operator == 0x3B945f9C0C8737e44f8e887d4F04B5B3A491Ac4d) {\\n return\\n IManagedGrant(0x82e17477726E8D9D2C237745cA9989631582eE98)\\n .grantee();\\n }\\n if (operator == 0xF35343299a4f80Dd5D917bbe5ddd54eBB820eBd4) {\\n return\\n IManagedGrant(0xCC88c15506251B62ccCeebA193e100d6bBC9a30D)\\n .grantee();\\n }\\n if (operator == 0x3B9e5ae72d068448bB96786989c0d86FBC0551D1) {\\n return\\n IManagedGrant(0x306309f9d105F34132db0bFB3Ce3f5B0245Cd386)\\n .grantee();\\n }\\n if (operator == 0xB2D53Be158Cb8451dFc818bD969877038c1BdeA1) {\\n return\\n IManagedGrant(0xaE55e3800f0A3feaFdcE535A8C0fab0fFdB90DEe)\\n .grantee();\\n }\\n if (operator == 0xF6dbF7AFe05b8Bb6f198eC7e69333c98D3C4608C) {\\n return\\n IManagedGrant(0xbb8D24a20c20625f86739824014C3cBAAAb26700)\\n .grantee();\\n }\\n if (operator == 0xB62Fc1ADfFb2ab832041528C8178358338d85f76) {\\n return\\n IManagedGrant(0x9ED98fD1C29018B9342CB8F57A3073B9695f0c02)\\n .grantee();\\n }\\n if (operator == 0x9bC8d30d971C9e74298112803036C05db07D73e3) {\\n return\\n IManagedGrant(0x66beda757939f8e505b5Eb883cd02C8d4a11Bca2)\\n .grantee();\\n }\\n\\n return address(0);\\n }\\n\\n function resolveSnapshottedGrantees(address operator)\\n internal\\n pure\\n returns (address)\\n {\\n if (operator == 0x1147ccFB4AEFc6e587a23b78724Ef20Ec6e474D4) {\\n return 0x3FB49dA4375Ef9019f17990D04c6d5daD482D80a;\\n }\\n if (operator == 0x4c21541f95a00C03C75F38C71DC220bd27cbbEd9) {\\n return 0xC897cfeE43a8d827F76D4226994D5CE5EBBe2571;\\n }\\n if (operator == 0x7E6332d18719a5463d3867a1a892359509589a3d) {\\n return 0x1578eD833D986c1188D1a998aA5FEcD418beF5da;\\n }\\n if (operator == 0x8Bd660A764Ca14155F3411a4526a028b6316CB3E) {\\n return 0xf6f372DfAeCC1431186598c304e91B79Ce115766;\\n }\\n if (operator == 0x4F4f0D0dfd93513B3f4Cb116Fe9d0A005466F725) {\\n return 0x8b055ac1c4dd287E2a46D4a52d61FE76FB551bD0;\\n }\\n if (operator == 0x1DF0250027fEC876d8876d1ac7A392c9098F1a1e) {\\n return 0xE408fFa969707Ce5d7aA3e5F8d44674Fa4b26219;\\n }\\n if (operator == 0x860EF3f83B6adFEF757F98345c3B8DdcFCA9d152) {\\n return 0x08a3633AAb8f3E436DEA204288Ee26Fe094406b0;\\n }\\n if (operator == 0xe3a2d16dA142E6B190A5d9F7e0C07cc460B58A5F) {\\n return 0x875f8fFCDDeD63B5d8Cf54be4E4b82FE6c6E249C;\\n }\\n if (operator == 0xBDE07f1cA107Ef319b0Bb26eBF1d0a5b4c97ffc1) {\\n return 0x1578eD833D986c1188D1a998aA5FEcD418beF5da;\\n }\\n if (operator == 0xE86181D6b672d78D33e83029fF3D0ef4A601B4C4) {\\n return 0x1578eD833D986c1188D1a998aA5FEcD418beF5da;\\n }\\n if (operator == 0xb7c561e2069aCaE2c4480111B1606790BB4E13fE) {\\n return 0x1578eD833D986c1188D1a998aA5FEcD418beF5da;\\n }\\n if (operator == 0x526c013f8382B050d32d86e7090Ac84De22EdA4D) {\\n return 0x61C6E5DDacded540CD08066C08cbc096d22D91f4;\\n }\\n\\n return address(0);\\n }\\n}\\n\",\"keccak256\":\"0xc75f6be595ec0e0c885d689786808a53b70c0a170a53dd344228359dc6aaf178\",\"license\":\"GPL-3.0-or-later\"}},\"version\":1}",
210
+ "bytecode": "0x60a060405234801561001057600080fd5b506040516117fa3803806117fa83398101604081905261002f91610099565b61003833610049565b6001600160a01b03166080526100c9565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100ab57600080fd5b81516001600160a01b03811681146100c257600080fd5b9392505050565b6080516117106100ea6000396000818160b6015261028f01526117106000f3fe608060405234801561001057600080fd5b50600436106100835760003560e01c806301f326961461008857806303055815146100b157806310b648cb146100d8578063715018a6146100ed57806384f82c53146100f55780638da5cb5b14610108578063edc6640014610110578063f2fde38b14610139578063f371b2161461014c575b600080fd5b61009b61009636600461161e565b610175565b6040516100a8919061163b565b60405180910390f35b61009b7f000000000000000000000000000000000000000000000000000000000000000081565b6100eb6100e636600461164f565b610375565b005b6100eb6103d2565b6100eb61010336600461164f565b61040d565b61009b61046a565b61009b61011e36600461161e565b6002602052600090815260409020546001600160a01b031681565b6100eb61014736600461161e565b610479565b61009b61015a36600461161e565b6001602052600090815260409020546001600160a01b031681565b6001600160a01b03808216600090815260016020526040812054909116801561021057806001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b1580156101d157600080fd5b505afa1580156101e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102099190611688565b9392505050565b506001600160a01b038083166000908152600260205260409020541680156102385792915050565b61024183610519565b90506001600160a01b038116156102585792915050565b610261836112b7565b90506001600160a01b038116156102785792915050565b604051630a57ebcf60e11b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906314afd79e906102c490869060040161163b565b60206040518083038186803b1580156102dc57600080fd5b505afa1580156102f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103149190611688565b90506001600160a01b03811661036f5760405162461bcd60e51b815260206004820152601b60248201527a21b7bab632103737ba103932b9b7b63b32903a34329037bbb732b960291b60448201526064015b60405180910390fd5b92915050565b3361037e61046a565b6001600160a01b0316146103a45760405162461bcd60e51b8152600401610366906116a5565b6001600160a01b03918216600090815260016020526040902080546001600160a01b03191691909216179055565b336103db61046a565b6001600160a01b0316146104015760405162461bcd60e51b8152600401610366906116a5565b61040b60006115b9565b565b3361041661046a565b6001600160a01b03161461043c5760405162461bcd60e51b8152600401610366906116a5565b6001600160a01b03918216600090815260026020526040902080546001600160a01b03191691909216179055565b6000546001600160a01b031690565b3361048261046a565b6001600160a01b0316146104a85760405162461bcd60e51b8152600401610366906116a5565b6001600160a01b03811661050d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610366565b610516816115b9565b50565b600073855a951162b1b93d70724484d5bdc9d00b56236b6001600160a01b03831614156105c55773fadbf758307a054c57b365db1de90aca71feafe56001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b505afa1580156105a1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036f9190611688565b73f1de9490bf7298b5f350ce74332ad7cf8d5cb1816001600160a01b03831614156106375773aed493aaf3e76e83b29e151848b71ef4544f92f16001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b7339d2acbcd80d80080541c6eed7e9febb8127b2ab6001600160a01b03831614156106a95773a2fa09d6f8c251422f5fde29a0bad1c53defae666001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73d66cae89ffbc6e50e6b019e45c1aec93dec547816001600160a01b038316141561071b5773306309f9d105f34132db0bfb3ce3f5b0245cd3866001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b732ebe08379f4fd866e871a9b9e1d5c695154c6a9f6001600160a01b038316141561078d5773d00c0d43b747c33726b3f0ff4bda4b72dc53c6e96001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73a97c34278162b556a527cfc01b53eb4ddedfd2236001600160a01b03831614156107ff5773b3e967355c456b1bd43cb0188a321592d410d0966001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b736c76d49322c9f8761a1623ced89a31490cdb649d6001600160a01b03831614156108715773b3e967355c456b1bd43cb0188a321592d410d0966001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b734a41c7a884d119eaaefe471d0b3a6382264083826001600160a01b03831614156108e35773cdf3d216d82a463ce82971f2f5da3d8f9c5f093a6001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b739c06feb7ebc8065ee11cd5e8eedaafb2909a70876001600160a01b0383161415610955577345119cd98d145283762ba9ebcaea75f72d1887336001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b739bd818ab6acc974f2cf2bd2eba7a250126accb9f6001600160a01b03831614156109c757736e535043377067621954ee84065b0bd7357e7aba6001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b731d803c89760f8b4057db15bcb3b8929e0498d3106001600160a01b0383161415610a395773b3e967355c456b1bd43cb0188a321592d410d0966001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b733101927deec27a2bfa6c4a6316e3a221f631db916001600160a01b0383161415610aab5773178bf1946fed0e2362fdf8bcd3f91f0701a012c66001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b739d9b187e478bc62694a7bed216fc365de87f280c6001600160a01b0383161415610b1d5773fbad17cfad6cb00d726c65501d69fdc13ca5477c6001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73d977144724bc77faefae219f958ae3947205d0b56001600160a01b0383161415610b8f5773087b442bfd4e42675cf2df5fa566f87d7a96fb126001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73045e511f53debf55c9c0b4522f14f602f7c7ca816001600160a01b0383161415610c015773fcfe8c036c414a15cf871071c483687095caf7d66001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b733dd301b3c96a282d8092e1e6f6846f24172d45c16001600160a01b0383161415610c735773b5bdd2d9b3541fc8f581af37430d26527e59aef86001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b735d84deb482e770479154028788df79aa7c563aa46001600160a01b0383161415610ce557739d1a179c469a8bdd0b683a9f9250246cc47e8fbe6001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b731df927b69a97e8140315536163c029d188e8573b6001600160a01b0383161415610d575773b5bdd2d9b3541fc8f581af37430d26527e59aef86001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73617dace069fbd41993491de211b4dfccdacbd3486001600160a01b0383161415610dc95773b5bdd2d9b3541fc8f581af37430d26527e59aef86001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73650a9ed18df873cad98c88dcac8170531cad23996001600160a01b0383161415610e3b57731df7324a3ad20526dfa02cc803ed2d97cac81f3b6001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b7307c9a8f8264221906b7b8958951ce4753d39628b6001600160a01b0383161415610ead5773305d12b4d70529cd618da7399f5520701e5100416001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b7363eb4c3dd0751f9be7070a01156513c227fa1ef66001600160a01b0383161415610f1f5773306309f9d105f34132db0bfb3ce3f5b0245cd3866001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73c6349eec31048787676b6297ba71721376a8ddcf6001600160a01b0383161415610f915773ac1a985e75c6a0b475b9c807ad0705a988be2d996001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b733b945f9c0c8737e44f8e887d4f04b5b3a491ac4d6001600160a01b0383161415611003577382e17477726e8d9d2c237745ca9989631582ee986001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73f35343299a4f80dd5d917bbe5ddd54ebb820ebd46001600160a01b03831614156110755773cc88c15506251b62ccceeba193e100d6bbc9a30d6001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b733b9e5ae72d068448bb96786989c0d86fbc0551d16001600160a01b03831614156110e75773306309f9d105f34132db0bfb3ce3f5b0245cd3866001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73b2d53be158cb8451dfc818bd969877038c1bdea16001600160a01b03831614156111595773ae55e3800f0a3feafdce535a8c0fab0ffdb90dee6001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73f6dbf7afe05b8bb6f198ec7e69333c98d3c4608c6001600160a01b03831614156111cb5773bb8d24a20c20625f86739824014c3cbaaab267006001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73b62fc1adffb2ab832041528c8178358338d85f766001600160a01b038316141561123d57739ed98fd1c29018b9342cb8f57a3073b9695f0c026001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b739bc8d30d971c9e74298112803036c05db07d73e36001600160a01b03831614156112af577366beda757939f8e505b5eb883cd02c8d4a11bca26001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b506000919050565b6000731147ccfb4aefc6e587a23b78724ef20ec6e474d46001600160a01b03831614156112f95750733fb49da4375ef9019f17990d04c6d5dad482d80a919050565b734c21541f95a00c03c75f38c71dc220bd27cbbed96001600160a01b0383161415611339575073c897cfee43a8d827f76d4226994d5ce5ebbe2571919050565b737e6332d18719a5463d3867a1a892359509589a3d6001600160a01b03831614156113795750731578ed833d986c1188d1a998aa5fecd418bef5da919050565b738bd660a764ca14155f3411a4526a028b6316cb3e6001600160a01b03831614156113b9575073f6f372dfaecc1431186598c304e91b79ce115766919050565b734f4f0d0dfd93513b3f4cb116fe9d0a005466f7256001600160a01b03831614156113f95750738b055ac1c4dd287e2a46d4a52d61fe76fb551bd0919050565b731df0250027fec876d8876d1ac7a392c9098f1a1e6001600160a01b0383161415611439575073e408ffa969707ce5d7aa3e5f8d44674fa4b26219919050565b73860ef3f83b6adfef757f98345c3b8ddcfca9d1526001600160a01b038316141561147957507308a3633aab8f3e436dea204288ee26fe094406b0919050565b73e3a2d16da142e6b190a5d9f7e0c07cc460b58a5f6001600160a01b03831614156114b9575073875f8ffcdded63b5d8cf54be4e4b82fe6c6e249c919050565b73bde07f1ca107ef319b0bb26ebf1d0a5b4c97ffc16001600160a01b03831614156114f95750731578ed833d986c1188d1a998aa5fecd418bef5da919050565b73e86181d6b672d78d33e83029ff3d0ef4a601b4c46001600160a01b03831614156115395750731578ed833d986c1188d1a998aa5fecd418bef5da919050565b73b7c561e2069acae2c4480111b1606790bb4e13fe6001600160a01b03831614156115795750731578ed833d986c1188d1a998aa5fecd418bef5da919050565b73526c013f8382b050d32d86e7090ac84de22eda4d6001600160a01b03831614156112af57507361c6e5ddacded540cd08066c08cbc096d22d91f4919050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461051657600080fd5b60006020828403121561163057600080fd5b813561020981611609565b6001600160a01b0391909116815260200190565b6000806040838503121561166257600080fd5b823561166d81611609565b9150602083013561167d81611609565b809150509250929050565b60006020828403121561169a57600080fd5b815161020981611609565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea2646970667358221220e282239fa1fe8635bffec6ac55d8d71a07148ee38b2e2ab5b696cb193740da6d64736f6c63430008090033",
211
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100835760003560e01c806301f326961461008857806303055815146100b157806310b648cb146100d8578063715018a6146100ed57806384f82c53146100f55780638da5cb5b14610108578063edc6640014610110578063f2fde38b14610139578063f371b2161461014c575b600080fd5b61009b61009636600461161e565b610175565b6040516100a8919061163b565b60405180910390f35b61009b7f000000000000000000000000000000000000000000000000000000000000000081565b6100eb6100e636600461164f565b610375565b005b6100eb6103d2565b6100eb61010336600461164f565b61040d565b61009b61046a565b61009b61011e36600461161e565b6002602052600090815260409020546001600160a01b031681565b6100eb61014736600461161e565b610479565b61009b61015a36600461161e565b6001602052600090815260409020546001600160a01b031681565b6001600160a01b03808216600090815260016020526040812054909116801561021057806001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b1580156101d157600080fd5b505afa1580156101e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102099190611688565b9392505050565b506001600160a01b038083166000908152600260205260409020541680156102385792915050565b61024183610519565b90506001600160a01b038116156102585792915050565b610261836112b7565b90506001600160a01b038116156102785792915050565b604051630a57ebcf60e11b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906314afd79e906102c490869060040161163b565b60206040518083038186803b1580156102dc57600080fd5b505afa1580156102f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103149190611688565b90506001600160a01b03811661036f5760405162461bcd60e51b815260206004820152601b60248201527a21b7bab632103737ba103932b9b7b63b32903a34329037bbb732b960291b60448201526064015b60405180910390fd5b92915050565b3361037e61046a565b6001600160a01b0316146103a45760405162461bcd60e51b8152600401610366906116a5565b6001600160a01b03918216600090815260016020526040902080546001600160a01b03191691909216179055565b336103db61046a565b6001600160a01b0316146104015760405162461bcd60e51b8152600401610366906116a5565b61040b60006115b9565b565b3361041661046a565b6001600160a01b03161461043c5760405162461bcd60e51b8152600401610366906116a5565b6001600160a01b03918216600090815260026020526040902080546001600160a01b03191691909216179055565b6000546001600160a01b031690565b3361048261046a565b6001600160a01b0316146104a85760405162461bcd60e51b8152600401610366906116a5565b6001600160a01b03811661050d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610366565b610516816115b9565b50565b600073855a951162b1b93d70724484d5bdc9d00b56236b6001600160a01b03831614156105c55773fadbf758307a054c57b365db1de90aca71feafe56001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b505afa1580156105a1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061036f9190611688565b73f1de9490bf7298b5f350ce74332ad7cf8d5cb1816001600160a01b03831614156106375773aed493aaf3e76e83b29e151848b71ef4544f92f16001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b7339d2acbcd80d80080541c6eed7e9febb8127b2ab6001600160a01b03831614156106a95773a2fa09d6f8c251422f5fde29a0bad1c53defae666001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73d66cae89ffbc6e50e6b019e45c1aec93dec547816001600160a01b038316141561071b5773306309f9d105f34132db0bfb3ce3f5b0245cd3866001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b732ebe08379f4fd866e871a9b9e1d5c695154c6a9f6001600160a01b038316141561078d5773d00c0d43b747c33726b3f0ff4bda4b72dc53c6e96001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73a97c34278162b556a527cfc01b53eb4ddedfd2236001600160a01b03831614156107ff5773b3e967355c456b1bd43cb0188a321592d410d0966001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b736c76d49322c9f8761a1623ced89a31490cdb649d6001600160a01b03831614156108715773b3e967355c456b1bd43cb0188a321592d410d0966001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b734a41c7a884d119eaaefe471d0b3a6382264083826001600160a01b03831614156108e35773cdf3d216d82a463ce82971f2f5da3d8f9c5f093a6001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b739c06feb7ebc8065ee11cd5e8eedaafb2909a70876001600160a01b0383161415610955577345119cd98d145283762ba9ebcaea75f72d1887336001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b739bd818ab6acc974f2cf2bd2eba7a250126accb9f6001600160a01b03831614156109c757736e535043377067621954ee84065b0bd7357e7aba6001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b731d803c89760f8b4057db15bcb3b8929e0498d3106001600160a01b0383161415610a395773b3e967355c456b1bd43cb0188a321592d410d0966001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b733101927deec27a2bfa6c4a6316e3a221f631db916001600160a01b0383161415610aab5773178bf1946fed0e2362fdf8bcd3f91f0701a012c66001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b739d9b187e478bc62694a7bed216fc365de87f280c6001600160a01b0383161415610b1d5773fbad17cfad6cb00d726c65501d69fdc13ca5477c6001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73d977144724bc77faefae219f958ae3947205d0b56001600160a01b0383161415610b8f5773087b442bfd4e42675cf2df5fa566f87d7a96fb126001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73045e511f53debf55c9c0b4522f14f602f7c7ca816001600160a01b0383161415610c015773fcfe8c036c414a15cf871071c483687095caf7d66001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b733dd301b3c96a282d8092e1e6f6846f24172d45c16001600160a01b0383161415610c735773b5bdd2d9b3541fc8f581af37430d26527e59aef86001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b735d84deb482e770479154028788df79aa7c563aa46001600160a01b0383161415610ce557739d1a179c469a8bdd0b683a9f9250246cc47e8fbe6001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b731df927b69a97e8140315536163c029d188e8573b6001600160a01b0383161415610d575773b5bdd2d9b3541fc8f581af37430d26527e59aef86001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73617dace069fbd41993491de211b4dfccdacbd3486001600160a01b0383161415610dc95773b5bdd2d9b3541fc8f581af37430d26527e59aef86001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73650a9ed18df873cad98c88dcac8170531cad23996001600160a01b0383161415610e3b57731df7324a3ad20526dfa02cc803ed2d97cac81f3b6001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b7307c9a8f8264221906b7b8958951ce4753d39628b6001600160a01b0383161415610ead5773305d12b4d70529cd618da7399f5520701e5100416001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b7363eb4c3dd0751f9be7070a01156513c227fa1ef66001600160a01b0383161415610f1f5773306309f9d105f34132db0bfb3ce3f5b0245cd3866001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73c6349eec31048787676b6297ba71721376a8ddcf6001600160a01b0383161415610f915773ac1a985e75c6a0b475b9c807ad0705a988be2d996001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b733b945f9c0c8737e44f8e887d4f04b5b3a491ac4d6001600160a01b0383161415611003577382e17477726e8d9d2c237745ca9989631582ee986001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73f35343299a4f80dd5d917bbe5ddd54ebb820ebd46001600160a01b03831614156110755773cc88c15506251b62ccceeba193e100d6bbc9a30d6001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b733b9e5ae72d068448bb96786989c0d86fbc0551d16001600160a01b03831614156110e75773306309f9d105f34132db0bfb3ce3f5b0245cd3866001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73b2d53be158cb8451dfc818bd969877038c1bdea16001600160a01b03831614156111595773ae55e3800f0a3feafdce535a8c0fab0ffdb90dee6001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73f6dbf7afe05b8bb6f198ec7e69333c98d3c4608c6001600160a01b03831614156111cb5773bb8d24a20c20625f86739824014c3cbaaab267006001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b73b62fc1adffb2ab832041528c8178358338d85f766001600160a01b038316141561123d57739ed98fd1c29018b9342cb8f57a3073b9695f0c026001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b739bc8d30d971c9e74298112803036c05db07d73e36001600160a01b03831614156112af577366beda757939f8e505b5eb883cd02c8d4a11bca26001600160a01b031663d5f520766040518163ffffffff1660e01b815260040160206040518083038186803b15801561058d57600080fd5b506000919050565b6000731147ccfb4aefc6e587a23b78724ef20ec6e474d46001600160a01b03831614156112f95750733fb49da4375ef9019f17990d04c6d5dad482d80a919050565b734c21541f95a00c03c75f38c71dc220bd27cbbed96001600160a01b0383161415611339575073c897cfee43a8d827f76d4226994d5ce5ebbe2571919050565b737e6332d18719a5463d3867a1a892359509589a3d6001600160a01b03831614156113795750731578ed833d986c1188d1a998aa5fecd418bef5da919050565b738bd660a764ca14155f3411a4526a028b6316cb3e6001600160a01b03831614156113b9575073f6f372dfaecc1431186598c304e91b79ce115766919050565b734f4f0d0dfd93513b3f4cb116fe9d0a005466f7256001600160a01b03831614156113f95750738b055ac1c4dd287e2a46d4a52d61fe76fb551bd0919050565b731df0250027fec876d8876d1ac7a392c9098f1a1e6001600160a01b0383161415611439575073e408ffa969707ce5d7aa3e5f8d44674fa4b26219919050565b73860ef3f83b6adfef757f98345c3b8ddcfca9d1526001600160a01b038316141561147957507308a3633aab8f3e436dea204288ee26fe094406b0919050565b73e3a2d16da142e6b190a5d9f7e0c07cc460b58a5f6001600160a01b03831614156114b9575073875f8ffcdded63b5d8cf54be4e4b82fe6c6e249c919050565b73bde07f1ca107ef319b0bb26ebf1d0a5b4c97ffc16001600160a01b03831614156114f95750731578ed833d986c1188d1a998aa5fecd418bef5da919050565b73e86181d6b672d78d33e83029ff3d0ef4a601b4c46001600160a01b03831614156115395750731578ed833d986c1188d1a998aa5fecd418bef5da919050565b73b7c561e2069acae2c4480111b1606790bb4e13fe6001600160a01b03831614156115795750731578ed833d986c1188d1a998aa5fecd418bef5da919050565b73526c013f8382b050d32d86e7090ac84de22eda4d6001600160a01b03831614156112af57507361c6e5ddacded540cd08066c08cbc096d22d91f4919050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116811461051657600080fd5b60006020828403121561163057600080fd5b813561020981611609565b6001600160a01b0391909116815260200190565b6000806040838503121561166257600080fd5b823561166d81611609565b9150602083013561167d81611609565b809150509250929050565b60006020828403121561169a57600080fd5b815161020981611609565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260408201526060019056fea2646970667358221220e282239fa1fe8635bffec6ac55d8d71a07148ee38b2e2ab5b696cb193740da6d64736f6c63430008090033",
212
+ "devdoc": {
213
+ "kind": "dev",
214
+ "methods": {
215
+ "owner()": {
216
+ "details": "Returns the address of the current owner."
217
+ },
218
+ "renounceOwnership()": {
219
+ "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
220
+ },
221
+ "transferOwnership(address)": {
222
+ "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
223
+ }
224
+ },
225
+ "title": "KEEP stake owner resolver",
226
+ "version": 1
227
+ },
228
+ "userdoc": {
229
+ "kind": "user",
230
+ "methods": {
231
+ "resolveOwner(address)": {
232
+ "notice": "Resolves KEEP stake owner for the provided operator address. Reverts if could not resolve the owner."
233
+ },
234
+ "setGrantee(address,address)": {
235
+ "notice": "Allows the Governance to set new operator-grantee pair. This function should only be called for non-managed grants if the snapshot does include this pair."
236
+ },
237
+ "setManagedGrant(address,address)": {
238
+ "notice": "Allows the Governance to set new operator-managed grant pair. This function should only be called for managed grants if the snapshot does include this pair."
239
+ }
240
+ },
241
+ "notice": "T network staking contract supports existing KEEP stakes by allowing KEEP stakers to use their stakes in T network and weights them based on KEEP<>T token ratio. KEEP stake owner is cached in T staking contract and used to restrict access to all functions only owner or operator should call. To cache KEEP stake owner in T staking contract, T staking contract first needs to resolve the owner. Resolving liquid KEEP stake owner is easy. Resolving token grant stake owner is complicated and not possible to do on-chain from a contract external to KEEP TokenStaking contract. Keep TokenStaking knows the grant ID but does not expose it externally. KeepStake contract addresses this problem by exposing operator-owner mappings snapshotted off-chain based on events and information publicly available from KEEP TokenStaking contract and KEEP TokenGrant contract. Additionally, it gives the Governance ability to add new mappings in case they are ever needed; in practice, this will be needed only if someone decides to stake their KEEP token grant in KEEP network after 2021-11-11 when the snapshot was taken. Operator-owner pairs were snapshotted 2021-11-11 in the following way: 1. Fetch all TokenStaking events from KEEP staking contract. 2. Filter out undelegated operators. 3. Filter out canceled delegations. 4. Fetch grant stake information from KEEP TokenGrant for that operator to determine if we are dealing with grant delegation. 5. Fetch grantee address from KEEP TokenGrant contract. 6. Check if we are dealing with ManagedGrant by looking for all created ManagedGrants and comparing their address against grantee address fetched from TokenGrant contract.",
242
+ "version": 1
243
+ },
244
+ "storageLayout": {
245
+ "storage": [
246
+ {
247
+ "astId": 1489,
248
+ "contract": "contracts/staking/KeepStake.sol:KeepStake",
249
+ "label": "_owner",
250
+ "offset": 0,
251
+ "slot": "0",
252
+ "type": "t_address"
253
+ },
254
+ {
255
+ "astId": 12169,
256
+ "contract": "contracts/staking/KeepStake.sol:KeepStake",
257
+ "label": "operatorToManagedGrant",
258
+ "offset": 0,
259
+ "slot": "1",
260
+ "type": "t_mapping(t_address,t_address)"
261
+ },
262
+ {
263
+ "astId": 12173,
264
+ "contract": "contracts/staking/KeepStake.sol:KeepStake",
265
+ "label": "operatorToGrantee",
266
+ "offset": 0,
267
+ "slot": "2",
268
+ "type": "t_mapping(t_address,t_address)"
269
+ }
270
+ ],
271
+ "types": {
272
+ "t_address": {
273
+ "encoding": "inplace",
274
+ "label": "address",
275
+ "numberOfBytes": "20"
276
+ },
277
+ "t_mapping(t_address,t_address)": {
278
+ "encoding": "mapping",
279
+ "key": "t_address",
280
+ "label": "mapping(address => address)",
281
+ "numberOfBytes": "32",
282
+ "value": "t_address"
283
+ }
284
+ }
285
+ }
286
+ }