@bouncetech/contracts 1.2.0 → 1.2.1
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.
|
@@ -15,452 +15,117 @@ exports.globalStorageHelperAbi = [
|
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
type: "function",
|
|
18
|
-
name: "
|
|
19
|
-
inputs: [
|
|
20
|
-
{
|
|
21
|
-
name: "leveragedTokenAddress_",
|
|
22
|
-
type: "address",
|
|
23
|
-
internalType: "address",
|
|
24
|
-
},
|
|
25
|
-
],
|
|
18
|
+
name: "getGlobalStorageData",
|
|
19
|
+
inputs: [],
|
|
26
20
|
outputs: [
|
|
27
21
|
{
|
|
28
22
|
name: "",
|
|
29
23
|
type: "tuple",
|
|
30
|
-
internalType: "struct
|
|
24
|
+
internalType: "struct IGlobalStorageHelper.GlobalStorageData",
|
|
31
25
|
components: [
|
|
32
26
|
{
|
|
33
|
-
name: "
|
|
27
|
+
name: "owner",
|
|
34
28
|
type: "address",
|
|
35
29
|
internalType: "address",
|
|
36
30
|
},
|
|
37
31
|
{
|
|
38
|
-
name: "
|
|
39
|
-
type: "uint256",
|
|
40
|
-
internalType: "uint256",
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: "baseAssetUserCredit",
|
|
44
|
-
type: "uint256",
|
|
45
|
-
internalType: "uint256",
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
name: "usdcSpotBalance",
|
|
49
|
-
type: "uint256",
|
|
50
|
-
internalType: "uint256",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
name: "usdcPerpBalance",
|
|
54
|
-
type: "uint256",
|
|
55
|
-
internalType: "uint256",
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
name: "usdcMargin",
|
|
59
|
-
type: "uint256",
|
|
60
|
-
internalType: "uint256",
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
name: "notionalValue",
|
|
64
|
-
type: "uint256",
|
|
65
|
-
internalType: "uint256",
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
name: "effectiveLeverage",
|
|
69
|
-
type: "uint256",
|
|
70
|
-
internalType: "uint256",
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
name: "targetLeverage",
|
|
74
|
-
type: "uint256",
|
|
75
|
-
internalType: "uint256",
|
|
76
|
-
},
|
|
77
|
-
],
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
|
-
stateMutability: "view",
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
type: "function",
|
|
84
|
-
name: "getLeveragedTokens",
|
|
85
|
-
inputs: [],
|
|
86
|
-
outputs: [
|
|
87
|
-
{
|
|
88
|
-
name: "",
|
|
89
|
-
type: "tuple[]",
|
|
90
|
-
internalType: "struct ILeveragedTokenHelper.LeveragedTokenData[]",
|
|
91
|
-
components: [
|
|
92
|
-
{
|
|
93
|
-
name: "leveragedToken",
|
|
32
|
+
name: "ltImplementation",
|
|
94
33
|
type: "address",
|
|
95
34
|
internalType: "address",
|
|
96
35
|
},
|
|
97
36
|
{
|
|
98
|
-
name: "
|
|
99
|
-
type: "
|
|
100
|
-
internalType: "
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
name: "targetAsset",
|
|
104
|
-
type: "string",
|
|
105
|
-
internalType: "string",
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
name: "targetLeverage",
|
|
109
|
-
type: "uint256",
|
|
110
|
-
internalType: "uint256",
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
name: "isLong",
|
|
114
|
-
type: "bool",
|
|
115
|
-
internalType: "bool",
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
name: "exchangeRate",
|
|
119
|
-
type: "uint256",
|
|
120
|
-
internalType: "uint256",
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
name: "baseAssetBalance",
|
|
124
|
-
type: "uint256",
|
|
125
|
-
internalType: "uint256",
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
name: "totalAssets",
|
|
129
|
-
type: "uint256",
|
|
130
|
-
internalType: "uint256",
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
name: "userCredit",
|
|
134
|
-
type: "uint256",
|
|
135
|
-
internalType: "uint256",
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
name: "credit",
|
|
139
|
-
type: "uint256",
|
|
140
|
-
internalType: "uint256",
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
name: "agentData",
|
|
144
|
-
type: "tuple[3]",
|
|
145
|
-
internalType: "struct ILeveragedTokenHelper.AgentData[3]",
|
|
146
|
-
components: [
|
|
147
|
-
{
|
|
148
|
-
name: "slot",
|
|
149
|
-
type: "uint8",
|
|
150
|
-
internalType: "uint8",
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
name: "agent",
|
|
154
|
-
type: "address",
|
|
155
|
-
internalType: "address",
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
name: "createdAt",
|
|
159
|
-
type: "uint256",
|
|
160
|
-
internalType: "uint256",
|
|
161
|
-
},
|
|
162
|
-
],
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
name: "balanceOf",
|
|
166
|
-
type: "uint256",
|
|
167
|
-
internalType: "uint256",
|
|
37
|
+
name: "baseAsset",
|
|
38
|
+
type: "address",
|
|
39
|
+
internalType: "address",
|
|
168
40
|
},
|
|
169
41
|
{
|
|
170
|
-
name: "
|
|
171
|
-
type: "
|
|
172
|
-
internalType: "
|
|
42
|
+
name: "treasury",
|
|
43
|
+
type: "address",
|
|
44
|
+
internalType: "address",
|
|
173
45
|
},
|
|
174
46
|
{
|
|
175
|
-
name: "
|
|
176
|
-
type: "bool",
|
|
177
|
-
internalType: "bool",
|
|
178
|
-
},
|
|
179
|
-
],
|
|
180
|
-
},
|
|
181
|
-
],
|
|
182
|
-
stateMutability: "view",
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
type: "function",
|
|
186
|
-
name: "getLeveragedTokens",
|
|
187
|
-
inputs: [
|
|
188
|
-
{
|
|
189
|
-
name: "user_",
|
|
190
|
-
type: "address",
|
|
191
|
-
internalType: "address",
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
name: "onlyHeld_",
|
|
195
|
-
type: "bool",
|
|
196
|
-
internalType: "bool",
|
|
197
|
-
},
|
|
198
|
-
],
|
|
199
|
-
outputs: [
|
|
200
|
-
{
|
|
201
|
-
name: "",
|
|
202
|
-
type: "tuple[]",
|
|
203
|
-
internalType: "struct ILeveragedTokenHelper.LeveragedTokenData[]",
|
|
204
|
-
components: [
|
|
205
|
-
{
|
|
206
|
-
name: "leveragedToken",
|
|
47
|
+
name: "factory",
|
|
207
48
|
type: "address",
|
|
208
49
|
internalType: "address",
|
|
209
50
|
},
|
|
210
51
|
{
|
|
211
|
-
name: "
|
|
212
|
-
type: "
|
|
213
|
-
internalType: "
|
|
52
|
+
name: "hyperliquidHandler",
|
|
53
|
+
type: "address",
|
|
54
|
+
internalType: "address",
|
|
214
55
|
},
|
|
215
56
|
{
|
|
216
|
-
name: "
|
|
217
|
-
type: "
|
|
218
|
-
internalType: "
|
|
57
|
+
name: "feeHandler",
|
|
58
|
+
type: "address",
|
|
59
|
+
internalType: "address",
|
|
219
60
|
},
|
|
220
61
|
{
|
|
221
|
-
name: "
|
|
222
|
-
type: "
|
|
223
|
-
internalType: "
|
|
62
|
+
name: "bounce",
|
|
63
|
+
type: "address",
|
|
64
|
+
internalType: "address",
|
|
224
65
|
},
|
|
225
66
|
{
|
|
226
|
-
name: "
|
|
67
|
+
name: "allMintsPaused",
|
|
227
68
|
type: "bool",
|
|
228
69
|
internalType: "bool",
|
|
229
70
|
},
|
|
230
71
|
{
|
|
231
|
-
name: "
|
|
232
|
-
type: "
|
|
233
|
-
internalType: "
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
name: "baseAssetBalance",
|
|
237
|
-
type: "uint256",
|
|
238
|
-
internalType: "uint256",
|
|
72
|
+
name: "vesting",
|
|
73
|
+
type: "address",
|
|
74
|
+
internalType: "address",
|
|
239
75
|
},
|
|
240
76
|
{
|
|
241
|
-
name: "
|
|
242
|
-
type: "
|
|
243
|
-
internalType: "
|
|
77
|
+
name: "airdrop",
|
|
78
|
+
type: "address",
|
|
79
|
+
internalType: "address",
|
|
244
80
|
},
|
|
245
81
|
{
|
|
246
|
-
name: "
|
|
247
|
-
type: "
|
|
248
|
-
internalType: "
|
|
82
|
+
name: "referrals",
|
|
83
|
+
type: "address",
|
|
84
|
+
internalType: "address",
|
|
249
85
|
},
|
|
250
86
|
{
|
|
251
|
-
name: "
|
|
87
|
+
name: "minTransactionSize",
|
|
252
88
|
type: "uint256",
|
|
253
89
|
internalType: "uint256",
|
|
254
90
|
},
|
|
255
91
|
{
|
|
256
|
-
name: "
|
|
257
|
-
type: "tuple[3]",
|
|
258
|
-
internalType: "struct ILeveragedTokenHelper.AgentData[3]",
|
|
259
|
-
components: [
|
|
260
|
-
{
|
|
261
|
-
name: "slot",
|
|
262
|
-
type: "uint8",
|
|
263
|
-
internalType: "uint8",
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
name: "agent",
|
|
267
|
-
type: "address",
|
|
268
|
-
internalType: "address",
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
name: "createdAt",
|
|
272
|
-
type: "uint256",
|
|
273
|
-
internalType: "uint256",
|
|
274
|
-
},
|
|
275
|
-
],
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
name: "balanceOf",
|
|
92
|
+
name: "minLockAmount",
|
|
279
93
|
type: "uint256",
|
|
280
94
|
internalType: "uint256",
|
|
281
95
|
},
|
|
282
96
|
{
|
|
283
|
-
name: "
|
|
284
|
-
type: "bool",
|
|
285
|
-
internalType: "bool",
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
name: "isStandbyMode",
|
|
289
|
-
type: "bool",
|
|
290
|
-
internalType: "bool",
|
|
291
|
-
},
|
|
292
|
-
],
|
|
293
|
-
},
|
|
294
|
-
],
|
|
295
|
-
stateMutability: "view",
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
type: "function",
|
|
299
|
-
name: "getLeveragedTokensCoreData",
|
|
300
|
-
inputs: [],
|
|
301
|
-
outputs: [
|
|
302
|
-
{
|
|
303
|
-
name: "",
|
|
304
|
-
type: "tuple[]",
|
|
305
|
-
internalType: "struct ILeveragedTokenHelper.LeveragedTokenCoreData[]",
|
|
306
|
-
components: [
|
|
307
|
-
{
|
|
308
|
-
name: "leveragedToken",
|
|
309
|
-
type: "address",
|
|
310
|
-
internalType: "address",
|
|
311
|
-
},
|
|
312
|
-
{
|
|
313
|
-
name: "marketId",
|
|
314
|
-
type: "uint32",
|
|
315
|
-
internalType: "uint32",
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
name: "targetAsset",
|
|
319
|
-
type: "string",
|
|
320
|
-
internalType: "string",
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
name: "targetLeverage",
|
|
97
|
+
name: "redemptionFee",
|
|
324
98
|
type: "uint256",
|
|
325
99
|
internalType: "uint256",
|
|
326
100
|
},
|
|
327
101
|
{
|
|
328
|
-
name: "
|
|
329
|
-
type: "bool",
|
|
330
|
-
internalType: "bool",
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
name: "baseAssetBalance",
|
|
102
|
+
name: "streamingFee",
|
|
334
103
|
type: "uint256",
|
|
335
104
|
internalType: "uint256",
|
|
336
105
|
},
|
|
337
106
|
{
|
|
338
|
-
name: "
|
|
107
|
+
name: "executeRedemptionFee",
|
|
339
108
|
type: "uint256",
|
|
340
109
|
internalType: "uint256",
|
|
341
110
|
},
|
|
342
111
|
{
|
|
343
|
-
name: "
|
|
344
|
-
type: "tuple[3]",
|
|
345
|
-
internalType: "struct ILeveragedTokenHelper.AgentData[3]",
|
|
346
|
-
components: [
|
|
347
|
-
{
|
|
348
|
-
name: "slot",
|
|
349
|
-
type: "uint8",
|
|
350
|
-
internalType: "uint8",
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
name: "agent",
|
|
354
|
-
type: "address",
|
|
355
|
-
internalType: "address",
|
|
356
|
-
},
|
|
357
|
-
{
|
|
358
|
-
name: "createdAt",
|
|
359
|
-
type: "uint256",
|
|
360
|
-
internalType: "uint256",
|
|
361
|
-
},
|
|
362
|
-
],
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
name: "mintPaused",
|
|
366
|
-
type: "bool",
|
|
367
|
-
internalType: "bool",
|
|
368
|
-
},
|
|
369
|
-
],
|
|
370
|
-
},
|
|
371
|
-
],
|
|
372
|
-
stateMutability: "view",
|
|
373
|
-
},
|
|
374
|
-
{
|
|
375
|
-
type: "function",
|
|
376
|
-
name: "getLeveragedTokensSnapshot",
|
|
377
|
-
inputs: [],
|
|
378
|
-
outputs: [
|
|
379
|
-
{
|
|
380
|
-
name: "",
|
|
381
|
-
type: "tuple",
|
|
382
|
-
internalType: "struct ILeveragedTokenHelper.LeveragedTokensSnapshot",
|
|
383
|
-
components: [
|
|
384
|
-
{
|
|
385
|
-
name: "blockNumber",
|
|
112
|
+
name: "treasuryFeeShare",
|
|
386
113
|
type: "uint256",
|
|
387
114
|
internalType: "uint256",
|
|
388
115
|
},
|
|
389
116
|
{
|
|
390
|
-
name: "
|
|
117
|
+
name: "referrerRebate",
|
|
391
118
|
type: "uint256",
|
|
392
119
|
internalType: "uint256",
|
|
393
120
|
},
|
|
394
121
|
{
|
|
395
|
-
name: "
|
|
122
|
+
name: "refereeRebate",
|
|
396
123
|
type: "uint256",
|
|
397
124
|
internalType: "uint256",
|
|
398
125
|
},
|
|
399
|
-
{
|
|
400
|
-
name: "tokens",
|
|
401
|
-
type: "tuple[]",
|
|
402
|
-
internalType: "struct ILeveragedTokenHelper.LeveragedTokenSnapshotData[]",
|
|
403
|
-
components: [
|
|
404
|
-
{
|
|
405
|
-
name: "leveragedToken",
|
|
406
|
-
type: "address",
|
|
407
|
-
internalType: "address",
|
|
408
|
-
},
|
|
409
|
-
{
|
|
410
|
-
name: "exchangeRate",
|
|
411
|
-
type: "uint256",
|
|
412
|
-
internalType: "uint256",
|
|
413
|
-
},
|
|
414
|
-
{
|
|
415
|
-
name: "baseAssetContractBalance",
|
|
416
|
-
type: "uint256",
|
|
417
|
-
internalType: "uint256",
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
name: "baseAssetUserCredit",
|
|
421
|
-
type: "uint256",
|
|
422
|
-
internalType: "uint256",
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
name: "usdcSpotBalance",
|
|
426
|
-
type: "uint256",
|
|
427
|
-
internalType: "uint256",
|
|
428
|
-
},
|
|
429
|
-
{
|
|
430
|
-
name: "usdcPerpBalance",
|
|
431
|
-
type: "uint256",
|
|
432
|
-
internalType: "uint256",
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
name: "usdcMargin",
|
|
436
|
-
type: "uint256",
|
|
437
|
-
internalType: "uint256",
|
|
438
|
-
},
|
|
439
|
-
{
|
|
440
|
-
name: "totalAssets",
|
|
441
|
-
type: "uint256",
|
|
442
|
-
internalType: "uint256",
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
name: "notionalValue",
|
|
446
|
-
type: "uint256",
|
|
447
|
-
internalType: "uint256",
|
|
448
|
-
},
|
|
449
|
-
],
|
|
450
|
-
},
|
|
451
126
|
],
|
|
452
127
|
},
|
|
453
128
|
],
|
|
454
129
|
stateMutability: "view",
|
|
455
130
|
},
|
|
456
|
-
{
|
|
457
|
-
type: "error",
|
|
458
|
-
name: "DivisionByZero",
|
|
459
|
-
inputs: [],
|
|
460
|
-
},
|
|
461
|
-
{
|
|
462
|
-
type: "error",
|
|
463
|
-
name: "PrecompileLib__L1BlockNumberPrecompileFailed",
|
|
464
|
-
inputs: [],
|
|
465
|
-
},
|
|
466
131
|
];
|
|
@@ -130,6 +130,10 @@ export declare const leveragedTokenHelperAbi: readonly [{
|
|
|
130
130
|
readonly name: "mintPaused";
|
|
131
131
|
readonly type: "bool";
|
|
132
132
|
readonly internalType: "bool";
|
|
133
|
+
}, {
|
|
134
|
+
readonly name: "isStandbyMode";
|
|
135
|
+
readonly type: "bool";
|
|
136
|
+
readonly internalType: "bool";
|
|
133
137
|
}];
|
|
134
138
|
}];
|
|
135
139
|
readonly stateMutability: "view";
|
|
@@ -214,6 +218,10 @@ export declare const leveragedTokenHelperAbi: readonly [{
|
|
|
214
218
|
readonly name: "mintPaused";
|
|
215
219
|
readonly type: "bool";
|
|
216
220
|
readonly internalType: "bool";
|
|
221
|
+
}, {
|
|
222
|
+
readonly name: "isStandbyMode";
|
|
223
|
+
readonly type: "bool";
|
|
224
|
+
readonly internalType: "bool";
|
|
217
225
|
}];
|
|
218
226
|
}];
|
|
219
227
|
readonly stateMutability: "view";
|
|
@@ -293,6 +301,10 @@ export declare const leveragedTokenHelperAbi: readonly [{
|
|
|
293
301
|
readonly name: "blockTimestamp";
|
|
294
302
|
readonly type: "uint256";
|
|
295
303
|
readonly internalType: "uint256";
|
|
304
|
+
}, {
|
|
305
|
+
readonly name: "l1BlockNumber";
|
|
306
|
+
readonly type: "uint256";
|
|
307
|
+
readonly internalType: "uint256";
|
|
296
308
|
}, {
|
|
297
309
|
readonly name: "tokens";
|
|
298
310
|
readonly type: "tuple[]";
|
|
@@ -341,4 +353,8 @@ export declare const leveragedTokenHelperAbi: readonly [{
|
|
|
341
353
|
readonly type: "error";
|
|
342
354
|
readonly name: "DivisionByZero";
|
|
343
355
|
readonly inputs: readonly [];
|
|
356
|
+
}, {
|
|
357
|
+
readonly type: "error";
|
|
358
|
+
readonly name: "PrecompileLib__L1BlockNumberPrecompileFailed";
|
|
359
|
+
readonly inputs: readonly [];
|
|
344
360
|
}];
|
|
@@ -171,6 +171,11 @@ exports.leveragedTokenHelperAbi = [
|
|
|
171
171
|
type: "bool",
|
|
172
172
|
internalType: "bool",
|
|
173
173
|
},
|
|
174
|
+
{
|
|
175
|
+
name: "isStandbyMode",
|
|
176
|
+
type: "bool",
|
|
177
|
+
internalType: "bool",
|
|
178
|
+
},
|
|
174
179
|
],
|
|
175
180
|
},
|
|
176
181
|
],
|
|
@@ -279,6 +284,11 @@ exports.leveragedTokenHelperAbi = [
|
|
|
279
284
|
type: "bool",
|
|
280
285
|
internalType: "bool",
|
|
281
286
|
},
|
|
287
|
+
{
|
|
288
|
+
name: "isStandbyMode",
|
|
289
|
+
type: "bool",
|
|
290
|
+
internalType: "bool",
|
|
291
|
+
},
|
|
282
292
|
],
|
|
283
293
|
},
|
|
284
294
|
],
|
|
@@ -381,6 +391,11 @@ exports.leveragedTokenHelperAbi = [
|
|
|
381
391
|
type: "uint256",
|
|
382
392
|
internalType: "uint256",
|
|
383
393
|
},
|
|
394
|
+
{
|
|
395
|
+
name: "l1BlockNumber",
|
|
396
|
+
type: "uint256",
|
|
397
|
+
internalType: "uint256",
|
|
398
|
+
},
|
|
384
399
|
{
|
|
385
400
|
name: "tokens",
|
|
386
401
|
type: "tuple[]",
|
|
@@ -443,4 +458,9 @@ exports.leveragedTokenHelperAbi = [
|
|
|
443
458
|
name: "DivisionByZero",
|
|
444
459
|
inputs: [],
|
|
445
460
|
},
|
|
461
|
+
{
|
|
462
|
+
type: "error",
|
|
463
|
+
name: "PrecompileLib__L1BlockNumberPrecompileFailed",
|
|
464
|
+
inputs: [],
|
|
465
|
+
},
|
|
446
466
|
];
|