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