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