@gitmyabi/deuro 1.0.0 → 1.0.1
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/DecentralizedEURO_json.d.ts +191 -1771
- package/contracts/DecentralizedEURO_json.js +52 -1710
- package/contracts/DecentralizedEURO_json.ts +243 -2312
- package/package.json +3 -3
|
@@ -8,48 +8,10 @@ import { getContract } from 'viem';
|
|
|
8
8
|
*/
|
|
9
9
|
export const DecentralizedEURO_jsonAbi = [
|
|
10
10
|
{
|
|
11
|
-
"inputs": [
|
|
12
|
-
{
|
|
13
|
-
"internalType": "uint256",
|
|
14
|
-
"name": "_minApplicationPeriod",
|
|
15
|
-
"type": "uint256"
|
|
16
|
-
}
|
|
17
|
-
],
|
|
11
|
+
"inputs": [],
|
|
18
12
|
"stateMutability": "nonpayable",
|
|
19
13
|
"type": "constructor"
|
|
20
14
|
},
|
|
21
|
-
{
|
|
22
|
-
"inputs": [],
|
|
23
|
-
"name": "AlreadyRegistered",
|
|
24
|
-
"type": "error"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"inputs": [],
|
|
28
|
-
"name": "ECDSAInvalidSignature",
|
|
29
|
-
"type": "error"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"inputs": [
|
|
33
|
-
{
|
|
34
|
-
"internalType": "uint256",
|
|
35
|
-
"name": "length",
|
|
36
|
-
"type": "uint256"
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
"name": "ECDSAInvalidSignatureLength",
|
|
40
|
-
"type": "error"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"inputs": [
|
|
44
|
-
{
|
|
45
|
-
"internalType": "bytes32",
|
|
46
|
-
"name": "s",
|
|
47
|
-
"type": "bytes32"
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
"name": "ECDSAInvalidSignatureS",
|
|
51
|
-
"type": "error"
|
|
52
|
-
},
|
|
53
15
|
{
|
|
54
16
|
"inputs": [
|
|
55
17
|
{
|
|
@@ -136,85 +98,6 @@ export const DecentralizedEURO_jsonAbi = [
|
|
|
136
98
|
"name": "ERC20InvalidSpender",
|
|
137
99
|
"type": "error"
|
|
138
100
|
},
|
|
139
|
-
{
|
|
140
|
-
"inputs": [
|
|
141
|
-
{
|
|
142
|
-
"internalType": "uint256",
|
|
143
|
-
"name": "deadline",
|
|
144
|
-
"type": "uint256"
|
|
145
|
-
}
|
|
146
|
-
],
|
|
147
|
-
"name": "ERC2612ExpiredSignature",
|
|
148
|
-
"type": "error"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"inputs": [
|
|
152
|
-
{
|
|
153
|
-
"internalType": "address",
|
|
154
|
-
"name": "signer",
|
|
155
|
-
"type": "address"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"internalType": "address",
|
|
159
|
-
"name": "owner",
|
|
160
|
-
"type": "address"
|
|
161
|
-
}
|
|
162
|
-
],
|
|
163
|
-
"name": "ERC2612InvalidSigner",
|
|
164
|
-
"type": "error"
|
|
165
|
-
},
|
|
166
|
-
{
|
|
167
|
-
"inputs": [],
|
|
168
|
-
"name": "FeeTooLow",
|
|
169
|
-
"type": "error"
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
"inputs": [
|
|
173
|
-
{
|
|
174
|
-
"internalType": "address",
|
|
175
|
-
"name": "account",
|
|
176
|
-
"type": "address"
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
"internalType": "uint256",
|
|
180
|
-
"name": "currentNonce",
|
|
181
|
-
"type": "uint256"
|
|
182
|
-
}
|
|
183
|
-
],
|
|
184
|
-
"name": "InvalidAccountNonce",
|
|
185
|
-
"type": "error"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"inputs": [],
|
|
189
|
-
"name": "InvalidShortString",
|
|
190
|
-
"type": "error"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"inputs": [],
|
|
194
|
-
"name": "NotMinter",
|
|
195
|
-
"type": "error"
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
"inputs": [],
|
|
199
|
-
"name": "PeriodTooShort",
|
|
200
|
-
"type": "error"
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
"inputs": [
|
|
204
|
-
{
|
|
205
|
-
"internalType": "string",
|
|
206
|
-
"name": "str",
|
|
207
|
-
"type": "string"
|
|
208
|
-
}
|
|
209
|
-
],
|
|
210
|
-
"name": "StringTooLong",
|
|
211
|
-
"type": "error"
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"inputs": [],
|
|
215
|
-
"name": "TooLate",
|
|
216
|
-
"type": "error"
|
|
217
|
-
},
|
|
218
101
|
{
|
|
219
102
|
"anonymous": false,
|
|
220
103
|
"inputs": [
|
|
@@ -246,205 +129,82 @@ export const DecentralizedEURO_jsonAbi = [
|
|
|
246
129
|
{
|
|
247
130
|
"indexed": true,
|
|
248
131
|
"internalType": "address",
|
|
249
|
-
"name": "
|
|
250
|
-
"type": "address"
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
"indexed": true,
|
|
254
|
-
"internalType": "bytes32",
|
|
255
|
-
"name": "nonce",
|
|
256
|
-
"type": "bytes32"
|
|
257
|
-
}
|
|
258
|
-
],
|
|
259
|
-
"name": "AuthorizationCanceled",
|
|
260
|
-
"type": "event"
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
"anonymous": false,
|
|
264
|
-
"inputs": [
|
|
265
|
-
{
|
|
266
|
-
"indexed": true,
|
|
267
|
-
"internalType": "address",
|
|
268
|
-
"name": "authorizer",
|
|
269
|
-
"type": "address"
|
|
270
|
-
},
|
|
271
|
-
{
|
|
272
|
-
"indexed": true,
|
|
273
|
-
"internalType": "bytes32",
|
|
274
|
-
"name": "nonce",
|
|
275
|
-
"type": "bytes32"
|
|
276
|
-
}
|
|
277
|
-
],
|
|
278
|
-
"name": "AuthorizationUsed",
|
|
279
|
-
"type": "event"
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
"anonymous": false,
|
|
283
|
-
"inputs": [],
|
|
284
|
-
"name": "EIP712DomainChanged",
|
|
285
|
-
"type": "event"
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
"anonymous": false,
|
|
289
|
-
"inputs": [
|
|
290
|
-
{
|
|
291
|
-
"indexed": true,
|
|
292
|
-
"internalType": "address",
|
|
293
|
-
"name": "reportingMinter",
|
|
132
|
+
"name": "from",
|
|
294
133
|
"type": "address"
|
|
295
134
|
},
|
|
296
|
-
{
|
|
297
|
-
"indexed": false,
|
|
298
|
-
"internalType": "uint256",
|
|
299
|
-
"name": "amount",
|
|
300
|
-
"type": "uint256"
|
|
301
|
-
}
|
|
302
|
-
],
|
|
303
|
-
"name": "Loss",
|
|
304
|
-
"type": "event"
|
|
305
|
-
},
|
|
306
|
-
{
|
|
307
|
-
"anonymous": false,
|
|
308
|
-
"inputs": [
|
|
309
135
|
{
|
|
310
136
|
"indexed": true,
|
|
311
137
|
"internalType": "address",
|
|
312
|
-
"name": "
|
|
138
|
+
"name": "to",
|
|
313
139
|
"type": "address"
|
|
314
140
|
},
|
|
315
141
|
{
|
|
316
142
|
"indexed": false,
|
|
317
143
|
"internalType": "uint256",
|
|
318
|
-
"name": "
|
|
319
|
-
"type": "uint256"
|
|
320
|
-
},
|
|
321
|
-
{
|
|
322
|
-
"indexed": false,
|
|
323
|
-
"internalType": "uint256",
|
|
324
|
-
"name": "applicationFee",
|
|
144
|
+
"name": "value",
|
|
325
145
|
"type": "uint256"
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
"indexed": false,
|
|
329
|
-
"internalType": "string",
|
|
330
|
-
"name": "message",
|
|
331
|
-
"type": "string"
|
|
332
146
|
}
|
|
333
147
|
],
|
|
334
|
-
"name": "
|
|
148
|
+
"name": "Transfer",
|
|
335
149
|
"type": "event"
|
|
336
150
|
},
|
|
337
151
|
{
|
|
338
|
-
"anonymous": false,
|
|
339
152
|
"inputs": [
|
|
340
153
|
{
|
|
341
|
-
"indexed": true,
|
|
342
154
|
"internalType": "address",
|
|
343
|
-
"name": "
|
|
155
|
+
"name": "owner",
|
|
344
156
|
"type": "address"
|
|
345
157
|
},
|
|
346
158
|
{
|
|
347
|
-
"indexed": false,
|
|
348
|
-
"internalType": "string",
|
|
349
|
-
"name": "message",
|
|
350
|
-
"type": "string"
|
|
351
|
-
}
|
|
352
|
-
],
|
|
353
|
-
"name": "MinterDenied",
|
|
354
|
-
"type": "event"
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
"anonymous": false,
|
|
358
|
-
"inputs": [
|
|
359
|
-
{
|
|
360
|
-
"indexed": true,
|
|
361
159
|
"internalType": "address",
|
|
362
|
-
"name": "
|
|
160
|
+
"name": "spender",
|
|
363
161
|
"type": "address"
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
"indexed": false,
|
|
367
|
-
"internalType": "uint256",
|
|
368
|
-
"name": "amount",
|
|
369
|
-
"type": "uint256"
|
|
370
162
|
}
|
|
371
163
|
],
|
|
372
|
-
"name": "
|
|
373
|
-
"
|
|
374
|
-
},
|
|
375
|
-
{
|
|
376
|
-
"anonymous": false,
|
|
377
|
-
"inputs": [
|
|
378
|
-
{
|
|
379
|
-
"indexed": true,
|
|
380
|
-
"internalType": "address",
|
|
381
|
-
"name": "recipient",
|
|
382
|
-
"type": "address"
|
|
383
|
-
},
|
|
164
|
+
"name": "allowance",
|
|
165
|
+
"outputs": [
|
|
384
166
|
{
|
|
385
|
-
"indexed": false,
|
|
386
167
|
"internalType": "uint256",
|
|
387
|
-
"name": "
|
|
168
|
+
"name": "",
|
|
388
169
|
"type": "uint256"
|
|
389
170
|
}
|
|
390
171
|
],
|
|
391
|
-
"
|
|
392
|
-
"type": "
|
|
172
|
+
"stateMutability": "view",
|
|
173
|
+
"type": "function"
|
|
393
174
|
},
|
|
394
175
|
{
|
|
395
|
-
"anonymous": false,
|
|
396
176
|
"inputs": [
|
|
397
177
|
{
|
|
398
|
-
"indexed": true,
|
|
399
|
-
"internalType": "address",
|
|
400
|
-
"name": "from",
|
|
401
|
-
"type": "address"
|
|
402
|
-
},
|
|
403
|
-
{
|
|
404
|
-
"indexed": true,
|
|
405
178
|
"internalType": "address",
|
|
406
|
-
"name": "
|
|
179
|
+
"name": "spender",
|
|
407
180
|
"type": "address"
|
|
408
181
|
},
|
|
409
182
|
{
|
|
410
|
-
"indexed": false,
|
|
411
183
|
"internalType": "uint256",
|
|
412
184
|
"name": "value",
|
|
413
185
|
"type": "uint256"
|
|
414
186
|
}
|
|
415
187
|
],
|
|
416
|
-
"name": "
|
|
417
|
-
"type": "event"
|
|
418
|
-
},
|
|
419
|
-
{
|
|
420
|
-
"inputs": [],
|
|
421
|
-
"name": "CANCEL_AUTHORIZATION_TYPEHASH",
|
|
188
|
+
"name": "approve",
|
|
422
189
|
"outputs": [
|
|
423
190
|
{
|
|
424
|
-
"internalType": "
|
|
191
|
+
"internalType": "bool",
|
|
425
192
|
"name": "",
|
|
426
|
-
"type": "
|
|
193
|
+
"type": "bool"
|
|
427
194
|
}
|
|
428
195
|
],
|
|
429
|
-
"stateMutability": "
|
|
196
|
+
"stateMutability": "nonpayable",
|
|
430
197
|
"type": "function"
|
|
431
198
|
},
|
|
432
199
|
{
|
|
433
|
-
"inputs": [
|
|
434
|
-
"name": "DOMAIN_SEPARATOR",
|
|
435
|
-
"outputs": [
|
|
200
|
+
"inputs": [
|
|
436
201
|
{
|
|
437
|
-
"internalType": "
|
|
438
|
-
"name": "",
|
|
439
|
-
"type": "
|
|
202
|
+
"internalType": "address",
|
|
203
|
+
"name": "account",
|
|
204
|
+
"type": "address"
|
|
440
205
|
}
|
|
441
206
|
],
|
|
442
|
-
"
|
|
443
|
-
"type": "function"
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
"inputs": [],
|
|
447
|
-
"name": "MIN_APPLICATION_PERIOD",
|
|
207
|
+
"name": "balanceOf",
|
|
448
208
|
"outputs": [
|
|
449
209
|
{
|
|
450
210
|
"internalType": "uint256",
|
|
@@ -457,12 +217,12 @@ export const DecentralizedEURO_jsonAbi = [
|
|
|
457
217
|
},
|
|
458
218
|
{
|
|
459
219
|
"inputs": [],
|
|
460
|
-
"name": "
|
|
220
|
+
"name": "decimals",
|
|
461
221
|
"outputs": [
|
|
462
222
|
{
|
|
463
|
-
"internalType": "
|
|
223
|
+
"internalType": "uint8",
|
|
464
224
|
"name": "",
|
|
465
|
-
"type": "
|
|
225
|
+
"type": "uint8"
|
|
466
226
|
}
|
|
467
227
|
],
|
|
468
228
|
"stateMutability": "view",
|
|
@@ -470,12 +230,12 @@ export const DecentralizedEURO_jsonAbi = [
|
|
|
470
230
|
},
|
|
471
231
|
{
|
|
472
232
|
"inputs": [],
|
|
473
|
-
"name": "
|
|
233
|
+
"name": "name",
|
|
474
234
|
"outputs": [
|
|
475
235
|
{
|
|
476
|
-
"internalType": "
|
|
236
|
+
"internalType": "string",
|
|
477
237
|
"name": "",
|
|
478
|
-
"type": "
|
|
238
|
+
"type": "string"
|
|
479
239
|
}
|
|
480
240
|
],
|
|
481
241
|
"stateMutability": "view",
|
|
@@ -483,31 +243,20 @@ export const DecentralizedEURO_jsonAbi = [
|
|
|
483
243
|
},
|
|
484
244
|
{
|
|
485
245
|
"inputs": [],
|
|
486
|
-
"name": "
|
|
246
|
+
"name": "symbol",
|
|
487
247
|
"outputs": [
|
|
488
248
|
{
|
|
489
|
-
"internalType": "
|
|
249
|
+
"internalType": "string",
|
|
490
250
|
"name": "",
|
|
491
|
-
"type": "
|
|
251
|
+
"type": "string"
|
|
492
252
|
}
|
|
493
253
|
],
|
|
494
254
|
"stateMutability": "view",
|
|
495
255
|
"type": "function"
|
|
496
256
|
},
|
|
497
257
|
{
|
|
498
|
-
"inputs": [
|
|
499
|
-
|
|
500
|
-
"internalType": "address",
|
|
501
|
-
"name": "owner",
|
|
502
|
-
"type": "address"
|
|
503
|
-
},
|
|
504
|
-
{
|
|
505
|
-
"internalType": "address",
|
|
506
|
-
"name": "spender",
|
|
507
|
-
"type": "address"
|
|
508
|
-
}
|
|
509
|
-
],
|
|
510
|
-
"name": "allowance",
|
|
258
|
+
"inputs": [],
|
|
259
|
+
"name": "totalSupply",
|
|
511
260
|
"outputs": [
|
|
512
261
|
{
|
|
513
262
|
"internalType": "uint256",
|
|
@@ -522,7 +271,7 @@ export const DecentralizedEURO_jsonAbi = [
|
|
|
522
271
|
"inputs": [
|
|
523
272
|
{
|
|
524
273
|
"internalType": "address",
|
|
525
|
-
"name": "
|
|
274
|
+
"name": "to",
|
|
526
275
|
"type": "address"
|
|
527
276
|
},
|
|
528
277
|
{
|
|
@@ -531,31 +280,7 @@ export const DecentralizedEURO_jsonAbi = [
|
|
|
531
280
|
"type": "uint256"
|
|
532
281
|
}
|
|
533
282
|
],
|
|
534
|
-
"name": "
|
|
535
|
-
"outputs": [
|
|
536
|
-
{
|
|
537
|
-
"internalType": "bool",
|
|
538
|
-
"name": "",
|
|
539
|
-
"type": "bool"
|
|
540
|
-
}
|
|
541
|
-
],
|
|
542
|
-
"stateMutability": "nonpayable",
|
|
543
|
-
"type": "function"
|
|
544
|
-
},
|
|
545
|
-
{
|
|
546
|
-
"inputs": [
|
|
547
|
-
{
|
|
548
|
-
"internalType": "address",
|
|
549
|
-
"name": "authorizer",
|
|
550
|
-
"type": "address"
|
|
551
|
-
},
|
|
552
|
-
{
|
|
553
|
-
"internalType": "bytes32",
|
|
554
|
-
"name": "nonce",
|
|
555
|
-
"type": "bytes32"
|
|
556
|
-
}
|
|
557
|
-
],
|
|
558
|
-
"name": "authorizationState",
|
|
283
|
+
"name": "transfer",
|
|
559
284
|
"outputs": [
|
|
560
285
|
{
|
|
561
286
|
"internalType": "bool",
|
|
@@ -563,38 +288,6 @@ export const DecentralizedEURO_jsonAbi = [
|
|
|
563
288
|
"type": "bool"
|
|
564
289
|
}
|
|
565
290
|
],
|
|
566
|
-
"stateMutability": "view",
|
|
567
|
-
"type": "function"
|
|
568
|
-
},
|
|
569
|
-
{
|
|
570
|
-
"inputs": [
|
|
571
|
-
{
|
|
572
|
-
"internalType": "address",
|
|
573
|
-
"name": "account",
|
|
574
|
-
"type": "address"
|
|
575
|
-
}
|
|
576
|
-
],
|
|
577
|
-
"name": "balanceOf",
|
|
578
|
-
"outputs": [
|
|
579
|
-
{
|
|
580
|
-
"internalType": "uint256",
|
|
581
|
-
"name": "",
|
|
582
|
-
"type": "uint256"
|
|
583
|
-
}
|
|
584
|
-
],
|
|
585
|
-
"stateMutability": "view",
|
|
586
|
-
"type": "function"
|
|
587
|
-
},
|
|
588
|
-
{
|
|
589
|
-
"inputs": [
|
|
590
|
-
{
|
|
591
|
-
"internalType": "uint256",
|
|
592
|
-
"name": "_amount",
|
|
593
|
-
"type": "uint256"
|
|
594
|
-
}
|
|
595
|
-
],
|
|
596
|
-
"name": "burn",
|
|
597
|
-
"outputs": [],
|
|
598
291
|
"stateMutability": "nonpayable",
|
|
599
292
|
"type": "function"
|
|
600
293
|
},
|
|
@@ -602,1845 +295,254 @@ export const DecentralizedEURO_jsonAbi = [
|
|
|
602
295
|
"inputs": [
|
|
603
296
|
{
|
|
604
297
|
"internalType": "address",
|
|
605
|
-
"name": "
|
|
298
|
+
"name": "from",
|
|
606
299
|
"type": "address"
|
|
607
300
|
},
|
|
608
|
-
{
|
|
609
|
-
"internalType": "uint256",
|
|
610
|
-
"name": "_amount",
|
|
611
|
-
"type": "uint256"
|
|
612
|
-
}
|
|
613
|
-
],
|
|
614
|
-
"name": "burnFrom",
|
|
615
|
-
"outputs": [],
|
|
616
|
-
"stateMutability": "nonpayable",
|
|
617
|
-
"type": "function"
|
|
618
|
-
},
|
|
619
|
-
{
|
|
620
|
-
"inputs": [
|
|
621
301
|
{
|
|
622
302
|
"internalType": "address",
|
|
623
|
-
"name": "
|
|
303
|
+
"name": "to",
|
|
624
304
|
"type": "address"
|
|
625
305
|
},
|
|
626
306
|
{
|
|
627
307
|
"internalType": "uint256",
|
|
628
|
-
"name": "
|
|
629
|
-
"type": "uint256"
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
"internalType": "uint32",
|
|
633
|
-
"name": "reservePPM",
|
|
634
|
-
"type": "uint32"
|
|
635
|
-
}
|
|
636
|
-
],
|
|
637
|
-
"name": "burnFromWithReserve",
|
|
638
|
-
"outputs": [
|
|
639
|
-
{
|
|
640
|
-
"internalType": "uint256",
|
|
641
|
-
"name": "",
|
|
642
|
-
"type": "uint256"
|
|
643
|
-
}
|
|
644
|
-
],
|
|
645
|
-
"stateMutability": "nonpayable",
|
|
646
|
-
"type": "function"
|
|
647
|
-
},
|
|
648
|
-
{
|
|
649
|
-
"inputs": [
|
|
650
|
-
{
|
|
651
|
-
"internalType": "uint256",
|
|
652
|
-
"name": "amount",
|
|
653
|
-
"type": "uint256"
|
|
654
|
-
},
|
|
655
|
-
{
|
|
656
|
-
"internalType": "uint32",
|
|
657
|
-
"name": "reservePPM",
|
|
658
|
-
"type": "uint32"
|
|
659
|
-
}
|
|
660
|
-
],
|
|
661
|
-
"name": "burnWithoutReserve",
|
|
662
|
-
"outputs": [],
|
|
663
|
-
"stateMutability": "nonpayable",
|
|
664
|
-
"type": "function"
|
|
665
|
-
},
|
|
666
|
-
{
|
|
667
|
-
"inputs": [
|
|
668
|
-
{
|
|
669
|
-
"internalType": "uint256",
|
|
670
|
-
"name": "mintedAmount",
|
|
671
|
-
"type": "uint256"
|
|
672
|
-
},
|
|
673
|
-
{
|
|
674
|
-
"internalType": "uint32",
|
|
675
|
-
"name": "_reservePPM",
|
|
676
|
-
"type": "uint32"
|
|
677
|
-
}
|
|
678
|
-
],
|
|
679
|
-
"name": "calculateAssignedReserve",
|
|
680
|
-
"outputs": [
|
|
681
|
-
{
|
|
682
|
-
"internalType": "uint256",
|
|
683
|
-
"name": "",
|
|
684
|
-
"type": "uint256"
|
|
685
|
-
}
|
|
686
|
-
],
|
|
687
|
-
"stateMutability": "view",
|
|
688
|
-
"type": "function"
|
|
689
|
-
},
|
|
690
|
-
{
|
|
691
|
-
"inputs": [
|
|
692
|
-
{
|
|
693
|
-
"internalType": "uint256",
|
|
694
|
-
"name": "amountExcludingReserve",
|
|
308
|
+
"name": "value",
|
|
695
309
|
"type": "uint256"
|
|
696
|
-
},
|
|
697
|
-
{
|
|
698
|
-
"internalType": "uint32",
|
|
699
|
-
"name": "_reservePPM",
|
|
700
|
-
"type": "uint32"
|
|
701
310
|
}
|
|
702
311
|
],
|
|
703
|
-
"name": "
|
|
312
|
+
"name": "transferFrom",
|
|
704
313
|
"outputs": [
|
|
705
314
|
{
|
|
706
|
-
"internalType": "
|
|
315
|
+
"internalType": "bool",
|
|
707
316
|
"name": "",
|
|
708
|
-
"type": "
|
|
709
|
-
}
|
|
710
|
-
],
|
|
711
|
-
"stateMutability": "view",
|
|
712
|
-
"type": "function"
|
|
713
|
-
},
|
|
714
|
-
{
|
|
715
|
-
"inputs": [
|
|
716
|
-
{
|
|
717
|
-
"internalType": "address",
|
|
718
|
-
"name": "authorizer",
|
|
719
|
-
"type": "address"
|
|
720
|
-
},
|
|
721
|
-
{
|
|
722
|
-
"internalType": "bytes32",
|
|
723
|
-
"name": "nonce",
|
|
724
|
-
"type": "bytes32"
|
|
725
|
-
},
|
|
726
|
-
{
|
|
727
|
-
"internalType": "uint8",
|
|
728
|
-
"name": "v",
|
|
729
|
-
"type": "uint8"
|
|
730
|
-
},
|
|
731
|
-
{
|
|
732
|
-
"internalType": "bytes32",
|
|
733
|
-
"name": "r",
|
|
734
|
-
"type": "bytes32"
|
|
735
|
-
},
|
|
736
|
-
{
|
|
737
|
-
"internalType": "bytes32",
|
|
738
|
-
"name": "s",
|
|
739
|
-
"type": "bytes32"
|
|
740
|
-
}
|
|
741
|
-
],
|
|
742
|
-
"name": "cancelAuthorization",
|
|
743
|
-
"outputs": [],
|
|
744
|
-
"stateMutability": "nonpayable",
|
|
745
|
-
"type": "function"
|
|
746
|
-
},
|
|
747
|
-
{
|
|
748
|
-
"inputs": [
|
|
749
|
-
{
|
|
750
|
-
"internalType": "address",
|
|
751
|
-
"name": "source",
|
|
752
|
-
"type": "address"
|
|
753
|
-
},
|
|
754
|
-
{
|
|
755
|
-
"internalType": "uint256",
|
|
756
|
-
"name": "_amount",
|
|
757
|
-
"type": "uint256"
|
|
758
|
-
}
|
|
759
|
-
],
|
|
760
|
-
"name": "collectProfits",
|
|
761
|
-
"outputs": [],
|
|
762
|
-
"stateMutability": "nonpayable",
|
|
763
|
-
"type": "function"
|
|
764
|
-
},
|
|
765
|
-
{
|
|
766
|
-
"inputs": [
|
|
767
|
-
{
|
|
768
|
-
"internalType": "address",
|
|
769
|
-
"name": "source",
|
|
770
|
-
"type": "address"
|
|
771
|
-
},
|
|
772
|
-
{
|
|
773
|
-
"internalType": "uint256",
|
|
774
|
-
"name": "_amount",
|
|
775
|
-
"type": "uint256"
|
|
317
|
+
"type": "bool"
|
|
776
318
|
}
|
|
777
319
|
],
|
|
778
|
-
"name": "coverLoss",
|
|
779
|
-
"outputs": [],
|
|
780
320
|
"stateMutability": "nonpayable",
|
|
781
321
|
"type": "function"
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
322
|
+
}
|
|
323
|
+
] as const satisfies Abi;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Type-safe ABI for DecentralizedEURO_json
|
|
327
|
+
*/
|
|
328
|
+
export type DecentralizedEURO_jsonAbi = typeof DecentralizedEURO_jsonAbi;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Contract instance type for DecentralizedEURO_json
|
|
332
|
+
*/
|
|
333
|
+
// Use any for contract type to avoid complex viem type issues
|
|
334
|
+
// The runtime behavior is type-safe through viem's ABI typing
|
|
335
|
+
export type DecentralizedEURO_jsonContract = any;
|
|
336
|
+
|
|
337
|
+
/**
|
|
338
|
+
* DecentralizedEURO_json Contract Class
|
|
339
|
+
*
|
|
340
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
341
|
+
*
|
|
342
|
+
* @example
|
|
343
|
+
* ```typescript
|
|
344
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
345
|
+
* import { mainnet } from 'viem/chains';
|
|
346
|
+
* import { DecentralizedEURO_json } from 'DecentralizedEURO_json';
|
|
347
|
+
*
|
|
348
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
349
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
350
|
+
*
|
|
351
|
+
* const contract = new DecentralizedEURO_json('0x...', { publicClient, walletClient });
|
|
352
|
+
*
|
|
353
|
+
* // Read functions
|
|
354
|
+
* const result = await contract.balanceOf('0x...');
|
|
355
|
+
*
|
|
356
|
+
* // Write functions
|
|
357
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
358
|
+
*
|
|
359
|
+
* // Simulate transactions (dry-run)
|
|
360
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
361
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
362
|
+
*
|
|
363
|
+
* // Watch events
|
|
364
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
365
|
+
* console.log('Transfer event:', event);
|
|
366
|
+
* });
|
|
367
|
+
* ```
|
|
368
|
+
*/
|
|
369
|
+
export class DecentralizedEURO_json {
|
|
370
|
+
private contract: DecentralizedEURO_jsonContract;
|
|
371
|
+
private contractAddress: Address;
|
|
372
|
+
private publicClient: PublicClient;
|
|
373
|
+
|
|
374
|
+
constructor(
|
|
375
|
+
address: Address,
|
|
376
|
+
clients: {
|
|
377
|
+
publicClient: PublicClient;
|
|
378
|
+
walletClient?: WalletClient;
|
|
379
|
+
}
|
|
380
|
+
) {
|
|
381
|
+
this.contractAddress = address;
|
|
382
|
+
this.publicClient = clients.publicClient;
|
|
383
|
+
this.contract = getContract({
|
|
384
|
+
address,
|
|
385
|
+
abi: DecentralizedEURO_jsonAbi,
|
|
386
|
+
client: {
|
|
387
|
+
public: clients.publicClient,
|
|
388
|
+
wallet: clients.walletClient,
|
|
807
389
|
},
|
|
808
|
-
|
|
809
|
-
"internalType": "string",
|
|
810
|
-
"name": "_message",
|
|
811
|
-
"type": "string"
|
|
812
|
-
}
|
|
813
|
-
],
|
|
814
|
-
"name": "denyMinter",
|
|
815
|
-
"outputs": [],
|
|
816
|
-
"stateMutability": "nonpayable",
|
|
817
|
-
"type": "function"
|
|
818
|
-
},
|
|
819
|
-
{
|
|
820
|
-
"inputs": [
|
|
821
|
-
{
|
|
822
|
-
"internalType": "address",
|
|
823
|
-
"name": "recipient",
|
|
824
|
-
"type": "address"
|
|
825
|
-
},
|
|
826
|
-
{
|
|
827
|
-
"internalType": "uint256",
|
|
828
|
-
"name": "amount",
|
|
829
|
-
"type": "uint256"
|
|
830
|
-
}
|
|
831
|
-
],
|
|
832
|
-
"name": "distributeProfits",
|
|
833
|
-
"outputs": [],
|
|
834
|
-
"stateMutability": "nonpayable",
|
|
835
|
-
"type": "function"
|
|
836
|
-
},
|
|
837
|
-
{
|
|
838
|
-
"inputs": [],
|
|
839
|
-
"name": "eip712Domain",
|
|
840
|
-
"outputs": [
|
|
841
|
-
{
|
|
842
|
-
"internalType": "bytes1",
|
|
843
|
-
"name": "fields",
|
|
844
|
-
"type": "bytes1"
|
|
845
|
-
},
|
|
846
|
-
{
|
|
847
|
-
"internalType": "string",
|
|
848
|
-
"name": "name",
|
|
849
|
-
"type": "string"
|
|
850
|
-
},
|
|
851
|
-
{
|
|
852
|
-
"internalType": "string",
|
|
853
|
-
"name": "version",
|
|
854
|
-
"type": "string"
|
|
855
|
-
},
|
|
856
|
-
{
|
|
857
|
-
"internalType": "uint256",
|
|
858
|
-
"name": "chainId",
|
|
859
|
-
"type": "uint256"
|
|
860
|
-
},
|
|
861
|
-
{
|
|
862
|
-
"internalType": "address",
|
|
863
|
-
"name": "verifyingContract",
|
|
864
|
-
"type": "address"
|
|
865
|
-
},
|
|
866
|
-
{
|
|
867
|
-
"internalType": "bytes32",
|
|
868
|
-
"name": "salt",
|
|
869
|
-
"type": "bytes32"
|
|
870
|
-
},
|
|
871
|
-
{
|
|
872
|
-
"internalType": "uint256[]",
|
|
873
|
-
"name": "extensions",
|
|
874
|
-
"type": "uint256[]"
|
|
875
|
-
}
|
|
876
|
-
],
|
|
877
|
-
"stateMutability": "view",
|
|
878
|
-
"type": "function"
|
|
879
|
-
},
|
|
880
|
-
{
|
|
881
|
-
"inputs": [],
|
|
882
|
-
"name": "equity",
|
|
883
|
-
"outputs": [
|
|
884
|
-
{
|
|
885
|
-
"internalType": "uint256",
|
|
886
|
-
"name": "",
|
|
887
|
-
"type": "uint256"
|
|
888
|
-
}
|
|
889
|
-
],
|
|
890
|
-
"stateMutability": "view",
|
|
891
|
-
"type": "function"
|
|
892
|
-
},
|
|
893
|
-
{
|
|
894
|
-
"inputs": [
|
|
895
|
-
{
|
|
896
|
-
"internalType": "address",
|
|
897
|
-
"name": "_position",
|
|
898
|
-
"type": "address"
|
|
899
|
-
}
|
|
900
|
-
],
|
|
901
|
-
"name": "getPositionParent",
|
|
902
|
-
"outputs": [
|
|
903
|
-
{
|
|
904
|
-
"internalType": "address",
|
|
905
|
-
"name": "",
|
|
906
|
-
"type": "address"
|
|
907
|
-
}
|
|
908
|
-
],
|
|
909
|
-
"stateMutability": "view",
|
|
910
|
-
"type": "function"
|
|
911
|
-
},
|
|
912
|
-
{
|
|
913
|
-
"inputs": [
|
|
914
|
-
{
|
|
915
|
-
"internalType": "address",
|
|
916
|
-
"name": "_minter",
|
|
917
|
-
"type": "address"
|
|
918
|
-
},
|
|
919
|
-
{
|
|
920
|
-
"internalType": "string",
|
|
921
|
-
"name": "_message",
|
|
922
|
-
"type": "string"
|
|
923
|
-
}
|
|
924
|
-
],
|
|
925
|
-
"name": "initialize",
|
|
926
|
-
"outputs": [],
|
|
927
|
-
"stateMutability": "nonpayable",
|
|
928
|
-
"type": "function"
|
|
929
|
-
},
|
|
930
|
-
{
|
|
931
|
-
"inputs": [
|
|
932
|
-
{
|
|
933
|
-
"internalType": "address",
|
|
934
|
-
"name": "_minter",
|
|
935
|
-
"type": "address"
|
|
936
|
-
}
|
|
937
|
-
],
|
|
938
|
-
"name": "isMinter",
|
|
939
|
-
"outputs": [
|
|
940
|
-
{
|
|
941
|
-
"internalType": "bool",
|
|
942
|
-
"name": "",
|
|
943
|
-
"type": "bool"
|
|
944
|
-
}
|
|
945
|
-
],
|
|
946
|
-
"stateMutability": "view",
|
|
947
|
-
"type": "function"
|
|
948
|
-
},
|
|
949
|
-
{
|
|
950
|
-
"inputs": [
|
|
951
|
-
{
|
|
952
|
-
"internalType": "address",
|
|
953
|
-
"name": "_target",
|
|
954
|
-
"type": "address"
|
|
955
|
-
},
|
|
956
|
-
{
|
|
957
|
-
"internalType": "uint256",
|
|
958
|
-
"name": "_amount",
|
|
959
|
-
"type": "uint256"
|
|
960
|
-
}
|
|
961
|
-
],
|
|
962
|
-
"name": "mint",
|
|
963
|
-
"outputs": [],
|
|
964
|
-
"stateMutability": "nonpayable",
|
|
965
|
-
"type": "function"
|
|
966
|
-
},
|
|
967
|
-
{
|
|
968
|
-
"inputs": [
|
|
969
|
-
{
|
|
970
|
-
"internalType": "address",
|
|
971
|
-
"name": "_target",
|
|
972
|
-
"type": "address"
|
|
973
|
-
},
|
|
974
|
-
{
|
|
975
|
-
"internalType": "uint256",
|
|
976
|
-
"name": "_amount",
|
|
977
|
-
"type": "uint256"
|
|
978
|
-
},
|
|
979
|
-
{
|
|
980
|
-
"internalType": "uint32",
|
|
981
|
-
"name": "_reservePPM",
|
|
982
|
-
"type": "uint32"
|
|
983
|
-
}
|
|
984
|
-
],
|
|
985
|
-
"name": "mintWithReserve",
|
|
986
|
-
"outputs": [],
|
|
987
|
-
"stateMutability": "nonpayable",
|
|
988
|
-
"type": "function"
|
|
989
|
-
},
|
|
990
|
-
{
|
|
991
|
-
"inputs": [],
|
|
992
|
-
"name": "minterReserve",
|
|
993
|
-
"outputs": [
|
|
994
|
-
{
|
|
995
|
-
"internalType": "uint256",
|
|
996
|
-
"name": "",
|
|
997
|
-
"type": "uint256"
|
|
998
|
-
}
|
|
999
|
-
],
|
|
1000
|
-
"stateMutability": "view",
|
|
1001
|
-
"type": "function"
|
|
1002
|
-
},
|
|
1003
|
-
{
|
|
1004
|
-
"inputs": [
|
|
1005
|
-
{
|
|
1006
|
-
"internalType": "address",
|
|
1007
|
-
"name": "minter",
|
|
1008
|
-
"type": "address"
|
|
1009
|
-
}
|
|
1010
|
-
],
|
|
1011
|
-
"name": "minters",
|
|
1012
|
-
"outputs": [
|
|
1013
|
-
{
|
|
1014
|
-
"internalType": "uint256",
|
|
1015
|
-
"name": "validityStart",
|
|
1016
|
-
"type": "uint256"
|
|
1017
|
-
}
|
|
1018
|
-
],
|
|
1019
|
-
"stateMutability": "view",
|
|
1020
|
-
"type": "function"
|
|
1021
|
-
},
|
|
1022
|
-
{
|
|
1023
|
-
"inputs": [],
|
|
1024
|
-
"name": "name",
|
|
1025
|
-
"outputs": [
|
|
1026
|
-
{
|
|
1027
|
-
"internalType": "string",
|
|
1028
|
-
"name": "",
|
|
1029
|
-
"type": "string"
|
|
1030
|
-
}
|
|
1031
|
-
],
|
|
1032
|
-
"stateMutability": "view",
|
|
1033
|
-
"type": "function"
|
|
1034
|
-
},
|
|
1035
|
-
{
|
|
1036
|
-
"inputs": [
|
|
1037
|
-
{
|
|
1038
|
-
"internalType": "address",
|
|
1039
|
-
"name": "owner",
|
|
1040
|
-
"type": "address"
|
|
1041
|
-
}
|
|
1042
|
-
],
|
|
1043
|
-
"name": "nonces",
|
|
1044
|
-
"outputs": [
|
|
1045
|
-
{
|
|
1046
|
-
"internalType": "uint256",
|
|
1047
|
-
"name": "",
|
|
1048
|
-
"type": "uint256"
|
|
1049
|
-
}
|
|
1050
|
-
],
|
|
1051
|
-
"stateMutability": "view",
|
|
1052
|
-
"type": "function"
|
|
1053
|
-
},
|
|
1054
|
-
{
|
|
1055
|
-
"inputs": [
|
|
1056
|
-
{
|
|
1057
|
-
"internalType": "address",
|
|
1058
|
-
"name": "owner",
|
|
1059
|
-
"type": "address"
|
|
1060
|
-
},
|
|
1061
|
-
{
|
|
1062
|
-
"internalType": "address",
|
|
1063
|
-
"name": "spender",
|
|
1064
|
-
"type": "address"
|
|
1065
|
-
},
|
|
1066
|
-
{
|
|
1067
|
-
"internalType": "uint256",
|
|
1068
|
-
"name": "value",
|
|
1069
|
-
"type": "uint256"
|
|
1070
|
-
},
|
|
1071
|
-
{
|
|
1072
|
-
"internalType": "uint256",
|
|
1073
|
-
"name": "deadline",
|
|
1074
|
-
"type": "uint256"
|
|
1075
|
-
},
|
|
1076
|
-
{
|
|
1077
|
-
"internalType": "uint8",
|
|
1078
|
-
"name": "v",
|
|
1079
|
-
"type": "uint8"
|
|
1080
|
-
},
|
|
1081
|
-
{
|
|
1082
|
-
"internalType": "bytes32",
|
|
1083
|
-
"name": "r",
|
|
1084
|
-
"type": "bytes32"
|
|
1085
|
-
},
|
|
1086
|
-
{
|
|
1087
|
-
"internalType": "bytes32",
|
|
1088
|
-
"name": "s",
|
|
1089
|
-
"type": "bytes32"
|
|
1090
|
-
}
|
|
1091
|
-
],
|
|
1092
|
-
"name": "permit",
|
|
1093
|
-
"outputs": [],
|
|
1094
|
-
"stateMutability": "nonpayable",
|
|
1095
|
-
"type": "function"
|
|
1096
|
-
},
|
|
1097
|
-
{
|
|
1098
|
-
"inputs": [
|
|
1099
|
-
{
|
|
1100
|
-
"internalType": "address",
|
|
1101
|
-
"name": "position",
|
|
1102
|
-
"type": "address"
|
|
1103
|
-
}
|
|
1104
|
-
],
|
|
1105
|
-
"name": "positions",
|
|
1106
|
-
"outputs": [
|
|
1107
|
-
{
|
|
1108
|
-
"internalType": "address",
|
|
1109
|
-
"name": "registeringMinter",
|
|
1110
|
-
"type": "address"
|
|
1111
|
-
}
|
|
1112
|
-
],
|
|
1113
|
-
"stateMutability": "view",
|
|
1114
|
-
"type": "function"
|
|
1115
|
-
},
|
|
1116
|
-
{
|
|
1117
|
-
"inputs": [
|
|
1118
|
-
{
|
|
1119
|
-
"internalType": "address",
|
|
1120
|
-
"name": "from",
|
|
1121
|
-
"type": "address"
|
|
1122
|
-
},
|
|
1123
|
-
{
|
|
1124
|
-
"internalType": "address",
|
|
1125
|
-
"name": "to",
|
|
1126
|
-
"type": "address"
|
|
1127
|
-
},
|
|
1128
|
-
{
|
|
1129
|
-
"internalType": "uint256",
|
|
1130
|
-
"name": "value",
|
|
1131
|
-
"type": "uint256"
|
|
1132
|
-
},
|
|
1133
|
-
{
|
|
1134
|
-
"internalType": "uint256",
|
|
1135
|
-
"name": "validAfter",
|
|
1136
|
-
"type": "uint256"
|
|
1137
|
-
},
|
|
1138
|
-
{
|
|
1139
|
-
"internalType": "uint256",
|
|
1140
|
-
"name": "validBefore",
|
|
1141
|
-
"type": "uint256"
|
|
1142
|
-
},
|
|
1143
|
-
{
|
|
1144
|
-
"internalType": "bytes32",
|
|
1145
|
-
"name": "nonce",
|
|
1146
|
-
"type": "bytes32"
|
|
1147
|
-
},
|
|
1148
|
-
{
|
|
1149
|
-
"internalType": "uint8",
|
|
1150
|
-
"name": "v",
|
|
1151
|
-
"type": "uint8"
|
|
1152
|
-
},
|
|
1153
|
-
{
|
|
1154
|
-
"internalType": "bytes32",
|
|
1155
|
-
"name": "r",
|
|
1156
|
-
"type": "bytes32"
|
|
1157
|
-
},
|
|
1158
|
-
{
|
|
1159
|
-
"internalType": "bytes32",
|
|
1160
|
-
"name": "s",
|
|
1161
|
-
"type": "bytes32"
|
|
1162
|
-
}
|
|
1163
|
-
],
|
|
1164
|
-
"name": "receiveWithAuthorization",
|
|
1165
|
-
"outputs": [],
|
|
1166
|
-
"stateMutability": "nonpayable",
|
|
1167
|
-
"type": "function"
|
|
1168
|
-
},
|
|
1169
|
-
{
|
|
1170
|
-
"inputs": [
|
|
1171
|
-
{
|
|
1172
|
-
"internalType": "address",
|
|
1173
|
-
"name": "_position",
|
|
1174
|
-
"type": "address"
|
|
1175
|
-
}
|
|
1176
|
-
],
|
|
1177
|
-
"name": "registerPosition",
|
|
1178
|
-
"outputs": [],
|
|
1179
|
-
"stateMutability": "nonpayable",
|
|
1180
|
-
"type": "function"
|
|
1181
|
-
},
|
|
1182
|
-
{
|
|
1183
|
-
"inputs": [],
|
|
1184
|
-
"name": "reserve",
|
|
1185
|
-
"outputs": [
|
|
1186
|
-
{
|
|
1187
|
-
"internalType": "contract IReserve",
|
|
1188
|
-
"name": "",
|
|
1189
|
-
"type": "address"
|
|
1190
|
-
}
|
|
1191
|
-
],
|
|
1192
|
-
"stateMutability": "view",
|
|
1193
|
-
"type": "function"
|
|
1194
|
-
},
|
|
1195
|
-
{
|
|
1196
|
-
"inputs": [
|
|
1197
|
-
{
|
|
1198
|
-
"internalType": "address",
|
|
1199
|
-
"name": "_minter",
|
|
1200
|
-
"type": "address"
|
|
1201
|
-
},
|
|
1202
|
-
{
|
|
1203
|
-
"internalType": "uint256",
|
|
1204
|
-
"name": "_applicationPeriod",
|
|
1205
|
-
"type": "uint256"
|
|
1206
|
-
},
|
|
1207
|
-
{
|
|
1208
|
-
"internalType": "uint256",
|
|
1209
|
-
"name": "_applicationFee",
|
|
1210
|
-
"type": "uint256"
|
|
1211
|
-
},
|
|
1212
|
-
{
|
|
1213
|
-
"internalType": "string",
|
|
1214
|
-
"name": "_message",
|
|
1215
|
-
"type": "string"
|
|
1216
|
-
}
|
|
1217
|
-
],
|
|
1218
|
-
"name": "suggestMinter",
|
|
1219
|
-
"outputs": [],
|
|
1220
|
-
"stateMutability": "nonpayable",
|
|
1221
|
-
"type": "function"
|
|
1222
|
-
},
|
|
1223
|
-
{
|
|
1224
|
-
"inputs": [
|
|
1225
|
-
{
|
|
1226
|
-
"internalType": "bytes4",
|
|
1227
|
-
"name": "interfaceId",
|
|
1228
|
-
"type": "bytes4"
|
|
1229
|
-
}
|
|
1230
|
-
],
|
|
1231
|
-
"name": "supportsInterface",
|
|
1232
|
-
"outputs": [
|
|
1233
|
-
{
|
|
1234
|
-
"internalType": "bool",
|
|
1235
|
-
"name": "",
|
|
1236
|
-
"type": "bool"
|
|
1237
|
-
}
|
|
1238
|
-
],
|
|
1239
|
-
"stateMutability": "view",
|
|
1240
|
-
"type": "function"
|
|
1241
|
-
},
|
|
1242
|
-
{
|
|
1243
|
-
"inputs": [],
|
|
1244
|
-
"name": "symbol",
|
|
1245
|
-
"outputs": [
|
|
1246
|
-
{
|
|
1247
|
-
"internalType": "string",
|
|
1248
|
-
"name": "",
|
|
1249
|
-
"type": "string"
|
|
1250
|
-
}
|
|
1251
|
-
],
|
|
1252
|
-
"stateMutability": "view",
|
|
1253
|
-
"type": "function"
|
|
1254
|
-
},
|
|
1255
|
-
{
|
|
1256
|
-
"inputs": [],
|
|
1257
|
-
"name": "totalSupply",
|
|
1258
|
-
"outputs": [
|
|
1259
|
-
{
|
|
1260
|
-
"internalType": "uint256",
|
|
1261
|
-
"name": "",
|
|
1262
|
-
"type": "uint256"
|
|
1263
|
-
}
|
|
1264
|
-
],
|
|
1265
|
-
"stateMutability": "view",
|
|
1266
|
-
"type": "function"
|
|
1267
|
-
},
|
|
1268
|
-
{
|
|
1269
|
-
"inputs": [
|
|
1270
|
-
{
|
|
1271
|
-
"internalType": "address",
|
|
1272
|
-
"name": "to",
|
|
1273
|
-
"type": "address"
|
|
1274
|
-
},
|
|
1275
|
-
{
|
|
1276
|
-
"internalType": "uint256",
|
|
1277
|
-
"name": "value",
|
|
1278
|
-
"type": "uint256"
|
|
1279
|
-
}
|
|
1280
|
-
],
|
|
1281
|
-
"name": "transfer",
|
|
1282
|
-
"outputs": [
|
|
1283
|
-
{
|
|
1284
|
-
"internalType": "bool",
|
|
1285
|
-
"name": "",
|
|
1286
|
-
"type": "bool"
|
|
1287
|
-
}
|
|
1288
|
-
],
|
|
1289
|
-
"stateMutability": "nonpayable",
|
|
1290
|
-
"type": "function"
|
|
1291
|
-
},
|
|
1292
|
-
{
|
|
1293
|
-
"inputs": [
|
|
1294
|
-
{
|
|
1295
|
-
"internalType": "address",
|
|
1296
|
-
"name": "from",
|
|
1297
|
-
"type": "address"
|
|
1298
|
-
},
|
|
1299
|
-
{
|
|
1300
|
-
"internalType": "address",
|
|
1301
|
-
"name": "to",
|
|
1302
|
-
"type": "address"
|
|
1303
|
-
},
|
|
1304
|
-
{
|
|
1305
|
-
"internalType": "uint256",
|
|
1306
|
-
"name": "value",
|
|
1307
|
-
"type": "uint256"
|
|
1308
|
-
}
|
|
1309
|
-
],
|
|
1310
|
-
"name": "transferFrom",
|
|
1311
|
-
"outputs": [
|
|
1312
|
-
{
|
|
1313
|
-
"internalType": "bool",
|
|
1314
|
-
"name": "",
|
|
1315
|
-
"type": "bool"
|
|
1316
|
-
}
|
|
1317
|
-
],
|
|
1318
|
-
"stateMutability": "nonpayable",
|
|
1319
|
-
"type": "function"
|
|
1320
|
-
},
|
|
1321
|
-
{
|
|
1322
|
-
"inputs": [
|
|
1323
|
-
{
|
|
1324
|
-
"internalType": "address",
|
|
1325
|
-
"name": "from",
|
|
1326
|
-
"type": "address"
|
|
1327
|
-
},
|
|
1328
|
-
{
|
|
1329
|
-
"internalType": "address",
|
|
1330
|
-
"name": "to",
|
|
1331
|
-
"type": "address"
|
|
1332
|
-
},
|
|
1333
|
-
{
|
|
1334
|
-
"internalType": "uint256",
|
|
1335
|
-
"name": "value",
|
|
1336
|
-
"type": "uint256"
|
|
1337
|
-
},
|
|
1338
|
-
{
|
|
1339
|
-
"internalType": "uint256",
|
|
1340
|
-
"name": "validAfter",
|
|
1341
|
-
"type": "uint256"
|
|
1342
|
-
},
|
|
1343
|
-
{
|
|
1344
|
-
"internalType": "uint256",
|
|
1345
|
-
"name": "validBefore",
|
|
1346
|
-
"type": "uint256"
|
|
1347
|
-
},
|
|
1348
|
-
{
|
|
1349
|
-
"internalType": "bytes32",
|
|
1350
|
-
"name": "nonce",
|
|
1351
|
-
"type": "bytes32"
|
|
1352
|
-
},
|
|
1353
|
-
{
|
|
1354
|
-
"internalType": "uint8",
|
|
1355
|
-
"name": "v",
|
|
1356
|
-
"type": "uint8"
|
|
1357
|
-
},
|
|
1358
|
-
{
|
|
1359
|
-
"internalType": "bytes32",
|
|
1360
|
-
"name": "r",
|
|
1361
|
-
"type": "bytes32"
|
|
1362
|
-
},
|
|
1363
|
-
{
|
|
1364
|
-
"internalType": "bytes32",
|
|
1365
|
-
"name": "s",
|
|
1366
|
-
"type": "bytes32"
|
|
1367
|
-
}
|
|
1368
|
-
],
|
|
1369
|
-
"name": "transferWithAuthorization",
|
|
1370
|
-
"outputs": [],
|
|
1371
|
-
"stateMutability": "nonpayable",
|
|
1372
|
-
"type": "function"
|
|
1373
|
-
}
|
|
1374
|
-
] as const satisfies Abi;
|
|
1375
|
-
|
|
1376
|
-
/**
|
|
1377
|
-
* Type-safe ABI for DecentralizedEURO_json
|
|
1378
|
-
*/
|
|
1379
|
-
export type DecentralizedEURO_jsonAbi = typeof DecentralizedEURO_jsonAbi;
|
|
1380
|
-
|
|
1381
|
-
/**
|
|
1382
|
-
* Contract instance type for DecentralizedEURO_json
|
|
1383
|
-
*/
|
|
1384
|
-
// Use any for contract type to avoid complex viem type issues
|
|
1385
|
-
// The runtime behavior is type-safe through viem's ABI typing
|
|
1386
|
-
export type DecentralizedEURO_jsonContract = any;
|
|
1387
|
-
|
|
1388
|
-
/**
|
|
1389
|
-
* DecentralizedEURO_json Contract Class
|
|
1390
|
-
*
|
|
1391
|
-
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
1392
|
-
*
|
|
1393
|
-
* @example
|
|
1394
|
-
* ```typescript
|
|
1395
|
-
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
1396
|
-
* import { mainnet } from 'viem/chains';
|
|
1397
|
-
* import { DecentralizedEURO_json } from 'DecentralizedEURO_json';
|
|
1398
|
-
*
|
|
1399
|
-
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
1400
|
-
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
1401
|
-
*
|
|
1402
|
-
* const contract = new DecentralizedEURO_json('0x...', { publicClient, walletClient });
|
|
1403
|
-
*
|
|
1404
|
-
* // Read functions
|
|
1405
|
-
* const result = await contract.balanceOf('0x...');
|
|
1406
|
-
*
|
|
1407
|
-
* // Write functions
|
|
1408
|
-
* const hash = await contract.transfer('0x...', 1000n);
|
|
1409
|
-
*
|
|
1410
|
-
* // Simulate transactions (dry-run)
|
|
1411
|
-
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
1412
|
-
* console.log('Gas estimate:', simulation.request.gas);
|
|
1413
|
-
*
|
|
1414
|
-
* // Watch events
|
|
1415
|
-
* const unwatch = contract.watch.Transfer((event) => {
|
|
1416
|
-
* console.log('Transfer event:', event);
|
|
1417
|
-
* });
|
|
1418
|
-
* ```
|
|
1419
|
-
*/
|
|
1420
|
-
export class DecentralizedEURO_json {
|
|
1421
|
-
private contract: DecentralizedEURO_jsonContract;
|
|
1422
|
-
private contractAddress: Address;
|
|
1423
|
-
private publicClient: PublicClient;
|
|
1424
|
-
|
|
1425
|
-
constructor(
|
|
1426
|
-
address: Address,
|
|
1427
|
-
clients: {
|
|
1428
|
-
publicClient: PublicClient;
|
|
1429
|
-
walletClient?: WalletClient;
|
|
1430
|
-
}
|
|
1431
|
-
) {
|
|
1432
|
-
this.contractAddress = address;
|
|
1433
|
-
this.publicClient = clients.publicClient;
|
|
1434
|
-
this.contract = getContract({
|
|
1435
|
-
address,
|
|
1436
|
-
abi: DecentralizedEURO_jsonAbi,
|
|
1437
|
-
client: {
|
|
1438
|
-
public: clients.publicClient,
|
|
1439
|
-
wallet: clients.walletClient,
|
|
1440
|
-
},
|
|
1441
|
-
});
|
|
1442
|
-
}
|
|
1443
|
-
|
|
1444
|
-
/**
|
|
1445
|
-
* Get the contract address
|
|
1446
|
-
*/
|
|
1447
|
-
get address(): Address {
|
|
1448
|
-
return this.contractAddress;
|
|
1449
|
-
}
|
|
1450
|
-
|
|
1451
|
-
/**
|
|
1452
|
-
* Get the underlying viem contract instance
|
|
1453
|
-
*/
|
|
1454
|
-
getContract(): DecentralizedEURO_jsonContract {
|
|
1455
|
-
return this.contract;
|
|
1456
|
-
}
|
|
1457
|
-
|
|
1458
|
-
/**
|
|
1459
|
-
* CANCEL_AUTHORIZATION_TYPEHASH
|
|
1460
|
-
* view
|
|
1461
|
-
*/
|
|
1462
|
-
async CANCEL_AUTHORIZATION_TYPEHASH(): Promise<`0x${string}`> {
|
|
1463
|
-
return this.contract.read.CANCEL_AUTHORIZATION_TYPEHASH() as Promise<`0x${string}`>;
|
|
1464
|
-
}
|
|
1465
|
-
|
|
1466
|
-
/**
|
|
1467
|
-
* DOMAIN_SEPARATOR
|
|
1468
|
-
* view
|
|
1469
|
-
*/
|
|
1470
|
-
async DOMAIN_SEPARATOR(): Promise<`0x${string}`> {
|
|
1471
|
-
return this.contract.read.DOMAIN_SEPARATOR() as Promise<`0x${string}`>;
|
|
1472
|
-
}
|
|
1473
|
-
|
|
1474
|
-
/**
|
|
1475
|
-
* MIN_APPLICATION_PERIOD
|
|
1476
|
-
* view
|
|
1477
|
-
*/
|
|
1478
|
-
async MIN_APPLICATION_PERIOD(): Promise<bigint> {
|
|
1479
|
-
return this.contract.read.MIN_APPLICATION_PERIOD() as Promise<bigint>;
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
|
-
/**
|
|
1483
|
-
* MIN_FEE
|
|
1484
|
-
* view
|
|
1485
|
-
*/
|
|
1486
|
-
async MIN_FEE(): Promise<bigint> {
|
|
1487
|
-
return this.contract.read.MIN_FEE() as Promise<bigint>;
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
/**
|
|
1491
|
-
* RECEIVE_WITH_AUTHORIZATION_TYPEHASH
|
|
1492
|
-
* view
|
|
1493
|
-
*/
|
|
1494
|
-
async RECEIVE_WITH_AUTHORIZATION_TYPEHASH(): Promise<`0x${string}`> {
|
|
1495
|
-
return this.contract.read.RECEIVE_WITH_AUTHORIZATION_TYPEHASH() as Promise<`0x${string}`>;
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
/**
|
|
1499
|
-
* TRANSFER_WITH_AUTHORIZATION_TYPEHASH
|
|
1500
|
-
* view
|
|
1501
|
-
*/
|
|
1502
|
-
async TRANSFER_WITH_AUTHORIZATION_TYPEHASH(): Promise<`0x${string}`> {
|
|
1503
|
-
return this.contract.read.TRANSFER_WITH_AUTHORIZATION_TYPEHASH() as Promise<`0x${string}`>;
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
/**
|
|
1507
|
-
* allowance
|
|
1508
|
-
* view
|
|
1509
|
-
*/
|
|
1510
|
-
async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
|
|
1511
|
-
return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
|
|
1512
|
-
}
|
|
1513
|
-
|
|
1514
|
-
/**
|
|
1515
|
-
* authorizationState
|
|
1516
|
-
* view
|
|
1517
|
-
*/
|
|
1518
|
-
async authorizationState(authorizer: `0x${string}`, nonce: `0x${string}`): Promise<boolean> {
|
|
1519
|
-
return this.contract.read.authorizationState([authorizer, nonce] as const) as Promise<boolean>;
|
|
1520
|
-
}
|
|
1521
|
-
|
|
1522
|
-
/**
|
|
1523
|
-
* balanceOf
|
|
1524
|
-
* view
|
|
1525
|
-
*/
|
|
1526
|
-
async balanceOf(account: `0x${string}`): Promise<bigint> {
|
|
1527
|
-
return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
|
|
1528
|
-
}
|
|
1529
|
-
|
|
1530
|
-
/**
|
|
1531
|
-
* calculateAssignedReserve
|
|
1532
|
-
* view
|
|
1533
|
-
*/
|
|
1534
|
-
async calculateAssignedReserve(mintedAmount: bigint, _reservePPM: bigint): Promise<bigint> {
|
|
1535
|
-
return this.contract.read.calculateAssignedReserve([mintedAmount, _reservePPM] as const) as Promise<bigint>;
|
|
1536
|
-
}
|
|
1537
|
-
|
|
1538
|
-
/**
|
|
1539
|
-
* calculateFreedAmount
|
|
1540
|
-
* view
|
|
1541
|
-
*/
|
|
1542
|
-
async calculateFreedAmount(amountExcludingReserve: bigint, _reservePPM: bigint): Promise<bigint> {
|
|
1543
|
-
return this.contract.read.calculateFreedAmount([amountExcludingReserve, _reservePPM] as const) as Promise<bigint>;
|
|
1544
|
-
}
|
|
1545
|
-
|
|
1546
|
-
/**
|
|
1547
|
-
* decimals
|
|
1548
|
-
* view
|
|
1549
|
-
*/
|
|
1550
|
-
async decimals(): Promise<bigint> {
|
|
1551
|
-
return this.contract.read.decimals() as Promise<bigint>;
|
|
1552
|
-
}
|
|
1553
|
-
|
|
1554
|
-
/**
|
|
1555
|
-
* eip712Domain
|
|
1556
|
-
* view
|
|
1557
|
-
*/
|
|
1558
|
-
async eip712Domain(): Promise<[`0x${string}`, string, string, bigint, `0x${string}`, `0x${string}`, bigint[]]> {
|
|
1559
|
-
return this.contract.read.eip712Domain() as Promise<[`0x${string}`, string, string, bigint, `0x${string}`, `0x${string}`, bigint[]]>;
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
/**
|
|
1563
|
-
* equity
|
|
1564
|
-
* view
|
|
1565
|
-
*/
|
|
1566
|
-
async equity(): Promise<bigint> {
|
|
1567
|
-
return this.contract.read.equity() as Promise<bigint>;
|
|
1568
|
-
}
|
|
1569
|
-
|
|
1570
|
-
/**
|
|
1571
|
-
* getPositionParent
|
|
1572
|
-
* view
|
|
1573
|
-
*/
|
|
1574
|
-
async getPositionParent(_position: `0x${string}`): Promise<`0x${string}`> {
|
|
1575
|
-
return this.contract.read.getPositionParent([_position] as const) as Promise<`0x${string}`>;
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1578
|
-
/**
|
|
1579
|
-
* isMinter
|
|
1580
|
-
* view
|
|
1581
|
-
*/
|
|
1582
|
-
async isMinter(_minter: `0x${string}`): Promise<boolean> {
|
|
1583
|
-
return this.contract.read.isMinter([_minter] as const) as Promise<boolean>;
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
/**
|
|
1587
|
-
* minterReserve
|
|
1588
|
-
* view
|
|
1589
|
-
*/
|
|
1590
|
-
async minterReserve(): Promise<bigint> {
|
|
1591
|
-
return this.contract.read.minterReserve() as Promise<bigint>;
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
|
-
/**
|
|
1595
|
-
* minters
|
|
1596
|
-
* view
|
|
1597
|
-
*/
|
|
1598
|
-
async minters(minter: `0x${string}`): Promise<bigint> {
|
|
1599
|
-
return this.contract.read.minters([minter] as const) as Promise<bigint>;
|
|
1600
|
-
}
|
|
1601
|
-
|
|
1602
|
-
/**
|
|
1603
|
-
* name
|
|
1604
|
-
* view
|
|
1605
|
-
*/
|
|
1606
|
-
async name(): Promise<string> {
|
|
1607
|
-
return this.contract.read.name() as Promise<string>;
|
|
1608
|
-
}
|
|
1609
|
-
|
|
1610
|
-
/**
|
|
1611
|
-
* nonces
|
|
1612
|
-
* view
|
|
1613
|
-
*/
|
|
1614
|
-
async nonces(owner: `0x${string}`): Promise<bigint> {
|
|
1615
|
-
return this.contract.read.nonces([owner] as const) as Promise<bigint>;
|
|
1616
|
-
}
|
|
1617
|
-
|
|
1618
|
-
/**
|
|
1619
|
-
* positions
|
|
1620
|
-
* view
|
|
1621
|
-
*/
|
|
1622
|
-
async positions(position: `0x${string}`): Promise<`0x${string}`> {
|
|
1623
|
-
return this.contract.read.positions([position] as const) as Promise<`0x${string}`>;
|
|
1624
|
-
}
|
|
1625
|
-
|
|
1626
|
-
/**
|
|
1627
|
-
* reserve
|
|
1628
|
-
* view
|
|
1629
|
-
*/
|
|
1630
|
-
async reserve(): Promise<`0x${string}`> {
|
|
1631
|
-
return this.contract.read.reserve() as Promise<`0x${string}`>;
|
|
1632
|
-
}
|
|
1633
|
-
|
|
1634
|
-
/**
|
|
1635
|
-
* supportsInterface
|
|
1636
|
-
* view
|
|
1637
|
-
*/
|
|
1638
|
-
async supportsInterface(interfaceId: `0x${string}`): Promise<boolean> {
|
|
1639
|
-
return this.contract.read.supportsInterface([interfaceId] as const) as Promise<boolean>;
|
|
1640
|
-
}
|
|
1641
|
-
|
|
1642
|
-
/**
|
|
1643
|
-
* symbol
|
|
1644
|
-
* view
|
|
1645
|
-
*/
|
|
1646
|
-
async symbol(): Promise<string> {
|
|
1647
|
-
return this.contract.read.symbol() as Promise<string>;
|
|
1648
|
-
}
|
|
1649
|
-
|
|
1650
|
-
/**
|
|
1651
|
-
* totalSupply
|
|
1652
|
-
* view
|
|
1653
|
-
*/
|
|
1654
|
-
async totalSupply(): Promise<bigint> {
|
|
1655
|
-
return this.contract.read.totalSupply() as Promise<bigint>;
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
|
-
/**
|
|
1659
|
-
* approve
|
|
1660
|
-
* nonpayable
|
|
1661
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1662
|
-
*/
|
|
1663
|
-
async approve(spender: `0x${string}`, value: bigint, options?: {
|
|
1664
|
-
accessList?: import('viem').AccessList;
|
|
1665
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1666
|
-
chain?: import('viem').Chain | null;
|
|
1667
|
-
dataSuffix?: `0x${string}`;
|
|
1668
|
-
gas?: bigint;
|
|
1669
|
-
gasPrice?: bigint;
|
|
1670
|
-
maxFeePerGas?: bigint;
|
|
1671
|
-
maxPriorityFeePerGas?: bigint;
|
|
1672
|
-
nonce?: number;
|
|
1673
|
-
value?: bigint;
|
|
1674
|
-
}): Promise<`0x${string}`> {
|
|
1675
|
-
if (!this.contract.write) {
|
|
1676
|
-
throw new Error('Wallet client is required for write operations');
|
|
1677
|
-
}
|
|
1678
|
-
return this.contract.write.approve([spender, value] as const, options) as Promise<`0x${string}`>;
|
|
1679
|
-
}
|
|
1680
|
-
|
|
1681
|
-
/**
|
|
1682
|
-
* burn
|
|
1683
|
-
* nonpayable
|
|
1684
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1685
|
-
*/
|
|
1686
|
-
async burn(_amount: bigint, options?: {
|
|
1687
|
-
accessList?: import('viem').AccessList;
|
|
1688
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1689
|
-
chain?: import('viem').Chain | null;
|
|
1690
|
-
dataSuffix?: `0x${string}`;
|
|
1691
|
-
gas?: bigint;
|
|
1692
|
-
gasPrice?: bigint;
|
|
1693
|
-
maxFeePerGas?: bigint;
|
|
1694
|
-
maxPriorityFeePerGas?: bigint;
|
|
1695
|
-
nonce?: number;
|
|
1696
|
-
value?: bigint;
|
|
1697
|
-
}): Promise<`0x${string}`> {
|
|
1698
|
-
if (!this.contract.write) {
|
|
1699
|
-
throw new Error('Wallet client is required for write operations');
|
|
1700
|
-
}
|
|
1701
|
-
return this.contract.write.burn([_amount] as const, options) as Promise<`0x${string}`>;
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
|
-
/**
|
|
1705
|
-
* burnFrom
|
|
1706
|
-
* nonpayable
|
|
1707
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1708
|
-
*/
|
|
1709
|
-
async burnFrom(_owner: `0x${string}`, _amount: bigint, options?: {
|
|
1710
|
-
accessList?: import('viem').AccessList;
|
|
1711
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1712
|
-
chain?: import('viem').Chain | null;
|
|
1713
|
-
dataSuffix?: `0x${string}`;
|
|
1714
|
-
gas?: bigint;
|
|
1715
|
-
gasPrice?: bigint;
|
|
1716
|
-
maxFeePerGas?: bigint;
|
|
1717
|
-
maxPriorityFeePerGas?: bigint;
|
|
1718
|
-
nonce?: number;
|
|
1719
|
-
value?: bigint;
|
|
1720
|
-
}): Promise<`0x${string}`> {
|
|
1721
|
-
if (!this.contract.write) {
|
|
1722
|
-
throw new Error('Wallet client is required for write operations');
|
|
1723
|
-
}
|
|
1724
|
-
return this.contract.write.burnFrom([_owner, _amount] as const, options) as Promise<`0x${string}`>;
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
/**
|
|
1728
|
-
* burnFromWithReserve
|
|
1729
|
-
* nonpayable
|
|
1730
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1731
|
-
*/
|
|
1732
|
-
async burnFromWithReserve(payer: `0x${string}`, targetTotalBurnAmount: bigint, reservePPM: bigint, options?: {
|
|
1733
|
-
accessList?: import('viem').AccessList;
|
|
1734
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1735
|
-
chain?: import('viem').Chain | null;
|
|
1736
|
-
dataSuffix?: `0x${string}`;
|
|
1737
|
-
gas?: bigint;
|
|
1738
|
-
gasPrice?: bigint;
|
|
1739
|
-
maxFeePerGas?: bigint;
|
|
1740
|
-
maxPriorityFeePerGas?: bigint;
|
|
1741
|
-
nonce?: number;
|
|
1742
|
-
value?: bigint;
|
|
1743
|
-
}): Promise<`0x${string}`> {
|
|
1744
|
-
if (!this.contract.write) {
|
|
1745
|
-
throw new Error('Wallet client is required for write operations');
|
|
1746
|
-
}
|
|
1747
|
-
return this.contract.write.burnFromWithReserve([payer, targetTotalBurnAmount, reservePPM] as const, options) as Promise<`0x${string}`>;
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
|
-
/**
|
|
1751
|
-
* burnWithoutReserve
|
|
1752
|
-
* nonpayable
|
|
1753
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1754
|
-
*/
|
|
1755
|
-
async burnWithoutReserve(amount: bigint, reservePPM: bigint, options?: {
|
|
1756
|
-
accessList?: import('viem').AccessList;
|
|
1757
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1758
|
-
chain?: import('viem').Chain | null;
|
|
1759
|
-
dataSuffix?: `0x${string}`;
|
|
1760
|
-
gas?: bigint;
|
|
1761
|
-
gasPrice?: bigint;
|
|
1762
|
-
maxFeePerGas?: bigint;
|
|
1763
|
-
maxPriorityFeePerGas?: bigint;
|
|
1764
|
-
nonce?: number;
|
|
1765
|
-
value?: bigint;
|
|
1766
|
-
}): Promise<`0x${string}`> {
|
|
1767
|
-
if (!this.contract.write) {
|
|
1768
|
-
throw new Error('Wallet client is required for write operations');
|
|
1769
|
-
}
|
|
1770
|
-
return this.contract.write.burnWithoutReserve([amount, reservePPM] as const, options) as Promise<`0x${string}`>;
|
|
1771
|
-
}
|
|
1772
|
-
|
|
1773
|
-
/**
|
|
1774
|
-
* cancelAuthorization
|
|
1775
|
-
* nonpayable
|
|
1776
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1777
|
-
*/
|
|
1778
|
-
async cancelAuthorization(authorizer: `0x${string}`, nonce: `0x${string}`, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
|
|
1779
|
-
accessList?: import('viem').AccessList;
|
|
1780
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1781
|
-
chain?: import('viem').Chain | null;
|
|
1782
|
-
dataSuffix?: `0x${string}`;
|
|
1783
|
-
gas?: bigint;
|
|
1784
|
-
gasPrice?: bigint;
|
|
1785
|
-
maxFeePerGas?: bigint;
|
|
1786
|
-
maxPriorityFeePerGas?: bigint;
|
|
1787
|
-
nonce?: number;
|
|
1788
|
-
value?: bigint;
|
|
1789
|
-
}): Promise<`0x${string}`> {
|
|
1790
|
-
if (!this.contract.write) {
|
|
1791
|
-
throw new Error('Wallet client is required for write operations');
|
|
1792
|
-
}
|
|
1793
|
-
return this.contract.write.cancelAuthorization([authorizer, nonce, v, r, s] as const, options) as Promise<`0x${string}`>;
|
|
1794
|
-
}
|
|
1795
|
-
|
|
1796
|
-
/**
|
|
1797
|
-
* collectProfits
|
|
1798
|
-
* nonpayable
|
|
1799
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1800
|
-
*/
|
|
1801
|
-
async collectProfits(source: `0x${string}`, _amount: bigint, options?: {
|
|
1802
|
-
accessList?: import('viem').AccessList;
|
|
1803
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1804
|
-
chain?: import('viem').Chain | null;
|
|
1805
|
-
dataSuffix?: `0x${string}`;
|
|
1806
|
-
gas?: bigint;
|
|
1807
|
-
gasPrice?: bigint;
|
|
1808
|
-
maxFeePerGas?: bigint;
|
|
1809
|
-
maxPriorityFeePerGas?: bigint;
|
|
1810
|
-
nonce?: number;
|
|
1811
|
-
value?: bigint;
|
|
1812
|
-
}): Promise<`0x${string}`> {
|
|
1813
|
-
if (!this.contract.write) {
|
|
1814
|
-
throw new Error('Wallet client is required for write operations');
|
|
1815
|
-
}
|
|
1816
|
-
return this.contract.write.collectProfits([source, _amount] as const, options) as Promise<`0x${string}`>;
|
|
1817
|
-
}
|
|
1818
|
-
|
|
1819
|
-
/**
|
|
1820
|
-
* coverLoss
|
|
1821
|
-
* nonpayable
|
|
1822
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1823
|
-
*/
|
|
1824
|
-
async coverLoss(source: `0x${string}`, _amount: bigint, options?: {
|
|
1825
|
-
accessList?: import('viem').AccessList;
|
|
1826
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1827
|
-
chain?: import('viem').Chain | null;
|
|
1828
|
-
dataSuffix?: `0x${string}`;
|
|
1829
|
-
gas?: bigint;
|
|
1830
|
-
gasPrice?: bigint;
|
|
1831
|
-
maxFeePerGas?: bigint;
|
|
1832
|
-
maxPriorityFeePerGas?: bigint;
|
|
1833
|
-
nonce?: number;
|
|
1834
|
-
value?: bigint;
|
|
1835
|
-
}): Promise<`0x${string}`> {
|
|
1836
|
-
if (!this.contract.write) {
|
|
1837
|
-
throw new Error('Wallet client is required for write operations');
|
|
1838
|
-
}
|
|
1839
|
-
return this.contract.write.coverLoss([source, _amount] as const, options) as Promise<`0x${string}`>;
|
|
1840
|
-
}
|
|
1841
|
-
|
|
1842
|
-
/**
|
|
1843
|
-
* denyMinter
|
|
1844
|
-
* nonpayable
|
|
1845
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1846
|
-
*/
|
|
1847
|
-
async denyMinter(_minter: `0x${string}`, _helpers: `0x${string}`[], _message: string, options?: {
|
|
1848
|
-
accessList?: import('viem').AccessList;
|
|
1849
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1850
|
-
chain?: import('viem').Chain | null;
|
|
1851
|
-
dataSuffix?: `0x${string}`;
|
|
1852
|
-
gas?: bigint;
|
|
1853
|
-
gasPrice?: bigint;
|
|
1854
|
-
maxFeePerGas?: bigint;
|
|
1855
|
-
maxPriorityFeePerGas?: bigint;
|
|
1856
|
-
nonce?: number;
|
|
1857
|
-
value?: bigint;
|
|
1858
|
-
}): Promise<`0x${string}`> {
|
|
1859
|
-
if (!this.contract.write) {
|
|
1860
|
-
throw new Error('Wallet client is required for write operations');
|
|
1861
|
-
}
|
|
1862
|
-
return this.contract.write.denyMinter([_minter, _helpers, _message] as const, options) as Promise<`0x${string}`>;
|
|
1863
|
-
}
|
|
1864
|
-
|
|
1865
|
-
/**
|
|
1866
|
-
* distributeProfits
|
|
1867
|
-
* nonpayable
|
|
1868
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1869
|
-
*/
|
|
1870
|
-
async distributeProfits(recipient: `0x${string}`, amount: bigint, options?: {
|
|
1871
|
-
accessList?: import('viem').AccessList;
|
|
1872
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1873
|
-
chain?: import('viem').Chain | null;
|
|
1874
|
-
dataSuffix?: `0x${string}`;
|
|
1875
|
-
gas?: bigint;
|
|
1876
|
-
gasPrice?: bigint;
|
|
1877
|
-
maxFeePerGas?: bigint;
|
|
1878
|
-
maxPriorityFeePerGas?: bigint;
|
|
1879
|
-
nonce?: number;
|
|
1880
|
-
value?: bigint;
|
|
1881
|
-
}): Promise<`0x${string}`> {
|
|
1882
|
-
if (!this.contract.write) {
|
|
1883
|
-
throw new Error('Wallet client is required for write operations');
|
|
1884
|
-
}
|
|
1885
|
-
return this.contract.write.distributeProfits([recipient, amount] as const, options) as Promise<`0x${string}`>;
|
|
1886
|
-
}
|
|
1887
|
-
|
|
1888
|
-
/**
|
|
1889
|
-
* initialize
|
|
1890
|
-
* nonpayable
|
|
1891
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1892
|
-
*/
|
|
1893
|
-
async initialize(_minter: `0x${string}`, _message: string, options?: {
|
|
1894
|
-
accessList?: import('viem').AccessList;
|
|
1895
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1896
|
-
chain?: import('viem').Chain | null;
|
|
1897
|
-
dataSuffix?: `0x${string}`;
|
|
1898
|
-
gas?: bigint;
|
|
1899
|
-
gasPrice?: bigint;
|
|
1900
|
-
maxFeePerGas?: bigint;
|
|
1901
|
-
maxPriorityFeePerGas?: bigint;
|
|
1902
|
-
nonce?: number;
|
|
1903
|
-
value?: bigint;
|
|
1904
|
-
}): Promise<`0x${string}`> {
|
|
1905
|
-
if (!this.contract.write) {
|
|
1906
|
-
throw new Error('Wallet client is required for write operations');
|
|
1907
|
-
}
|
|
1908
|
-
return this.contract.write.initialize([_minter, _message] as const, options) as Promise<`0x${string}`>;
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
/**
|
|
1912
|
-
* mint
|
|
1913
|
-
* nonpayable
|
|
1914
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1915
|
-
*/
|
|
1916
|
-
async mint(_target: `0x${string}`, _amount: bigint, options?: {
|
|
1917
|
-
accessList?: import('viem').AccessList;
|
|
1918
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1919
|
-
chain?: import('viem').Chain | null;
|
|
1920
|
-
dataSuffix?: `0x${string}`;
|
|
1921
|
-
gas?: bigint;
|
|
1922
|
-
gasPrice?: bigint;
|
|
1923
|
-
maxFeePerGas?: bigint;
|
|
1924
|
-
maxPriorityFeePerGas?: bigint;
|
|
1925
|
-
nonce?: number;
|
|
1926
|
-
value?: bigint;
|
|
1927
|
-
}): Promise<`0x${string}`> {
|
|
1928
|
-
if (!this.contract.write) {
|
|
1929
|
-
throw new Error('Wallet client is required for write operations');
|
|
1930
|
-
}
|
|
1931
|
-
return this.contract.write.mint([_target, _amount] as const, options) as Promise<`0x${string}`>;
|
|
1932
|
-
}
|
|
1933
|
-
|
|
1934
|
-
/**
|
|
1935
|
-
* mintWithReserve
|
|
1936
|
-
* nonpayable
|
|
1937
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1938
|
-
*/
|
|
1939
|
-
async mintWithReserve(_target: `0x${string}`, _amount: bigint, _reservePPM: bigint, options?: {
|
|
1940
|
-
accessList?: import('viem').AccessList;
|
|
1941
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1942
|
-
chain?: import('viem').Chain | null;
|
|
1943
|
-
dataSuffix?: `0x${string}`;
|
|
1944
|
-
gas?: bigint;
|
|
1945
|
-
gasPrice?: bigint;
|
|
1946
|
-
maxFeePerGas?: bigint;
|
|
1947
|
-
maxPriorityFeePerGas?: bigint;
|
|
1948
|
-
nonce?: number;
|
|
1949
|
-
value?: bigint;
|
|
1950
|
-
}): Promise<`0x${string}`> {
|
|
1951
|
-
if (!this.contract.write) {
|
|
1952
|
-
throw new Error('Wallet client is required for write operations');
|
|
1953
|
-
}
|
|
1954
|
-
return this.contract.write.mintWithReserve([_target, _amount, _reservePPM] as const, options) as Promise<`0x${string}`>;
|
|
1955
|
-
}
|
|
1956
|
-
|
|
1957
|
-
/**
|
|
1958
|
-
* permit
|
|
1959
|
-
* nonpayable
|
|
1960
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1961
|
-
*/
|
|
1962
|
-
async permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
|
|
1963
|
-
accessList?: import('viem').AccessList;
|
|
1964
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1965
|
-
chain?: import('viem').Chain | null;
|
|
1966
|
-
dataSuffix?: `0x${string}`;
|
|
1967
|
-
gas?: bigint;
|
|
1968
|
-
gasPrice?: bigint;
|
|
1969
|
-
maxFeePerGas?: bigint;
|
|
1970
|
-
maxPriorityFeePerGas?: bigint;
|
|
1971
|
-
nonce?: number;
|
|
1972
|
-
value?: bigint;
|
|
1973
|
-
}): Promise<`0x${string}`> {
|
|
1974
|
-
if (!this.contract.write) {
|
|
1975
|
-
throw new Error('Wallet client is required for write operations');
|
|
1976
|
-
}
|
|
1977
|
-
return this.contract.write.permit([owner, spender, value, deadline, v, r, s] as const, options) as Promise<`0x${string}`>;
|
|
1978
|
-
}
|
|
1979
|
-
|
|
1980
|
-
/**
|
|
1981
|
-
* receiveWithAuthorization
|
|
1982
|
-
* nonpayable
|
|
1983
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1984
|
-
*/
|
|
1985
|
-
async receiveWithAuthorization(from: `0x${string}`, to: `0x${string}`, value: bigint, validAfter: bigint, validBefore: bigint, nonce: `0x${string}`, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
|
|
1986
|
-
accessList?: import('viem').AccessList;
|
|
1987
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1988
|
-
chain?: import('viem').Chain | null;
|
|
1989
|
-
dataSuffix?: `0x${string}`;
|
|
1990
|
-
gas?: bigint;
|
|
1991
|
-
gasPrice?: bigint;
|
|
1992
|
-
maxFeePerGas?: bigint;
|
|
1993
|
-
maxPriorityFeePerGas?: bigint;
|
|
1994
|
-
nonce?: number;
|
|
1995
|
-
value?: bigint;
|
|
1996
|
-
}): Promise<`0x${string}`> {
|
|
1997
|
-
if (!this.contract.write) {
|
|
1998
|
-
throw new Error('Wallet client is required for write operations');
|
|
1999
|
-
}
|
|
2000
|
-
return this.contract.write.receiveWithAuthorization([from, to, value, validAfter, validBefore, nonce, v, r, s] as const, options) as Promise<`0x${string}`>;
|
|
2001
|
-
}
|
|
2002
|
-
|
|
2003
|
-
/**
|
|
2004
|
-
* registerPosition
|
|
2005
|
-
* nonpayable
|
|
2006
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2007
|
-
*/
|
|
2008
|
-
async registerPosition(_position: `0x${string}`, options?: {
|
|
2009
|
-
accessList?: import('viem').AccessList;
|
|
2010
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
2011
|
-
chain?: import('viem').Chain | null;
|
|
2012
|
-
dataSuffix?: `0x${string}`;
|
|
2013
|
-
gas?: bigint;
|
|
2014
|
-
gasPrice?: bigint;
|
|
2015
|
-
maxFeePerGas?: bigint;
|
|
2016
|
-
maxPriorityFeePerGas?: bigint;
|
|
2017
|
-
nonce?: number;
|
|
2018
|
-
value?: bigint;
|
|
2019
|
-
}): Promise<`0x${string}`> {
|
|
2020
|
-
if (!this.contract.write) {
|
|
2021
|
-
throw new Error('Wallet client is required for write operations');
|
|
2022
|
-
}
|
|
2023
|
-
return this.contract.write.registerPosition([_position] as const, options) as Promise<`0x${string}`>;
|
|
390
|
+
});
|
|
2024
391
|
}
|
|
2025
392
|
|
|
2026
393
|
/**
|
|
2027
|
-
*
|
|
2028
|
-
* nonpayable
|
|
2029
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
394
|
+
* Get the contract address
|
|
2030
395
|
*/
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
2034
|
-
chain?: import('viem').Chain | null;
|
|
2035
|
-
dataSuffix?: `0x${string}`;
|
|
2036
|
-
gas?: bigint;
|
|
2037
|
-
gasPrice?: bigint;
|
|
2038
|
-
maxFeePerGas?: bigint;
|
|
2039
|
-
maxPriorityFeePerGas?: bigint;
|
|
2040
|
-
nonce?: number;
|
|
2041
|
-
value?: bigint;
|
|
2042
|
-
}): Promise<`0x${string}`> {
|
|
2043
|
-
if (!this.contract.write) {
|
|
2044
|
-
throw new Error('Wallet client is required for write operations');
|
|
2045
|
-
}
|
|
2046
|
-
return this.contract.write.suggestMinter([_minter, _applicationPeriod, _applicationFee, _message] as const, options) as Promise<`0x${string}`>;
|
|
396
|
+
get address(): Address {
|
|
397
|
+
return this.contractAddress;
|
|
2047
398
|
}
|
|
2048
399
|
|
|
2049
400
|
/**
|
|
2050
|
-
*
|
|
2051
|
-
* nonpayable
|
|
2052
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
401
|
+
* Get the underlying viem contract instance
|
|
2053
402
|
*/
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
2057
|
-
chain?: import('viem').Chain | null;
|
|
2058
|
-
dataSuffix?: `0x${string}`;
|
|
2059
|
-
gas?: bigint;
|
|
2060
|
-
gasPrice?: bigint;
|
|
2061
|
-
maxFeePerGas?: bigint;
|
|
2062
|
-
maxPriorityFeePerGas?: bigint;
|
|
2063
|
-
nonce?: number;
|
|
2064
|
-
value?: bigint;
|
|
2065
|
-
}): Promise<`0x${string}`> {
|
|
2066
|
-
if (!this.contract.write) {
|
|
2067
|
-
throw new Error('Wallet client is required for write operations');
|
|
2068
|
-
}
|
|
2069
|
-
return this.contract.write.transfer([to, value] as const, options) as Promise<`0x${string}`>;
|
|
403
|
+
getContract(): DecentralizedEURO_jsonContract {
|
|
404
|
+
return this.contract;
|
|
2070
405
|
}
|
|
2071
406
|
|
|
2072
407
|
/**
|
|
2073
|
-
*
|
|
2074
|
-
*
|
|
2075
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
408
|
+
* allowance
|
|
409
|
+
* view
|
|
2076
410
|
*/
|
|
2077
|
-
async
|
|
2078
|
-
|
|
2079
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
2080
|
-
chain?: import('viem').Chain | null;
|
|
2081
|
-
dataSuffix?: `0x${string}`;
|
|
2082
|
-
gas?: bigint;
|
|
2083
|
-
gasPrice?: bigint;
|
|
2084
|
-
maxFeePerGas?: bigint;
|
|
2085
|
-
maxPriorityFeePerGas?: bigint;
|
|
2086
|
-
nonce?: number;
|
|
2087
|
-
value?: bigint;
|
|
2088
|
-
}): Promise<`0x${string}`> {
|
|
2089
|
-
if (!this.contract.write) {
|
|
2090
|
-
throw new Error('Wallet client is required for write operations');
|
|
2091
|
-
}
|
|
2092
|
-
return this.contract.write.transferFrom([from, to, value] as const, options) as Promise<`0x${string}`>;
|
|
411
|
+
async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
|
|
412
|
+
return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
|
|
2093
413
|
}
|
|
2094
414
|
|
|
2095
415
|
/**
|
|
2096
|
-
*
|
|
2097
|
-
*
|
|
2098
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
416
|
+
* balanceOf
|
|
417
|
+
* view
|
|
2099
418
|
*/
|
|
2100
|
-
async
|
|
2101
|
-
|
|
2102
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
2103
|
-
chain?: import('viem').Chain | null;
|
|
2104
|
-
dataSuffix?: `0x${string}`;
|
|
2105
|
-
gas?: bigint;
|
|
2106
|
-
gasPrice?: bigint;
|
|
2107
|
-
maxFeePerGas?: bigint;
|
|
2108
|
-
maxPriorityFeePerGas?: bigint;
|
|
2109
|
-
nonce?: number;
|
|
2110
|
-
value?: bigint;
|
|
2111
|
-
}): Promise<`0x${string}`> {
|
|
2112
|
-
if (!this.contract.write) {
|
|
2113
|
-
throw new Error('Wallet client is required for write operations');
|
|
2114
|
-
}
|
|
2115
|
-
return this.contract.write.transferWithAuthorization([from, to, value, validAfter, validBefore, nonce, v, r, s] as const, options) as Promise<`0x${string}`>;
|
|
419
|
+
async balanceOf(account: `0x${string}`): Promise<bigint> {
|
|
420
|
+
return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
|
|
2116
421
|
}
|
|
2117
422
|
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
* Simulate contract write operations (dry-run without sending transaction)
|
|
2122
|
-
*
|
|
2123
|
-
* @example
|
|
2124
|
-
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
2125
|
-
* console.log('Gas estimate:', result.request.gas);
|
|
2126
|
-
* console.log('Would succeed:', result.result);
|
|
423
|
+
/**
|
|
424
|
+
* decimals
|
|
425
|
+
* view
|
|
2127
426
|
*/
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
maxFeePerGas?: bigint;
|
|
2242
|
-
maxPriorityFeePerGas?: bigint;
|
|
2243
|
-
nonce?: number;
|
|
2244
|
-
value?: bigint;
|
|
2245
|
-
}): Promise<void> {
|
|
2246
|
-
return contract.simulate.cancelAuthorization([authorizer, nonce, v, r, s] as const, options) as Promise<void>;
|
|
2247
|
-
},
|
|
2248
|
-
/**
|
|
2249
|
-
* Simulate collectProfits
|
|
2250
|
-
* Returns gas estimate and result without sending transaction
|
|
2251
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2252
|
-
*/
|
|
2253
|
-
async collectProfits(source: `0x${string}`, _amount: bigint, options?: {
|
|
2254
|
-
accessList?: import('viem').AccessList;
|
|
2255
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
2256
|
-
chain?: import('viem').Chain | null;
|
|
2257
|
-
dataSuffix?: `0x${string}`;
|
|
2258
|
-
gas?: bigint;
|
|
2259
|
-
gasPrice?: bigint;
|
|
2260
|
-
maxFeePerGas?: bigint;
|
|
2261
|
-
maxPriorityFeePerGas?: bigint;
|
|
2262
|
-
nonce?: number;
|
|
2263
|
-
value?: bigint;
|
|
2264
|
-
}): Promise<void> {
|
|
2265
|
-
return contract.simulate.collectProfits([source, _amount] as const, options) as Promise<void>;
|
|
2266
|
-
},
|
|
2267
|
-
/**
|
|
2268
|
-
* Simulate coverLoss
|
|
2269
|
-
* Returns gas estimate and result without sending transaction
|
|
2270
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2271
|
-
*/
|
|
2272
|
-
async coverLoss(source: `0x${string}`, _amount: bigint, options?: {
|
|
2273
|
-
accessList?: import('viem').AccessList;
|
|
2274
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
2275
|
-
chain?: import('viem').Chain | null;
|
|
2276
|
-
dataSuffix?: `0x${string}`;
|
|
2277
|
-
gas?: bigint;
|
|
2278
|
-
gasPrice?: bigint;
|
|
2279
|
-
maxFeePerGas?: bigint;
|
|
2280
|
-
maxPriorityFeePerGas?: bigint;
|
|
2281
|
-
nonce?: number;
|
|
2282
|
-
value?: bigint;
|
|
2283
|
-
}): Promise<void> {
|
|
2284
|
-
return contract.simulate.coverLoss([source, _amount] as const, options) as Promise<void>;
|
|
2285
|
-
},
|
|
2286
|
-
/**
|
|
2287
|
-
* Simulate denyMinter
|
|
2288
|
-
* Returns gas estimate and result without sending transaction
|
|
2289
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2290
|
-
*/
|
|
2291
|
-
async denyMinter(_minter: `0x${string}`, _helpers: `0x${string}`[], _message: string, options?: {
|
|
2292
|
-
accessList?: import('viem').AccessList;
|
|
2293
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
2294
|
-
chain?: import('viem').Chain | null;
|
|
2295
|
-
dataSuffix?: `0x${string}`;
|
|
2296
|
-
gas?: bigint;
|
|
2297
|
-
gasPrice?: bigint;
|
|
2298
|
-
maxFeePerGas?: bigint;
|
|
2299
|
-
maxPriorityFeePerGas?: bigint;
|
|
2300
|
-
nonce?: number;
|
|
2301
|
-
value?: bigint;
|
|
2302
|
-
}): Promise<void> {
|
|
2303
|
-
return contract.simulate.denyMinter([_minter, _helpers, _message] as const, options) as Promise<void>;
|
|
2304
|
-
},
|
|
2305
|
-
/**
|
|
2306
|
-
* Simulate distributeProfits
|
|
2307
|
-
* Returns gas estimate and result without sending transaction
|
|
2308
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2309
|
-
*/
|
|
2310
|
-
async distributeProfits(recipient: `0x${string}`, amount: bigint, options?: {
|
|
2311
|
-
accessList?: import('viem').AccessList;
|
|
2312
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
2313
|
-
chain?: import('viem').Chain | null;
|
|
2314
|
-
dataSuffix?: `0x${string}`;
|
|
2315
|
-
gas?: bigint;
|
|
2316
|
-
gasPrice?: bigint;
|
|
2317
|
-
maxFeePerGas?: bigint;
|
|
2318
|
-
maxPriorityFeePerGas?: bigint;
|
|
2319
|
-
nonce?: number;
|
|
2320
|
-
value?: bigint;
|
|
2321
|
-
}): Promise<void> {
|
|
2322
|
-
return contract.simulate.distributeProfits([recipient, amount] as const, options) as Promise<void>;
|
|
2323
|
-
},
|
|
2324
|
-
/**
|
|
2325
|
-
* Simulate initialize
|
|
2326
|
-
* Returns gas estimate and result without sending transaction
|
|
2327
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2328
|
-
*/
|
|
2329
|
-
async initialize(_minter: `0x${string}`, _message: string, options?: {
|
|
2330
|
-
accessList?: import('viem').AccessList;
|
|
2331
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
2332
|
-
chain?: import('viem').Chain | null;
|
|
2333
|
-
dataSuffix?: `0x${string}`;
|
|
2334
|
-
gas?: bigint;
|
|
2335
|
-
gasPrice?: bigint;
|
|
2336
|
-
maxFeePerGas?: bigint;
|
|
2337
|
-
maxPriorityFeePerGas?: bigint;
|
|
2338
|
-
nonce?: number;
|
|
2339
|
-
value?: bigint;
|
|
2340
|
-
}): Promise<void> {
|
|
2341
|
-
return contract.simulate.initialize([_minter, _message] as const, options) as Promise<void>;
|
|
2342
|
-
},
|
|
2343
|
-
/**
|
|
2344
|
-
* Simulate mint
|
|
2345
|
-
* Returns gas estimate and result without sending transaction
|
|
2346
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2347
|
-
*/
|
|
2348
|
-
async mint(_target: `0x${string}`, _amount: bigint, options?: {
|
|
2349
|
-
accessList?: import('viem').AccessList;
|
|
2350
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
2351
|
-
chain?: import('viem').Chain | null;
|
|
2352
|
-
dataSuffix?: `0x${string}`;
|
|
2353
|
-
gas?: bigint;
|
|
2354
|
-
gasPrice?: bigint;
|
|
2355
|
-
maxFeePerGas?: bigint;
|
|
2356
|
-
maxPriorityFeePerGas?: bigint;
|
|
2357
|
-
nonce?: number;
|
|
2358
|
-
value?: bigint;
|
|
2359
|
-
}): Promise<void> {
|
|
2360
|
-
return contract.simulate.mint([_target, _amount] as const, options) as Promise<void>;
|
|
2361
|
-
},
|
|
2362
|
-
/**
|
|
2363
|
-
* Simulate mintWithReserve
|
|
2364
|
-
* Returns gas estimate and result without sending transaction
|
|
2365
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2366
|
-
*/
|
|
2367
|
-
async mintWithReserve(_target: `0x${string}`, _amount: bigint, _reservePPM: bigint, options?: {
|
|
2368
|
-
accessList?: import('viem').AccessList;
|
|
2369
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
2370
|
-
chain?: import('viem').Chain | null;
|
|
2371
|
-
dataSuffix?: `0x${string}`;
|
|
2372
|
-
gas?: bigint;
|
|
2373
|
-
gasPrice?: bigint;
|
|
2374
|
-
maxFeePerGas?: bigint;
|
|
2375
|
-
maxPriorityFeePerGas?: bigint;
|
|
2376
|
-
nonce?: number;
|
|
2377
|
-
value?: bigint;
|
|
2378
|
-
}): Promise<void> {
|
|
2379
|
-
return contract.simulate.mintWithReserve([_target, _amount, _reservePPM] as const, options) as Promise<void>;
|
|
2380
|
-
},
|
|
2381
|
-
/**
|
|
2382
|
-
* Simulate permit
|
|
2383
|
-
* Returns gas estimate and result without sending transaction
|
|
2384
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2385
|
-
*/
|
|
2386
|
-
async permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
|
|
2387
|
-
accessList?: import('viem').AccessList;
|
|
2388
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
2389
|
-
chain?: import('viem').Chain | null;
|
|
2390
|
-
dataSuffix?: `0x${string}`;
|
|
2391
|
-
gas?: bigint;
|
|
2392
|
-
gasPrice?: bigint;
|
|
2393
|
-
maxFeePerGas?: bigint;
|
|
2394
|
-
maxPriorityFeePerGas?: bigint;
|
|
2395
|
-
nonce?: number;
|
|
2396
|
-
value?: bigint;
|
|
2397
|
-
}): Promise<void> {
|
|
2398
|
-
return contract.simulate.permit([owner, spender, value, deadline, v, r, s] as const, options) as Promise<void>;
|
|
2399
|
-
},
|
|
2400
|
-
/**
|
|
2401
|
-
* Simulate receiveWithAuthorization
|
|
2402
|
-
* Returns gas estimate and result without sending transaction
|
|
2403
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2404
|
-
*/
|
|
2405
|
-
async receiveWithAuthorization(from: `0x${string}`, to: `0x${string}`, value: bigint, validAfter: bigint, validBefore: bigint, nonce: `0x${string}`, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
|
|
2406
|
-
accessList?: import('viem').AccessList;
|
|
2407
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
2408
|
-
chain?: import('viem').Chain | null;
|
|
2409
|
-
dataSuffix?: `0x${string}`;
|
|
2410
|
-
gas?: bigint;
|
|
2411
|
-
gasPrice?: bigint;
|
|
2412
|
-
maxFeePerGas?: bigint;
|
|
2413
|
-
maxPriorityFeePerGas?: bigint;
|
|
2414
|
-
nonce?: number;
|
|
2415
|
-
value?: bigint;
|
|
2416
|
-
}): Promise<void> {
|
|
2417
|
-
return contract.simulate.receiveWithAuthorization([from, to, value, validAfter, validBefore, nonce, v, r, s] as const, options) as Promise<void>;
|
|
2418
|
-
},
|
|
2419
|
-
/**
|
|
2420
|
-
* Simulate registerPosition
|
|
2421
|
-
* Returns gas estimate and result without sending transaction
|
|
2422
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2423
|
-
*/
|
|
2424
|
-
async registerPosition(_position: `0x${string}`, options?: {
|
|
2425
|
-
accessList?: import('viem').AccessList;
|
|
2426
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
2427
|
-
chain?: import('viem').Chain | null;
|
|
2428
|
-
dataSuffix?: `0x${string}`;
|
|
2429
|
-
gas?: bigint;
|
|
2430
|
-
gasPrice?: bigint;
|
|
2431
|
-
maxFeePerGas?: bigint;
|
|
2432
|
-
maxPriorityFeePerGas?: bigint;
|
|
2433
|
-
nonce?: number;
|
|
2434
|
-
value?: bigint;
|
|
2435
|
-
}): Promise<void> {
|
|
2436
|
-
return contract.simulate.registerPosition([_position] as const, options) as Promise<void>;
|
|
2437
|
-
},
|
|
427
|
+
async decimals(): Promise<bigint> {
|
|
428
|
+
return this.contract.read.decimals() as Promise<bigint>;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* name
|
|
433
|
+
* view
|
|
434
|
+
*/
|
|
435
|
+
async name(): Promise<string> {
|
|
436
|
+
return this.contract.read.name() as Promise<string>;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* symbol
|
|
441
|
+
* view
|
|
442
|
+
*/
|
|
443
|
+
async symbol(): Promise<string> {
|
|
444
|
+
return this.contract.read.symbol() as Promise<string>;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* totalSupply
|
|
449
|
+
* view
|
|
450
|
+
*/
|
|
451
|
+
async totalSupply(): Promise<bigint> {
|
|
452
|
+
return this.contract.read.totalSupply() as Promise<bigint>;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* approve
|
|
457
|
+
* nonpayable
|
|
458
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
459
|
+
*/
|
|
460
|
+
async approve(spender: `0x${string}`, value: bigint, options?: {
|
|
461
|
+
accessList?: import('viem').AccessList;
|
|
462
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
463
|
+
chain?: import('viem').Chain | null;
|
|
464
|
+
dataSuffix?: `0x${string}`;
|
|
465
|
+
gas?: bigint;
|
|
466
|
+
gasPrice?: bigint;
|
|
467
|
+
maxFeePerGas?: bigint;
|
|
468
|
+
maxPriorityFeePerGas?: bigint;
|
|
469
|
+
nonce?: number;
|
|
470
|
+
value?: bigint;
|
|
471
|
+
}): Promise<`0x${string}`> {
|
|
472
|
+
if (!this.contract.write) {
|
|
473
|
+
throw new Error('Wallet client is required for write operations');
|
|
474
|
+
}
|
|
475
|
+
return this.contract.write.approve([spender, value] as const, options) as Promise<`0x${string}`>;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* transfer
|
|
480
|
+
* nonpayable
|
|
481
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
482
|
+
*/
|
|
483
|
+
async transfer(to: `0x${string}`, value: bigint, options?: {
|
|
484
|
+
accessList?: import('viem').AccessList;
|
|
485
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
486
|
+
chain?: import('viem').Chain | null;
|
|
487
|
+
dataSuffix?: `0x${string}`;
|
|
488
|
+
gas?: bigint;
|
|
489
|
+
gasPrice?: bigint;
|
|
490
|
+
maxFeePerGas?: bigint;
|
|
491
|
+
maxPriorityFeePerGas?: bigint;
|
|
492
|
+
nonce?: number;
|
|
493
|
+
value?: bigint;
|
|
494
|
+
}): Promise<`0x${string}`> {
|
|
495
|
+
if (!this.contract.write) {
|
|
496
|
+
throw new Error('Wallet client is required for write operations');
|
|
497
|
+
}
|
|
498
|
+
return this.contract.write.transfer([to, value] as const, options) as Promise<`0x${string}`>;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* transferFrom
|
|
503
|
+
* nonpayable
|
|
504
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
505
|
+
*/
|
|
506
|
+
async transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
|
|
507
|
+
accessList?: import('viem').AccessList;
|
|
508
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
509
|
+
chain?: import('viem').Chain | null;
|
|
510
|
+
dataSuffix?: `0x${string}`;
|
|
511
|
+
gas?: bigint;
|
|
512
|
+
gasPrice?: bigint;
|
|
513
|
+
maxFeePerGas?: bigint;
|
|
514
|
+
maxPriorityFeePerGas?: bigint;
|
|
515
|
+
nonce?: number;
|
|
516
|
+
value?: bigint;
|
|
517
|
+
}): Promise<`0x${string}`> {
|
|
518
|
+
if (!this.contract.write) {
|
|
519
|
+
throw new Error('Wallet client is required for write operations');
|
|
520
|
+
}
|
|
521
|
+
return this.contract.write.transferFrom([from, to, value] as const, options) as Promise<`0x${string}`>;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
528
|
+
*
|
|
529
|
+
* @example
|
|
530
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
531
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
532
|
+
* console.log('Would succeed:', result.result);
|
|
533
|
+
*/
|
|
534
|
+
get simulate() {
|
|
535
|
+
const contract = this.contract;
|
|
536
|
+
if (!contract.simulate) {
|
|
537
|
+
throw new Error('Public client is required for simulation');
|
|
538
|
+
}
|
|
539
|
+
return {
|
|
2438
540
|
/**
|
|
2439
|
-
* Simulate
|
|
541
|
+
* Simulate approve
|
|
2440
542
|
* Returns gas estimate and result without sending transaction
|
|
2441
543
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2442
544
|
*/
|
|
2443
|
-
async
|
|
545
|
+
async approve(spender: `0x${string}`, value: bigint, options?: {
|
|
2444
546
|
accessList?: import('viem').AccessList;
|
|
2445
547
|
authorizationList?: import('viem').AuthorizationList;
|
|
2446
548
|
chain?: import('viem').Chain | null;
|
|
@@ -2451,8 +553,8 @@ export class DecentralizedEURO_json {
|
|
|
2451
553
|
maxPriorityFeePerGas?: bigint;
|
|
2452
554
|
nonce?: number;
|
|
2453
555
|
value?: bigint;
|
|
2454
|
-
}): Promise<
|
|
2455
|
-
return contract.simulate.
|
|
556
|
+
}): Promise<boolean> {
|
|
557
|
+
return contract.simulate.approve([spender, value] as const, options) as Promise<boolean>;
|
|
2456
558
|
},
|
|
2457
559
|
/**
|
|
2458
560
|
* Simulate transfer
|
|
@@ -2491,25 +593,6 @@ export class DecentralizedEURO_json {
|
|
|
2491
593
|
value?: bigint;
|
|
2492
594
|
}): Promise<boolean> {
|
|
2493
595
|
return contract.simulate.transferFrom([from, to, value] as const, options) as Promise<boolean>;
|
|
2494
|
-
},
|
|
2495
|
-
/**
|
|
2496
|
-
* Simulate transferWithAuthorization
|
|
2497
|
-
* Returns gas estimate and result without sending transaction
|
|
2498
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2499
|
-
*/
|
|
2500
|
-
async transferWithAuthorization(from: `0x${string}`, to: `0x${string}`, value: bigint, validAfter: bigint, validBefore: bigint, nonce: `0x${string}`, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
|
|
2501
|
-
accessList?: import('viem').AccessList;
|
|
2502
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
2503
|
-
chain?: import('viem').Chain | null;
|
|
2504
|
-
dataSuffix?: `0x${string}`;
|
|
2505
|
-
gas?: bigint;
|
|
2506
|
-
gasPrice?: bigint;
|
|
2507
|
-
maxFeePerGas?: bigint;
|
|
2508
|
-
maxPriorityFeePerGas?: bigint;
|
|
2509
|
-
nonce?: number;
|
|
2510
|
-
value?: bigint;
|
|
2511
|
-
}): Promise<void> {
|
|
2512
|
-
return contract.simulate.transferWithAuthorization([from, to, value, validAfter, validBefore, nonce, v, r, s] as const, options) as Promise<void>;
|
|
2513
596
|
}
|
|
2514
597
|
};
|
|
2515
598
|
}
|
|
@@ -2547,158 +630,6 @@ export class DecentralizedEURO_json {
|
|
|
2547
630
|
},
|
|
2548
631
|
}) as () => void;
|
|
2549
632
|
},
|
|
2550
|
-
/**
|
|
2551
|
-
* Watch AuthorizationCanceled events
|
|
2552
|
-
* @param callback Function to call when event is emitted
|
|
2553
|
-
* @param filter Optional filter for indexed parameters
|
|
2554
|
-
* @returns Unwatch function to stop listening
|
|
2555
|
-
*/
|
|
2556
|
-
AuthorizationCanceled: (callback: (event: { authorizer: `0x${string}`; nonce: `0x${string}` }) => void, filter?: { authorizer: `0x${string}`; nonce: `0x${string}` }) => {
|
|
2557
|
-
return this.publicClient.watchContractEvent({
|
|
2558
|
-
address: this.contractAddress,
|
|
2559
|
-
abi: DecentralizedEURO_jsonAbi,
|
|
2560
|
-
eventName: 'AuthorizationCanceled',
|
|
2561
|
-
args: filter,
|
|
2562
|
-
onLogs: (logs: any[]) => {
|
|
2563
|
-
logs.forEach((log: any) => {
|
|
2564
|
-
callback(log.args as any);
|
|
2565
|
-
});
|
|
2566
|
-
},
|
|
2567
|
-
}) as () => void;
|
|
2568
|
-
},
|
|
2569
|
-
/**
|
|
2570
|
-
* Watch AuthorizationUsed events
|
|
2571
|
-
* @param callback Function to call when event is emitted
|
|
2572
|
-
* @param filter Optional filter for indexed parameters
|
|
2573
|
-
* @returns Unwatch function to stop listening
|
|
2574
|
-
*/
|
|
2575
|
-
AuthorizationUsed: (callback: (event: { authorizer: `0x${string}`; nonce: `0x${string}` }) => void, filter?: { authorizer: `0x${string}`; nonce: `0x${string}` }) => {
|
|
2576
|
-
return this.publicClient.watchContractEvent({
|
|
2577
|
-
address: this.contractAddress,
|
|
2578
|
-
abi: DecentralizedEURO_jsonAbi,
|
|
2579
|
-
eventName: 'AuthorizationUsed',
|
|
2580
|
-
args: filter,
|
|
2581
|
-
onLogs: (logs: any[]) => {
|
|
2582
|
-
logs.forEach((log: any) => {
|
|
2583
|
-
callback(log.args as any);
|
|
2584
|
-
});
|
|
2585
|
-
},
|
|
2586
|
-
}) as () => void;
|
|
2587
|
-
},
|
|
2588
|
-
/**
|
|
2589
|
-
* Watch EIP712DomainChanged events
|
|
2590
|
-
* @param callback Function to call when event is emitted
|
|
2591
|
-
* @param filter Optional filter for indexed parameters
|
|
2592
|
-
* @returns Unwatch function to stop listening
|
|
2593
|
-
*/
|
|
2594
|
-
EIP712DomainChanged: (callback: (event: { }) => void) => {
|
|
2595
|
-
return this.publicClient.watchContractEvent({
|
|
2596
|
-
address: this.contractAddress,
|
|
2597
|
-
abi: DecentralizedEURO_jsonAbi,
|
|
2598
|
-
eventName: 'EIP712DomainChanged',
|
|
2599
|
-
|
|
2600
|
-
onLogs: (logs: any[]) => {
|
|
2601
|
-
logs.forEach((log: any) => {
|
|
2602
|
-
callback(log.args as any);
|
|
2603
|
-
});
|
|
2604
|
-
},
|
|
2605
|
-
}) as () => void;
|
|
2606
|
-
},
|
|
2607
|
-
/**
|
|
2608
|
-
* Watch Loss events
|
|
2609
|
-
* @param callback Function to call when event is emitted
|
|
2610
|
-
* @param filter Optional filter for indexed parameters
|
|
2611
|
-
* @returns Unwatch function to stop listening
|
|
2612
|
-
*/
|
|
2613
|
-
Loss: (callback: (event: { reportingMinter: `0x${string}`; amount: bigint }) => void, filter?: { reportingMinter: `0x${string}` }) => {
|
|
2614
|
-
return this.publicClient.watchContractEvent({
|
|
2615
|
-
address: this.contractAddress,
|
|
2616
|
-
abi: DecentralizedEURO_jsonAbi,
|
|
2617
|
-
eventName: 'Loss',
|
|
2618
|
-
args: filter,
|
|
2619
|
-
onLogs: (logs: any[]) => {
|
|
2620
|
-
logs.forEach((log: any) => {
|
|
2621
|
-
callback(log.args as any);
|
|
2622
|
-
});
|
|
2623
|
-
},
|
|
2624
|
-
}) as () => void;
|
|
2625
|
-
},
|
|
2626
|
-
/**
|
|
2627
|
-
* Watch MinterApplied events
|
|
2628
|
-
* @param callback Function to call when event is emitted
|
|
2629
|
-
* @param filter Optional filter for indexed parameters
|
|
2630
|
-
* @returns Unwatch function to stop listening
|
|
2631
|
-
*/
|
|
2632
|
-
MinterApplied: (callback: (event: { minter: `0x${string}`; applicationPeriod: bigint; applicationFee: bigint; message: string }) => void, filter?: { minter: `0x${string}` }) => {
|
|
2633
|
-
return this.publicClient.watchContractEvent({
|
|
2634
|
-
address: this.contractAddress,
|
|
2635
|
-
abi: DecentralizedEURO_jsonAbi,
|
|
2636
|
-
eventName: 'MinterApplied',
|
|
2637
|
-
args: filter,
|
|
2638
|
-
onLogs: (logs: any[]) => {
|
|
2639
|
-
logs.forEach((log: any) => {
|
|
2640
|
-
callback(log.args as any);
|
|
2641
|
-
});
|
|
2642
|
-
},
|
|
2643
|
-
}) as () => void;
|
|
2644
|
-
},
|
|
2645
|
-
/**
|
|
2646
|
-
* Watch MinterDenied events
|
|
2647
|
-
* @param callback Function to call when event is emitted
|
|
2648
|
-
* @param filter Optional filter for indexed parameters
|
|
2649
|
-
* @returns Unwatch function to stop listening
|
|
2650
|
-
*/
|
|
2651
|
-
MinterDenied: (callback: (event: { minter: `0x${string}`; message: string }) => void, filter?: { minter: `0x${string}` }) => {
|
|
2652
|
-
return this.publicClient.watchContractEvent({
|
|
2653
|
-
address: this.contractAddress,
|
|
2654
|
-
abi: DecentralizedEURO_jsonAbi,
|
|
2655
|
-
eventName: 'MinterDenied',
|
|
2656
|
-
args: filter,
|
|
2657
|
-
onLogs: (logs: any[]) => {
|
|
2658
|
-
logs.forEach((log: any) => {
|
|
2659
|
-
callback(log.args as any);
|
|
2660
|
-
});
|
|
2661
|
-
},
|
|
2662
|
-
}) as () => void;
|
|
2663
|
-
},
|
|
2664
|
-
/**
|
|
2665
|
-
* Watch Profit events
|
|
2666
|
-
* @param callback Function to call when event is emitted
|
|
2667
|
-
* @param filter Optional filter for indexed parameters
|
|
2668
|
-
* @returns Unwatch function to stop listening
|
|
2669
|
-
*/
|
|
2670
|
-
Profit: (callback: (event: { reportingMinter: `0x${string}`; amount: bigint }) => void, filter?: { reportingMinter: `0x${string}` }) => {
|
|
2671
|
-
return this.publicClient.watchContractEvent({
|
|
2672
|
-
address: this.contractAddress,
|
|
2673
|
-
abi: DecentralizedEURO_jsonAbi,
|
|
2674
|
-
eventName: 'Profit',
|
|
2675
|
-
args: filter,
|
|
2676
|
-
onLogs: (logs: any[]) => {
|
|
2677
|
-
logs.forEach((log: any) => {
|
|
2678
|
-
callback(log.args as any);
|
|
2679
|
-
});
|
|
2680
|
-
},
|
|
2681
|
-
}) as () => void;
|
|
2682
|
-
},
|
|
2683
|
-
/**
|
|
2684
|
-
* Watch ProfitDistributed events
|
|
2685
|
-
* @param callback Function to call when event is emitted
|
|
2686
|
-
* @param filter Optional filter for indexed parameters
|
|
2687
|
-
* @returns Unwatch function to stop listening
|
|
2688
|
-
*/
|
|
2689
|
-
ProfitDistributed: (callback: (event: { recipient: `0x${string}`; amount: bigint }) => void, filter?: { recipient: `0x${string}` }) => {
|
|
2690
|
-
return this.publicClient.watchContractEvent({
|
|
2691
|
-
address: this.contractAddress,
|
|
2692
|
-
abi: DecentralizedEURO_jsonAbi,
|
|
2693
|
-
eventName: 'ProfitDistributed',
|
|
2694
|
-
args: filter,
|
|
2695
|
-
onLogs: (logs: any[]) => {
|
|
2696
|
-
logs.forEach((log: any) => {
|
|
2697
|
-
callback(log.args as any);
|
|
2698
|
-
});
|
|
2699
|
-
},
|
|
2700
|
-
}) as () => void;
|
|
2701
|
-
},
|
|
2702
633
|
/**
|
|
2703
634
|
* Watch Transfer events
|
|
2704
635
|
* @param callback Function to call when event is emitted
|