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