@keep-network/tbtc-v2 0.1.1-dev.43 → 0.1.1-dev.46

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 (75) hide show
  1. package/artifacts/Bank.json +742 -0
  2. package/artifacts/Bridge.json +2961 -0
  3. package/artifacts/Deposit.json +117 -0
  4. package/artifacts/EcdsaDkgValidator.json +532 -0
  5. package/artifacts/EcdsaInactivity.json +156 -0
  6. package/artifacts/Fraud.json +153 -0
  7. package/artifacts/KeepRegistry.json +99 -0
  8. package/artifacts/KeepStake.json +286 -0
  9. package/artifacts/KeepToken.json +711 -0
  10. package/artifacts/KeepTokenStaking.json +483 -0
  11. package/artifacts/MovingFunds.json +137 -0
  12. package/artifacts/NuCypherStakingEscrow.json +256 -0
  13. package/artifacts/NuCypherToken.json +711 -0
  14. package/artifacts/RandomBeaconStub.json +141 -0
  15. package/artifacts/Redemption.json +161 -0
  16. package/artifacts/ReimbursementPool.json +509 -0
  17. package/artifacts/Relay.json +123 -0
  18. package/artifacts/SortitionPool.json +944 -0
  19. package/artifacts/Sweep.json +76 -0
  20. package/artifacts/T.json +1148 -0
  21. package/artifacts/TBTC.json +21 -21
  22. package/artifacts/TBTCToken.json +21 -21
  23. package/artifacts/TokenStaking.json +2288 -0
  24. package/artifacts/TokenholderGovernor.json +1795 -0
  25. package/artifacts/TokenholderTimelock.json +1058 -0
  26. package/artifacts/VendingMachine.json +24 -24
  27. package/artifacts/VendingMachineKeep.json +400 -0
  28. package/artifacts/VendingMachineNuCypher.json +400 -0
  29. package/artifacts/WalletRegistry.json +2709 -0
  30. package/artifacts/WalletRegistryGovernance.json +2364 -0
  31. package/artifacts/Wallets.json +186 -0
  32. package/artifacts/solcInputs/{f2c15d3cf1bd9566483f595c5ed30ccc.json → 75d54bcf8c4f0b65acb7ec6a1fb9af9d.json} +19 -19
  33. package/build/contracts/GovernanceUtils.sol/GovernanceUtils.dbg.json +1 -1
  34. package/build/contracts/bank/Bank.sol/Bank.dbg.json +1 -1
  35. package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.dbg.json +1 -1
  36. package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.json +2 -2
  37. package/build/contracts/bridge/Bridge.sol/Bridge.dbg.json +1 -1
  38. package/build/contracts/bridge/Bridge.sol/Bridge.json +438 -31
  39. package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +1 -1
  40. package/build/contracts/bridge/BridgeState.sol/BridgeState.json +120 -2
  41. package/build/contracts/bridge/Deposit.sol/Deposit.dbg.json +1 -1
  42. package/build/contracts/bridge/Deposit.sol/Deposit.json +2 -2
  43. package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.dbg.json +1 -1
  44. package/build/contracts/bridge/Fraud.sol/Fraud.dbg.json +1 -1
  45. package/build/contracts/bridge/Fraud.sol/Fraud.json +5 -5
  46. package/build/contracts/bridge/IRelay.sol/IRelay.dbg.json +1 -1
  47. package/build/contracts/bridge/MovingFunds.sol/MovingFunds.dbg.json +1 -1
  48. package/build/contracts/bridge/MovingFunds.sol/MovingFunds.json +40 -2
  49. package/build/contracts/bridge/Redemption.sol/OutboundTx.dbg.json +1 -1
  50. package/build/contracts/bridge/Redemption.sol/OutboundTx.json +2 -2
  51. package/build/contracts/bridge/Redemption.sol/Redemption.dbg.json +1 -1
  52. package/build/contracts/bridge/Redemption.sol/Redemption.json +2 -2
  53. package/build/contracts/bridge/Sweep.sol/Sweep.dbg.json +1 -1
  54. package/build/contracts/bridge/Sweep.sol/Sweep.json +2 -2
  55. package/build/contracts/bridge/VendingMachine.sol/VendingMachine.dbg.json +1 -1
  56. package/build/contracts/bridge/Wallets.sol/Wallets.dbg.json +1 -1
  57. package/build/contracts/bridge/Wallets.sol/Wallets.json +21 -2
  58. package/build/contracts/token/TBTC.sol/TBTC.dbg.json +1 -1
  59. package/build/contracts/vault/IVault.sol/IVault.dbg.json +1 -1
  60. package/build/contracts/vault/TBTCVault.sol/TBTCVault.dbg.json +1 -1
  61. package/contracts/bridge/Bridge.sol +313 -18
  62. package/contracts/bridge/BridgeState.sol +288 -5
  63. package/contracts/bridge/Deposit.sol +2 -2
  64. package/contracts/bridge/Fraud.sol +47 -17
  65. package/contracts/bridge/MovingFunds.sol +181 -1
  66. package/contracts/bridge/Redemption.sol +7 -12
  67. package/contracts/bridge/Sweep.sol +0 -3
  68. package/contracts/bridge/Wallets.sol +74 -33
  69. package/deploy/00_resolve_relay.ts +28 -0
  70. package/deploy/04_deploy_bank.ts +25 -0
  71. package/deploy/05_deploy_bridge.ts +60 -0
  72. package/deploy/06_bank_update_bridge.ts +19 -0
  73. package/deploy/07_transfer_ownership.ts +17 -0
  74. package/export.json +14827 -460
  75. package/package.json +2 -2
@@ -0,0 +1,944 @@
1
+ {
2
+ "address": "0xAfe1b5bdEbD4ae65AF2024738bf0735fbb65d44b",
3
+ "abi": [
4
+ {
5
+ "inputs": [
6
+ {
7
+ "internalType": "contract IERC20WithPermit",
8
+ "name": "_rewardToken",
9
+ "type": "address"
10
+ },
11
+ {
12
+ "internalType": "uint256",
13
+ "name": "_poolWeightDivisor",
14
+ "type": "uint256"
15
+ }
16
+ ],
17
+ "stateMutability": "nonpayable",
18
+ "type": "constructor"
19
+ },
20
+ {
21
+ "anonymous": false,
22
+ "inputs": [
23
+ {
24
+ "indexed": false,
25
+ "internalType": "uint32[]",
26
+ "name": "ids",
27
+ "type": "uint32[]"
28
+ },
29
+ {
30
+ "indexed": false,
31
+ "internalType": "uint256",
32
+ "name": "until",
33
+ "type": "uint256"
34
+ }
35
+ ],
36
+ "name": "IneligibleForRewards",
37
+ "type": "event"
38
+ },
39
+ {
40
+ "anonymous": false,
41
+ "inputs": [
42
+ {
43
+ "indexed": true,
44
+ "internalType": "address",
45
+ "name": "previousOwner",
46
+ "type": "address"
47
+ },
48
+ {
49
+ "indexed": true,
50
+ "internalType": "address",
51
+ "name": "newOwner",
52
+ "type": "address"
53
+ }
54
+ ],
55
+ "name": "OwnershipTransferred",
56
+ "type": "event"
57
+ },
58
+ {
59
+ "anonymous": false,
60
+ "inputs": [
61
+ {
62
+ "indexed": true,
63
+ "internalType": "address",
64
+ "name": "operator",
65
+ "type": "address"
66
+ },
67
+ {
68
+ "indexed": true,
69
+ "internalType": "uint32",
70
+ "name": "id",
71
+ "type": "uint32"
72
+ }
73
+ ],
74
+ "name": "RewardEligibilityRestored",
75
+ "type": "event"
76
+ },
77
+ {
78
+ "inputs": [
79
+ {
80
+ "internalType": "uint32",
81
+ "name": "operator",
82
+ "type": "uint32"
83
+ }
84
+ ],
85
+ "name": "canRestoreRewardEligibility",
86
+ "outputs": [
87
+ {
88
+ "internalType": "bool",
89
+ "name": "",
90
+ "type": "bool"
91
+ }
92
+ ],
93
+ "stateMutability": "view",
94
+ "type": "function"
95
+ },
96
+ {
97
+ "inputs": [
98
+ {
99
+ "internalType": "address",
100
+ "name": "operator",
101
+ "type": "address"
102
+ }
103
+ ],
104
+ "name": "getAvailableRewards",
105
+ "outputs": [
106
+ {
107
+ "internalType": "uint96",
108
+ "name": "",
109
+ "type": "uint96"
110
+ }
111
+ ],
112
+ "stateMutability": "view",
113
+ "type": "function"
114
+ },
115
+ {
116
+ "inputs": [
117
+ {
118
+ "internalType": "uint32",
119
+ "name": "id",
120
+ "type": "uint32"
121
+ }
122
+ ],
123
+ "name": "getIDOperator",
124
+ "outputs": [
125
+ {
126
+ "internalType": "address",
127
+ "name": "",
128
+ "type": "address"
129
+ }
130
+ ],
131
+ "stateMutability": "view",
132
+ "type": "function"
133
+ },
134
+ {
135
+ "inputs": [
136
+ {
137
+ "internalType": "uint32[]",
138
+ "name": "ids",
139
+ "type": "uint32[]"
140
+ }
141
+ ],
142
+ "name": "getIDOperators",
143
+ "outputs": [
144
+ {
145
+ "internalType": "address[]",
146
+ "name": "",
147
+ "type": "address[]"
148
+ }
149
+ ],
150
+ "stateMutability": "view",
151
+ "type": "function"
152
+ },
153
+ {
154
+ "inputs": [
155
+ {
156
+ "internalType": "address",
157
+ "name": "operator",
158
+ "type": "address"
159
+ }
160
+ ],
161
+ "name": "getOperatorID",
162
+ "outputs": [
163
+ {
164
+ "internalType": "uint32",
165
+ "name": "",
166
+ "type": "uint32"
167
+ }
168
+ ],
169
+ "stateMutability": "view",
170
+ "type": "function"
171
+ },
172
+ {
173
+ "inputs": [
174
+ {
175
+ "internalType": "address",
176
+ "name": "operator",
177
+ "type": "address"
178
+ }
179
+ ],
180
+ "name": "getPoolWeight",
181
+ "outputs": [
182
+ {
183
+ "internalType": "uint256",
184
+ "name": "",
185
+ "type": "uint256"
186
+ }
187
+ ],
188
+ "stateMutability": "view",
189
+ "type": "function"
190
+ },
191
+ {
192
+ "inputs": [],
193
+ "name": "ineligibleEarnedRewards",
194
+ "outputs": [
195
+ {
196
+ "internalType": "uint96",
197
+ "name": "",
198
+ "type": "uint96"
199
+ }
200
+ ],
201
+ "stateMutability": "view",
202
+ "type": "function"
203
+ },
204
+ {
205
+ "inputs": [
206
+ {
207
+ "internalType": "address",
208
+ "name": "operator",
209
+ "type": "address"
210
+ },
211
+ {
212
+ "internalType": "uint256",
213
+ "name": "authorizedStake",
214
+ "type": "uint256"
215
+ }
216
+ ],
217
+ "name": "insertOperator",
218
+ "outputs": [],
219
+ "stateMutability": "nonpayable",
220
+ "type": "function"
221
+ },
222
+ {
223
+ "inputs": [
224
+ {
225
+ "internalType": "uint32",
226
+ "name": "operator",
227
+ "type": "uint32"
228
+ }
229
+ ],
230
+ "name": "isEligibleForRewards",
231
+ "outputs": [
232
+ {
233
+ "internalType": "bool",
234
+ "name": "",
235
+ "type": "bool"
236
+ }
237
+ ],
238
+ "stateMutability": "view",
239
+ "type": "function"
240
+ },
241
+ {
242
+ "inputs": [],
243
+ "name": "isLocked",
244
+ "outputs": [
245
+ {
246
+ "internalType": "bool",
247
+ "name": "",
248
+ "type": "bool"
249
+ }
250
+ ],
251
+ "stateMutability": "view",
252
+ "type": "function"
253
+ },
254
+ {
255
+ "inputs": [
256
+ {
257
+ "internalType": "address",
258
+ "name": "operator",
259
+ "type": "address"
260
+ }
261
+ ],
262
+ "name": "isOperatorInPool",
263
+ "outputs": [
264
+ {
265
+ "internalType": "bool",
266
+ "name": "",
267
+ "type": "bool"
268
+ }
269
+ ],
270
+ "stateMutability": "view",
271
+ "type": "function"
272
+ },
273
+ {
274
+ "inputs": [
275
+ {
276
+ "internalType": "address",
277
+ "name": "operator",
278
+ "type": "address"
279
+ }
280
+ ],
281
+ "name": "isOperatorRegistered",
282
+ "outputs": [
283
+ {
284
+ "internalType": "bool",
285
+ "name": "",
286
+ "type": "bool"
287
+ }
288
+ ],
289
+ "stateMutability": "view",
290
+ "type": "function"
291
+ },
292
+ {
293
+ "inputs": [
294
+ {
295
+ "internalType": "address",
296
+ "name": "operator",
297
+ "type": "address"
298
+ },
299
+ {
300
+ "internalType": "uint256",
301
+ "name": "authorizedStake",
302
+ "type": "uint256"
303
+ }
304
+ ],
305
+ "name": "isOperatorUpToDate",
306
+ "outputs": [
307
+ {
308
+ "internalType": "bool",
309
+ "name": "",
310
+ "type": "bool"
311
+ }
312
+ ],
313
+ "stateMutability": "view",
314
+ "type": "function"
315
+ },
316
+ {
317
+ "inputs": [],
318
+ "name": "lock",
319
+ "outputs": [],
320
+ "stateMutability": "nonpayable",
321
+ "type": "function"
322
+ },
323
+ {
324
+ "inputs": [],
325
+ "name": "operatorsInPool",
326
+ "outputs": [
327
+ {
328
+ "internalType": "uint256",
329
+ "name": "",
330
+ "type": "uint256"
331
+ }
332
+ ],
333
+ "stateMutability": "view",
334
+ "type": "function"
335
+ },
336
+ {
337
+ "inputs": [],
338
+ "name": "owner",
339
+ "outputs": [
340
+ {
341
+ "internalType": "address",
342
+ "name": "",
343
+ "type": "address"
344
+ }
345
+ ],
346
+ "stateMutability": "view",
347
+ "type": "function"
348
+ },
349
+ {
350
+ "inputs": [],
351
+ "name": "poolWeightDivisor",
352
+ "outputs": [
353
+ {
354
+ "internalType": "uint256",
355
+ "name": "",
356
+ "type": "uint256"
357
+ }
358
+ ],
359
+ "stateMutability": "view",
360
+ "type": "function"
361
+ },
362
+ {
363
+ "inputs": [
364
+ {
365
+ "internalType": "address",
366
+ "name": "sender",
367
+ "type": "address"
368
+ },
369
+ {
370
+ "internalType": "uint256",
371
+ "name": "amount",
372
+ "type": "uint256"
373
+ },
374
+ {
375
+ "internalType": "address",
376
+ "name": "token",
377
+ "type": "address"
378
+ },
379
+ {
380
+ "internalType": "bytes",
381
+ "name": "",
382
+ "type": "bytes"
383
+ }
384
+ ],
385
+ "name": "receiveApproval",
386
+ "outputs": [],
387
+ "stateMutability": "nonpayable",
388
+ "type": "function"
389
+ },
390
+ {
391
+ "inputs": [],
392
+ "name": "renounceOwnership",
393
+ "outputs": [],
394
+ "stateMutability": "nonpayable",
395
+ "type": "function"
396
+ },
397
+ {
398
+ "inputs": [
399
+ {
400
+ "internalType": "address",
401
+ "name": "operator",
402
+ "type": "address"
403
+ }
404
+ ],
405
+ "name": "restoreRewardEligibility",
406
+ "outputs": [],
407
+ "stateMutability": "nonpayable",
408
+ "type": "function"
409
+ },
410
+ {
411
+ "inputs": [],
412
+ "name": "rewardToken",
413
+ "outputs": [
414
+ {
415
+ "internalType": "contract IERC20WithPermit",
416
+ "name": "",
417
+ "type": "address"
418
+ }
419
+ ],
420
+ "stateMutability": "view",
421
+ "type": "function"
422
+ },
423
+ {
424
+ "inputs": [
425
+ {
426
+ "internalType": "uint32",
427
+ "name": "operator",
428
+ "type": "uint32"
429
+ }
430
+ ],
431
+ "name": "rewardsEligibilityRestorableAt",
432
+ "outputs": [
433
+ {
434
+ "internalType": "uint256",
435
+ "name": "",
436
+ "type": "uint256"
437
+ }
438
+ ],
439
+ "stateMutability": "view",
440
+ "type": "function"
441
+ },
442
+ {
443
+ "inputs": [
444
+ {
445
+ "internalType": "uint256",
446
+ "name": "groupSize",
447
+ "type": "uint256"
448
+ },
449
+ {
450
+ "internalType": "bytes32",
451
+ "name": "seed",
452
+ "type": "bytes32"
453
+ }
454
+ ],
455
+ "name": "selectGroup",
456
+ "outputs": [
457
+ {
458
+ "internalType": "uint32[]",
459
+ "name": "",
460
+ "type": "uint32[]"
461
+ }
462
+ ],
463
+ "stateMutability": "view",
464
+ "type": "function"
465
+ },
466
+ {
467
+ "inputs": [
468
+ {
469
+ "internalType": "uint32[]",
470
+ "name": "operators",
471
+ "type": "uint32[]"
472
+ },
473
+ {
474
+ "internalType": "uint256",
475
+ "name": "until",
476
+ "type": "uint256"
477
+ }
478
+ ],
479
+ "name": "setRewardIneligibility",
480
+ "outputs": [],
481
+ "stateMutability": "nonpayable",
482
+ "type": "function"
483
+ },
484
+ {
485
+ "inputs": [],
486
+ "name": "totalWeight",
487
+ "outputs": [
488
+ {
489
+ "internalType": "uint256",
490
+ "name": "",
491
+ "type": "uint256"
492
+ }
493
+ ],
494
+ "stateMutability": "view",
495
+ "type": "function"
496
+ },
497
+ {
498
+ "inputs": [
499
+ {
500
+ "internalType": "address",
501
+ "name": "newOwner",
502
+ "type": "address"
503
+ }
504
+ ],
505
+ "name": "transferOwnership",
506
+ "outputs": [],
507
+ "stateMutability": "nonpayable",
508
+ "type": "function"
509
+ },
510
+ {
511
+ "inputs": [],
512
+ "name": "unlock",
513
+ "outputs": [],
514
+ "stateMutability": "nonpayable",
515
+ "type": "function"
516
+ },
517
+ {
518
+ "inputs": [
519
+ {
520
+ "internalType": "address",
521
+ "name": "operator",
522
+ "type": "address"
523
+ },
524
+ {
525
+ "internalType": "uint256",
526
+ "name": "authorizedStake",
527
+ "type": "uint256"
528
+ }
529
+ ],
530
+ "name": "updateOperatorStatus",
531
+ "outputs": [],
532
+ "stateMutability": "nonpayable",
533
+ "type": "function"
534
+ },
535
+ {
536
+ "inputs": [
537
+ {
538
+ "internalType": "address",
539
+ "name": "recipient",
540
+ "type": "address"
541
+ }
542
+ ],
543
+ "name": "withdrawIneligible",
544
+ "outputs": [],
545
+ "stateMutability": "nonpayable",
546
+ "type": "function"
547
+ },
548
+ {
549
+ "inputs": [
550
+ {
551
+ "internalType": "address",
552
+ "name": "operator",
553
+ "type": "address"
554
+ },
555
+ {
556
+ "internalType": "address",
557
+ "name": "beneficiary",
558
+ "type": "address"
559
+ }
560
+ ],
561
+ "name": "withdrawRewards",
562
+ "outputs": [
563
+ {
564
+ "internalType": "uint96",
565
+ "name": "",
566
+ "type": "uint96"
567
+ }
568
+ ],
569
+ "stateMutability": "nonpayable",
570
+ "type": "function"
571
+ }
572
+ ],
573
+ "transactionHash": "0x45def068849b1341938b8e8700130c74bc3f4e8cc041f89a916a39ead2e0d49d",
574
+ "receipt": {
575
+ "to": null,
576
+ "from": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
577
+ "contractAddress": "0xAfe1b5bdEbD4ae65AF2024738bf0735fbb65d44b",
578
+ "transactionIndex": 0,
579
+ "gasUsed": "2250686",
580
+ "logsBloom": "0x00000000000000000002000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000001000000000000000000000000000000000800020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000002000000000001000000000000000000000000000000",
581
+ "blockHash": "0xbd3f1dd08bd85c34a4b5b24b040f586846f22aa8c9fecb2ddac44e285e2d6810",
582
+ "transactionHash": "0x45def068849b1341938b8e8700130c74bc3f4e8cc041f89a916a39ead2e0d49d",
583
+ "logs": [
584
+ {
585
+ "transactionIndex": 0,
586
+ "blockNumber": 22,
587
+ "transactionHash": "0x45def068849b1341938b8e8700130c74bc3f4e8cc041f89a916a39ead2e0d49d",
588
+ "address": "0xAfe1b5bdEbD4ae65AF2024738bf0735fbb65d44b",
589
+ "topics": [
590
+ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
591
+ "0x0000000000000000000000000000000000000000000000000000000000000000",
592
+ "0x00000000000000000000000070997970c51812dc3a010c7d01b50e0d17dc79c8"
593
+ ],
594
+ "data": "0x",
595
+ "logIndex": 0,
596
+ "blockHash": "0xbd3f1dd08bd85c34a4b5b24b040f586846f22aa8c9fecb2ddac44e285e2d6810"
597
+ }
598
+ ],
599
+ "blockNumber": 22,
600
+ "cumulativeGasUsed": "2250686",
601
+ "status": 1,
602
+ "byzantium": true
603
+ },
604
+ "args": [
605
+ "0x1275D096B9DBf2347bD2a131Fb6BDaB0B4882487",
606
+ "1000000000000000000"
607
+ ],
608
+ "numDeployments": 1,
609
+ "metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20WithPermit\",\"name\":\"_rewardToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_poolWeightDivisor\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint32[]\",\"name\":\"ids\",\"type\":\"uint32[]\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"until\",\"type\":\"uint256\"}],\"name\":\"IneligibleForRewards\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"}],\"name\":\"RewardEligibilityRestored\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"operator\",\"type\":\"uint32\"}],\"name\":\"canRestoreRewardEligibility\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"getAvailableRewards\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"id\",\"type\":\"uint32\"}],\"name\":\"getIDOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"ids\",\"type\":\"uint32[]\"}],\"name\":\"getIDOperators\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"getOperatorID\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"getPoolWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ineligibleEarnedRewards\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"authorizedStake\",\"type\":\"uint256\"}],\"name\":\"insertOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"operator\",\"type\":\"uint32\"}],\"name\":\"isEligibleForRewards\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isLocked\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isOperatorInPool\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isOperatorRegistered\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"authorizedStake\",\"type\":\"uint256\"}],\"name\":\"isOperatorUpToDate\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"operatorsInPool\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"poolWeightDivisor\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"receiveApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"restoreRewardEligibility\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardToken\",\"outputs\":[{\"internalType\":\"contract IERC20WithPermit\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"operator\",\"type\":\"uint32\"}],\"name\":\"rewardsEligibilityRestorableAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"groupSize\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"seed\",\"type\":\"bytes32\"}],\"name\":\"selectGroup\",\"outputs\":[{\"internalType\":\"uint32[]\",\"name\":\"\",\"type\":\"uint32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32[]\",\"name\":\"operators\",\"type\":\"uint32[]\"},{\"internalType\":\"uint256\",\"name\":\"until\",\"type\":\"uint256\"}],\"name\":\"setRewardIneligibility\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalWeight\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"authorizedStake\",\"type\":\"uint256\"}],\"name\":\"updateOperatorStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"withdrawIneligible\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"}],\"name\":\"withdrawRewards\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"insertOperator(address,uint256)\":{\"details\":\"Can be called only by the contract owner.\",\"params\":{\"authorizedStake\":\"Inserted operator's authorized stake for the application.\",\"operator\":\"Address of the inserted operator.\"}},\"lock()\":{\"details\":\"Can be called only by the contract owner.\"},\"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.\"},\"selectGroup(uint256,bytes32)\":{\"params\":{\"groupSize\":\"Size of the requested group\",\"seed\":\"Pseudo-random number used to select operators to group\"},\"returns\":{\"_0\":\"selected Members of the selected group\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unlock()\":{\"details\":\"Can be called only by the contract owner.\"},\"updateOperatorStatus(address,uint256)\":{\"details\":\"Can be called only by the contract owner.\",\"params\":{\"authorizedStake\":\"Operator's authorized stake for the application.\",\"operator\":\"Address of the updated operator.\"}},\"withdrawIneligible(address)\":{\"details\":\"Can be called only by the owner.\"},\"withdrawRewards(address,address)\":{\"details\":\"Can be called only be the owner. Does not validate if the provided beneficiary is associated with the provided operator - this needs to be done by the owner calling this function.\",\"returns\":{\"_0\":\"The amount of rewards withdrawn in this call.\"}}},\"title\":\"Sortition Pool\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"canRestoreRewardEligibility(uint32)\":{\"notice\":\"Return whether the operator is able to restore their eligibility for rewards right away.\"},\"getAvailableRewards(address)\":{\"notice\":\"Returns the amount of rewards withdrawable for the given operator.\"},\"getPoolWeight(address)\":{\"notice\":\"Return the weight of the operator in the pool, which may or may not be out of date.\"},\"insertOperator(address,uint256)\":{\"notice\":\"Inserts an operator to the pool. Reverts if the operator is already present.\"},\"isEligibleForRewards(uint32)\":{\"notice\":\"Return whether the operator is eligible for rewards or not.\"},\"isOperatorInPool(address)\":{\"notice\":\"Return whether the operator is present in the pool.\"},\"isOperatorUpToDate(address,uint256)\":{\"notice\":\"Return whether the operator's weight in the pool matches their eligible weight.\"},\"lock()\":{\"notice\":\"Locks the sortition pool. In locked state, members cannot be inserted and removed from the pool. Members statuses cannot be updated as well.\"},\"rewardsEligibilityRestorableAt(uint32)\":{\"notice\":\"Return the time the operator's reward eligibility can be restored.\"},\"selectGroup(uint256,bytes32)\":{\"notice\":\"Selects a new group of operators of the provided size based on the provided pseudo-random seed. At least one operator has to be registered in the pool, otherwise the function fails reverting the transaction.\"},\"unlock()\":{\"notice\":\"Unlocks the sortition pool. Removes all restrictions set by the `lock` method.\"},\"updateOperatorStatus(address,uint256)\":{\"notice\":\"Update the operator's weight if present and eligible, or remove from the pool if present and ineligible.\"},\"withdrawIneligible(address)\":{\"notice\":\"Withdraws rewards not allocated to operators marked as ineligible to the given recipient address.\"},\"withdrawRewards(address,address)\":{\"notice\":\"Withdraws all available rewards for the given operator to the given beneficiary.\"}},\"notice\":\"A logarithmic data structure used to store the pool of eligible operators weighted by their stakes. It allows to select a group of operators based on the provided pseudo-random seed.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"@keep-network/sortition-pools/contracts/SortitionPool.sol\":\"SortitionPool\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@keep-network/sortition-pools/contracts/Branch.sol\":{\"content\":\"pragma solidity 0.8.9;\\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 ////////////////////////////////////////////////////////////////////////////\\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 private constant SLOT_BITS = 3;\\n ////////////////////////////////////////////////////////////////////////////\\n\\n ////////////////////////////////////////////////////////////////////////////\\n // Derived constants, do not touch\\n uint256 private constant SLOT_COUNT = 2**SLOT_BITS;\\n uint256 private constant SLOT_WIDTH = 256 / SLOT_COUNT;\\n uint256 private constant LAST_SLOT = SLOT_COUNT - 1;\\n uint256 private constant SLOT_MAX = (2**SLOT_WIDTH) - 1;\\n\\n ////////////////////////////////////////////////////////////////////////////\\n\\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 * 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 * 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) & 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 * 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 & ~(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 * SLOT_WIDTH;\\n // Clear the `position`th slot like in `clearSlot()`.\\n uint256 clearedNode = node & ~(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 & 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 & 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 >> SLOT_WIDTH;\\n while (newNode > 0) {\\n sum += (newNode & SLOT_MAX);\\n newNode = newNode >> 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 & SLOT_MAX;\\n while (newIndex >= currentSlotWeight) {\\n newIndex -= currentSlotWeight;\\n slot++;\\n newNode = newNode >> SLOT_WIDTH;\\n currentSlotWeight = newNode & SLOT_MAX;\\n }\\n return (slot, newIndex);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7ba28c2d49aa038c3a80e3e66a09f035c156abfc1ee3412c8d615c84612bdf29\"},\"@keep-network/sortition-pools/contracts/Leaf.sol\":{\"content\":\"pragma solidity 0.8.9;\\n\\nlibrary Leaf {\\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 private constant SLOT_BITS = 3;\\n ////////////////////////////////////////////////////////////////////////////\\n\\n ////////////////////////////////////////////////////////////////////////////\\n // Derived constants, do not touch\\n uint256 private constant SLOT_COUNT = 2**SLOT_BITS;\\n uint256 private constant SLOT_WIDTH = 256 / SLOT_COUNT;\\n uint256 private constant SLOT_MAX = (2**SLOT_WIDTH) - 1;\\n\\n uint256 private constant ID_WIDTH = SLOT_WIDTH;\\n uint256 private constant ID_MAX = SLOT_MAX;\\n\\n uint256 private constant BLOCKHEIGHT_WIDTH = 96 - ID_WIDTH;\\n uint256 private constant BLOCKHEIGHT_MAX = (2**BLOCKHEIGHT_WIDTH) - 1;\\n\\n ////////////////////////////////////////////////////////////////////////////\\n\\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 & 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 & BLOCKHEIGHT_MAX) << 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 >> ID_WIDTH) & 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 & ID_MAX);\\n }\\n}\\n\",\"keccak256\":\"0xaa56ba64d0990b014ce555b8edfd5e2fb3e62b6fade61e0b6d428c6058a33709\"},\"@keep-network/sortition-pools/contracts/Position.sol\":{\"content\":\"pragma solidity 0.8.9;\\n\\nlibrary Position {\\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 private constant SLOT_BITS = 3;\\n ////////////////////////////////////////////////////////////////////////////\\n\\n ////////////////////////////////////////////////////////////////////////////\\n // Derived constants, do not touch\\n uint256 private constant SLOT_POINTER_MAX = (2**SLOT_BITS) - 1;\\n uint256 private constant LEAF_FLAG = 1 << 255;\\n\\n ////////////////////////////////////////////////////////////////////////////\\n\\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 & 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 >> 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 << SLOT_BITS) | (s & 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 | 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 & (~LEAF_FLAG);\\n }\\n}\\n\",\"keccak256\":\"0x2068219deb725390f294d2a710ec802b519e6e47eca00024034011d21e5fb8ac\"},\"@keep-network/sortition-pools/contracts/RNG.sol\":{\"content\":\"pragma solidity 0.8.9;\\n\\nimport \\\"./Leaf.sol\\\";\\n\\nlibrary RNG {\\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 private constant SLOT_BITS = 3;\\n ////////////////////////////////////////////////////////////////////////////\\n\\n ////////////////////////////////////////////////////////////////////////////\\n // Derived constants, do not touch\\n uint256 private constant SLOT_COUNT = 2**SLOT_BITS;\\n uint256 private constant WEIGHT_WIDTH = 256 / SLOT_COUNT;\\n\\n ////////////////////////////////////////////////////////////////////////////\\n\\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 = 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\":\"0x1b52b2c45669145cbd9fa7337def843e3de69bfde089039a7fcc09f0aa00c81f\"},\"@keep-network/sortition-pools/contracts/Rewards.sol\":{\"content\":\"pragma solidity 0.8.9;\\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) public 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 public\\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\\n /// to restore their eligibility for rewards right away.\\n function canRestoreRewardEligibility(uint32 operator)\\n public\\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\":\"0x608d5d04411469682191b8fe26bbc0d925e1f950e24ac45c272b74e3df2e91cf\"},\"@keep-network/sortition-pools/contracts/SortitionPool.sol\":{\"content\":\"pragma solidity 0.8.9;\\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\\\";\\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 SortitionTree, Rewards, Ownable, IReceiveApproval {\\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.\\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 _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 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 function restoreRewardEligibility(address operator) public {\\n uint32 id = getOperatorID(operator);\\n Rewards.restoreEligibility(id);\\n emit RewardEligibilityRestored(operator, 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\":\"0x93d8bd42838147a475cb4c0086e3175714c9438bc5515fd6065577958d5b2b73\"},\"@keep-network/sortition-pools/contracts/SortitionTree.sol\":{\"content\":\"pragma solidity 0.8.9;\\n\\nimport \\\"./Branch.sol\\\";\\nimport \\\"./Position.sol\\\";\\nimport \\\"./Leaf.sol\\\";\\n\\ncontract SortitionTree {\\n using Branch for uint256;\\n using Position for uint256;\\n using Leaf for uint256;\\n\\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 private constant SLOT_BITS = 3;\\n uint256 private constant LEVELS = 7;\\n ////////////////////////////////////////////////////////////////////////////\\n\\n ////////////////////////////////////////////////////////////////////////////\\n // Derived constants, do not touch\\n uint256 private constant SLOT_COUNT = 2**SLOT_BITS;\\n uint256 private constant SLOT_WIDTH = 256 / SLOT_COUNT;\\n uint256 private constant SLOT_MAX = (2**SLOT_WIDTH) - 1;\\n uint256 private constant POOL_CAPACITY = SLOT_COUNT**LEVELS;\\n ////////////////////////////////////////////////////////////////////////////\\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 mapping(uint256 => mapping(uint256 => uint256)) internal branches;\\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 // 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 // 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 // Return the ID number of the given operator address.\\n // An ID number of 0 means the operator has not been allocated an ID number yet.\\n function getOperatorID(address operator) public view returns (uint32) {\\n return operatorID[operator];\\n }\\n\\n // Get the operator address corresponding to the given ID number.\\n // An empty address means the ID number has not been allocated yet.\\n function getIDOperator(uint32 id) public view returns (address) {\\n return idAddress.length > id ? idAddress[id] : address(0);\\n }\\n\\n // Gets the operator addresses corresponding to the given ID numbers.\\n // An empty 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 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 // checks if operator is already registered in the pool\\n function isOperatorRegistered(address operator) public view returns (bool) {\\n return getFlaggedLeafPosition(operator) != 0;\\n }\\n\\n // Sum the number of operators in each trunk\\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 function totalWeight() public view returns (uint256) {\\n return root.sumWeight();\\n }\\n\\n // Give the operator a new ID number\\n // Does not check if the operator already has an ID number\\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 function _insertOperator(address operator, uint256 weight) internal {\\n require(\\n !isOperatorRegistered(operator),\\n \\\"Operator is already registered in the pool\\\"\\n );\\n\\n uint256 id = getOperatorID(operator);\\n if (id == 0) {\\n id = allocateOperatorID(operator);\\n }\\n\\n uint256 position = getEmptyLeafPosition();\\n // Record the block the operator was inserted in\\n uint256 theLeaf = Leaf.make(operator, block.number, id);\\n\\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 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 root = removeLeaf(unflaggedPosition, root);\\n removeLeafPositionRecord(operator);\\n }\\n\\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 function removeLeafPositionRecord(address operator) internal {\\n flaggedLeafPosition[operator] = 0;\\n }\\n\\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 uint256 newRoot = setLeaf(position, 0, 0, _root);\\n\\n if (isRightmost) {\\n rightmostLeaf = rightmostSubOne;\\n } else {\\n emptyLeaves.push(position);\\n }\\n return newRoot;\\n }\\n\\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 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 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 = 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 function getEmptyLeafPosition() internal returns (uint256) {\\n uint256 rLeaf = rightmostLeaf;\\n bool spaceOnRight = (rLeaf + 1) < 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 function getFlaggedLeafPosition(address operator)\\n internal\\n view\\n returns (uint256)\\n {\\n return flaggedLeafPosition[operator];\\n }\\n\\n function getLeafWeight(uint256 position) internal view returns (uint256) {\\n uint256 slot = position.slot();\\n uint256 parent = position.parent();\\n uint256 node = branches[LEVELS][parent];\\n return node.getSlot(slot);\\n }\\n\\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 <= 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\":\"0x706033e40b631b2bb1d24b230f770c51546c7476605dd1f87475013673c36367\"},\"@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/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (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 `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, 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 `sender` to `recipient` 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 sender,\\n address recipient,\\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\":\"0x61437cb513a887a1bbad006e7b1c8b414478427d33de47c5600af3c748f108da\",\"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\"},\"@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}",
610
+ "bytecode": "0x60e06040523480156200001157600080fd5b5060405162002825380380620028258339810160408190526200003491620000c1565b6000808055600481905560078054600101815590524260805262000058336200006f565b6001600160a01b0390911660a05260c052620000fd565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008060408385031215620000d557600080fd5b82516001600160a01b0381168114620000ed57600080fd5b6020939093015192949293505050565b60805160a05160c0516126ce62000157600039600081816101f901526110b1015260008181610466015281816108940152818161093301528181610b3c0152610e2b015260008181610c89015261177501526126ce6000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c806396c82e5711610104578063dc7520c5116100a2578063f7186ce011610071578063f7186ce0146102d0578063f7c618c114610461578063f7f9a8fa14610488578063f83d08ba146104a857600080fd5b8063dc7520c514610420578063e20981ca14610433578063e7bfd89914610446578063f2fde38b1461044e57600080fd5b8063a7a7d391116100de578063a7a7d391146103d4578063a9649414146103e7578063b2f3db4d146103fa578063be51fb4a1461040d57600080fd5b806396c82e57146103b0578063a4e2d634146103b8578063a69df4b5146103cc57600080fd5b80636b1906f81161017c5780638871ca5d1161014b5780638871ca5d1461034e5780638da5cb5b146103795780638f4ffcb11461038a578063942f68921461039d57600080fd5b80636b1906f8146102d05780636c2530b9146102fb578063715018a61461031b578063873e31fa1461032357600080fd5b80635222580a116101b85780635222580a146102515780635757ed5b146102825780635a48b46b1461029557806369ba3c33146102bd57600080fd5b8063241a4188146101df57806343a3db30146101f45780634de824f01461022e575b600080fd5b6101f26101ed366004612031565b6104b0565b005b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b61024161023c366004612031565b6105b1565b6040519015158152602001610225565b61024161025f36600461206f565b63ffffffff9081166000908152600a6020526040902054600160c01b9004161590565b61021b61029036600461208a565b6105cf565b6102a86102a336600461208a565b61061a565b60405163ffffffff9091168152602001610225565b6102416102cb36600461206f565b61063b565b6102416102de36600461208a565b6001600160a01b0316600090815260036020526040902054151590565b61030e6103093660046120a5565b61064f565b60405161022591906120c7565b6101f26107f1565b61033661033136600461208a565b610827565b6040516001600160601b039091168152602001610225565b61036161035c36600461206f565b610845565b6040516001600160a01b039091168152602001610225565b600b546001600160a01b0316610361565b6101f2610398366004612111565b610892565b6101f26103ab3660046121f1565b6109cb565b61021b610a73565b600b5461024190600160a01b900460ff1681565b6101f2610a85565b600954610336906001600160601b031681565b6101f26103f536600461208a565b610abe565b6101f261040836600461208a565b610bbf565b61021b61041b36600461206f565b610c15565b6101f261042e366004612031565b610cb4565b61033661044136600461223d565b610d71565b61021b610eb2565b6101f261045c36600461208a565b610ecd565b6103617f000000000000000000000000000000000000000000000000000000000000000081565b61049b610496366004612270565b610f68565b60405161022591906122b2565b6101f261106b565b600b546001600160a01b031633146104e35760405162461bcd60e51b81526004016104da906122f3565b60405180910390fd5b600b54600160a01b900460ff16156105355760405162461bcd60e51b815260206004820152601560248201527414dbdc9d1a5d1a5bdb881c1bdbdb081b1bd8dad959605a1b60448201526064016104da565b6000610540826110aa565b90506000811161058a5760405162461bcd60e51b81526020600482015260156024820152744f70657261746f72206e6f7420656c696769626c6560581b60448201526064016104da565b61059483826110d6565b600061059f8461061a565b90506105ab81836111c9565b50505050565b60006105bc836105cf565b6105c5836110aa565b1490505b92915050565b6001600160a01b038116600090815260036020526040812054806105f65750600092915050565b6001600160ff1b038116600061060b82611350565b95945050505050565b50919050565b6001600160a01b031660009081526006602052604090205463ffffffff1690565b60004261064783610c15565b111592915050565b600b54606090600160a01b900460ff166106ab5760405162461bcd60e51b815260206004820152601760248201527f536f72746974696f6e20706f6f6c20756e6c6f636b656400000000000000000060448201526064016104da565b600080549083906106bb836113ad565b90506000811161070d5760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f756768206f70657261746f727320696e20706f6f6c0000000060448201526064016104da565b600080610719836113d4565b905060008867ffffffffffffffff81111561073657610736612328565b60405190808252806020026020018201604052801561075f578160200160208202803683370190505b50905060005b898110156107e457610778858785611407565b965093506000610788858961147f565b6000818152600260205260409020549091506107a38161154a565b8484815181106107b5576107b561233e565b602002602001019063ffffffff16908163ffffffff1681525050505080806107dc9061236a565b915050610765565b5098975050505050505050565b600b546001600160a01b0316331461081b5760405162461bcd60e51b81526004016104da906122f3565b6108256000611583565b565b6000806108338361061a565b905061083e816115d5565b9392505050565b60075460009063ffffffff83161061085e5760006105c9565b60078263ffffffff16815481106108775761087761233e565b6000918252602090912001546001600160a01b031692915050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316146109075760405162461bcd60e51b81526020600482015260116024820152702ab739bab83837b93a32b2103a37b5b2b760791b60448201526064016104da565b6040516323b872dd60e01b81526001600160a01b038681166004830152306024830152604482018690527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90606401602060405180830381600087803b15801561097757600080fd5b505af115801561098b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109af9190612385565b506109c4846109bf6000546113ad565b611681565b5050505050565b600b546001600160a01b031633146109f55760405162461bcd60e51b81526004016104da906122f3565b610a3383838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525085925061173b915050565b7f01f5838e3dde8cf4817b958fe95be92bdfeccb34317e1d9f58d1cfe5230de231838383604051610a66939291906123a7565b60405180910390a1505050565b6000610a806000546113ad565b905090565b600b546001600160a01b03163314610aaf5760405162461bcd60e51b81526004016104da906122f3565b600b805460ff60a01b19169055565b600b546001600160a01b03163314610ae85760405162461bcd60e51b81526004016104da906122f3565b6000610b0b600980546001600160601b031981169091556001600160601b031690565b60405163a9059cbb60e01b81526001600160a01b0384811660048301526001600160601b03831660248301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401602060405180830381600087803b158015610b8257600080fd5b505af1158015610b96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bba9190612385565b505050565b6000610bca8261061a565b9050610bd58161193d565b60405163ffffffff8216906001600160a01b038416907fe61e9f0f049b3bfae1ae903a5e3018c02a008aa0d238ffddf23a4fb4c027853690600090a35050565b63ffffffff8082166000908152600a60205260408120549091600160c01b9091041680610c845760405162461bcd60e51b815260206004820152601960248201527f4f70657261746f7220616c726561647920656c696769626c650000000000000060448201526064016104da565b61083e7f000000000000000000000000000000000000000000000000000000000000000063ffffffff83166123f8565b600b546001600160a01b03163314610cde5760405162461bcd60e51b81526004016104da906122f3565b600b54600160a01b900460ff1615610d305760405162461bcd60e51b815260206004820152601560248201527414dbdc9d1a5d1a5bdb881c1bdbdb081b1bd8dad959605a1b60448201526064016104da565b6000610d3b826110aa565b90506000610d488461061a565b9050610d5481836111c9565b81610d6757610d6284611ad9565b6105ab565b6105ab8483611b4a565b600b546000906001600160a01b03163314610d9e5760405162461bcd60e51b81526004016104da906122f3565b6000610da98461061a565b9050610dbd81610db8866105cf565b6111c9565b63ffffffff81166000908152600a6020526040812080546bffffffffffffffffffffffff60601b198116909155600160601b90046001600160601b031660405163a9059cbb60e01b81526001600160a01b0386811660048301526001600160601b03831660248301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401602060405180830381600087803b158015610e7157600080fd5b505af1158015610e85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea99190612385565b50949350505050565b60045460055460009190610ec68183612410565b9250505090565b600b546001600160a01b03163314610ef75760405162461bcd60e51b81526004016104da906122f3565b6001600160a01b038116610f5c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104da565b610f6581611583565b50565b60075460609060008367ffffffffffffffff811115610f8957610f89612328565b604051908082528060200260200182016040528015610fb2578160200160208202803683370190505b50905060005b84811015610ea9576000868683818110610fd457610fd461233e565b9050602002016020810190610fe9919061206f565b90508063ffffffff168411610fff57600061102e565b60078163ffffffff16815481106110185761101861233e565b6000918252602090912001546001600160a01b03165b8383815181106110405761104061233e565b6001600160a01b039092166020928302919091019091015250806110638161236a565b915050610fb8565b600b546001600160a01b031633146110955760405162461bcd60e51b81526004016104da906122f3565b600b805460ff60a01b1916600160a01b179055565b60006105c97f00000000000000000000000000000000000000000000000000000000000000008361243d565b6001600160a01b0382166000908152600360205260409020541561114f5760405162461bcd60e51b815260206004820152602a60248201527f4f70657261746f7220697320616c7265616479207265676973746572656420696044820152691b881d1a19481c1bdbdb60b21b60648201526084016104da565b600061115a8361061a565b63ffffffff169050806111735761117083611bbb565b90505b600061117d611c7e565b9050600061118c854385611d61565b905061119c828286600054611e3a565b600055600160ff1b82176001600160a01b0390951660009081526003602052604090209490945550505050565b60085463ffffffff8084166000908152600a60209081526040808320815160808101835290546001600160601b03818116808452600160601b8304821695840195909552600160c01b8204871693830193909352600160e01b9004909416606085018190529416939061123c9085612451565b6112469190612479565b9050816040015163ffffffff166000141561127e57808260200181815161126d91906124a8565b6001600160601b03169052506112c1565b6009805482919060009061129c9084906001600160601b03166124a8565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b506001600160601b03918216815263ffffffff928316606082019081529383166000908152600a60209081526040918290208351815492850151939094015196518616600160e01b026001600160e01b0397909616600160c01b02969096166001600160c01b03928516600160601b026001600160c01b03199092169390941692909217919091171617179055565b60008061135c83611e56565b9050600061136a8460031c90565b60008181527fdc686ec4a0ff239c70e7c7c36e8f853eced3bc8618f48d2b816da2a74311237e602052604090205490915061060b81846020021c63ffffffff1690565b63ffffffff8116602082901c5b80156106145763ffffffff8116919091019060201c6113ba565b600081600114156113e757506000919050565b601f5b82816001901b106113fe57600019016113ea565b60010192915050565b6000808080855b82611472576000196001871b0181169150803060405160200161144892919091825260601b6001600160601b031916602082015260340190565b6040516020818303038152906040528051906020012090508782101561146d57600192505b61140e565b9097909650945050505050565b60008282828061148e836113ad565b87106114d35760405162461bcd60e51b8152602060048201526014602482015273125b99195e08195e18d959591cc81dd95a59da1d60621b60448201526064016104da565b6114dd8385611e66565b9450905060025b60078111611534576114f68383611e9d565b60008281526001602090815260408083208484529091529020549450925061151e8486611e66565b955091508061152c8161236a565b9150506114e4565b5061153f8282611e9d565b979650505050505050565b6000600161155a600360026125b7565b6115669061010061243d565b6115719060026125b7565b61157b9190612410565b909116919050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60085463ffffffff8083166000908152600a60209081526040808320815160808101835290546001600160601b038181168352600160601b8204811694830194909452600160c01b81048616928201839052600160e01b900490941660608501529193169190611676576060810151815160009163ffffffff169061165a9085612451565b6116649190612479565b905080826020015161060b91906124a8565b602001519392505050565b6008546000906116a190600160601b90046001600160601b0316846124a8565b905060006116b563ffffffff8416836125c3565b905060006116c963ffffffff8516846125e9565b6008805491925083916000906116e99084906001600160601b03166124a8565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550806008600c6101000a8154816001600160601b0302191690836001600160601b031602179055505050505050565b604080516080810182526000808252602082018190529181018290526060810182905260085490916001600160601b03909116908061179a7f000000000000000000000000000000000000000000000000000000000000000086612410565b905060005b86518110156119345760008782815181106117bc576117bc61233e565b60209081029190910181015163ffffffff8082166000908152600a845260409081902080546001600160601b03600160601b82048116968d01969096529485168b52600160c01b85048316918b01829052600160e01b90940490911660608a01529092501561184f578363ffffffff16876040015163ffffffff16101561184a5763ffffffff841660408801525b61189b565b63ffffffff8085166040890152606088015188519116906118709088612451565b61187a9190612479565b9450848760200181815161188e91906124a8565b6001600160601b03169052505b6001600160601b038681168089526020890151835460408b015160608c01516001600160e01b0319909216600160601b93909516929092027fffffffff00000000ffffffffffffffffffffffff0000000000000000000000001693909317909117600160c01b63ffffffff92831602176001600160e01b0316600160e01b9190921602179055508061192c8161236a565b91505061179f565b50505050505050565b6119468161063b565b6119925760405162461bcd60e51b815260206004820152601960248201527f4f70657261746f72207374696c6c20696e656c696769626c650000000000000060448201526064016104da565b60085463ffffffff8083166000908152600a60209081526040808320815160808101835290546001600160601b03818116808452600160601b8304821695840195909552600160c01b8204871693830193909352600160e01b90049094166060850181905294169390611a059085612451565b611a0f9190612479565b600980549192508291600090611a2f9084906001600160601b03166124a8565b82546001600160601b039182166101009390930a928302928202191691909117909155938416835250506000604080830182815263ffffffff9586168352600a602090815291909220835181549285015193516060909501518716600160e01b026001600160e01b0395909716600160c01b02949094166001600160c01b03938616600160601b026001600160c01b03199093169490951693909317171691909117919091179055565b6001600160a01b03811660009081526003602052604090205480611b0f5760405162461bcd60e51b81526004016104da9061260f565b60006001600160ff1b0382169050611b2981600054611ec7565b600055610bba836001600160a01b0316600090815260036020526040812055565b6001600160a01b038216600090815260036020526040902054611b7f5760405162461bcd60e51b81526004016104da9061260f565b6001600160a01b03821660009081526003602052604081205490546001600160ff1b03821690611bb29082908590611f3c565b60005550505050565b60075460009063ffffffff811115611c0e5760405162461bcd60e51b8152602060048201526016602482015275141bdbdb0818d85c1858da5d1e48195e18d95959195960521b60448201526064016104da565b6001600160a01b03929092166000818152600660205260408120805463ffffffff191663ffffffff86161790556007805460018101825591527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b03191690911790555090565b600454600090816007611c93600360026125b7565b611c9d91906125b7565b611ca88360016123f8565b1090508015611cc557611cbc8260016123f8565b60045550919050565b60055480611d045760405162461bcd60e51b815260206004820152600c60248201526b141bdbdb081a5cc8199d5b1b60a21b60448201526064016104da565b60006005611d13600184612410565b81548110611d2357611d2361233e565b906000526020600020015490506005805480611d4157611d41612655565b600190038181906000526020600020016000905590558094505050505090565b600067ffffffffffffffff831115611d7b57611d7b61266b565b63ffffffff821115611d8f57611d8f61266b565b6001600160601b0319606085901b1660006001611dae600360026125b7565b611dba9061010061243d565b611dc59060026125b7565b611dcf9190612410565b841690506000611de1600360026125b7565b611ded9061010061243d565b6001611dfb600360026125b7565b611e079061010061243d565b611e12906060612410565b611e1d9060026125b7565b611e279190612410565b8716901b92909217179150509392505050565b600084815260026020526040812084905561060b858484611f66565b60006001611571600360026125b7565b6000818363ffffffff81165b808310611e9357600193909301929091039060201c63ffffffff8116611e72565b50505b9250929050565b60006001611ead600360026125b7565b611eb79190612410565b8216600384901b17905092915050565b6000806001600454611ed99190612410565b90508381146000611eec86828088611e3a565b90508115611efe57600483905561060b565b600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00186905595945050505050565b600082611f4885611350565b14611f5f57611f58848484611f66565b905061083e565b508061083e565b6000808080858760075b60028110611fe757611f8182611e56565b9550611f8d8260031c90565b60008281526001602090815260408083208484528252909120805463ffffffff928a0283811b198216938816901b929092179081905590965094509150611fd3846113ad565b925080611fdf81612681565b915050611f70565b50611ff181611e56565b945063ffffffff6020860281811b198916918416901b179998505050505050505050565b80356001600160a01b038116811461202c57600080fd5b919050565b6000806040838503121561204457600080fd5b61204d83612015565b946020939093013593505050565b803563ffffffff8116811461202c57600080fd5b60006020828403121561208157600080fd5b61083e8261205b565b60006020828403121561209c57600080fd5b61083e82612015565b600080604083850312156120b857600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b8181101561210557835163ffffffff16835292840192918401916001016120e3565b50909695505050505050565b60008060008060006080868803121561212957600080fd5b61213286612015565b94506020860135935061214760408701612015565b9250606086013567ffffffffffffffff8082111561216457600080fd5b818801915088601f83011261217857600080fd5b81358181111561218757600080fd5b89602082850101111561219957600080fd5b9699959850939650602001949392505050565b60008083601f8401126121be57600080fd5b50813567ffffffffffffffff8111156121d657600080fd5b6020830191508360208260051b8501011115611e9657600080fd5b60008060006040848603121561220657600080fd5b833567ffffffffffffffff81111561221d57600080fd5b612229868287016121ac565b909790965060209590950135949350505050565b6000806040838503121561225057600080fd5b61225983612015565b915061226760208401612015565b90509250929050565b6000806020838503121561228357600080fd5b823567ffffffffffffffff81111561229a57600080fd5b6122a6858286016121ac565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b818110156121055783516001600160a01b0316835292840192918401916001016122ce565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561237e5761237e612354565b5060010190565b60006020828403121561239757600080fd5b8151801515811461083e57600080fd5b6040808252810183905260008460608301825b868110156123e55763ffffffff6123d08461205b565b168252602092830192909101906001016123ba565b5060209390930193909352509392505050565b6000821982111561240b5761240b612354565b500190565b60008282101561242257612422612354565b500390565b634e487b7160e01b600052601260045260246000fd5b60008261244c5761244c612427565b500490565b60006001600160601b038381169083168181101561247157612471612354565b039392505050565b60006001600160601b038083168185168183048111821515161561249f5761249f612354565b02949350505050565b60006001600160601b038083168185168083038211156124ca576124ca612354565b01949350505050565b600181815b8085111561250e5781600019048211156124f4576124f4612354565b8085161561250157918102915b93841c93908002906124d8565b509250929050565b600082612525575060016105c9565b81612532575060006105c9565b816001811461254857600281146125525761256e565b60019150506105c9565b60ff84111561256357612563612354565b50506001821b6105c9565b5060208310610133831016604e8410600b8410161715612591575081810a6105c9565b61259b83836124d3565b80600019048211156125af576125af612354565b029392505050565b600061083e8383612516565b60006001600160601b03808416806125dd576125dd612427565b92169190910492915050565b60006001600160601b038084168061260357612603612427565b92169190910692915050565b60208082526026908201527f4f70657261746f72206973206e6f74207265676973746572656420696e20746860408201526519481c1bdbdb60d21b606082015260800190565b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052600160045260246000fd5b60008161269057612690612354565b50600019019056fea264697066735822122085d1710959224c8fec872a374df1ee689a05f270bf8740a3f60d5b47c9c9fdd164736f6c63430008090033",
611
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101da5760003560e01c806396c82e5711610104578063dc7520c5116100a2578063f7186ce011610071578063f7186ce0146102d0578063f7c618c114610461578063f7f9a8fa14610488578063f83d08ba146104a857600080fd5b8063dc7520c514610420578063e20981ca14610433578063e7bfd89914610446578063f2fde38b1461044e57600080fd5b8063a7a7d391116100de578063a7a7d391146103d4578063a9649414146103e7578063b2f3db4d146103fa578063be51fb4a1461040d57600080fd5b806396c82e57146103b0578063a4e2d634146103b8578063a69df4b5146103cc57600080fd5b80636b1906f81161017c5780638871ca5d1161014b5780638871ca5d1461034e5780638da5cb5b146103795780638f4ffcb11461038a578063942f68921461039d57600080fd5b80636b1906f8146102d05780636c2530b9146102fb578063715018a61461031b578063873e31fa1461032357600080fd5b80635222580a116101b85780635222580a146102515780635757ed5b146102825780635a48b46b1461029557806369ba3c33146102bd57600080fd5b8063241a4188146101df57806343a3db30146101f45780634de824f01461022e575b600080fd5b6101f26101ed366004612031565b6104b0565b005b61021b7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b61024161023c366004612031565b6105b1565b6040519015158152602001610225565b61024161025f36600461206f565b63ffffffff9081166000908152600a6020526040902054600160c01b9004161590565b61021b61029036600461208a565b6105cf565b6102a86102a336600461208a565b61061a565b60405163ffffffff9091168152602001610225565b6102416102cb36600461206f565b61063b565b6102416102de36600461208a565b6001600160a01b0316600090815260036020526040902054151590565b61030e6103093660046120a5565b61064f565b60405161022591906120c7565b6101f26107f1565b61033661033136600461208a565b610827565b6040516001600160601b039091168152602001610225565b61036161035c36600461206f565b610845565b6040516001600160a01b039091168152602001610225565b600b546001600160a01b0316610361565b6101f2610398366004612111565b610892565b6101f26103ab3660046121f1565b6109cb565b61021b610a73565b600b5461024190600160a01b900460ff1681565b6101f2610a85565b600954610336906001600160601b031681565b6101f26103f536600461208a565b610abe565b6101f261040836600461208a565b610bbf565b61021b61041b36600461206f565b610c15565b6101f261042e366004612031565b610cb4565b61033661044136600461223d565b610d71565b61021b610eb2565b6101f261045c36600461208a565b610ecd565b6103617f000000000000000000000000000000000000000000000000000000000000000081565b61049b610496366004612270565b610f68565b60405161022591906122b2565b6101f261106b565b600b546001600160a01b031633146104e35760405162461bcd60e51b81526004016104da906122f3565b60405180910390fd5b600b54600160a01b900460ff16156105355760405162461bcd60e51b815260206004820152601560248201527414dbdc9d1a5d1a5bdb881c1bdbdb081b1bd8dad959605a1b60448201526064016104da565b6000610540826110aa565b90506000811161058a5760405162461bcd60e51b81526020600482015260156024820152744f70657261746f72206e6f7420656c696769626c6560581b60448201526064016104da565b61059483826110d6565b600061059f8461061a565b90506105ab81836111c9565b50505050565b60006105bc836105cf565b6105c5836110aa565b1490505b92915050565b6001600160a01b038116600090815260036020526040812054806105f65750600092915050565b6001600160ff1b038116600061060b82611350565b95945050505050565b50919050565b6001600160a01b031660009081526006602052604090205463ffffffff1690565b60004261064783610c15565b111592915050565b600b54606090600160a01b900460ff166106ab5760405162461bcd60e51b815260206004820152601760248201527f536f72746974696f6e20706f6f6c20756e6c6f636b656400000000000000000060448201526064016104da565b600080549083906106bb836113ad565b90506000811161070d5760405162461bcd60e51b815260206004820152601c60248201527f4e6f7420656e6f756768206f70657261746f727320696e20706f6f6c0000000060448201526064016104da565b600080610719836113d4565b905060008867ffffffffffffffff81111561073657610736612328565b60405190808252806020026020018201604052801561075f578160200160208202803683370190505b50905060005b898110156107e457610778858785611407565b965093506000610788858961147f565b6000818152600260205260409020549091506107a38161154a565b8484815181106107b5576107b561233e565b602002602001019063ffffffff16908163ffffffff1681525050505080806107dc9061236a565b915050610765565b5098975050505050505050565b600b546001600160a01b0316331461081b5760405162461bcd60e51b81526004016104da906122f3565b6108256000611583565b565b6000806108338361061a565b905061083e816115d5565b9392505050565b60075460009063ffffffff83161061085e5760006105c9565b60078263ffffffff16815481106108775761087761233e565b6000918252602090912001546001600160a01b031692915050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316146109075760405162461bcd60e51b81526020600482015260116024820152702ab739bab83837b93a32b2103a37b5b2b760791b60448201526064016104da565b6040516323b872dd60e01b81526001600160a01b038681166004830152306024830152604482018690527f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90606401602060405180830381600087803b15801561097757600080fd5b505af115801561098b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109af9190612385565b506109c4846109bf6000546113ad565b611681565b5050505050565b600b546001600160a01b031633146109f55760405162461bcd60e51b81526004016104da906122f3565b610a3383838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525085925061173b915050565b7f01f5838e3dde8cf4817b958fe95be92bdfeccb34317e1d9f58d1cfe5230de231838383604051610a66939291906123a7565b60405180910390a1505050565b6000610a806000546113ad565b905090565b600b546001600160a01b03163314610aaf5760405162461bcd60e51b81526004016104da906122f3565b600b805460ff60a01b19169055565b600b546001600160a01b03163314610ae85760405162461bcd60e51b81526004016104da906122f3565b6000610b0b600980546001600160601b031981169091556001600160601b031690565b60405163a9059cbb60e01b81526001600160a01b0384811660048301526001600160601b03831660248301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401602060405180830381600087803b158015610b8257600080fd5b505af1158015610b96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bba9190612385565b505050565b6000610bca8261061a565b9050610bd58161193d565b60405163ffffffff8216906001600160a01b038416907fe61e9f0f049b3bfae1ae903a5e3018c02a008aa0d238ffddf23a4fb4c027853690600090a35050565b63ffffffff8082166000908152600a60205260408120549091600160c01b9091041680610c845760405162461bcd60e51b815260206004820152601960248201527f4f70657261746f7220616c726561647920656c696769626c650000000000000060448201526064016104da565b61083e7f000000000000000000000000000000000000000000000000000000000000000063ffffffff83166123f8565b600b546001600160a01b03163314610cde5760405162461bcd60e51b81526004016104da906122f3565b600b54600160a01b900460ff1615610d305760405162461bcd60e51b815260206004820152601560248201527414dbdc9d1a5d1a5bdb881c1bdbdb081b1bd8dad959605a1b60448201526064016104da565b6000610d3b826110aa565b90506000610d488461061a565b9050610d5481836111c9565b81610d6757610d6284611ad9565b6105ab565b6105ab8483611b4a565b600b546000906001600160a01b03163314610d9e5760405162461bcd60e51b81526004016104da906122f3565b6000610da98461061a565b9050610dbd81610db8866105cf565b6111c9565b63ffffffff81166000908152600a6020526040812080546bffffffffffffffffffffffff60601b198116909155600160601b90046001600160601b031660405163a9059cbb60e01b81526001600160a01b0386811660048301526001600160601b03831660248301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401602060405180830381600087803b158015610e7157600080fd5b505af1158015610e85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea99190612385565b50949350505050565b60045460055460009190610ec68183612410565b9250505090565b600b546001600160a01b03163314610ef75760405162461bcd60e51b81526004016104da906122f3565b6001600160a01b038116610f5c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104da565b610f6581611583565b50565b60075460609060008367ffffffffffffffff811115610f8957610f89612328565b604051908082528060200260200182016040528015610fb2578160200160208202803683370190505b50905060005b84811015610ea9576000868683818110610fd457610fd461233e565b9050602002016020810190610fe9919061206f565b90508063ffffffff168411610fff57600061102e565b60078163ffffffff16815481106110185761101861233e565b6000918252602090912001546001600160a01b03165b8383815181106110405761104061233e565b6001600160a01b039092166020928302919091019091015250806110638161236a565b915050610fb8565b600b546001600160a01b031633146110955760405162461bcd60e51b81526004016104da906122f3565b600b805460ff60a01b1916600160a01b179055565b60006105c97f00000000000000000000000000000000000000000000000000000000000000008361243d565b6001600160a01b0382166000908152600360205260409020541561114f5760405162461bcd60e51b815260206004820152602a60248201527f4f70657261746f7220697320616c7265616479207265676973746572656420696044820152691b881d1a19481c1bdbdb60b21b60648201526084016104da565b600061115a8361061a565b63ffffffff169050806111735761117083611bbb565b90505b600061117d611c7e565b9050600061118c854385611d61565b905061119c828286600054611e3a565b600055600160ff1b82176001600160a01b0390951660009081526003602052604090209490945550505050565b60085463ffffffff8084166000908152600a60209081526040808320815160808101835290546001600160601b03818116808452600160601b8304821695840195909552600160c01b8204871693830193909352600160e01b9004909416606085018190529416939061123c9085612451565b6112469190612479565b9050816040015163ffffffff166000141561127e57808260200181815161126d91906124a8565b6001600160601b03169052506112c1565b6009805482919060009061129c9084906001600160601b03166124a8565b92506101000a8154816001600160601b0302191690836001600160601b031602179055505b506001600160601b03918216815263ffffffff928316606082019081529383166000908152600a60209081526040918290208351815492850151939094015196518616600160e01b026001600160e01b0397909616600160c01b02969096166001600160c01b03928516600160601b026001600160c01b03199092169390941692909217919091171617179055565b60008061135c83611e56565b9050600061136a8460031c90565b60008181527fdc686ec4a0ff239c70e7c7c36e8f853eced3bc8618f48d2b816da2a74311237e602052604090205490915061060b81846020021c63ffffffff1690565b63ffffffff8116602082901c5b80156106145763ffffffff8116919091019060201c6113ba565b600081600114156113e757506000919050565b601f5b82816001901b106113fe57600019016113ea565b60010192915050565b6000808080855b82611472576000196001871b0181169150803060405160200161144892919091825260601b6001600160601b031916602082015260340190565b6040516020818303038152906040528051906020012090508782101561146d57600192505b61140e565b9097909650945050505050565b60008282828061148e836113ad565b87106114d35760405162461bcd60e51b8152602060048201526014602482015273125b99195e08195e18d959591cc81dd95a59da1d60621b60448201526064016104da565b6114dd8385611e66565b9450905060025b60078111611534576114f68383611e9d565b60008281526001602090815260408083208484529091529020549450925061151e8486611e66565b955091508061152c8161236a565b9150506114e4565b5061153f8282611e9d565b979650505050505050565b6000600161155a600360026125b7565b6115669061010061243d565b6115719060026125b7565b61157b9190612410565b909116919050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60085463ffffffff8083166000908152600a60209081526040808320815160808101835290546001600160601b038181168352600160601b8204811694830194909452600160c01b81048616928201839052600160e01b900490941660608501529193169190611676576060810151815160009163ffffffff169061165a9085612451565b6116649190612479565b905080826020015161060b91906124a8565b602001519392505050565b6008546000906116a190600160601b90046001600160601b0316846124a8565b905060006116b563ffffffff8416836125c3565b905060006116c963ffffffff8516846125e9565b6008805491925083916000906116e99084906001600160601b03166124a8565b92506101000a8154816001600160601b0302191690836001600160601b03160217905550806008600c6101000a8154816001600160601b0302191690836001600160601b031602179055505050505050565b604080516080810182526000808252602082018190529181018290526060810182905260085490916001600160601b03909116908061179a7f000000000000000000000000000000000000000000000000000000000000000086612410565b905060005b86518110156119345760008782815181106117bc576117bc61233e565b60209081029190910181015163ffffffff8082166000908152600a845260409081902080546001600160601b03600160601b82048116968d01969096529485168b52600160c01b85048316918b01829052600160e01b90940490911660608a01529092501561184f578363ffffffff16876040015163ffffffff16101561184a5763ffffffff841660408801525b61189b565b63ffffffff8085166040890152606088015188519116906118709088612451565b61187a9190612479565b9450848760200181815161188e91906124a8565b6001600160601b03169052505b6001600160601b038681168089526020890151835460408b015160608c01516001600160e01b0319909216600160601b93909516929092027fffffffff00000000ffffffffffffffffffffffff0000000000000000000000001693909317909117600160c01b63ffffffff92831602176001600160e01b0316600160e01b9190921602179055508061192c8161236a565b91505061179f565b50505050505050565b6119468161063b565b6119925760405162461bcd60e51b815260206004820152601960248201527f4f70657261746f72207374696c6c20696e656c696769626c650000000000000060448201526064016104da565b60085463ffffffff8083166000908152600a60209081526040808320815160808101835290546001600160601b03818116808452600160601b8304821695840195909552600160c01b8204871693830193909352600160e01b90049094166060850181905294169390611a059085612451565b611a0f9190612479565b600980549192508291600090611a2f9084906001600160601b03166124a8565b82546001600160601b039182166101009390930a928302928202191691909117909155938416835250506000604080830182815263ffffffff9586168352600a602090815291909220835181549285015193516060909501518716600160e01b026001600160e01b0395909716600160c01b02949094166001600160c01b03938616600160601b026001600160c01b03199093169490951693909317171691909117919091179055565b6001600160a01b03811660009081526003602052604090205480611b0f5760405162461bcd60e51b81526004016104da9061260f565b60006001600160ff1b0382169050611b2981600054611ec7565b600055610bba836001600160a01b0316600090815260036020526040812055565b6001600160a01b038216600090815260036020526040902054611b7f5760405162461bcd60e51b81526004016104da9061260f565b6001600160a01b03821660009081526003602052604081205490546001600160ff1b03821690611bb29082908590611f3c565b60005550505050565b60075460009063ffffffff811115611c0e5760405162461bcd60e51b8152602060048201526016602482015275141bdbdb0818d85c1858da5d1e48195e18d95959195960521b60448201526064016104da565b6001600160a01b03929092166000818152600660205260408120805463ffffffff191663ffffffff86161790556007805460018101825591527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b03191690911790555090565b600454600090816007611c93600360026125b7565b611c9d91906125b7565b611ca88360016123f8565b1090508015611cc557611cbc8260016123f8565b60045550919050565b60055480611d045760405162461bcd60e51b815260206004820152600c60248201526b141bdbdb081a5cc8199d5b1b60a21b60448201526064016104da565b60006005611d13600184612410565b81548110611d2357611d2361233e565b906000526020600020015490506005805480611d4157611d41612655565b600190038181906000526020600020016000905590558094505050505090565b600067ffffffffffffffff831115611d7b57611d7b61266b565b63ffffffff821115611d8f57611d8f61266b565b6001600160601b0319606085901b1660006001611dae600360026125b7565b611dba9061010061243d565b611dc59060026125b7565b611dcf9190612410565b841690506000611de1600360026125b7565b611ded9061010061243d565b6001611dfb600360026125b7565b611e079061010061243d565b611e12906060612410565b611e1d9060026125b7565b611e279190612410565b8716901b92909217179150509392505050565b600084815260026020526040812084905561060b858484611f66565b60006001611571600360026125b7565b6000818363ffffffff81165b808310611e9357600193909301929091039060201c63ffffffff8116611e72565b50505b9250929050565b60006001611ead600360026125b7565b611eb79190612410565b8216600384901b17905092915050565b6000806001600454611ed99190612410565b90508381146000611eec86828088611e3a565b90508115611efe57600483905561060b565b600580546001810182556000919091527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00186905595945050505050565b600082611f4885611350565b14611f5f57611f58848484611f66565b905061083e565b508061083e565b6000808080858760075b60028110611fe757611f8182611e56565b9550611f8d8260031c90565b60008281526001602090815260408083208484528252909120805463ffffffff928a0283811b198216938816901b929092179081905590965094509150611fd3846113ad565b925080611fdf81612681565b915050611f70565b50611ff181611e56565b945063ffffffff6020860281811b198916918416901b179998505050505050505050565b80356001600160a01b038116811461202c57600080fd5b919050565b6000806040838503121561204457600080fd5b61204d83612015565b946020939093013593505050565b803563ffffffff8116811461202c57600080fd5b60006020828403121561208157600080fd5b61083e8261205b565b60006020828403121561209c57600080fd5b61083e82612015565b600080604083850312156120b857600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b8181101561210557835163ffffffff16835292840192918401916001016120e3565b50909695505050505050565b60008060008060006080868803121561212957600080fd5b61213286612015565b94506020860135935061214760408701612015565b9250606086013567ffffffffffffffff8082111561216457600080fd5b818801915088601f83011261217857600080fd5b81358181111561218757600080fd5b89602082850101111561219957600080fd5b9699959850939650602001949392505050565b60008083601f8401126121be57600080fd5b50813567ffffffffffffffff8111156121d657600080fd5b6020830191508360208260051b8501011115611e9657600080fd5b60008060006040848603121561220657600080fd5b833567ffffffffffffffff81111561221d57600080fd5b612229868287016121ac565b909790965060209590950135949350505050565b6000806040838503121561225057600080fd5b61225983612015565b915061226760208401612015565b90509250929050565b6000806020838503121561228357600080fd5b823567ffffffffffffffff81111561229a57600080fd5b6122a6858286016121ac565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b818110156121055783516001600160a01b0316835292840192918401916001016122ce565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561237e5761237e612354565b5060010190565b60006020828403121561239757600080fd5b8151801515811461083e57600080fd5b6040808252810183905260008460608301825b868110156123e55763ffffffff6123d08461205b565b168252602092830192909101906001016123ba565b5060209390930193909352509392505050565b6000821982111561240b5761240b612354565b500190565b60008282101561242257612422612354565b500390565b634e487b7160e01b600052601260045260246000fd5b60008261244c5761244c612427565b500490565b60006001600160601b038381169083168181101561247157612471612354565b039392505050565b60006001600160601b038083168185168183048111821515161561249f5761249f612354565b02949350505050565b60006001600160601b038083168185168083038211156124ca576124ca612354565b01949350505050565b600181815b8085111561250e5781600019048211156124f4576124f4612354565b8085161561250157918102915b93841c93908002906124d8565b509250929050565b600082612525575060016105c9565b81612532575060006105c9565b816001811461254857600281146125525761256e565b60019150506105c9565b60ff84111561256357612563612354565b50506001821b6105c9565b5060208310610133831016604e8410600b8410161715612591575081810a6105c9565b61259b83836124d3565b80600019048211156125af576125af612354565b029392505050565b600061083e8383612516565b60006001600160601b03808416806125dd576125dd612427565b92169190910492915050565b60006001600160601b038084168061260357612603612427565b92169190910692915050565b60208082526026908201527f4f70657261746f72206973206e6f74207265676973746572656420696e20746860408201526519481c1bdbdb60d21b606082015260800190565b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052600160045260246000fd5b60008161269057612690612354565b50600019019056fea264697066735822122085d1710959224c8fec872a374df1ee689a05f270bf8740a3f60d5b47c9c9fdd164736f6c63430008090033",
612
+ "devdoc": {
613
+ "kind": "dev",
614
+ "methods": {
615
+ "insertOperator(address,uint256)": {
616
+ "details": "Can be called only by the contract owner.",
617
+ "params": {
618
+ "authorizedStake": "Inserted operator's authorized stake for the application.",
619
+ "operator": "Address of the inserted operator."
620
+ }
621
+ },
622
+ "lock()": {
623
+ "details": "Can be called only by the contract owner."
624
+ },
625
+ "owner()": {
626
+ "details": "Returns the address of the current owner."
627
+ },
628
+ "renounceOwnership()": {
629
+ "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."
630
+ },
631
+ "selectGroup(uint256,bytes32)": {
632
+ "params": {
633
+ "groupSize": "Size of the requested group",
634
+ "seed": "Pseudo-random number used to select operators to group"
635
+ },
636
+ "returns": {
637
+ "_0": "selected Members of the selected group"
638
+ }
639
+ },
640
+ "transferOwnership(address)": {
641
+ "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
642
+ },
643
+ "unlock()": {
644
+ "details": "Can be called only by the contract owner."
645
+ },
646
+ "updateOperatorStatus(address,uint256)": {
647
+ "details": "Can be called only by the contract owner.",
648
+ "params": {
649
+ "authorizedStake": "Operator's authorized stake for the application.",
650
+ "operator": "Address of the updated operator."
651
+ }
652
+ },
653
+ "withdrawIneligible(address)": {
654
+ "details": "Can be called only by the owner."
655
+ },
656
+ "withdrawRewards(address,address)": {
657
+ "details": "Can be called only be the owner. Does not validate if the provided beneficiary is associated with the provided operator - this needs to be done by the owner calling this function.",
658
+ "returns": {
659
+ "_0": "The amount of rewards withdrawn in this call."
660
+ }
661
+ }
662
+ },
663
+ "title": "Sortition Pool",
664
+ "version": 1
665
+ },
666
+ "userdoc": {
667
+ "kind": "user",
668
+ "methods": {
669
+ "canRestoreRewardEligibility(uint32)": {
670
+ "notice": "Return whether the operator is able to restore their eligibility for rewards right away."
671
+ },
672
+ "getAvailableRewards(address)": {
673
+ "notice": "Returns the amount of rewards withdrawable for the given operator."
674
+ },
675
+ "getPoolWeight(address)": {
676
+ "notice": "Return the weight of the operator in the pool, which may or may not be out of date."
677
+ },
678
+ "insertOperator(address,uint256)": {
679
+ "notice": "Inserts an operator to the pool. Reverts if the operator is already present."
680
+ },
681
+ "isEligibleForRewards(uint32)": {
682
+ "notice": "Return whether the operator is eligible for rewards or not."
683
+ },
684
+ "isOperatorInPool(address)": {
685
+ "notice": "Return whether the operator is present in the pool."
686
+ },
687
+ "isOperatorUpToDate(address,uint256)": {
688
+ "notice": "Return whether the operator's weight in the pool matches their eligible weight."
689
+ },
690
+ "lock()": {
691
+ "notice": "Locks the sortition pool. In locked state, members cannot be inserted and removed from the pool. Members statuses cannot be updated as well."
692
+ },
693
+ "rewardsEligibilityRestorableAt(uint32)": {
694
+ "notice": "Return the time the operator's reward eligibility can be restored."
695
+ },
696
+ "selectGroup(uint256,bytes32)": {
697
+ "notice": "Selects a new group of operators of the provided size based on the provided pseudo-random seed. At least one operator has to be registered in the pool, otherwise the function fails reverting the transaction."
698
+ },
699
+ "unlock()": {
700
+ "notice": "Unlocks the sortition pool. Removes all restrictions set by the `lock` method."
701
+ },
702
+ "updateOperatorStatus(address,uint256)": {
703
+ "notice": "Update the operator's weight if present and eligible, or remove from the pool if present and ineligible."
704
+ },
705
+ "withdrawIneligible(address)": {
706
+ "notice": "Withdraws rewards not allocated to operators marked as ineligible to the given recipient address."
707
+ },
708
+ "withdrawRewards(address,address)": {
709
+ "notice": "Withdraws all available rewards for the given operator to the given beneficiary."
710
+ }
711
+ },
712
+ "notice": "A logarithmic data structure used to store the pool of eligible operators weighted by their stakes. It allows to select a group of operators based on the provided pseudo-random seed.",
713
+ "version": 1
714
+ },
715
+ "storageLayout": {
716
+ "storage": [
717
+ {
718
+ "astId": 2516,
719
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
720
+ "label": "root",
721
+ "offset": 0,
722
+ "slot": "0",
723
+ "type": "t_uint256"
724
+ },
725
+ {
726
+ "astId": 2522,
727
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
728
+ "label": "branches",
729
+ "offset": 0,
730
+ "slot": "1",
731
+ "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_uint256))"
732
+ },
733
+ {
734
+ "astId": 2526,
735
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
736
+ "label": "leaves",
737
+ "offset": 0,
738
+ "slot": "2",
739
+ "type": "t_mapping(t_uint256,t_uint256)"
740
+ },
741
+ {
742
+ "astId": 2530,
743
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
744
+ "label": "flaggedLeafPosition",
745
+ "offset": 0,
746
+ "slot": "3",
747
+ "type": "t_mapping(t_address,t_uint256)"
748
+ },
749
+ {
750
+ "astId": 2532,
751
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
752
+ "label": "rightmostLeaf",
753
+ "offset": 0,
754
+ "slot": "4",
755
+ "type": "t_uint256"
756
+ },
757
+ {
758
+ "astId": 2535,
759
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
760
+ "label": "emptyLeaves",
761
+ "offset": 0,
762
+ "slot": "5",
763
+ "type": "t_array(t_uint256)dyn_storage"
764
+ },
765
+ {
766
+ "astId": 2539,
767
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
768
+ "label": "operatorID",
769
+ "offset": 0,
770
+ "slot": "6",
771
+ "type": "t_mapping(t_address,t_uint32)"
772
+ },
773
+ {
774
+ "astId": 2542,
775
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
776
+ "label": "idAddress",
777
+ "offset": 0,
778
+ "slot": "7",
779
+ "type": "t_array(t_address)dyn_storage"
780
+ },
781
+ {
782
+ "astId": 1376,
783
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
784
+ "label": "globalRewardAccumulator",
785
+ "offset": 0,
786
+ "slot": "8",
787
+ "type": "t_uint96"
788
+ },
789
+ {
790
+ "astId": 1378,
791
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
792
+ "label": "rewardRoundingDust",
793
+ "offset": 12,
794
+ "slot": "8",
795
+ "type": "t_uint96"
796
+ },
797
+ {
798
+ "astId": 1380,
799
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
800
+ "label": "ineligibleEarnedRewards",
801
+ "offset": 0,
802
+ "slot": "9",
803
+ "type": "t_uint96"
804
+ },
805
+ {
806
+ "astId": 1387,
807
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
808
+ "label": "operatorRewards",
809
+ "offset": 0,
810
+ "slot": "10",
811
+ "type": "t_mapping(t_uint32,t_struct(OperatorRewards)1374_storage)"
812
+ },
813
+ {
814
+ "astId": 4384,
815
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
816
+ "label": "_owner",
817
+ "offset": 0,
818
+ "slot": "11",
819
+ "type": "t_address"
820
+ },
821
+ {
822
+ "astId": 1926,
823
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
824
+ "label": "isLocked",
825
+ "offset": 20,
826
+ "slot": "11",
827
+ "type": "t_bool"
828
+ }
829
+ ],
830
+ "types": {
831
+ "t_address": {
832
+ "encoding": "inplace",
833
+ "label": "address",
834
+ "numberOfBytes": "20"
835
+ },
836
+ "t_array(t_address)dyn_storage": {
837
+ "base": "t_address",
838
+ "encoding": "dynamic_array",
839
+ "label": "address[]",
840
+ "numberOfBytes": "32"
841
+ },
842
+ "t_array(t_uint256)dyn_storage": {
843
+ "base": "t_uint256",
844
+ "encoding": "dynamic_array",
845
+ "label": "uint256[]",
846
+ "numberOfBytes": "32"
847
+ },
848
+ "t_bool": {
849
+ "encoding": "inplace",
850
+ "label": "bool",
851
+ "numberOfBytes": "1"
852
+ },
853
+ "t_mapping(t_address,t_uint256)": {
854
+ "encoding": "mapping",
855
+ "key": "t_address",
856
+ "label": "mapping(address => uint256)",
857
+ "numberOfBytes": "32",
858
+ "value": "t_uint256"
859
+ },
860
+ "t_mapping(t_address,t_uint32)": {
861
+ "encoding": "mapping",
862
+ "key": "t_address",
863
+ "label": "mapping(address => uint32)",
864
+ "numberOfBytes": "32",
865
+ "value": "t_uint32"
866
+ },
867
+ "t_mapping(t_uint256,t_mapping(t_uint256,t_uint256))": {
868
+ "encoding": "mapping",
869
+ "key": "t_uint256",
870
+ "label": "mapping(uint256 => mapping(uint256 => uint256))",
871
+ "numberOfBytes": "32",
872
+ "value": "t_mapping(t_uint256,t_uint256)"
873
+ },
874
+ "t_mapping(t_uint256,t_uint256)": {
875
+ "encoding": "mapping",
876
+ "key": "t_uint256",
877
+ "label": "mapping(uint256 => uint256)",
878
+ "numberOfBytes": "32",
879
+ "value": "t_uint256"
880
+ },
881
+ "t_mapping(t_uint32,t_struct(OperatorRewards)1374_storage)": {
882
+ "encoding": "mapping",
883
+ "key": "t_uint32",
884
+ "label": "mapping(uint32 => struct Rewards.OperatorRewards)",
885
+ "numberOfBytes": "32",
886
+ "value": "t_struct(OperatorRewards)1374_storage"
887
+ },
888
+ "t_struct(OperatorRewards)1374_storage": {
889
+ "encoding": "inplace",
890
+ "label": "struct Rewards.OperatorRewards",
891
+ "members": [
892
+ {
893
+ "astId": 1367,
894
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
895
+ "label": "accumulated",
896
+ "offset": 0,
897
+ "slot": "0",
898
+ "type": "t_uint96"
899
+ },
900
+ {
901
+ "astId": 1369,
902
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
903
+ "label": "available",
904
+ "offset": 12,
905
+ "slot": "0",
906
+ "type": "t_uint96"
907
+ },
908
+ {
909
+ "astId": 1371,
910
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
911
+ "label": "ineligibleUntil",
912
+ "offset": 24,
913
+ "slot": "0",
914
+ "type": "t_uint32"
915
+ },
916
+ {
917
+ "astId": 1373,
918
+ "contract": "@keep-network/sortition-pools/contracts/SortitionPool.sol:SortitionPool",
919
+ "label": "weight",
920
+ "offset": 28,
921
+ "slot": "0",
922
+ "type": "t_uint32"
923
+ }
924
+ ],
925
+ "numberOfBytes": "32"
926
+ },
927
+ "t_uint256": {
928
+ "encoding": "inplace",
929
+ "label": "uint256",
930
+ "numberOfBytes": "32"
931
+ },
932
+ "t_uint32": {
933
+ "encoding": "inplace",
934
+ "label": "uint32",
935
+ "numberOfBytes": "4"
936
+ },
937
+ "t_uint96": {
938
+ "encoding": "inplace",
939
+ "label": "uint96",
940
+ "numberOfBytes": "12"
941
+ }
942
+ }
943
+ }
944
+ }