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