@gitmyabi/usdt 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/contracts/{Tether_json.d.ts → TETHER_json.d.ts} +115 -225
- package/contracts/{Tether_json.js → TETHER_json.js} +138 -267
- package/contracts/{Tether_json.ts → TETHER_json.ts} +147 -299
- package/contracts/index.d.ts +2 -2
- package/contracts/index.js +4 -4
- package/contracts/index.ts +2 -2
- package/package.json +3 -3
|
@@ -1,42 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TETHER_json = exports.TETHER_jsonAbi = void 0;
|
|
4
4
|
const viem_1 = require("viem");
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* TETHER_json ABI
|
|
7
7
|
*
|
|
8
8
|
* This ABI is typed using viem's type system for full type safety.
|
|
9
9
|
*/
|
|
10
|
-
exports.
|
|
10
|
+
exports.TETHER_jsonAbi = [
|
|
11
11
|
{
|
|
12
|
-
"inputs": [],
|
|
13
|
-
"stateMutability": "nonpayable",
|
|
14
|
-
"type": "constructor"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"anonymous": false,
|
|
18
12
|
"inputs": [
|
|
19
13
|
{
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"type": "address"
|
|
14
|
+
"internalType": "string",
|
|
15
|
+
"name": "name_",
|
|
16
|
+
"type": "string"
|
|
24
17
|
},
|
|
25
18
|
{
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"type": "address"
|
|
19
|
+
"internalType": "string",
|
|
20
|
+
"name": "symbol_",
|
|
21
|
+
"type": "string"
|
|
30
22
|
},
|
|
31
23
|
{
|
|
32
|
-
"indexed": false,
|
|
33
24
|
"internalType": "uint256",
|
|
34
|
-
"name": "
|
|
25
|
+
"name": "decimals_",
|
|
35
26
|
"type": "uint256"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"internalType": "uint256",
|
|
30
|
+
"name": "initialBalance_",
|
|
31
|
+
"type": "uint256"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"internalType": "address",
|
|
35
|
+
"name": "tokenOwner",
|
|
36
|
+
"type": "address"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"internalType": "address payable",
|
|
40
|
+
"name": "feeReceiver_",
|
|
41
|
+
"type": "address"
|
|
36
42
|
}
|
|
37
43
|
],
|
|
38
|
-
"
|
|
39
|
-
"type": "
|
|
44
|
+
"stateMutability": "payable",
|
|
45
|
+
"type": "constructor"
|
|
40
46
|
},
|
|
41
47
|
{
|
|
42
48
|
"anonymous": false,
|
|
@@ -44,17 +50,23 @@ exports.Tether_jsonAbi = [
|
|
|
44
50
|
{
|
|
45
51
|
"indexed": true,
|
|
46
52
|
"internalType": "address",
|
|
47
|
-
"name": "
|
|
53
|
+
"name": "owner",
|
|
54
|
+
"type": "address"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"indexed": true,
|
|
58
|
+
"internalType": "address",
|
|
59
|
+
"name": "spender",
|
|
48
60
|
"type": "address"
|
|
49
61
|
},
|
|
50
62
|
{
|
|
51
63
|
"indexed": false,
|
|
52
64
|
"internalType": "uint256",
|
|
53
|
-
"name": "
|
|
65
|
+
"name": "value",
|
|
54
66
|
"type": "uint256"
|
|
55
67
|
}
|
|
56
68
|
],
|
|
57
|
-
"name": "
|
|
69
|
+
"name": "Approval",
|
|
58
70
|
"type": "event"
|
|
59
71
|
},
|
|
60
72
|
{
|
|
@@ -102,29 +114,36 @@ exports.Tether_jsonAbi = [
|
|
|
102
114
|
"type": "event"
|
|
103
115
|
},
|
|
104
116
|
{
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
|
|
108
|
-
"indexed": true,
|
|
109
|
-
"internalType": "address",
|
|
110
|
-
"name": "account",
|
|
111
|
-
"type": "address"
|
|
112
|
-
},
|
|
117
|
+
"inputs": [],
|
|
118
|
+
"name": "Optimization",
|
|
119
|
+
"outputs": [
|
|
113
120
|
{
|
|
114
|
-
"indexed": false,
|
|
115
121
|
"internalType": "uint256",
|
|
116
|
-
"name": "
|
|
122
|
+
"name": "",
|
|
117
123
|
"type": "uint256"
|
|
118
124
|
}
|
|
119
125
|
],
|
|
120
|
-
"
|
|
121
|
-
"type": "
|
|
126
|
+
"stateMutability": "view",
|
|
127
|
+
"type": "function"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"inputs": [],
|
|
131
|
+
"name": "_owner",
|
|
132
|
+
"outputs": [
|
|
133
|
+
{
|
|
134
|
+
"internalType": "address",
|
|
135
|
+
"name": "",
|
|
136
|
+
"type": "address"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"stateMutability": "view",
|
|
140
|
+
"type": "function"
|
|
122
141
|
},
|
|
123
142
|
{
|
|
124
143
|
"inputs": [
|
|
125
144
|
{
|
|
126
145
|
"internalType": "address",
|
|
127
|
-
"name": "
|
|
146
|
+
"name": "owner",
|
|
128
147
|
"type": "address"
|
|
129
148
|
},
|
|
130
149
|
{
|
|
@@ -168,25 +187,6 @@ exports.Tether_jsonAbi = [
|
|
|
168
187
|
"stateMutability": "nonpayable",
|
|
169
188
|
"type": "function"
|
|
170
189
|
},
|
|
171
|
-
{
|
|
172
|
-
"inputs": [
|
|
173
|
-
{
|
|
174
|
-
"internalType": "address",
|
|
175
|
-
"name": "account",
|
|
176
|
-
"type": "address"
|
|
177
|
-
}
|
|
178
|
-
],
|
|
179
|
-
"name": "availableBalanceOf",
|
|
180
|
-
"outputs": [
|
|
181
|
-
{
|
|
182
|
-
"internalType": "uint256",
|
|
183
|
-
"name": "",
|
|
184
|
-
"type": "uint256"
|
|
185
|
-
}
|
|
186
|
-
],
|
|
187
|
-
"stateMutability": "view",
|
|
188
|
-
"type": "function"
|
|
189
|
-
},
|
|
190
190
|
{
|
|
191
191
|
"inputs": [
|
|
192
192
|
{
|
|
@@ -211,9 +211,9 @@ exports.Tether_jsonAbi = [
|
|
|
211
211
|
"name": "decimals",
|
|
212
212
|
"outputs": [
|
|
213
213
|
{
|
|
214
|
-
"internalType": "
|
|
214
|
+
"internalType": "uint256",
|
|
215
215
|
"name": "",
|
|
216
|
-
"type": "
|
|
216
|
+
"type": "uint256"
|
|
217
217
|
}
|
|
218
218
|
],
|
|
219
219
|
"stateMutability": "view",
|
|
@@ -247,16 +247,16 @@ exports.Tether_jsonAbi = [
|
|
|
247
247
|
"inputs": [
|
|
248
248
|
{
|
|
249
249
|
"internalType": "address",
|
|
250
|
-
"name": "
|
|
250
|
+
"name": "spender",
|
|
251
251
|
"type": "address"
|
|
252
252
|
},
|
|
253
253
|
{
|
|
254
254
|
"internalType": "uint256",
|
|
255
|
-
"name": "
|
|
255
|
+
"name": "addedValue",
|
|
256
256
|
"type": "uint256"
|
|
257
257
|
}
|
|
258
258
|
],
|
|
259
|
-
"name": "
|
|
259
|
+
"name": "increaseAllowance",
|
|
260
260
|
"outputs": [
|
|
261
261
|
{
|
|
262
262
|
"internalType": "bool",
|
|
@@ -268,19 +268,26 @@ exports.Tether_jsonAbi = [
|
|
|
268
268
|
"type": "function"
|
|
269
269
|
},
|
|
270
270
|
{
|
|
271
|
-
"inputs": [
|
|
271
|
+
"inputs": [],
|
|
272
|
+
"name": "name",
|
|
273
|
+
"outputs": [
|
|
272
274
|
{
|
|
273
|
-
"internalType": "
|
|
274
|
-
"name": "
|
|
275
|
-
"type": "
|
|
275
|
+
"internalType": "string",
|
|
276
|
+
"name": "",
|
|
277
|
+
"type": "string"
|
|
276
278
|
}
|
|
277
279
|
],
|
|
278
|
-
"
|
|
280
|
+
"stateMutability": "view",
|
|
281
|
+
"type": "function"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"inputs": [],
|
|
285
|
+
"name": "owner",
|
|
279
286
|
"outputs": [
|
|
280
287
|
{
|
|
281
|
-
"internalType": "
|
|
288
|
+
"internalType": "address",
|
|
282
289
|
"name": "",
|
|
283
|
-
"type": "
|
|
290
|
+
"type": "address"
|
|
284
291
|
}
|
|
285
292
|
],
|
|
286
293
|
"stateMutability": "view",
|
|
@@ -290,50 +297,25 @@ exports.Tether_jsonAbi = [
|
|
|
290
297
|
"inputs": [
|
|
291
298
|
{
|
|
292
299
|
"internalType": "address",
|
|
293
|
-
"name": "
|
|
300
|
+
"name": "tokenAddress",
|
|
294
301
|
"type": "address"
|
|
295
302
|
},
|
|
296
303
|
{
|
|
297
304
|
"internalType": "uint256",
|
|
298
|
-
"name": "
|
|
305
|
+
"name": "tokenAmount",
|
|
299
306
|
"type": "uint256"
|
|
300
307
|
}
|
|
301
308
|
],
|
|
302
|
-
"name": "
|
|
303
|
-
"outputs": [
|
|
304
|
-
{
|
|
305
|
-
"internalType": "bool",
|
|
306
|
-
"name": "",
|
|
307
|
-
"type": "bool"
|
|
308
|
-
}
|
|
309
|
-
],
|
|
309
|
+
"name": "recoverERC20",
|
|
310
|
+
"outputs": [],
|
|
310
311
|
"stateMutability": "nonpayable",
|
|
311
312
|
"type": "function"
|
|
312
313
|
},
|
|
313
314
|
{
|
|
314
315
|
"inputs": [],
|
|
315
|
-
"name": "
|
|
316
|
-
"outputs": [
|
|
317
|
-
|
|
318
|
-
"internalType": "string",
|
|
319
|
-
"name": "",
|
|
320
|
-
"type": "string"
|
|
321
|
-
}
|
|
322
|
-
],
|
|
323
|
-
"stateMutability": "view",
|
|
324
|
-
"type": "function"
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
"inputs": [],
|
|
328
|
-
"name": "owner",
|
|
329
|
-
"outputs": [
|
|
330
|
-
{
|
|
331
|
-
"internalType": "address",
|
|
332
|
-
"name": "",
|
|
333
|
-
"type": "address"
|
|
334
|
-
}
|
|
335
|
-
],
|
|
336
|
-
"stateMutability": "view",
|
|
316
|
+
"name": "renounceOwnership",
|
|
317
|
+
"outputs": [],
|
|
318
|
+
"stateMutability": "nonpayable",
|
|
337
319
|
"type": "function"
|
|
338
320
|
},
|
|
339
321
|
{
|
|
@@ -366,7 +348,7 @@ exports.Tether_jsonAbi = [
|
|
|
366
348
|
"inputs": [
|
|
367
349
|
{
|
|
368
350
|
"internalType": "address",
|
|
369
|
-
"name": "
|
|
351
|
+
"name": "recipient",
|
|
370
352
|
"type": "address"
|
|
371
353
|
},
|
|
372
354
|
{
|
|
@@ -390,12 +372,12 @@ exports.Tether_jsonAbi = [
|
|
|
390
372
|
"inputs": [
|
|
391
373
|
{
|
|
392
374
|
"internalType": "address",
|
|
393
|
-
"name": "
|
|
375
|
+
"name": "sender",
|
|
394
376
|
"type": "address"
|
|
395
377
|
},
|
|
396
378
|
{
|
|
397
379
|
"internalType": "address",
|
|
398
|
-
"name": "
|
|
380
|
+
"name": "recipient",
|
|
399
381
|
"type": "address"
|
|
400
382
|
},
|
|
401
383
|
{
|
|
@@ -424,67 +406,13 @@ exports.Tether_jsonAbi = [
|
|
|
424
406
|
}
|
|
425
407
|
],
|
|
426
408
|
"name": "transferOwnership",
|
|
427
|
-
"outputs": [
|
|
428
|
-
{
|
|
429
|
-
"internalType": "bool",
|
|
430
|
-
"name": "",
|
|
431
|
-
"type": "bool"
|
|
432
|
-
}
|
|
433
|
-
],
|
|
434
|
-
"stateMutability": "nonpayable",
|
|
435
|
-
"type": "function"
|
|
436
|
-
},
|
|
437
|
-
{
|
|
438
|
-
"inputs": [
|
|
439
|
-
{
|
|
440
|
-
"internalType": "address",
|
|
441
|
-
"name": "to",
|
|
442
|
-
"type": "address"
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
"internalType": "uint256",
|
|
446
|
-
"name": "amount",
|
|
447
|
-
"type": "uint256"
|
|
448
|
-
}
|
|
449
|
-
],
|
|
450
|
-
"name": "transferWithFreeze",
|
|
451
|
-
"outputs": [
|
|
452
|
-
{
|
|
453
|
-
"internalType": "bool",
|
|
454
|
-
"name": "",
|
|
455
|
-
"type": "bool"
|
|
456
|
-
}
|
|
457
|
-
],
|
|
458
|
-
"stateMutability": "nonpayable",
|
|
459
|
-
"type": "function"
|
|
460
|
-
},
|
|
461
|
-
{
|
|
462
|
-
"inputs": [
|
|
463
|
-
{
|
|
464
|
-
"internalType": "address",
|
|
465
|
-
"name": "account",
|
|
466
|
-
"type": "address"
|
|
467
|
-
},
|
|
468
|
-
{
|
|
469
|
-
"internalType": "uint256",
|
|
470
|
-
"name": "amount",
|
|
471
|
-
"type": "uint256"
|
|
472
|
-
}
|
|
473
|
-
],
|
|
474
|
-
"name": "unfreezeBalance",
|
|
475
|
-
"outputs": [
|
|
476
|
-
{
|
|
477
|
-
"internalType": "bool",
|
|
478
|
-
"name": "",
|
|
479
|
-
"type": "bool"
|
|
480
|
-
}
|
|
481
|
-
],
|
|
409
|
+
"outputs": [],
|
|
482
410
|
"stateMutability": "nonpayable",
|
|
483
411
|
"type": "function"
|
|
484
412
|
}
|
|
485
413
|
];
|
|
486
414
|
/**
|
|
487
|
-
*
|
|
415
|
+
* TETHER_json Contract Class
|
|
488
416
|
*
|
|
489
417
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
490
418
|
*
|
|
@@ -492,12 +420,12 @@ exports.Tether_jsonAbi = [
|
|
|
492
420
|
* ```typescript
|
|
493
421
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
494
422
|
* import { mainnet } from 'viem/chains';
|
|
495
|
-
* import {
|
|
423
|
+
* import { TETHER_json } from 'TETHER_json';
|
|
496
424
|
*
|
|
497
425
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
498
426
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
499
427
|
*
|
|
500
|
-
* const contract = new
|
|
428
|
+
* const contract = new TETHER_json('0x...', { publicClient, walletClient });
|
|
501
429
|
*
|
|
502
430
|
* // Read functions
|
|
503
431
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -515,13 +443,13 @@ exports.Tether_jsonAbi = [
|
|
|
515
443
|
* });
|
|
516
444
|
* ```
|
|
517
445
|
*/
|
|
518
|
-
class
|
|
446
|
+
class TETHER_json {
|
|
519
447
|
constructor(address, clients) {
|
|
520
448
|
this.contractAddress = address;
|
|
521
449
|
this.publicClient = clients.publicClient;
|
|
522
450
|
this.contract = (0, viem_1.getContract)({
|
|
523
451
|
address,
|
|
524
|
-
abi: exports.
|
|
452
|
+
abi: exports.TETHER_jsonAbi,
|
|
525
453
|
client: {
|
|
526
454
|
public: clients.publicClient,
|
|
527
455
|
wallet: clients.walletClient,
|
|
@@ -541,18 +469,25 @@ class Tether_json {
|
|
|
541
469
|
return this.contract;
|
|
542
470
|
}
|
|
543
471
|
/**
|
|
544
|
-
*
|
|
472
|
+
* Optimization
|
|
473
|
+
* view
|
|
474
|
+
*/
|
|
475
|
+
async Optimization() {
|
|
476
|
+
return this.contract.read.Optimization();
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* _owner
|
|
545
480
|
* view
|
|
546
481
|
*/
|
|
547
|
-
async
|
|
548
|
-
return this.contract.read.
|
|
482
|
+
async _owner() {
|
|
483
|
+
return this.contract.read._owner();
|
|
549
484
|
}
|
|
550
485
|
/**
|
|
551
|
-
*
|
|
486
|
+
* allowance
|
|
552
487
|
* view
|
|
553
488
|
*/
|
|
554
|
-
async
|
|
555
|
-
return this.contract.read.
|
|
489
|
+
async allowance(owner, spender) {
|
|
490
|
+
return this.contract.read.allowance([owner, spender]);
|
|
556
491
|
}
|
|
557
492
|
/**
|
|
558
493
|
* balanceOf
|
|
@@ -568,13 +503,6 @@ class Tether_json {
|
|
|
568
503
|
async decimals() {
|
|
569
504
|
return this.contract.read.decimals();
|
|
570
505
|
}
|
|
571
|
-
/**
|
|
572
|
-
* frozenBalanceOf
|
|
573
|
-
* view
|
|
574
|
-
*/
|
|
575
|
-
async frozenBalanceOf(account) {
|
|
576
|
-
return this.contract.read.frozenBalanceOf([account]);
|
|
577
|
-
}
|
|
578
506
|
/**
|
|
579
507
|
* name
|
|
580
508
|
* view
|
|
@@ -625,17 +553,6 @@ class Tether_json {
|
|
|
625
553
|
}
|
|
626
554
|
return this.contract.write.decreaseAllowance([spender, subtractedValue], options);
|
|
627
555
|
}
|
|
628
|
-
/**
|
|
629
|
-
* freezeBalance
|
|
630
|
-
* nonpayable
|
|
631
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
632
|
-
*/
|
|
633
|
-
async freezeBalance(account, amount, options) {
|
|
634
|
-
if (!this.contract.write) {
|
|
635
|
-
throw new Error('Wallet client is required for write operations');
|
|
636
|
-
}
|
|
637
|
-
return this.contract.write.freezeBalance([account, amount], options);
|
|
638
|
-
}
|
|
639
556
|
/**
|
|
640
557
|
* increaseAllowance
|
|
641
558
|
* nonpayable
|
|
@@ -648,59 +565,59 @@ class Tether_json {
|
|
|
648
565
|
return this.contract.write.increaseAllowance([spender, addedValue], options);
|
|
649
566
|
}
|
|
650
567
|
/**
|
|
651
|
-
*
|
|
568
|
+
* recoverERC20
|
|
652
569
|
* nonpayable
|
|
653
570
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
654
571
|
*/
|
|
655
|
-
async
|
|
572
|
+
async recoverERC20(tokenAddress, tokenAmount, options) {
|
|
656
573
|
if (!this.contract.write) {
|
|
657
574
|
throw new Error('Wallet client is required for write operations');
|
|
658
575
|
}
|
|
659
|
-
return this.contract.write.
|
|
576
|
+
return this.contract.write.recoverERC20([tokenAddress, tokenAmount], options);
|
|
660
577
|
}
|
|
661
578
|
/**
|
|
662
|
-
*
|
|
579
|
+
* renounceOwnership
|
|
663
580
|
* nonpayable
|
|
664
581
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
665
582
|
*/
|
|
666
|
-
async
|
|
583
|
+
async renounceOwnership(options) {
|
|
667
584
|
if (!this.contract.write) {
|
|
668
585
|
throw new Error('Wallet client is required for write operations');
|
|
669
586
|
}
|
|
670
|
-
return this.contract.write.
|
|
587
|
+
return this.contract.write.renounceOwnership(options);
|
|
671
588
|
}
|
|
672
589
|
/**
|
|
673
|
-
*
|
|
590
|
+
* transfer
|
|
674
591
|
* nonpayable
|
|
675
592
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
676
593
|
*/
|
|
677
|
-
async
|
|
594
|
+
async transfer(recipient, amount, options) {
|
|
678
595
|
if (!this.contract.write) {
|
|
679
596
|
throw new Error('Wallet client is required for write operations');
|
|
680
597
|
}
|
|
681
|
-
return this.contract.write.
|
|
598
|
+
return this.contract.write.transfer([recipient, amount], options);
|
|
682
599
|
}
|
|
683
600
|
/**
|
|
684
|
-
*
|
|
601
|
+
* transferFrom
|
|
685
602
|
* nonpayable
|
|
686
603
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
687
604
|
*/
|
|
688
|
-
async
|
|
605
|
+
async transferFrom(sender, recipient, amount, options) {
|
|
689
606
|
if (!this.contract.write) {
|
|
690
607
|
throw new Error('Wallet client is required for write operations');
|
|
691
608
|
}
|
|
692
|
-
return this.contract.write.
|
|
609
|
+
return this.contract.write.transferFrom([sender, recipient, amount], options);
|
|
693
610
|
}
|
|
694
611
|
/**
|
|
695
|
-
*
|
|
612
|
+
* transferOwnership
|
|
696
613
|
* nonpayable
|
|
697
614
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
698
615
|
*/
|
|
699
|
-
async
|
|
616
|
+
async transferOwnership(newOwner, options) {
|
|
700
617
|
if (!this.contract.write) {
|
|
701
618
|
throw new Error('Wallet client is required for write operations');
|
|
702
619
|
}
|
|
703
|
-
return this.contract.write.
|
|
620
|
+
return this.contract.write.transferOwnership([newOwner], options);
|
|
704
621
|
}
|
|
705
622
|
/**
|
|
706
623
|
* Simulate contract write operations (dry-run without sending transaction)
|
|
@@ -732,14 +649,6 @@ class Tether_json {
|
|
|
732
649
|
async decreaseAllowance(spender, subtractedValue, options) {
|
|
733
650
|
return contract.simulate.decreaseAllowance([spender, subtractedValue], options);
|
|
734
651
|
},
|
|
735
|
-
/**
|
|
736
|
-
* Simulate freezeBalance
|
|
737
|
-
* Returns gas estimate and result without sending transaction
|
|
738
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
739
|
-
*/
|
|
740
|
-
async freezeBalance(account, amount, options) {
|
|
741
|
-
return contract.simulate.freezeBalance([account, amount], options);
|
|
742
|
-
},
|
|
743
652
|
/**
|
|
744
653
|
* Simulate increaseAllowance
|
|
745
654
|
* Returns gas estimate and result without sending transaction
|
|
@@ -749,44 +658,44 @@ class Tether_json {
|
|
|
749
658
|
return contract.simulate.increaseAllowance([spender, addedValue], options);
|
|
750
659
|
},
|
|
751
660
|
/**
|
|
752
|
-
* Simulate
|
|
661
|
+
* Simulate recoverERC20
|
|
753
662
|
* Returns gas estimate and result without sending transaction
|
|
754
663
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
755
664
|
*/
|
|
756
|
-
async
|
|
757
|
-
return contract.simulate.
|
|
665
|
+
async recoverERC20(tokenAddress, tokenAmount, options) {
|
|
666
|
+
return contract.simulate.recoverERC20([tokenAddress, tokenAmount], options);
|
|
758
667
|
},
|
|
759
668
|
/**
|
|
760
|
-
* Simulate
|
|
669
|
+
* Simulate renounceOwnership
|
|
761
670
|
* Returns gas estimate and result without sending transaction
|
|
762
671
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
763
672
|
*/
|
|
764
|
-
async
|
|
765
|
-
return contract.simulate.
|
|
673
|
+
async renounceOwnership(options) {
|
|
674
|
+
return contract.simulate.renounceOwnership(options);
|
|
766
675
|
},
|
|
767
676
|
/**
|
|
768
|
-
* Simulate
|
|
677
|
+
* Simulate transfer
|
|
769
678
|
* Returns gas estimate and result without sending transaction
|
|
770
679
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
771
680
|
*/
|
|
772
|
-
async
|
|
773
|
-
return contract.simulate.
|
|
681
|
+
async transfer(recipient, amount, options) {
|
|
682
|
+
return contract.simulate.transfer([recipient, amount], options);
|
|
774
683
|
},
|
|
775
684
|
/**
|
|
776
|
-
* Simulate
|
|
685
|
+
* Simulate transferFrom
|
|
777
686
|
* Returns gas estimate and result without sending transaction
|
|
778
687
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
779
688
|
*/
|
|
780
|
-
async
|
|
781
|
-
return contract.simulate.
|
|
689
|
+
async transferFrom(sender, recipient, amount, options) {
|
|
690
|
+
return contract.simulate.transferFrom([sender, recipient, amount], options);
|
|
782
691
|
},
|
|
783
692
|
/**
|
|
784
|
-
* Simulate
|
|
693
|
+
* Simulate transferOwnership
|
|
785
694
|
* Returns gas estimate and result without sending transaction
|
|
786
695
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
787
696
|
*/
|
|
788
|
-
async
|
|
789
|
-
return contract.simulate.
|
|
697
|
+
async transferOwnership(newOwner, options) {
|
|
698
|
+
return contract.simulate.transferOwnership([newOwner], options);
|
|
790
699
|
}
|
|
791
700
|
};
|
|
792
701
|
}
|
|
@@ -813,7 +722,7 @@ class Tether_json {
|
|
|
813
722
|
Approval: (callback, filter) => {
|
|
814
723
|
return this.publicClient.watchContractEvent({
|
|
815
724
|
address: this.contractAddress,
|
|
816
|
-
abi: exports.
|
|
725
|
+
abi: exports.TETHER_jsonAbi,
|
|
817
726
|
eventName: 'Approval',
|
|
818
727
|
args: filter,
|
|
819
728
|
onLogs: (logs) => {
|
|
@@ -823,25 +732,6 @@ class Tether_json {
|
|
|
823
732
|
},
|
|
824
733
|
});
|
|
825
734
|
},
|
|
826
|
-
/**
|
|
827
|
-
* Watch Freeze events
|
|
828
|
-
* @param callback Function to call when event is emitted
|
|
829
|
-
* @param filter Optional filter for indexed parameters
|
|
830
|
-
* @returns Unwatch function to stop listening
|
|
831
|
-
*/
|
|
832
|
-
Freeze: (callback, filter) => {
|
|
833
|
-
return this.publicClient.watchContractEvent({
|
|
834
|
-
address: this.contractAddress,
|
|
835
|
-
abi: exports.Tether_jsonAbi,
|
|
836
|
-
eventName: 'Freeze',
|
|
837
|
-
args: filter,
|
|
838
|
-
onLogs: (logs) => {
|
|
839
|
-
logs.forEach((log) => {
|
|
840
|
-
callback(log.args);
|
|
841
|
-
});
|
|
842
|
-
},
|
|
843
|
-
});
|
|
844
|
-
},
|
|
845
735
|
/**
|
|
846
736
|
* Watch OwnershipTransferred events
|
|
847
737
|
* @param callback Function to call when event is emitted
|
|
@@ -851,7 +741,7 @@ class Tether_json {
|
|
|
851
741
|
OwnershipTransferred: (callback, filter) => {
|
|
852
742
|
return this.publicClient.watchContractEvent({
|
|
853
743
|
address: this.contractAddress,
|
|
854
|
-
abi: exports.
|
|
744
|
+
abi: exports.TETHER_jsonAbi,
|
|
855
745
|
eventName: 'OwnershipTransferred',
|
|
856
746
|
args: filter,
|
|
857
747
|
onLogs: (logs) => {
|
|
@@ -870,7 +760,7 @@ class Tether_json {
|
|
|
870
760
|
Transfer: (callback, filter) => {
|
|
871
761
|
return this.publicClient.watchContractEvent({
|
|
872
762
|
address: this.contractAddress,
|
|
873
|
-
abi: exports.
|
|
763
|
+
abi: exports.TETHER_jsonAbi,
|
|
874
764
|
eventName: 'Transfer',
|
|
875
765
|
args: filter,
|
|
876
766
|
onLogs: (logs) => {
|
|
@@ -879,27 +769,8 @@ class Tether_json {
|
|
|
879
769
|
});
|
|
880
770
|
},
|
|
881
771
|
});
|
|
882
|
-
},
|
|
883
|
-
/**
|
|
884
|
-
* Watch Unfreeze events
|
|
885
|
-
* @param callback Function to call when event is emitted
|
|
886
|
-
* @param filter Optional filter for indexed parameters
|
|
887
|
-
* @returns Unwatch function to stop listening
|
|
888
|
-
*/
|
|
889
|
-
Unfreeze: (callback, filter) => {
|
|
890
|
-
return this.publicClient.watchContractEvent({
|
|
891
|
-
address: this.contractAddress,
|
|
892
|
-
abi: exports.Tether_jsonAbi,
|
|
893
|
-
eventName: 'Unfreeze',
|
|
894
|
-
args: filter,
|
|
895
|
-
onLogs: (logs) => {
|
|
896
|
-
logs.forEach((log) => {
|
|
897
|
-
callback(log.args);
|
|
898
|
-
});
|
|
899
|
-
},
|
|
900
|
-
});
|
|
901
772
|
}
|
|
902
773
|
};
|
|
903
774
|
}
|
|
904
775
|
}
|
|
905
|
-
exports.
|
|
776
|
+
exports.TETHER_json = TETHER_json;
|