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