@b3dotfun/sdk 0.0.51 → 0.0.52-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/cjs/anyspend/abis/upsideStaking.d.ts +2058 -0
  2. package/dist/cjs/anyspend/abis/upsideStaking.js +1139 -0
  3. package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.d.ts +11 -0
  4. package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.js +44 -0
  5. package/dist/cjs/anyspend/types/chain.d.ts +1 -0
  6. package/dist/cjs/anyspend/utils/chain.js +56 -47
  7. package/dist/cjs/global-account/react/components/B3DynamicModal.js +5 -0
  8. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +21 -1
  9. package/dist/cjs/shared/utils/simplehash.d.ts +1 -1
  10. package/dist/esm/anyspend/abis/upsideStaking.d.ts +2058 -0
  11. package/dist/esm/anyspend/abis/upsideStaking.js +1136 -0
  12. package/dist/esm/anyspend/react/components/AnySpendStakeUpside.d.ts +11 -0
  13. package/dist/esm/anyspend/react/components/AnySpendStakeUpside.js +38 -0
  14. package/dist/esm/anyspend/types/chain.d.ts +1 -0
  15. package/dist/esm/anyspend/utils/chain.js +57 -48
  16. package/dist/esm/global-account/react/components/B3DynamicModal.js +5 -0
  17. package/dist/esm/global-account/react/stores/useModalStore.d.ts +21 -1
  18. package/dist/esm/shared/utils/simplehash.d.ts +1 -1
  19. package/dist/styles/index.css +1 -1
  20. package/dist/types/anyspend/abis/upsideStaking.d.ts +2058 -0
  21. package/dist/types/anyspend/react/components/AnySpendStakeUpside.d.ts +11 -0
  22. package/dist/types/anyspend/types/chain.d.ts +1 -0
  23. package/dist/types/global-account/react/stores/useModalStore.d.ts +21 -1
  24. package/dist/types/shared/utils/simplehash.d.ts +1 -1
  25. package/package.json +1 -1
  26. package/src/anyspend/abis/upsideStaking.ts +1137 -0
  27. package/src/anyspend/react/components/AnySpendStakeUpside.tsx +96 -0
  28. package/src/anyspend/types/chain.ts +1 -0
  29. package/src/anyspend/utils/chain.ts +49 -53
  30. package/src/global-account/react/components/B3DynamicModal.tsx +5 -0
  31. package/src/global-account/react/stores/useModalStore.ts +22 -0
@@ -0,0 +1,1139 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.B3_STAKING_CONTRACT = exports.WETH_STAKING_CONTRACT = void 0;
4
+ exports.WETH_STAKING_CONTRACT = [
5
+ { inputs: [{ internalType: "address", name: "target", type: "address" }], name: "AddressEmptyCode", type: "error" },
6
+ {
7
+ inputs: [{ internalType: "address", name: "implementation", type: "address" }],
8
+ name: "ERC1967InvalidImplementation",
9
+ type: "error",
10
+ },
11
+ { inputs: [], name: "ERC1967NonPayable", type: "error" },
12
+ { inputs: [], name: "EnforcedPause", type: "error" },
13
+ { inputs: [], name: "ExpectedPause", type: "error" },
14
+ { inputs: [], name: "FailedCall", type: "error" },
15
+ { inputs: [], name: "InvalidInitialization", type: "error" },
16
+ { inputs: [], name: "NotInitializing", type: "error" },
17
+ { inputs: [{ internalType: "address", name: "owner", type: "address" }], name: "OwnableInvalidOwner", type: "error" },
18
+ {
19
+ inputs: [{ internalType: "address", name: "account", type: "address" }],
20
+ name: "OwnableUnauthorizedAccount",
21
+ type: "error",
22
+ },
23
+ { inputs: [], name: "ReentrancyGuardReentrantCall", type: "error" },
24
+ {
25
+ inputs: [{ internalType: "address", name: "token", type: "address" }],
26
+ name: "SafeERC20FailedOperation",
27
+ type: "error",
28
+ },
29
+ { inputs: [], name: "UUPSUnauthorizedCallContext", type: "error" },
30
+ {
31
+ inputs: [{ internalType: "bytes32", name: "slot", type: "bytes32" }],
32
+ name: "UUPSUnsupportedProxiableUUID",
33
+ type: "error",
34
+ },
35
+ {
36
+ anonymous: false,
37
+ inputs: [
38
+ { indexed: true, internalType: "address", name: "user", type: "address" },
39
+ { indexed: true, internalType: "address", name: "to", type: "address" },
40
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
41
+ { indexed: false, internalType: "uint256", name: "requestIndex", type: "uint256" },
42
+ { indexed: false, internalType: "uint256", name: "timestamp", type: "uint256" },
43
+ { indexed: false, internalType: "uint256", name: "nonce", type: "uint256" },
44
+ ],
45
+ name: "DelayedUnstakeClaimed",
46
+ type: "event",
47
+ },
48
+ {
49
+ anonymous: false,
50
+ inputs: [
51
+ { indexed: true, internalType: "address", name: "user", type: "address" },
52
+ { indexed: true, internalType: "address", name: "to", type: "address" },
53
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
54
+ { indexed: false, internalType: "uint256", name: "newTotal", type: "uint256" },
55
+ { indexed: false, internalType: "uint256", name: "requestTime", type: "uint256" },
56
+ { indexed: false, internalType: "uint256", name: "claimableTime", type: "uint256" },
57
+ { indexed: false, internalType: "uint256", name: "requestIndex", type: "uint256" },
58
+ { indexed: true, internalType: "uint256", name: "nonce", type: "uint256" },
59
+ ],
60
+ name: "DelayedUnstakeRequested",
61
+ type: "event",
62
+ },
63
+ {
64
+ anonymous: false,
65
+ inputs: [
66
+ { indexed: true, internalType: "address", name: "token", type: "address" },
67
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
68
+ ],
69
+ name: "EmergencyWithdraw",
70
+ type: "event",
71
+ },
72
+ {
73
+ anonymous: false,
74
+ inputs: [
75
+ { indexed: true, internalType: "address", name: "oldRecipient", type: "address" },
76
+ { indexed: true, internalType: "address", name: "newRecipient", type: "address" },
77
+ ],
78
+ name: "FeeRecipientUpdated",
79
+ type: "event",
80
+ },
81
+ {
82
+ anonymous: false,
83
+ inputs: [{ indexed: false, internalType: "uint64", name: "version", type: "uint64" }],
84
+ name: "Initialized",
85
+ type: "event",
86
+ },
87
+ {
88
+ anonymous: false,
89
+ inputs: [
90
+ { indexed: false, internalType: "uint256", name: "oldFee", type: "uint256" },
91
+ { indexed: false, internalType: "uint256", name: "newFee", type: "uint256" },
92
+ ],
93
+ name: "InstantUnstakeFeeUpdated",
94
+ type: "event",
95
+ },
96
+ {
97
+ anonymous: false,
98
+ inputs: [
99
+ { indexed: true, internalType: "address", name: "user", type: "address" },
100
+ { indexed: true, internalType: "address", name: "to", type: "address" },
101
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
102
+ { indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
103
+ { indexed: false, internalType: "uint256", name: "netAmount", type: "uint256" },
104
+ { indexed: false, internalType: "uint256", name: "newTotal", type: "uint256" },
105
+ { indexed: false, internalType: "uint256", name: "timestamp", type: "uint256" },
106
+ { indexed: true, internalType: "uint256", name: "nonce", type: "uint256" },
107
+ { indexed: false, internalType: "address", name: "feeRecipient", type: "address" },
108
+ ],
109
+ name: "InstantUnstaked",
110
+ type: "event",
111
+ },
112
+ {
113
+ anonymous: false,
114
+ inputs: [
115
+ { indexed: true, internalType: "address", name: "previousOwner", type: "address" },
116
+ { indexed: true, internalType: "address", name: "newOwner", type: "address" },
117
+ ],
118
+ name: "OwnershipTransferred",
119
+ type: "event",
120
+ },
121
+ {
122
+ anonymous: false,
123
+ inputs: [{ indexed: false, internalType: "address", name: "account", type: "address" }],
124
+ name: "Paused",
125
+ type: "event",
126
+ },
127
+ {
128
+ anonymous: false,
129
+ inputs: [
130
+ { indexed: true, internalType: "address", name: "staker", type: "address" },
131
+ { indexed: true, internalType: "address", name: "user", type: "address" },
132
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
133
+ { indexed: false, internalType: "uint256", name: "newTotal", type: "uint256" },
134
+ { indexed: false, internalType: "uint256", name: "timestamp", type: "uint256" },
135
+ { indexed: false, internalType: "uint256", name: "nonce", type: "uint256" },
136
+ ],
137
+ name: "Staked",
138
+ type: "event",
139
+ },
140
+ {
141
+ anonymous: false,
142
+ inputs: [
143
+ { indexed: true, internalType: "address", name: "oldWallet", type: "address" },
144
+ { indexed: true, internalType: "address", name: "newWallet", type: "address" },
145
+ ],
146
+ name: "TreasuryWalletUpdated",
147
+ type: "event",
148
+ },
149
+ {
150
+ anonymous: false,
151
+ inputs: [{ indexed: false, internalType: "address", name: "account", type: "address" }],
152
+ name: "Unpaused",
153
+ type: "event",
154
+ },
155
+ {
156
+ anonymous: false,
157
+ inputs: [
158
+ { indexed: true, internalType: "address", name: "user", type: "address" },
159
+ { indexed: true, internalType: "address", name: "to", type: "address" },
160
+ { indexed: true, internalType: "uint256", name: "requestIndex", type: "uint256" },
161
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
162
+ { indexed: false, internalType: "uint256", name: "newTotal", type: "uint256" },
163
+ { indexed: false, internalType: "uint256", name: "nonce", type: "uint256" },
164
+ ],
165
+ name: "UnstakeCancelled",
166
+ type: "event",
167
+ },
168
+ {
169
+ anonymous: false,
170
+ inputs: [
171
+ { indexed: false, internalType: "uint256", name: "oldDelay", type: "uint256" },
172
+ { indexed: false, internalType: "uint256", name: "newDelay", type: "uint256" },
173
+ ],
174
+ name: "UnstakeDelayUpdated",
175
+ type: "event",
176
+ },
177
+ {
178
+ anonymous: false,
179
+ inputs: [{ indexed: true, internalType: "address", name: "implementation", type: "address" }],
180
+ name: "Upgraded",
181
+ type: "event",
182
+ },
183
+ {
184
+ inputs: [],
185
+ name: "BASIS_POINTS",
186
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
187
+ stateMutability: "view",
188
+ type: "function",
189
+ },
190
+ {
191
+ inputs: [],
192
+ name: "UPGRADE_INTERFACE_VERSION",
193
+ outputs: [{ internalType: "string", name: "", type: "string" }],
194
+ stateMutability: "view",
195
+ type: "function",
196
+ },
197
+ {
198
+ inputs: [{ internalType: "uint256[]", name: "requestIndices", type: "uint256[]" }],
199
+ name: "batchClaimDelayedUnstakes",
200
+ outputs: [],
201
+ stateMutability: "nonpayable",
202
+ type: "function",
203
+ },
204
+ {
205
+ inputs: [
206
+ { internalType: "address", name: "user", type: "address" },
207
+ { internalType: "uint256[]", name: "requestIndices", type: "uint256[]" },
208
+ ],
209
+ name: "batchClaimDelayedUnstakesFor",
210
+ outputs: [],
211
+ stateMutability: "nonpayable",
212
+ type: "function",
213
+ },
214
+ {
215
+ inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
216
+ name: "calculateInstantUnstakeFee",
217
+ outputs: [
218
+ { internalType: "uint256", name: "fee", type: "uint256" },
219
+ { internalType: "uint256", name: "netAmount", type: "uint256" },
220
+ ],
221
+ stateMutability: "view",
222
+ type: "function",
223
+ },
224
+ {
225
+ inputs: [{ internalType: "uint256", name: "requestIndex", type: "uint256" }],
226
+ name: "cancelUnstake",
227
+ outputs: [],
228
+ stateMutability: "nonpayable",
229
+ type: "function",
230
+ },
231
+ {
232
+ inputs: [
233
+ { internalType: "address", name: "user", type: "address" },
234
+ { internalType: "uint256", name: "requestIndex", type: "uint256" },
235
+ ],
236
+ name: "cancelUnstakeFor",
237
+ outputs: [],
238
+ stateMutability: "nonpayable",
239
+ type: "function",
240
+ },
241
+ {
242
+ inputs: [{ internalType: "uint256", name: "requestIndex", type: "uint256" }],
243
+ name: "claimDelayedUnstake",
244
+ outputs: [],
245
+ stateMutability: "nonpayable",
246
+ type: "function",
247
+ },
248
+ {
249
+ inputs: [
250
+ { internalType: "address", name: "user", type: "address" },
251
+ { internalType: "uint256", name: "requestIndex", type: "uint256" },
252
+ ],
253
+ name: "claimDelayedUnstakeFor",
254
+ outputs: [],
255
+ stateMutability: "nonpayable",
256
+ type: "function",
257
+ },
258
+ { inputs: [], name: "emergencyWithdraw", outputs: [], stateMutability: "nonpayable", type: "function" },
259
+ {
260
+ inputs: [],
261
+ name: "feeRecipient",
262
+ outputs: [{ internalType: "address", name: "", type: "address" }],
263
+ stateMutability: "view",
264
+ type: "function",
265
+ },
266
+ {
267
+ inputs: [],
268
+ name: "getContractBalance",
269
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
270
+ stateMutability: "view",
271
+ type: "function",
272
+ },
273
+ {
274
+ inputs: [],
275
+ name: "getCurrentNonce",
276
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
277
+ stateMutability: "view",
278
+ type: "function",
279
+ },
280
+ {
281
+ inputs: [],
282
+ name: "getTotalStaked",
283
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
284
+ stateMutability: "view",
285
+ type: "function",
286
+ },
287
+ {
288
+ inputs: [
289
+ { internalType: "address", name: "user", type: "address" },
290
+ { internalType: "uint256", name: "requestIndex", type: "uint256" },
291
+ ],
292
+ name: "getUnstakeRequest",
293
+ outputs: [
294
+ {
295
+ components: [
296
+ { internalType: "uint256", name: "amount", type: "uint256" },
297
+ { internalType: "uint256", name: "requestTime", type: "uint256" },
298
+ { internalType: "bool", name: "claimed", type: "bool" },
299
+ ],
300
+ internalType: "struct ERC20StakingUpgradeable.UnstakeRequest",
301
+ name: "",
302
+ type: "tuple",
303
+ },
304
+ ],
305
+ stateMutability: "view",
306
+ type: "function",
307
+ },
308
+ {
309
+ inputs: [{ internalType: "address", name: "user", type: "address" }],
310
+ name: "getUserStakeInfo",
311
+ outputs: [
312
+ { internalType: "uint256", name: "amount", type: "uint256" },
313
+ { internalType: "uint256", name: "timestamp", type: "uint256" },
314
+ {
315
+ components: [
316
+ { internalType: "uint256", name: "amount", type: "uint256" },
317
+ { internalType: "uint256", name: "requestTime", type: "uint256" },
318
+ { internalType: "bool", name: "claimed", type: "bool" },
319
+ ],
320
+ internalType: "struct ERC20StakingUpgradeable.UnstakeRequest[]",
321
+ name: "requests",
322
+ type: "tuple[]",
323
+ },
324
+ { internalType: "uint256", name: "totalPending", type: "uint256" },
325
+ { internalType: "uint256[]", name: "claimableRequestIndices", type: "uint256[]" },
326
+ { internalType: "uint256", name: "totalClaimableAmount", type: "uint256" },
327
+ ],
328
+ stateMutability: "view",
329
+ type: "function",
330
+ },
331
+ {
332
+ inputs: [
333
+ { internalType: "address", name: "initialOwner", type: "address" },
334
+ { internalType: "contract IERC20", name: "_stakingToken", type: "address" },
335
+ { internalType: "address", name: "_treasuryWallet", type: "address" },
336
+ { internalType: "address", name: "_feeRecipient", type: "address" },
337
+ ],
338
+ name: "initialize",
339
+ outputs: [],
340
+ stateMutability: "nonpayable",
341
+ type: "function",
342
+ },
343
+ {
344
+ inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
345
+ name: "instantUnstake",
346
+ outputs: [],
347
+ stateMutability: "nonpayable",
348
+ type: "function",
349
+ },
350
+ {
351
+ inputs: [],
352
+ name: "instantUnstakeFeePercentage",
353
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
354
+ stateMutability: "view",
355
+ type: "function",
356
+ },
357
+ {
358
+ inputs: [
359
+ { internalType: "address", name: "user", type: "address" },
360
+ { internalType: "address", name: "to", type: "address" },
361
+ { internalType: "uint256", name: "amount", type: "uint256" },
362
+ ],
363
+ name: "instantUnstakeFor",
364
+ outputs: [],
365
+ stateMutability: "nonpayable",
366
+ type: "function",
367
+ },
368
+ {
369
+ inputs: [
370
+ { internalType: "uint256", name: "amount", type: "uint256" },
371
+ { internalType: "address", name: "to", type: "address" },
372
+ ],
373
+ name: "instantUnstakeTo",
374
+ outputs: [],
375
+ stateMutability: "nonpayable",
376
+ type: "function",
377
+ },
378
+ {
379
+ inputs: [],
380
+ name: "nonce",
381
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
382
+ stateMutability: "view",
383
+ type: "function",
384
+ },
385
+ {
386
+ inputs: [],
387
+ name: "owner",
388
+ outputs: [{ internalType: "address", name: "", type: "address" }],
389
+ stateMutability: "view",
390
+ type: "function",
391
+ },
392
+ { inputs: [], name: "pause", outputs: [], stateMutability: "nonpayable", type: "function" },
393
+ {
394
+ inputs: [],
395
+ name: "paused",
396
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
397
+ stateMutability: "view",
398
+ type: "function",
399
+ },
400
+ {
401
+ inputs: [],
402
+ name: "proxiableUUID",
403
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
404
+ stateMutability: "view",
405
+ type: "function",
406
+ },
407
+ { inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" },
408
+ {
409
+ inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
410
+ name: "requestDelayedUnstake",
411
+ outputs: [],
412
+ stateMutability: "nonpayable",
413
+ type: "function",
414
+ },
415
+ {
416
+ inputs: [
417
+ { internalType: "address", name: "user", type: "address" },
418
+ { internalType: "uint256", name: "amount", type: "uint256" },
419
+ ],
420
+ name: "requestDelayedUnstakeFor",
421
+ outputs: [],
422
+ stateMutability: "nonpayable",
423
+ type: "function",
424
+ },
425
+ {
426
+ inputs: [
427
+ { internalType: "uint256", name: "amount", type: "uint256" },
428
+ { internalType: "address", name: "to", type: "address" },
429
+ ],
430
+ name: "requestDelayedUnstakeTo",
431
+ outputs: [],
432
+ stateMutability: "nonpayable",
433
+ type: "function",
434
+ },
435
+ {
436
+ inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
437
+ name: "stake",
438
+ outputs: [],
439
+ stateMutability: "nonpayable",
440
+ type: "function",
441
+ },
442
+ {
443
+ inputs: [
444
+ { internalType: "address", name: "user", type: "address" },
445
+ { internalType: "uint256", name: "amount", type: "uint256" },
446
+ ],
447
+ name: "stakeFor",
448
+ outputs: [],
449
+ stateMutability: "nonpayable",
450
+ type: "function",
451
+ },
452
+ {
453
+ inputs: [{ internalType: "address", name: "", type: "address" }],
454
+ name: "stakeTimestamps",
455
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
456
+ stateMutability: "view",
457
+ type: "function",
458
+ },
459
+ {
460
+ inputs: [{ internalType: "address", name: "", type: "address" }],
461
+ name: "stakedAmounts",
462
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
463
+ stateMutability: "view",
464
+ type: "function",
465
+ },
466
+ {
467
+ inputs: [],
468
+ name: "stakingToken",
469
+ outputs: [{ internalType: "contract IERC20", name: "", type: "address" }],
470
+ stateMutability: "view",
471
+ type: "function",
472
+ },
473
+ {
474
+ inputs: [{ internalType: "address", name: "", type: "address" }],
475
+ name: "totalPendingUnstakes",
476
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
477
+ stateMutability: "view",
478
+ type: "function",
479
+ },
480
+ {
481
+ inputs: [],
482
+ name: "totalStaked",
483
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
484
+ stateMutability: "view",
485
+ type: "function",
486
+ },
487
+ {
488
+ inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
489
+ name: "transferOwnership",
490
+ outputs: [],
491
+ stateMutability: "nonpayable",
492
+ type: "function",
493
+ },
494
+ {
495
+ inputs: [],
496
+ name: "treasuryWallet",
497
+ outputs: [{ internalType: "address", name: "", type: "address" }],
498
+ stateMutability: "view",
499
+ type: "function",
500
+ },
501
+ { inputs: [], name: "unpause", outputs: [], stateMutability: "nonpayable", type: "function" },
502
+ {
503
+ inputs: [],
504
+ name: "unstakeDelay",
505
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
506
+ stateMutability: "view",
507
+ type: "function",
508
+ },
509
+ {
510
+ inputs: [
511
+ { internalType: "address", name: "", type: "address" },
512
+ { internalType: "uint256", name: "", type: "uint256" },
513
+ ],
514
+ name: "unstakeRequestRecipients",
515
+ outputs: [{ internalType: "address", name: "", type: "address" }],
516
+ stateMutability: "view",
517
+ type: "function",
518
+ },
519
+ {
520
+ inputs: [
521
+ { internalType: "address", name: "", type: "address" },
522
+ { internalType: "uint256", name: "", type: "uint256" },
523
+ ],
524
+ name: "unstakeRequests",
525
+ outputs: [
526
+ { internalType: "uint256", name: "amount", type: "uint256" },
527
+ { internalType: "uint256", name: "requestTime", type: "uint256" },
528
+ { internalType: "bool", name: "claimed", type: "bool" },
529
+ ],
530
+ stateMutability: "view",
531
+ type: "function",
532
+ },
533
+ {
534
+ inputs: [{ internalType: "address", name: "_newFeeRecipient", type: "address" }],
535
+ name: "updateFeeRecipient",
536
+ outputs: [],
537
+ stateMutability: "nonpayable",
538
+ type: "function",
539
+ },
540
+ {
541
+ inputs: [{ internalType: "uint256", name: "_newFeePercentage", type: "uint256" }],
542
+ name: "updateInstantUnstakeFee",
543
+ outputs: [],
544
+ stateMutability: "nonpayable",
545
+ type: "function",
546
+ },
547
+ {
548
+ inputs: [{ internalType: "address", name: "_newTreasuryWallet", type: "address" }],
549
+ name: "updateTreasuryWallet",
550
+ outputs: [],
551
+ stateMutability: "nonpayable",
552
+ type: "function",
553
+ },
554
+ {
555
+ inputs: [{ internalType: "uint256", name: "_newDelay", type: "uint256" }],
556
+ name: "updateUnstakeDelay",
557
+ outputs: [],
558
+ stateMutability: "nonpayable",
559
+ type: "function",
560
+ },
561
+ {
562
+ inputs: [
563
+ { internalType: "address", name: "newImplementation", type: "address" },
564
+ { internalType: "bytes", name: "data", type: "bytes" },
565
+ ],
566
+ name: "upgradeToAndCall",
567
+ outputs: [],
568
+ stateMutability: "payable",
569
+ type: "function",
570
+ },
571
+ ];
572
+ exports.B3_STAKING_CONTRACT = [
573
+ { inputs: [{ internalType: "address", name: "target", type: "address" }], name: "AddressEmptyCode", type: "error" },
574
+ {
575
+ inputs: [{ internalType: "address", name: "implementation", type: "address" }],
576
+ name: "ERC1967InvalidImplementation",
577
+ type: "error",
578
+ },
579
+ { inputs: [], name: "ERC1967NonPayable", type: "error" },
580
+ { inputs: [], name: "EnforcedPause", type: "error" },
581
+ { inputs: [], name: "ExpectedPause", type: "error" },
582
+ { inputs: [], name: "FailedCall", type: "error" },
583
+ { inputs: [], name: "InvalidInitialization", type: "error" },
584
+ { inputs: [], name: "NotInitializing", type: "error" },
585
+ { inputs: [{ internalType: "address", name: "owner", type: "address" }], name: "OwnableInvalidOwner", type: "error" },
586
+ {
587
+ inputs: [{ internalType: "address", name: "account", type: "address" }],
588
+ name: "OwnableUnauthorizedAccount",
589
+ type: "error",
590
+ },
591
+ { inputs: [], name: "ReentrancyGuardReentrantCall", type: "error" },
592
+ {
593
+ inputs: [{ internalType: "address", name: "token", type: "address" }],
594
+ name: "SafeERC20FailedOperation",
595
+ type: "error",
596
+ },
597
+ { inputs: [], name: "UUPSUnauthorizedCallContext", type: "error" },
598
+ {
599
+ inputs: [{ internalType: "bytes32", name: "slot", type: "bytes32" }],
600
+ name: "UUPSUnsupportedProxiableUUID",
601
+ type: "error",
602
+ },
603
+ {
604
+ anonymous: false,
605
+ inputs: [
606
+ { indexed: true, internalType: "address", name: "user", type: "address" },
607
+ { indexed: true, internalType: "address", name: "to", type: "address" },
608
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
609
+ { indexed: false, internalType: "uint256", name: "requestIndex", type: "uint256" },
610
+ { indexed: false, internalType: "uint256", name: "timestamp", type: "uint256" },
611
+ { indexed: false, internalType: "uint256", name: "nonce", type: "uint256" },
612
+ ],
613
+ name: "DelayedUnstakeClaimed",
614
+ type: "event",
615
+ },
616
+ {
617
+ anonymous: false,
618
+ inputs: [
619
+ { indexed: true, internalType: "address", name: "user", type: "address" },
620
+ { indexed: true, internalType: "address", name: "to", type: "address" },
621
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
622
+ { indexed: false, internalType: "uint256", name: "newTotal", type: "uint256" },
623
+ { indexed: false, internalType: "uint256", name: "requestTime", type: "uint256" },
624
+ { indexed: false, internalType: "uint256", name: "claimableTime", type: "uint256" },
625
+ { indexed: false, internalType: "uint256", name: "requestIndex", type: "uint256" },
626
+ { indexed: true, internalType: "uint256", name: "nonce", type: "uint256" },
627
+ ],
628
+ name: "DelayedUnstakeRequested",
629
+ type: "event",
630
+ },
631
+ {
632
+ anonymous: false,
633
+ inputs: [
634
+ { indexed: true, internalType: "address", name: "token", type: "address" },
635
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
636
+ ],
637
+ name: "EmergencyWithdraw",
638
+ type: "event",
639
+ },
640
+ {
641
+ anonymous: false,
642
+ inputs: [
643
+ { indexed: true, internalType: "address", name: "oldRecipient", type: "address" },
644
+ { indexed: true, internalType: "address", name: "newRecipient", type: "address" },
645
+ ],
646
+ name: "FeeRecipientUpdated",
647
+ type: "event",
648
+ },
649
+ {
650
+ anonymous: false,
651
+ inputs: [{ indexed: false, internalType: "uint64", name: "version", type: "uint64" }],
652
+ name: "Initialized",
653
+ type: "event",
654
+ },
655
+ {
656
+ anonymous: false,
657
+ inputs: [
658
+ { indexed: false, internalType: "uint256", name: "oldFee", type: "uint256" },
659
+ { indexed: false, internalType: "uint256", name: "newFee", type: "uint256" },
660
+ ],
661
+ name: "InstantUnstakeFeeUpdated",
662
+ type: "event",
663
+ },
664
+ {
665
+ anonymous: false,
666
+ inputs: [
667
+ { indexed: true, internalType: "address", name: "user", type: "address" },
668
+ { indexed: true, internalType: "address", name: "to", type: "address" },
669
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
670
+ { indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
671
+ { indexed: false, internalType: "uint256", name: "netAmount", type: "uint256" },
672
+ { indexed: false, internalType: "uint256", name: "newTotal", type: "uint256" },
673
+ { indexed: false, internalType: "uint256", name: "timestamp", type: "uint256" },
674
+ { indexed: true, internalType: "uint256", name: "nonce", type: "uint256" },
675
+ { indexed: false, internalType: "address", name: "feeRecipient", type: "address" },
676
+ ],
677
+ name: "InstantUnstaked",
678
+ type: "event",
679
+ },
680
+ {
681
+ anonymous: false,
682
+ inputs: [
683
+ { indexed: true, internalType: "address", name: "previousOwner", type: "address" },
684
+ { indexed: true, internalType: "address", name: "newOwner", type: "address" },
685
+ ],
686
+ name: "OwnershipTransferred",
687
+ type: "event",
688
+ },
689
+ {
690
+ anonymous: false,
691
+ inputs: [{ indexed: false, internalType: "address", name: "account", type: "address" }],
692
+ name: "Paused",
693
+ type: "event",
694
+ },
695
+ {
696
+ anonymous: false,
697
+ inputs: [
698
+ { indexed: true, internalType: "address", name: "staker", type: "address" },
699
+ { indexed: true, internalType: "address", name: "user", type: "address" },
700
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
701
+ { indexed: false, internalType: "uint256", name: "newTotal", type: "uint256" },
702
+ { indexed: false, internalType: "uint256", name: "timestamp", type: "uint256" },
703
+ { indexed: false, internalType: "uint256", name: "nonce", type: "uint256" },
704
+ ],
705
+ name: "Staked",
706
+ type: "event",
707
+ },
708
+ {
709
+ anonymous: false,
710
+ inputs: [
711
+ { indexed: true, internalType: "address", name: "oldWallet", type: "address" },
712
+ { indexed: true, internalType: "address", name: "newWallet", type: "address" },
713
+ ],
714
+ name: "TreasuryWalletUpdated",
715
+ type: "event",
716
+ },
717
+ {
718
+ anonymous: false,
719
+ inputs: [{ indexed: false, internalType: "address", name: "account", type: "address" }],
720
+ name: "Unpaused",
721
+ type: "event",
722
+ },
723
+ {
724
+ anonymous: false,
725
+ inputs: [
726
+ { indexed: true, internalType: "address", name: "user", type: "address" },
727
+ { indexed: true, internalType: "address", name: "to", type: "address" },
728
+ { indexed: true, internalType: "uint256", name: "requestIndex", type: "uint256" },
729
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
730
+ { indexed: false, internalType: "uint256", name: "newTotal", type: "uint256" },
731
+ { indexed: false, internalType: "uint256", name: "nonce", type: "uint256" },
732
+ ],
733
+ name: "UnstakeCancelled",
734
+ type: "event",
735
+ },
736
+ {
737
+ anonymous: false,
738
+ inputs: [
739
+ { indexed: false, internalType: "uint256", name: "oldDelay", type: "uint256" },
740
+ { indexed: false, internalType: "uint256", name: "newDelay", type: "uint256" },
741
+ ],
742
+ name: "UnstakeDelayUpdated",
743
+ type: "event",
744
+ },
745
+ {
746
+ anonymous: false,
747
+ inputs: [{ indexed: true, internalType: "address", name: "implementation", type: "address" }],
748
+ name: "Upgraded",
749
+ type: "event",
750
+ },
751
+ {
752
+ inputs: [],
753
+ name: "BASIS_POINTS",
754
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
755
+ stateMutability: "view",
756
+ type: "function",
757
+ },
758
+ {
759
+ inputs: [],
760
+ name: "UPGRADE_INTERFACE_VERSION",
761
+ outputs: [{ internalType: "string", name: "", type: "string" }],
762
+ stateMutability: "view",
763
+ type: "function",
764
+ },
765
+ {
766
+ inputs: [{ internalType: "uint256[]", name: "requestIndices", type: "uint256[]" }],
767
+ name: "batchClaimDelayedUnstakes",
768
+ outputs: [],
769
+ stateMutability: "nonpayable",
770
+ type: "function",
771
+ },
772
+ {
773
+ inputs: [
774
+ { internalType: "address", name: "user", type: "address" },
775
+ { internalType: "uint256[]", name: "requestIndices", type: "uint256[]" },
776
+ ],
777
+ name: "batchClaimDelayedUnstakesFor",
778
+ outputs: [],
779
+ stateMutability: "nonpayable",
780
+ type: "function",
781
+ },
782
+ {
783
+ inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
784
+ name: "calculateInstantUnstakeFee",
785
+ outputs: [
786
+ { internalType: "uint256", name: "fee", type: "uint256" },
787
+ { internalType: "uint256", name: "netAmount", type: "uint256" },
788
+ ],
789
+ stateMutability: "view",
790
+ type: "function",
791
+ },
792
+ {
793
+ inputs: [{ internalType: "uint256", name: "requestIndex", type: "uint256" }],
794
+ name: "cancelUnstake",
795
+ outputs: [],
796
+ stateMutability: "nonpayable",
797
+ type: "function",
798
+ },
799
+ {
800
+ inputs: [
801
+ { internalType: "address", name: "user", type: "address" },
802
+ { internalType: "uint256", name: "requestIndex", type: "uint256" },
803
+ ],
804
+ name: "cancelUnstakeFor",
805
+ outputs: [],
806
+ stateMutability: "nonpayable",
807
+ type: "function",
808
+ },
809
+ {
810
+ inputs: [{ internalType: "uint256", name: "requestIndex", type: "uint256" }],
811
+ name: "claimDelayedUnstake",
812
+ outputs: [],
813
+ stateMutability: "nonpayable",
814
+ type: "function",
815
+ },
816
+ {
817
+ inputs: [
818
+ { internalType: "address", name: "user", type: "address" },
819
+ { internalType: "uint256", name: "requestIndex", type: "uint256" },
820
+ ],
821
+ name: "claimDelayedUnstakeFor",
822
+ outputs: [],
823
+ stateMutability: "nonpayable",
824
+ type: "function",
825
+ },
826
+ { inputs: [], name: "emergencyWithdraw", outputs: [], stateMutability: "nonpayable", type: "function" },
827
+ {
828
+ inputs: [],
829
+ name: "feeRecipient",
830
+ outputs: [{ internalType: "address", name: "", type: "address" }],
831
+ stateMutability: "view",
832
+ type: "function",
833
+ },
834
+ {
835
+ inputs: [],
836
+ name: "getContractBalance",
837
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
838
+ stateMutability: "view",
839
+ type: "function",
840
+ },
841
+ {
842
+ inputs: [],
843
+ name: "getCurrentNonce",
844
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
845
+ stateMutability: "view",
846
+ type: "function",
847
+ },
848
+ {
849
+ inputs: [],
850
+ name: "getTotalStaked",
851
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
852
+ stateMutability: "view",
853
+ type: "function",
854
+ },
855
+ {
856
+ inputs: [
857
+ { internalType: "address", name: "user", type: "address" },
858
+ { internalType: "uint256", name: "requestIndex", type: "uint256" },
859
+ ],
860
+ name: "getUnstakeRequest",
861
+ outputs: [
862
+ {
863
+ components: [
864
+ { internalType: "uint256", name: "amount", type: "uint256" },
865
+ { internalType: "uint256", name: "requestTime", type: "uint256" },
866
+ { internalType: "bool", name: "claimed", type: "bool" },
867
+ ],
868
+ internalType: "struct ERC20StakingUpgradeableV3.UnstakeRequest",
869
+ name: "",
870
+ type: "tuple",
871
+ },
872
+ ],
873
+ stateMutability: "view",
874
+ type: "function",
875
+ },
876
+ {
877
+ inputs: [{ internalType: "address", name: "user", type: "address" }],
878
+ name: "getUserStakeInfo",
879
+ outputs: [
880
+ { internalType: "uint256", name: "amount", type: "uint256" },
881
+ { internalType: "uint256", name: "timestamp", type: "uint256" },
882
+ {
883
+ components: [
884
+ { internalType: "uint256", name: "amount", type: "uint256" },
885
+ { internalType: "uint256", name: "requestTime", type: "uint256" },
886
+ { internalType: "bool", name: "claimed", type: "bool" },
887
+ ],
888
+ internalType: "struct ERC20StakingUpgradeableV3.UnstakeRequest[]",
889
+ name: "requests",
890
+ type: "tuple[]",
891
+ },
892
+ { internalType: "uint256", name: "totalPending", type: "uint256" },
893
+ { internalType: "uint256[]", name: "claimableRequestIndices", type: "uint256[]" },
894
+ { internalType: "uint256", name: "totalClaimableAmount", type: "uint256" },
895
+ ],
896
+ stateMutability: "view",
897
+ type: "function",
898
+ },
899
+ {
900
+ inputs: [
901
+ { internalType: "address", name: "initialOwner", type: "address" },
902
+ { internalType: "contract IERC20", name: "_stakingToken", type: "address" },
903
+ { internalType: "address", name: "_treasuryWallet", type: "address" },
904
+ { internalType: "address", name: "_feeRecipient", type: "address" },
905
+ ],
906
+ name: "initialize",
907
+ outputs: [],
908
+ stateMutability: "nonpayable",
909
+ type: "function",
910
+ },
911
+ {
912
+ inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
913
+ name: "instantUnstake",
914
+ outputs: [],
915
+ stateMutability: "nonpayable",
916
+ type: "function",
917
+ },
918
+ {
919
+ inputs: [],
920
+ name: "instantUnstakeFeePercentage",
921
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
922
+ stateMutability: "view",
923
+ type: "function",
924
+ },
925
+ {
926
+ inputs: [
927
+ { internalType: "address", name: "user", type: "address" },
928
+ { internalType: "address", name: "to", type: "address" },
929
+ { internalType: "uint256", name: "amount", type: "uint256" },
930
+ ],
931
+ name: "instantUnstakeFor",
932
+ outputs: [],
933
+ stateMutability: "nonpayable",
934
+ type: "function",
935
+ },
936
+ {
937
+ inputs: [
938
+ { internalType: "uint256", name: "amount", type: "uint256" },
939
+ { internalType: "address", name: "to", type: "address" },
940
+ ],
941
+ name: "instantUnstakeTo",
942
+ outputs: [],
943
+ stateMutability: "nonpayable",
944
+ type: "function",
945
+ },
946
+ {
947
+ inputs: [],
948
+ name: "nonce",
949
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
950
+ stateMutability: "view",
951
+ type: "function",
952
+ },
953
+ {
954
+ inputs: [],
955
+ name: "owner",
956
+ outputs: [{ internalType: "address", name: "", type: "address" }],
957
+ stateMutability: "view",
958
+ type: "function",
959
+ },
960
+ { inputs: [], name: "pause", outputs: [], stateMutability: "nonpayable", type: "function" },
961
+ {
962
+ inputs: [],
963
+ name: "paused",
964
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
965
+ stateMutability: "view",
966
+ type: "function",
967
+ },
968
+ {
969
+ inputs: [],
970
+ name: "proxiableUUID",
971
+ outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
972
+ stateMutability: "view",
973
+ type: "function",
974
+ },
975
+ { inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" },
976
+ {
977
+ inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
978
+ name: "requestDelayedUnstake",
979
+ outputs: [],
980
+ stateMutability: "nonpayable",
981
+ type: "function",
982
+ },
983
+ {
984
+ inputs: [
985
+ { internalType: "address", name: "user", type: "address" },
986
+ { internalType: "uint256", name: "amount", type: "uint256" },
987
+ ],
988
+ name: "requestDelayedUnstakeFor",
989
+ outputs: [],
990
+ stateMutability: "nonpayable",
991
+ type: "function",
992
+ },
993
+ {
994
+ inputs: [
995
+ { internalType: "uint256", name: "amount", type: "uint256" },
996
+ { internalType: "address", name: "to", type: "address" },
997
+ ],
998
+ name: "requestDelayedUnstakeTo",
999
+ outputs: [],
1000
+ stateMutability: "nonpayable",
1001
+ type: "function",
1002
+ },
1003
+ {
1004
+ inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
1005
+ name: "stake",
1006
+ outputs: [],
1007
+ stateMutability: "nonpayable",
1008
+ type: "function",
1009
+ },
1010
+ {
1011
+ inputs: [
1012
+ { internalType: "address", name: "user", type: "address" },
1013
+ { internalType: "uint256", name: "amount", type: "uint256" },
1014
+ ],
1015
+ name: "stakeFor",
1016
+ outputs: [],
1017
+ stateMutability: "nonpayable",
1018
+ type: "function",
1019
+ },
1020
+ {
1021
+ inputs: [{ internalType: "address", name: "", type: "address" }],
1022
+ name: "stakeTimestamps",
1023
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
1024
+ stateMutability: "view",
1025
+ type: "function",
1026
+ },
1027
+ {
1028
+ inputs: [{ internalType: "address", name: "", type: "address" }],
1029
+ name: "stakedAmounts",
1030
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
1031
+ stateMutability: "view",
1032
+ type: "function",
1033
+ },
1034
+ {
1035
+ inputs: [],
1036
+ name: "stakingToken",
1037
+ outputs: [{ internalType: "contract IERC20", name: "", type: "address" }],
1038
+ stateMutability: "view",
1039
+ type: "function",
1040
+ },
1041
+ {
1042
+ inputs: [{ internalType: "address", name: "", type: "address" }],
1043
+ name: "totalPendingUnstakes",
1044
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
1045
+ stateMutability: "view",
1046
+ type: "function",
1047
+ },
1048
+ {
1049
+ inputs: [],
1050
+ name: "totalStaked",
1051
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
1052
+ stateMutability: "view",
1053
+ type: "function",
1054
+ },
1055
+ {
1056
+ inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
1057
+ name: "transferOwnership",
1058
+ outputs: [],
1059
+ stateMutability: "nonpayable",
1060
+ type: "function",
1061
+ },
1062
+ {
1063
+ inputs: [],
1064
+ name: "treasuryWallet",
1065
+ outputs: [{ internalType: "address", name: "", type: "address" }],
1066
+ stateMutability: "view",
1067
+ type: "function",
1068
+ },
1069
+ { inputs: [], name: "unpause", outputs: [], stateMutability: "nonpayable", type: "function" },
1070
+ {
1071
+ inputs: [],
1072
+ name: "unstakeDelay",
1073
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
1074
+ stateMutability: "view",
1075
+ type: "function",
1076
+ },
1077
+ {
1078
+ inputs: [
1079
+ { internalType: "address", name: "", type: "address" },
1080
+ { internalType: "uint256", name: "", type: "uint256" },
1081
+ ],
1082
+ name: "unstakeRequestRecipients",
1083
+ outputs: [{ internalType: "address", name: "", type: "address" }],
1084
+ stateMutability: "view",
1085
+ type: "function",
1086
+ },
1087
+ {
1088
+ inputs: [
1089
+ { internalType: "address", name: "", type: "address" },
1090
+ { internalType: "uint256", name: "", type: "uint256" },
1091
+ ],
1092
+ name: "unstakeRequests",
1093
+ outputs: [
1094
+ { internalType: "uint256", name: "amount", type: "uint256" },
1095
+ { internalType: "uint256", name: "requestTime", type: "uint256" },
1096
+ { internalType: "bool", name: "claimed", type: "bool" },
1097
+ ],
1098
+ stateMutability: "view",
1099
+ type: "function",
1100
+ },
1101
+ {
1102
+ inputs: [{ internalType: "address", name: "_newFeeRecipient", type: "address" }],
1103
+ name: "updateFeeRecipient",
1104
+ outputs: [],
1105
+ stateMutability: "nonpayable",
1106
+ type: "function",
1107
+ },
1108
+ {
1109
+ inputs: [{ internalType: "uint256", name: "_newFeePercentage", type: "uint256" }],
1110
+ name: "updateInstantUnstakeFee",
1111
+ outputs: [],
1112
+ stateMutability: "nonpayable",
1113
+ type: "function",
1114
+ },
1115
+ {
1116
+ inputs: [{ internalType: "address", name: "_newTreasuryWallet", type: "address" }],
1117
+ name: "updateTreasuryWallet",
1118
+ outputs: [],
1119
+ stateMutability: "nonpayable",
1120
+ type: "function",
1121
+ },
1122
+ {
1123
+ inputs: [{ internalType: "uint256", name: "_newDelay", type: "uint256" }],
1124
+ name: "updateUnstakeDelay",
1125
+ outputs: [],
1126
+ stateMutability: "nonpayable",
1127
+ type: "function",
1128
+ },
1129
+ {
1130
+ inputs: [
1131
+ { internalType: "address", name: "newImplementation", type: "address" },
1132
+ { internalType: "bytes", name: "data", type: "bytes" },
1133
+ ],
1134
+ name: "upgradeToAndCall",
1135
+ outputs: [],
1136
+ stateMutability: "payable",
1137
+ type: "function",
1138
+ },
1139
+ ];