genlayer-js 0.18.10 → 0.18.12

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 (76) hide show
  1. package/dist/chains/index.cjs +2 -2
  2. package/dist/chains/index.js +1 -1
  3. package/dist/{chunk-PPBY3UXF.cjs → chunk-5TKVNHAO.cjs} +1118 -305
  4. package/dist/{chunk-WZNF2WK4.js → chunk-NOFMB7RP.js} +1118 -305
  5. package/dist/{index-D9ONjYgl.d.cts → index-DsN7LGHA.d.cts} +1615 -459
  6. package/dist/{index-ZDqJWXj0.d.ts → index-sw3NAvBf.d.ts} +1615 -459
  7. package/dist/index.cjs +58 -58
  8. package/dist/index.d.cts +1 -1
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.js +28 -28
  11. package/dist/types/index.d.cts +1 -1
  12. package/dist/types/index.d.ts +1 -1
  13. package/package.json +11 -1
  14. package/.eslintignore +0 -2
  15. package/.eslintrc.cjs +0 -59
  16. package/.github/pull_request_template.md +0 -43
  17. package/.github/workflows/publish.yml +0 -41
  18. package/.github/workflows/test.yml +0 -33
  19. package/.prettierignore +0 -19
  20. package/.prettierrc +0 -12
  21. package/.release-it.json +0 -64
  22. package/CHANGELOG.md +0 -304
  23. package/CLAUDE.md +0 -66
  24. package/CONTRIBUTING.md +0 -87
  25. package/renovate.json +0 -20
  26. package/src/abi/calldata/consts.ts +0 -14
  27. package/src/abi/calldata/decoder.ts +0 -86
  28. package/src/abi/calldata/encoder.ts +0 -178
  29. package/src/abi/calldata/index.ts +0 -3
  30. package/src/abi/calldata/string.ts +0 -83
  31. package/src/abi/index.ts +0 -6
  32. package/src/abi/staking.ts +0 -687
  33. package/src/abi/transactions.ts +0 -11
  34. package/src/accounts/IAccountActions.ts +0 -5
  35. package/src/accounts/account.ts +0 -9
  36. package/src/accounts/actions.ts +0 -34
  37. package/src/chains/actions.ts +0 -40
  38. package/src/chains/index.ts +0 -4
  39. package/src/chains/localnet.ts +0 -4016
  40. package/src/chains/studionet.ts +0 -4017
  41. package/src/chains/testnetAsimov.ts +0 -4013
  42. package/src/client/client.ts +0 -139
  43. package/src/config/snapID.ts +0 -4
  44. package/src/config/transactions.ts +0 -9
  45. package/src/contracts/actions.ts +0 -387
  46. package/src/global.d.ts +0 -9
  47. package/src/index.ts +0 -12
  48. package/src/staking/actions.ts +0 -691
  49. package/src/staking/index.ts +0 -2
  50. package/src/staking/utils.ts +0 -22
  51. package/src/transactions/ITransactionActions.ts +0 -15
  52. package/src/transactions/actions.ts +0 -113
  53. package/src/transactions/decoders.ts +0 -275
  54. package/src/types/accounts.ts +0 -1
  55. package/src/types/calldata.ts +0 -31
  56. package/src/types/chains.ts +0 -22
  57. package/src/types/clients.ts +0 -106
  58. package/src/types/contracts.ts +0 -32
  59. package/src/types/index.ts +0 -9
  60. package/src/types/metamaskClientResult.ts +0 -5
  61. package/src/types/network.ts +0 -1
  62. package/src/types/snapSource.ts +0 -1
  63. package/src/types/staking.ts +0 -225
  64. package/src/types/transactions.ts +0 -312
  65. package/src/utils/async.ts +0 -3
  66. package/src/utils/jsonifier.ts +0 -119
  67. package/src/wallet/actions.ts +0 -10
  68. package/src/wallet/connect.ts +0 -67
  69. package/src/wallet/metamaskClient.ts +0 -50
  70. package/tests/client.test-d.ts +0 -67
  71. package/tests/client.test.ts +0 -197
  72. package/tests/smoke.test.ts +0 -59
  73. package/tests/transactions.test.ts +0 -142
  74. package/tsconfig.json +0 -119
  75. package/tsconfig.vitest-temp.json +0 -41
  76. package/vitest.config.ts +0 -18
@@ -1,687 +0,0 @@
1
- // ValidatorWallet ABI for querying and managing validator wallet
2
- export const VALIDATOR_WALLET_ABI = [
3
- // Custom errors
4
- {name: "NotOperator", type: "error", inputs: []},
5
- {name: "InvalidAddress", type: "error", inputs: []},
6
- {name: "TransferFailed", type: "error", inputs: []},
7
- {name: "OperatorTransferNotReady", type: "error", inputs: []},
8
- {name: "NoPendingOperator", type: "error", inputs: []},
9
- // OpenZeppelin Ownable errors
10
- {name: "OwnableUnauthorizedAccount", type: "error", inputs: [{name: "account", type: "address"}]},
11
- {name: "OwnableInvalidOwner", type: "error", inputs: [{name: "owner", type: "address"}]},
12
-
13
- // Functions
14
- {
15
- name: "operator",
16
- type: "function",
17
- stateMutability: "view",
18
- inputs: [],
19
- outputs: [{name: "", type: "address"}],
20
- },
21
- {
22
- name: "owner",
23
- type: "function",
24
- stateMutability: "view",
25
- inputs: [],
26
- outputs: [{name: "", type: "address"}],
27
- },
28
- {
29
- name: "getIdentity",
30
- type: "function",
31
- stateMutability: "view",
32
- inputs: [],
33
- outputs: [
34
- {
35
- name: "",
36
- type: "tuple",
37
- components: [
38
- {name: "moniker", type: "string"},
39
- {name: "logoUri", type: "string"},
40
- {name: "website", type: "string"},
41
- {name: "description", type: "string"},
42
- {name: "email", type: "string"},
43
- {name: "twitter", type: "string"},
44
- {name: "telegram", type: "string"},
45
- {name: "github", type: "string"},
46
- {name: "extraCid", type: "bytes"},
47
- ],
48
- },
49
- ],
50
- },
51
- {
52
- name: "setOperator",
53
- type: "function",
54
- stateMutability: "nonpayable",
55
- inputs: [{name: "_operator", type: "address"}],
56
- outputs: [],
57
- },
58
- {
59
- name: "setIdentity",
60
- type: "function",
61
- stateMutability: "nonpayable",
62
- inputs: [
63
- {name: "moniker", type: "string"},
64
- {name: "logoUri", type: "string"},
65
- {name: "website", type: "string"},
66
- {name: "description", type: "string"},
67
- {name: "email", type: "string"},
68
- {name: "twitter", type: "string"},
69
- {name: "telegram", type: "string"},
70
- {name: "github", type: "string"},
71
- {name: "extraCid", type: "bytes"},
72
- ],
73
- outputs: [],
74
- },
75
- // Staking functions (forwarded to staking contract)
76
- {
77
- name: "validatorDeposit",
78
- type: "function",
79
- stateMutability: "payable",
80
- inputs: [],
81
- outputs: [],
82
- },
83
- {
84
- name: "validatorExit",
85
- type: "function",
86
- stateMutability: "nonpayable",
87
- inputs: [{name: "_shares", type: "uint256"}],
88
- outputs: [],
89
- },
90
- {
91
- name: "validatorClaim",
92
- type: "function",
93
- stateMutability: "nonpayable",
94
- inputs: [],
95
- outputs: [],
96
- },
97
- // Two-step operator transfer
98
- {
99
- name: "initiateOperatorTransfer",
100
- type: "function",
101
- stateMutability: "nonpayable",
102
- inputs: [{name: "_newOperator", type: "address"}],
103
- outputs: [],
104
- },
105
- {
106
- name: "completeOperatorTransfer",
107
- type: "function",
108
- stateMutability: "nonpayable",
109
- inputs: [],
110
- outputs: [],
111
- },
112
- {
113
- name: "cancelOperatorTransfer",
114
- type: "function",
115
- stateMutability: "nonpayable",
116
- inputs: [],
117
- outputs: [],
118
- },
119
- {
120
- name: "getPendingOperator",
121
- type: "function",
122
- stateMutability: "view",
123
- inputs: [],
124
- outputs: [
125
- {name: "", type: "address"},
126
- {name: "", type: "uint256"},
127
- ],
128
- },
129
- {
130
- name: "getOperator",
131
- type: "function",
132
- stateMutability: "view",
133
- inputs: [],
134
- outputs: [{name: "", type: "address"}],
135
- },
136
- ] as const;
137
-
138
- export const STAKING_ABI = [
139
- // Custom errors from IGenLayerStaking
140
- {name: "OnlyGEN", type: "error", inputs: []},
141
- {name: "OnlyTribunal", type: "error", inputs: []},
142
- {name: "OnlyIdleness", type: "error", inputs: []},
143
- {name: "OnlyTransactions", type: "error", inputs: []},
144
- {name: "OnlyIdlenessOrTribunal", type: "error", inputs: []},
145
- {name: "OnlyTransactionsOrTribunal", type: "error", inputs: []},
146
- {name: "InvalidAtEpoch", type: "error", inputs: []},
147
- {name: "MaxValidatorsCannotBeZero", type: "error", inputs: []},
148
- {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
- {name: "ValidatorMayNotBeDelegator", type: "error", inputs: []},
156
- {name: "ValidatorMustNotBeDelegator", type: "error", inputs: []},
157
- {name: "ValidatorMayNotJoinWithZeroValue", type: "error", inputs: []},
158
- {name: "ValidatorMayNotDepositZeroValue", type: "error", inputs: []},
159
- {name: "ValidatorWithdrawalExceedsStake", type: "error", inputs: []},
160
- {name: "ValidatorAlreadyJoined", type: "error", inputs: []},
161
- {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: []},
166
- {name: "ValidatorsConsumed", type: "error", inputs: []},
167
- {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
-
185
- // Validator functions
186
- {
187
- name: "validatorJoin",
188
- type: "function",
189
- stateMutability: "payable",
190
- inputs: [],
191
- outputs: [{name: "validator", type: "address"}],
192
- },
193
- {
194
- name: "validatorJoin",
195
- type: "function",
196
- stateMutability: "payable",
197
- inputs: [{name: "_operator", type: "address"}],
198
- outputs: [{name: "validator", type: "address"}],
199
- },
200
- {
201
- name: "validatorDeposit",
202
- type: "function",
203
- stateMutability: "payable",
204
- inputs: [],
205
- outputs: [],
206
- },
207
- {
208
- name: "validatorExit",
209
- type: "function",
210
- stateMutability: "nonpayable",
211
- inputs: [{name: "_sharesWithdrawal", type: "uint256"}],
212
- outputs: [],
213
- },
214
- {
215
- name: "validatorClaim",
216
- type: "function",
217
- stateMutability: "nonpayable",
218
- inputs: [{name: "_validator", type: "address"}],
219
- outputs: [{name: "", type: "uint256"}],
220
- },
221
- {
222
- name: "validatorPrime",
223
- type: "function",
224
- stateMutability: "nonpayable",
225
- inputs: [{name: "_validator", type: "address"}],
226
- outputs: [],
227
- },
228
- // Delegator functions
229
- {
230
- name: "delegatorJoin",
231
- type: "function",
232
- stateMutability: "payable",
233
- inputs: [{name: "_validator", type: "address"}],
234
- outputs: [],
235
- },
236
- {
237
- name: "delegatorExit",
238
- type: "function",
239
- stateMutability: "nonpayable",
240
- inputs: [
241
- {name: "_validator", type: "address"},
242
- {name: "_sharesExit", type: "uint256"},
243
- ],
244
- outputs: [],
245
- },
246
- {
247
- name: "delegatorClaim",
248
- type: "function",
249
- stateMutability: "nonpayable",
250
- inputs: [
251
- {name: "_delegator", type: "address"},
252
- {name: "_validator", type: "address"},
253
- ],
254
- outputs: [],
255
- },
256
- // View functions
257
- {
258
- name: "isValidator",
259
- type: "function",
260
- stateMutability: "view",
261
- inputs: [{name: "_address", type: "address"}],
262
- outputs: [{name: "", type: "bool"}],
263
- },
264
- {
265
- name: "validatorView",
266
- 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
- },
288
- ],
289
- },
290
- {
291
- name: "sharesOf",
292
- type: "function",
293
- stateMutability: "view",
294
- inputs: [
295
- {name: "_delegator", type: "address"},
296
- {name: "_validator", type: "address"},
297
- ],
298
- outputs: [{name: "", type: "uint256"}],
299
- },
300
- {
301
- name: "stakeOf",
302
- type: "function",
303
- stateMutability: "view",
304
- inputs: [
305
- {name: "_delegator", type: "address"},
306
- {name: "_validator", type: "address"},
307
- ],
308
- outputs: [{name: "", type: "uint256"}],
309
- },
310
- {
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",
326
- type: "function",
327
- stateMutability: "view",
328
- inputs: [],
329
- outputs: [{name: "", type: "uint256"}],
330
- },
331
- {
332
- name: "delegatorMinStake",
333
- type: "function",
334
- stateMutability: "view",
335
- inputs: [],
336
- outputs: [{name: "", type: "uint256"}],
337
- },
338
- {
339
- name: "activeValidators",
340
- type: "function",
341
- stateMutability: "view",
342
- inputs: [],
343
- outputs: [{name: "", type: "address[]"}],
344
- },
345
- {
346
- name: "activeValidatorsCount",
347
- type: "function",
348
- stateMutability: "view",
349
- inputs: [],
350
- outputs: [{name: "", type: "uint256"}],
351
- },
352
- {
353
- name: "epochOdd",
354
- type: "function",
355
- stateMutability: "view",
356
- inputs: [],
357
- outputs: [
358
- {
359
- name: "",
360
- type: "tuple",
361
- 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"},
373
- ],
374
- },
375
- ],
376
- },
377
- {
378
- name: "epochEven",
379
- type: "function",
380
- stateMutability: "view",
381
- inputs: [],
382
- outputs: [
383
- {
384
- name: "",
385
- type: "tuple",
386
- 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"},
398
- ],
399
- },
400
- ],
401
- },
402
- {
403
- name: "epochMinDuration",
404
- type: "function",
405
- stateMutability: "view",
406
- inputs: [],
407
- outputs: [{name: "", type: "uint256"}],
408
- },
409
- {
410
- name: "epochZeroMinDuration",
411
- type: "function",
412
- stateMutability: "view",
413
- inputs: [],
414
- outputs: [{name: "", type: "uint256"}],
415
- },
416
- {
417
- name: "getQuarantinedValidators",
418
- type: "function",
419
- stateMutability: "view",
420
- inputs: [],
421
- outputs: [{name: "", type: "address[]"}],
422
- },
423
- {
424
- name: "getAllQuarantinedValidators",
425
- 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
- ],
442
- },
443
- {
444
- name: "getAllBannedValidators",
445
- type: "function",
446
- stateMutability: "view",
447
- 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
- },
461
- ],
462
- },
463
- // Deposit query functions
464
- {
465
- name: "validatorDepositLen",
466
- type: "function",
467
- stateMutability: "view",
468
- inputs: [{name: "_validator", type: "address"}],
469
- outputs: [{name: "len_", type: "uint256"}],
470
- },
471
- {
472
- name: "validatorDeposit",
473
- type: "function",
474
- stateMutability: "view",
475
- inputs: [
476
- {name: "_validator", type: "address"},
477
- {name: "_index", type: "uint256"},
478
- ],
479
- 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
- },
491
- ],
492
- },
493
- {
494
- name: "delegatorDepositLen",
495
- type: "function",
496
- stateMutability: "view",
497
- inputs: [
498
- {name: "_delegator", type: "address"},
499
- {name: "_validator", type: "address"},
500
- ],
501
- outputs: [{name: "", type: "uint256"}],
502
- },
503
- {
504
- name: "delegatorDeposit",
505
- type: "function",
506
- stateMutability: "view",
507
- inputs: [
508
- {name: "_delegator", type: "address"},
509
- {name: "_validator", type: "address"},
510
- {name: "_index", type: "uint256"},
511
- ],
512
- outputs: [
513
- {
514
- name: "claim_",
515
- type: "tuple",
516
- components: [
517
- {name: "quantity", type: "uint256"},
518
- {name: "commit", type: "uint256"},
519
- ],
520
- },
521
- {
522
- name: "commit_",
523
- type: "tuple",
524
- components: [
525
- {name: "input", type: "uint256"},
526
- {name: "output", type: "uint256"},
527
- {name: "epoch", type: "uint256"},
528
- {name: "linkToNextCommit", type: "uint256"},
529
- ],
530
- },
531
- ],
532
- },
533
- // Withdrawal query functions
534
- {
535
- name: "validatorWithdrawalLen",
536
- type: "function",
537
- stateMutability: "view",
538
- inputs: [{name: "_validator", type: "address"}],
539
- outputs: [{name: "len_", type: "uint256"}],
540
- },
541
- {
542
- name: "validatorWithdrawal",
543
- type: "function",
544
- stateMutability: "view",
545
- inputs: [
546
- {name: "_validator", type: "address"},
547
- {name: "_index", type: "uint256"},
548
- ],
549
- outputs: [
550
- {name: "epoch_", type: "uint256"},
551
- {
552
- name: "commit_",
553
- type: "tuple",
554
- components: [
555
- {name: "input", type: "uint256"},
556
- {name: "output", type: "uint256"},
557
- {name: "epoch", type: "uint256"},
558
- {name: "linkToNextCommit", type: "uint256"},
559
- ],
560
- },
561
- ],
562
- },
563
- {
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",
575
- type: "function",
576
- stateMutability: "view",
577
- inputs: [
578
- {name: "_delegator", type: "address"},
579
- {name: "_validator", type: "address"},
580
- {name: "_index", type: "uint256"},
581
- ],
582
- outputs: [
583
- {
584
- name: "claim_",
585
- type: "tuple",
586
- components: [
587
- {name: "quantity", type: "uint256"},
588
- {name: "commit", type: "uint256"},
589
- ],
590
- },
591
- {
592
- name: "commit_",
593
- type: "tuple",
594
- components: [
595
- {name: "input", type: "uint256"},
596
- {name: "output", type: "uint256"},
597
- {name: "epoch", type: "uint256"},
598
- {name: "linkToNextCommit", type: "uint256"},
599
- ],
600
- },
601
- ],
602
- },
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
- {
622
- name: "ValidatorExit",
623
- type: "event",
624
- inputs: [
625
- {name: "validator", type: "address", indexed: false},
626
- {name: "shares", type: "uint256", indexed: false},
627
- ],
628
- },
629
- {
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
- ],
637
- },
638
- {
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
- ],
647
- },
648
- // External contracts getter
649
- {
650
- name: "contracts",
651
- type: "function",
652
- stateMutability: "view",
653
- 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
- ],
664
- },
665
- ] as const;
666
-
667
- // Slash contract ABI for slashing events
668
- export const SLASH_ABI = [
669
- {
670
- name: "SlashedFromIdleness",
671
- type: "event",
672
- inputs: [
673
- {name: "validator", type: "address", indexed: true},
674
- {name: "txId", type: "bytes32", indexed: false},
675
- {name: "epoch", type: "uint256", indexed: false},
676
- {name: "percentage", type: "uint256", indexed: false},
677
- ],
678
- },
679
- {
680
- name: "SlashEnacted",
681
- type: "event",
682
- inputs: [
683
- {name: "validator", type: "address", indexed: true},
684
- {name: "epoch", type: "uint256", indexed: false},
685
- ],
686
- },
687
- ] as const;
@@ -1,11 +0,0 @@
1
- import {toHex, toRlp} from "viem";
2
-
3
- import type {TransactionDataElement} from "../types/calldata";
4
-
5
- export function serializeOne(data: TransactionDataElement): `0x${string}` {
6
- return toHex(data)
7
- }
8
-
9
- export function serialize(data: TransactionDataElement[]): `0x${string}` {
10
- return toRlp(data.map(serializeOne));
11
- }
@@ -1,5 +0,0 @@
1
- import {Address, TransactionHash} from "@/types";
2
-
3
- export type IAccountActions = {
4
- fundAccount: ({address, amount}: {address: Address; amount: number}) => Promise<TransactionHash>;
5
- };