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