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