genlayer-js 0.18.9 → 0.18.11

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.
@@ -137,155 +137,1008 @@ export const VALIDATOR_WALLET_ABI = [
137
137
 
138
138
  export const STAKING_ABI = [
139
139
  // Custom errors from IGenLayerStaking
140
+ {name: "BurnTransferFailed", type: "error", inputs: []},
141
+ {name: "DeepthoughtCallFailed", type: "error", inputs: []},
142
+ {name: "DelegatorBelowMinimumStake", type: "error", inputs: []},
143
+ {name: "DelegatorExitExceedsShares", type: "error", inputs: []},
144
+ {name: "DelegatorExitWouldBeBelowMinimum", type: "error", inputs: []},
145
+ {name: "DelegatorMayNotJoinTwoValidatorsSimultaneously", type: "error", inputs: []},
146
+ {name: "DelegatorMayNotJoinWithZeroValue", type: "error", inputs: []},
147
+ {name: "DelegatorMustExitAllWhenBelowMinimum", type: "error", inputs: []},
148
+ {name: "EpochAdvanceNotReady", type: "error", inputs: []},
149
+ {name: "EpochAlreadyFinalized", type: "error", inputs: []},
150
+ {name: "EpochNotFinalized", type: "error", inputs: []},
151
+ {name: "EpochNotFinished", type: "error", inputs: []},
152
+ {name: "FailedTransfer", type: "error", inputs: [{name: "validator", type: "address"}]},
153
+ {name: "InflationAlreadyInitialized", type: "error", inputs: []},
154
+ {name: "InflationAlreadyReceived", type: "error", inputs: []},
155
+ {name: "InflationInvalidAmount", type: "error", inputs: []},
156
+ {name: "InsufficientInflationFunds", type: "error", inputs: []},
157
+ {name: "InvalidAtEpoch", type: "error", inputs: []},
158
+ {name: "InvalidOperatorAddress", type: "error", inputs: []},
159
+ {name: "MaxNumberOfValidatorsReached", type: "error", inputs: []},
160
+ {name: "MaxValidatorsCannotBeZero", type: "error", inputs: []},
161
+ {name: "NFTMinterCallFailed", type: "error", inputs: []},
162
+ {name: "NFTMinterNotConfigured", type: "error", inputs: []},
163
+ {name: "NoBurning", type: "error", inputs: []},
164
+ {name: "NumberOfValidatorsExceedsAvailable", type: "error", inputs: []},
140
165
  {name: "OnlyGEN", type: "error", inputs: []},
141
- {name: "OnlyTribunal", type: "error", inputs: []},
142
166
  {name: "OnlyIdleness", type: "error", inputs: []},
143
- {name: "OnlyTransactions", type: "error", inputs: []},
144
167
  {name: "OnlyIdlenessOrTribunal", type: "error", inputs: []},
168
+ {name: "OnlyTransactions", type: "error", inputs: []},
145
169
  {name: "OnlyTransactionsOrTribunal", type: "error", inputs: []},
146
- {name: "InvalidAtEpoch", type: "error", inputs: []},
147
- {name: "MaxValidatorsCannotBeZero", type: "error", inputs: []},
170
+ {name: "OnlyTribunal", type: "error", inputs: []},
171
+ {name: "OperatorAlreadyAssigned", type: "error", inputs: []},
172
+ {name: "PendingTribunals", type: "error", inputs: [{name: "epoch", type: "uint256"}]},
173
+ {name: "PreviousEpochNotFinalizable", type: "error", inputs: []},
174
+ {name: "ReductionFactorCannotBeZero", type: "error", inputs: []},
175
+ {name: "ValidatorAlreadyJoined", type: "error", inputs: []},
176
+ {name: "ValidatorBelowMinimumStake", type: "error", inputs: []},
148
177
  {name: "ValidatorExitExceedsShares", type: "error", inputs: []},
149
- {name: "DelegatorExitExceedsShares", type: "error", inputs: []},
150
- {name: "DelegatorMayNotJoinWithZeroValue", type: "error", inputs: []},
151
- {name: "DelegatorMayNotJoinTwoValidatorsSimultaneously", type: "error", inputs: []},
152
- {name: "DelegatorBelowMinimumStake", type: "error", inputs: []},
153
- {name: "DelegatorExitWouldBeBelowMinimum", type: "error", inputs: []},
154
- {name: "ValidatorNotActive", type: "error", inputs: []},
155
178
  {name: "ValidatorMayNotBeDelegator", type: "error", inputs: []},
156
- {name: "ValidatorMustNotBeDelegator", type: "error", inputs: []},
157
- {name: "ValidatorMayNotJoinWithZeroValue", type: "error", inputs: []},
158
179
  {name: "ValidatorMayNotDepositZeroValue", type: "error", inputs: []},
159
- {name: "ValidatorWithdrawalExceedsStake", type: "error", inputs: []},
160
- {name: "ValidatorAlreadyJoined", type: "error", inputs: []},
180
+ {name: "ValidatorMayNotJoinWithZeroValue", type: "error", inputs: []},
181
+ {name: "ValidatorMustNotBeDelegator", type: "error", inputs: []},
182
+ {name: "ValidatorNotActive", type: "error", inputs: []},
161
183
  {name: "ValidatorNotJoined", type: "error", inputs: []},
162
- {name: "ValidatorBelowMinimumStake", type: "error", inputs: []},
163
- {name: "OperatorAlreadyAssigned", type: "error", inputs: []},
164
- {name: "InvalidOperatorAddress", type: "error", inputs: []},
165
- {name: "MaxNumberOfValidatorsReached", type: "error", inputs: []},
184
+ {name: "ValidatorWithdrawalExceedsStake", type: "error", inputs: []},
166
185
  {name: "ValidatorsConsumed", type: "error", inputs: []},
167
186
  {name: "ValidatorsUnavailable", type: "error", inputs: []},
168
- {name: "EpochNotFinished", type: "error", inputs: []},
169
- {name: "EpochNotFinalized", type: "error", inputs: []},
170
- {name: "InflationInvalidAmount", type: "error", inputs: []},
171
- {name: "InflationAlreadyReceived", type: "error", inputs: []},
172
- {name: "InflationAlreadyInitialized", type: "error", inputs: []},
173
- {name: "EpochAlreadyFinalized", type: "error", inputs: []},
174
- {name: "PendingTribunals", type: "error", inputs: [{name: "epoch", type: "uint256"}]},
175
- {name: "FailedTransfer", type: "error", inputs: [{name: "validator", type: "address"}]},
176
- {name: "NFTMinterCallFailed", type: "error", inputs: []},
177
- {name: "DeepthoughtCallFailed", type: "error", inputs: []},
178
- {name: "NFTMinterNotConfigured", type: "error", inputs: []},
179
- {name: "NumberOfValidatorsExceedsAvailable", type: "error", inputs: []},
180
- {name: "EpochAdvanceNotReady", type: "error", inputs: []},
181
- {name: "PreviousEpochNotFinalizable", type: "error", inputs: []},
182
- {name: "NoBurning", type: "error", inputs: []},
183
- {name: "ReductionFactorCannotBeZero", type: "error", inputs: []},
184
187
 
185
- // Validator functions
188
+ // Events
189
+ {
190
+ name: "AllValidatorBansRemoved",
191
+ type: "event",
192
+ inputs: [],
193
+ },
194
+ {
195
+ name: "BurnFailed",
196
+ type: "event",
197
+ inputs: [
198
+ {name: "amount", type: "uint256", indexed: false},
199
+ ],
200
+ },
201
+ {
202
+ name: "BurnToL1",
203
+ type: "event",
204
+ inputs: [
205
+ {name: "amount", type: "uint256", indexed: false},
206
+ ],
207
+ },
208
+ {
209
+ name: "DelegatorClaim",
210
+ type: "event",
211
+ inputs: [
212
+ {name: "delegator", type: "address", indexed: false},
213
+ {name: "amount", type: "uint256", indexed: false},
214
+ ],
215
+ },
216
+ {
217
+ name: "DelegatorExit",
218
+ type: "event",
219
+ inputs: [
220
+ {name: "validator", type: "address", indexed: false},
221
+ {name: "delegator", type: "address", indexed: false},
222
+ {name: "amount", type: "uint256", indexed: false},
223
+ ],
224
+ },
225
+ {
226
+ name: "DelegatorJoin",
227
+ type: "event",
228
+ inputs: [
229
+ {name: "validator", type: "address", indexed: false},
230
+ {name: "delegator", type: "address", indexed: false},
231
+ {name: "amount", type: "uint256", indexed: false},
232
+ ],
233
+ },
234
+ {
235
+ name: "EpochAdvance",
236
+ type: "event",
237
+ inputs: [
238
+ {name: "epoch", type: "uint256", indexed: false},
239
+ ],
240
+ },
241
+ {
242
+ name: "EpochFinalize",
243
+ type: "event",
244
+ inputs: [
245
+ {name: "epoch", type: "uint256", indexed: false},
246
+ ],
247
+ },
248
+ {
249
+ name: "EpochHasPendingTribunals",
250
+ type: "event",
251
+ inputs: [
252
+ {name: "epoch", type: "uint256", indexed: false},
253
+ ],
254
+ },
255
+ {
256
+ name: "EpochZeroEnded",
257
+ type: "event",
258
+ inputs: [
259
+ {name: "timestamp", type: "uint256", indexed: false},
260
+ ],
261
+ },
262
+ {
263
+ name: "FeesReceived",
264
+ type: "event",
265
+ inputs: [
266
+ {name: "sender", type: "address", indexed: true},
267
+ {name: "amount", type: "uint256", indexed: false},
268
+ ],
269
+ },
270
+ {
271
+ name: "InflationInitiated",
272
+ type: "event",
273
+ inputs: [
274
+ {name: "timestamp", type: "uint256", indexed: false},
275
+ ],
276
+ },
277
+ {
278
+ name: "InflationReceived",
279
+ type: "event",
280
+ inputs: [
281
+ {name: "amount", type: "uint256", indexed: false},
282
+ {name: "epoch", type: "uint256", indexed: false},
283
+ ],
284
+ },
285
+ {
286
+ name: "QuarantinesCleanedUp",
287
+ type: "event",
288
+ inputs: [
289
+ {name: "startIndex", type: "uint256", indexed: false},
290
+ {name: "processedCount", type: "uint256", indexed: false},
291
+ {name: "nextIndex", type: "uint256", indexed: false},
292
+ ],
293
+ },
294
+ {
295
+ name: "SetDeepthought",
296
+ type: "event",
297
+ inputs: [
298
+ {name: "deepthought", type: "address", indexed: false},
299
+ ],
300
+ },
301
+ {
302
+ name: "SetDelegatorMinimumStake",
303
+ type: "event",
304
+ inputs: [
305
+ {name: "delegatorMinStake", type: "uint256", indexed: false},
306
+ ],
307
+ },
308
+ {
309
+ name: "SetEpochMinDuration",
310
+ type: "event",
311
+ inputs: [
312
+ {name: "epochMinDuration", type: "uint256", indexed: false},
313
+ ],
314
+ },
315
+ {
316
+ name: "SetEpochMinDurationThreshold",
317
+ type: "event",
318
+ inputs: [
319
+ {name: "epochMinDurationThreshold", type: "uint256", indexed: false},
320
+ ],
321
+ },
322
+ {
323
+ name: "SetEpochZeroMinDuration",
324
+ type: "event",
325
+ inputs: [
326
+ {name: "epochZeroMinDuration", type: "uint256", indexed: false},
327
+ ],
328
+ },
329
+ {
330
+ name: "SetGen",
331
+ type: "event",
332
+ inputs: [
333
+ {name: "gen", type: "address", indexed: false},
334
+ ],
335
+ },
336
+ {
337
+ name: "SetMaxValidators",
338
+ type: "event",
339
+ inputs: [
340
+ {name: "maxValidators", type: "uint256", indexed: false},
341
+ ],
342
+ },
343
+ {
344
+ name: "SetReductionFactor",
345
+ type: "event",
346
+ inputs: [
347
+ {name: "reductionFactor", type: "uint256", indexed: false},
348
+ ],
349
+ },
350
+ {
351
+ name: "SetStakingInvariant",
352
+ type: "event",
353
+ inputs: [
354
+ {name: "stakingInvariant", type: "address", indexed: false},
355
+ ],
356
+ },
357
+ {
358
+ name: "SetTransactionFeesManager",
359
+ type: "event",
360
+ inputs: [
361
+ {name: "transactionFeesManager", type: "address", indexed: false},
362
+ ],
363
+ },
364
+ {
365
+ name: "SetUnbondingPeriods",
366
+ type: "event",
367
+ inputs: [
368
+ {name: "delegatorUnbondingPeriod", type: "uint256", indexed: false},
369
+ {name: "validatorUnbondingPeriod", type: "uint256", indexed: false},
370
+ ],
371
+ },
372
+ {
373
+ name: "SetValidatorMinimumStake",
374
+ type: "event",
375
+ inputs: [
376
+ {name: "validatorMinStake", type: "uint256", indexed: false},
377
+ ],
378
+ },
379
+ {
380
+ name: "SetValidatorWeightParams",
381
+ type: "event",
382
+ inputs: [
383
+ {name: "alpha", type: "uint256", indexed: false},
384
+ {name: "beta", type: "uint256", indexed: false},
385
+ ],
386
+ },
387
+ {
388
+ name: "ValidatorBanRemoved",
389
+ type: "event",
390
+ inputs: [
391
+ {name: "validator", type: "address", indexed: false},
392
+ ],
393
+ },
394
+ {
395
+ name: "ValidatorBannedDeterministic",
396
+ type: "event",
397
+ inputs: [
398
+ {name: "validator", type: "address", indexed: false},
399
+ ],
400
+ },
401
+ {
402
+ name: "ValidatorBannedIdleness",
403
+ type: "event",
404
+ inputs: [
405
+ {name: "validator", type: "address", indexed: false},
406
+ {name: "bannedAt", type: "uint256", indexed: false},
407
+ {name: "bannedUntil", type: "uint256", indexed: false},
408
+ ],
409
+ },
410
+ {
411
+ name: "ValidatorClaim",
412
+ type: "event",
413
+ inputs: [
414
+ {name: "validator", type: "address", indexed: false},
415
+ {name: "amount", type: "uint256", indexed: false},
416
+ ],
417
+ },
418
+ {
419
+ name: "ValidatorDeposit",
420
+ type: "event",
421
+ inputs: [
422
+ {name: "validator", type: "address", indexed: false},
423
+ {name: "amount", type: "uint256", indexed: false},
424
+ ],
425
+ },
426
+ {
427
+ name: "ValidatorExit",
428
+ type: "event",
429
+ inputs: [
430
+ {name: "validator", type: "address", indexed: false},
431
+ {name: "amount", type: "uint256", indexed: false},
432
+ ],
433
+ },
434
+ {
435
+ name: "ValidatorJoin",
436
+ type: "event",
437
+ inputs: [
438
+ {name: "operator", type: "address", indexed: false},
439
+ {name: "validator", type: "address", indexed: false},
440
+ {name: "amount", type: "uint256", indexed: false},
441
+ ],
442
+ },
443
+ {
444
+ name: "ValidatorPrime",
445
+ type: "event",
446
+ inputs: [
447
+ {name: "validator", type: "address", indexed: false},
448
+ {name: "epoch", type: "uint256", indexed: false},
449
+ {name: "validatorRewards", type: "uint256", indexed: false},
450
+ {name: "delegatorRewards", type: "uint256", indexed: false},
451
+ {name: "feeRewards", type: "uint256", indexed: false},
452
+ {name: "feePenalties", type: "uint256", indexed: false},
453
+ ],
454
+ },
455
+ {
456
+ name: "ValidatorQuarantineRemoved",
457
+ type: "event",
458
+ inputs: [
459
+ {name: "validator", type: "address", indexed: false},
460
+ ],
461
+ },
462
+ {
463
+ name: "ValidatorQuarantineRepealed",
464
+ type: "event",
465
+ inputs: [
466
+ {name: "validator", type: "address", indexed: false},
467
+ ],
468
+ },
469
+ {
470
+ name: "ValidatorQuarantined",
471
+ type: "event",
472
+ inputs: [
473
+ {name: "validator", type: "address", indexed: false},
474
+ {name: "quarantinedAt", type: "uint256", indexed: false},
475
+ ],
476
+ },
477
+ {
478
+ name: "ValidatorSlash",
479
+ type: "event",
480
+ inputs: [
481
+ {name: "validator", type: "address", indexed: false},
482
+ {name: "validatorSlashing", type: "uint256", indexed: false},
483
+ {name: "delegatorSlashing", type: "uint256", indexed: false},
484
+ {name: "epoch", type: "uint256", indexed: false},
485
+ ],
486
+ },
487
+ {
488
+ name: "ValidatorsRegistered",
489
+ type: "event",
490
+ inputs: [
491
+ {name: "count", type: "uint256", indexed: false},
492
+ ],
493
+ },
494
+
495
+ // Functions
496
+ {
497
+ name: "activeValidators",
498
+ type: "function",
499
+ stateMutability: "view",
500
+ inputs: [],
501
+ outputs: [{name: "", type: "address[]"}],
502
+ },
503
+ {
504
+ name: "activeValidatorsCount",
505
+ type: "function",
506
+ stateMutability: "view",
507
+ inputs: [],
508
+ outputs: [{name: "", type: "uint256"}],
509
+ },
510
+ {
511
+ name: "activeWeights",
512
+ type: "function",
513
+ stateMutability: "view",
514
+ inputs: [],
515
+ outputs: [{name: "", type: "uint256[]"}],
516
+ },
517
+ {
518
+ name: "adminRegisterValidators",
519
+ type: "function",
520
+ stateMutability: "nonpayable",
521
+ inputs: [{name: "validatorAddresses", type: "address[]"}],
522
+ outputs: [],
523
+ },
524
+ {
525
+ name: "burning",
526
+ type: "function",
527
+ stateMutability: "view",
528
+ inputs: [],
529
+ outputs: [{name: "", type: "uint256"}],
530
+ },
531
+ {
532
+ name: "canAdvance",
533
+ type: "function",
534
+ stateMutability: "view",
535
+ inputs: [],
536
+ outputs: [{name: "", type: "bool"}],
537
+ },
538
+ {
539
+ name: "deepthoughtInflation",
540
+ type: "function",
541
+ stateMutability: "pure",
542
+ inputs: [{name: "_inflation", type: "uint256"}],
543
+ outputs: [{name: "", type: "uint256"}],
544
+ },
545
+ {
546
+ name: "delegatorClaim",
547
+ type: "function",
548
+ stateMutability: "nonpayable",
549
+ inputs: [
550
+ {name: "_delegator", type: "address"},
551
+ {name: "_validator", type: "address"},
552
+ ],
553
+ outputs: [],
554
+ },
555
+ {
556
+ name: "delegatorDeposit",
557
+ type: "function",
558
+ stateMutability: "view",
559
+ inputs: [
560
+ {name: "_delegator", type: "address"},
561
+ {name: "_validator", type: "address"},
562
+ {name: "_index", type: "uint256"},
563
+ ],
564
+ outputs: [
565
+ {
566
+ name: "claim_",
567
+ type: "tuple",
568
+ components: [
569
+ {name: "quantity", type: "uint256"},
570
+ {name: "commit", type: "uint256"},
571
+ ],
572
+ },
573
+ {
574
+ name: "commit_",
575
+ type: "tuple",
576
+ components: [
577
+ {name: "input", type: "uint256"},
578
+ {name: "output", type: "uint256"},
579
+ {name: "epoch", type: "uint256"},
580
+ {name: "linkToNextCommit", type: "uint256"},
581
+ ],
582
+ },
583
+ ],
584
+ },
585
+ {
586
+ name: "delegatorDepositByEpoch",
587
+ type: "function",
588
+ stateMutability: "view",
589
+ inputs: [
590
+ {name: "_delegator", type: "address"},
591
+ {name: "_validator", type: "address"},
592
+ {name: "_epoch", type: "uint256"},
593
+ ],
594
+ outputs: [
595
+ {
596
+ name: "commit_",
597
+ type: "tuple",
598
+ components: [
599
+ {name: "input", type: "uint256"},
600
+ {name: "output", type: "uint256"},
601
+ {name: "epoch", type: "uint256"},
602
+ {name: "linkToNextCommit", type: "uint256"},
603
+ ],
604
+ },
605
+ ],
606
+ },
607
+ {
608
+ name: "delegatorDepositLen",
609
+ type: "function",
610
+ stateMutability: "view",
611
+ inputs: [
612
+ {name: "_delegator", type: "address"},
613
+ {name: "_validator", type: "address"},
614
+ ],
615
+ outputs: [{name: "", type: "uint256"}],
616
+ },
617
+ {
618
+ name: "delegatorExit",
619
+ type: "function",
620
+ stateMutability: "nonpayable",
621
+ inputs: [
622
+ {name: "_validator", type: "address"},
623
+ {name: "_amount", type: "uint256"},
624
+ ],
625
+ outputs: [],
626
+ },
627
+ {
628
+ name: "delegatorJoin",
629
+ type: "function",
630
+ stateMutability: "payable",
631
+ inputs: [{name: "_validator", type: "address"}],
632
+ outputs: [],
633
+ },
634
+ {
635
+ name: "delegatorWithdrawal",
636
+ type: "function",
637
+ stateMutability: "view",
638
+ inputs: [
639
+ {name: "_delegator", type: "address"},
640
+ {name: "_validator", type: "address"},
641
+ {name: "_index", type: "uint256"},
642
+ ],
643
+ outputs: [
644
+ {
645
+ name: "claim_",
646
+ type: "tuple",
647
+ components: [
648
+ {name: "quantity", type: "uint256"},
649
+ {name: "commit", type: "uint256"},
650
+ ],
651
+ },
652
+ {
653
+ name: "commit_",
654
+ type: "tuple",
655
+ components: [
656
+ {name: "input", type: "uint256"},
657
+ {name: "output", type: "uint256"},
658
+ {name: "epoch", type: "uint256"},
659
+ {name: "linkToNextCommit", type: "uint256"},
660
+ ],
661
+ },
662
+ ],
663
+ },
664
+ {
665
+ name: "delegatorWithdrawalByEpoch",
666
+ type: "function",
667
+ stateMutability: "view",
668
+ inputs: [
669
+ {name: "_delegator", type: "address"},
670
+ {name: "_validator", type: "address"},
671
+ {name: "_epoch", type: "uint256"},
672
+ ],
673
+ outputs: [
674
+ {
675
+ name: "commit_",
676
+ type: "tuple",
677
+ components: [
678
+ {name: "input", type: "uint256"},
679
+ {name: "output", type: "uint256"},
680
+ {name: "epoch", type: "uint256"},
681
+ {name: "linkToNextCommit", type: "uint256"},
682
+ ],
683
+ },
684
+ ],
685
+ },
686
+ {
687
+ name: "delegatorWithdrawalLen",
688
+ type: "function",
689
+ stateMutability: "view",
690
+ inputs: [
691
+ {name: "_delegator", type: "address"},
692
+ {name: "_validator", type: "address"},
693
+ ],
694
+ outputs: [{name: "", type: "uint256"}],
695
+ },
696
+ {
697
+ name: "developerInflation",
698
+ type: "function",
699
+ stateMutability: "pure",
700
+ inputs: [{name: "_inflation", type: "uint256"}],
701
+ outputs: [{name: "", type: "uint256"}],
702
+ },
703
+ {
704
+ name: "epoch",
705
+ type: "function",
706
+ stateMutability: "view",
707
+ inputs: [],
708
+ outputs: [{name: "", type: "uint256"}],
709
+ },
710
+ {
711
+ name: "epochAdvance",
712
+ type: "function",
713
+ stateMutability: "nonpayable",
714
+ inputs: [],
715
+ outputs: [],
716
+ },
717
+ {
718
+ name: "epochEven",
719
+ type: "function",
720
+ stateMutability: "view",
721
+ inputs: [],
722
+ outputs: [
723
+ {name: "start", type: "uint256"},
724
+ {name: "end", type: "uint256"},
725
+ {name: "inflation", type: "uint256"},
726
+ {name: "weight", type: "uint256"},
727
+ {name: "weightDeposit", type: "uint256"},
728
+ {name: "weightWithdrawal", type: "uint256"},
729
+ {name: "vcount", type: "uint256"},
730
+ {name: "claimed", type: "uint256"},
731
+ {name: "stakeDeposit", type: "uint256"},
732
+ {name: "stakeWithdrawal", type: "uint256"},
733
+ {name: "slashed", type: "uint256"},
734
+ ],
735
+ },
736
+ {
737
+ name: "epochFinalize",
738
+ type: "function",
739
+ stateMutability: "nonpayable",
740
+ inputs: [],
741
+ outputs: [],
742
+ },
743
+ {
744
+ name: "epochFinalizeImmediate",
745
+ type: "function",
746
+ stateMutability: "nonpayable",
747
+ inputs: [],
748
+ outputs: [],
749
+ },
750
+ {
751
+ name: "epochInflation",
752
+ type: "function",
753
+ stateMutability: "view",
754
+ inputs: [{name: "_epoch", type: "uint256"}],
755
+ outputs: [{name: "", type: "uint256"}],
756
+ },
757
+ {
758
+ name: "epochMinDuration",
759
+ type: "function",
760
+ stateMutability: "view",
761
+ inputs: [],
762
+ outputs: [{name: "", type: "uint256"}],
763
+ },
764
+ {
765
+ name: "epochOdd",
766
+ type: "function",
767
+ stateMutability: "view",
768
+ inputs: [],
769
+ outputs: [
770
+ {name: "start", type: "uint256"},
771
+ {name: "end", type: "uint256"},
772
+ {name: "inflation", type: "uint256"},
773
+ {name: "weight", type: "uint256"},
774
+ {name: "weightDeposit", type: "uint256"},
775
+ {name: "weightWithdrawal", type: "uint256"},
776
+ {name: "vcount", type: "uint256"},
777
+ {name: "claimed", type: "uint256"},
778
+ {name: "stakeDeposit", type: "uint256"},
779
+ {name: "stakeWithdrawal", type: "uint256"},
780
+ {name: "slashed", type: "uint256"},
781
+ ],
782
+ },
783
+ {
784
+ name: "epochZeroMinDuration",
785
+ type: "function",
786
+ stateMutability: "view",
787
+ inputs: [],
788
+ outputs: [{name: "", type: "uint256"}],
789
+ },
790
+ {
791
+ name: "finalized",
792
+ type: "function",
793
+ stateMutability: "view",
794
+ inputs: [],
795
+ outputs: [{name: "", type: "uint256"}],
796
+ },
797
+ {
798
+ name: "getActivatorForSeed",
799
+ type: "function",
800
+ stateMutability: "view",
801
+ inputs: [
802
+ {name: "_randomSeed", type: "bytes32"},
803
+ {name: "_txCreatedTimestamp", type: "uint256"},
804
+ ],
805
+ outputs: [{name: "", type: "address"}],
806
+ },
807
+ {
808
+ name: "getAllBannedValidators",
809
+ type: "function",
810
+ stateMutability: "view",
811
+ inputs: [
812
+ {name: "_startIndex", type: "uint256"},
813
+ {name: "_size", type: "uint256"},
814
+ ],
815
+ outputs: [
816
+ {
817
+ name: "validatorList",
818
+ type: "tuple[]",
819
+ components: [
820
+ {name: "validator", type: "address"},
821
+ {name: "untilEpochBanned", type: "uint256"},
822
+ {name: "permanentlyBanned", type: "bool"},
823
+ ],
824
+ },
825
+ ],
826
+ },
827
+ {
828
+ name: "getAllBannedValidatorsForEpoch",
829
+ type: "function",
830
+ stateMutability: "view",
831
+ inputs: [
832
+ {name: "_epoch", type: "uint256"},
833
+ {name: "_startIndex", type: "uint256"},
834
+ {name: "_size", type: "uint256"},
835
+ ],
836
+ outputs: [
837
+ {
838
+ name: "validatorList",
839
+ type: "tuple[]",
840
+ components: [
841
+ {name: "validator", type: "address"},
842
+ {name: "untilEpochBanned", type: "uint256"},
843
+ {name: "permanentlyBanned", type: "bool"},
844
+ ],
845
+ },
846
+ ],
847
+ },
848
+ {
849
+ name: "getAllQuarantinedValidators",
850
+ type: "function",
851
+ stateMutability: "view",
852
+ inputs: [
853
+ {name: "_startIndex", type: "uint256"},
854
+ {name: "_size", type: "uint256"},
855
+ ],
856
+ outputs: [
857
+ {
858
+ name: "validatorList",
859
+ type: "tuple[]",
860
+ components: [
861
+ {name: "validator", type: "address"},
862
+ {name: "untilEpochBanned", type: "uint256"},
863
+ {name: "permanentlyBanned", type: "bool"},
864
+ ],
865
+ },
866
+ ],
867
+ },
186
868
  {
187
- name: "validatorJoin",
869
+ name: "getAllQuarantinedValidatorsForEpoch",
188
870
  type: "function",
189
- stateMutability: "payable",
190
- inputs: [],
191
- outputs: [{name: "validator", type: "address"}],
871
+ stateMutability: "view",
872
+ inputs: [
873
+ {name: "_epoch", type: "uint256"},
874
+ {name: "_startIndex", type: "uint256"},
875
+ {name: "_size", type: "uint256"},
876
+ ],
877
+ outputs: [
878
+ {
879
+ name: "validatorList",
880
+ type: "tuple[]",
881
+ components: [
882
+ {name: "validator", type: "address"},
883
+ {name: "untilEpochBanned", type: "uint256"},
884
+ {name: "permanentlyBanned", type: "bool"},
885
+ ],
886
+ },
887
+ ],
192
888
  },
193
889
  {
194
- name: "validatorJoin",
890
+ name: "getPendingDelegatorDeposits",
195
891
  type: "function",
196
- stateMutability: "payable",
197
- inputs: [{name: "_operator", type: "address"}],
198
- outputs: [{name: "validator", type: "address"}],
892
+ stateMutability: "view",
893
+ inputs: [
894
+ {name: "_delegator", type: "address"},
895
+ {name: "_validator", type: "address"},
896
+ ],
897
+ outputs: [{name: "total", type: "uint256"}],
199
898
  },
200
899
  {
201
- name: "validatorDeposit",
900
+ name: "getPendingDelegatorWithdrawals",
202
901
  type: "function",
203
- stateMutability: "payable",
902
+ stateMutability: "view",
903
+ inputs: [
904
+ {name: "_delegator", type: "address"},
905
+ {name: "_validator", type: "address"},
906
+ ],
907
+ outputs: [{name: "total", type: "uint256"}],
908
+ },
909
+ {
910
+ name: "getPendingValidatorDeposits",
911
+ type: "function",
912
+ stateMutability: "view",
913
+ inputs: [{name: "_validator", type: "address"}],
914
+ outputs: [{name: "total", type: "uint256"}],
915
+ },
916
+ {
917
+ name: "getPendingValidatorWithdrawals",
918
+ type: "function",
919
+ stateMutability: "view",
920
+ inputs: [{name: "_validator", type: "address"}],
921
+ outputs: [{name: "total", type: "uint256"}],
922
+ },
923
+ {
924
+ name: "getValidatorDelegators",
925
+ type: "function",
926
+ stateMutability: "view",
927
+ inputs: [{name: "_validator", type: "address"}],
928
+ outputs: [{name: "", type: "address[]"}],
929
+ },
930
+ {
931
+ name: "getValidatorDelegatorsPaginated",
932
+ type: "function",
933
+ stateMutability: "view",
934
+ inputs: [
935
+ {name: "_validator", type: "address"},
936
+ {name: "_startIndex", type: "uint256"},
937
+ {name: "_pageSize", type: "uint256"},
938
+ ],
939
+ outputs: [{name: "", type: "address[]"}],
940
+ },
941
+ {
942
+ name: "getValidatorQuarantineList",
943
+ type: "function",
944
+ stateMutability: "view",
204
945
  inputs: [],
205
- outputs: [],
946
+ outputs: [{name: "", type: "address[]"}],
206
947
  },
207
948
  {
208
- name: "validatorExit",
949
+ name: "getValidatorsJoined",
950
+ type: "function",
951
+ stateMutability: "view",
952
+ inputs: [
953
+ {name: "_startIndex", type: "uint256"},
954
+ {name: "_pageSize", type: "uint256"},
955
+ ],
956
+ outputs: [{name: "", type: "address[]"}],
957
+ },
958
+ {
959
+ name: "idlenessBan",
209
960
  type: "function",
210
961
  stateMutability: "nonpayable",
211
- inputs: [{name: "_sharesWithdrawal", type: "uint256"}],
962
+ inputs: [
963
+ {name: "_validator", type: "address"},
964
+ {name: "_at", type: "uint256"},
965
+ {name: "_until", type: "uint256"},
966
+ ],
212
967
  outputs: [],
213
968
  },
214
969
  {
215
- name: "validatorClaim",
970
+ name: "idlenessBanBatch",
216
971
  type: "function",
217
972
  stateMutability: "nonpayable",
218
- inputs: [{name: "_validator", type: "address"}],
973
+ inputs: [
974
+ {name: "_validators", type: "address[]"},
975
+ {name: "_quarantinedAt", type: "uint256"},
976
+ {name: "_quarantinedUntil", type: "uint256"},
977
+ ],
978
+ outputs: [],
979
+ },
980
+ {
981
+ name: "inflationEpoch",
982
+ type: "function",
983
+ stateMutability: "view",
984
+ inputs: [],
219
985
  outputs: [{name: "", type: "uint256"}],
220
986
  },
221
987
  {
222
- name: "validatorPrime",
988
+ name: "inflationInit",
223
989
  type: "function",
224
990
  stateMutability: "nonpayable",
225
- inputs: [{name: "_validator", type: "address"}],
991
+ inputs: [{name: "_inflationOnset", type: "uint256"}],
226
992
  outputs: [],
227
993
  },
228
- // Delegator functions
229
994
  {
230
- name: "delegatorJoin",
995
+ name: "inflationReceive",
231
996
  type: "function",
232
997
  stateMutability: "payable",
233
- inputs: [{name: "_validator", type: "address"}],
998
+ inputs: [{name: "_epoch", type: "uint256"}],
234
999
  outputs: [],
235
1000
  },
236
1001
  {
237
- name: "delegatorExit",
1002
+ name: "isDelegatorOfValidator",
238
1003
  type: "function",
239
- stateMutability: "nonpayable",
1004
+ stateMutability: "view",
240
1005
  inputs: [
241
1006
  {name: "_validator", type: "address"},
242
- {name: "_sharesExit", type: "uint256"},
1007
+ {name: "_delegator", type: "address"},
243
1008
  ],
1009
+ outputs: [{name: "", type: "bool"}],
1010
+ },
1011
+ {
1012
+ name: "isValidator",
1013
+ type: "function",
1014
+ stateMutability: "view",
1015
+ inputs: [{name: "_validator", type: "address"}],
1016
+ outputs: [{name: "", type: "bool"}],
1017
+ },
1018
+ {
1019
+ name: "isValidatorBanned",
1020
+ type: "function",
1021
+ stateMutability: "view",
1022
+ inputs: [{name: "_validator", type: "address"}],
1023
+ outputs: [{name: "", type: "bool"}],
1024
+ },
1025
+ {
1026
+ name: "setDeepthought",
1027
+ type: "function",
1028
+ stateMutability: "nonpayable",
1029
+ inputs: [{name: "_deepthought", type: "address"}],
244
1030
  outputs: [],
245
1031
  },
246
1032
  {
247
- name: "delegatorClaim",
1033
+ name: "setDelegatorMinimumStake",
1034
+ type: "function",
1035
+ stateMutability: "nonpayable",
1036
+ inputs: [{name: "_delegatorMinStake", type: "uint256"}],
1037
+ outputs: [],
1038
+ },
1039
+ {
1040
+ name: "setEpochMinDuration",
1041
+ type: "function",
1042
+ stateMutability: "nonpayable",
1043
+ inputs: [{name: "_epochMinDuration", type: "uint256"}],
1044
+ outputs: [],
1045
+ },
1046
+ {
1047
+ name: "setEpochMinDurationThreshold",
1048
+ type: "function",
1049
+ stateMutability: "nonpayable",
1050
+ inputs: [{name: "_epochMinDurationThreshold", type: "uint256"}],
1051
+ outputs: [],
1052
+ },
1053
+ {
1054
+ name: "setEpochZeroMinDuration",
1055
+ type: "function",
1056
+ stateMutability: "nonpayable",
1057
+ inputs: [{name: "_epochZeroMinDuration", type: "uint256"}],
1058
+ outputs: [],
1059
+ },
1060
+ {
1061
+ name: "setFinalizationPhase",
1062
+ type: "function",
1063
+ stateMutability: "nonpayable",
1064
+ inputs: [{name: "_finalizationPhase", type: "address"}],
1065
+ outputs: [],
1066
+ },
1067
+ {
1068
+ name: "setGen",
1069
+ type: "function",
1070
+ stateMutability: "nonpayable",
1071
+ inputs: [{name: "_gen", type: "address"}],
1072
+ outputs: [],
1073
+ },
1074
+ {
1075
+ name: "setIdlenessPhase",
1076
+ type: "function",
1077
+ stateMutability: "nonpayable",
1078
+ inputs: [{name: "_idlenessPhase", type: "address"}],
1079
+ outputs: [],
1080
+ },
1081
+ {
1082
+ name: "setMaxValidators",
1083
+ type: "function",
1084
+ stateMutability: "nonpayable",
1085
+ inputs: [{name: "_maxValidators", type: "uint256"}],
1086
+ outputs: [],
1087
+ },
1088
+ {
1089
+ name: "setReductionFactor",
1090
+ type: "function",
1091
+ stateMutability: "nonpayable",
1092
+ inputs: [{name: "_reductionFactor", type: "uint256"}],
1093
+ outputs: [],
1094
+ },
1095
+ {
1096
+ name: "setRevealingPhase",
1097
+ type: "function",
1098
+ stateMutability: "nonpayable",
1099
+ inputs: [{name: "_revealingPhase", type: "address"}],
1100
+ outputs: [],
1101
+ },
1102
+ {
1103
+ name: "setStakingInvariant",
1104
+ type: "function",
1105
+ stateMutability: "nonpayable",
1106
+ inputs: [{name: "_stakingInvariant", type: "address"}],
1107
+ outputs: [],
1108
+ },
1109
+ {
1110
+ name: "setTransactionFeesManager",
1111
+ type: "function",
1112
+ stateMutability: "nonpayable",
1113
+ inputs: [{name: "_transactionFeesManager", type: "address"}],
1114
+ outputs: [],
1115
+ },
1116
+ {
1117
+ name: "setUnbondingPeriods",
248
1118
  type: "function",
249
1119
  stateMutability: "nonpayable",
250
1120
  inputs: [
251
- {name: "_delegator", type: "address"},
252
- {name: "_validator", type: "address"},
1121
+ {name: "_delegatorUnbondingPeriod", type: "uint256"},
1122
+ {name: "_validatorUnbondingPeriod", type: "uint256"},
253
1123
  ],
254
1124
  outputs: [],
255
1125
  },
256
- // View functions
257
1126
  {
258
- name: "isValidator",
1127
+ name: "setValidatorMinimumStake",
259
1128
  type: "function",
260
- stateMutability: "view",
261
- inputs: [{name: "_address", type: "address"}],
262
- outputs: [{name: "", type: "bool"}],
1129
+ stateMutability: "nonpayable",
1130
+ inputs: [{name: "_validatorMinStake", type: "uint256"}],
1131
+ outputs: [],
263
1132
  },
264
1133
  {
265
- name: "validatorView",
1134
+ name: "setValidatorWeightParams",
266
1135
  type: "function",
267
- stateMutability: "view",
268
- inputs: [{name: "_validator", type: "address"}],
269
- outputs: [
270
- {
271
- name: "",
272
- type: "tuple",
273
- components: [
274
- {name: "left", type: "address"},
275
- {name: "right", type: "address"},
276
- {name: "parent", type: "address"},
277
- {name: "eBanned", type: "uint256"},
278
- {name: "ePrimed", type: "uint256"},
279
- {name: "vStake", type: "uint256"},
280
- {name: "vShares", type: "uint256"},
281
- {name: "dStake", type: "uint256"},
282
- {name: "dShares", type: "uint256"},
283
- {name: "vDeposit", type: "uint256"},
284
- {name: "vWithdrawal", type: "uint256"},
285
- {name: "live", type: "bool"},
286
- ],
287
- },
1136
+ stateMutability: "nonpayable",
1137
+ inputs: [
1138
+ {name: "_alpha", type: "uint256"},
1139
+ {name: "_beta", type: "uint256"},
288
1140
  ],
1141
+ outputs: [],
289
1142
  },
290
1143
  {
291
1144
  name: "sharesOf",
@@ -308,235 +1161,249 @@ export const STAKING_ABI = [
308
1161
  outputs: [{name: "", type: "uint256"}],
309
1162
  },
310
1163
  {
311
- name: "epoch",
312
- type: "function",
313
- stateMutability: "view",
314
- inputs: [],
315
- outputs: [{name: "", type: "uint256"}],
316
- },
317
- {
318
- name: "finalized",
319
- type: "function",
320
- stateMutability: "view",
321
- inputs: [],
322
- outputs: [{name: "", type: "uint256"}],
323
- },
324
- {
325
- name: "validatorMinStake",
1164
+ name: "validatorBanDeterministic",
326
1165
  type: "function",
327
- stateMutability: "view",
328
- inputs: [],
329
- outputs: [{name: "", type: "uint256"}],
1166
+ stateMutability: "nonpayable",
1167
+ inputs: [{name: "_validator", type: "address"}],
1168
+ outputs: [],
330
1169
  },
331
1170
  {
332
- name: "delegatorMinStake",
1171
+ name: "validatorClaim",
333
1172
  type: "function",
334
- stateMutability: "view",
335
- inputs: [],
1173
+ stateMutability: "nonpayable",
1174
+ inputs: [{name: "_validator", type: "address"}],
336
1175
  outputs: [{name: "", type: "uint256"}],
337
1176
  },
338
1177
  {
339
- name: "activeValidators",
340
- type: "function",
341
- stateMutability: "view",
342
- inputs: [],
343
- outputs: [{name: "", type: "address[]"}],
344
- },
345
- {
346
- name: "activeValidatorsCount",
1178
+ name: "validatorDelegatorCount",
347
1179
  type: "function",
348
1180
  stateMutability: "view",
349
- inputs: [],
1181
+ inputs: [{name: "_validator", type: "address"}],
350
1182
  outputs: [{name: "", type: "uint256"}],
351
1183
  },
352
1184
  {
353
- name: "epochOdd",
1185
+ name: "validatorDeposit",
354
1186
  type: "function",
355
1187
  stateMutability: "view",
356
- inputs: [],
1188
+ inputs: [
1189
+ {name: "_validator", type: "address"},
1190
+ {name: "_index", type: "uint256"},
1191
+ ],
357
1192
  outputs: [
1193
+ {name: "epoch_", type: "uint256"},
358
1194
  {
359
- name: "",
1195
+ name: "commit_",
360
1196
  type: "tuple",
361
1197
  components: [
362
- {name: "start", type: "uint256"},
363
- {name: "end", type: "uint256"},
364
- {name: "inflation", type: "uint256"},
365
- {name: "weight", type: "uint256"},
366
- {name: "weightDeposit", type: "uint256"},
367
- {name: "weightWithdrawal", type: "uint256"},
368
- {name: "vcount", type: "uint256"},
369
- {name: "claimed", type: "uint256"},
370
- {name: "stakeDeposit", type: "uint256"},
371
- {name: "stakeWithdrawal", type: "uint256"},
372
- {name: "slashed", type: "uint256"},
1198
+ {name: "input", type: "uint256"},
1199
+ {name: "output", type: "uint256"},
1200
+ {name: "epoch", type: "uint256"},
1201
+ {name: "linkToNextCommit", type: "uint256"},
373
1202
  ],
374
1203
  },
375
1204
  ],
376
1205
  },
377
1206
  {
378
- name: "epochEven",
1207
+ name: "validatorDeposit",
379
1208
  type: "function",
380
- stateMutability: "view",
1209
+ stateMutability: "payable",
381
1210
  inputs: [],
1211
+ outputs: [],
1212
+ },
1213
+ {
1214
+ name: "validatorDepositByEpoch",
1215
+ type: "function",
1216
+ stateMutability: "view",
1217
+ inputs: [
1218
+ {name: "_validator", type: "address"},
1219
+ {name: "_epoch", type: "uint256"},
1220
+ ],
382
1221
  outputs: [
383
1222
  {
384
- name: "",
1223
+ name: "commit_",
385
1224
  type: "tuple",
386
1225
  components: [
387
- {name: "start", type: "uint256"},
388
- {name: "end", type: "uint256"},
389
- {name: "inflation", type: "uint256"},
390
- {name: "weight", type: "uint256"},
391
- {name: "weightDeposit", type: "uint256"},
392
- {name: "weightWithdrawal", type: "uint256"},
393
- {name: "vcount", type: "uint256"},
394
- {name: "claimed", type: "uint256"},
395
- {name: "stakeDeposit", type: "uint256"},
396
- {name: "stakeWithdrawal", type: "uint256"},
397
- {name: "slashed", type: "uint256"},
1226
+ {name: "input", type: "uint256"},
1227
+ {name: "output", type: "uint256"},
1228
+ {name: "epoch", type: "uint256"},
1229
+ {name: "linkToNextCommit", type: "uint256"},
398
1230
  ],
399
1231
  },
400
1232
  ],
401
1233
  },
402
1234
  {
403
- name: "epochMinDuration",
1235
+ name: "validatorDepositLen",
404
1236
  type: "function",
405
1237
  stateMutability: "view",
406
- inputs: [],
1238
+ inputs: [{name: "_validator", type: "address"}],
407
1239
  outputs: [{name: "", type: "uint256"}],
408
1240
  },
409
1241
  {
410
- name: "epochZeroMinDuration",
1242
+ name: "validatorExit",
411
1243
  type: "function",
412
- stateMutability: "view",
413
- inputs: [],
414
- outputs: [{name: "", type: "uint256"}],
1244
+ stateMutability: "nonpayable",
1245
+ inputs: [{name: "_amount", type: "uint256"}],
1246
+ outputs: [],
415
1247
  },
416
1248
  {
417
- name: "getQuarantinedValidators",
1249
+ name: "validatorJoin",
418
1250
  type: "function",
419
- stateMutability: "view",
1251
+ stateMutability: "payable",
1252
+ inputs: [{name: "_operator", type: "address"}],
1253
+ outputs: [{name: "", type: "address"}],
1254
+ },
1255
+ {
1256
+ name: "validatorJoin",
1257
+ type: "function",
1258
+ stateMutability: "payable",
420
1259
  inputs: [],
421
- outputs: [{name: "", type: "address[]"}],
1260
+ outputs: [{name: "", type: "address"}],
422
1261
  },
423
1262
  {
424
- name: "getAllQuarantinedValidators",
1263
+ name: "validatorPrime",
425
1264
  type: "function",
426
- stateMutability: "view",
427
- inputs: [
428
- {name: "_startIndex", type: "uint256"},
429
- {name: "_size", type: "uint256"},
430
- ],
431
- outputs: [
432
- {
433
- name: "validatorList",
434
- type: "tuple[]",
435
- components: [
436
- {name: "validator", type: "address"},
437
- {name: "untilEpochBanned", type: "uint256"},
438
- {name: "permanentlyBanned", type: "bool"},
439
- ],
440
- },
441
- ],
1265
+ stateMutability: "nonpayable",
1266
+ inputs: [{name: "_validator", type: "address"}],
1267
+ outputs: [],
442
1268
  },
443
1269
  {
444
- name: "getAllBannedValidators",
1270
+ name: "validatorQuarantine",
445
1271
  type: "function",
446
- stateMutability: "view",
1272
+ stateMutability: "nonpayable",
447
1273
  inputs: [
448
- {name: "_startIndex", type: "uint256"},
449
- {name: "_size", type: "uint256"},
450
- ],
451
- outputs: [
452
- {
453
- name: "validatorList",
454
- type: "tuple[]",
455
- components: [
456
- {name: "validator", type: "address"},
457
- {name: "untilEpochBanned", type: "uint256"},
458
- {name: "permanentlyBanned", type: "bool"},
459
- ],
460
- },
1274
+ {name: "_validator", type: "address"},
1275
+ {name: "_at", type: "uint256"},
461
1276
  ],
1277
+ outputs: [],
462
1278
  },
463
- // Deposit query functions
464
1279
  {
465
- name: "validatorDepositLen",
1280
+ name: "validatorQuarantineCount",
466
1281
  type: "function",
467
1282
  stateMutability: "view",
1283
+ inputs: [],
1284
+ outputs: [{name: "", type: "uint256"}],
1285
+ },
1286
+ {
1287
+ name: "validatorQuarantineRepeal",
1288
+ type: "function",
1289
+ stateMutability: "nonpayable",
468
1290
  inputs: [{name: "_validator", type: "address"}],
469
- outputs: [{name: "len_", type: "uint256"}],
1291
+ outputs: [],
470
1292
  },
471
1293
  {
472
- name: "validatorDeposit",
1294
+ name: "validatorSelection",
473
1295
  type: "function",
474
1296
  stateMutability: "view",
475
1297
  inputs: [
476
- {name: "_validator", type: "address"},
477
- {name: "_index", type: "uint256"},
1298
+ {name: "_seed", type: "bytes32"},
1299
+ {name: "_slot", type: "uint256"},
1300
+ {name: "_epoch", type: "uint256"},
1301
+ {name: "_txCreatedTimestamp", type: "uint256"},
1302
+ {name: "_number", type: "uint256"},
1303
+ {name: "_weighted", type: "bool"},
1304
+ {name: "_consumed", type: "address[]"},
478
1305
  ],
479
1306
  outputs: [
480
- {name: "epoch_", type: "uint256"},
481
- {
482
- name: "commit_",
483
- type: "tuple",
484
- components: [
485
- {name: "input", type: "uint256"},
486
- {name: "output", type: "uint256"},
487
- {name: "epoch", type: "uint256"},
488
- {name: "linkToNextCommit", type: "uint256"},
489
- ],
490
- },
1307
+ {name: "leader_", type: "uint256"},
1308
+ {name: "validators_", type: "address[]"},
1309
+ {name: "penalized_", type: "address[]"},
491
1310
  ],
492
1311
  },
493
1312
  {
494
- name: "delegatorDepositLen",
1313
+ name: "validatorSelection",
495
1314
  type: "function",
496
1315
  stateMutability: "view",
497
1316
  inputs: [
498
- {name: "_delegator", type: "address"},
499
- {name: "_validator", type: "address"},
1317
+ {name: "_seed", type: "bytes32"},
1318
+ {name: "_slot", type: "uint256"},
1319
+ {name: "_txCreatedTimestamp", type: "uint256"},
1320
+ {name: "_number", type: "uint256"},
1321
+ {name: "_weighted", type: "bool"},
1322
+ {name: "_consumed", type: "address[]"},
1323
+ ],
1324
+ outputs: [
1325
+ {name: "leader_", type: "uint256"},
1326
+ {name: "validators_", type: "address[]"},
1327
+ {name: "penalized_", type: "address[]"},
500
1328
  ],
501
- outputs: [{name: "", type: "uint256"}],
502
1329
  },
503
1330
  {
504
- name: "delegatorDeposit",
1331
+ name: "validatorView",
505
1332
  type: "function",
506
1333
  stateMutability: "view",
507
- inputs: [
508
- {name: "_delegator", type: "address"},
509
- {name: "_validator", type: "address"},
510
- {name: "_index", type: "uint256"},
511
- ],
1334
+ inputs: [{name: "_validator", type: "address"}],
512
1335
  outputs: [
513
1336
  {
514
- name: "claim_",
1337
+ name: "",
515
1338
  type: "tuple",
516
1339
  components: [
517
- {name: "quantity", type: "uint256"},
518
- {name: "commit", type: "uint256"},
1340
+ {name: "left", type: "address"},
1341
+ {name: "right", type: "address"},
1342
+ {name: "parent", type: "address"},
1343
+ {name: "eBanned", type: "uint256"},
1344
+ {name: "ePrimed", type: "uint256"},
1345
+ {name: "vStake", type: "uint256"},
1346
+ {name: "vShares", type: "uint256"},
1347
+ {name: "dStake", type: "uint256"},
1348
+ {name: "dShares", type: "uint256"},
1349
+ {name: "vDeposit", type: "uint256"},
1350
+ {name: "vWithdrawal", type: "uint256"},
1351
+ {name: "live", type: "bool"},
519
1352
  ],
520
1353
  },
1354
+ ],
1355
+ },
1356
+ {
1357
+ name: "validatorViewPrePrimed",
1358
+ type: "function",
1359
+ stateMutability: "view",
1360
+ inputs: [{name: "_validator", type: "address"}],
1361
+ outputs: [
521
1362
  {
522
- name: "commit_",
1363
+ name: "",
523
1364
  type: "tuple",
524
1365
  components: [
525
- {name: "input", type: "uint256"},
526
- {name: "output", type: "uint256"},
527
- {name: "epoch", type: "uint256"},
528
- {name: "linkToNextCommit", type: "uint256"},
1366
+ {name: "left", type: "address"},
1367
+ {name: "right", type: "address"},
1368
+ {name: "parent", type: "address"},
1369
+ {name: "eBanned", type: "uint256"},
1370
+ {name: "ePrimed", type: "uint256"},
1371
+ {name: "vStake", type: "uint256"},
1372
+ {name: "vShares", type: "uint256"},
1373
+ {name: "dStake", type: "uint256"},
1374
+ {name: "dShares", type: "uint256"},
1375
+ {name: "vDeposit", type: "uint256"},
1376
+ {name: "vWithdrawal", type: "uint256"},
1377
+ {name: "live", type: "bool"},
529
1378
  ],
530
1379
  },
531
1380
  ],
532
1381
  },
533
- // Withdrawal query functions
534
1382
  {
535
- name: "validatorWithdrawalLen",
1383
+ name: "validatorViewPrimed",
536
1384
  type: "function",
537
1385
  stateMutability: "view",
538
1386
  inputs: [{name: "_validator", type: "address"}],
539
- outputs: [{name: "len_", type: "uint256"}],
1387
+ outputs: [
1388
+ {
1389
+ name: "",
1390
+ type: "tuple",
1391
+ components: [
1392
+ {name: "left", type: "address"},
1393
+ {name: "right", type: "address"},
1394
+ {name: "parent", type: "address"},
1395
+ {name: "eBanned", type: "uint256"},
1396
+ {name: "ePrimed", type: "uint256"},
1397
+ {name: "vStake", type: "uint256"},
1398
+ {name: "vShares", type: "uint256"},
1399
+ {name: "dStake", type: "uint256"},
1400
+ {name: "dShares", type: "uint256"},
1401
+ {name: "vDeposit", type: "uint256"},
1402
+ {name: "vWithdrawal", type: "uint256"},
1403
+ {name: "live", type: "bool"},
1404
+ ],
1405
+ },
1406
+ ],
540
1407
  },
541
1408
  {
542
1409
  name: "validatorWithdrawal",
@@ -561,33 +1428,14 @@ export const STAKING_ABI = [
561
1428
  ],
562
1429
  },
563
1430
  {
564
- name: "delegatorWithdrawalLen",
565
- type: "function",
566
- stateMutability: "view",
567
- inputs: [
568
- {name: "_delegator", type: "address"},
569
- {name: "_validator", type: "address"},
570
- ],
571
- outputs: [{name: "", type: "uint256"}],
572
- },
573
- {
574
- name: "delegatorWithdrawal",
1431
+ name: "validatorWithdrawalByEpoch",
575
1432
  type: "function",
576
1433
  stateMutability: "view",
577
1434
  inputs: [
578
- {name: "_delegator", type: "address"},
579
1435
  {name: "_validator", type: "address"},
580
- {name: "_index", type: "uint256"},
1436
+ {name: "_epoch", type: "uint256"},
581
1437
  ],
582
1438
  outputs: [
583
- {
584
- name: "claim_",
585
- type: "tuple",
586
- components: [
587
- {name: "quantity", type: "uint256"},
588
- {name: "commit", type: "uint256"},
589
- ],
590
- },
591
1439
  {
592
1440
  name: "commit_",
593
1441
  type: "tuple",
@@ -600,67 +1448,33 @@ export const STAKING_ABI = [
600
1448
  },
601
1449
  ],
602
1450
  },
603
- // Events (none indexed to match deployed contract)
604
- {
605
- name: "ValidatorJoin",
606
- type: "event",
607
- inputs: [
608
- {name: "operator", type: "address", indexed: false},
609
- {name: "validator", type: "address", indexed: false},
610
- {name: "amount", type: "uint256", indexed: false},
611
- ],
612
- },
613
- {
614
- name: "ValidatorDeposit",
615
- type: "event",
616
- inputs: [
617
- {name: "validator", type: "address", indexed: false},
618
- {name: "amount", type: "uint256", indexed: false},
619
- ],
620
- },
621
1451
  {
622
- name: "ValidatorExit",
623
- type: "event",
624
- inputs: [
625
- {name: "validator", type: "address", indexed: false},
626
- {name: "shares", type: "uint256", indexed: false},
627
- ],
1452
+ name: "validatorWithdrawalLen",
1453
+ type: "function",
1454
+ stateMutability: "view",
1455
+ inputs: [{name: "_validator", type: "address"}],
1456
+ outputs: [{name: "", type: "uint256"}],
628
1457
  },
629
1458
  {
630
- name: "DelegatorJoin",
631
- type: "event",
632
- inputs: [
633
- {name: "delegator", type: "address", indexed: false},
634
- {name: "validator", type: "address", indexed: false},
635
- {name: "amount", type: "uint256", indexed: false},
636
- ],
1459
+ name: "validatorsCount",
1460
+ type: "function",
1461
+ stateMutability: "view",
1462
+ inputs: [],
1463
+ outputs: [{name: "", type: "uint256"}],
637
1464
  },
638
1465
  {
639
- name: "ValidatorPrime",
640
- type: "event",
641
- inputs: [
642
- {name: "validator", type: "address", indexed: false},
643
- {name: "epoch", type: "uint256", indexed: false},
644
- {name: "validatorRewards", type: "uint256", indexed: false},
645
- {name: "delegatorRewards", type: "uint256", indexed: false},
646
- ],
1466
+ name: "validatorsJoinedCount",
1467
+ type: "function",
1468
+ stateMutability: "view",
1469
+ inputs: [],
1470
+ outputs: [{name: "", type: "uint256"}],
647
1471
  },
648
- // External contracts getter
649
1472
  {
650
- name: "contracts",
1473
+ name: "validatorsRoot",
651
1474
  type: "function",
652
1475
  stateMutability: "view",
653
1476
  inputs: [],
654
- outputs: [
655
- {name: "gen", type: "address"},
656
- {name: "transactions", type: "address"},
657
- {name: "idleness", type: "address"},
658
- {name: "tribunal", type: "address"},
659
- {name: "slashing", type: "address"},
660
- {name: "consensus", type: "address"},
661
- {name: "validatorWalletFactory", type: "address"},
662
- {name: "nftMinter", type: "address"},
663
- ],
1477
+ outputs: [{name: "", type: "address"}],
664
1478
  },
665
1479
  ] as const;
666
1480