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