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