@gitmyabi/vault 1.0.8 → 1.0.10
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.
- package/README.md +3 -3
- package/contracts/Vault_json.d.ts +60 -931
- package/contracts/Vault_json.js +65 -998
- package/contracts/Vault_json.ts +67 -1224
- package/package.json +3 -3
package/contracts/Vault_json.ts
CHANGED
|
@@ -10,205 +10,21 @@ export const Vault_jsonAbi = [
|
|
|
10
10
|
{
|
|
11
11
|
"inputs": [
|
|
12
12
|
{
|
|
13
|
-
"internalType": "
|
|
14
|
-
"name": "
|
|
15
|
-
"type": "
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"internalType": "uint256",
|
|
19
|
-
"name": "_emergencyPenalty",
|
|
20
|
-
"type": "uint256"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"internalType": "address",
|
|
24
|
-
"name": "_emergencyPenaltyReceiver",
|
|
25
|
-
"type": "address"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"internalType": "uint256",
|
|
29
|
-
"name": "_successFee",
|
|
30
|
-
"type": "uint256"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"internalType": "address",
|
|
34
|
-
"name": "_successFeeReceiver",
|
|
35
|
-
"type": "address"
|
|
13
|
+
"internalType": "bytes32",
|
|
14
|
+
"name": "seal_",
|
|
15
|
+
"type": "bytes32"
|
|
36
16
|
}
|
|
37
17
|
],
|
|
38
18
|
"stateMutability": "nonpayable",
|
|
39
19
|
"type": "constructor"
|
|
40
20
|
},
|
|
41
|
-
{
|
|
42
|
-
"inputs": [
|
|
43
|
-
{
|
|
44
|
-
"internalType": "address",
|
|
45
|
-
"name": "owner",
|
|
46
|
-
"type": "address"
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
"name": "OwnableInvalidOwner",
|
|
50
|
-
"type": "error"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"inputs": [
|
|
54
|
-
{
|
|
55
|
-
"internalType": "address",
|
|
56
|
-
"name": "account",
|
|
57
|
-
"type": "address"
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
"name": "OwnableUnauthorizedAccount",
|
|
61
|
-
"type": "error"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"inputs": [],
|
|
65
|
-
"name": "ReentrancyGuardReentrantCall",
|
|
66
|
-
"type": "error"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"inputs": [
|
|
70
|
-
{
|
|
71
|
-
"internalType": "address",
|
|
72
|
-
"name": "token",
|
|
73
|
-
"type": "address"
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
"name": "SafeERC20FailedOperation",
|
|
77
|
-
"type": "error"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"anonymous": false,
|
|
81
|
-
"inputs": [
|
|
82
|
-
{
|
|
83
|
-
"indexed": false,
|
|
84
|
-
"internalType": "uint256",
|
|
85
|
-
"name": "uid",
|
|
86
|
-
"type": "uint256"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"indexed": false,
|
|
90
|
-
"internalType": "uint256",
|
|
91
|
-
"name": "startTimestamp",
|
|
92
|
-
"type": "uint256"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"indexed": false,
|
|
96
|
-
"internalType": "uint256",
|
|
97
|
-
"name": "endTimestamp",
|
|
98
|
-
"type": "uint256"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"indexed": false,
|
|
102
|
-
"internalType": "address[]",
|
|
103
|
-
"name": "tokens",
|
|
104
|
-
"type": "address[]"
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"indexed": false,
|
|
108
|
-
"internalType": "uint256[]",
|
|
109
|
-
"name": "amounts",
|
|
110
|
-
"type": "uint256[]"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"indexed": false,
|
|
114
|
-
"internalType": "uint256[]",
|
|
115
|
-
"name": "prices",
|
|
116
|
-
"type": "uint256[]"
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
"indexed": false,
|
|
120
|
-
"internalType": "address",
|
|
121
|
-
"name": "receiver",
|
|
122
|
-
"type": "address"
|
|
123
|
-
}
|
|
124
|
-
],
|
|
125
|
-
"name": "NewDeposit",
|
|
126
|
-
"type": "event"
|
|
127
|
-
},
|
|
128
21
|
{
|
|
129
22
|
"anonymous": false,
|
|
130
23
|
"inputs": [
|
|
131
24
|
{
|
|
132
25
|
"indexed": true,
|
|
133
26
|
"internalType": "address",
|
|
134
|
-
"name": "
|
|
135
|
-
"type": "address"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"indexed": true,
|
|
139
|
-
"internalType": "address",
|
|
140
|
-
"name": "newOwner",
|
|
141
|
-
"type": "address"
|
|
142
|
-
}
|
|
143
|
-
],
|
|
144
|
-
"name": "OwnershipTransferred",
|
|
145
|
-
"type": "event"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"anonymous": false,
|
|
149
|
-
"inputs": [
|
|
150
|
-
{
|
|
151
|
-
"indexed": false,
|
|
152
|
-
"internalType": "uint256",
|
|
153
|
-
"name": "emergencyPenalty",
|
|
154
|
-
"type": "uint256"
|
|
155
|
-
}
|
|
156
|
-
],
|
|
157
|
-
"name": "SetEmergencyPenalty",
|
|
158
|
-
"type": "event"
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
"anonymous": false,
|
|
162
|
-
"inputs": [
|
|
163
|
-
{
|
|
164
|
-
"indexed": false,
|
|
165
|
-
"internalType": "address",
|
|
166
|
-
"name": "emergencyPenaltyReceiver",
|
|
167
|
-
"type": "address"
|
|
168
|
-
}
|
|
169
|
-
],
|
|
170
|
-
"name": "SetEmergencyPenaltyReceiver",
|
|
171
|
-
"type": "event"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"anonymous": false,
|
|
175
|
-
"inputs": [
|
|
176
|
-
{
|
|
177
|
-
"indexed": false,
|
|
178
|
-
"internalType": "uint256",
|
|
179
|
-
"name": "successFee",
|
|
180
|
-
"type": "uint256"
|
|
181
|
-
}
|
|
182
|
-
],
|
|
183
|
-
"name": "SetSuccessFee",
|
|
184
|
-
"type": "event"
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
"anonymous": false,
|
|
188
|
-
"inputs": [
|
|
189
|
-
{
|
|
190
|
-
"indexed": false,
|
|
191
|
-
"internalType": "address",
|
|
192
|
-
"name": "successFeeReceiver",
|
|
193
|
-
"type": "address"
|
|
194
|
-
}
|
|
195
|
-
],
|
|
196
|
-
"name": "SetSuccessFeeReceiver",
|
|
197
|
-
"type": "event"
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"anonymous": false,
|
|
201
|
-
"inputs": [
|
|
202
|
-
{
|
|
203
|
-
"indexed": false,
|
|
204
|
-
"internalType": "uint256",
|
|
205
|
-
"name": "uid",
|
|
206
|
-
"type": "uint256"
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
"indexed": false,
|
|
210
|
-
"internalType": "address",
|
|
211
|
-
"name": "token",
|
|
27
|
+
"name": "to",
|
|
212
28
|
"type": "address"
|
|
213
29
|
},
|
|
214
30
|
{
|
|
@@ -218,44 +34,7 @@ export const Vault_jsonAbi = [
|
|
|
218
34
|
"type": "uint256"
|
|
219
35
|
}
|
|
220
36
|
],
|
|
221
|
-
"name": "
|
|
222
|
-
"type": "event"
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"anonymous": false,
|
|
226
|
-
"inputs": [
|
|
227
|
-
{
|
|
228
|
-
"indexed": false,
|
|
229
|
-
"internalType": "address",
|
|
230
|
-
"name": "token",
|
|
231
|
-
"type": "address"
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
"indexed": false,
|
|
235
|
-
"internalType": "address",
|
|
236
|
-
"name": "stateView",
|
|
237
|
-
"type": "address"
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
"indexed": false,
|
|
241
|
-
"internalType": "bytes32",
|
|
242
|
-
"name": "poolId",
|
|
243
|
-
"type": "bytes32"
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
"indexed": false,
|
|
247
|
-
"internalType": "bool",
|
|
248
|
-
"name": "isToken0",
|
|
249
|
-
"type": "bool"
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
"indexed": false,
|
|
253
|
-
"internalType": "bool",
|
|
254
|
-
"name": "status",
|
|
255
|
-
"type": "bool"
|
|
256
|
-
}
|
|
257
|
-
],
|
|
258
|
-
"name": "TokenUpdated",
|
|
37
|
+
"name": "Found",
|
|
259
38
|
"type": "event"
|
|
260
39
|
},
|
|
261
40
|
{
|
|
@@ -264,33 +43,27 @@ export const Vault_jsonAbi = [
|
|
|
264
43
|
{
|
|
265
44
|
"indexed": true,
|
|
266
45
|
"internalType": "address",
|
|
267
|
-
"name": "
|
|
46
|
+
"name": "from",
|
|
268
47
|
"type": "address"
|
|
269
48
|
},
|
|
270
49
|
{
|
|
271
50
|
"indexed": false,
|
|
272
51
|
"internalType": "uint256",
|
|
273
|
-
"name": "
|
|
52
|
+
"name": "amount",
|
|
274
53
|
"type": "uint256"
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
"indexed": false,
|
|
278
|
-
"internalType": "bool",
|
|
279
|
-
"name": "isEmergency",
|
|
280
|
-
"type": "bool"
|
|
281
54
|
}
|
|
282
55
|
],
|
|
283
|
-
"name": "
|
|
56
|
+
"name": "Funded",
|
|
284
57
|
"type": "event"
|
|
285
58
|
},
|
|
286
59
|
{
|
|
287
60
|
"inputs": [],
|
|
288
|
-
"name": "
|
|
61
|
+
"name": "SEAL",
|
|
289
62
|
"outputs": [
|
|
290
63
|
{
|
|
291
|
-
"internalType": "
|
|
64
|
+
"internalType": "bytes32",
|
|
292
65
|
"name": "",
|
|
293
|
-
"type": "
|
|
66
|
+
"type": "bytes32"
|
|
294
67
|
}
|
|
295
68
|
],
|
|
296
69
|
"stateMutability": "view",
|
|
@@ -298,7 +71,7 @@ export const Vault_jsonAbi = [
|
|
|
298
71
|
},
|
|
299
72
|
{
|
|
300
73
|
"inputs": [],
|
|
301
|
-
"name": "
|
|
74
|
+
"name": "balance",
|
|
302
75
|
"outputs": [
|
|
303
76
|
{
|
|
304
77
|
"internalType": "uint256",
|
|
@@ -311,50 +84,11 @@ export const Vault_jsonAbi = [
|
|
|
311
84
|
},
|
|
312
85
|
{
|
|
313
86
|
"inputs": [],
|
|
314
|
-
"name": "
|
|
315
|
-
"outputs": [
|
|
316
|
-
{
|
|
317
|
-
"internalType": "uint256",
|
|
318
|
-
"name": "",
|
|
319
|
-
"type": "uint256"
|
|
320
|
-
}
|
|
321
|
-
],
|
|
322
|
-
"stateMutability": "view",
|
|
323
|
-
"type": "function"
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
"inputs": [
|
|
327
|
-
{
|
|
328
|
-
"internalType": "address",
|
|
329
|
-
"name": "",
|
|
330
|
-
"type": "address"
|
|
331
|
-
}
|
|
332
|
-
],
|
|
333
|
-
"name": "allowedTokens",
|
|
87
|
+
"name": "found",
|
|
334
88
|
"outputs": [
|
|
335
|
-
{
|
|
336
|
-
"internalType": "address",
|
|
337
|
-
"name": "token",
|
|
338
|
-
"type": "address"
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
"internalType": "address",
|
|
342
|
-
"name": "stateView",
|
|
343
|
-
"type": "address"
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
"internalType": "bytes32",
|
|
347
|
-
"name": "poolId",
|
|
348
|
-
"type": "bytes32"
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
"internalType": "bool",
|
|
352
|
-
"name": "isToken0",
|
|
353
|
-
"type": "bool"
|
|
354
|
-
},
|
|
355
89
|
{
|
|
356
90
|
"internalType": "bool",
|
|
357
|
-
"name": "
|
|
91
|
+
"name": "",
|
|
358
92
|
"type": "bool"
|
|
359
93
|
}
|
|
360
94
|
],
|
|
@@ -362,352 +96,52 @@ export const Vault_jsonAbi = [
|
|
|
362
96
|
"type": "function"
|
|
363
97
|
},
|
|
364
98
|
{
|
|
365
|
-
"inputs": [
|
|
99
|
+
"inputs": [],
|
|
100
|
+
"name": "rules",
|
|
101
|
+
"outputs": [
|
|
366
102
|
{
|
|
367
|
-
"internalType": "
|
|
368
|
-
"name": "
|
|
369
|
-
"type": "
|
|
103
|
+
"internalType": "string",
|
|
104
|
+
"name": "",
|
|
105
|
+
"type": "string"
|
|
370
106
|
}
|
|
371
107
|
],
|
|
372
|
-
"
|
|
373
|
-
"outputs": [],
|
|
374
|
-
"stateMutability": "nonpayable",
|
|
108
|
+
"stateMutability": "pure",
|
|
375
109
|
"type": "function"
|
|
376
110
|
},
|
|
377
111
|
{
|
|
378
|
-
"inputs": [
|
|
112
|
+
"inputs": [],
|
|
113
|
+
"name": "state",
|
|
114
|
+
"outputs": [
|
|
379
115
|
{
|
|
380
|
-
"internalType": "
|
|
381
|
-
"name": "
|
|
382
|
-
"type": "
|
|
116
|
+
"internalType": "string",
|
|
117
|
+
"name": "",
|
|
118
|
+
"type": "string"
|
|
383
119
|
}
|
|
384
120
|
],
|
|
385
|
-
"
|
|
386
|
-
"outputs": [],
|
|
387
|
-
"stateMutability": "nonpayable",
|
|
121
|
+
"stateMutability": "view",
|
|
388
122
|
"type": "function"
|
|
389
123
|
},
|
|
390
124
|
{
|
|
391
125
|
"inputs": [
|
|
392
126
|
{
|
|
393
|
-
"internalType": "
|
|
394
|
-
"name": "
|
|
395
|
-
"type": "
|
|
396
|
-
}
|
|
397
|
-
],
|
|
398
|
-
"name": "changeSuccessFee",
|
|
399
|
-
"outputs": [],
|
|
400
|
-
"stateMutability": "nonpayable",
|
|
401
|
-
"type": "function"
|
|
402
|
-
},
|
|
403
|
-
{
|
|
404
|
-
"inputs": [
|
|
127
|
+
"internalType": "bytes",
|
|
128
|
+
"name": "secret",
|
|
129
|
+
"type": "bytes"
|
|
130
|
+
},
|
|
405
131
|
{
|
|
406
|
-
"internalType": "address",
|
|
407
|
-
"name": "
|
|
132
|
+
"internalType": "address payable",
|
|
133
|
+
"name": "to",
|
|
408
134
|
"type": "address"
|
|
409
135
|
}
|
|
410
136
|
],
|
|
411
|
-
"name": "
|
|
137
|
+
"name": "unlock",
|
|
412
138
|
"outputs": [],
|
|
413
139
|
"stateMutability": "nonpayable",
|
|
414
140
|
"type": "function"
|
|
415
141
|
},
|
|
416
142
|
{
|
|
417
|
-
"
|
|
418
|
-
|
|
419
|
-
"internalType": "address[]",
|
|
420
|
-
"name": "_tokens",
|
|
421
|
-
"type": "address[]"
|
|
422
|
-
},
|
|
423
|
-
{
|
|
424
|
-
"internalType": "uint256[]",
|
|
425
|
-
"name": "_amounts",
|
|
426
|
-
"type": "uint256[]"
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
"internalType": "uint256",
|
|
430
|
-
"name": "_term",
|
|
431
|
-
"type": "uint256"
|
|
432
|
-
},
|
|
433
|
-
{
|
|
434
|
-
"internalType": "address",
|
|
435
|
-
"name": "receiver",
|
|
436
|
-
"type": "address"
|
|
437
|
-
}
|
|
438
|
-
],
|
|
439
|
-
"name": "createDeposit",
|
|
440
|
-
"outputs": [
|
|
441
|
-
{
|
|
442
|
-
"internalType": "uint256",
|
|
443
|
-
"name": "",
|
|
444
|
-
"type": "uint256"
|
|
445
|
-
}
|
|
446
|
-
],
|
|
447
|
-
"stateMutability": "nonpayable",
|
|
448
|
-
"type": "function"
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
"inputs": [
|
|
452
|
-
{
|
|
453
|
-
"internalType": "uint256",
|
|
454
|
-
"name": "",
|
|
455
|
-
"type": "uint256"
|
|
456
|
-
}
|
|
457
|
-
],
|
|
458
|
-
"name": "deposits",
|
|
459
|
-
"outputs": [
|
|
460
|
-
{
|
|
461
|
-
"internalType": "uint256",
|
|
462
|
-
"name": "startTimestamp",
|
|
463
|
-
"type": "uint256"
|
|
464
|
-
},
|
|
465
|
-
{
|
|
466
|
-
"internalType": "uint256",
|
|
467
|
-
"name": "endTimestamp",
|
|
468
|
-
"type": "uint256"
|
|
469
|
-
},
|
|
470
|
-
{
|
|
471
|
-
"internalType": "bool",
|
|
472
|
-
"name": "active",
|
|
473
|
-
"type": "bool"
|
|
474
|
-
}
|
|
475
|
-
],
|
|
476
|
-
"stateMutability": "view",
|
|
477
|
-
"type": "function"
|
|
478
|
-
},
|
|
479
|
-
{
|
|
480
|
-
"inputs": [],
|
|
481
|
-
"name": "emergencyPenalty",
|
|
482
|
-
"outputs": [
|
|
483
|
-
{
|
|
484
|
-
"internalType": "uint256",
|
|
485
|
-
"name": "",
|
|
486
|
-
"type": "uint256"
|
|
487
|
-
}
|
|
488
|
-
],
|
|
489
|
-
"stateMutability": "view",
|
|
490
|
-
"type": "function"
|
|
491
|
-
},
|
|
492
|
-
{
|
|
493
|
-
"inputs": [],
|
|
494
|
-
"name": "emergencyPenaltyReceiver",
|
|
495
|
-
"outputs": [
|
|
496
|
-
{
|
|
497
|
-
"internalType": "address",
|
|
498
|
-
"name": "",
|
|
499
|
-
"type": "address"
|
|
500
|
-
}
|
|
501
|
-
],
|
|
502
|
-
"stateMutability": "view",
|
|
503
|
-
"type": "function"
|
|
504
|
-
},
|
|
505
|
-
{
|
|
506
|
-
"inputs": [
|
|
507
|
-
{
|
|
508
|
-
"internalType": "uint256",
|
|
509
|
-
"name": "_uid",
|
|
510
|
-
"type": "uint256"
|
|
511
|
-
}
|
|
512
|
-
],
|
|
513
|
-
"name": "emergencyWithdraw",
|
|
514
|
-
"outputs": [],
|
|
515
|
-
"stateMutability": "nonpayable",
|
|
516
|
-
"type": "function"
|
|
517
|
-
},
|
|
518
|
-
{
|
|
519
|
-
"inputs": [
|
|
520
|
-
{
|
|
521
|
-
"internalType": "uint256",
|
|
522
|
-
"name": "_uid",
|
|
523
|
-
"type": "uint256"
|
|
524
|
-
}
|
|
525
|
-
],
|
|
526
|
-
"name": "getDepositProfit",
|
|
527
|
-
"outputs": [
|
|
528
|
-
{
|
|
529
|
-
"internalType": "uint256",
|
|
530
|
-
"name": "",
|
|
531
|
-
"type": "uint256"
|
|
532
|
-
}
|
|
533
|
-
],
|
|
534
|
-
"stateMutability": "view",
|
|
535
|
-
"type": "function"
|
|
536
|
-
},
|
|
537
|
-
{
|
|
538
|
-
"inputs": [],
|
|
539
|
-
"name": "nftContract",
|
|
540
|
-
"outputs": [
|
|
541
|
-
{
|
|
542
|
-
"internalType": "contract IERC721",
|
|
543
|
-
"name": "",
|
|
544
|
-
"type": "address"
|
|
545
|
-
}
|
|
546
|
-
],
|
|
547
|
-
"stateMutability": "view",
|
|
548
|
-
"type": "function"
|
|
549
|
-
},
|
|
550
|
-
{
|
|
551
|
-
"inputs": [],
|
|
552
|
-
"name": "owner",
|
|
553
|
-
"outputs": [
|
|
554
|
-
{
|
|
555
|
-
"internalType": "address",
|
|
556
|
-
"name": "",
|
|
557
|
-
"type": "address"
|
|
558
|
-
}
|
|
559
|
-
],
|
|
560
|
-
"stateMutability": "view",
|
|
561
|
-
"type": "function"
|
|
562
|
-
},
|
|
563
|
-
{
|
|
564
|
-
"inputs": [],
|
|
565
|
-
"name": "renounceOwnership",
|
|
566
|
-
"outputs": [],
|
|
567
|
-
"stateMutability": "nonpayable",
|
|
568
|
-
"type": "function"
|
|
569
|
-
},
|
|
570
|
-
{
|
|
571
|
-
"inputs": [
|
|
572
|
-
{
|
|
573
|
-
"internalType": "address",
|
|
574
|
-
"name": "_token",
|
|
575
|
-
"type": "address"
|
|
576
|
-
},
|
|
577
|
-
{
|
|
578
|
-
"internalType": "address",
|
|
579
|
-
"name": "_stateView",
|
|
580
|
-
"type": "address"
|
|
581
|
-
},
|
|
582
|
-
{
|
|
583
|
-
"internalType": "bytes32",
|
|
584
|
-
"name": "_poolId",
|
|
585
|
-
"type": "bytes32"
|
|
586
|
-
},
|
|
587
|
-
{
|
|
588
|
-
"internalType": "bool",
|
|
589
|
-
"name": "_isToken0",
|
|
590
|
-
"type": "bool"
|
|
591
|
-
},
|
|
592
|
-
{
|
|
593
|
-
"internalType": "bool",
|
|
594
|
-
"name": "_status",
|
|
595
|
-
"type": "bool"
|
|
596
|
-
}
|
|
597
|
-
],
|
|
598
|
-
"name": "setAllowedToken",
|
|
599
|
-
"outputs": [],
|
|
600
|
-
"stateMutability": "nonpayable",
|
|
601
|
-
"type": "function"
|
|
602
|
-
},
|
|
603
|
-
{
|
|
604
|
-
"inputs": [],
|
|
605
|
-
"name": "successFee",
|
|
606
|
-
"outputs": [
|
|
607
|
-
{
|
|
608
|
-
"internalType": "uint256",
|
|
609
|
-
"name": "",
|
|
610
|
-
"type": "uint256"
|
|
611
|
-
}
|
|
612
|
-
],
|
|
613
|
-
"stateMutability": "view",
|
|
614
|
-
"type": "function"
|
|
615
|
-
},
|
|
616
|
-
{
|
|
617
|
-
"inputs": [],
|
|
618
|
-
"name": "successFeeReceiver",
|
|
619
|
-
"outputs": [
|
|
620
|
-
{
|
|
621
|
-
"internalType": "address",
|
|
622
|
-
"name": "",
|
|
623
|
-
"type": "address"
|
|
624
|
-
}
|
|
625
|
-
],
|
|
626
|
-
"stateMutability": "view",
|
|
627
|
-
"type": "function"
|
|
628
|
-
},
|
|
629
|
-
{
|
|
630
|
-
"inputs": [
|
|
631
|
-
{
|
|
632
|
-
"internalType": "address",
|
|
633
|
-
"name": "newOwner",
|
|
634
|
-
"type": "address"
|
|
635
|
-
}
|
|
636
|
-
],
|
|
637
|
-
"name": "transferOwnership",
|
|
638
|
-
"outputs": [],
|
|
639
|
-
"stateMutability": "nonpayable",
|
|
640
|
-
"type": "function"
|
|
641
|
-
},
|
|
642
|
-
{
|
|
643
|
-
"inputs": [
|
|
644
|
-
{
|
|
645
|
-
"internalType": "uint256",
|
|
646
|
-
"name": "_uid",
|
|
647
|
-
"type": "uint256"
|
|
648
|
-
}
|
|
649
|
-
],
|
|
650
|
-
"name": "viewAmountListById",
|
|
651
|
-
"outputs": [
|
|
652
|
-
{
|
|
653
|
-
"internalType": "uint256[]",
|
|
654
|
-
"name": "",
|
|
655
|
-
"type": "uint256[]"
|
|
656
|
-
}
|
|
657
|
-
],
|
|
658
|
-
"stateMutability": "view",
|
|
659
|
-
"type": "function"
|
|
660
|
-
},
|
|
661
|
-
{
|
|
662
|
-
"inputs": [
|
|
663
|
-
{
|
|
664
|
-
"internalType": "uint256",
|
|
665
|
-
"name": "_uid",
|
|
666
|
-
"type": "uint256"
|
|
667
|
-
}
|
|
668
|
-
],
|
|
669
|
-
"name": "viewStartPriceX96ListById",
|
|
670
|
-
"outputs": [
|
|
671
|
-
{
|
|
672
|
-
"internalType": "uint256[]",
|
|
673
|
-
"name": "",
|
|
674
|
-
"type": "uint256[]"
|
|
675
|
-
}
|
|
676
|
-
],
|
|
677
|
-
"stateMutability": "view",
|
|
678
|
-
"type": "function"
|
|
679
|
-
},
|
|
680
|
-
{
|
|
681
|
-
"inputs": [
|
|
682
|
-
{
|
|
683
|
-
"internalType": "uint256",
|
|
684
|
-
"name": "_uid",
|
|
685
|
-
"type": "uint256"
|
|
686
|
-
}
|
|
687
|
-
],
|
|
688
|
-
"name": "viewTokenListById",
|
|
689
|
-
"outputs": [
|
|
690
|
-
{
|
|
691
|
-
"internalType": "address[]",
|
|
692
|
-
"name": "",
|
|
693
|
-
"type": "address[]"
|
|
694
|
-
}
|
|
695
|
-
],
|
|
696
|
-
"stateMutability": "view",
|
|
697
|
-
"type": "function"
|
|
698
|
-
},
|
|
699
|
-
{
|
|
700
|
-
"inputs": [
|
|
701
|
-
{
|
|
702
|
-
"internalType": "uint256",
|
|
703
|
-
"name": "_uid",
|
|
704
|
-
"type": "uint256"
|
|
705
|
-
}
|
|
706
|
-
],
|
|
707
|
-
"name": "withdraw",
|
|
708
|
-
"outputs": [],
|
|
709
|
-
"stateMutability": "nonpayable",
|
|
710
|
-
"type": "function"
|
|
143
|
+
"stateMutability": "payable",
|
|
144
|
+
"type": "receive"
|
|
711
145
|
}
|
|
712
146
|
] as const satisfies Abi;
|
|
713
147
|
|
|
@@ -794,154 +228,51 @@ export class Vault_json {
|
|
|
794
228
|
}
|
|
795
229
|
|
|
796
230
|
/**
|
|
797
|
-
*
|
|
798
|
-
* view
|
|
799
|
-
*/
|
|
800
|
-
async FEES_DECIMALS(): Promise<bigint> {
|
|
801
|
-
return this.contract.read.FEES_DECIMALS() as Promise<bigint>;
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
/**
|
|
805
|
-
* MAX_TERM
|
|
806
|
-
* view
|
|
807
|
-
*/
|
|
808
|
-
async MAX_TERM(): Promise<bigint> {
|
|
809
|
-
return this.contract.read.MAX_TERM() as Promise<bigint>;
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
/**
|
|
813
|
-
* MAX_TOKENS_IN_DEPOSIT
|
|
231
|
+
* SEAL
|
|
814
232
|
* view
|
|
815
233
|
*/
|
|
816
|
-
async
|
|
817
|
-
return this.contract.read.
|
|
234
|
+
async SEAL(): Promise<`0x${string}`> {
|
|
235
|
+
return this.contract.read.SEAL() as Promise<`0x${string}`>;
|
|
818
236
|
}
|
|
819
237
|
|
|
820
238
|
/**
|
|
821
|
-
*
|
|
239
|
+
* balance
|
|
822
240
|
* view
|
|
823
241
|
*/
|
|
824
|
-
async
|
|
825
|
-
return this.contract.read.
|
|
242
|
+
async balance(): Promise<bigint> {
|
|
243
|
+
return this.contract.read.balance() as Promise<bigint>;
|
|
826
244
|
}
|
|
827
245
|
|
|
828
246
|
/**
|
|
829
|
-
*
|
|
247
|
+
* found
|
|
830
248
|
* view
|
|
831
249
|
*/
|
|
832
|
-
async
|
|
833
|
-
return this.contract.read.
|
|
250
|
+
async found(): Promise<boolean> {
|
|
251
|
+
return this.contract.read.found() as Promise<boolean>;
|
|
834
252
|
}
|
|
835
253
|
|
|
836
254
|
/**
|
|
837
|
-
*
|
|
838
|
-
*
|
|
255
|
+
* rules
|
|
256
|
+
* pure
|
|
839
257
|
*/
|
|
840
|
-
async
|
|
841
|
-
return this.contract.read.
|
|
258
|
+
async rules(): Promise<string> {
|
|
259
|
+
return this.contract.read.rules() as Promise<string>;
|
|
842
260
|
}
|
|
843
261
|
|
|
844
262
|
/**
|
|
845
|
-
*
|
|
263
|
+
* state
|
|
846
264
|
* view
|
|
847
265
|
*/
|
|
848
|
-
async
|
|
849
|
-
return this.contract.read.
|
|
266
|
+
async state(): Promise<string> {
|
|
267
|
+
return this.contract.read.state() as Promise<string>;
|
|
850
268
|
}
|
|
851
269
|
|
|
852
270
|
/**
|
|
853
|
-
*
|
|
854
|
-
*
|
|
271
|
+
* unlock
|
|
272
|
+
* nonpayable
|
|
273
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
855
274
|
*/
|
|
856
|
-
async
|
|
857
|
-
return this.contract.read.getDepositProfit([_uid] as const) as Promise<bigint>;
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
/**
|
|
861
|
-
* nftContract
|
|
862
|
-
* view
|
|
863
|
-
*/
|
|
864
|
-
async nftContract(): Promise<`0x${string}`> {
|
|
865
|
-
return this.contract.read.nftContract() as Promise<`0x${string}`>;
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
/**
|
|
869
|
-
* owner
|
|
870
|
-
* view
|
|
871
|
-
*/
|
|
872
|
-
async owner(): Promise<`0x${string}`> {
|
|
873
|
-
return this.contract.read.owner() as Promise<`0x${string}`>;
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
/**
|
|
877
|
-
* successFee
|
|
878
|
-
* view
|
|
879
|
-
*/
|
|
880
|
-
async successFee(): Promise<bigint> {
|
|
881
|
-
return this.contract.read.successFee() as Promise<bigint>;
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
/**
|
|
885
|
-
* successFeeReceiver
|
|
886
|
-
* view
|
|
887
|
-
*/
|
|
888
|
-
async successFeeReceiver(): Promise<`0x${string}`> {
|
|
889
|
-
return this.contract.read.successFeeReceiver() as Promise<`0x${string}`>;
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
/**
|
|
893
|
-
* viewAmountListById
|
|
894
|
-
* view
|
|
895
|
-
*/
|
|
896
|
-
async viewAmountListById(_uid: bigint): Promise<bigint[]> {
|
|
897
|
-
return this.contract.read.viewAmountListById([_uid] as const) as Promise<bigint[]>;
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
/**
|
|
901
|
-
* viewStartPriceX96ListById
|
|
902
|
-
* view
|
|
903
|
-
*/
|
|
904
|
-
async viewStartPriceX96ListById(_uid: bigint): Promise<bigint[]> {
|
|
905
|
-
return this.contract.read.viewStartPriceX96ListById([_uid] as const) as Promise<bigint[]>;
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
/**
|
|
909
|
-
* viewTokenListById
|
|
910
|
-
* view
|
|
911
|
-
*/
|
|
912
|
-
async viewTokenListById(_uid: bigint): Promise<`0x${string}`[]> {
|
|
913
|
-
return this.contract.read.viewTokenListById([_uid] as const) as Promise<`0x${string}`[]>;
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
/**
|
|
917
|
-
* changeEmergencyPenalty
|
|
918
|
-
* nonpayable
|
|
919
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
920
|
-
*/
|
|
921
|
-
async changeEmergencyPenalty(_newEmergencyPenalty: bigint, options?: {
|
|
922
|
-
accessList?: import('viem').AccessList;
|
|
923
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
924
|
-
chain?: import('viem').Chain | null;
|
|
925
|
-
dataSuffix?: `0x${string}`;
|
|
926
|
-
gas?: bigint;
|
|
927
|
-
gasPrice?: bigint;
|
|
928
|
-
maxFeePerGas?: bigint;
|
|
929
|
-
maxPriorityFeePerGas?: bigint;
|
|
930
|
-
nonce?: number;
|
|
931
|
-
value?: bigint;
|
|
932
|
-
}): Promise<`0x${string}`> {
|
|
933
|
-
if (!this.contract.write) {
|
|
934
|
-
throw new Error('Wallet client is required for write operations');
|
|
935
|
-
}
|
|
936
|
-
return this.contract.write.changeEmergencyPenalty([_newEmergencyPenalty] as const, options) as Promise<`0x${string}`>;
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
/**
|
|
940
|
-
* changeEmergencyPenaltyReceiver
|
|
941
|
-
* nonpayable
|
|
942
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
943
|
-
*/
|
|
944
|
-
async changeEmergencyPenaltyReceiver(_newEmergencyPenaltyReveiver: `0x${string}`, options?: {
|
|
275
|
+
async unlock(secret: `0x${string}`, to: `0x${string}`, options?: {
|
|
945
276
|
accessList?: import('viem').AccessList;
|
|
946
277
|
authorizationList?: import('viem').AuthorizationList;
|
|
947
278
|
chain?: import('viem').Chain | null;
|
|
@@ -956,191 +287,7 @@ export class Vault_json {
|
|
|
956
287
|
if (!this.contract.write) {
|
|
957
288
|
throw new Error('Wallet client is required for write operations');
|
|
958
289
|
}
|
|
959
|
-
return this.contract.write.
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
/**
|
|
963
|
-
* changeSuccessFee
|
|
964
|
-
* nonpayable
|
|
965
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
966
|
-
*/
|
|
967
|
-
async changeSuccessFee(_newSuccessFee: bigint, options?: {
|
|
968
|
-
accessList?: import('viem').AccessList;
|
|
969
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
970
|
-
chain?: import('viem').Chain | null;
|
|
971
|
-
dataSuffix?: `0x${string}`;
|
|
972
|
-
gas?: bigint;
|
|
973
|
-
gasPrice?: bigint;
|
|
974
|
-
maxFeePerGas?: bigint;
|
|
975
|
-
maxPriorityFeePerGas?: bigint;
|
|
976
|
-
nonce?: number;
|
|
977
|
-
value?: bigint;
|
|
978
|
-
}): Promise<`0x${string}`> {
|
|
979
|
-
if (!this.contract.write) {
|
|
980
|
-
throw new Error('Wallet client is required for write operations');
|
|
981
|
-
}
|
|
982
|
-
return this.contract.write.changeSuccessFee([_newSuccessFee] as const, options) as Promise<`0x${string}`>;
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
/**
|
|
986
|
-
* changeSuccessFeeReceiver
|
|
987
|
-
* nonpayable
|
|
988
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
989
|
-
*/
|
|
990
|
-
async changeSuccessFeeReceiver(_successFeeReceiver: `0x${string}`, options?: {
|
|
991
|
-
accessList?: import('viem').AccessList;
|
|
992
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
993
|
-
chain?: import('viem').Chain | null;
|
|
994
|
-
dataSuffix?: `0x${string}`;
|
|
995
|
-
gas?: bigint;
|
|
996
|
-
gasPrice?: bigint;
|
|
997
|
-
maxFeePerGas?: bigint;
|
|
998
|
-
maxPriorityFeePerGas?: bigint;
|
|
999
|
-
nonce?: number;
|
|
1000
|
-
value?: bigint;
|
|
1001
|
-
}): Promise<`0x${string}`> {
|
|
1002
|
-
if (!this.contract.write) {
|
|
1003
|
-
throw new Error('Wallet client is required for write operations');
|
|
1004
|
-
}
|
|
1005
|
-
return this.contract.write.changeSuccessFeeReceiver([_successFeeReceiver] as const, options) as Promise<`0x${string}`>;
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
/**
|
|
1009
|
-
* createDeposit
|
|
1010
|
-
* nonpayable
|
|
1011
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1012
|
-
*/
|
|
1013
|
-
async createDeposit(_tokens: `0x${string}`[], _amounts: bigint[], _term: bigint, receiver: `0x${string}`, options?: {
|
|
1014
|
-
accessList?: import('viem').AccessList;
|
|
1015
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1016
|
-
chain?: import('viem').Chain | null;
|
|
1017
|
-
dataSuffix?: `0x${string}`;
|
|
1018
|
-
gas?: bigint;
|
|
1019
|
-
gasPrice?: bigint;
|
|
1020
|
-
maxFeePerGas?: bigint;
|
|
1021
|
-
maxPriorityFeePerGas?: bigint;
|
|
1022
|
-
nonce?: number;
|
|
1023
|
-
value?: bigint;
|
|
1024
|
-
}): Promise<`0x${string}`> {
|
|
1025
|
-
if (!this.contract.write) {
|
|
1026
|
-
throw new Error('Wallet client is required for write operations');
|
|
1027
|
-
}
|
|
1028
|
-
return this.contract.write.createDeposit([_tokens, _amounts, _term, receiver] as const, options) as Promise<`0x${string}`>;
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
/**
|
|
1032
|
-
* emergencyWithdraw
|
|
1033
|
-
* nonpayable
|
|
1034
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1035
|
-
*/
|
|
1036
|
-
async emergencyWithdraw(_uid: bigint, options?: {
|
|
1037
|
-
accessList?: import('viem').AccessList;
|
|
1038
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1039
|
-
chain?: import('viem').Chain | null;
|
|
1040
|
-
dataSuffix?: `0x${string}`;
|
|
1041
|
-
gas?: bigint;
|
|
1042
|
-
gasPrice?: bigint;
|
|
1043
|
-
maxFeePerGas?: bigint;
|
|
1044
|
-
maxPriorityFeePerGas?: bigint;
|
|
1045
|
-
nonce?: number;
|
|
1046
|
-
value?: bigint;
|
|
1047
|
-
}): Promise<`0x${string}`> {
|
|
1048
|
-
if (!this.contract.write) {
|
|
1049
|
-
throw new Error('Wallet client is required for write operations');
|
|
1050
|
-
}
|
|
1051
|
-
return this.contract.write.emergencyWithdraw([_uid] as const, options) as Promise<`0x${string}`>;
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
/**
|
|
1055
|
-
* renounceOwnership
|
|
1056
|
-
* nonpayable
|
|
1057
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1058
|
-
*/
|
|
1059
|
-
async renounceOwnership(options?: {
|
|
1060
|
-
accessList?: import('viem').AccessList;
|
|
1061
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1062
|
-
chain?: import('viem').Chain | null;
|
|
1063
|
-
dataSuffix?: `0x${string}`;
|
|
1064
|
-
gas?: bigint;
|
|
1065
|
-
gasPrice?: bigint;
|
|
1066
|
-
maxFeePerGas?: bigint;
|
|
1067
|
-
maxPriorityFeePerGas?: bigint;
|
|
1068
|
-
nonce?: number;
|
|
1069
|
-
value?: bigint;
|
|
1070
|
-
}): Promise<`0x${string}`> {
|
|
1071
|
-
if (!this.contract.write) {
|
|
1072
|
-
throw new Error('Wallet client is required for write operations');
|
|
1073
|
-
}
|
|
1074
|
-
return this.contract.write.renounceOwnership(options) as Promise<`0x${string}`>;
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
/**
|
|
1078
|
-
* setAllowedToken
|
|
1079
|
-
* nonpayable
|
|
1080
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1081
|
-
*/
|
|
1082
|
-
async setAllowedToken(_token: `0x${string}`, _stateView: `0x${string}`, _poolId: `0x${string}`, _isToken0: boolean, _status: boolean, options?: {
|
|
1083
|
-
accessList?: import('viem').AccessList;
|
|
1084
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1085
|
-
chain?: import('viem').Chain | null;
|
|
1086
|
-
dataSuffix?: `0x${string}`;
|
|
1087
|
-
gas?: bigint;
|
|
1088
|
-
gasPrice?: bigint;
|
|
1089
|
-
maxFeePerGas?: bigint;
|
|
1090
|
-
maxPriorityFeePerGas?: bigint;
|
|
1091
|
-
nonce?: number;
|
|
1092
|
-
value?: bigint;
|
|
1093
|
-
}): Promise<`0x${string}`> {
|
|
1094
|
-
if (!this.contract.write) {
|
|
1095
|
-
throw new Error('Wallet client is required for write operations');
|
|
1096
|
-
}
|
|
1097
|
-
return this.contract.write.setAllowedToken([_token, _stateView, _poolId, _isToken0, _status] as const, options) as Promise<`0x${string}`>;
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
/**
|
|
1101
|
-
* transferOwnership
|
|
1102
|
-
* nonpayable
|
|
1103
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1104
|
-
*/
|
|
1105
|
-
async transferOwnership(newOwner: `0x${string}`, options?: {
|
|
1106
|
-
accessList?: import('viem').AccessList;
|
|
1107
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1108
|
-
chain?: import('viem').Chain | null;
|
|
1109
|
-
dataSuffix?: `0x${string}`;
|
|
1110
|
-
gas?: bigint;
|
|
1111
|
-
gasPrice?: bigint;
|
|
1112
|
-
maxFeePerGas?: bigint;
|
|
1113
|
-
maxPriorityFeePerGas?: bigint;
|
|
1114
|
-
nonce?: number;
|
|
1115
|
-
value?: bigint;
|
|
1116
|
-
}): Promise<`0x${string}`> {
|
|
1117
|
-
if (!this.contract.write) {
|
|
1118
|
-
throw new Error('Wallet client is required for write operations');
|
|
1119
|
-
}
|
|
1120
|
-
return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
/**
|
|
1124
|
-
* withdraw
|
|
1125
|
-
* nonpayable
|
|
1126
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1127
|
-
*/
|
|
1128
|
-
async withdraw(_uid: bigint, options?: {
|
|
1129
|
-
accessList?: import('viem').AccessList;
|
|
1130
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1131
|
-
chain?: import('viem').Chain | null;
|
|
1132
|
-
dataSuffix?: `0x${string}`;
|
|
1133
|
-
gas?: bigint;
|
|
1134
|
-
gasPrice?: bigint;
|
|
1135
|
-
maxFeePerGas?: bigint;
|
|
1136
|
-
maxPriorityFeePerGas?: bigint;
|
|
1137
|
-
nonce?: number;
|
|
1138
|
-
value?: bigint;
|
|
1139
|
-
}): Promise<`0x${string}`> {
|
|
1140
|
-
if (!this.contract.write) {
|
|
1141
|
-
throw new Error('Wallet client is required for write operations');
|
|
1142
|
-
}
|
|
1143
|
-
return this.contract.write.withdraw([_uid] as const, options) as Promise<`0x${string}`>;
|
|
290
|
+
return this.contract.write.unlock([secret, to] as const, options) as Promise<`0x${string}`>;
|
|
1144
291
|
}
|
|
1145
292
|
|
|
1146
293
|
|
|
@@ -1160,11 +307,11 @@ export class Vault_json {
|
|
|
1160
307
|
}
|
|
1161
308
|
return {
|
|
1162
309
|
/**
|
|
1163
|
-
* Simulate
|
|
310
|
+
* Simulate unlock
|
|
1164
311
|
* Returns gas estimate and result without sending transaction
|
|
1165
312
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1166
313
|
*/
|
|
1167
|
-
async
|
|
314
|
+
async unlock(secret: `0x${string}`, to: `0x${string}`, options?: {
|
|
1168
315
|
accessList?: import('viem').AccessList;
|
|
1169
316
|
authorizationList?: import('viem').AuthorizationList;
|
|
1170
317
|
chain?: import('viem').Chain | null;
|
|
@@ -1176,178 +323,7 @@ export class Vault_json {
|
|
|
1176
323
|
nonce?: number;
|
|
1177
324
|
value?: bigint;
|
|
1178
325
|
}): Promise<void> {
|
|
1179
|
-
return contract.simulate.
|
|
1180
|
-
},
|
|
1181
|
-
/**
|
|
1182
|
-
* Simulate changeEmergencyPenaltyReceiver
|
|
1183
|
-
* Returns gas estimate and result without sending transaction
|
|
1184
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1185
|
-
*/
|
|
1186
|
-
async changeEmergencyPenaltyReceiver(_newEmergencyPenaltyReveiver: `0x${string}`, options?: {
|
|
1187
|
-
accessList?: import('viem').AccessList;
|
|
1188
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1189
|
-
chain?: import('viem').Chain | null;
|
|
1190
|
-
dataSuffix?: `0x${string}`;
|
|
1191
|
-
gas?: bigint;
|
|
1192
|
-
gasPrice?: bigint;
|
|
1193
|
-
maxFeePerGas?: bigint;
|
|
1194
|
-
maxPriorityFeePerGas?: bigint;
|
|
1195
|
-
nonce?: number;
|
|
1196
|
-
value?: bigint;
|
|
1197
|
-
}): Promise<void> {
|
|
1198
|
-
return contract.simulate.changeEmergencyPenaltyReceiver([_newEmergencyPenaltyReveiver] as const, options) as Promise<void>;
|
|
1199
|
-
},
|
|
1200
|
-
/**
|
|
1201
|
-
* Simulate changeSuccessFee
|
|
1202
|
-
* Returns gas estimate and result without sending transaction
|
|
1203
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1204
|
-
*/
|
|
1205
|
-
async changeSuccessFee(_newSuccessFee: bigint, options?: {
|
|
1206
|
-
accessList?: import('viem').AccessList;
|
|
1207
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1208
|
-
chain?: import('viem').Chain | null;
|
|
1209
|
-
dataSuffix?: `0x${string}`;
|
|
1210
|
-
gas?: bigint;
|
|
1211
|
-
gasPrice?: bigint;
|
|
1212
|
-
maxFeePerGas?: bigint;
|
|
1213
|
-
maxPriorityFeePerGas?: bigint;
|
|
1214
|
-
nonce?: number;
|
|
1215
|
-
value?: bigint;
|
|
1216
|
-
}): Promise<void> {
|
|
1217
|
-
return contract.simulate.changeSuccessFee([_newSuccessFee] as const, options) as Promise<void>;
|
|
1218
|
-
},
|
|
1219
|
-
/**
|
|
1220
|
-
* Simulate changeSuccessFeeReceiver
|
|
1221
|
-
* Returns gas estimate and result without sending transaction
|
|
1222
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1223
|
-
*/
|
|
1224
|
-
async changeSuccessFeeReceiver(_successFeeReceiver: `0x${string}`, options?: {
|
|
1225
|
-
accessList?: import('viem').AccessList;
|
|
1226
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1227
|
-
chain?: import('viem').Chain | null;
|
|
1228
|
-
dataSuffix?: `0x${string}`;
|
|
1229
|
-
gas?: bigint;
|
|
1230
|
-
gasPrice?: bigint;
|
|
1231
|
-
maxFeePerGas?: bigint;
|
|
1232
|
-
maxPriorityFeePerGas?: bigint;
|
|
1233
|
-
nonce?: number;
|
|
1234
|
-
value?: bigint;
|
|
1235
|
-
}): Promise<void> {
|
|
1236
|
-
return contract.simulate.changeSuccessFeeReceiver([_successFeeReceiver] as const, options) as Promise<void>;
|
|
1237
|
-
},
|
|
1238
|
-
/**
|
|
1239
|
-
* Simulate createDeposit
|
|
1240
|
-
* Returns gas estimate and result without sending transaction
|
|
1241
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1242
|
-
*/
|
|
1243
|
-
async createDeposit(_tokens: `0x${string}`[], _amounts: bigint[], _term: bigint, receiver: `0x${string}`, options?: {
|
|
1244
|
-
accessList?: import('viem').AccessList;
|
|
1245
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1246
|
-
chain?: import('viem').Chain | null;
|
|
1247
|
-
dataSuffix?: `0x${string}`;
|
|
1248
|
-
gas?: bigint;
|
|
1249
|
-
gasPrice?: bigint;
|
|
1250
|
-
maxFeePerGas?: bigint;
|
|
1251
|
-
maxPriorityFeePerGas?: bigint;
|
|
1252
|
-
nonce?: number;
|
|
1253
|
-
value?: bigint;
|
|
1254
|
-
}): Promise<bigint> {
|
|
1255
|
-
return contract.simulate.createDeposit([_tokens, _amounts, _term, receiver] as const, options) as Promise<bigint>;
|
|
1256
|
-
},
|
|
1257
|
-
/**
|
|
1258
|
-
* Simulate emergencyWithdraw
|
|
1259
|
-
* Returns gas estimate and result without sending transaction
|
|
1260
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1261
|
-
*/
|
|
1262
|
-
async emergencyWithdraw(_uid: bigint, options?: {
|
|
1263
|
-
accessList?: import('viem').AccessList;
|
|
1264
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1265
|
-
chain?: import('viem').Chain | null;
|
|
1266
|
-
dataSuffix?: `0x${string}`;
|
|
1267
|
-
gas?: bigint;
|
|
1268
|
-
gasPrice?: bigint;
|
|
1269
|
-
maxFeePerGas?: bigint;
|
|
1270
|
-
maxPriorityFeePerGas?: bigint;
|
|
1271
|
-
nonce?: number;
|
|
1272
|
-
value?: bigint;
|
|
1273
|
-
}): Promise<void> {
|
|
1274
|
-
return contract.simulate.emergencyWithdraw([_uid] as const, options) as Promise<void>;
|
|
1275
|
-
},
|
|
1276
|
-
/**
|
|
1277
|
-
* Simulate renounceOwnership
|
|
1278
|
-
* Returns gas estimate and result without sending transaction
|
|
1279
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1280
|
-
*/
|
|
1281
|
-
async renounceOwnership(options?: {
|
|
1282
|
-
accessList?: import('viem').AccessList;
|
|
1283
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1284
|
-
chain?: import('viem').Chain | null;
|
|
1285
|
-
dataSuffix?: `0x${string}`;
|
|
1286
|
-
gas?: bigint;
|
|
1287
|
-
gasPrice?: bigint;
|
|
1288
|
-
maxFeePerGas?: bigint;
|
|
1289
|
-
maxPriorityFeePerGas?: bigint;
|
|
1290
|
-
nonce?: number;
|
|
1291
|
-
value?: bigint;
|
|
1292
|
-
}): Promise<void> {
|
|
1293
|
-
return contract.simulate.renounceOwnership(options) as Promise<void>;
|
|
1294
|
-
},
|
|
1295
|
-
/**
|
|
1296
|
-
* Simulate setAllowedToken
|
|
1297
|
-
* Returns gas estimate and result without sending transaction
|
|
1298
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1299
|
-
*/
|
|
1300
|
-
async setAllowedToken(_token: `0x${string}`, _stateView: `0x${string}`, _poolId: `0x${string}`, _isToken0: boolean, _status: boolean, options?: {
|
|
1301
|
-
accessList?: import('viem').AccessList;
|
|
1302
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1303
|
-
chain?: import('viem').Chain | null;
|
|
1304
|
-
dataSuffix?: `0x${string}`;
|
|
1305
|
-
gas?: bigint;
|
|
1306
|
-
gasPrice?: bigint;
|
|
1307
|
-
maxFeePerGas?: bigint;
|
|
1308
|
-
maxPriorityFeePerGas?: bigint;
|
|
1309
|
-
nonce?: number;
|
|
1310
|
-
value?: bigint;
|
|
1311
|
-
}): Promise<void> {
|
|
1312
|
-
return contract.simulate.setAllowedToken([_token, _stateView, _poolId, _isToken0, _status] as const, options) as Promise<void>;
|
|
1313
|
-
},
|
|
1314
|
-
/**
|
|
1315
|
-
* Simulate transferOwnership
|
|
1316
|
-
* Returns gas estimate and result without sending transaction
|
|
1317
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1318
|
-
*/
|
|
1319
|
-
async transferOwnership(newOwner: `0x${string}`, options?: {
|
|
1320
|
-
accessList?: import('viem').AccessList;
|
|
1321
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1322
|
-
chain?: import('viem').Chain | null;
|
|
1323
|
-
dataSuffix?: `0x${string}`;
|
|
1324
|
-
gas?: bigint;
|
|
1325
|
-
gasPrice?: bigint;
|
|
1326
|
-
maxFeePerGas?: bigint;
|
|
1327
|
-
maxPriorityFeePerGas?: bigint;
|
|
1328
|
-
nonce?: number;
|
|
1329
|
-
value?: bigint;
|
|
1330
|
-
}): Promise<void> {
|
|
1331
|
-
return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
|
|
1332
|
-
},
|
|
1333
|
-
/**
|
|
1334
|
-
* Simulate withdraw
|
|
1335
|
-
* Returns gas estimate and result without sending transaction
|
|
1336
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1337
|
-
*/
|
|
1338
|
-
async withdraw(_uid: bigint, options?: {
|
|
1339
|
-
accessList?: import('viem').AccessList;
|
|
1340
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1341
|
-
chain?: import('viem').Chain | null;
|
|
1342
|
-
dataSuffix?: `0x${string}`;
|
|
1343
|
-
gas?: bigint;
|
|
1344
|
-
gasPrice?: bigint;
|
|
1345
|
-
maxFeePerGas?: bigint;
|
|
1346
|
-
maxPriorityFeePerGas?: bigint;
|
|
1347
|
-
nonce?: number;
|
|
1348
|
-
value?: bigint;
|
|
1349
|
-
}): Promise<void> {
|
|
1350
|
-
return contract.simulate.withdraw([_uid] as const, options) as Promise<void>;
|
|
326
|
+
return contract.simulate.unlock([secret, to] as const, options) as Promise<void>;
|
|
1351
327
|
}
|
|
1352
328
|
};
|
|
1353
329
|
}
|
|
@@ -1367,35 +343,16 @@ export class Vault_json {
|
|
|
1367
343
|
get watch() {
|
|
1368
344
|
return {
|
|
1369
345
|
/**
|
|
1370
|
-
* Watch
|
|
1371
|
-
* @param callback Function to call when event is emitted
|
|
1372
|
-
* @param filter Optional filter for indexed parameters
|
|
1373
|
-
* @returns Unwatch function to stop listening
|
|
1374
|
-
*/
|
|
1375
|
-
NewDeposit: (callback: (event: { uid: bigint; startTimestamp: bigint; endTimestamp: bigint; tokens: `0x${string}`[]; amounts: bigint[]; prices: bigint[]; receiver: `0x${string}` }) => void) => {
|
|
1376
|
-
return this.publicClient.watchContractEvent({
|
|
1377
|
-
address: this.contractAddress,
|
|
1378
|
-
abi: Vault_jsonAbi,
|
|
1379
|
-
eventName: 'NewDeposit',
|
|
1380
|
-
|
|
1381
|
-
onLogs: (logs: any[]) => {
|
|
1382
|
-
logs.forEach((log: any) => {
|
|
1383
|
-
callback(log.args as any);
|
|
1384
|
-
});
|
|
1385
|
-
},
|
|
1386
|
-
}) as () => void;
|
|
1387
|
-
},
|
|
1388
|
-
/**
|
|
1389
|
-
* Watch OwnershipTransferred events
|
|
346
|
+
* Watch Found events
|
|
1390
347
|
* @param callback Function to call when event is emitted
|
|
1391
348
|
* @param filter Optional filter for indexed parameters
|
|
1392
349
|
* @returns Unwatch function to stop listening
|
|
1393
350
|
*/
|
|
1394
|
-
|
|
351
|
+
Found: (callback: (event: { to: `0x${string}`; amount: bigint }) => void, filter?: { to: `0x${string}` }) => {
|
|
1395
352
|
return this.publicClient.watchContractEvent({
|
|
1396
353
|
address: this.contractAddress,
|
|
1397
354
|
abi: Vault_jsonAbi,
|
|
1398
|
-
eventName: '
|
|
355
|
+
eventName: 'Found',
|
|
1399
356
|
args: filter,
|
|
1400
357
|
onLogs: (logs: any[]) => {
|
|
1401
358
|
logs.forEach((log: any) => {
|
|
@@ -1405,130 +362,16 @@ export class Vault_json {
|
|
|
1405
362
|
}) as () => void;
|
|
1406
363
|
},
|
|
1407
364
|
/**
|
|
1408
|
-
* Watch
|
|
1409
|
-
* @param callback Function to call when event is emitted
|
|
1410
|
-
* @param filter Optional filter for indexed parameters
|
|
1411
|
-
* @returns Unwatch function to stop listening
|
|
1412
|
-
*/
|
|
1413
|
-
SetEmergencyPenalty: (callback: (event: { emergencyPenalty: bigint }) => void) => {
|
|
1414
|
-
return this.publicClient.watchContractEvent({
|
|
1415
|
-
address: this.contractAddress,
|
|
1416
|
-
abi: Vault_jsonAbi,
|
|
1417
|
-
eventName: 'SetEmergencyPenalty',
|
|
1418
|
-
|
|
1419
|
-
onLogs: (logs: any[]) => {
|
|
1420
|
-
logs.forEach((log: any) => {
|
|
1421
|
-
callback(log.args as any);
|
|
1422
|
-
});
|
|
1423
|
-
},
|
|
1424
|
-
}) as () => void;
|
|
1425
|
-
},
|
|
1426
|
-
/**
|
|
1427
|
-
* Watch SetEmergencyPenaltyReceiver events
|
|
1428
|
-
* @param callback Function to call when event is emitted
|
|
1429
|
-
* @param filter Optional filter for indexed parameters
|
|
1430
|
-
* @returns Unwatch function to stop listening
|
|
1431
|
-
*/
|
|
1432
|
-
SetEmergencyPenaltyReceiver: (callback: (event: { emergencyPenaltyReceiver: `0x${string}` }) => void) => {
|
|
1433
|
-
return this.publicClient.watchContractEvent({
|
|
1434
|
-
address: this.contractAddress,
|
|
1435
|
-
abi: Vault_jsonAbi,
|
|
1436
|
-
eventName: 'SetEmergencyPenaltyReceiver',
|
|
1437
|
-
|
|
1438
|
-
onLogs: (logs: any[]) => {
|
|
1439
|
-
logs.forEach((log: any) => {
|
|
1440
|
-
callback(log.args as any);
|
|
1441
|
-
});
|
|
1442
|
-
},
|
|
1443
|
-
}) as () => void;
|
|
1444
|
-
},
|
|
1445
|
-
/**
|
|
1446
|
-
* Watch SetSuccessFee events
|
|
1447
|
-
* @param callback Function to call when event is emitted
|
|
1448
|
-
* @param filter Optional filter for indexed parameters
|
|
1449
|
-
* @returns Unwatch function to stop listening
|
|
1450
|
-
*/
|
|
1451
|
-
SetSuccessFee: (callback: (event: { successFee: bigint }) => void) => {
|
|
1452
|
-
return this.publicClient.watchContractEvent({
|
|
1453
|
-
address: this.contractAddress,
|
|
1454
|
-
abi: Vault_jsonAbi,
|
|
1455
|
-
eventName: 'SetSuccessFee',
|
|
1456
|
-
|
|
1457
|
-
onLogs: (logs: any[]) => {
|
|
1458
|
-
logs.forEach((log: any) => {
|
|
1459
|
-
callback(log.args as any);
|
|
1460
|
-
});
|
|
1461
|
-
},
|
|
1462
|
-
}) as () => void;
|
|
1463
|
-
},
|
|
1464
|
-
/**
|
|
1465
|
-
* Watch SetSuccessFeeReceiver events
|
|
1466
|
-
* @param callback Function to call when event is emitted
|
|
1467
|
-
* @param filter Optional filter for indexed parameters
|
|
1468
|
-
* @returns Unwatch function to stop listening
|
|
1469
|
-
*/
|
|
1470
|
-
SetSuccessFeeReceiver: (callback: (event: { successFeeReceiver: `0x${string}` }) => void) => {
|
|
1471
|
-
return this.publicClient.watchContractEvent({
|
|
1472
|
-
address: this.contractAddress,
|
|
1473
|
-
abi: Vault_jsonAbi,
|
|
1474
|
-
eventName: 'SetSuccessFeeReceiver',
|
|
1475
|
-
|
|
1476
|
-
onLogs: (logs: any[]) => {
|
|
1477
|
-
logs.forEach((log: any) => {
|
|
1478
|
-
callback(log.args as any);
|
|
1479
|
-
});
|
|
1480
|
-
},
|
|
1481
|
-
}) as () => void;
|
|
1482
|
-
},
|
|
1483
|
-
/**
|
|
1484
|
-
* Watch SuccessFeeCharged events
|
|
1485
|
-
* @param callback Function to call when event is emitted
|
|
1486
|
-
* @param filter Optional filter for indexed parameters
|
|
1487
|
-
* @returns Unwatch function to stop listening
|
|
1488
|
-
*/
|
|
1489
|
-
SuccessFeeCharged: (callback: (event: { uid: bigint; token: `0x${string}`; amount: bigint }) => void) => {
|
|
1490
|
-
return this.publicClient.watchContractEvent({
|
|
1491
|
-
address: this.contractAddress,
|
|
1492
|
-
abi: Vault_jsonAbi,
|
|
1493
|
-
eventName: 'SuccessFeeCharged',
|
|
1494
|
-
|
|
1495
|
-
onLogs: (logs: any[]) => {
|
|
1496
|
-
logs.forEach((log: any) => {
|
|
1497
|
-
callback(log.args as any);
|
|
1498
|
-
});
|
|
1499
|
-
},
|
|
1500
|
-
}) as () => void;
|
|
1501
|
-
},
|
|
1502
|
-
/**
|
|
1503
|
-
* Watch TokenUpdated events
|
|
1504
|
-
* @param callback Function to call when event is emitted
|
|
1505
|
-
* @param filter Optional filter for indexed parameters
|
|
1506
|
-
* @returns Unwatch function to stop listening
|
|
1507
|
-
*/
|
|
1508
|
-
TokenUpdated: (callback: (event: { token: `0x${string}`; stateView: `0x${string}`; poolId: `0x${string}`; isToken0: boolean; status: boolean }) => void) => {
|
|
1509
|
-
return this.publicClient.watchContractEvent({
|
|
1510
|
-
address: this.contractAddress,
|
|
1511
|
-
abi: Vault_jsonAbi,
|
|
1512
|
-
eventName: 'TokenUpdated',
|
|
1513
|
-
|
|
1514
|
-
onLogs: (logs: any[]) => {
|
|
1515
|
-
logs.forEach((log: any) => {
|
|
1516
|
-
callback(log.args as any);
|
|
1517
|
-
});
|
|
1518
|
-
},
|
|
1519
|
-
}) as () => void;
|
|
1520
|
-
},
|
|
1521
|
-
/**
|
|
1522
|
-
* Watch Withdraw events
|
|
365
|
+
* Watch Funded events
|
|
1523
366
|
* @param callback Function to call when event is emitted
|
|
1524
367
|
* @param filter Optional filter for indexed parameters
|
|
1525
368
|
* @returns Unwatch function to stop listening
|
|
1526
369
|
*/
|
|
1527
|
-
|
|
370
|
+
Funded: (callback: (event: { from: `0x${string}`; amount: bigint }) => void, filter?: { from: `0x${string}` }) => {
|
|
1528
371
|
return this.publicClient.watchContractEvent({
|
|
1529
372
|
address: this.contractAddress,
|
|
1530
373
|
abi: Vault_jsonAbi,
|
|
1531
|
-
eventName: '
|
|
374
|
+
eventName: 'Funded',
|
|
1532
375
|
args: filter,
|
|
1533
376
|
onLogs: (logs: any[]) => {
|
|
1534
377
|
logs.forEach((log: any) => {
|