@gitmyabi/eusd 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/contracts/{BoringVault_json.d.ts → EUSD_json.d.ts} +174 -568
- package/contracts/{BoringVault_json.js → EUSD_json.js} +196 -596
- package/contracts/{BoringVault_json.ts → EUSD_json.ts} +216 -711
- package/contracts/index.d.ts +2 -2
- package/contracts/index.js +4 -4
- package/contracts/index.ts +2 -2
- package/package.json +3 -3
|
@@ -2,64 +2,22 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
|
|
|
2
2
|
import { getContract } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* EUSD_json ABI
|
|
6
6
|
*
|
|
7
7
|
* This ABI is typed using viem's type system for full type safety.
|
|
8
8
|
*/
|
|
9
|
-
export const
|
|
9
|
+
export const EUSD_jsonAbi = [
|
|
10
10
|
{
|
|
11
11
|
"inputs": [
|
|
12
12
|
{
|
|
13
13
|
"internalType": "address",
|
|
14
|
-
"name": "
|
|
14
|
+
"name": "_config",
|
|
15
15
|
"type": "address"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"internalType": "string",
|
|
19
|
-
"name": "_name",
|
|
20
|
-
"type": "string"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"internalType": "string",
|
|
24
|
-
"name": "_symbol",
|
|
25
|
-
"type": "string"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"internalType": "uint8",
|
|
29
|
-
"name": "_decimals",
|
|
30
|
-
"type": "uint8"
|
|
31
16
|
}
|
|
32
17
|
],
|
|
33
18
|
"stateMutability": "nonpayable",
|
|
34
19
|
"type": "constructor"
|
|
35
20
|
},
|
|
36
|
-
{
|
|
37
|
-
"inputs": [
|
|
38
|
-
{
|
|
39
|
-
"internalType": "address",
|
|
40
|
-
"name": "target",
|
|
41
|
-
"type": "address"
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
"name": "AddressEmptyCode",
|
|
45
|
-
"type": "error"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"inputs": [
|
|
49
|
-
{
|
|
50
|
-
"internalType": "address",
|
|
51
|
-
"name": "account",
|
|
52
|
-
"type": "address"
|
|
53
|
-
}
|
|
54
|
-
],
|
|
55
|
-
"name": "AddressInsufficientBalance",
|
|
56
|
-
"type": "error"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"inputs": [],
|
|
60
|
-
"name": "FailedInnerCall",
|
|
61
|
-
"type": "error"
|
|
62
|
-
},
|
|
63
21
|
{
|
|
64
22
|
"anonymous": false,
|
|
65
23
|
"inputs": [
|
|
@@ -78,7 +36,7 @@ export const BoringVault_jsonAbi = [
|
|
|
78
36
|
{
|
|
79
37
|
"indexed": false,
|
|
80
38
|
"internalType": "uint256",
|
|
81
|
-
"name": "
|
|
39
|
+
"name": "value",
|
|
82
40
|
"type": "uint256"
|
|
83
41
|
}
|
|
84
42
|
],
|
|
@@ -91,54 +49,29 @@ export const BoringVault_jsonAbi = [
|
|
|
91
49
|
{
|
|
92
50
|
"indexed": true,
|
|
93
51
|
"internalType": "address",
|
|
94
|
-
"name": "
|
|
95
|
-
"type": "address"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
"indexed": true,
|
|
99
|
-
"internalType": "contract Authority",
|
|
100
|
-
"name": "newAuthority",
|
|
101
|
-
"type": "address"
|
|
102
|
-
}
|
|
103
|
-
],
|
|
104
|
-
"name": "AuthorityUpdated",
|
|
105
|
-
"type": "event"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"anonymous": false,
|
|
109
|
-
"inputs": [
|
|
110
|
-
{
|
|
111
|
-
"indexed": true,
|
|
112
|
-
"internalType": "address",
|
|
113
|
-
"name": "from",
|
|
114
|
-
"type": "address"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"indexed": true,
|
|
118
|
-
"internalType": "address",
|
|
119
|
-
"name": "asset",
|
|
52
|
+
"name": "account",
|
|
120
53
|
"type": "address"
|
|
121
54
|
},
|
|
122
55
|
{
|
|
123
56
|
"indexed": false,
|
|
124
57
|
"internalType": "uint256",
|
|
125
|
-
"name": "
|
|
58
|
+
"name": "preRebaseTokenAmount",
|
|
126
59
|
"type": "uint256"
|
|
127
60
|
},
|
|
128
61
|
{
|
|
129
|
-
"indexed":
|
|
130
|
-
"internalType": "
|
|
131
|
-
"name": "
|
|
132
|
-
"type": "
|
|
62
|
+
"indexed": false,
|
|
63
|
+
"internalType": "uint256",
|
|
64
|
+
"name": "postRebaseTokenAmount",
|
|
65
|
+
"type": "uint256"
|
|
133
66
|
},
|
|
134
67
|
{
|
|
135
68
|
"indexed": false,
|
|
136
69
|
"internalType": "uint256",
|
|
137
|
-
"name": "
|
|
70
|
+
"name": "sharesAmount",
|
|
138
71
|
"type": "uint256"
|
|
139
72
|
}
|
|
140
73
|
],
|
|
141
|
-
"name": "
|
|
74
|
+
"name": "SharesBurnt",
|
|
142
75
|
"type": "event"
|
|
143
76
|
},
|
|
144
77
|
{
|
|
@@ -147,54 +80,23 @@ export const BoringVault_jsonAbi = [
|
|
|
147
80
|
{
|
|
148
81
|
"indexed": true,
|
|
149
82
|
"internalType": "address",
|
|
150
|
-
"name": "
|
|
83
|
+
"name": "from",
|
|
151
84
|
"type": "address"
|
|
152
85
|
},
|
|
153
86
|
{
|
|
154
87
|
"indexed": true,
|
|
155
88
|
"internalType": "address",
|
|
156
|
-
"name": "
|
|
157
|
-
"type": "address"
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"indexed": false,
|
|
161
|
-
"internalType": "uint256",
|
|
162
|
-
"name": "amount",
|
|
163
|
-
"type": "uint256"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
"indexed": true,
|
|
167
|
-
"internalType": "address",
|
|
168
|
-
"name": "from",
|
|
89
|
+
"name": "to",
|
|
169
90
|
"type": "address"
|
|
170
91
|
},
|
|
171
92
|
{
|
|
172
93
|
"indexed": false,
|
|
173
94
|
"internalType": "uint256",
|
|
174
|
-
"name": "
|
|
95
|
+
"name": "value",
|
|
175
96
|
"type": "uint256"
|
|
176
97
|
}
|
|
177
98
|
],
|
|
178
|
-
"name": "
|
|
179
|
-
"type": "event"
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
"anonymous": false,
|
|
183
|
-
"inputs": [
|
|
184
|
-
{
|
|
185
|
-
"indexed": true,
|
|
186
|
-
"internalType": "address",
|
|
187
|
-
"name": "user",
|
|
188
|
-
"type": "address"
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
"indexed": true,
|
|
192
|
-
"internalType": "address",
|
|
193
|
-
"name": "newOwner",
|
|
194
|
-
"type": "address"
|
|
195
|
-
}
|
|
196
|
-
],
|
|
197
|
-
"name": "OwnershipTransferred",
|
|
99
|
+
"name": "Transfer",
|
|
198
100
|
"type": "event"
|
|
199
101
|
},
|
|
200
102
|
{
|
|
@@ -215,36 +117,23 @@ export const BoringVault_jsonAbi = [
|
|
|
215
117
|
{
|
|
216
118
|
"indexed": false,
|
|
217
119
|
"internalType": "uint256",
|
|
218
|
-
"name": "
|
|
120
|
+
"name": "sharesValue",
|
|
219
121
|
"type": "uint256"
|
|
220
122
|
}
|
|
221
123
|
],
|
|
222
|
-
"name": "
|
|
124
|
+
"name": "TransferShares",
|
|
223
125
|
"type": "event"
|
|
224
126
|
},
|
|
225
|
-
{
|
|
226
|
-
"inputs": [],
|
|
227
|
-
"name": "DOMAIN_SEPARATOR",
|
|
228
|
-
"outputs": [
|
|
229
|
-
{
|
|
230
|
-
"internalType": "bytes32",
|
|
231
|
-
"name": "",
|
|
232
|
-
"type": "bytes32"
|
|
233
|
-
}
|
|
234
|
-
],
|
|
235
|
-
"stateMutability": "view",
|
|
236
|
-
"type": "function"
|
|
237
|
-
},
|
|
238
127
|
{
|
|
239
128
|
"inputs": [
|
|
240
129
|
{
|
|
241
130
|
"internalType": "address",
|
|
242
|
-
"name": "",
|
|
131
|
+
"name": "_owner",
|
|
243
132
|
"type": "address"
|
|
244
133
|
},
|
|
245
134
|
{
|
|
246
135
|
"internalType": "address",
|
|
247
|
-
"name": "",
|
|
136
|
+
"name": "_spender",
|
|
248
137
|
"type": "address"
|
|
249
138
|
}
|
|
250
139
|
],
|
|
@@ -263,12 +152,12 @@ export const BoringVault_jsonAbi = [
|
|
|
263
152
|
"inputs": [
|
|
264
153
|
{
|
|
265
154
|
"internalType": "address",
|
|
266
|
-
"name": "
|
|
155
|
+
"name": "_spender",
|
|
267
156
|
"type": "address"
|
|
268
157
|
},
|
|
269
158
|
{
|
|
270
159
|
"internalType": "uint256",
|
|
271
|
-
"name": "
|
|
160
|
+
"name": "_amount",
|
|
272
161
|
"type": "uint256"
|
|
273
162
|
}
|
|
274
163
|
],
|
|
@@ -283,24 +172,11 @@ export const BoringVault_jsonAbi = [
|
|
|
283
172
|
"stateMutability": "nonpayable",
|
|
284
173
|
"type": "function"
|
|
285
174
|
},
|
|
286
|
-
{
|
|
287
|
-
"inputs": [],
|
|
288
|
-
"name": "authority",
|
|
289
|
-
"outputs": [
|
|
290
|
-
{
|
|
291
|
-
"internalType": "contract Authority",
|
|
292
|
-
"name": "",
|
|
293
|
-
"type": "address"
|
|
294
|
-
}
|
|
295
|
-
],
|
|
296
|
-
"stateMutability": "view",
|
|
297
|
-
"type": "function"
|
|
298
|
-
},
|
|
299
175
|
{
|
|
300
176
|
"inputs": [
|
|
301
177
|
{
|
|
302
178
|
"internalType": "address",
|
|
303
|
-
"name": "",
|
|
179
|
+
"name": "_account",
|
|
304
180
|
"type": "address"
|
|
305
181
|
}
|
|
306
182
|
],
|
|
@@ -315,49 +191,27 @@ export const BoringVault_jsonAbi = [
|
|
|
315
191
|
"stateMutability": "view",
|
|
316
192
|
"type": "function"
|
|
317
193
|
},
|
|
318
|
-
{
|
|
319
|
-
"inputs": [],
|
|
320
|
-
"name": "decimals",
|
|
321
|
-
"outputs": [
|
|
322
|
-
{
|
|
323
|
-
"internalType": "uint8",
|
|
324
|
-
"name": "",
|
|
325
|
-
"type": "uint8"
|
|
326
|
-
}
|
|
327
|
-
],
|
|
328
|
-
"stateMutability": "view",
|
|
329
|
-
"type": "function"
|
|
330
|
-
},
|
|
331
194
|
{
|
|
332
195
|
"inputs": [
|
|
333
196
|
{
|
|
334
197
|
"internalType": "address",
|
|
335
|
-
"name": "
|
|
336
|
-
"type": "address"
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
"internalType": "contract ERC20",
|
|
340
|
-
"name": "asset",
|
|
198
|
+
"name": "_account",
|
|
341
199
|
"type": "address"
|
|
342
200
|
},
|
|
343
201
|
{
|
|
344
202
|
"internalType": "uint256",
|
|
345
|
-
"name": "
|
|
203
|
+
"name": "_burnAmount",
|
|
346
204
|
"type": "uint256"
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
"type": "address"
|
|
352
|
-
},
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"name": "burn",
|
|
208
|
+
"outputs": [
|
|
353
209
|
{
|
|
354
210
|
"internalType": "uint256",
|
|
355
|
-
"name": "
|
|
211
|
+
"name": "newTotalShares",
|
|
356
212
|
"type": "uint256"
|
|
357
213
|
}
|
|
358
214
|
],
|
|
359
|
-
"name": "enter",
|
|
360
|
-
"outputs": [],
|
|
361
215
|
"stateMutability": "nonpayable",
|
|
362
216
|
"type": "function"
|
|
363
217
|
},
|
|
@@ -365,41 +219,32 @@ export const BoringVault_jsonAbi = [
|
|
|
365
219
|
"inputs": [
|
|
366
220
|
{
|
|
367
221
|
"internalType": "address",
|
|
368
|
-
"name": "
|
|
369
|
-
"type": "address"
|
|
370
|
-
},
|
|
371
|
-
{
|
|
372
|
-
"internalType": "contract ERC20",
|
|
373
|
-
"name": "asset",
|
|
222
|
+
"name": "_account",
|
|
374
223
|
"type": "address"
|
|
375
224
|
},
|
|
376
225
|
{
|
|
377
226
|
"internalType": "uint256",
|
|
378
|
-
"name": "
|
|
227
|
+
"name": "_sharesAmount",
|
|
379
228
|
"type": "uint256"
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
"type": "address"
|
|
385
|
-
},
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
"name": "burnShares",
|
|
232
|
+
"outputs": [
|
|
386
233
|
{
|
|
387
234
|
"internalType": "uint256",
|
|
388
|
-
"name": "
|
|
235
|
+
"name": "newTotalShares",
|
|
389
236
|
"type": "uint256"
|
|
390
237
|
}
|
|
391
238
|
],
|
|
392
|
-
"name": "exit",
|
|
393
|
-
"outputs": [],
|
|
394
239
|
"stateMutability": "nonpayable",
|
|
395
240
|
"type": "function"
|
|
396
241
|
},
|
|
397
242
|
{
|
|
398
243
|
"inputs": [],
|
|
399
|
-
"name": "
|
|
244
|
+
"name": "configurator",
|
|
400
245
|
"outputs": [
|
|
401
246
|
{
|
|
402
|
-
"internalType": "contract
|
|
247
|
+
"internalType": "contract Iconfigurator",
|
|
403
248
|
"name": "",
|
|
404
249
|
"type": "address"
|
|
405
250
|
}
|
|
@@ -408,85 +253,51 @@ export const BoringVault_jsonAbi = [
|
|
|
408
253
|
"type": "function"
|
|
409
254
|
},
|
|
410
255
|
{
|
|
411
|
-
"inputs": [
|
|
412
|
-
|
|
413
|
-
"internalType": "address[]",
|
|
414
|
-
"name": "targets",
|
|
415
|
-
"type": "address[]"
|
|
416
|
-
},
|
|
417
|
-
{
|
|
418
|
-
"internalType": "bytes[]",
|
|
419
|
-
"name": "data",
|
|
420
|
-
"type": "bytes[]"
|
|
421
|
-
},
|
|
422
|
-
{
|
|
423
|
-
"internalType": "uint256[]",
|
|
424
|
-
"name": "values",
|
|
425
|
-
"type": "uint256[]"
|
|
426
|
-
}
|
|
427
|
-
],
|
|
428
|
-
"name": "manage",
|
|
256
|
+
"inputs": [],
|
|
257
|
+
"name": "decimals",
|
|
429
258
|
"outputs": [
|
|
430
259
|
{
|
|
431
|
-
"internalType": "
|
|
432
|
-
"name": "
|
|
433
|
-
"type": "
|
|
260
|
+
"internalType": "uint8",
|
|
261
|
+
"name": "",
|
|
262
|
+
"type": "uint8"
|
|
434
263
|
}
|
|
435
264
|
],
|
|
436
|
-
"stateMutability": "
|
|
265
|
+
"stateMutability": "pure",
|
|
437
266
|
"type": "function"
|
|
438
267
|
},
|
|
439
268
|
{
|
|
440
269
|
"inputs": [
|
|
441
270
|
{
|
|
442
271
|
"internalType": "address",
|
|
443
|
-
"name": "
|
|
272
|
+
"name": "spender",
|
|
444
273
|
"type": "address"
|
|
445
274
|
},
|
|
446
|
-
{
|
|
447
|
-
"internalType": "bytes",
|
|
448
|
-
"name": "data",
|
|
449
|
-
"type": "bytes"
|
|
450
|
-
},
|
|
451
275
|
{
|
|
452
276
|
"internalType": "uint256",
|
|
453
|
-
"name": "
|
|
277
|
+
"name": "subtractedValue",
|
|
454
278
|
"type": "uint256"
|
|
455
279
|
}
|
|
456
280
|
],
|
|
457
|
-
"name": "
|
|
458
|
-
"outputs": [
|
|
459
|
-
{
|
|
460
|
-
"internalType": "bytes",
|
|
461
|
-
"name": "result",
|
|
462
|
-
"type": "bytes"
|
|
463
|
-
}
|
|
464
|
-
],
|
|
465
|
-
"stateMutability": "nonpayable",
|
|
466
|
-
"type": "function"
|
|
467
|
-
},
|
|
468
|
-
{
|
|
469
|
-
"inputs": [],
|
|
470
|
-
"name": "name",
|
|
281
|
+
"name": "decreaseAllowance",
|
|
471
282
|
"outputs": [
|
|
472
283
|
{
|
|
473
|
-
"internalType": "
|
|
284
|
+
"internalType": "bool",
|
|
474
285
|
"name": "",
|
|
475
|
-
"type": "
|
|
286
|
+
"type": "bool"
|
|
476
287
|
}
|
|
477
288
|
],
|
|
478
|
-
"stateMutability": "
|
|
289
|
+
"stateMutability": "nonpayable",
|
|
479
290
|
"type": "function"
|
|
480
291
|
},
|
|
481
292
|
{
|
|
482
293
|
"inputs": [
|
|
483
294
|
{
|
|
484
|
-
"internalType": "
|
|
485
|
-
"name": "",
|
|
486
|
-
"type": "
|
|
295
|
+
"internalType": "uint256",
|
|
296
|
+
"name": "_sharesAmount",
|
|
297
|
+
"type": "uint256"
|
|
487
298
|
}
|
|
488
299
|
],
|
|
489
|
-
"name": "
|
|
300
|
+
"name": "getMintedEUSDByShares",
|
|
490
301
|
"outputs": [
|
|
491
302
|
{
|
|
492
303
|
"internalType": "uint256",
|
|
@@ -499,124 +310,31 @@ export const BoringVault_jsonAbi = [
|
|
|
499
310
|
},
|
|
500
311
|
{
|
|
501
312
|
"inputs": [
|
|
502
|
-
{
|
|
503
|
-
"internalType": "address",
|
|
504
|
-
"name": "",
|
|
505
|
-
"type": "address"
|
|
506
|
-
},
|
|
507
|
-
{
|
|
508
|
-
"internalType": "address",
|
|
509
|
-
"name": "",
|
|
510
|
-
"type": "address"
|
|
511
|
-
},
|
|
512
|
-
{
|
|
513
|
-
"internalType": "uint256[]",
|
|
514
|
-
"name": "",
|
|
515
|
-
"type": "uint256[]"
|
|
516
|
-
},
|
|
517
|
-
{
|
|
518
|
-
"internalType": "uint256[]",
|
|
519
|
-
"name": "",
|
|
520
|
-
"type": "uint256[]"
|
|
521
|
-
},
|
|
522
|
-
{
|
|
523
|
-
"internalType": "bytes",
|
|
524
|
-
"name": "",
|
|
525
|
-
"type": "bytes"
|
|
526
|
-
}
|
|
527
|
-
],
|
|
528
|
-
"name": "onERC1155BatchReceived",
|
|
529
|
-
"outputs": [
|
|
530
|
-
{
|
|
531
|
-
"internalType": "bytes4",
|
|
532
|
-
"name": "",
|
|
533
|
-
"type": "bytes4"
|
|
534
|
-
}
|
|
535
|
-
],
|
|
536
|
-
"stateMutability": "nonpayable",
|
|
537
|
-
"type": "function"
|
|
538
|
-
},
|
|
539
|
-
{
|
|
540
|
-
"inputs": [
|
|
541
|
-
{
|
|
542
|
-
"internalType": "address",
|
|
543
|
-
"name": "",
|
|
544
|
-
"type": "address"
|
|
545
|
-
},
|
|
546
|
-
{
|
|
547
|
-
"internalType": "address",
|
|
548
|
-
"name": "",
|
|
549
|
-
"type": "address"
|
|
550
|
-
},
|
|
551
313
|
{
|
|
552
314
|
"internalType": "uint256",
|
|
553
|
-
"name": "",
|
|
315
|
+
"name": "_EUSDAmount",
|
|
554
316
|
"type": "uint256"
|
|
555
|
-
},
|
|
556
|
-
{
|
|
557
|
-
"internalType": "uint256",
|
|
558
|
-
"name": "",
|
|
559
|
-
"type": "uint256"
|
|
560
|
-
},
|
|
561
|
-
{
|
|
562
|
-
"internalType": "bytes",
|
|
563
|
-
"name": "",
|
|
564
|
-
"type": "bytes"
|
|
565
317
|
}
|
|
566
318
|
],
|
|
567
|
-
"name": "
|
|
319
|
+
"name": "getSharesByMintedEUSD",
|
|
568
320
|
"outputs": [
|
|
569
|
-
{
|
|
570
|
-
"internalType": "bytes4",
|
|
571
|
-
"name": "",
|
|
572
|
-
"type": "bytes4"
|
|
573
|
-
}
|
|
574
|
-
],
|
|
575
|
-
"stateMutability": "nonpayable",
|
|
576
|
-
"type": "function"
|
|
577
|
-
},
|
|
578
|
-
{
|
|
579
|
-
"inputs": [
|
|
580
|
-
{
|
|
581
|
-
"internalType": "address",
|
|
582
|
-
"name": "",
|
|
583
|
-
"type": "address"
|
|
584
|
-
},
|
|
585
|
-
{
|
|
586
|
-
"internalType": "address",
|
|
587
|
-
"name": "",
|
|
588
|
-
"type": "address"
|
|
589
|
-
},
|
|
590
321
|
{
|
|
591
322
|
"internalType": "uint256",
|
|
592
323
|
"name": "",
|
|
593
324
|
"type": "uint256"
|
|
594
|
-
},
|
|
595
|
-
{
|
|
596
|
-
"internalType": "bytes",
|
|
597
|
-
"name": "",
|
|
598
|
-
"type": "bytes"
|
|
599
325
|
}
|
|
600
326
|
],
|
|
601
|
-
"
|
|
602
|
-
"outputs": [
|
|
603
|
-
{
|
|
604
|
-
"internalType": "bytes4",
|
|
605
|
-
"name": "",
|
|
606
|
-
"type": "bytes4"
|
|
607
|
-
}
|
|
608
|
-
],
|
|
609
|
-
"stateMutability": "nonpayable",
|
|
327
|
+
"stateMutability": "view",
|
|
610
328
|
"type": "function"
|
|
611
329
|
},
|
|
612
330
|
{
|
|
613
331
|
"inputs": [],
|
|
614
|
-
"name": "
|
|
332
|
+
"name": "getTotalShares",
|
|
615
333
|
"outputs": [
|
|
616
334
|
{
|
|
617
|
-
"internalType": "
|
|
335
|
+
"internalType": "uint256",
|
|
618
336
|
"name": "",
|
|
619
|
-
"type": "
|
|
337
|
+
"type": "uint256"
|
|
620
338
|
}
|
|
621
339
|
],
|
|
622
340
|
"stateMutability": "view",
|
|
@@ -626,85 +344,77 @@ export const BoringVault_jsonAbi = [
|
|
|
626
344
|
"inputs": [
|
|
627
345
|
{
|
|
628
346
|
"internalType": "address",
|
|
629
|
-
"name": "
|
|
630
|
-
"type": "address"
|
|
631
|
-
},
|
|
632
|
-
{
|
|
633
|
-
"internalType": "address",
|
|
634
|
-
"name": "spender",
|
|
347
|
+
"name": "_spender",
|
|
635
348
|
"type": "address"
|
|
636
349
|
},
|
|
637
350
|
{
|
|
638
351
|
"internalType": "uint256",
|
|
639
|
-
"name": "
|
|
640
|
-
"type": "uint256"
|
|
641
|
-
},
|
|
642
|
-
{
|
|
643
|
-
"internalType": "uint256",
|
|
644
|
-
"name": "deadline",
|
|
352
|
+
"name": "_addedValue",
|
|
645
353
|
"type": "uint256"
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
"type": "uint8"
|
|
651
|
-
},
|
|
652
|
-
{
|
|
653
|
-
"internalType": "bytes32",
|
|
654
|
-
"name": "r",
|
|
655
|
-
"type": "bytes32"
|
|
656
|
-
},
|
|
354
|
+
}
|
|
355
|
+
],
|
|
356
|
+
"name": "increaseAllowance",
|
|
357
|
+
"outputs": [
|
|
657
358
|
{
|
|
658
|
-
"internalType": "
|
|
659
|
-
"name": "
|
|
660
|
-
"type": "
|
|
359
|
+
"internalType": "bool",
|
|
360
|
+
"name": "",
|
|
361
|
+
"type": "bool"
|
|
661
362
|
}
|
|
662
363
|
],
|
|
663
|
-
"name": "permit",
|
|
664
|
-
"outputs": [],
|
|
665
364
|
"stateMutability": "nonpayable",
|
|
666
365
|
"type": "function"
|
|
667
366
|
},
|
|
668
367
|
{
|
|
669
368
|
"inputs": [
|
|
670
369
|
{
|
|
671
|
-
"internalType": "
|
|
672
|
-
"name": "
|
|
370
|
+
"internalType": "address",
|
|
371
|
+
"name": "_recipient",
|
|
673
372
|
"type": "address"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"internalType": "uint256",
|
|
376
|
+
"name": "_mintAmount",
|
|
377
|
+
"type": "uint256"
|
|
378
|
+
}
|
|
379
|
+
],
|
|
380
|
+
"name": "mint",
|
|
381
|
+
"outputs": [
|
|
382
|
+
{
|
|
383
|
+
"internalType": "uint256",
|
|
384
|
+
"name": "newTotalShares",
|
|
385
|
+
"type": "uint256"
|
|
674
386
|
}
|
|
675
387
|
],
|
|
676
|
-
"name": "setAuthority",
|
|
677
|
-
"outputs": [],
|
|
678
388
|
"stateMutability": "nonpayable",
|
|
679
389
|
"type": "function"
|
|
680
390
|
},
|
|
681
391
|
{
|
|
682
|
-
"inputs": [
|
|
392
|
+
"inputs": [],
|
|
393
|
+
"name": "name",
|
|
394
|
+
"outputs": [
|
|
683
395
|
{
|
|
684
|
-
"internalType": "
|
|
685
|
-
"name": "
|
|
686
|
-
"type": "
|
|
396
|
+
"internalType": "string",
|
|
397
|
+
"name": "",
|
|
398
|
+
"type": "string"
|
|
687
399
|
}
|
|
688
400
|
],
|
|
689
|
-
"
|
|
690
|
-
"outputs": [],
|
|
691
|
-
"stateMutability": "nonpayable",
|
|
401
|
+
"stateMutability": "pure",
|
|
692
402
|
"type": "function"
|
|
693
403
|
},
|
|
694
404
|
{
|
|
695
405
|
"inputs": [
|
|
696
406
|
{
|
|
697
|
-
"internalType": "
|
|
698
|
-
"name": "
|
|
699
|
-
"type": "
|
|
407
|
+
"internalType": "address",
|
|
408
|
+
"name": "_account",
|
|
409
|
+
"type": "address"
|
|
700
410
|
}
|
|
701
411
|
],
|
|
702
|
-
"name": "
|
|
412
|
+
"name": "sharesOf",
|
|
703
413
|
"outputs": [
|
|
704
414
|
{
|
|
705
|
-
"internalType": "
|
|
415
|
+
"internalType": "uint256",
|
|
706
416
|
"name": "",
|
|
707
|
-
"type": "
|
|
417
|
+
"type": "uint256"
|
|
708
418
|
}
|
|
709
419
|
],
|
|
710
420
|
"stateMutability": "view",
|
|
@@ -720,7 +430,7 @@ export const BoringVault_jsonAbi = [
|
|
|
720
430
|
"type": "string"
|
|
721
431
|
}
|
|
722
432
|
],
|
|
723
|
-
"stateMutability": "
|
|
433
|
+
"stateMutability": "pure",
|
|
724
434
|
"type": "function"
|
|
725
435
|
},
|
|
726
436
|
{
|
|
@@ -740,12 +450,12 @@ export const BoringVault_jsonAbi = [
|
|
|
740
450
|
"inputs": [
|
|
741
451
|
{
|
|
742
452
|
"internalType": "address",
|
|
743
|
-
"name": "
|
|
453
|
+
"name": "_recipient",
|
|
744
454
|
"type": "address"
|
|
745
455
|
},
|
|
746
456
|
{
|
|
747
457
|
"internalType": "uint256",
|
|
748
|
-
"name": "
|
|
458
|
+
"name": "_amount",
|
|
749
459
|
"type": "uint256"
|
|
750
460
|
}
|
|
751
461
|
],
|
|
@@ -793,35 +503,42 @@ export const BoringVault_jsonAbi = [
|
|
|
793
503
|
"inputs": [
|
|
794
504
|
{
|
|
795
505
|
"internalType": "address",
|
|
796
|
-
"name": "
|
|
506
|
+
"name": "_recipient",
|
|
797
507
|
"type": "address"
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
"internalType": "uint256",
|
|
511
|
+
"name": "_sharesAmount",
|
|
512
|
+
"type": "uint256"
|
|
513
|
+
}
|
|
514
|
+
],
|
|
515
|
+
"name": "transferShares",
|
|
516
|
+
"outputs": [
|
|
517
|
+
{
|
|
518
|
+
"internalType": "uint256",
|
|
519
|
+
"name": "",
|
|
520
|
+
"type": "uint256"
|
|
798
521
|
}
|
|
799
522
|
],
|
|
800
|
-
"name": "transferOwnership",
|
|
801
|
-
"outputs": [],
|
|
802
523
|
"stateMutability": "nonpayable",
|
|
803
524
|
"type": "function"
|
|
804
|
-
},
|
|
805
|
-
{
|
|
806
|
-
"stateMutability": "payable",
|
|
807
|
-
"type": "receive"
|
|
808
525
|
}
|
|
809
526
|
] as const satisfies Abi;
|
|
810
527
|
|
|
811
528
|
/**
|
|
812
|
-
* Type-safe ABI for
|
|
529
|
+
* Type-safe ABI for EUSD_json
|
|
813
530
|
*/
|
|
814
|
-
export type
|
|
531
|
+
export type EUSD_jsonAbi = typeof EUSD_jsonAbi;
|
|
815
532
|
|
|
816
533
|
/**
|
|
817
|
-
* Contract instance type for
|
|
534
|
+
* Contract instance type for EUSD_json
|
|
818
535
|
*/
|
|
819
536
|
// Use any for contract type to avoid complex viem type issues
|
|
820
537
|
// The runtime behavior is type-safe through viem's ABI typing
|
|
821
|
-
export type
|
|
538
|
+
export type EUSD_jsonContract = any;
|
|
822
539
|
|
|
823
540
|
/**
|
|
824
|
-
*
|
|
541
|
+
* EUSD_json Contract Class
|
|
825
542
|
*
|
|
826
543
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
827
544
|
*
|
|
@@ -829,12 +546,12 @@ export type BoringVault_jsonContract = any;
|
|
|
829
546
|
* ```typescript
|
|
830
547
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
831
548
|
* import { mainnet } from 'viem/chains';
|
|
832
|
-
* import {
|
|
549
|
+
* import { EUSD_json } from 'EUSD_json';
|
|
833
550
|
*
|
|
834
551
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
835
552
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
836
553
|
*
|
|
837
|
-
* const contract = new
|
|
554
|
+
* const contract = new EUSD_json('0x...', { publicClient, walletClient });
|
|
838
555
|
*
|
|
839
556
|
* // Read functions
|
|
840
557
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -852,8 +569,8 @@ export type BoringVault_jsonContract = any;
|
|
|
852
569
|
* });
|
|
853
570
|
* ```
|
|
854
571
|
*/
|
|
855
|
-
export class
|
|
856
|
-
private contract:
|
|
572
|
+
export class EUSD_json {
|
|
573
|
+
private contract: EUSD_jsonContract;
|
|
857
574
|
private contractAddress: Address;
|
|
858
575
|
private publicClient: PublicClient;
|
|
859
576
|
|
|
@@ -868,7 +585,7 @@ export class BoringVault_json {
|
|
|
868
585
|
this.publicClient = clients.publicClient;
|
|
869
586
|
this.contract = getContract({
|
|
870
587
|
address,
|
|
871
|
-
abi:
|
|
588
|
+
abi: EUSD_jsonAbi,
|
|
872
589
|
client: {
|
|
873
590
|
public: clients.publicClient,
|
|
874
591
|
wallet: clients.walletClient,
|
|
@@ -886,93 +603,85 @@ export class BoringVault_json {
|
|
|
886
603
|
/**
|
|
887
604
|
* Get the underlying viem contract instance
|
|
888
605
|
*/
|
|
889
|
-
getContract():
|
|
606
|
+
getContract(): EUSD_jsonContract {
|
|
890
607
|
return this.contract;
|
|
891
608
|
}
|
|
892
609
|
|
|
893
|
-
/**
|
|
894
|
-
* DOMAIN_SEPARATOR
|
|
895
|
-
* view
|
|
896
|
-
*/
|
|
897
|
-
async DOMAIN_SEPARATOR(): Promise<`0x${string}`> {
|
|
898
|
-
return this.contract.read.DOMAIN_SEPARATOR() as Promise<`0x${string}`>;
|
|
899
|
-
}
|
|
900
|
-
|
|
901
610
|
/**
|
|
902
611
|
* allowance
|
|
903
612
|
* view
|
|
904
613
|
*/
|
|
905
|
-
async allowance(
|
|
906
|
-
return this.contract.read.allowance([
|
|
614
|
+
async allowance(_owner: `0x${string}`, _spender: `0x${string}`): Promise<bigint> {
|
|
615
|
+
return this.contract.read.allowance([_owner, _spender] as const) as Promise<bigint>;
|
|
907
616
|
}
|
|
908
617
|
|
|
909
618
|
/**
|
|
910
|
-
*
|
|
619
|
+
* balanceOf
|
|
911
620
|
* view
|
|
912
621
|
*/
|
|
913
|
-
async
|
|
914
|
-
return this.contract.read.
|
|
622
|
+
async balanceOf(_account: `0x${string}`): Promise<bigint> {
|
|
623
|
+
return this.contract.read.balanceOf([_account] as const) as Promise<bigint>;
|
|
915
624
|
}
|
|
916
625
|
|
|
917
626
|
/**
|
|
918
|
-
*
|
|
627
|
+
* configurator
|
|
919
628
|
* view
|
|
920
629
|
*/
|
|
921
|
-
async
|
|
922
|
-
return this.contract.read.
|
|
630
|
+
async configurator(): Promise<`0x${string}`> {
|
|
631
|
+
return this.contract.read.configurator() as Promise<`0x${string}`>;
|
|
923
632
|
}
|
|
924
633
|
|
|
925
634
|
/**
|
|
926
635
|
* decimals
|
|
927
|
-
*
|
|
636
|
+
* pure
|
|
928
637
|
*/
|
|
929
638
|
async decimals(): Promise<bigint> {
|
|
930
639
|
return this.contract.read.decimals() as Promise<bigint>;
|
|
931
640
|
}
|
|
932
641
|
|
|
933
642
|
/**
|
|
934
|
-
*
|
|
643
|
+
* getMintedEUSDByShares
|
|
935
644
|
* view
|
|
936
645
|
*/
|
|
937
|
-
async
|
|
938
|
-
return this.contract.read.
|
|
646
|
+
async getMintedEUSDByShares(_sharesAmount: bigint): Promise<bigint> {
|
|
647
|
+
return this.contract.read.getMintedEUSDByShares([_sharesAmount] as const) as Promise<bigint>;
|
|
939
648
|
}
|
|
940
649
|
|
|
941
650
|
/**
|
|
942
|
-
*
|
|
651
|
+
* getSharesByMintedEUSD
|
|
943
652
|
* view
|
|
944
653
|
*/
|
|
945
|
-
async
|
|
946
|
-
return this.contract.read.
|
|
654
|
+
async getSharesByMintedEUSD(_EUSDAmount: bigint): Promise<bigint> {
|
|
655
|
+
return this.contract.read.getSharesByMintedEUSD([_EUSDAmount] as const) as Promise<bigint>;
|
|
947
656
|
}
|
|
948
657
|
|
|
949
658
|
/**
|
|
950
|
-
*
|
|
659
|
+
* getTotalShares
|
|
951
660
|
* view
|
|
952
661
|
*/
|
|
953
|
-
async
|
|
954
|
-
return this.contract.read.
|
|
662
|
+
async getTotalShares(): Promise<bigint> {
|
|
663
|
+
return this.contract.read.getTotalShares() as Promise<bigint>;
|
|
955
664
|
}
|
|
956
665
|
|
|
957
666
|
/**
|
|
958
|
-
*
|
|
959
|
-
*
|
|
667
|
+
* name
|
|
668
|
+
* pure
|
|
960
669
|
*/
|
|
961
|
-
async
|
|
962
|
-
return this.contract.read.
|
|
670
|
+
async name(): Promise<string> {
|
|
671
|
+
return this.contract.read.name() as Promise<string>;
|
|
963
672
|
}
|
|
964
673
|
|
|
965
674
|
/**
|
|
966
|
-
*
|
|
675
|
+
* sharesOf
|
|
967
676
|
* view
|
|
968
677
|
*/
|
|
969
|
-
async
|
|
970
|
-
return this.contract.read.
|
|
678
|
+
async sharesOf(_account: `0x${string}`): Promise<bigint> {
|
|
679
|
+
return this.contract.read.sharesOf([_account] as const) as Promise<bigint>;
|
|
971
680
|
}
|
|
972
681
|
|
|
973
682
|
/**
|
|
974
683
|
* symbol
|
|
975
|
-
*
|
|
684
|
+
* pure
|
|
976
685
|
*/
|
|
977
686
|
async symbol(): Promise<string> {
|
|
978
687
|
return this.contract.read.symbol() as Promise<string>;
|
|
@@ -991,107 +700,7 @@ export class BoringVault_json {
|
|
|
991
700
|
* nonpayable
|
|
992
701
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
993
702
|
*/
|
|
994
|
-
async approve(
|
|
995
|
-
accessList?: import('viem').AccessList;
|
|
996
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
997
|
-
chain?: import('viem').Chain | null;
|
|
998
|
-
dataSuffix?: `0x${string}`;
|
|
999
|
-
gas?: bigint;
|
|
1000
|
-
gasPrice?: bigint;
|
|
1001
|
-
maxFeePerGas?: bigint;
|
|
1002
|
-
maxPriorityFeePerGas?: bigint;
|
|
1003
|
-
nonce?: number;
|
|
1004
|
-
value?: bigint;
|
|
1005
|
-
}): Promise<`0x${string}`> {
|
|
1006
|
-
if (!this.contract.write) {
|
|
1007
|
-
throw new Error('Wallet client is required for write operations');
|
|
1008
|
-
}
|
|
1009
|
-
return this.contract.write.approve([spender, amount] as const, options) as Promise<`0x${string}`>;
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
/**
|
|
1013
|
-
* enter
|
|
1014
|
-
* nonpayable
|
|
1015
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1016
|
-
*/
|
|
1017
|
-
async enter(from: `0x${string}`, asset: `0x${string}`, assetAmount: bigint, to: `0x${string}`, shareAmount: bigint, options?: {
|
|
1018
|
-
accessList?: import('viem').AccessList;
|
|
1019
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1020
|
-
chain?: import('viem').Chain | null;
|
|
1021
|
-
dataSuffix?: `0x${string}`;
|
|
1022
|
-
gas?: bigint;
|
|
1023
|
-
gasPrice?: bigint;
|
|
1024
|
-
maxFeePerGas?: bigint;
|
|
1025
|
-
maxPriorityFeePerGas?: bigint;
|
|
1026
|
-
nonce?: number;
|
|
1027
|
-
value?: bigint;
|
|
1028
|
-
}): Promise<`0x${string}`> {
|
|
1029
|
-
if (!this.contract.write) {
|
|
1030
|
-
throw new Error('Wallet client is required for write operations');
|
|
1031
|
-
}
|
|
1032
|
-
return this.contract.write.enter([from, asset, assetAmount, to, shareAmount] as const, options) as Promise<`0x${string}`>;
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
/**
|
|
1036
|
-
* exit
|
|
1037
|
-
* nonpayable
|
|
1038
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1039
|
-
*/
|
|
1040
|
-
async exit(to: `0x${string}`, asset: `0x${string}`, assetAmount: bigint, from: `0x${string}`, shareAmount: bigint, options?: {
|
|
1041
|
-
accessList?: import('viem').AccessList;
|
|
1042
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1043
|
-
chain?: import('viem').Chain | null;
|
|
1044
|
-
dataSuffix?: `0x${string}`;
|
|
1045
|
-
gas?: bigint;
|
|
1046
|
-
gasPrice?: bigint;
|
|
1047
|
-
maxFeePerGas?: bigint;
|
|
1048
|
-
maxPriorityFeePerGas?: bigint;
|
|
1049
|
-
nonce?: number;
|
|
1050
|
-
value?: bigint;
|
|
1051
|
-
}): Promise<`0x${string}`> {
|
|
1052
|
-
if (!this.contract.write) {
|
|
1053
|
-
throw new Error('Wallet client is required for write operations');
|
|
1054
|
-
}
|
|
1055
|
-
return this.contract.write.exit([to, asset, assetAmount, from, shareAmount] as const, options) as Promise<`0x${string}`>;
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
async manage(targets: `0x${string}`[], data: `0x${string}`[], values: bigint[], options?: {
|
|
1059
|
-
accessList?: import('viem').AccessList;
|
|
1060
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1061
|
-
chain?: import('viem').Chain | null;
|
|
1062
|
-
dataSuffix?: `0x${string}`;
|
|
1063
|
-
gas?: bigint;
|
|
1064
|
-
gasPrice?: bigint;
|
|
1065
|
-
maxFeePerGas?: bigint;
|
|
1066
|
-
maxPriorityFeePerGas?: bigint;
|
|
1067
|
-
nonce?: number;
|
|
1068
|
-
value?: bigint;
|
|
1069
|
-
}): Promise<`0x${string}`>;
|
|
1070
|
-
async manage(target: `0x${string}`, data: `0x${string}`, value: bigint, options?: {
|
|
1071
|
-
accessList?: import('viem').AccessList;
|
|
1072
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1073
|
-
chain?: import('viem').Chain | null;
|
|
1074
|
-
dataSuffix?: `0x${string}`;
|
|
1075
|
-
gas?: bigint;
|
|
1076
|
-
gasPrice?: bigint;
|
|
1077
|
-
maxFeePerGas?: bigint;
|
|
1078
|
-
maxPriorityFeePerGas?: bigint;
|
|
1079
|
-
nonce?: number;
|
|
1080
|
-
value?: bigint;
|
|
1081
|
-
}): Promise<`0x${string}`>;
|
|
1082
|
-
async manage(...args: any[]): Promise<`0x${string}`> {
|
|
1083
|
-
if (!this.contract.write) {
|
|
1084
|
-
throw new Error('Wallet client is required for write operations');
|
|
1085
|
-
}
|
|
1086
|
-
return this.contract.write.manage(args as any) as Promise<`0x${string}`>;
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
/**
|
|
1090
|
-
* onERC1155BatchReceived
|
|
1091
|
-
* nonpayable
|
|
1092
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1093
|
-
*/
|
|
1094
|
-
async onERC1155BatchReceived(arg0: `0x${string}`, arg1: `0x${string}`, arg2: bigint[], arg3: bigint[], arg4: `0x${string}`, options?: {
|
|
703
|
+
async approve(_spender: `0x${string}`, _amount: bigint, options?: {
|
|
1095
704
|
accessList?: import('viem').AccessList;
|
|
1096
705
|
authorizationList?: import('viem').AuthorizationList;
|
|
1097
706
|
chain?: import('viem').Chain | null;
|
|
@@ -1106,15 +715,15 @@ export class BoringVault_json {
|
|
|
1106
715
|
if (!this.contract.write) {
|
|
1107
716
|
throw new Error('Wallet client is required for write operations');
|
|
1108
717
|
}
|
|
1109
|
-
return this.contract.write.
|
|
718
|
+
return this.contract.write.approve([_spender, _amount] as const, options) as Promise<`0x${string}`>;
|
|
1110
719
|
}
|
|
1111
720
|
|
|
1112
721
|
/**
|
|
1113
|
-
*
|
|
722
|
+
* burn
|
|
1114
723
|
* nonpayable
|
|
1115
724
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1116
725
|
*/
|
|
1117
|
-
async
|
|
726
|
+
async burn(_account: `0x${string}`, _burnAmount: bigint, options?: {
|
|
1118
727
|
accessList?: import('viem').AccessList;
|
|
1119
728
|
authorizationList?: import('viem').AuthorizationList;
|
|
1120
729
|
chain?: import('viem').Chain | null;
|
|
@@ -1129,15 +738,15 @@ export class BoringVault_json {
|
|
|
1129
738
|
if (!this.contract.write) {
|
|
1130
739
|
throw new Error('Wallet client is required for write operations');
|
|
1131
740
|
}
|
|
1132
|
-
return this.contract.write.
|
|
741
|
+
return this.contract.write.burn([_account, _burnAmount] as const, options) as Promise<`0x${string}`>;
|
|
1133
742
|
}
|
|
1134
743
|
|
|
1135
744
|
/**
|
|
1136
|
-
*
|
|
745
|
+
* burnShares
|
|
1137
746
|
* nonpayable
|
|
1138
747
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1139
748
|
*/
|
|
1140
|
-
async
|
|
749
|
+
async burnShares(_account: `0x${string}`, _sharesAmount: bigint, options?: {
|
|
1141
750
|
accessList?: import('viem').AccessList;
|
|
1142
751
|
authorizationList?: import('viem').AuthorizationList;
|
|
1143
752
|
chain?: import('viem').Chain | null;
|
|
@@ -1152,15 +761,15 @@ export class BoringVault_json {
|
|
|
1152
761
|
if (!this.contract.write) {
|
|
1153
762
|
throw new Error('Wallet client is required for write operations');
|
|
1154
763
|
}
|
|
1155
|
-
return this.contract.write.
|
|
764
|
+
return this.contract.write.burnShares([_account, _sharesAmount] as const, options) as Promise<`0x${string}`>;
|
|
1156
765
|
}
|
|
1157
766
|
|
|
1158
767
|
/**
|
|
1159
|
-
*
|
|
768
|
+
* decreaseAllowance
|
|
1160
769
|
* nonpayable
|
|
1161
770
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1162
771
|
*/
|
|
1163
|
-
async
|
|
772
|
+
async decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
|
|
1164
773
|
accessList?: import('viem').AccessList;
|
|
1165
774
|
authorizationList?: import('viem').AuthorizationList;
|
|
1166
775
|
chain?: import('viem').Chain | null;
|
|
@@ -1175,15 +784,15 @@ export class BoringVault_json {
|
|
|
1175
784
|
if (!this.contract.write) {
|
|
1176
785
|
throw new Error('Wallet client is required for write operations');
|
|
1177
786
|
}
|
|
1178
|
-
return this.contract.write.
|
|
787
|
+
return this.contract.write.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<`0x${string}`>;
|
|
1179
788
|
}
|
|
1180
789
|
|
|
1181
790
|
/**
|
|
1182
|
-
*
|
|
791
|
+
* increaseAllowance
|
|
1183
792
|
* nonpayable
|
|
1184
793
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1185
794
|
*/
|
|
1186
|
-
async
|
|
795
|
+
async increaseAllowance(_spender: `0x${string}`, _addedValue: bigint, options?: {
|
|
1187
796
|
accessList?: import('viem').AccessList;
|
|
1188
797
|
authorizationList?: import('viem').AuthorizationList;
|
|
1189
798
|
chain?: import('viem').Chain | null;
|
|
@@ -1198,15 +807,15 @@ export class BoringVault_json {
|
|
|
1198
807
|
if (!this.contract.write) {
|
|
1199
808
|
throw new Error('Wallet client is required for write operations');
|
|
1200
809
|
}
|
|
1201
|
-
return this.contract.write.
|
|
810
|
+
return this.contract.write.increaseAllowance([_spender, _addedValue] as const, options) as Promise<`0x${string}`>;
|
|
1202
811
|
}
|
|
1203
812
|
|
|
1204
813
|
/**
|
|
1205
|
-
*
|
|
814
|
+
* mint
|
|
1206
815
|
* nonpayable
|
|
1207
816
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1208
817
|
*/
|
|
1209
|
-
async
|
|
818
|
+
async mint(_recipient: `0x${string}`, _mintAmount: bigint, options?: {
|
|
1210
819
|
accessList?: import('viem').AccessList;
|
|
1211
820
|
authorizationList?: import('viem').AuthorizationList;
|
|
1212
821
|
chain?: import('viem').Chain | null;
|
|
@@ -1221,7 +830,7 @@ export class BoringVault_json {
|
|
|
1221
830
|
if (!this.contract.write) {
|
|
1222
831
|
throw new Error('Wallet client is required for write operations');
|
|
1223
832
|
}
|
|
1224
|
-
return this.contract.write.
|
|
833
|
+
return this.contract.write.mint([_recipient, _mintAmount] as const, options) as Promise<`0x${string}`>;
|
|
1225
834
|
}
|
|
1226
835
|
|
|
1227
836
|
/**
|
|
@@ -1229,7 +838,7 @@ export class BoringVault_json {
|
|
|
1229
838
|
* nonpayable
|
|
1230
839
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1231
840
|
*/
|
|
1232
|
-
async transfer(
|
|
841
|
+
async transfer(_recipient: `0x${string}`, _amount: bigint, options?: {
|
|
1233
842
|
accessList?: import('viem').AccessList;
|
|
1234
843
|
authorizationList?: import('viem').AuthorizationList;
|
|
1235
844
|
chain?: import('viem').Chain | null;
|
|
@@ -1244,7 +853,7 @@ export class BoringVault_json {
|
|
|
1244
853
|
if (!this.contract.write) {
|
|
1245
854
|
throw new Error('Wallet client is required for write operations');
|
|
1246
855
|
}
|
|
1247
|
-
return this.contract.write.transfer([
|
|
856
|
+
return this.contract.write.transfer([_recipient, _amount] as const, options) as Promise<`0x${string}`>;
|
|
1248
857
|
}
|
|
1249
858
|
|
|
1250
859
|
/**
|
|
@@ -1271,11 +880,11 @@ export class BoringVault_json {
|
|
|
1271
880
|
}
|
|
1272
881
|
|
|
1273
882
|
/**
|
|
1274
|
-
*
|
|
883
|
+
* transferShares
|
|
1275
884
|
* nonpayable
|
|
1276
885
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1277
886
|
*/
|
|
1278
|
-
async
|
|
887
|
+
async transferShares(_recipient: `0x${string}`, _sharesAmount: bigint, options?: {
|
|
1279
888
|
accessList?: import('viem').AccessList;
|
|
1280
889
|
authorizationList?: import('viem').AuthorizationList;
|
|
1281
890
|
chain?: import('viem').Chain | null;
|
|
@@ -1290,7 +899,7 @@ export class BoringVault_json {
|
|
|
1290
899
|
if (!this.contract.write) {
|
|
1291
900
|
throw new Error('Wallet client is required for write operations');
|
|
1292
901
|
}
|
|
1293
|
-
return this.contract.write.
|
|
902
|
+
return this.contract.write.transferShares([_recipient, _sharesAmount] as const, options) as Promise<`0x${string}`>;
|
|
1294
903
|
}
|
|
1295
904
|
|
|
1296
905
|
|
|
@@ -1314,7 +923,7 @@ export class BoringVault_json {
|
|
|
1314
923
|
* Returns gas estimate and result without sending transaction
|
|
1315
924
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1316
925
|
*/
|
|
1317
|
-
async approve(
|
|
926
|
+
async approve(_spender: `0x${string}`, _amount: bigint, options?: {
|
|
1318
927
|
accessList?: import('viem').AccessList;
|
|
1319
928
|
authorizationList?: import('viem').AuthorizationList;
|
|
1320
929
|
chain?: import('viem').Chain | null;
|
|
@@ -1326,80 +935,14 @@ export class BoringVault_json {
|
|
|
1326
935
|
nonce?: number;
|
|
1327
936
|
value?: bigint;
|
|
1328
937
|
}): Promise<boolean> {
|
|
1329
|
-
return contract.simulate.approve([
|
|
1330
|
-
},
|
|
1331
|
-
/**
|
|
1332
|
-
* Simulate enter
|
|
1333
|
-
* Returns gas estimate and result without sending transaction
|
|
1334
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1335
|
-
*/
|
|
1336
|
-
async enter(from: `0x${string}`, asset: `0x${string}`, assetAmount: bigint, to: `0x${string}`, shareAmount: bigint, options?: {
|
|
1337
|
-
accessList?: import('viem').AccessList;
|
|
1338
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1339
|
-
chain?: import('viem').Chain | null;
|
|
1340
|
-
dataSuffix?: `0x${string}`;
|
|
1341
|
-
gas?: bigint;
|
|
1342
|
-
gasPrice?: bigint;
|
|
1343
|
-
maxFeePerGas?: bigint;
|
|
1344
|
-
maxPriorityFeePerGas?: bigint;
|
|
1345
|
-
nonce?: number;
|
|
1346
|
-
value?: bigint;
|
|
1347
|
-
}): Promise<void> {
|
|
1348
|
-
return contract.simulate.enter([from, asset, assetAmount, to, shareAmount] as const, options) as Promise<void>;
|
|
1349
|
-
},
|
|
1350
|
-
/**
|
|
1351
|
-
* Simulate exit
|
|
1352
|
-
* Returns gas estimate and result without sending transaction
|
|
1353
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1354
|
-
*/
|
|
1355
|
-
async exit(to: `0x${string}`, asset: `0x${string}`, assetAmount: bigint, from: `0x${string}`, shareAmount: bigint, options?: {
|
|
1356
|
-
accessList?: import('viem').AccessList;
|
|
1357
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1358
|
-
chain?: import('viem').Chain | null;
|
|
1359
|
-
dataSuffix?: `0x${string}`;
|
|
1360
|
-
gas?: bigint;
|
|
1361
|
-
gasPrice?: bigint;
|
|
1362
|
-
maxFeePerGas?: bigint;
|
|
1363
|
-
maxPriorityFeePerGas?: bigint;
|
|
1364
|
-
nonce?: number;
|
|
1365
|
-
value?: bigint;
|
|
1366
|
-
}): Promise<void> {
|
|
1367
|
-
return contract.simulate.exit([to, asset, assetAmount, from, shareAmount] as const, options) as Promise<void>;
|
|
1368
|
-
},
|
|
1369
|
-
/**
|
|
1370
|
-
* Simulate manage
|
|
1371
|
-
* Returns gas estimate and result without sending transaction
|
|
1372
|
-
* Supports multiple overloads: (address[], bytes[], uint256[]), (address, bytes, uint256)
|
|
1373
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1374
|
-
*/
|
|
1375
|
-
async manage(...args: any[]): Promise<any> {
|
|
1376
|
-
return contract.simulate.manage(args as any) as Promise<any>;
|
|
1377
|
-
},
|
|
1378
|
-
/**
|
|
1379
|
-
* Simulate onERC1155BatchReceived
|
|
1380
|
-
* Returns gas estimate and result without sending transaction
|
|
1381
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1382
|
-
*/
|
|
1383
|
-
async onERC1155BatchReceived(arg0: `0x${string}`, arg1: `0x${string}`, arg2: bigint[], arg3: bigint[], arg4: `0x${string}`, options?: {
|
|
1384
|
-
accessList?: import('viem').AccessList;
|
|
1385
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1386
|
-
chain?: import('viem').Chain | null;
|
|
1387
|
-
dataSuffix?: `0x${string}`;
|
|
1388
|
-
gas?: bigint;
|
|
1389
|
-
gasPrice?: bigint;
|
|
1390
|
-
maxFeePerGas?: bigint;
|
|
1391
|
-
maxPriorityFeePerGas?: bigint;
|
|
1392
|
-
nonce?: number;
|
|
1393
|
-
value?: bigint;
|
|
1394
|
-
}): Promise<`0x${string}`> {
|
|
1395
|
-
return contract.simulate.onERC1155BatchReceived([arg0, arg1, arg2, arg3, arg4] as const, options) as Promise<`0x${string}`>;
|
|
938
|
+
return contract.simulate.approve([_spender, _amount] as const, options) as Promise<boolean>;
|
|
1396
939
|
},
|
|
1397
940
|
/**
|
|
1398
|
-
* Simulate
|
|
941
|
+
* Simulate burn
|
|
1399
942
|
* Returns gas estimate and result without sending transaction
|
|
1400
943
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1401
944
|
*/
|
|
1402
|
-
async
|
|
945
|
+
async burn(_account: `0x${string}`, _burnAmount: bigint, options?: {
|
|
1403
946
|
accessList?: import('viem').AccessList;
|
|
1404
947
|
authorizationList?: import('viem').AuthorizationList;
|
|
1405
948
|
chain?: import('viem').Chain | null;
|
|
@@ -1410,15 +953,15 @@ export class BoringVault_json {
|
|
|
1410
953
|
maxPriorityFeePerGas?: bigint;
|
|
1411
954
|
nonce?: number;
|
|
1412
955
|
value?: bigint;
|
|
1413
|
-
}): Promise
|
|
1414
|
-
return contract.simulate.
|
|
956
|
+
}): Promise<bigint> {
|
|
957
|
+
return contract.simulate.burn([_account, _burnAmount] as const, options) as Promise<bigint>;
|
|
1415
958
|
},
|
|
1416
959
|
/**
|
|
1417
|
-
* Simulate
|
|
960
|
+
* Simulate burnShares
|
|
1418
961
|
* Returns gas estimate and result without sending transaction
|
|
1419
962
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1420
963
|
*/
|
|
1421
|
-
async
|
|
964
|
+
async burnShares(_account: `0x${string}`, _sharesAmount: bigint, options?: {
|
|
1422
965
|
accessList?: import('viem').AccessList;
|
|
1423
966
|
authorizationList?: import('viem').AuthorizationList;
|
|
1424
967
|
chain?: import('viem').Chain | null;
|
|
@@ -1429,15 +972,15 @@ export class BoringVault_json {
|
|
|
1429
972
|
maxPriorityFeePerGas?: bigint;
|
|
1430
973
|
nonce?: number;
|
|
1431
974
|
value?: bigint;
|
|
1432
|
-
}): Promise
|
|
1433
|
-
return contract.simulate.
|
|
975
|
+
}): Promise<bigint> {
|
|
976
|
+
return contract.simulate.burnShares([_account, _sharesAmount] as const, options) as Promise<bigint>;
|
|
1434
977
|
},
|
|
1435
978
|
/**
|
|
1436
|
-
* Simulate
|
|
979
|
+
* Simulate decreaseAllowance
|
|
1437
980
|
* Returns gas estimate and result without sending transaction
|
|
1438
981
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1439
982
|
*/
|
|
1440
|
-
async
|
|
983
|
+
async decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
|
|
1441
984
|
accessList?: import('viem').AccessList;
|
|
1442
985
|
authorizationList?: import('viem').AuthorizationList;
|
|
1443
986
|
chain?: import('viem').Chain | null;
|
|
@@ -1448,15 +991,15 @@ export class BoringVault_json {
|
|
|
1448
991
|
maxPriorityFeePerGas?: bigint;
|
|
1449
992
|
nonce?: number;
|
|
1450
993
|
value?: bigint;
|
|
1451
|
-
}): Promise<
|
|
1452
|
-
return contract.simulate.
|
|
994
|
+
}): Promise<boolean> {
|
|
995
|
+
return contract.simulate.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<boolean>;
|
|
1453
996
|
},
|
|
1454
997
|
/**
|
|
1455
|
-
* Simulate
|
|
998
|
+
* Simulate increaseAllowance
|
|
1456
999
|
* Returns gas estimate and result without sending transaction
|
|
1457
1000
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1458
1001
|
*/
|
|
1459
|
-
async
|
|
1002
|
+
async increaseAllowance(_spender: `0x${string}`, _addedValue: bigint, options?: {
|
|
1460
1003
|
accessList?: import('viem').AccessList;
|
|
1461
1004
|
authorizationList?: import('viem').AuthorizationList;
|
|
1462
1005
|
chain?: import('viem').Chain | null;
|
|
@@ -1467,15 +1010,15 @@ export class BoringVault_json {
|
|
|
1467
1010
|
maxPriorityFeePerGas?: bigint;
|
|
1468
1011
|
nonce?: number;
|
|
1469
1012
|
value?: bigint;
|
|
1470
|
-
}): Promise<
|
|
1471
|
-
return contract.simulate.
|
|
1013
|
+
}): Promise<boolean> {
|
|
1014
|
+
return contract.simulate.increaseAllowance([_spender, _addedValue] as const, options) as Promise<boolean>;
|
|
1472
1015
|
},
|
|
1473
1016
|
/**
|
|
1474
|
-
* Simulate
|
|
1017
|
+
* Simulate mint
|
|
1475
1018
|
* Returns gas estimate and result without sending transaction
|
|
1476
1019
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1477
1020
|
*/
|
|
1478
|
-
async
|
|
1021
|
+
async mint(_recipient: `0x${string}`, _mintAmount: bigint, options?: {
|
|
1479
1022
|
accessList?: import('viem').AccessList;
|
|
1480
1023
|
authorizationList?: import('viem').AuthorizationList;
|
|
1481
1024
|
chain?: import('viem').Chain | null;
|
|
@@ -1486,15 +1029,15 @@ export class BoringVault_json {
|
|
|
1486
1029
|
maxPriorityFeePerGas?: bigint;
|
|
1487
1030
|
nonce?: number;
|
|
1488
1031
|
value?: bigint;
|
|
1489
|
-
}): Promise<
|
|
1490
|
-
return contract.simulate.
|
|
1032
|
+
}): Promise<bigint> {
|
|
1033
|
+
return contract.simulate.mint([_recipient, _mintAmount] as const, options) as Promise<bigint>;
|
|
1491
1034
|
},
|
|
1492
1035
|
/**
|
|
1493
1036
|
* Simulate transfer
|
|
1494
1037
|
* Returns gas estimate and result without sending transaction
|
|
1495
1038
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1496
1039
|
*/
|
|
1497
|
-
async transfer(
|
|
1040
|
+
async transfer(_recipient: `0x${string}`, _amount: bigint, options?: {
|
|
1498
1041
|
accessList?: import('viem').AccessList;
|
|
1499
1042
|
authorizationList?: import('viem').AuthorizationList;
|
|
1500
1043
|
chain?: import('viem').Chain | null;
|
|
@@ -1506,7 +1049,7 @@ export class BoringVault_json {
|
|
|
1506
1049
|
nonce?: number;
|
|
1507
1050
|
value?: bigint;
|
|
1508
1051
|
}): Promise<boolean> {
|
|
1509
|
-
return contract.simulate.transfer([
|
|
1052
|
+
return contract.simulate.transfer([_recipient, _amount] as const, options) as Promise<boolean>;
|
|
1510
1053
|
},
|
|
1511
1054
|
/**
|
|
1512
1055
|
* Simulate transferFrom
|
|
@@ -1528,11 +1071,11 @@ export class BoringVault_json {
|
|
|
1528
1071
|
return contract.simulate.transferFrom([from, to, amount] as const, options) as Promise<boolean>;
|
|
1529
1072
|
},
|
|
1530
1073
|
/**
|
|
1531
|
-
* Simulate
|
|
1074
|
+
* Simulate transferShares
|
|
1532
1075
|
* Returns gas estimate and result without sending transaction
|
|
1533
1076
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1534
1077
|
*/
|
|
1535
|
-
async
|
|
1078
|
+
async transferShares(_recipient: `0x${string}`, _sharesAmount: bigint, options?: {
|
|
1536
1079
|
accessList?: import('viem').AccessList;
|
|
1537
1080
|
authorizationList?: import('viem').AuthorizationList;
|
|
1538
1081
|
chain?: import('viem').Chain | null;
|
|
@@ -1543,8 +1086,8 @@ export class BoringVault_json {
|
|
|
1543
1086
|
maxPriorityFeePerGas?: bigint;
|
|
1544
1087
|
nonce?: number;
|
|
1545
1088
|
value?: bigint;
|
|
1546
|
-
}): Promise<
|
|
1547
|
-
return contract.simulate.
|
|
1089
|
+
}): Promise<bigint> {
|
|
1090
|
+
return contract.simulate.transferShares([_recipient, _sharesAmount] as const, options) as Promise<bigint>;
|
|
1548
1091
|
}
|
|
1549
1092
|
};
|
|
1550
1093
|
}
|
|
@@ -1569,10 +1112,10 @@ export class BoringVault_json {
|
|
|
1569
1112
|
* @param filter Optional filter for indexed parameters
|
|
1570
1113
|
* @returns Unwatch function to stop listening
|
|
1571
1114
|
*/
|
|
1572
|
-
Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`;
|
|
1115
|
+
Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
|
|
1573
1116
|
return this.publicClient.watchContractEvent({
|
|
1574
1117
|
address: this.contractAddress,
|
|
1575
|
-
abi:
|
|
1118
|
+
abi: EUSD_jsonAbi,
|
|
1576
1119
|
eventName: 'Approval',
|
|
1577
1120
|
args: filter,
|
|
1578
1121
|
onLogs: (logs: any[]) => {
|
|
@@ -1583,54 +1126,16 @@ export class BoringVault_json {
|
|
|
1583
1126
|
}) as () => void;
|
|
1584
1127
|
},
|
|
1585
1128
|
/**
|
|
1586
|
-
* Watch
|
|
1587
|
-
* @param callback Function to call when event is emitted
|
|
1588
|
-
* @param filter Optional filter for indexed parameters
|
|
1589
|
-
* @returns Unwatch function to stop listening
|
|
1590
|
-
*/
|
|
1591
|
-
AuthorityUpdated: (callback: (event: { user: `0x${string}`; newAuthority: `0x${string}` }) => void, filter?: { user: `0x${string}`; newAuthority: `0x${string}` }) => {
|
|
1592
|
-
return this.publicClient.watchContractEvent({
|
|
1593
|
-
address: this.contractAddress,
|
|
1594
|
-
abi: BoringVault_jsonAbi,
|
|
1595
|
-
eventName: 'AuthorityUpdated',
|
|
1596
|
-
args: filter,
|
|
1597
|
-
onLogs: (logs: any[]) => {
|
|
1598
|
-
logs.forEach((log: any) => {
|
|
1599
|
-
callback(log.args as any);
|
|
1600
|
-
});
|
|
1601
|
-
},
|
|
1602
|
-
}) as () => void;
|
|
1603
|
-
},
|
|
1604
|
-
/**
|
|
1605
|
-
* Watch Enter events
|
|
1606
|
-
* @param callback Function to call when event is emitted
|
|
1607
|
-
* @param filter Optional filter for indexed parameters
|
|
1608
|
-
* @returns Unwatch function to stop listening
|
|
1609
|
-
*/
|
|
1610
|
-
Enter: (callback: (event: { from: `0x${string}`; asset: `0x${string}`; to: `0x${string}`; amount: bigint; shares: bigint }) => void, filter?: { from: `0x${string}`; asset: `0x${string}`; to: `0x${string}` }) => {
|
|
1611
|
-
return this.publicClient.watchContractEvent({
|
|
1612
|
-
address: this.contractAddress,
|
|
1613
|
-
abi: BoringVault_jsonAbi,
|
|
1614
|
-
eventName: 'Enter',
|
|
1615
|
-
args: filter,
|
|
1616
|
-
onLogs: (logs: any[]) => {
|
|
1617
|
-
logs.forEach((log: any) => {
|
|
1618
|
-
callback(log.args as any);
|
|
1619
|
-
});
|
|
1620
|
-
},
|
|
1621
|
-
}) as () => void;
|
|
1622
|
-
},
|
|
1623
|
-
/**
|
|
1624
|
-
* Watch Exit events
|
|
1129
|
+
* Watch SharesBurnt events
|
|
1625
1130
|
* @param callback Function to call when event is emitted
|
|
1626
1131
|
* @param filter Optional filter for indexed parameters
|
|
1627
1132
|
* @returns Unwatch function to stop listening
|
|
1628
1133
|
*/
|
|
1629
|
-
|
|
1134
|
+
SharesBurnt: (callback: (event: { account: `0x${string}`; preRebaseTokenAmount: bigint; postRebaseTokenAmount: bigint; sharesAmount: bigint }) => void, filter?: { account: `0x${string}` }) => {
|
|
1630
1135
|
return this.publicClient.watchContractEvent({
|
|
1631
1136
|
address: this.contractAddress,
|
|
1632
|
-
abi:
|
|
1633
|
-
eventName: '
|
|
1137
|
+
abi: EUSD_jsonAbi,
|
|
1138
|
+
eventName: 'SharesBurnt',
|
|
1634
1139
|
args: filter,
|
|
1635
1140
|
onLogs: (logs: any[]) => {
|
|
1636
1141
|
logs.forEach((log: any) => {
|
|
@@ -1640,16 +1145,16 @@ export class BoringVault_json {
|
|
|
1640
1145
|
}) as () => void;
|
|
1641
1146
|
},
|
|
1642
1147
|
/**
|
|
1643
|
-
* Watch
|
|
1148
|
+
* Watch Transfer events
|
|
1644
1149
|
* @param callback Function to call when event is emitted
|
|
1645
1150
|
* @param filter Optional filter for indexed parameters
|
|
1646
1151
|
* @returns Unwatch function to stop listening
|
|
1647
1152
|
*/
|
|
1648
|
-
|
|
1153
|
+
Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
|
|
1649
1154
|
return this.publicClient.watchContractEvent({
|
|
1650
1155
|
address: this.contractAddress,
|
|
1651
|
-
abi:
|
|
1652
|
-
eventName: '
|
|
1156
|
+
abi: EUSD_jsonAbi,
|
|
1157
|
+
eventName: 'Transfer',
|
|
1653
1158
|
args: filter,
|
|
1654
1159
|
onLogs: (logs: any[]) => {
|
|
1655
1160
|
logs.forEach((log: any) => {
|
|
@@ -1659,16 +1164,16 @@ export class BoringVault_json {
|
|
|
1659
1164
|
}) as () => void;
|
|
1660
1165
|
},
|
|
1661
1166
|
/**
|
|
1662
|
-
* Watch
|
|
1167
|
+
* Watch TransferShares events
|
|
1663
1168
|
* @param callback Function to call when event is emitted
|
|
1664
1169
|
* @param filter Optional filter for indexed parameters
|
|
1665
1170
|
* @returns Unwatch function to stop listening
|
|
1666
1171
|
*/
|
|
1667
|
-
|
|
1172
|
+
TransferShares: (callback: (event: { from: `0x${string}`; to: `0x${string}`; sharesValue: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
|
|
1668
1173
|
return this.publicClient.watchContractEvent({
|
|
1669
1174
|
address: this.contractAddress,
|
|
1670
|
-
abi:
|
|
1671
|
-
eventName: '
|
|
1175
|
+
abi: EUSD_jsonAbi,
|
|
1176
|
+
eventName: 'TransferShares',
|
|
1672
1177
|
args: filter,
|
|
1673
1178
|
onLogs: (logs: any[]) => {
|
|
1674
1179
|
logs.forEach((log: any) => {
|