@gitmyabi/vault 1.0.4 → 1.0.5
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 +178 -2954
- package/contracts/Vault_json.js +206 -3169
- package/contracts/Vault_json.ts +262 -3916
- package/package.json +3 -3
package/contracts/Vault_json.js
CHANGED
|
@@ -10,3256 +10,293 @@ const viem_1 = require("viem");
|
|
|
10
10
|
exports.Vault_jsonAbi = [
|
|
11
11
|
{
|
|
12
12
|
"inputs": [
|
|
13
|
-
{
|
|
14
|
-
"internalType": "contract IERC20",
|
|
15
|
-
"name": "_asset",
|
|
16
|
-
"type": "address"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"internalType": "contract IOracle",
|
|
20
|
-
"name": "_oracle",
|
|
21
|
-
"type": "address"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"internalType": "address",
|
|
25
|
-
"name": "admin",
|
|
26
|
-
"type": "address"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"internalType": "address",
|
|
30
|
-
"name": "manager",
|
|
31
|
-
"type": "address"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"internalType": "address",
|
|
35
|
-
"name": "bot",
|
|
36
|
-
"type": "address"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"internalType": "address",
|
|
40
|
-
"name": "guardian",
|
|
41
|
-
"type": "address"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"internalType": "address",
|
|
45
|
-
"name": "_feeRecipient",
|
|
46
|
-
"type": "address"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"internalType": "uint256",
|
|
50
|
-
"name": "_performanceFee",
|
|
51
|
-
"type": "uint256"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"internalType": "uint256",
|
|
55
|
-
"name": "_minDepositAssets",
|
|
56
|
-
"type": "uint256"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"internalType": "uint256",
|
|
60
|
-
"name": "_maxSettlementBatchSize",
|
|
61
|
-
"type": "uint256"
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
"stateMutability": "nonpayable",
|
|
65
|
-
"type": "constructor"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"inputs": [],
|
|
69
|
-
"name": "AccessControlBadConfirmation",
|
|
70
|
-
"type": "error"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"inputs": [
|
|
74
|
-
{
|
|
75
|
-
"internalType": "address",
|
|
76
|
-
"name": "account",
|
|
77
|
-
"type": "address"
|
|
78
|
-
},
|
|
79
13
|
{
|
|
80
14
|
"internalType": "bytes32",
|
|
81
|
-
"name": "
|
|
15
|
+
"name": "seal_",
|
|
82
16
|
"type": "bytes32"
|
|
83
17
|
}
|
|
84
18
|
],
|
|
85
|
-
"
|
|
86
|
-
"type": "
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"inputs": [
|
|
90
|
-
{
|
|
91
|
-
"internalType": "address",
|
|
92
|
-
"name": "target",
|
|
93
|
-
"type": "address"
|
|
94
|
-
}
|
|
95
|
-
],
|
|
96
|
-
"name": "AddressEmptyCode",
|
|
97
|
-
"type": "error"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"inputs": [],
|
|
101
|
-
"name": "AlreadyTracked",
|
|
102
|
-
"type": "error"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"inputs": [],
|
|
106
|
-
"name": "DepositTooSmall",
|
|
107
|
-
"type": "error"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"inputs": [],
|
|
111
|
-
"name": "EnforcedPause",
|
|
112
|
-
"type": "error"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"inputs": [],
|
|
116
|
-
"name": "ExpectedPause",
|
|
117
|
-
"type": "error"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"inputs": [],
|
|
121
|
-
"name": "FailedCall",
|
|
122
|
-
"type": "error"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"inputs": [
|
|
126
|
-
{
|
|
127
|
-
"internalType": "uint256",
|
|
128
|
-
"name": "balance",
|
|
129
|
-
"type": "uint256"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"internalType": "uint256",
|
|
133
|
-
"name": "needed",
|
|
134
|
-
"type": "uint256"
|
|
135
|
-
}
|
|
136
|
-
],
|
|
137
|
-
"name": "InsufficientBalance",
|
|
138
|
-
"type": "error"
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
"inputs": [],
|
|
142
|
-
"name": "InsufficientLiquidity",
|
|
143
|
-
"type": "error"
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"inputs": [],
|
|
147
|
-
"name": "InsufficientShares",
|
|
148
|
-
"type": "error"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"inputs": [],
|
|
152
|
-
"name": "InvalidBatchSize",
|
|
153
|
-
"type": "error"
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"inputs": [],
|
|
157
|
-
"name": "InvalidFee",
|
|
158
|
-
"type": "error"
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
"inputs": [],
|
|
162
|
-
"name": "NotRequestOwner",
|
|
163
|
-
"type": "error"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"inputs": [],
|
|
167
|
-
"name": "NotTracked",
|
|
168
|
-
"type": "error"
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"inputs": [],
|
|
172
|
-
"name": "OnlyHPT",
|
|
173
|
-
"type": "error"
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
"inputs": [],
|
|
177
|
-
"name": "ReentrancyGuardReentrantCall",
|
|
178
|
-
"type": "error"
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
"inputs": [],
|
|
182
|
-
"name": "RequestNotOpen",
|
|
183
|
-
"type": "error"
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
"inputs": [
|
|
187
|
-
{
|
|
188
|
-
"internalType": "address",
|
|
189
|
-
"name": "token",
|
|
190
|
-
"type": "address"
|
|
191
|
-
}
|
|
192
|
-
],
|
|
193
|
-
"name": "SafeERC20FailedOperation",
|
|
194
|
-
"type": "error"
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
"inputs": [
|
|
198
|
-
{
|
|
199
|
-
"internalType": "address",
|
|
200
|
-
"name": "target",
|
|
201
|
-
"type": "address"
|
|
202
|
-
}
|
|
203
|
-
],
|
|
204
|
-
"name": "TargetNotAllowed",
|
|
205
|
-
"type": "error"
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
"inputs": [
|
|
209
|
-
{
|
|
210
|
-
"internalType": "address",
|
|
211
|
-
"name": "token",
|
|
212
|
-
"type": "address"
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
"internalType": "uint256",
|
|
216
|
-
"name": "balance",
|
|
217
|
-
"type": "uint256"
|
|
218
|
-
}
|
|
219
|
-
],
|
|
220
|
-
"name": "TrackedTokenHasBalance",
|
|
221
|
-
"type": "error"
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
"inputs": [],
|
|
225
|
-
"name": "WithdrawNotReady",
|
|
226
|
-
"type": "error"
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
"inputs": [],
|
|
230
|
-
"name": "ZeroAmount",
|
|
231
|
-
"type": "error"
|
|
19
|
+
"stateMutability": "nonpayable",
|
|
20
|
+
"type": "constructor"
|
|
232
21
|
},
|
|
233
22
|
{
|
|
234
23
|
"anonymous": false,
|
|
235
24
|
"inputs": [
|
|
236
|
-
{
|
|
237
|
-
"indexed": true,
|
|
238
|
-
"internalType": "uint256",
|
|
239
|
-
"name": "depositId",
|
|
240
|
-
"type": "uint256"
|
|
241
|
-
},
|
|
242
25
|
{
|
|
243
26
|
"indexed": true,
|
|
244
27
|
"internalType": "address",
|
|
245
|
-
"name": "
|
|
28
|
+
"name": "to",
|
|
246
29
|
"type": "address"
|
|
247
30
|
},
|
|
248
31
|
{
|
|
249
32
|
"indexed": false,
|
|
250
33
|
"internalType": "uint256",
|
|
251
|
-
"name": "
|
|
34
|
+
"name": "amount",
|
|
252
35
|
"type": "uint256"
|
|
253
36
|
}
|
|
254
37
|
],
|
|
255
|
-
"name": "
|
|
38
|
+
"name": "Found",
|
|
256
39
|
"type": "event"
|
|
257
40
|
},
|
|
258
41
|
{
|
|
259
42
|
"anonymous": false,
|
|
260
43
|
"inputs": [
|
|
261
|
-
{
|
|
262
|
-
"indexed": true,
|
|
263
|
-
"internalType": "uint256",
|
|
264
|
-
"name": "depositId",
|
|
265
|
-
"type": "uint256"
|
|
266
|
-
},
|
|
267
44
|
{
|
|
268
45
|
"indexed": true,
|
|
269
46
|
"internalType": "address",
|
|
270
|
-
"name": "
|
|
47
|
+
"name": "from",
|
|
271
48
|
"type": "address"
|
|
272
49
|
},
|
|
273
50
|
{
|
|
274
51
|
"indexed": false,
|
|
275
52
|
"internalType": "uint256",
|
|
276
|
-
"name": "
|
|
53
|
+
"name": "amount",
|
|
277
54
|
"type": "uint256"
|
|
278
55
|
}
|
|
279
56
|
],
|
|
280
|
-
"name": "
|
|
57
|
+
"name": "Funded",
|
|
281
58
|
"type": "event"
|
|
282
59
|
},
|
|
283
60
|
{
|
|
284
|
-
"
|
|
285
|
-
"
|
|
286
|
-
|
|
287
|
-
"indexed": true,
|
|
288
|
-
"internalType": "uint256",
|
|
289
|
-
"name": "depositId",
|
|
290
|
-
"type": "uint256"
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
"indexed": true,
|
|
294
|
-
"internalType": "address",
|
|
295
|
-
"name": "owner",
|
|
296
|
-
"type": "address"
|
|
297
|
-
},
|
|
61
|
+
"inputs": [],
|
|
62
|
+
"name": "SEAL",
|
|
63
|
+
"outputs": [
|
|
298
64
|
{
|
|
299
|
-
"
|
|
300
|
-
"
|
|
301
|
-
"
|
|
302
|
-
"type": "uint256"
|
|
65
|
+
"internalType": "bytes32",
|
|
66
|
+
"name": "",
|
|
67
|
+
"type": "bytes32"
|
|
303
68
|
}
|
|
304
69
|
],
|
|
305
|
-
"
|
|
306
|
-
"type": "
|
|
70
|
+
"stateMutability": "view",
|
|
71
|
+
"type": "function"
|
|
307
72
|
},
|
|
308
73
|
{
|
|
309
|
-
"
|
|
310
|
-
"
|
|
311
|
-
|
|
312
|
-
"indexed": true,
|
|
313
|
-
"internalType": "uint256",
|
|
314
|
-
"name": "depositId",
|
|
315
|
-
"type": "uint256"
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
"indexed": true,
|
|
319
|
-
"internalType": "address",
|
|
320
|
-
"name": "owner",
|
|
321
|
-
"type": "address"
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
"indexed": false,
|
|
325
|
-
"internalType": "uint256",
|
|
326
|
-
"name": "netAssets",
|
|
327
|
-
"type": "uint256"
|
|
328
|
-
},
|
|
74
|
+
"inputs": [],
|
|
75
|
+
"name": "balance",
|
|
76
|
+
"outputs": [
|
|
329
77
|
{
|
|
330
|
-
"indexed": false,
|
|
331
78
|
"internalType": "uint256",
|
|
332
|
-
"name": "
|
|
79
|
+
"name": "",
|
|
333
80
|
"type": "uint256"
|
|
334
81
|
}
|
|
335
82
|
],
|
|
336
|
-
"
|
|
337
|
-
"type": "
|
|
83
|
+
"stateMutability": "view",
|
|
84
|
+
"type": "function"
|
|
338
85
|
},
|
|
339
86
|
{
|
|
340
|
-
"
|
|
341
|
-
"
|
|
87
|
+
"inputs": [],
|
|
88
|
+
"name": "found",
|
|
89
|
+
"outputs": [
|
|
342
90
|
{
|
|
343
|
-
"
|
|
344
|
-
"
|
|
345
|
-
"
|
|
346
|
-
"type": "uint256"
|
|
91
|
+
"internalType": "bool",
|
|
92
|
+
"name": "",
|
|
93
|
+
"type": "bool"
|
|
347
94
|
}
|
|
348
95
|
],
|
|
349
|
-
"
|
|
350
|
-
"type": "
|
|
96
|
+
"stateMutability": "view",
|
|
97
|
+
"type": "function"
|
|
351
98
|
},
|
|
352
99
|
{
|
|
353
|
-
"
|
|
354
|
-
"
|
|
100
|
+
"inputs": [],
|
|
101
|
+
"name": "rules",
|
|
102
|
+
"outputs": [
|
|
355
103
|
{
|
|
356
|
-
"
|
|
357
|
-
"
|
|
358
|
-
"
|
|
359
|
-
"type": "uint256"
|
|
104
|
+
"internalType": "string",
|
|
105
|
+
"name": "",
|
|
106
|
+
"type": "string"
|
|
360
107
|
}
|
|
361
108
|
],
|
|
362
|
-
"
|
|
363
|
-
"type": "
|
|
109
|
+
"stateMutability": "pure",
|
|
110
|
+
"type": "function"
|
|
364
111
|
},
|
|
365
112
|
{
|
|
366
|
-
"
|
|
367
|
-
"
|
|
113
|
+
"inputs": [],
|
|
114
|
+
"name": "state",
|
|
115
|
+
"outputs": [
|
|
368
116
|
{
|
|
369
|
-
"
|
|
370
|
-
"
|
|
371
|
-
"
|
|
372
|
-
"type": "address"
|
|
117
|
+
"internalType": "string",
|
|
118
|
+
"name": "",
|
|
119
|
+
"type": "string"
|
|
373
120
|
}
|
|
374
121
|
],
|
|
375
|
-
"
|
|
376
|
-
"type": "
|
|
122
|
+
"stateMutability": "view",
|
|
123
|
+
"type": "function"
|
|
377
124
|
},
|
|
378
125
|
{
|
|
379
|
-
"anonymous": false,
|
|
380
126
|
"inputs": [
|
|
381
127
|
{
|
|
382
|
-
"
|
|
383
|
-
"
|
|
384
|
-
"
|
|
128
|
+
"internalType": "bytes",
|
|
129
|
+
"name": "secret",
|
|
130
|
+
"type": "bytes"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"internalType": "address payable",
|
|
134
|
+
"name": "to",
|
|
385
135
|
"type": "address"
|
|
386
136
|
}
|
|
387
137
|
],
|
|
388
|
-
"name": "
|
|
389
|
-
"
|
|
138
|
+
"name": "unlock",
|
|
139
|
+
"outputs": [],
|
|
140
|
+
"stateMutability": "nonpayable",
|
|
141
|
+
"type": "function"
|
|
390
142
|
},
|
|
391
143
|
{
|
|
392
|
-
"
|
|
393
|
-
"
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
{
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
{
|
|
439
|
-
"indexed": true,
|
|
440
|
-
"internalType": "bytes32",
|
|
441
|
-
"name": "previousAdminRole",
|
|
442
|
-
"type": "bytes32"
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
"indexed": true,
|
|
446
|
-
"internalType": "bytes32",
|
|
447
|
-
"name": "newAdminRole",
|
|
448
|
-
"type": "bytes32"
|
|
449
|
-
}
|
|
450
|
-
],
|
|
451
|
-
"name": "RoleAdminChanged",
|
|
452
|
-
"type": "event"
|
|
453
|
-
},
|
|
454
|
-
{
|
|
455
|
-
"anonymous": false,
|
|
456
|
-
"inputs": [
|
|
457
|
-
{
|
|
458
|
-
"indexed": true,
|
|
459
|
-
"internalType": "bytes32",
|
|
460
|
-
"name": "role",
|
|
461
|
-
"type": "bytes32"
|
|
462
|
-
},
|
|
463
|
-
{
|
|
464
|
-
"indexed": true,
|
|
465
|
-
"internalType": "address",
|
|
466
|
-
"name": "account",
|
|
467
|
-
"type": "address"
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
"indexed": true,
|
|
471
|
-
"internalType": "address",
|
|
472
|
-
"name": "sender",
|
|
473
|
-
"type": "address"
|
|
474
|
-
}
|
|
475
|
-
],
|
|
476
|
-
"name": "RoleGranted",
|
|
477
|
-
"type": "event"
|
|
478
|
-
},
|
|
479
|
-
{
|
|
480
|
-
"anonymous": false,
|
|
481
|
-
"inputs": [
|
|
482
|
-
{
|
|
483
|
-
"indexed": true,
|
|
484
|
-
"internalType": "bytes32",
|
|
485
|
-
"name": "role",
|
|
486
|
-
"type": "bytes32"
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
"indexed": true,
|
|
490
|
-
"internalType": "address",
|
|
491
|
-
"name": "account",
|
|
492
|
-
"type": "address"
|
|
493
|
-
},
|
|
494
|
-
{
|
|
495
|
-
"indexed": true,
|
|
496
|
-
"internalType": "address",
|
|
497
|
-
"name": "sender",
|
|
498
|
-
"type": "address"
|
|
499
|
-
}
|
|
500
|
-
],
|
|
501
|
-
"name": "RoleRevoked",
|
|
502
|
-
"type": "event"
|
|
503
|
-
},
|
|
504
|
-
{
|
|
505
|
-
"anonymous": false,
|
|
506
|
-
"inputs": [
|
|
507
|
-
{
|
|
508
|
-
"indexed": false,
|
|
509
|
-
"internalType": "uint256",
|
|
510
|
-
"name": "oraclePriceCount",
|
|
511
|
-
"type": "uint256"
|
|
512
|
-
},
|
|
513
|
-
{
|
|
514
|
-
"indexed": false,
|
|
515
|
-
"internalType": "uint256",
|
|
516
|
-
"name": "depositsSettled",
|
|
517
|
-
"type": "uint256"
|
|
518
|
-
},
|
|
519
|
-
{
|
|
520
|
-
"indexed": false,
|
|
521
|
-
"internalType": "uint256",
|
|
522
|
-
"name": "depositsRefunded",
|
|
523
|
-
"type": "uint256"
|
|
524
|
-
},
|
|
525
|
-
{
|
|
526
|
-
"indexed": false,
|
|
527
|
-
"internalType": "uint256",
|
|
528
|
-
"name": "withdrawalsProcessed",
|
|
529
|
-
"type": "uint256"
|
|
530
|
-
}
|
|
531
|
-
],
|
|
532
|
-
"name": "Settled",
|
|
533
|
-
"type": "event"
|
|
534
|
-
},
|
|
535
|
-
{
|
|
536
|
-
"anonymous": false,
|
|
537
|
-
"inputs": [
|
|
538
|
-
{
|
|
539
|
-
"indexed": false,
|
|
540
|
-
"internalType": "uint256",
|
|
541
|
-
"name": "fee",
|
|
542
|
-
"type": "uint256"
|
|
543
|
-
}
|
|
544
|
-
],
|
|
545
|
-
"name": "SettlementFeeSet",
|
|
546
|
-
"type": "event"
|
|
547
|
-
},
|
|
548
|
-
{
|
|
549
|
-
"anonymous": false,
|
|
550
|
-
"inputs": [
|
|
551
|
-
{
|
|
552
|
-
"indexed": true,
|
|
553
|
-
"internalType": "address",
|
|
554
|
-
"name": "target",
|
|
555
|
-
"type": "address"
|
|
556
|
-
},
|
|
557
|
-
{
|
|
558
|
-
"indexed": false,
|
|
559
|
-
"internalType": "bool",
|
|
560
|
-
"name": "allowed",
|
|
561
|
-
"type": "bool"
|
|
562
|
-
}
|
|
563
|
-
],
|
|
564
|
-
"name": "TargetAllowed",
|
|
565
|
-
"type": "event"
|
|
566
|
-
},
|
|
567
|
-
{
|
|
568
|
-
"anonymous": false,
|
|
569
|
-
"inputs": [
|
|
570
|
-
{
|
|
571
|
-
"indexed": true,
|
|
572
|
-
"internalType": "address",
|
|
573
|
-
"name": "token",
|
|
574
|
-
"type": "address"
|
|
575
|
-
}
|
|
576
|
-
],
|
|
577
|
-
"name": "TrackedTokenAdded",
|
|
578
|
-
"type": "event"
|
|
579
|
-
},
|
|
580
|
-
{
|
|
581
|
-
"anonymous": false,
|
|
582
|
-
"inputs": [
|
|
583
|
-
{
|
|
584
|
-
"indexed": true,
|
|
585
|
-
"internalType": "address",
|
|
586
|
-
"name": "token",
|
|
587
|
-
"type": "address"
|
|
588
|
-
}
|
|
589
|
-
],
|
|
590
|
-
"name": "TrackedTokenRemoved",
|
|
591
|
-
"type": "event"
|
|
592
|
-
},
|
|
593
|
-
{
|
|
594
|
-
"anonymous": false,
|
|
595
|
-
"inputs": [
|
|
596
|
-
{
|
|
597
|
-
"indexed": false,
|
|
598
|
-
"internalType": "address",
|
|
599
|
-
"name": "account",
|
|
600
|
-
"type": "address"
|
|
601
|
-
}
|
|
602
|
-
],
|
|
603
|
-
"name": "Unpaused",
|
|
604
|
-
"type": "event"
|
|
605
|
-
},
|
|
606
|
-
{
|
|
607
|
-
"anonymous": false,
|
|
608
|
-
"inputs": [
|
|
609
|
-
{
|
|
610
|
-
"indexed": true,
|
|
611
|
-
"internalType": "uint256",
|
|
612
|
-
"name": "requestId",
|
|
613
|
-
"type": "uint256"
|
|
614
|
-
},
|
|
615
|
-
{
|
|
616
|
-
"indexed": true,
|
|
617
|
-
"internalType": "address",
|
|
618
|
-
"name": "owner",
|
|
619
|
-
"type": "address"
|
|
620
|
-
},
|
|
621
|
-
{
|
|
622
|
-
"indexed": false,
|
|
623
|
-
"internalType": "uint256",
|
|
624
|
-
"name": "shares",
|
|
625
|
-
"type": "uint256"
|
|
626
|
-
}
|
|
627
|
-
],
|
|
628
|
-
"name": "WithdrawCancelled",
|
|
629
|
-
"type": "event"
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
"anonymous": false,
|
|
633
|
-
"inputs": [
|
|
634
|
-
{
|
|
635
|
-
"indexed": true,
|
|
636
|
-
"internalType": "uint256",
|
|
637
|
-
"name": "requestId",
|
|
638
|
-
"type": "uint256"
|
|
639
|
-
},
|
|
640
|
-
{
|
|
641
|
-
"indexed": true,
|
|
642
|
-
"internalType": "address",
|
|
643
|
-
"name": "owner",
|
|
644
|
-
"type": "address"
|
|
645
|
-
},
|
|
646
|
-
{
|
|
647
|
-
"indexed": false,
|
|
648
|
-
"internalType": "uint256",
|
|
649
|
-
"name": "shares",
|
|
650
|
-
"type": "uint256"
|
|
651
|
-
},
|
|
652
|
-
{
|
|
653
|
-
"indexed": false,
|
|
654
|
-
"internalType": "uint256",
|
|
655
|
-
"name": "assetsPaid",
|
|
656
|
-
"type": "uint256"
|
|
657
|
-
},
|
|
658
|
-
{
|
|
659
|
-
"indexed": false,
|
|
660
|
-
"internalType": "uint256",
|
|
661
|
-
"name": "fee",
|
|
662
|
-
"type": "uint256"
|
|
663
|
-
}
|
|
664
|
-
],
|
|
665
|
-
"name": "WithdrawClaimed",
|
|
666
|
-
"type": "event"
|
|
667
|
-
},
|
|
668
|
-
{
|
|
669
|
-
"anonymous": false,
|
|
670
|
-
"inputs": [
|
|
671
|
-
{
|
|
672
|
-
"indexed": true,
|
|
673
|
-
"internalType": "uint256",
|
|
674
|
-
"name": "requestId",
|
|
675
|
-
"type": "uint256"
|
|
676
|
-
},
|
|
677
|
-
{
|
|
678
|
-
"indexed": true,
|
|
679
|
-
"internalType": "address",
|
|
680
|
-
"name": "owner",
|
|
681
|
-
"type": "address"
|
|
682
|
-
},
|
|
683
|
-
{
|
|
684
|
-
"indexed": false,
|
|
685
|
-
"internalType": "uint256",
|
|
686
|
-
"name": "shares",
|
|
687
|
-
"type": "uint256"
|
|
688
|
-
},
|
|
689
|
-
{
|
|
690
|
-
"indexed": false,
|
|
691
|
-
"internalType": "uint64",
|
|
692
|
-
"name": "claimableAt",
|
|
693
|
-
"type": "uint64"
|
|
694
|
-
}
|
|
695
|
-
],
|
|
696
|
-
"name": "WithdrawRequested",
|
|
697
|
-
"type": "event"
|
|
698
|
-
},
|
|
699
|
-
{
|
|
700
|
-
"anonymous": false,
|
|
701
|
-
"inputs": [
|
|
702
|
-
{
|
|
703
|
-
"indexed": true,
|
|
704
|
-
"internalType": "uint256",
|
|
705
|
-
"name": "requestId",
|
|
706
|
-
"type": "uint256"
|
|
707
|
-
},
|
|
708
|
-
{
|
|
709
|
-
"indexed": true,
|
|
710
|
-
"internalType": "address",
|
|
711
|
-
"name": "owner",
|
|
712
|
-
"type": "address"
|
|
713
|
-
},
|
|
714
|
-
{
|
|
715
|
-
"indexed": false,
|
|
716
|
-
"internalType": "uint256",
|
|
717
|
-
"name": "shares",
|
|
718
|
-
"type": "uint256"
|
|
719
|
-
},
|
|
720
|
-
{
|
|
721
|
-
"indexed": false,
|
|
722
|
-
"internalType": "uint256",
|
|
723
|
-
"name": "assetsOut",
|
|
724
|
-
"type": "uint256"
|
|
725
|
-
},
|
|
726
|
-
{
|
|
727
|
-
"indexed": false,
|
|
728
|
-
"internalType": "uint256",
|
|
729
|
-
"name": "fee",
|
|
730
|
-
"type": "uint256"
|
|
731
|
-
}
|
|
732
|
-
],
|
|
733
|
-
"name": "WithdrawalSettled",
|
|
734
|
-
"type": "event"
|
|
735
|
-
},
|
|
736
|
-
{
|
|
737
|
-
"inputs": [],
|
|
738
|
-
"name": "BOT_ROLE",
|
|
739
|
-
"outputs": [
|
|
740
|
-
{
|
|
741
|
-
"internalType": "bytes32",
|
|
742
|
-
"name": "",
|
|
743
|
-
"type": "bytes32"
|
|
744
|
-
}
|
|
745
|
-
],
|
|
746
|
-
"stateMutability": "view",
|
|
747
|
-
"type": "function"
|
|
748
|
-
},
|
|
749
|
-
{
|
|
750
|
-
"inputs": [],
|
|
751
|
-
"name": "BPS",
|
|
752
|
-
"outputs": [
|
|
753
|
-
{
|
|
754
|
-
"internalType": "uint256",
|
|
755
|
-
"name": "",
|
|
756
|
-
"type": "uint256"
|
|
757
|
-
}
|
|
758
|
-
],
|
|
759
|
-
"stateMutability": "view",
|
|
760
|
-
"type": "function"
|
|
761
|
-
},
|
|
762
|
-
{
|
|
763
|
-
"inputs": [],
|
|
764
|
-
"name": "DEFAULT_ADMIN_ROLE",
|
|
765
|
-
"outputs": [
|
|
766
|
-
{
|
|
767
|
-
"internalType": "bytes32",
|
|
768
|
-
"name": "",
|
|
769
|
-
"type": "bytes32"
|
|
770
|
-
}
|
|
771
|
-
],
|
|
772
|
-
"stateMutability": "view",
|
|
773
|
-
"type": "function"
|
|
774
|
-
},
|
|
775
|
-
{
|
|
776
|
-
"inputs": [],
|
|
777
|
-
"name": "GUARDIAN_ROLE",
|
|
778
|
-
"outputs": [
|
|
779
|
-
{
|
|
780
|
-
"internalType": "bytes32",
|
|
781
|
-
"name": "",
|
|
782
|
-
"type": "bytes32"
|
|
783
|
-
}
|
|
784
|
-
],
|
|
785
|
-
"stateMutability": "view",
|
|
786
|
-
"type": "function"
|
|
787
|
-
},
|
|
788
|
-
{
|
|
789
|
-
"inputs": [],
|
|
790
|
-
"name": "MANAGER_ROLE",
|
|
791
|
-
"outputs": [
|
|
792
|
-
{
|
|
793
|
-
"internalType": "bytes32",
|
|
794
|
-
"name": "",
|
|
795
|
-
"type": "bytes32"
|
|
796
|
-
}
|
|
797
|
-
],
|
|
798
|
-
"stateMutability": "view",
|
|
799
|
-
"type": "function"
|
|
800
|
-
},
|
|
801
|
-
{
|
|
802
|
-
"inputs": [],
|
|
803
|
-
"name": "MAX_FEE_BPS",
|
|
804
|
-
"outputs": [
|
|
805
|
-
{
|
|
806
|
-
"internalType": "uint256",
|
|
807
|
-
"name": "",
|
|
808
|
-
"type": "uint256"
|
|
809
|
-
}
|
|
810
|
-
],
|
|
811
|
-
"stateMutability": "view",
|
|
812
|
-
"type": "function"
|
|
813
|
-
},
|
|
814
|
-
{
|
|
815
|
-
"inputs": [],
|
|
816
|
-
"name": "SHARE_SCALE",
|
|
817
|
-
"outputs": [
|
|
818
|
-
{
|
|
819
|
-
"internalType": "uint256",
|
|
820
|
-
"name": "",
|
|
821
|
-
"type": "uint256"
|
|
822
|
-
}
|
|
823
|
-
],
|
|
824
|
-
"stateMutability": "view",
|
|
825
|
-
"type": "function"
|
|
826
|
-
},
|
|
827
|
-
{
|
|
828
|
-
"inputs": [
|
|
829
|
-
{
|
|
830
|
-
"internalType": "address",
|
|
831
|
-
"name": "token",
|
|
832
|
-
"type": "address"
|
|
833
|
-
}
|
|
834
|
-
],
|
|
835
|
-
"name": "addTrackedToken",
|
|
836
|
-
"outputs": [],
|
|
837
|
-
"stateMutability": "nonpayable",
|
|
838
|
-
"type": "function"
|
|
839
|
-
},
|
|
840
|
-
{
|
|
841
|
-
"inputs": [
|
|
842
|
-
{
|
|
843
|
-
"internalType": "contract IERC20",
|
|
844
|
-
"name": "token",
|
|
845
|
-
"type": "address"
|
|
846
|
-
},
|
|
847
|
-
{
|
|
848
|
-
"internalType": "address",
|
|
849
|
-
"name": "spender",
|
|
850
|
-
"type": "address"
|
|
851
|
-
},
|
|
852
|
-
{
|
|
853
|
-
"internalType": "uint256",
|
|
854
|
-
"name": "amount",
|
|
855
|
-
"type": "uint256"
|
|
856
|
-
}
|
|
857
|
-
],
|
|
858
|
-
"name": "approveERC20",
|
|
859
|
-
"outputs": [],
|
|
860
|
-
"stateMutability": "nonpayable",
|
|
861
|
-
"type": "function"
|
|
862
|
-
},
|
|
863
|
-
{
|
|
864
|
-
"inputs": [
|
|
865
|
-
{
|
|
866
|
-
"internalType": "address",
|
|
867
|
-
"name": "permit2",
|
|
868
|
-
"type": "address"
|
|
869
|
-
},
|
|
870
|
-
{
|
|
871
|
-
"internalType": "address",
|
|
872
|
-
"name": "token",
|
|
873
|
-
"type": "address"
|
|
874
|
-
},
|
|
875
|
-
{
|
|
876
|
-
"internalType": "address",
|
|
877
|
-
"name": "spender",
|
|
878
|
-
"type": "address"
|
|
879
|
-
},
|
|
880
|
-
{
|
|
881
|
-
"internalType": "uint160",
|
|
882
|
-
"name": "amount",
|
|
883
|
-
"type": "uint160"
|
|
884
|
-
},
|
|
885
|
-
{
|
|
886
|
-
"internalType": "uint48",
|
|
887
|
-
"name": "expiration",
|
|
888
|
-
"type": "uint48"
|
|
889
|
-
}
|
|
890
|
-
],
|
|
891
|
-
"name": "approvePermit2",
|
|
892
|
-
"outputs": [],
|
|
893
|
-
"stateMutability": "nonpayable",
|
|
894
|
-
"type": "function"
|
|
895
|
-
},
|
|
896
|
-
{
|
|
897
|
-
"inputs": [],
|
|
898
|
-
"name": "asset",
|
|
899
|
-
"outputs": [
|
|
900
|
-
{
|
|
901
|
-
"internalType": "address",
|
|
902
|
-
"name": "",
|
|
903
|
-
"type": "address"
|
|
904
|
-
}
|
|
905
|
-
],
|
|
906
|
-
"stateMutability": "view",
|
|
907
|
-
"type": "function"
|
|
908
|
-
},
|
|
909
|
-
{
|
|
910
|
-
"inputs": [],
|
|
911
|
-
"name": "assetDecimals",
|
|
912
|
-
"outputs": [
|
|
913
|
-
{
|
|
914
|
-
"internalType": "uint8",
|
|
915
|
-
"name": "",
|
|
916
|
-
"type": "uint8"
|
|
917
|
-
}
|
|
918
|
-
],
|
|
919
|
-
"stateMutability": "view",
|
|
920
|
-
"type": "function"
|
|
921
|
-
},
|
|
922
|
-
{
|
|
923
|
-
"inputs": [],
|
|
924
|
-
"name": "assetToken",
|
|
925
|
-
"outputs": [
|
|
926
|
-
{
|
|
927
|
-
"internalType": "contract IERC20",
|
|
928
|
-
"name": "",
|
|
929
|
-
"type": "address"
|
|
930
|
-
}
|
|
931
|
-
],
|
|
932
|
-
"stateMutability": "view",
|
|
933
|
-
"type": "function"
|
|
934
|
-
},
|
|
935
|
-
{
|
|
936
|
-
"inputs": [
|
|
937
|
-
{
|
|
938
|
-
"internalType": "uint256",
|
|
939
|
-
"name": "depositId",
|
|
940
|
-
"type": "uint256"
|
|
941
|
-
}
|
|
942
|
-
],
|
|
943
|
-
"name": "cancelDepositRequest",
|
|
944
|
-
"outputs": [],
|
|
945
|
-
"stateMutability": "nonpayable",
|
|
946
|
-
"type": "function"
|
|
947
|
-
},
|
|
948
|
-
{
|
|
949
|
-
"inputs": [
|
|
950
|
-
{
|
|
951
|
-
"internalType": "uint256",
|
|
952
|
-
"name": "maxCount",
|
|
953
|
-
"type": "uint256"
|
|
954
|
-
}
|
|
955
|
-
],
|
|
956
|
-
"name": "cancelPendingDeposits",
|
|
957
|
-
"outputs": [
|
|
958
|
-
{
|
|
959
|
-
"internalType": "uint256",
|
|
960
|
-
"name": "cancelled",
|
|
961
|
-
"type": "uint256"
|
|
962
|
-
}
|
|
963
|
-
],
|
|
964
|
-
"stateMutability": "nonpayable",
|
|
965
|
-
"type": "function"
|
|
966
|
-
},
|
|
967
|
-
{
|
|
968
|
-
"inputs": [
|
|
969
|
-
{
|
|
970
|
-
"internalType": "uint256",
|
|
971
|
-
"name": "requestId",
|
|
972
|
-
"type": "uint256"
|
|
973
|
-
}
|
|
974
|
-
],
|
|
975
|
-
"name": "cancelWithdraw",
|
|
976
|
-
"outputs": [],
|
|
977
|
-
"stateMutability": "nonpayable",
|
|
978
|
-
"type": "function"
|
|
979
|
-
},
|
|
980
|
-
{
|
|
981
|
-
"inputs": [
|
|
982
|
-
{
|
|
983
|
-
"internalType": "uint256",
|
|
984
|
-
"name": "requestId",
|
|
985
|
-
"type": "uint256"
|
|
986
|
-
},
|
|
987
|
-
{
|
|
988
|
-
"internalType": "contract IVault",
|
|
989
|
-
"name": "newVault",
|
|
990
|
-
"type": "address"
|
|
991
|
-
}
|
|
992
|
-
],
|
|
993
|
-
"name": "claimAndDeposit",
|
|
994
|
-
"outputs": [
|
|
995
|
-
{
|
|
996
|
-
"internalType": "uint256",
|
|
997
|
-
"name": "depositId",
|
|
998
|
-
"type": "uint256"
|
|
999
|
-
}
|
|
1000
|
-
],
|
|
1001
|
-
"stateMutability": "nonpayable",
|
|
1002
|
-
"type": "function"
|
|
1003
|
-
},
|
|
1004
|
-
{
|
|
1005
|
-
"inputs": [
|
|
1006
|
-
{
|
|
1007
|
-
"internalType": "uint256",
|
|
1008
|
-
"name": "requestId",
|
|
1009
|
-
"type": "uint256"
|
|
1010
|
-
}
|
|
1011
|
-
],
|
|
1012
|
-
"name": "claimWithdraw",
|
|
1013
|
-
"outputs": [],
|
|
1014
|
-
"stateMutability": "nonpayable",
|
|
1015
|
-
"type": "function"
|
|
1016
|
-
},
|
|
1017
|
-
{
|
|
1018
|
-
"inputs": [
|
|
1019
|
-
{
|
|
1020
|
-
"internalType": "uint256",
|
|
1021
|
-
"name": "requestId",
|
|
1022
|
-
"type": "uint256"
|
|
1023
|
-
},
|
|
1024
|
-
{
|
|
1025
|
-
"internalType": "address",
|
|
1026
|
-
"name": "recipient",
|
|
1027
|
-
"type": "address"
|
|
1028
|
-
}
|
|
1029
|
-
],
|
|
1030
|
-
"name": "claimWithdrawTo",
|
|
1031
|
-
"outputs": [],
|
|
1032
|
-
"stateMutability": "nonpayable",
|
|
1033
|
-
"type": "function"
|
|
1034
|
-
},
|
|
1035
|
-
{
|
|
1036
|
-
"inputs": [
|
|
1037
|
-
{
|
|
1038
|
-
"internalType": "address",
|
|
1039
|
-
"name": "user",
|
|
1040
|
-
"type": "address"
|
|
1041
|
-
}
|
|
1042
|
-
],
|
|
1043
|
-
"name": "costBasisPerShare",
|
|
1044
|
-
"outputs": [
|
|
1045
|
-
{
|
|
1046
|
-
"internalType": "uint256",
|
|
1047
|
-
"name": "",
|
|
1048
|
-
"type": "uint256"
|
|
1049
|
-
}
|
|
1050
|
-
],
|
|
1051
|
-
"stateMutability": "view",
|
|
1052
|
-
"type": "function"
|
|
1053
|
-
},
|
|
1054
|
-
{
|
|
1055
|
-
"inputs": [
|
|
1056
|
-
{
|
|
1057
|
-
"internalType": "address",
|
|
1058
|
-
"name": "",
|
|
1059
|
-
"type": "address"
|
|
1060
|
-
}
|
|
1061
|
-
],
|
|
1062
|
-
"name": "costBasisValue",
|
|
1063
|
-
"outputs": [
|
|
1064
|
-
{
|
|
1065
|
-
"internalType": "uint256",
|
|
1066
|
-
"name": "",
|
|
1067
|
-
"type": "uint256"
|
|
1068
|
-
}
|
|
1069
|
-
],
|
|
1070
|
-
"stateMutability": "view",
|
|
1071
|
-
"type": "function"
|
|
1072
|
-
},
|
|
1073
|
-
{
|
|
1074
|
-
"inputs": [],
|
|
1075
|
-
"name": "depositQueueLength",
|
|
1076
|
-
"outputs": [
|
|
1077
|
-
{
|
|
1078
|
-
"internalType": "uint256",
|
|
1079
|
-
"name": "",
|
|
1080
|
-
"type": "uint256"
|
|
1081
|
-
}
|
|
1082
|
-
],
|
|
1083
|
-
"stateMutability": "view",
|
|
1084
|
-
"type": "function"
|
|
1085
|
-
},
|
|
1086
|
-
{
|
|
1087
|
-
"inputs": [],
|
|
1088
|
-
"name": "feeRecipient",
|
|
1089
|
-
"outputs": [
|
|
1090
|
-
{
|
|
1091
|
-
"internalType": "address",
|
|
1092
|
-
"name": "",
|
|
1093
|
-
"type": "address"
|
|
1094
|
-
}
|
|
1095
|
-
],
|
|
1096
|
-
"stateMutability": "view",
|
|
1097
|
-
"type": "function"
|
|
1098
|
-
},
|
|
1099
|
-
{
|
|
1100
|
-
"inputs": [
|
|
1101
|
-
{
|
|
1102
|
-
"internalType": "uint256",
|
|
1103
|
-
"name": "depositId",
|
|
1104
|
-
"type": "uint256"
|
|
1105
|
-
}
|
|
1106
|
-
],
|
|
1107
|
-
"name": "getDepositRequest",
|
|
1108
|
-
"outputs": [
|
|
1109
|
-
{
|
|
1110
|
-
"components": [
|
|
1111
|
-
{
|
|
1112
|
-
"internalType": "address",
|
|
1113
|
-
"name": "owner",
|
|
1114
|
-
"type": "address"
|
|
1115
|
-
},
|
|
1116
|
-
{
|
|
1117
|
-
"internalType": "uint256",
|
|
1118
|
-
"name": "assets",
|
|
1119
|
-
"type": "uint256"
|
|
1120
|
-
},
|
|
1121
|
-
{
|
|
1122
|
-
"internalType": "enum IVault.DepositStatus",
|
|
1123
|
-
"name": "status",
|
|
1124
|
-
"type": "uint8"
|
|
1125
|
-
}
|
|
1126
|
-
],
|
|
1127
|
-
"internalType": "struct IVault.DepositRequest",
|
|
1128
|
-
"name": "",
|
|
1129
|
-
"type": "tuple"
|
|
1130
|
-
}
|
|
1131
|
-
],
|
|
1132
|
-
"stateMutability": "view",
|
|
1133
|
-
"type": "function"
|
|
1134
|
-
},
|
|
1135
|
-
{
|
|
1136
|
-
"inputs": [
|
|
1137
|
-
{
|
|
1138
|
-
"internalType": "uint256",
|
|
1139
|
-
"name": "requestId",
|
|
1140
|
-
"type": "uint256"
|
|
1141
|
-
}
|
|
1142
|
-
],
|
|
1143
|
-
"name": "getRequest",
|
|
1144
|
-
"outputs": [
|
|
1145
|
-
{
|
|
1146
|
-
"components": [
|
|
1147
|
-
{
|
|
1148
|
-
"internalType": "address",
|
|
1149
|
-
"name": "owner",
|
|
1150
|
-
"type": "address"
|
|
1151
|
-
},
|
|
1152
|
-
{
|
|
1153
|
-
"internalType": "uint256",
|
|
1154
|
-
"name": "shares",
|
|
1155
|
-
"type": "uint256"
|
|
1156
|
-
},
|
|
1157
|
-
{
|
|
1158
|
-
"internalType": "uint256",
|
|
1159
|
-
"name": "costBasisValueSnapshot",
|
|
1160
|
-
"type": "uint256"
|
|
1161
|
-
},
|
|
1162
|
-
{
|
|
1163
|
-
"internalType": "uint64",
|
|
1164
|
-
"name": "requestedAt",
|
|
1165
|
-
"type": "uint64"
|
|
1166
|
-
},
|
|
1167
|
-
{
|
|
1168
|
-
"internalType": "uint64",
|
|
1169
|
-
"name": "claimableAt",
|
|
1170
|
-
"type": "uint64"
|
|
1171
|
-
},
|
|
1172
|
-
{
|
|
1173
|
-
"internalType": "enum IVault.WithdrawStatus",
|
|
1174
|
-
"name": "status",
|
|
1175
|
-
"type": "uint8"
|
|
1176
|
-
},
|
|
1177
|
-
{
|
|
1178
|
-
"internalType": "uint256",
|
|
1179
|
-
"name": "assetsOut",
|
|
1180
|
-
"type": "uint256"
|
|
1181
|
-
},
|
|
1182
|
-
{
|
|
1183
|
-
"internalType": "uint256",
|
|
1184
|
-
"name": "fee",
|
|
1185
|
-
"type": "uint256"
|
|
1186
|
-
}
|
|
1187
|
-
],
|
|
1188
|
-
"internalType": "struct IVault.WithdrawRequest",
|
|
1189
|
-
"name": "",
|
|
1190
|
-
"type": "tuple"
|
|
1191
|
-
}
|
|
1192
|
-
],
|
|
1193
|
-
"stateMutability": "view",
|
|
1194
|
-
"type": "function"
|
|
1195
|
-
},
|
|
1196
|
-
{
|
|
1197
|
-
"inputs": [
|
|
1198
|
-
{
|
|
1199
|
-
"internalType": "bytes32",
|
|
1200
|
-
"name": "role",
|
|
1201
|
-
"type": "bytes32"
|
|
1202
|
-
}
|
|
1203
|
-
],
|
|
1204
|
-
"name": "getRoleAdmin",
|
|
1205
|
-
"outputs": [
|
|
1206
|
-
{
|
|
1207
|
-
"internalType": "bytes32",
|
|
1208
|
-
"name": "",
|
|
1209
|
-
"type": "bytes32"
|
|
1210
|
-
}
|
|
1211
|
-
],
|
|
1212
|
-
"stateMutability": "view",
|
|
1213
|
-
"type": "function"
|
|
1214
|
-
},
|
|
1215
|
-
{
|
|
1216
|
-
"inputs": [
|
|
1217
|
-
{
|
|
1218
|
-
"internalType": "bytes32",
|
|
1219
|
-
"name": "role",
|
|
1220
|
-
"type": "bytes32"
|
|
1221
|
-
},
|
|
1222
|
-
{
|
|
1223
|
-
"internalType": "address",
|
|
1224
|
-
"name": "account",
|
|
1225
|
-
"type": "address"
|
|
1226
|
-
}
|
|
1227
|
-
],
|
|
1228
|
-
"name": "grantRole",
|
|
1229
|
-
"outputs": [],
|
|
1230
|
-
"stateMutability": "nonpayable",
|
|
1231
|
-
"type": "function"
|
|
1232
|
-
},
|
|
1233
|
-
{
|
|
1234
|
-
"inputs": [
|
|
1235
|
-
{
|
|
1236
|
-
"internalType": "bytes32",
|
|
1237
|
-
"name": "role",
|
|
1238
|
-
"type": "bytes32"
|
|
1239
|
-
},
|
|
1240
|
-
{
|
|
1241
|
-
"internalType": "address",
|
|
1242
|
-
"name": "account",
|
|
1243
|
-
"type": "address"
|
|
1244
|
-
}
|
|
1245
|
-
],
|
|
1246
|
-
"name": "hasRole",
|
|
1247
|
-
"outputs": [
|
|
1248
|
-
{
|
|
1249
|
-
"internalType": "bool",
|
|
1250
|
-
"name": "",
|
|
1251
|
-
"type": "bool"
|
|
1252
|
-
}
|
|
1253
|
-
],
|
|
1254
|
-
"stateMutability": "view",
|
|
1255
|
-
"type": "function"
|
|
1256
|
-
},
|
|
1257
|
-
{
|
|
1258
|
-
"inputs": [],
|
|
1259
|
-
"name": "hasSettleReadyWork",
|
|
1260
|
-
"outputs": [
|
|
1261
|
-
{
|
|
1262
|
-
"internalType": "bool",
|
|
1263
|
-
"name": "",
|
|
1264
|
-
"type": "bool"
|
|
1265
|
-
}
|
|
1266
|
-
],
|
|
1267
|
-
"stateMutability": "view",
|
|
1268
|
-
"type": "function"
|
|
1269
|
-
},
|
|
1270
|
-
{
|
|
1271
|
-
"inputs": [
|
|
1272
|
-
{
|
|
1273
|
-
"internalType": "address",
|
|
1274
|
-
"name": "",
|
|
1275
|
-
"type": "address"
|
|
1276
|
-
}
|
|
1277
|
-
],
|
|
1278
|
-
"name": "isTracked",
|
|
1279
|
-
"outputs": [
|
|
1280
|
-
{
|
|
1281
|
-
"internalType": "bool",
|
|
1282
|
-
"name": "",
|
|
1283
|
-
"type": "bool"
|
|
1284
|
-
}
|
|
1285
|
-
],
|
|
1286
|
-
"stateMutability": "view",
|
|
1287
|
-
"type": "function"
|
|
1288
|
-
},
|
|
1289
|
-
{
|
|
1290
|
-
"inputs": [],
|
|
1291
|
-
"name": "maxSettlementBatchSize",
|
|
1292
|
-
"outputs": [
|
|
1293
|
-
{
|
|
1294
|
-
"internalType": "uint256",
|
|
1295
|
-
"name": "",
|
|
1296
|
-
"type": "uint256"
|
|
1297
|
-
}
|
|
1298
|
-
],
|
|
1299
|
-
"stateMutability": "view",
|
|
1300
|
-
"type": "function"
|
|
1301
|
-
},
|
|
1302
|
-
{
|
|
1303
|
-
"inputs": [],
|
|
1304
|
-
"name": "minDepositAssets",
|
|
1305
|
-
"outputs": [
|
|
1306
|
-
{
|
|
1307
|
-
"internalType": "uint256",
|
|
1308
|
-
"name": "",
|
|
1309
|
-
"type": "uint256"
|
|
1310
|
-
}
|
|
1311
|
-
],
|
|
1312
|
-
"stateMutability": "view",
|
|
1313
|
-
"type": "function"
|
|
1314
|
-
},
|
|
1315
|
-
{
|
|
1316
|
-
"inputs": [
|
|
1317
|
-
{
|
|
1318
|
-
"internalType": "address",
|
|
1319
|
-
"name": "from",
|
|
1320
|
-
"type": "address"
|
|
1321
|
-
},
|
|
1322
|
-
{
|
|
1323
|
-
"internalType": "address",
|
|
1324
|
-
"name": "to",
|
|
1325
|
-
"type": "address"
|
|
1326
|
-
},
|
|
1327
|
-
{
|
|
1328
|
-
"internalType": "uint256",
|
|
1329
|
-
"name": "value",
|
|
1330
|
-
"type": "uint256"
|
|
1331
|
-
}
|
|
1332
|
-
],
|
|
1333
|
-
"name": "onShareTransfer",
|
|
1334
|
-
"outputs": [],
|
|
1335
|
-
"stateMutability": "nonpayable",
|
|
1336
|
-
"type": "function"
|
|
1337
|
-
},
|
|
1338
|
-
{
|
|
1339
|
-
"inputs": [],
|
|
1340
|
-
"name": "oracle",
|
|
1341
|
-
"outputs": [
|
|
1342
|
-
{
|
|
1343
|
-
"internalType": "address",
|
|
1344
|
-
"name": "",
|
|
1345
|
-
"type": "address"
|
|
1346
|
-
}
|
|
1347
|
-
],
|
|
1348
|
-
"stateMutability": "view",
|
|
1349
|
-
"type": "function"
|
|
1350
|
-
},
|
|
1351
|
-
{
|
|
1352
|
-
"inputs": [],
|
|
1353
|
-
"name": "oracleContract",
|
|
1354
|
-
"outputs": [
|
|
1355
|
-
{
|
|
1356
|
-
"internalType": "contract IOracle",
|
|
1357
|
-
"name": "",
|
|
1358
|
-
"type": "address"
|
|
1359
|
-
}
|
|
1360
|
-
],
|
|
1361
|
-
"stateMutability": "view",
|
|
1362
|
-
"type": "function"
|
|
1363
|
-
},
|
|
1364
|
-
{
|
|
1365
|
-
"inputs": [],
|
|
1366
|
-
"name": "pause",
|
|
1367
|
-
"outputs": [],
|
|
1368
|
-
"stateMutability": "nonpayable",
|
|
1369
|
-
"type": "function"
|
|
1370
|
-
},
|
|
1371
|
-
{
|
|
1372
|
-
"inputs": [],
|
|
1373
|
-
"name": "paused",
|
|
1374
|
-
"outputs": [
|
|
1375
|
-
{
|
|
1376
|
-
"internalType": "bool",
|
|
1377
|
-
"name": "",
|
|
1378
|
-
"type": "bool"
|
|
1379
|
-
}
|
|
1380
|
-
],
|
|
1381
|
-
"stateMutability": "view",
|
|
1382
|
-
"type": "function"
|
|
1383
|
-
},
|
|
1384
|
-
{
|
|
1385
|
-
"inputs": [],
|
|
1386
|
-
"name": "pendingDepositTotal",
|
|
1387
|
-
"outputs": [
|
|
1388
|
-
{
|
|
1389
|
-
"internalType": "uint256",
|
|
1390
|
-
"name": "",
|
|
1391
|
-
"type": "uint256"
|
|
1392
|
-
}
|
|
1393
|
-
],
|
|
1394
|
-
"stateMutability": "view",
|
|
1395
|
-
"type": "function"
|
|
1396
|
-
},
|
|
1397
|
-
{
|
|
1398
|
-
"inputs": [],
|
|
1399
|
-
"name": "pendingSettlementWithdrawShares",
|
|
1400
|
-
"outputs": [
|
|
1401
|
-
{
|
|
1402
|
-
"internalType": "uint256",
|
|
1403
|
-
"name": "",
|
|
1404
|
-
"type": "uint256"
|
|
1405
|
-
}
|
|
1406
|
-
],
|
|
1407
|
-
"stateMutability": "view",
|
|
1408
|
-
"type": "function"
|
|
1409
|
-
},
|
|
1410
|
-
{
|
|
1411
|
-
"inputs": [],
|
|
1412
|
-
"name": "pendingWithdrawShares",
|
|
1413
|
-
"outputs": [
|
|
1414
|
-
{
|
|
1415
|
-
"internalType": "uint256",
|
|
1416
|
-
"name": "",
|
|
1417
|
-
"type": "uint256"
|
|
1418
|
-
}
|
|
1419
|
-
],
|
|
1420
|
-
"stateMutability": "view",
|
|
1421
|
-
"type": "function"
|
|
1422
|
-
},
|
|
1423
|
-
{
|
|
1424
|
-
"inputs": [],
|
|
1425
|
-
"name": "performanceFee",
|
|
1426
|
-
"outputs": [
|
|
1427
|
-
{
|
|
1428
|
-
"internalType": "uint256",
|
|
1429
|
-
"name": "",
|
|
1430
|
-
"type": "uint256"
|
|
1431
|
-
}
|
|
1432
|
-
],
|
|
1433
|
-
"stateMutability": "view",
|
|
1434
|
-
"type": "function"
|
|
1435
|
-
},
|
|
1436
|
-
{
|
|
1437
|
-
"inputs": [
|
|
1438
|
-
{
|
|
1439
|
-
"internalType": "uint256",
|
|
1440
|
-
"name": "assets",
|
|
1441
|
-
"type": "uint256"
|
|
1442
|
-
}
|
|
1443
|
-
],
|
|
1444
|
-
"name": "previewDeposit",
|
|
1445
|
-
"outputs": [
|
|
1446
|
-
{
|
|
1447
|
-
"internalType": "uint256",
|
|
1448
|
-
"name": "",
|
|
1449
|
-
"type": "uint256"
|
|
1450
|
-
}
|
|
1451
|
-
],
|
|
1452
|
-
"stateMutability": "view",
|
|
1453
|
-
"type": "function"
|
|
1454
|
-
},
|
|
1455
|
-
{
|
|
1456
|
-
"inputs": [
|
|
1457
|
-
{
|
|
1458
|
-
"internalType": "uint256",
|
|
1459
|
-
"name": "sharesIn",
|
|
1460
|
-
"type": "uint256"
|
|
1461
|
-
},
|
|
1462
|
-
{
|
|
1463
|
-
"internalType": "address",
|
|
1464
|
-
"name": "owner",
|
|
1465
|
-
"type": "address"
|
|
1466
|
-
}
|
|
1467
|
-
],
|
|
1468
|
-
"name": "previewWithdraw",
|
|
1469
|
-
"outputs": [
|
|
1470
|
-
{
|
|
1471
|
-
"internalType": "uint256",
|
|
1472
|
-
"name": "estimatedAssets",
|
|
1473
|
-
"type": "uint256"
|
|
1474
|
-
},
|
|
1475
|
-
{
|
|
1476
|
-
"internalType": "uint256",
|
|
1477
|
-
"name": "estimatedFee",
|
|
1478
|
-
"type": "uint256"
|
|
1479
|
-
}
|
|
1480
|
-
],
|
|
1481
|
-
"stateMutability": "view",
|
|
1482
|
-
"type": "function"
|
|
1483
|
-
},
|
|
1484
|
-
{
|
|
1485
|
-
"inputs": [],
|
|
1486
|
-
"name": "pricePerShare",
|
|
1487
|
-
"outputs": [
|
|
1488
|
-
{
|
|
1489
|
-
"internalType": "uint256",
|
|
1490
|
-
"name": "",
|
|
1491
|
-
"type": "uint256"
|
|
1492
|
-
}
|
|
1493
|
-
],
|
|
1494
|
-
"stateMutability": "view",
|
|
1495
|
-
"type": "function"
|
|
1496
|
-
},
|
|
1497
|
-
{
|
|
1498
|
-
"inputs": [],
|
|
1499
|
-
"name": "queueLength",
|
|
1500
|
-
"outputs": [
|
|
1501
|
-
{
|
|
1502
|
-
"internalType": "uint256",
|
|
1503
|
-
"name": "",
|
|
1504
|
-
"type": "uint256"
|
|
1505
|
-
}
|
|
1506
|
-
],
|
|
1507
|
-
"stateMutability": "view",
|
|
1508
|
-
"type": "function"
|
|
1509
|
-
},
|
|
1510
|
-
{
|
|
1511
|
-
"inputs": [
|
|
1512
|
-
{
|
|
1513
|
-
"internalType": "address[]",
|
|
1514
|
-
"name": "targets",
|
|
1515
|
-
"type": "address[]"
|
|
1516
|
-
},
|
|
1517
|
-
{
|
|
1518
|
-
"internalType": "bytes[]",
|
|
1519
|
-
"name": "calldatas",
|
|
1520
|
-
"type": "bytes[]"
|
|
1521
|
-
}
|
|
1522
|
-
],
|
|
1523
|
-
"name": "rebalance",
|
|
1524
|
-
"outputs": [],
|
|
1525
|
-
"stateMutability": "nonpayable",
|
|
1526
|
-
"type": "function"
|
|
1527
|
-
},
|
|
1528
|
-
{
|
|
1529
|
-
"inputs": [
|
|
1530
|
-
{
|
|
1531
|
-
"internalType": "address",
|
|
1532
|
-
"name": "token",
|
|
1533
|
-
"type": "address"
|
|
1534
|
-
}
|
|
1535
|
-
],
|
|
1536
|
-
"name": "removeTrackedToken",
|
|
1537
|
-
"outputs": [],
|
|
1538
|
-
"stateMutability": "nonpayable",
|
|
1539
|
-
"type": "function"
|
|
1540
|
-
},
|
|
1541
|
-
{
|
|
1542
|
-
"inputs": [
|
|
1543
|
-
{
|
|
1544
|
-
"internalType": "bytes32",
|
|
1545
|
-
"name": "role",
|
|
1546
|
-
"type": "bytes32"
|
|
1547
|
-
},
|
|
1548
|
-
{
|
|
1549
|
-
"internalType": "address",
|
|
1550
|
-
"name": "callerConfirmation",
|
|
1551
|
-
"type": "address"
|
|
1552
|
-
}
|
|
1553
|
-
],
|
|
1554
|
-
"name": "renounceRole",
|
|
1555
|
-
"outputs": [],
|
|
1556
|
-
"stateMutability": "nonpayable",
|
|
1557
|
-
"type": "function"
|
|
1558
|
-
},
|
|
1559
|
-
{
|
|
1560
|
-
"inputs": [
|
|
1561
|
-
{
|
|
1562
|
-
"internalType": "uint256",
|
|
1563
|
-
"name": "assets",
|
|
1564
|
-
"type": "uint256"
|
|
1565
|
-
}
|
|
1566
|
-
],
|
|
1567
|
-
"name": "requestDeposit",
|
|
1568
|
-
"outputs": [
|
|
1569
|
-
{
|
|
1570
|
-
"internalType": "uint256",
|
|
1571
|
-
"name": "depositId",
|
|
1572
|
-
"type": "uint256"
|
|
1573
|
-
}
|
|
1574
|
-
],
|
|
1575
|
-
"stateMutability": "nonpayable",
|
|
1576
|
-
"type": "function"
|
|
1577
|
-
},
|
|
1578
|
-
{
|
|
1579
|
-
"inputs": [
|
|
1580
|
-
{
|
|
1581
|
-
"internalType": "uint256",
|
|
1582
|
-
"name": "assets",
|
|
1583
|
-
"type": "uint256"
|
|
1584
|
-
},
|
|
1585
|
-
{
|
|
1586
|
-
"internalType": "address",
|
|
1587
|
-
"name": "recipient",
|
|
1588
|
-
"type": "address"
|
|
1589
|
-
}
|
|
1590
|
-
],
|
|
1591
|
-
"name": "requestDepositFor",
|
|
1592
|
-
"outputs": [
|
|
1593
|
-
{
|
|
1594
|
-
"internalType": "uint256",
|
|
1595
|
-
"name": "depositId",
|
|
1596
|
-
"type": "uint256"
|
|
1597
|
-
}
|
|
1598
|
-
],
|
|
1599
|
-
"stateMutability": "nonpayable",
|
|
1600
|
-
"type": "function"
|
|
1601
|
-
},
|
|
1602
|
-
{
|
|
1603
|
-
"inputs": [
|
|
1604
|
-
{
|
|
1605
|
-
"internalType": "uint256",
|
|
1606
|
-
"name": "sharesIn",
|
|
1607
|
-
"type": "uint256"
|
|
1608
|
-
}
|
|
1609
|
-
],
|
|
1610
|
-
"name": "requestWithdraw",
|
|
1611
|
-
"outputs": [
|
|
1612
|
-
{
|
|
1613
|
-
"internalType": "uint256",
|
|
1614
|
-
"name": "requestId",
|
|
1615
|
-
"type": "uint256"
|
|
1616
|
-
}
|
|
1617
|
-
],
|
|
1618
|
-
"stateMutability": "nonpayable",
|
|
1619
|
-
"type": "function"
|
|
1620
|
-
},
|
|
1621
|
-
{
|
|
1622
|
-
"inputs": [
|
|
1623
|
-
{
|
|
1624
|
-
"internalType": "bytes32",
|
|
1625
|
-
"name": "role",
|
|
1626
|
-
"type": "bytes32"
|
|
1627
|
-
},
|
|
1628
|
-
{
|
|
1629
|
-
"internalType": "address",
|
|
1630
|
-
"name": "account",
|
|
1631
|
-
"type": "address"
|
|
1632
|
-
}
|
|
1633
|
-
],
|
|
1634
|
-
"name": "revokeRole",
|
|
1635
|
-
"outputs": [],
|
|
1636
|
-
"stateMutability": "nonpayable",
|
|
1637
|
-
"type": "function"
|
|
1638
|
-
},
|
|
1639
|
-
{
|
|
1640
|
-
"inputs": [
|
|
1641
|
-
{
|
|
1642
|
-
"internalType": "address",
|
|
1643
|
-
"name": "recipient",
|
|
1644
|
-
"type": "address"
|
|
1645
|
-
}
|
|
1646
|
-
],
|
|
1647
|
-
"name": "setFeeRecipient",
|
|
1648
|
-
"outputs": [],
|
|
1649
|
-
"stateMutability": "nonpayable",
|
|
1650
|
-
"type": "function"
|
|
1651
|
-
},
|
|
1652
|
-
{
|
|
1653
|
-
"inputs": [
|
|
1654
|
-
{
|
|
1655
|
-
"internalType": "uint256",
|
|
1656
|
-
"name": "size",
|
|
1657
|
-
"type": "uint256"
|
|
1658
|
-
}
|
|
1659
|
-
],
|
|
1660
|
-
"name": "setMaxSettlementBatchSize",
|
|
1661
|
-
"outputs": [],
|
|
1662
|
-
"stateMutability": "nonpayable",
|
|
1663
|
-
"type": "function"
|
|
1664
|
-
},
|
|
1665
|
-
{
|
|
1666
|
-
"inputs": [
|
|
1667
|
-
{
|
|
1668
|
-
"internalType": "uint256",
|
|
1669
|
-
"name": "amount",
|
|
1670
|
-
"type": "uint256"
|
|
1671
|
-
}
|
|
1672
|
-
],
|
|
1673
|
-
"name": "setMinDepositAssets",
|
|
1674
|
-
"outputs": [],
|
|
1675
|
-
"stateMutability": "nonpayable",
|
|
1676
|
-
"type": "function"
|
|
1677
|
-
},
|
|
1678
|
-
{
|
|
1679
|
-
"inputs": [
|
|
1680
|
-
{
|
|
1681
|
-
"internalType": "contract IOracle",
|
|
1682
|
-
"name": "_oracle",
|
|
1683
|
-
"type": "address"
|
|
1684
|
-
}
|
|
1685
|
-
],
|
|
1686
|
-
"name": "setOracle",
|
|
1687
|
-
"outputs": [],
|
|
1688
|
-
"stateMutability": "nonpayable",
|
|
1689
|
-
"type": "function"
|
|
1690
|
-
},
|
|
1691
|
-
{
|
|
1692
|
-
"inputs": [
|
|
1693
|
-
{
|
|
1694
|
-
"internalType": "uint256",
|
|
1695
|
-
"name": "feeBps",
|
|
1696
|
-
"type": "uint256"
|
|
1697
|
-
}
|
|
1698
|
-
],
|
|
1699
|
-
"name": "setPerformanceFee",
|
|
1700
|
-
"outputs": [],
|
|
1701
|
-
"stateMutability": "nonpayable",
|
|
1702
|
-
"type": "function"
|
|
1703
|
-
},
|
|
1704
|
-
{
|
|
1705
|
-
"inputs": [
|
|
1706
|
-
{
|
|
1707
|
-
"internalType": "uint256",
|
|
1708
|
-
"name": "fee",
|
|
1709
|
-
"type": "uint256"
|
|
1710
|
-
}
|
|
1711
|
-
],
|
|
1712
|
-
"name": "setSettlementFee",
|
|
1713
|
-
"outputs": [],
|
|
1714
|
-
"stateMutability": "nonpayable",
|
|
1715
|
-
"type": "function"
|
|
1716
|
-
},
|
|
1717
|
-
{
|
|
1718
|
-
"inputs": [
|
|
1719
|
-
{
|
|
1720
|
-
"internalType": "address",
|
|
1721
|
-
"name": "target",
|
|
1722
|
-
"type": "address"
|
|
1723
|
-
},
|
|
1724
|
-
{
|
|
1725
|
-
"internalType": "bool",
|
|
1726
|
-
"name": "allowed",
|
|
1727
|
-
"type": "bool"
|
|
1728
|
-
}
|
|
1729
|
-
],
|
|
1730
|
-
"name": "setTargetAllowed",
|
|
1731
|
-
"outputs": [],
|
|
1732
|
-
"stateMutability": "nonpayable",
|
|
1733
|
-
"type": "function"
|
|
1734
|
-
},
|
|
1735
|
-
{
|
|
1736
|
-
"inputs": [
|
|
1737
|
-
{
|
|
1738
|
-
"internalType": "address[]",
|
|
1739
|
-
"name": "tokens",
|
|
1740
|
-
"type": "address[]"
|
|
1741
|
-
},
|
|
1742
|
-
{
|
|
1743
|
-
"internalType": "uint128[]",
|
|
1744
|
-
"name": "prices",
|
|
1745
|
-
"type": "uint128[]"
|
|
1746
|
-
}
|
|
1747
|
-
],
|
|
1748
|
-
"name": "settle",
|
|
1749
|
-
"outputs": [],
|
|
1750
|
-
"stateMutability": "nonpayable",
|
|
1751
|
-
"type": "function"
|
|
1752
|
-
},
|
|
1753
|
-
{
|
|
1754
|
-
"inputs": [],
|
|
1755
|
-
"name": "settledWithdrawalLiabilityTotal",
|
|
1756
|
-
"outputs": [
|
|
1757
|
-
{
|
|
1758
|
-
"internalType": "uint256",
|
|
1759
|
-
"name": "",
|
|
1760
|
-
"type": "uint256"
|
|
1761
|
-
}
|
|
1762
|
-
],
|
|
1763
|
-
"stateMutability": "view",
|
|
1764
|
-
"type": "function"
|
|
1765
|
-
},
|
|
1766
|
-
{
|
|
1767
|
-
"inputs": [],
|
|
1768
|
-
"name": "settlementFeeAssets",
|
|
1769
|
-
"outputs": [
|
|
1770
|
-
{
|
|
1771
|
-
"internalType": "uint256",
|
|
1772
|
-
"name": "",
|
|
1773
|
-
"type": "uint256"
|
|
1774
|
-
}
|
|
1775
|
-
],
|
|
1776
|
-
"stateMutability": "view",
|
|
1777
|
-
"type": "function"
|
|
1778
|
-
},
|
|
1779
|
-
{
|
|
1780
|
-
"inputs": [],
|
|
1781
|
-
"name": "shareToken",
|
|
1782
|
-
"outputs": [
|
|
1783
|
-
{
|
|
1784
|
-
"internalType": "contract HPT",
|
|
1785
|
-
"name": "",
|
|
1786
|
-
"type": "address"
|
|
1787
|
-
}
|
|
1788
|
-
],
|
|
1789
|
-
"stateMutability": "view",
|
|
1790
|
-
"type": "function"
|
|
1791
|
-
},
|
|
1792
|
-
{
|
|
1793
|
-
"inputs": [],
|
|
1794
|
-
"name": "shares",
|
|
1795
|
-
"outputs": [
|
|
1796
|
-
{
|
|
1797
|
-
"internalType": "address",
|
|
1798
|
-
"name": "",
|
|
1799
|
-
"type": "address"
|
|
1800
|
-
}
|
|
1801
|
-
],
|
|
1802
|
-
"stateMutability": "view",
|
|
1803
|
-
"type": "function"
|
|
1804
|
-
},
|
|
1805
|
-
{
|
|
1806
|
-
"inputs": [
|
|
1807
|
-
{
|
|
1808
|
-
"internalType": "bytes4",
|
|
1809
|
-
"name": "interfaceId",
|
|
1810
|
-
"type": "bytes4"
|
|
1811
|
-
}
|
|
1812
|
-
],
|
|
1813
|
-
"name": "supportsInterface",
|
|
1814
|
-
"outputs": [
|
|
1815
|
-
{
|
|
1816
|
-
"internalType": "bool",
|
|
1817
|
-
"name": "",
|
|
1818
|
-
"type": "bool"
|
|
1819
|
-
}
|
|
1820
|
-
],
|
|
1821
|
-
"stateMutability": "view",
|
|
1822
|
-
"type": "function"
|
|
1823
|
-
},
|
|
1824
|
-
{
|
|
1825
|
-
"inputs": [
|
|
1826
|
-
{
|
|
1827
|
-
"internalType": "address",
|
|
1828
|
-
"name": "",
|
|
1829
|
-
"type": "address"
|
|
1830
|
-
}
|
|
1831
|
-
],
|
|
1832
|
-
"name": "targetAllowed",
|
|
1833
|
-
"outputs": [
|
|
1834
|
-
{
|
|
1835
|
-
"internalType": "bool",
|
|
1836
|
-
"name": "",
|
|
1837
|
-
"type": "bool"
|
|
1838
|
-
}
|
|
1839
|
-
],
|
|
1840
|
-
"stateMutability": "view",
|
|
1841
|
-
"type": "function"
|
|
1842
|
-
},
|
|
1843
|
-
{
|
|
1844
|
-
"inputs": [
|
|
1845
|
-
{
|
|
1846
|
-
"internalType": "address",
|
|
1847
|
-
"name": "",
|
|
1848
|
-
"type": "address"
|
|
1849
|
-
}
|
|
1850
|
-
],
|
|
1851
|
-
"name": "tokenDecimals",
|
|
1852
|
-
"outputs": [
|
|
1853
|
-
{
|
|
1854
|
-
"internalType": "uint8",
|
|
1855
|
-
"name": "",
|
|
1856
|
-
"type": "uint8"
|
|
1857
|
-
}
|
|
1858
|
-
],
|
|
1859
|
-
"stateMutability": "view",
|
|
1860
|
-
"type": "function"
|
|
1861
|
-
},
|
|
1862
|
-
{
|
|
1863
|
-
"inputs": [],
|
|
1864
|
-
"name": "totalAssets",
|
|
1865
|
-
"outputs": [
|
|
1866
|
-
{
|
|
1867
|
-
"internalType": "uint256",
|
|
1868
|
-
"name": "",
|
|
1869
|
-
"type": "uint256"
|
|
1870
|
-
}
|
|
1871
|
-
],
|
|
1872
|
-
"stateMutability": "view",
|
|
1873
|
-
"type": "function"
|
|
1874
|
-
},
|
|
1875
|
-
{
|
|
1876
|
-
"inputs": [],
|
|
1877
|
-
"name": "trackedTokens",
|
|
1878
|
-
"outputs": [
|
|
1879
|
-
{
|
|
1880
|
-
"internalType": "address[]",
|
|
1881
|
-
"name": "",
|
|
1882
|
-
"type": "address[]"
|
|
1883
|
-
}
|
|
1884
|
-
],
|
|
1885
|
-
"stateMutability": "view",
|
|
1886
|
-
"type": "function"
|
|
1887
|
-
},
|
|
1888
|
-
{
|
|
1889
|
-
"inputs": [],
|
|
1890
|
-
"name": "unpause",
|
|
1891
|
-
"outputs": [],
|
|
1892
|
-
"stateMutability": "nonpayable",
|
|
1893
|
-
"type": "function"
|
|
1894
|
-
},
|
|
1895
|
-
{
|
|
1896
|
-
"inputs": [
|
|
1897
|
-
{
|
|
1898
|
-
"internalType": "address",
|
|
1899
|
-
"name": "user",
|
|
1900
|
-
"type": "address"
|
|
1901
|
-
}
|
|
1902
|
-
],
|
|
1903
|
-
"name": "userDepositIds",
|
|
1904
|
-
"outputs": [
|
|
1905
|
-
{
|
|
1906
|
-
"internalType": "uint256[]",
|
|
1907
|
-
"name": "",
|
|
1908
|
-
"type": "uint256[]"
|
|
1909
|
-
}
|
|
1910
|
-
],
|
|
1911
|
-
"stateMutability": "view",
|
|
1912
|
-
"type": "function"
|
|
1913
|
-
},
|
|
1914
|
-
{
|
|
1915
|
-
"inputs": [
|
|
1916
|
-
{
|
|
1917
|
-
"internalType": "address",
|
|
1918
|
-
"name": "user",
|
|
1919
|
-
"type": "address"
|
|
1920
|
-
}
|
|
1921
|
-
],
|
|
1922
|
-
"name": "userRequestIds",
|
|
1923
|
-
"outputs": [
|
|
1924
|
-
{
|
|
1925
|
-
"internalType": "uint256[]",
|
|
1926
|
-
"name": "",
|
|
1927
|
-
"type": "uint256[]"
|
|
1928
|
-
}
|
|
1929
|
-
],
|
|
1930
|
-
"stateMutability": "view",
|
|
1931
|
-
"type": "function"
|
|
1932
|
-
}
|
|
1933
|
-
];
|
|
1934
|
-
/**
|
|
1935
|
-
* Vault_json Contract Class
|
|
1936
|
-
*
|
|
1937
|
-
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
1938
|
-
*
|
|
1939
|
-
* @example
|
|
1940
|
-
* ```typescript
|
|
1941
|
-
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
1942
|
-
* import { mainnet } from 'viem/chains';
|
|
1943
|
-
* import { Vault_json } from 'Vault_json';
|
|
1944
|
-
*
|
|
1945
|
-
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
1946
|
-
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
1947
|
-
*
|
|
1948
|
-
* const contract = new Vault_json('0x...', { publicClient, walletClient });
|
|
1949
|
-
*
|
|
1950
|
-
* // Read functions
|
|
1951
|
-
* const result = await contract.balanceOf('0x...');
|
|
1952
|
-
*
|
|
1953
|
-
* // Write functions
|
|
1954
|
-
* const hash = await contract.transfer('0x...', 1000n);
|
|
1955
|
-
*
|
|
1956
|
-
* // Simulate transactions (dry-run)
|
|
1957
|
-
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
1958
|
-
* console.log('Gas estimate:', simulation.request.gas);
|
|
1959
|
-
*
|
|
1960
|
-
* // Watch events
|
|
1961
|
-
* const unwatch = contract.watch.Transfer((event) => {
|
|
1962
|
-
* console.log('Transfer event:', event);
|
|
1963
|
-
* });
|
|
1964
|
-
* ```
|
|
1965
|
-
*/
|
|
1966
|
-
class Vault_json {
|
|
1967
|
-
constructor(address, clients) {
|
|
1968
|
-
this.contractAddress = address;
|
|
1969
|
-
this.publicClient = clients.publicClient;
|
|
1970
|
-
this.contract = (0, viem_1.getContract)({
|
|
1971
|
-
address,
|
|
1972
|
-
abi: exports.Vault_jsonAbi,
|
|
1973
|
-
client: {
|
|
1974
|
-
public: clients.publicClient,
|
|
1975
|
-
wallet: clients.walletClient,
|
|
1976
|
-
},
|
|
1977
|
-
});
|
|
1978
|
-
}
|
|
1979
|
-
/**
|
|
1980
|
-
* Get the contract address
|
|
1981
|
-
*/
|
|
1982
|
-
get address() {
|
|
1983
|
-
return this.contractAddress;
|
|
1984
|
-
}
|
|
1985
|
-
/**
|
|
1986
|
-
* Get the underlying viem contract instance
|
|
1987
|
-
*/
|
|
1988
|
-
getContract() {
|
|
1989
|
-
return this.contract;
|
|
1990
|
-
}
|
|
1991
|
-
/**
|
|
1992
|
-
* BOT_ROLE
|
|
1993
|
-
* view
|
|
1994
|
-
*/
|
|
1995
|
-
async BOT_ROLE() {
|
|
1996
|
-
return this.contract.read.BOT_ROLE();
|
|
1997
|
-
}
|
|
1998
|
-
/**
|
|
1999
|
-
* BPS
|
|
2000
|
-
* view
|
|
2001
|
-
*/
|
|
2002
|
-
async BPS() {
|
|
2003
|
-
return this.contract.read.BPS();
|
|
2004
|
-
}
|
|
2005
|
-
/**
|
|
2006
|
-
* DEFAULT_ADMIN_ROLE
|
|
2007
|
-
* view
|
|
2008
|
-
*/
|
|
2009
|
-
async DEFAULT_ADMIN_ROLE() {
|
|
2010
|
-
return this.contract.read.DEFAULT_ADMIN_ROLE();
|
|
2011
|
-
}
|
|
2012
|
-
/**
|
|
2013
|
-
* GUARDIAN_ROLE
|
|
2014
|
-
* view
|
|
2015
|
-
*/
|
|
2016
|
-
async GUARDIAN_ROLE() {
|
|
2017
|
-
return this.contract.read.GUARDIAN_ROLE();
|
|
2018
|
-
}
|
|
2019
|
-
/**
|
|
2020
|
-
* MANAGER_ROLE
|
|
2021
|
-
* view
|
|
2022
|
-
*/
|
|
2023
|
-
async MANAGER_ROLE() {
|
|
2024
|
-
return this.contract.read.MANAGER_ROLE();
|
|
2025
|
-
}
|
|
2026
|
-
/**
|
|
2027
|
-
* MAX_FEE_BPS
|
|
2028
|
-
* view
|
|
2029
|
-
*/
|
|
2030
|
-
async MAX_FEE_BPS() {
|
|
2031
|
-
return this.contract.read.MAX_FEE_BPS();
|
|
2032
|
-
}
|
|
2033
|
-
/**
|
|
2034
|
-
* SHARE_SCALE
|
|
2035
|
-
* view
|
|
2036
|
-
*/
|
|
2037
|
-
async SHARE_SCALE() {
|
|
2038
|
-
return this.contract.read.SHARE_SCALE();
|
|
2039
|
-
}
|
|
2040
|
-
/**
|
|
2041
|
-
* asset
|
|
2042
|
-
* view
|
|
2043
|
-
*/
|
|
2044
|
-
async asset() {
|
|
2045
|
-
return this.contract.read.asset();
|
|
2046
|
-
}
|
|
2047
|
-
/**
|
|
2048
|
-
* assetDecimals
|
|
2049
|
-
* view
|
|
2050
|
-
*/
|
|
2051
|
-
async assetDecimals() {
|
|
2052
|
-
return this.contract.read.assetDecimals();
|
|
2053
|
-
}
|
|
2054
|
-
/**
|
|
2055
|
-
* assetToken
|
|
2056
|
-
* view
|
|
2057
|
-
*/
|
|
2058
|
-
async assetToken() {
|
|
2059
|
-
return this.contract.read.assetToken();
|
|
2060
|
-
}
|
|
2061
|
-
/**
|
|
2062
|
-
* costBasisPerShare
|
|
2063
|
-
* view
|
|
2064
|
-
*/
|
|
2065
|
-
async costBasisPerShare(user) {
|
|
2066
|
-
return this.contract.read.costBasisPerShare([user]);
|
|
2067
|
-
}
|
|
2068
|
-
/**
|
|
2069
|
-
* costBasisValue
|
|
2070
|
-
* view
|
|
2071
|
-
*/
|
|
2072
|
-
async costBasisValue(arg0) {
|
|
2073
|
-
return this.contract.read.costBasisValue([arg0]);
|
|
2074
|
-
}
|
|
2075
|
-
/**
|
|
2076
|
-
* depositQueueLength
|
|
2077
|
-
* view
|
|
2078
|
-
*/
|
|
2079
|
-
async depositQueueLength() {
|
|
2080
|
-
return this.contract.read.depositQueueLength();
|
|
2081
|
-
}
|
|
2082
|
-
/**
|
|
2083
|
-
* feeRecipient
|
|
2084
|
-
* view
|
|
2085
|
-
*/
|
|
2086
|
-
async feeRecipient() {
|
|
2087
|
-
return this.contract.read.feeRecipient();
|
|
2088
|
-
}
|
|
2089
|
-
/**
|
|
2090
|
-
* getDepositRequest
|
|
2091
|
-
* view
|
|
2092
|
-
*/
|
|
2093
|
-
async getDepositRequest(depositId) {
|
|
2094
|
-
return this.contract.read.getDepositRequest([depositId]);
|
|
2095
|
-
}
|
|
2096
|
-
/**
|
|
2097
|
-
* getRequest
|
|
2098
|
-
* view
|
|
2099
|
-
*/
|
|
2100
|
-
async getRequest(requestId) {
|
|
2101
|
-
return this.contract.read.getRequest([requestId]);
|
|
2102
|
-
}
|
|
2103
|
-
/**
|
|
2104
|
-
* getRoleAdmin
|
|
2105
|
-
* view
|
|
2106
|
-
*/
|
|
2107
|
-
async getRoleAdmin(role) {
|
|
2108
|
-
return this.contract.read.getRoleAdmin([role]);
|
|
2109
|
-
}
|
|
2110
|
-
/**
|
|
2111
|
-
* hasRole
|
|
2112
|
-
* view
|
|
2113
|
-
*/
|
|
2114
|
-
async hasRole(role, account) {
|
|
2115
|
-
return this.contract.read.hasRole([role, account]);
|
|
2116
|
-
}
|
|
2117
|
-
/**
|
|
2118
|
-
* hasSettleReadyWork
|
|
2119
|
-
* view
|
|
2120
|
-
*/
|
|
2121
|
-
async hasSettleReadyWork() {
|
|
2122
|
-
return this.contract.read.hasSettleReadyWork();
|
|
2123
|
-
}
|
|
2124
|
-
/**
|
|
2125
|
-
* isTracked
|
|
2126
|
-
* view
|
|
2127
|
-
*/
|
|
2128
|
-
async isTracked(arg0) {
|
|
2129
|
-
return this.contract.read.isTracked([arg0]);
|
|
2130
|
-
}
|
|
2131
|
-
/**
|
|
2132
|
-
* maxSettlementBatchSize
|
|
2133
|
-
* view
|
|
2134
|
-
*/
|
|
2135
|
-
async maxSettlementBatchSize() {
|
|
2136
|
-
return this.contract.read.maxSettlementBatchSize();
|
|
2137
|
-
}
|
|
2138
|
-
/**
|
|
2139
|
-
* minDepositAssets
|
|
2140
|
-
* view
|
|
2141
|
-
*/
|
|
2142
|
-
async minDepositAssets() {
|
|
2143
|
-
return this.contract.read.minDepositAssets();
|
|
2144
|
-
}
|
|
2145
|
-
/**
|
|
2146
|
-
* oracle
|
|
2147
|
-
* view
|
|
2148
|
-
*/
|
|
2149
|
-
async oracle() {
|
|
2150
|
-
return this.contract.read.oracle();
|
|
2151
|
-
}
|
|
2152
|
-
/**
|
|
2153
|
-
* oracleContract
|
|
2154
|
-
* view
|
|
2155
|
-
*/
|
|
2156
|
-
async oracleContract() {
|
|
2157
|
-
return this.contract.read.oracleContract();
|
|
2158
|
-
}
|
|
2159
|
-
/**
|
|
2160
|
-
* paused
|
|
2161
|
-
* view
|
|
2162
|
-
*/
|
|
2163
|
-
async paused() {
|
|
2164
|
-
return this.contract.read.paused();
|
|
2165
|
-
}
|
|
2166
|
-
/**
|
|
2167
|
-
* pendingDepositTotal
|
|
2168
|
-
* view
|
|
2169
|
-
*/
|
|
2170
|
-
async pendingDepositTotal() {
|
|
2171
|
-
return this.contract.read.pendingDepositTotal();
|
|
2172
|
-
}
|
|
2173
|
-
/**
|
|
2174
|
-
* pendingSettlementWithdrawShares
|
|
2175
|
-
* view
|
|
2176
|
-
*/
|
|
2177
|
-
async pendingSettlementWithdrawShares() {
|
|
2178
|
-
return this.contract.read.pendingSettlementWithdrawShares();
|
|
2179
|
-
}
|
|
2180
|
-
/**
|
|
2181
|
-
* pendingWithdrawShares
|
|
2182
|
-
* view
|
|
2183
|
-
*/
|
|
2184
|
-
async pendingWithdrawShares() {
|
|
2185
|
-
return this.contract.read.pendingWithdrawShares();
|
|
2186
|
-
}
|
|
2187
|
-
/**
|
|
2188
|
-
* performanceFee
|
|
2189
|
-
* view
|
|
2190
|
-
*/
|
|
2191
|
-
async performanceFee() {
|
|
2192
|
-
return this.contract.read.performanceFee();
|
|
2193
|
-
}
|
|
2194
|
-
/**
|
|
2195
|
-
* previewDeposit
|
|
2196
|
-
* view
|
|
2197
|
-
*/
|
|
2198
|
-
async previewDeposit(assets) {
|
|
2199
|
-
return this.contract.read.previewDeposit([assets]);
|
|
2200
|
-
}
|
|
2201
|
-
/**
|
|
2202
|
-
* previewWithdraw
|
|
2203
|
-
* view
|
|
2204
|
-
*/
|
|
2205
|
-
async previewWithdraw(sharesIn, owner) {
|
|
2206
|
-
return this.contract.read.previewWithdraw([sharesIn, owner]);
|
|
2207
|
-
}
|
|
2208
|
-
/**
|
|
2209
|
-
* pricePerShare
|
|
2210
|
-
* view
|
|
2211
|
-
*/
|
|
2212
|
-
async pricePerShare() {
|
|
2213
|
-
return this.contract.read.pricePerShare();
|
|
2214
|
-
}
|
|
2215
|
-
/**
|
|
2216
|
-
* queueLength
|
|
2217
|
-
* view
|
|
2218
|
-
*/
|
|
2219
|
-
async queueLength() {
|
|
2220
|
-
return this.contract.read.queueLength();
|
|
2221
|
-
}
|
|
2222
|
-
/**
|
|
2223
|
-
* settledWithdrawalLiabilityTotal
|
|
2224
|
-
* view
|
|
2225
|
-
*/
|
|
2226
|
-
async settledWithdrawalLiabilityTotal() {
|
|
2227
|
-
return this.contract.read.settledWithdrawalLiabilityTotal();
|
|
2228
|
-
}
|
|
2229
|
-
/**
|
|
2230
|
-
* settlementFeeAssets
|
|
2231
|
-
* view
|
|
2232
|
-
*/
|
|
2233
|
-
async settlementFeeAssets() {
|
|
2234
|
-
return this.contract.read.settlementFeeAssets();
|
|
2235
|
-
}
|
|
2236
|
-
/**
|
|
2237
|
-
* shareToken
|
|
2238
|
-
* view
|
|
2239
|
-
*/
|
|
2240
|
-
async shareToken() {
|
|
2241
|
-
return this.contract.read.shareToken();
|
|
2242
|
-
}
|
|
2243
|
-
/**
|
|
2244
|
-
* shares
|
|
2245
|
-
* view
|
|
2246
|
-
*/
|
|
2247
|
-
async shares() {
|
|
2248
|
-
return this.contract.read.shares();
|
|
2249
|
-
}
|
|
2250
|
-
/**
|
|
2251
|
-
* supportsInterface
|
|
2252
|
-
* view
|
|
2253
|
-
*/
|
|
2254
|
-
async supportsInterface(interfaceId) {
|
|
2255
|
-
return this.contract.read.supportsInterface([interfaceId]);
|
|
2256
|
-
}
|
|
2257
|
-
/**
|
|
2258
|
-
* targetAllowed
|
|
2259
|
-
* view
|
|
2260
|
-
*/
|
|
2261
|
-
async targetAllowed(arg0) {
|
|
2262
|
-
return this.contract.read.targetAllowed([arg0]);
|
|
2263
|
-
}
|
|
2264
|
-
/**
|
|
2265
|
-
* tokenDecimals
|
|
2266
|
-
* view
|
|
2267
|
-
*/
|
|
2268
|
-
async tokenDecimals(arg0) {
|
|
2269
|
-
return this.contract.read.tokenDecimals([arg0]);
|
|
2270
|
-
}
|
|
2271
|
-
/**
|
|
2272
|
-
* totalAssets
|
|
2273
|
-
* view
|
|
2274
|
-
*/
|
|
2275
|
-
async totalAssets() {
|
|
2276
|
-
return this.contract.read.totalAssets();
|
|
2277
|
-
}
|
|
2278
|
-
/**
|
|
2279
|
-
* trackedTokens
|
|
2280
|
-
* view
|
|
2281
|
-
*/
|
|
2282
|
-
async trackedTokens() {
|
|
2283
|
-
return this.contract.read.trackedTokens();
|
|
2284
|
-
}
|
|
2285
|
-
/**
|
|
2286
|
-
* userDepositIds
|
|
2287
|
-
* view
|
|
2288
|
-
*/
|
|
2289
|
-
async userDepositIds(user) {
|
|
2290
|
-
return this.contract.read.userDepositIds([user]);
|
|
2291
|
-
}
|
|
2292
|
-
/**
|
|
2293
|
-
* userRequestIds
|
|
2294
|
-
* view
|
|
2295
|
-
*/
|
|
2296
|
-
async userRequestIds(user) {
|
|
2297
|
-
return this.contract.read.userRequestIds([user]);
|
|
2298
|
-
}
|
|
2299
|
-
/**
|
|
2300
|
-
* addTrackedToken
|
|
2301
|
-
* nonpayable
|
|
2302
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2303
|
-
*/
|
|
2304
|
-
async addTrackedToken(token, options) {
|
|
2305
|
-
if (!this.contract.write) {
|
|
2306
|
-
throw new Error('Wallet client is required for write operations');
|
|
2307
|
-
}
|
|
2308
|
-
return this.contract.write.addTrackedToken([token], options);
|
|
2309
|
-
}
|
|
2310
|
-
/**
|
|
2311
|
-
* approveERC20
|
|
2312
|
-
* nonpayable
|
|
2313
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2314
|
-
*/
|
|
2315
|
-
async approveERC20(token, spender, amount, options) {
|
|
2316
|
-
if (!this.contract.write) {
|
|
2317
|
-
throw new Error('Wallet client is required for write operations');
|
|
2318
|
-
}
|
|
2319
|
-
return this.contract.write.approveERC20([token, spender, amount], options);
|
|
2320
|
-
}
|
|
2321
|
-
/**
|
|
2322
|
-
* approvePermit2
|
|
2323
|
-
* nonpayable
|
|
2324
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2325
|
-
*/
|
|
2326
|
-
async approvePermit2(permit2, token, spender, amount, expiration, options) {
|
|
2327
|
-
if (!this.contract.write) {
|
|
2328
|
-
throw new Error('Wallet client is required for write operations');
|
|
2329
|
-
}
|
|
2330
|
-
return this.contract.write.approvePermit2([permit2, token, spender, amount, expiration], options);
|
|
2331
|
-
}
|
|
2332
|
-
/**
|
|
2333
|
-
* cancelDepositRequest
|
|
2334
|
-
* nonpayable
|
|
2335
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2336
|
-
*/
|
|
2337
|
-
async cancelDepositRequest(depositId, options) {
|
|
2338
|
-
if (!this.contract.write) {
|
|
2339
|
-
throw new Error('Wallet client is required for write operations');
|
|
2340
|
-
}
|
|
2341
|
-
return this.contract.write.cancelDepositRequest([depositId], options);
|
|
2342
|
-
}
|
|
2343
|
-
/**
|
|
2344
|
-
* cancelPendingDeposits
|
|
2345
|
-
* nonpayable
|
|
2346
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2347
|
-
*/
|
|
2348
|
-
async cancelPendingDeposits(maxCount, options) {
|
|
2349
|
-
if (!this.contract.write) {
|
|
2350
|
-
throw new Error('Wallet client is required for write operations');
|
|
2351
|
-
}
|
|
2352
|
-
return this.contract.write.cancelPendingDeposits([maxCount], options);
|
|
2353
|
-
}
|
|
2354
|
-
/**
|
|
2355
|
-
* cancelWithdraw
|
|
2356
|
-
* nonpayable
|
|
2357
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2358
|
-
*/
|
|
2359
|
-
async cancelWithdraw(requestId, options) {
|
|
2360
|
-
if (!this.contract.write) {
|
|
2361
|
-
throw new Error('Wallet client is required for write operations');
|
|
2362
|
-
}
|
|
2363
|
-
return this.contract.write.cancelWithdraw([requestId], options);
|
|
2364
|
-
}
|
|
2365
|
-
/**
|
|
2366
|
-
* claimAndDeposit
|
|
2367
|
-
* nonpayable
|
|
2368
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2369
|
-
*/
|
|
2370
|
-
async claimAndDeposit(requestId, newVault, options) {
|
|
2371
|
-
if (!this.contract.write) {
|
|
2372
|
-
throw new Error('Wallet client is required for write operations');
|
|
2373
|
-
}
|
|
2374
|
-
return this.contract.write.claimAndDeposit([requestId, newVault], options);
|
|
2375
|
-
}
|
|
2376
|
-
/**
|
|
2377
|
-
* claimWithdraw
|
|
2378
|
-
* nonpayable
|
|
2379
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2380
|
-
*/
|
|
2381
|
-
async claimWithdraw(requestId, options) {
|
|
2382
|
-
if (!this.contract.write) {
|
|
2383
|
-
throw new Error('Wallet client is required for write operations');
|
|
2384
|
-
}
|
|
2385
|
-
return this.contract.write.claimWithdraw([requestId], options);
|
|
2386
|
-
}
|
|
2387
|
-
/**
|
|
2388
|
-
* claimWithdrawTo
|
|
2389
|
-
* nonpayable
|
|
2390
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2391
|
-
*/
|
|
2392
|
-
async claimWithdrawTo(requestId, recipient, options) {
|
|
2393
|
-
if (!this.contract.write) {
|
|
2394
|
-
throw new Error('Wallet client is required for write operations');
|
|
2395
|
-
}
|
|
2396
|
-
return this.contract.write.claimWithdrawTo([requestId, recipient], options);
|
|
2397
|
-
}
|
|
2398
|
-
/**
|
|
2399
|
-
* grantRole
|
|
2400
|
-
* nonpayable
|
|
2401
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2402
|
-
*/
|
|
2403
|
-
async grantRole(role, account, options) {
|
|
2404
|
-
if (!this.contract.write) {
|
|
2405
|
-
throw new Error('Wallet client is required for write operations');
|
|
2406
|
-
}
|
|
2407
|
-
return this.contract.write.grantRole([role, account], options);
|
|
2408
|
-
}
|
|
2409
|
-
/**
|
|
2410
|
-
* onShareTransfer
|
|
2411
|
-
* nonpayable
|
|
2412
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2413
|
-
*/
|
|
2414
|
-
async onShareTransfer(from, to, value, options) {
|
|
2415
|
-
if (!this.contract.write) {
|
|
2416
|
-
throw new Error('Wallet client is required for write operations');
|
|
2417
|
-
}
|
|
2418
|
-
return this.contract.write.onShareTransfer([from, to, value], options);
|
|
2419
|
-
}
|
|
2420
|
-
/**
|
|
2421
|
-
* pause
|
|
2422
|
-
* nonpayable
|
|
2423
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2424
|
-
*/
|
|
2425
|
-
async pause(options) {
|
|
2426
|
-
if (!this.contract.write) {
|
|
2427
|
-
throw new Error('Wallet client is required for write operations');
|
|
2428
|
-
}
|
|
2429
|
-
return this.contract.write.pause(options);
|
|
2430
|
-
}
|
|
2431
|
-
/**
|
|
2432
|
-
* rebalance
|
|
2433
|
-
* nonpayable
|
|
2434
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2435
|
-
*/
|
|
2436
|
-
async rebalance(targets, calldatas, options) {
|
|
2437
|
-
if (!this.contract.write) {
|
|
2438
|
-
throw new Error('Wallet client is required for write operations');
|
|
2439
|
-
}
|
|
2440
|
-
return this.contract.write.rebalance([targets, calldatas], options);
|
|
2441
|
-
}
|
|
2442
|
-
/**
|
|
2443
|
-
* removeTrackedToken
|
|
2444
|
-
* nonpayable
|
|
2445
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2446
|
-
*/
|
|
2447
|
-
async removeTrackedToken(token, options) {
|
|
2448
|
-
if (!this.contract.write) {
|
|
2449
|
-
throw new Error('Wallet client is required for write operations');
|
|
2450
|
-
}
|
|
2451
|
-
return this.contract.write.removeTrackedToken([token], options);
|
|
2452
|
-
}
|
|
2453
|
-
/**
|
|
2454
|
-
* renounceRole
|
|
2455
|
-
* nonpayable
|
|
2456
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2457
|
-
*/
|
|
2458
|
-
async renounceRole(role, callerConfirmation, options) {
|
|
2459
|
-
if (!this.contract.write) {
|
|
2460
|
-
throw new Error('Wallet client is required for write operations');
|
|
2461
|
-
}
|
|
2462
|
-
return this.contract.write.renounceRole([role, callerConfirmation], options);
|
|
2463
|
-
}
|
|
2464
|
-
/**
|
|
2465
|
-
* requestDeposit
|
|
2466
|
-
* nonpayable
|
|
2467
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2468
|
-
*/
|
|
2469
|
-
async requestDeposit(assets, options) {
|
|
2470
|
-
if (!this.contract.write) {
|
|
2471
|
-
throw new Error('Wallet client is required for write operations');
|
|
2472
|
-
}
|
|
2473
|
-
return this.contract.write.requestDeposit([assets], options);
|
|
2474
|
-
}
|
|
2475
|
-
/**
|
|
2476
|
-
* requestDepositFor
|
|
2477
|
-
* nonpayable
|
|
2478
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2479
|
-
*/
|
|
2480
|
-
async requestDepositFor(assets, recipient, options) {
|
|
2481
|
-
if (!this.contract.write) {
|
|
2482
|
-
throw new Error('Wallet client is required for write operations');
|
|
2483
|
-
}
|
|
2484
|
-
return this.contract.write.requestDepositFor([assets, recipient], options);
|
|
2485
|
-
}
|
|
2486
|
-
/**
|
|
2487
|
-
* requestWithdraw
|
|
2488
|
-
* nonpayable
|
|
2489
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2490
|
-
*/
|
|
2491
|
-
async requestWithdraw(sharesIn, options) {
|
|
2492
|
-
if (!this.contract.write) {
|
|
2493
|
-
throw new Error('Wallet client is required for write operations');
|
|
2494
|
-
}
|
|
2495
|
-
return this.contract.write.requestWithdraw([sharesIn], options);
|
|
2496
|
-
}
|
|
2497
|
-
/**
|
|
2498
|
-
* revokeRole
|
|
2499
|
-
* nonpayable
|
|
2500
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2501
|
-
*/
|
|
2502
|
-
async revokeRole(role, account, options) {
|
|
2503
|
-
if (!this.contract.write) {
|
|
2504
|
-
throw new Error('Wallet client is required for write operations');
|
|
2505
|
-
}
|
|
2506
|
-
return this.contract.write.revokeRole([role, account], options);
|
|
2507
|
-
}
|
|
2508
|
-
/**
|
|
2509
|
-
* setFeeRecipient
|
|
2510
|
-
* nonpayable
|
|
2511
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2512
|
-
*/
|
|
2513
|
-
async setFeeRecipient(recipient, options) {
|
|
2514
|
-
if (!this.contract.write) {
|
|
2515
|
-
throw new Error('Wallet client is required for write operations');
|
|
2516
|
-
}
|
|
2517
|
-
return this.contract.write.setFeeRecipient([recipient], options);
|
|
2518
|
-
}
|
|
2519
|
-
/**
|
|
2520
|
-
* setMaxSettlementBatchSize
|
|
2521
|
-
* nonpayable
|
|
2522
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2523
|
-
*/
|
|
2524
|
-
async setMaxSettlementBatchSize(size, options) {
|
|
2525
|
-
if (!this.contract.write) {
|
|
2526
|
-
throw new Error('Wallet client is required for write operations');
|
|
2527
|
-
}
|
|
2528
|
-
return this.contract.write.setMaxSettlementBatchSize([size], options);
|
|
2529
|
-
}
|
|
2530
|
-
/**
|
|
2531
|
-
* setMinDepositAssets
|
|
2532
|
-
* nonpayable
|
|
2533
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2534
|
-
*/
|
|
2535
|
-
async setMinDepositAssets(amount, options) {
|
|
2536
|
-
if (!this.contract.write) {
|
|
2537
|
-
throw new Error('Wallet client is required for write operations');
|
|
2538
|
-
}
|
|
2539
|
-
return this.contract.write.setMinDepositAssets([amount], options);
|
|
2540
|
-
}
|
|
2541
|
-
/**
|
|
2542
|
-
* setOracle
|
|
2543
|
-
* nonpayable
|
|
2544
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2545
|
-
*/
|
|
2546
|
-
async setOracle(_oracle, options) {
|
|
2547
|
-
if (!this.contract.write) {
|
|
2548
|
-
throw new Error('Wallet client is required for write operations');
|
|
2549
|
-
}
|
|
2550
|
-
return this.contract.write.setOracle([_oracle], options);
|
|
2551
|
-
}
|
|
2552
|
-
/**
|
|
2553
|
-
* setPerformanceFee
|
|
2554
|
-
* nonpayable
|
|
2555
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2556
|
-
*/
|
|
2557
|
-
async setPerformanceFee(feeBps, options) {
|
|
2558
|
-
if (!this.contract.write) {
|
|
2559
|
-
throw new Error('Wallet client is required for write operations');
|
|
2560
|
-
}
|
|
2561
|
-
return this.contract.write.setPerformanceFee([feeBps], options);
|
|
2562
|
-
}
|
|
2563
|
-
/**
|
|
2564
|
-
* setSettlementFee
|
|
2565
|
-
* nonpayable
|
|
2566
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2567
|
-
*/
|
|
2568
|
-
async setSettlementFee(fee, options) {
|
|
2569
|
-
if (!this.contract.write) {
|
|
2570
|
-
throw new Error('Wallet client is required for write operations');
|
|
2571
|
-
}
|
|
2572
|
-
return this.contract.write.setSettlementFee([fee], options);
|
|
2573
|
-
}
|
|
2574
|
-
/**
|
|
2575
|
-
* setTargetAllowed
|
|
2576
|
-
* nonpayable
|
|
2577
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2578
|
-
*/
|
|
2579
|
-
async setTargetAllowed(target, allowed, options) {
|
|
2580
|
-
if (!this.contract.write) {
|
|
2581
|
-
throw new Error('Wallet client is required for write operations');
|
|
2582
|
-
}
|
|
2583
|
-
return this.contract.write.setTargetAllowed([target, allowed], options);
|
|
2584
|
-
}
|
|
2585
|
-
/**
|
|
2586
|
-
* settle
|
|
2587
|
-
* nonpayable
|
|
2588
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2589
|
-
*/
|
|
2590
|
-
async settle(tokens, prices, options) {
|
|
2591
|
-
if (!this.contract.write) {
|
|
2592
|
-
throw new Error('Wallet client is required for write operations');
|
|
2593
|
-
}
|
|
2594
|
-
return this.contract.write.settle([tokens, prices], options);
|
|
2595
|
-
}
|
|
2596
|
-
/**
|
|
2597
|
-
* unpause
|
|
2598
|
-
* nonpayable
|
|
2599
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2600
|
-
*/
|
|
2601
|
-
async unpause(options) {
|
|
2602
|
-
if (!this.contract.write) {
|
|
2603
|
-
throw new Error('Wallet client is required for write operations');
|
|
2604
|
-
}
|
|
2605
|
-
return this.contract.write.unpause(options);
|
|
2606
|
-
}
|
|
2607
|
-
/**
|
|
2608
|
-
* Simulate contract write operations (dry-run without sending transaction)
|
|
2609
|
-
*
|
|
2610
|
-
* @example
|
|
2611
|
-
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
2612
|
-
* console.log('Gas estimate:', result.request.gas);
|
|
2613
|
-
* console.log('Would succeed:', result.result);
|
|
2614
|
-
*/
|
|
2615
|
-
get simulate() {
|
|
2616
|
-
const contract = this.contract;
|
|
2617
|
-
if (!contract.simulate) {
|
|
2618
|
-
throw new Error('Public client is required for simulation');
|
|
2619
|
-
}
|
|
2620
|
-
return {
|
|
2621
|
-
/**
|
|
2622
|
-
* Simulate addTrackedToken
|
|
2623
|
-
* Returns gas estimate and result without sending transaction
|
|
2624
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2625
|
-
*/
|
|
2626
|
-
async addTrackedToken(token, options) {
|
|
2627
|
-
return contract.simulate.addTrackedToken([token], options);
|
|
2628
|
-
},
|
|
2629
|
-
/**
|
|
2630
|
-
* Simulate approveERC20
|
|
2631
|
-
* Returns gas estimate and result without sending transaction
|
|
2632
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2633
|
-
*/
|
|
2634
|
-
async approveERC20(token, spender, amount, options) {
|
|
2635
|
-
return contract.simulate.approveERC20([token, spender, amount], options);
|
|
2636
|
-
},
|
|
2637
|
-
/**
|
|
2638
|
-
* Simulate approvePermit2
|
|
2639
|
-
* Returns gas estimate and result without sending transaction
|
|
2640
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2641
|
-
*/
|
|
2642
|
-
async approvePermit2(permit2, token, spender, amount, expiration, options) {
|
|
2643
|
-
return contract.simulate.approvePermit2([permit2, token, spender, amount, expiration], options);
|
|
2644
|
-
},
|
|
2645
|
-
/**
|
|
2646
|
-
* Simulate cancelDepositRequest
|
|
2647
|
-
* Returns gas estimate and result without sending transaction
|
|
2648
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2649
|
-
*/
|
|
2650
|
-
async cancelDepositRequest(depositId, options) {
|
|
2651
|
-
return contract.simulate.cancelDepositRequest([depositId], options);
|
|
2652
|
-
},
|
|
2653
|
-
/**
|
|
2654
|
-
* Simulate cancelPendingDeposits
|
|
2655
|
-
* Returns gas estimate and result without sending transaction
|
|
2656
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2657
|
-
*/
|
|
2658
|
-
async cancelPendingDeposits(maxCount, options) {
|
|
2659
|
-
return contract.simulate.cancelPendingDeposits([maxCount], options);
|
|
2660
|
-
},
|
|
2661
|
-
/**
|
|
2662
|
-
* Simulate cancelWithdraw
|
|
2663
|
-
* Returns gas estimate and result without sending transaction
|
|
2664
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2665
|
-
*/
|
|
2666
|
-
async cancelWithdraw(requestId, options) {
|
|
2667
|
-
return contract.simulate.cancelWithdraw([requestId], options);
|
|
2668
|
-
},
|
|
2669
|
-
/**
|
|
2670
|
-
* Simulate claimAndDeposit
|
|
2671
|
-
* Returns gas estimate and result without sending transaction
|
|
2672
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2673
|
-
*/
|
|
2674
|
-
async claimAndDeposit(requestId, newVault, options) {
|
|
2675
|
-
return contract.simulate.claimAndDeposit([requestId, newVault], options);
|
|
2676
|
-
},
|
|
2677
|
-
/**
|
|
2678
|
-
* Simulate claimWithdraw
|
|
2679
|
-
* Returns gas estimate and result without sending transaction
|
|
2680
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2681
|
-
*/
|
|
2682
|
-
async claimWithdraw(requestId, options) {
|
|
2683
|
-
return contract.simulate.claimWithdraw([requestId], options);
|
|
2684
|
-
},
|
|
2685
|
-
/**
|
|
2686
|
-
* Simulate claimWithdrawTo
|
|
2687
|
-
* Returns gas estimate and result without sending transaction
|
|
2688
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2689
|
-
*/
|
|
2690
|
-
async claimWithdrawTo(requestId, recipient, options) {
|
|
2691
|
-
return contract.simulate.claimWithdrawTo([requestId, recipient], options);
|
|
2692
|
-
},
|
|
2693
|
-
/**
|
|
2694
|
-
* Simulate grantRole
|
|
2695
|
-
* Returns gas estimate and result without sending transaction
|
|
2696
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2697
|
-
*/
|
|
2698
|
-
async grantRole(role, account, options) {
|
|
2699
|
-
return contract.simulate.grantRole([role, account], options);
|
|
2700
|
-
},
|
|
2701
|
-
/**
|
|
2702
|
-
* Simulate onShareTransfer
|
|
2703
|
-
* Returns gas estimate and result without sending transaction
|
|
2704
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2705
|
-
*/
|
|
2706
|
-
async onShareTransfer(from, to, value, options) {
|
|
2707
|
-
return contract.simulate.onShareTransfer([from, to, value], options);
|
|
2708
|
-
},
|
|
2709
|
-
/**
|
|
2710
|
-
* Simulate pause
|
|
2711
|
-
* Returns gas estimate and result without sending transaction
|
|
2712
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2713
|
-
*/
|
|
2714
|
-
async pause(options) {
|
|
2715
|
-
return contract.simulate.pause(options);
|
|
2716
|
-
},
|
|
2717
|
-
/**
|
|
2718
|
-
* Simulate rebalance
|
|
2719
|
-
* Returns gas estimate and result without sending transaction
|
|
2720
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2721
|
-
*/
|
|
2722
|
-
async rebalance(targets, calldatas, options) {
|
|
2723
|
-
return contract.simulate.rebalance([targets, calldatas], options);
|
|
2724
|
-
},
|
|
2725
|
-
/**
|
|
2726
|
-
* Simulate removeTrackedToken
|
|
2727
|
-
* Returns gas estimate and result without sending transaction
|
|
2728
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2729
|
-
*/
|
|
2730
|
-
async removeTrackedToken(token, options) {
|
|
2731
|
-
return contract.simulate.removeTrackedToken([token], options);
|
|
2732
|
-
},
|
|
2733
|
-
/**
|
|
2734
|
-
* Simulate renounceRole
|
|
2735
|
-
* Returns gas estimate and result without sending transaction
|
|
2736
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2737
|
-
*/
|
|
2738
|
-
async renounceRole(role, callerConfirmation, options) {
|
|
2739
|
-
return contract.simulate.renounceRole([role, callerConfirmation], options);
|
|
2740
|
-
},
|
|
2741
|
-
/**
|
|
2742
|
-
* Simulate requestDeposit
|
|
2743
|
-
* Returns gas estimate and result without sending transaction
|
|
2744
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2745
|
-
*/
|
|
2746
|
-
async requestDeposit(assets, options) {
|
|
2747
|
-
return contract.simulate.requestDeposit([assets], options);
|
|
2748
|
-
},
|
|
2749
|
-
/**
|
|
2750
|
-
* Simulate requestDepositFor
|
|
2751
|
-
* Returns gas estimate and result without sending transaction
|
|
2752
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2753
|
-
*/
|
|
2754
|
-
async requestDepositFor(assets, recipient, options) {
|
|
2755
|
-
return contract.simulate.requestDepositFor([assets, recipient], options);
|
|
2756
|
-
},
|
|
2757
|
-
/**
|
|
2758
|
-
* Simulate requestWithdraw
|
|
2759
|
-
* Returns gas estimate and result without sending transaction
|
|
2760
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2761
|
-
*/
|
|
2762
|
-
async requestWithdraw(sharesIn, options) {
|
|
2763
|
-
return contract.simulate.requestWithdraw([sharesIn], options);
|
|
2764
|
-
},
|
|
2765
|
-
/**
|
|
2766
|
-
* Simulate revokeRole
|
|
2767
|
-
* Returns gas estimate and result without sending transaction
|
|
2768
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2769
|
-
*/
|
|
2770
|
-
async revokeRole(role, account, options) {
|
|
2771
|
-
return contract.simulate.revokeRole([role, account], options);
|
|
2772
|
-
},
|
|
2773
|
-
/**
|
|
2774
|
-
* Simulate setFeeRecipient
|
|
2775
|
-
* Returns gas estimate and result without sending transaction
|
|
2776
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2777
|
-
*/
|
|
2778
|
-
async setFeeRecipient(recipient, options) {
|
|
2779
|
-
return contract.simulate.setFeeRecipient([recipient], options);
|
|
2780
|
-
},
|
|
2781
|
-
/**
|
|
2782
|
-
* Simulate setMaxSettlementBatchSize
|
|
2783
|
-
* Returns gas estimate and result without sending transaction
|
|
2784
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2785
|
-
*/
|
|
2786
|
-
async setMaxSettlementBatchSize(size, options) {
|
|
2787
|
-
return contract.simulate.setMaxSettlementBatchSize([size], options);
|
|
2788
|
-
},
|
|
2789
|
-
/**
|
|
2790
|
-
* Simulate setMinDepositAssets
|
|
2791
|
-
* Returns gas estimate and result without sending transaction
|
|
2792
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2793
|
-
*/
|
|
2794
|
-
async setMinDepositAssets(amount, options) {
|
|
2795
|
-
return contract.simulate.setMinDepositAssets([amount], options);
|
|
2796
|
-
},
|
|
2797
|
-
/**
|
|
2798
|
-
* Simulate setOracle
|
|
2799
|
-
* Returns gas estimate and result without sending transaction
|
|
2800
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2801
|
-
*/
|
|
2802
|
-
async setOracle(_oracle, options) {
|
|
2803
|
-
return contract.simulate.setOracle([_oracle], options);
|
|
2804
|
-
},
|
|
2805
|
-
/**
|
|
2806
|
-
* Simulate setPerformanceFee
|
|
2807
|
-
* Returns gas estimate and result without sending transaction
|
|
2808
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2809
|
-
*/
|
|
2810
|
-
async setPerformanceFee(feeBps, options) {
|
|
2811
|
-
return contract.simulate.setPerformanceFee([feeBps], options);
|
|
2812
|
-
},
|
|
2813
|
-
/**
|
|
2814
|
-
* Simulate setSettlementFee
|
|
2815
|
-
* Returns gas estimate and result without sending transaction
|
|
2816
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2817
|
-
*/
|
|
2818
|
-
async setSettlementFee(fee, options) {
|
|
2819
|
-
return contract.simulate.setSettlementFee([fee], options);
|
|
2820
|
-
},
|
|
2821
|
-
/**
|
|
2822
|
-
* Simulate setTargetAllowed
|
|
2823
|
-
* Returns gas estimate and result without sending transaction
|
|
2824
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2825
|
-
*/
|
|
2826
|
-
async setTargetAllowed(target, allowed, options) {
|
|
2827
|
-
return contract.simulate.setTargetAllowed([target, allowed], options);
|
|
2828
|
-
},
|
|
2829
|
-
/**
|
|
2830
|
-
* Simulate settle
|
|
2831
|
-
* Returns gas estimate and result without sending transaction
|
|
2832
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2833
|
-
*/
|
|
2834
|
-
async settle(tokens, prices, options) {
|
|
2835
|
-
return contract.simulate.settle([tokens, prices], options);
|
|
2836
|
-
},
|
|
2837
|
-
/**
|
|
2838
|
-
* Simulate unpause
|
|
2839
|
-
* Returns gas estimate and result without sending transaction
|
|
2840
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2841
|
-
*/
|
|
2842
|
-
async unpause(options) {
|
|
2843
|
-
return contract.simulate.unpause(options);
|
|
2844
|
-
}
|
|
2845
|
-
};
|
|
2846
|
-
}
|
|
2847
|
-
/**
|
|
2848
|
-
* Watch contract events
|
|
2849
|
-
*
|
|
2850
|
-
* @example
|
|
2851
|
-
* // Watch all Transfer events
|
|
2852
|
-
* const unwatch = contract.watch.Transfer((event) => {
|
|
2853
|
-
* console.log('Transfer:', event);
|
|
2854
|
-
* });
|
|
2855
|
-
*
|
|
2856
|
-
* // Stop watching
|
|
2857
|
-
* unwatch();
|
|
2858
|
-
*/
|
|
2859
|
-
get watch() {
|
|
2860
|
-
return {
|
|
2861
|
-
/**
|
|
2862
|
-
* Watch DepositAutoRefunded events
|
|
2863
|
-
* @param callback Function to call when event is emitted
|
|
2864
|
-
* @param filter Optional filter for indexed parameters
|
|
2865
|
-
* @returns Unwatch function to stop listening
|
|
2866
|
-
*/
|
|
2867
|
-
DepositAutoRefunded: (callback, filter) => {
|
|
2868
|
-
return this.publicClient.watchContractEvent({
|
|
2869
|
-
address: this.contractAddress,
|
|
2870
|
-
abi: exports.Vault_jsonAbi,
|
|
2871
|
-
eventName: 'DepositAutoRefunded',
|
|
2872
|
-
args: filter,
|
|
2873
|
-
onLogs: (logs) => {
|
|
2874
|
-
logs.forEach((log) => {
|
|
2875
|
-
callback(log.args);
|
|
2876
|
-
});
|
|
2877
|
-
},
|
|
2878
|
-
});
|
|
2879
|
-
},
|
|
2880
|
-
/**
|
|
2881
|
-
* Watch DepositCancelled events
|
|
2882
|
-
* @param callback Function to call when event is emitted
|
|
2883
|
-
* @param filter Optional filter for indexed parameters
|
|
2884
|
-
* @returns Unwatch function to stop listening
|
|
2885
|
-
*/
|
|
2886
|
-
DepositCancelled: (callback, filter) => {
|
|
2887
|
-
return this.publicClient.watchContractEvent({
|
|
2888
|
-
address: this.contractAddress,
|
|
2889
|
-
abi: exports.Vault_jsonAbi,
|
|
2890
|
-
eventName: 'DepositCancelled',
|
|
2891
|
-
args: filter,
|
|
2892
|
-
onLogs: (logs) => {
|
|
2893
|
-
logs.forEach((log) => {
|
|
2894
|
-
callback(log.args);
|
|
2895
|
-
});
|
|
2896
|
-
},
|
|
2897
|
-
});
|
|
2898
|
-
},
|
|
2899
|
-
/**
|
|
2900
|
-
* Watch DepositRequested events
|
|
2901
|
-
* @param callback Function to call when event is emitted
|
|
2902
|
-
* @param filter Optional filter for indexed parameters
|
|
2903
|
-
* @returns Unwatch function to stop listening
|
|
2904
|
-
*/
|
|
2905
|
-
DepositRequested: (callback, filter) => {
|
|
2906
|
-
return this.publicClient.watchContractEvent({
|
|
2907
|
-
address: this.contractAddress,
|
|
2908
|
-
abi: exports.Vault_jsonAbi,
|
|
2909
|
-
eventName: 'DepositRequested',
|
|
2910
|
-
args: filter,
|
|
2911
|
-
onLogs: (logs) => {
|
|
2912
|
-
logs.forEach((log) => {
|
|
2913
|
-
callback(log.args);
|
|
2914
|
-
});
|
|
2915
|
-
},
|
|
2916
|
-
});
|
|
2917
|
-
},
|
|
2918
|
-
/**
|
|
2919
|
-
* Watch DepositSettled events
|
|
2920
|
-
* @param callback Function to call when event is emitted
|
|
2921
|
-
* @param filter Optional filter for indexed parameters
|
|
2922
|
-
* @returns Unwatch function to stop listening
|
|
2923
|
-
*/
|
|
2924
|
-
DepositSettled: (callback, filter) => {
|
|
2925
|
-
return this.publicClient.watchContractEvent({
|
|
2926
|
-
address: this.contractAddress,
|
|
2927
|
-
abi: exports.Vault_jsonAbi,
|
|
2928
|
-
eventName: 'DepositSettled',
|
|
2929
|
-
args: filter,
|
|
2930
|
-
onLogs: (logs) => {
|
|
2931
|
-
logs.forEach((log) => {
|
|
2932
|
-
callback(log.args);
|
|
2933
|
-
});
|
|
2934
|
-
},
|
|
2935
|
-
});
|
|
2936
|
-
},
|
|
2937
|
-
/**
|
|
2938
|
-
* Watch MaxSettlementBatchSizeSet events
|
|
2939
|
-
* @param callback Function to call when event is emitted
|
|
2940
|
-
* @param filter Optional filter for indexed parameters
|
|
2941
|
-
* @returns Unwatch function to stop listening
|
|
2942
|
-
*/
|
|
2943
|
-
MaxSettlementBatchSizeSet: (callback) => {
|
|
2944
|
-
return this.publicClient.watchContractEvent({
|
|
2945
|
-
address: this.contractAddress,
|
|
2946
|
-
abi: exports.Vault_jsonAbi,
|
|
2947
|
-
eventName: 'MaxSettlementBatchSizeSet',
|
|
2948
|
-
onLogs: (logs) => {
|
|
2949
|
-
logs.forEach((log) => {
|
|
2950
|
-
callback(log.args);
|
|
2951
|
-
});
|
|
2952
|
-
},
|
|
2953
|
-
});
|
|
2954
|
-
},
|
|
2955
|
-
/**
|
|
2956
|
-
* Watch MinDepositAssetsSet events
|
|
2957
|
-
* @param callback Function to call when event is emitted
|
|
2958
|
-
* @param filter Optional filter for indexed parameters
|
|
2959
|
-
* @returns Unwatch function to stop listening
|
|
2960
|
-
*/
|
|
2961
|
-
MinDepositAssetsSet: (callback) => {
|
|
2962
|
-
return this.publicClient.watchContractEvent({
|
|
2963
|
-
address: this.contractAddress,
|
|
2964
|
-
abi: exports.Vault_jsonAbi,
|
|
2965
|
-
eventName: 'MinDepositAssetsSet',
|
|
2966
|
-
onLogs: (logs) => {
|
|
2967
|
-
logs.forEach((log) => {
|
|
2968
|
-
callback(log.args);
|
|
2969
|
-
});
|
|
2970
|
-
},
|
|
2971
|
-
});
|
|
2972
|
-
},
|
|
2973
|
-
/**
|
|
2974
|
-
* Watch OracleSet events
|
|
2975
|
-
* @param callback Function to call when event is emitted
|
|
2976
|
-
* @param filter Optional filter for indexed parameters
|
|
2977
|
-
* @returns Unwatch function to stop listening
|
|
2978
|
-
*/
|
|
2979
|
-
OracleSet: (callback, filter) => {
|
|
2980
|
-
return this.publicClient.watchContractEvent({
|
|
2981
|
-
address: this.contractAddress,
|
|
2982
|
-
abi: exports.Vault_jsonAbi,
|
|
2983
|
-
eventName: 'OracleSet',
|
|
2984
|
-
args: filter,
|
|
2985
|
-
onLogs: (logs) => {
|
|
2986
|
-
logs.forEach((log) => {
|
|
2987
|
-
callback(log.args);
|
|
2988
|
-
});
|
|
2989
|
-
},
|
|
2990
|
-
});
|
|
2991
|
-
},
|
|
2992
|
-
/**
|
|
2993
|
-
* Watch Paused events
|
|
2994
|
-
* @param callback Function to call when event is emitted
|
|
2995
|
-
* @param filter Optional filter for indexed parameters
|
|
2996
|
-
* @returns Unwatch function to stop listening
|
|
2997
|
-
*/
|
|
2998
|
-
Paused: (callback) => {
|
|
2999
|
-
return this.publicClient.watchContractEvent({
|
|
3000
|
-
address: this.contractAddress,
|
|
3001
|
-
abi: exports.Vault_jsonAbi,
|
|
3002
|
-
eventName: 'Paused',
|
|
3003
|
-
onLogs: (logs) => {
|
|
3004
|
-
logs.forEach((log) => {
|
|
3005
|
-
callback(log.args);
|
|
3006
|
-
});
|
|
3007
|
-
},
|
|
3008
|
-
});
|
|
3009
|
-
},
|
|
3010
|
-
/**
|
|
3011
|
-
* Watch PerformanceFeeSet events
|
|
3012
|
-
* @param callback Function to call when event is emitted
|
|
3013
|
-
* @param filter Optional filter for indexed parameters
|
|
3014
|
-
* @returns Unwatch function to stop listening
|
|
3015
|
-
*/
|
|
3016
|
-
PerformanceFeeSet: (callback) => {
|
|
3017
|
-
return this.publicClient.watchContractEvent({
|
|
3018
|
-
address: this.contractAddress,
|
|
3019
|
-
abi: exports.Vault_jsonAbi,
|
|
3020
|
-
eventName: 'PerformanceFeeSet',
|
|
3021
|
-
onLogs: (logs) => {
|
|
3022
|
-
logs.forEach((log) => {
|
|
3023
|
-
callback(log.args);
|
|
3024
|
-
});
|
|
3025
|
-
},
|
|
3026
|
-
});
|
|
3027
|
-
},
|
|
3028
|
-
/**
|
|
3029
|
-
* Watch Rebalanced events
|
|
3030
|
-
* @param callback Function to call when event is emitted
|
|
3031
|
-
* @param filter Optional filter for indexed parameters
|
|
3032
|
-
* @returns Unwatch function to stop listening
|
|
3033
|
-
*/
|
|
3034
|
-
Rebalanced: (callback) => {
|
|
3035
|
-
return this.publicClient.watchContractEvent({
|
|
3036
|
-
address: this.contractAddress,
|
|
3037
|
-
abi: exports.Vault_jsonAbi,
|
|
3038
|
-
eventName: 'Rebalanced',
|
|
3039
|
-
onLogs: (logs) => {
|
|
3040
|
-
logs.forEach((log) => {
|
|
3041
|
-
callback(log.args);
|
|
3042
|
-
});
|
|
3043
|
-
},
|
|
3044
|
-
});
|
|
3045
|
-
},
|
|
3046
|
-
/**
|
|
3047
|
-
* Watch RoleAdminChanged events
|
|
3048
|
-
* @param callback Function to call when event is emitted
|
|
3049
|
-
* @param filter Optional filter for indexed parameters
|
|
3050
|
-
* @returns Unwatch function to stop listening
|
|
3051
|
-
*/
|
|
3052
|
-
RoleAdminChanged: (callback, filter) => {
|
|
3053
|
-
return this.publicClient.watchContractEvent({
|
|
3054
|
-
address: this.contractAddress,
|
|
3055
|
-
abi: exports.Vault_jsonAbi,
|
|
3056
|
-
eventName: 'RoleAdminChanged',
|
|
3057
|
-
args: filter,
|
|
3058
|
-
onLogs: (logs) => {
|
|
3059
|
-
logs.forEach((log) => {
|
|
3060
|
-
callback(log.args);
|
|
3061
|
-
});
|
|
3062
|
-
},
|
|
3063
|
-
});
|
|
3064
|
-
},
|
|
3065
|
-
/**
|
|
3066
|
-
* Watch RoleGranted events
|
|
3067
|
-
* @param callback Function to call when event is emitted
|
|
3068
|
-
* @param filter Optional filter for indexed parameters
|
|
3069
|
-
* @returns Unwatch function to stop listening
|
|
3070
|
-
*/
|
|
3071
|
-
RoleGranted: (callback, filter) => {
|
|
3072
|
-
return this.publicClient.watchContractEvent({
|
|
3073
|
-
address: this.contractAddress,
|
|
3074
|
-
abi: exports.Vault_jsonAbi,
|
|
3075
|
-
eventName: 'RoleGranted',
|
|
3076
|
-
args: filter,
|
|
3077
|
-
onLogs: (logs) => {
|
|
3078
|
-
logs.forEach((log) => {
|
|
3079
|
-
callback(log.args);
|
|
3080
|
-
});
|
|
3081
|
-
},
|
|
3082
|
-
});
|
|
3083
|
-
},
|
|
3084
|
-
/**
|
|
3085
|
-
* Watch RoleRevoked events
|
|
3086
|
-
* @param callback Function to call when event is emitted
|
|
3087
|
-
* @param filter Optional filter for indexed parameters
|
|
3088
|
-
* @returns Unwatch function to stop listening
|
|
3089
|
-
*/
|
|
3090
|
-
RoleRevoked: (callback, filter) => {
|
|
3091
|
-
return this.publicClient.watchContractEvent({
|
|
3092
|
-
address: this.contractAddress,
|
|
3093
|
-
abi: exports.Vault_jsonAbi,
|
|
3094
|
-
eventName: 'RoleRevoked',
|
|
3095
|
-
args: filter,
|
|
3096
|
-
onLogs: (logs) => {
|
|
3097
|
-
logs.forEach((log) => {
|
|
3098
|
-
callback(log.args);
|
|
3099
|
-
});
|
|
3100
|
-
},
|
|
3101
|
-
});
|
|
3102
|
-
},
|
|
3103
|
-
/**
|
|
3104
|
-
* Watch Settled events
|
|
3105
|
-
* @param callback Function to call when event is emitted
|
|
3106
|
-
* @param filter Optional filter for indexed parameters
|
|
3107
|
-
* @returns Unwatch function to stop listening
|
|
3108
|
-
*/
|
|
3109
|
-
Settled: (callback) => {
|
|
3110
|
-
return this.publicClient.watchContractEvent({
|
|
3111
|
-
address: this.contractAddress,
|
|
3112
|
-
abi: exports.Vault_jsonAbi,
|
|
3113
|
-
eventName: 'Settled',
|
|
3114
|
-
onLogs: (logs) => {
|
|
3115
|
-
logs.forEach((log) => {
|
|
3116
|
-
callback(log.args);
|
|
3117
|
-
});
|
|
3118
|
-
},
|
|
3119
|
-
});
|
|
3120
|
-
},
|
|
3121
|
-
/**
|
|
3122
|
-
* Watch SettlementFeeSet events
|
|
3123
|
-
* @param callback Function to call when event is emitted
|
|
3124
|
-
* @param filter Optional filter for indexed parameters
|
|
3125
|
-
* @returns Unwatch function to stop listening
|
|
3126
|
-
*/
|
|
3127
|
-
SettlementFeeSet: (callback) => {
|
|
3128
|
-
return this.publicClient.watchContractEvent({
|
|
3129
|
-
address: this.contractAddress,
|
|
3130
|
-
abi: exports.Vault_jsonAbi,
|
|
3131
|
-
eventName: 'SettlementFeeSet',
|
|
3132
|
-
onLogs: (logs) => {
|
|
3133
|
-
logs.forEach((log) => {
|
|
3134
|
-
callback(log.args);
|
|
3135
|
-
});
|
|
3136
|
-
},
|
|
3137
|
-
});
|
|
3138
|
-
},
|
|
3139
|
-
/**
|
|
3140
|
-
* Watch TargetAllowed events
|
|
3141
|
-
* @param callback Function to call when event is emitted
|
|
3142
|
-
* @param filter Optional filter for indexed parameters
|
|
3143
|
-
* @returns Unwatch function to stop listening
|
|
3144
|
-
*/
|
|
3145
|
-
TargetAllowed: (callback, filter) => {
|
|
3146
|
-
return this.publicClient.watchContractEvent({
|
|
3147
|
-
address: this.contractAddress,
|
|
3148
|
-
abi: exports.Vault_jsonAbi,
|
|
3149
|
-
eventName: 'TargetAllowed',
|
|
3150
|
-
args: filter,
|
|
3151
|
-
onLogs: (logs) => {
|
|
3152
|
-
logs.forEach((log) => {
|
|
3153
|
-
callback(log.args);
|
|
3154
|
-
});
|
|
3155
|
-
},
|
|
3156
|
-
});
|
|
3157
|
-
},
|
|
3158
|
-
/**
|
|
3159
|
-
* Watch TrackedTokenAdded events
|
|
3160
|
-
* @param callback Function to call when event is emitted
|
|
3161
|
-
* @param filter Optional filter for indexed parameters
|
|
3162
|
-
* @returns Unwatch function to stop listening
|
|
3163
|
-
*/
|
|
3164
|
-
TrackedTokenAdded: (callback, filter) => {
|
|
3165
|
-
return this.publicClient.watchContractEvent({
|
|
3166
|
-
address: this.contractAddress,
|
|
3167
|
-
abi: exports.Vault_jsonAbi,
|
|
3168
|
-
eventName: 'TrackedTokenAdded',
|
|
3169
|
-
args: filter,
|
|
3170
|
-
onLogs: (logs) => {
|
|
3171
|
-
logs.forEach((log) => {
|
|
3172
|
-
callback(log.args);
|
|
3173
|
-
});
|
|
3174
|
-
},
|
|
3175
|
-
});
|
|
3176
|
-
},
|
|
3177
|
-
/**
|
|
3178
|
-
* Watch TrackedTokenRemoved events
|
|
3179
|
-
* @param callback Function to call when event is emitted
|
|
3180
|
-
* @param filter Optional filter for indexed parameters
|
|
3181
|
-
* @returns Unwatch function to stop listening
|
|
3182
|
-
*/
|
|
3183
|
-
TrackedTokenRemoved: (callback, filter) => {
|
|
3184
|
-
return this.publicClient.watchContractEvent({
|
|
3185
|
-
address: this.contractAddress,
|
|
3186
|
-
abi: exports.Vault_jsonAbi,
|
|
3187
|
-
eventName: 'TrackedTokenRemoved',
|
|
3188
|
-
args: filter,
|
|
3189
|
-
onLogs: (logs) => {
|
|
3190
|
-
logs.forEach((log) => {
|
|
3191
|
-
callback(log.args);
|
|
3192
|
-
});
|
|
3193
|
-
},
|
|
3194
|
-
});
|
|
3195
|
-
},
|
|
3196
|
-
/**
|
|
3197
|
-
* Watch Unpaused events
|
|
3198
|
-
* @param callback Function to call when event is emitted
|
|
3199
|
-
* @param filter Optional filter for indexed parameters
|
|
3200
|
-
* @returns Unwatch function to stop listening
|
|
3201
|
-
*/
|
|
3202
|
-
Unpaused: (callback) => {
|
|
3203
|
-
return this.publicClient.watchContractEvent({
|
|
3204
|
-
address: this.contractAddress,
|
|
3205
|
-
abi: exports.Vault_jsonAbi,
|
|
3206
|
-
eventName: 'Unpaused',
|
|
3207
|
-
onLogs: (logs) => {
|
|
3208
|
-
logs.forEach((log) => {
|
|
3209
|
-
callback(log.args);
|
|
3210
|
-
});
|
|
3211
|
-
},
|
|
3212
|
-
});
|
|
3213
|
-
},
|
|
3214
|
-
/**
|
|
3215
|
-
* Watch WithdrawCancelled events
|
|
3216
|
-
* @param callback Function to call when event is emitted
|
|
3217
|
-
* @param filter Optional filter for indexed parameters
|
|
3218
|
-
* @returns Unwatch function to stop listening
|
|
3219
|
-
*/
|
|
3220
|
-
WithdrawCancelled: (callback, filter) => {
|
|
3221
|
-
return this.publicClient.watchContractEvent({
|
|
3222
|
-
address: this.contractAddress,
|
|
3223
|
-
abi: exports.Vault_jsonAbi,
|
|
3224
|
-
eventName: 'WithdrawCancelled',
|
|
3225
|
-
args: filter,
|
|
3226
|
-
onLogs: (logs) => {
|
|
3227
|
-
logs.forEach((log) => {
|
|
3228
|
-
callback(log.args);
|
|
3229
|
-
});
|
|
3230
|
-
},
|
|
3231
|
-
});
|
|
144
|
+
"stateMutability": "payable",
|
|
145
|
+
"type": "receive"
|
|
146
|
+
}
|
|
147
|
+
];
|
|
148
|
+
/**
|
|
149
|
+
* Vault_json Contract Class
|
|
150
|
+
*
|
|
151
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* ```typescript
|
|
155
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
156
|
+
* import { mainnet } from 'viem/chains';
|
|
157
|
+
* import { Vault_json } from 'Vault_json';
|
|
158
|
+
*
|
|
159
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
160
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
161
|
+
*
|
|
162
|
+
* const contract = new Vault_json('0x...', { publicClient, walletClient });
|
|
163
|
+
*
|
|
164
|
+
* // Read functions
|
|
165
|
+
* const result = await contract.balanceOf('0x...');
|
|
166
|
+
*
|
|
167
|
+
* // Write functions
|
|
168
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
169
|
+
*
|
|
170
|
+
* // Simulate transactions (dry-run)
|
|
171
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
172
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
173
|
+
*
|
|
174
|
+
* // Watch events
|
|
175
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
176
|
+
* console.log('Transfer event:', event);
|
|
177
|
+
* });
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
class Vault_json {
|
|
181
|
+
constructor(address, clients) {
|
|
182
|
+
this.contractAddress = address;
|
|
183
|
+
this.publicClient = clients.publicClient;
|
|
184
|
+
this.contract = (0, viem_1.getContract)({
|
|
185
|
+
address,
|
|
186
|
+
abi: exports.Vault_jsonAbi,
|
|
187
|
+
client: {
|
|
188
|
+
public: clients.publicClient,
|
|
189
|
+
wallet: clients.walletClient,
|
|
3232
190
|
},
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Get the contract address
|
|
195
|
+
*/
|
|
196
|
+
get address() {
|
|
197
|
+
return this.contractAddress;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Get the underlying viem contract instance
|
|
201
|
+
*/
|
|
202
|
+
getContract() {
|
|
203
|
+
return this.contract;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* SEAL
|
|
207
|
+
* view
|
|
208
|
+
*/
|
|
209
|
+
async SEAL() {
|
|
210
|
+
return this.contract.read.SEAL();
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* balance
|
|
214
|
+
* view
|
|
215
|
+
*/
|
|
216
|
+
async balance() {
|
|
217
|
+
return this.contract.read.balance();
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* found
|
|
221
|
+
* view
|
|
222
|
+
*/
|
|
223
|
+
async found() {
|
|
224
|
+
return this.contract.read.found();
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* rules
|
|
228
|
+
* pure
|
|
229
|
+
*/
|
|
230
|
+
async rules() {
|
|
231
|
+
return this.contract.read.rules();
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* state
|
|
235
|
+
* view
|
|
236
|
+
*/
|
|
237
|
+
async state() {
|
|
238
|
+
return this.contract.read.state();
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* unlock
|
|
242
|
+
* nonpayable
|
|
243
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
244
|
+
*/
|
|
245
|
+
async unlock(secret, to, options) {
|
|
246
|
+
if (!this.contract.write) {
|
|
247
|
+
throw new Error('Wallet client is required for write operations');
|
|
248
|
+
}
|
|
249
|
+
return this.contract.write.unlock([secret, to], options);
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
253
|
+
*
|
|
254
|
+
* @example
|
|
255
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
256
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
257
|
+
* console.log('Would succeed:', result.result);
|
|
258
|
+
*/
|
|
259
|
+
get simulate() {
|
|
260
|
+
const contract = this.contract;
|
|
261
|
+
if (!contract.simulate) {
|
|
262
|
+
throw new Error('Public client is required for simulation');
|
|
263
|
+
}
|
|
264
|
+
return {
|
|
3233
265
|
/**
|
|
3234
|
-
*
|
|
3235
|
-
*
|
|
3236
|
-
* @param
|
|
3237
|
-
* @returns Unwatch function to stop listening
|
|
266
|
+
* Simulate unlock
|
|
267
|
+
* Returns gas estimate and result without sending transaction
|
|
268
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3238
269
|
*/
|
|
3239
|
-
|
|
3240
|
-
return
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
270
|
+
async unlock(secret, to, options) {
|
|
271
|
+
return contract.simulate.unlock([secret, to], options);
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Watch contract events
|
|
277
|
+
*
|
|
278
|
+
* @example
|
|
279
|
+
* // Watch all Transfer events
|
|
280
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
281
|
+
* console.log('Transfer:', event);
|
|
282
|
+
* });
|
|
283
|
+
*
|
|
284
|
+
* // Stop watching
|
|
285
|
+
* unwatch();
|
|
286
|
+
*/
|
|
287
|
+
get watch() {
|
|
288
|
+
return {
|
|
3252
289
|
/**
|
|
3253
|
-
* Watch
|
|
290
|
+
* Watch Found events
|
|
3254
291
|
* @param callback Function to call when event is emitted
|
|
3255
292
|
* @param filter Optional filter for indexed parameters
|
|
3256
293
|
* @returns Unwatch function to stop listening
|
|
3257
294
|
*/
|
|
3258
|
-
|
|
295
|
+
Found: (callback, filter) => {
|
|
3259
296
|
return this.publicClient.watchContractEvent({
|
|
3260
297
|
address: this.contractAddress,
|
|
3261
298
|
abi: exports.Vault_jsonAbi,
|
|
3262
|
-
eventName: '
|
|
299
|
+
eventName: 'Found',
|
|
3263
300
|
args: filter,
|
|
3264
301
|
onLogs: (logs) => {
|
|
3265
302
|
logs.forEach((log) => {
|
|
@@ -3269,16 +306,16 @@ class Vault_json {
|
|
|
3269
306
|
});
|
|
3270
307
|
},
|
|
3271
308
|
/**
|
|
3272
|
-
* Watch
|
|
309
|
+
* Watch Funded events
|
|
3273
310
|
* @param callback Function to call when event is emitted
|
|
3274
311
|
* @param filter Optional filter for indexed parameters
|
|
3275
312
|
* @returns Unwatch function to stop listening
|
|
3276
313
|
*/
|
|
3277
|
-
|
|
314
|
+
Funded: (callback, filter) => {
|
|
3278
315
|
return this.publicClient.watchContractEvent({
|
|
3279
316
|
address: this.contractAddress,
|
|
3280
317
|
abi: exports.Vault_jsonAbi,
|
|
3281
|
-
eventName: '
|
|
318
|
+
eventName: 'Funded',
|
|
3282
319
|
args: filter,
|
|
3283
320
|
onLogs: (logs) => {
|
|
3284
321
|
logs.forEach((log) => {
|