@gitmyabi/usdt 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/contracts/BridgeToken_json.d.ts +169 -0
- package/contracts/BridgeToken_json.js +221 -0
- package/contracts/BridgeToken_json.ts +251 -0
- package/contracts/{TetherUSD_json.d.ts → TokenImplementation_json.d.ts} +266 -145
- package/contracts/{TetherUSD_json.js → TokenImplementation_json.js} +319 -189
- package/contracts/{TetherUSD_json.ts → TokenImplementation_json.ts} +349 -193
- package/contracts/index.d.ts +4 -2
- package/contracts/index.js +7 -4
- package/contracts/index.ts +4 -2
- package/package.json +3 -3
|
@@ -1,49 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TokenImplementation_json = exports.TokenImplementation_jsonAbi = void 0;
|
|
4
4
|
const viem_1 = require("viem");
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* TokenImplementation_json ABI
|
|
7
7
|
*
|
|
8
8
|
* This ABI is typed using viem's type system for full type safety.
|
|
9
9
|
*/
|
|
10
|
-
exports.
|
|
11
|
-
{
|
|
12
|
-
"inputs": [
|
|
13
|
-
{
|
|
14
|
-
"internalType": "string",
|
|
15
|
-
"name": "name_",
|
|
16
|
-
"type": "string"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"internalType": "string",
|
|
20
|
-
"name": "symbol_",
|
|
21
|
-
"type": "string"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"internalType": "uint256",
|
|
25
|
-
"name": "decimals_",
|
|
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"
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
"stateMutability": "payable",
|
|
45
|
-
"type": "constructor"
|
|
46
|
-
},
|
|
10
|
+
exports.TokenImplementation_jsonAbi = [
|
|
47
11
|
{
|
|
48
12
|
"anonymous": false,
|
|
49
13
|
"inputs": [
|
|
@@ -69,25 +33,6 @@ exports.TetherUSD_jsonAbi = [
|
|
|
69
33
|
"name": "Approval",
|
|
70
34
|
"type": "event"
|
|
71
35
|
},
|
|
72
|
-
{
|
|
73
|
-
"anonymous": false,
|
|
74
|
-
"inputs": [
|
|
75
|
-
{
|
|
76
|
-
"indexed": true,
|
|
77
|
-
"internalType": "address",
|
|
78
|
-
"name": "previousOwner",
|
|
79
|
-
"type": "address"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"indexed": true,
|
|
83
|
-
"internalType": "address",
|
|
84
|
-
"name": "newOwner",
|
|
85
|
-
"type": "address"
|
|
86
|
-
}
|
|
87
|
-
],
|
|
88
|
-
"name": "OwnershipTransferred",
|
|
89
|
-
"type": "event"
|
|
90
|
-
},
|
|
91
36
|
{
|
|
92
37
|
"anonymous": false,
|
|
93
38
|
"inputs": [
|
|
@@ -115,25 +60,12 @@ exports.TetherUSD_jsonAbi = [
|
|
|
115
60
|
},
|
|
116
61
|
{
|
|
117
62
|
"inputs": [],
|
|
118
|
-
"name": "
|
|
119
|
-
"outputs": [
|
|
120
|
-
{
|
|
121
|
-
"internalType": "uint256",
|
|
122
|
-
"name": "",
|
|
123
|
-
"type": "uint256"
|
|
124
|
-
}
|
|
125
|
-
],
|
|
126
|
-
"stateMutability": "view",
|
|
127
|
-
"type": "function"
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"inputs": [],
|
|
131
|
-
"name": "_owner",
|
|
63
|
+
"name": "DOMAIN_SEPARATOR",
|
|
132
64
|
"outputs": [
|
|
133
65
|
{
|
|
134
|
-
"internalType": "
|
|
66
|
+
"internalType": "bytes32",
|
|
135
67
|
"name": "",
|
|
136
|
-
"type": "
|
|
68
|
+
"type": "bytes32"
|
|
137
69
|
}
|
|
138
70
|
],
|
|
139
71
|
"stateMutability": "view",
|
|
@@ -143,12 +75,12 @@ exports.TetherUSD_jsonAbi = [
|
|
|
143
75
|
"inputs": [
|
|
144
76
|
{
|
|
145
77
|
"internalType": "address",
|
|
146
|
-
"name": "
|
|
78
|
+
"name": "owner_",
|
|
147
79
|
"type": "address"
|
|
148
80
|
},
|
|
149
81
|
{
|
|
150
82
|
"internalType": "address",
|
|
151
|
-
"name": "
|
|
83
|
+
"name": "spender_",
|
|
152
84
|
"type": "address"
|
|
153
85
|
}
|
|
154
86
|
],
|
|
@@ -167,12 +99,12 @@ exports.TetherUSD_jsonAbi = [
|
|
|
167
99
|
"inputs": [
|
|
168
100
|
{
|
|
169
101
|
"internalType": "address",
|
|
170
|
-
"name": "
|
|
102
|
+
"name": "spender_",
|
|
171
103
|
"type": "address"
|
|
172
104
|
},
|
|
173
105
|
{
|
|
174
106
|
"internalType": "uint256",
|
|
175
|
-
"name": "
|
|
107
|
+
"name": "amount_",
|
|
176
108
|
"type": "uint256"
|
|
177
109
|
}
|
|
178
110
|
],
|
|
@@ -191,7 +123,7 @@ exports.TetherUSD_jsonAbi = [
|
|
|
191
123
|
"inputs": [
|
|
192
124
|
{
|
|
193
125
|
"internalType": "address",
|
|
194
|
-
"name": "
|
|
126
|
+
"name": "account_",
|
|
195
127
|
"type": "address"
|
|
196
128
|
}
|
|
197
129
|
],
|
|
@@ -206,14 +138,45 @@ exports.TetherUSD_jsonAbi = [
|
|
|
206
138
|
"stateMutability": "view",
|
|
207
139
|
"type": "function"
|
|
208
140
|
},
|
|
141
|
+
{
|
|
142
|
+
"inputs": [
|
|
143
|
+
{
|
|
144
|
+
"internalType": "address",
|
|
145
|
+
"name": "account_",
|
|
146
|
+
"type": "address"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"internalType": "uint256",
|
|
150
|
+
"name": "amount_",
|
|
151
|
+
"type": "uint256"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"name": "burn",
|
|
155
|
+
"outputs": [],
|
|
156
|
+
"stateMutability": "nonpayable",
|
|
157
|
+
"type": "function"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"inputs": [],
|
|
161
|
+
"name": "chainId",
|
|
162
|
+
"outputs": [
|
|
163
|
+
{
|
|
164
|
+
"internalType": "uint16",
|
|
165
|
+
"name": "",
|
|
166
|
+
"type": "uint16"
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"stateMutability": "view",
|
|
170
|
+
"type": "function"
|
|
171
|
+
},
|
|
209
172
|
{
|
|
210
173
|
"inputs": [],
|
|
211
174
|
"name": "decimals",
|
|
212
175
|
"outputs": [
|
|
213
176
|
{
|
|
214
|
-
"internalType": "
|
|
177
|
+
"internalType": "uint8",
|
|
215
178
|
"name": "",
|
|
216
|
-
"type": "
|
|
179
|
+
"type": "uint8"
|
|
217
180
|
}
|
|
218
181
|
],
|
|
219
182
|
"stateMutability": "view",
|
|
@@ -223,12 +186,12 @@ exports.TetherUSD_jsonAbi = [
|
|
|
223
186
|
"inputs": [
|
|
224
187
|
{
|
|
225
188
|
"internalType": "address",
|
|
226
|
-
"name": "
|
|
189
|
+
"name": "spender_",
|
|
227
190
|
"type": "address"
|
|
228
191
|
},
|
|
229
192
|
{
|
|
230
193
|
"internalType": "uint256",
|
|
231
|
-
"name": "
|
|
194
|
+
"name": "subtractedValue_",
|
|
232
195
|
"type": "uint256"
|
|
233
196
|
}
|
|
234
197
|
],
|
|
@@ -243,16 +206,59 @@ exports.TetherUSD_jsonAbi = [
|
|
|
243
206
|
"stateMutability": "nonpayable",
|
|
244
207
|
"type": "function"
|
|
245
208
|
},
|
|
209
|
+
{
|
|
210
|
+
"inputs": [],
|
|
211
|
+
"name": "eip712Domain",
|
|
212
|
+
"outputs": [
|
|
213
|
+
{
|
|
214
|
+
"internalType": "bytes1",
|
|
215
|
+
"name": "domainFields",
|
|
216
|
+
"type": "bytes1"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"internalType": "string",
|
|
220
|
+
"name": "domainName",
|
|
221
|
+
"type": "string"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"internalType": "string",
|
|
225
|
+
"name": "domainVersion",
|
|
226
|
+
"type": "string"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"internalType": "uint256",
|
|
230
|
+
"name": "domainChainId",
|
|
231
|
+
"type": "uint256"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"internalType": "address",
|
|
235
|
+
"name": "domainVerifyingContract",
|
|
236
|
+
"type": "address"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"internalType": "bytes32",
|
|
240
|
+
"name": "domainSalt",
|
|
241
|
+
"type": "bytes32"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"internalType": "uint256[]",
|
|
245
|
+
"name": "domainExtensions",
|
|
246
|
+
"type": "uint256[]"
|
|
247
|
+
}
|
|
248
|
+
],
|
|
249
|
+
"stateMutability": "view",
|
|
250
|
+
"type": "function"
|
|
251
|
+
},
|
|
246
252
|
{
|
|
247
253
|
"inputs": [
|
|
248
254
|
{
|
|
249
255
|
"internalType": "address",
|
|
250
|
-
"name": "
|
|
256
|
+
"name": "spender_",
|
|
251
257
|
"type": "address"
|
|
252
258
|
},
|
|
253
259
|
{
|
|
254
260
|
"internalType": "uint256",
|
|
255
|
-
"name": "
|
|
261
|
+
"name": "addedValue_",
|
|
256
262
|
"type": "uint256"
|
|
257
263
|
}
|
|
258
264
|
],
|
|
@@ -267,16 +273,59 @@ exports.TetherUSD_jsonAbi = [
|
|
|
267
273
|
"stateMutability": "nonpayable",
|
|
268
274
|
"type": "function"
|
|
269
275
|
},
|
|
276
|
+
{
|
|
277
|
+
"inputs": [
|
|
278
|
+
{
|
|
279
|
+
"internalType": "string",
|
|
280
|
+
"name": "name_",
|
|
281
|
+
"type": "string"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"internalType": "string",
|
|
285
|
+
"name": "symbol_",
|
|
286
|
+
"type": "string"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"internalType": "uint8",
|
|
290
|
+
"name": "decimals_",
|
|
291
|
+
"type": "uint8"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"internalType": "uint64",
|
|
295
|
+
"name": "sequence_",
|
|
296
|
+
"type": "uint64"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"internalType": "address",
|
|
300
|
+
"name": "owner_",
|
|
301
|
+
"type": "address"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"internalType": "uint16",
|
|
305
|
+
"name": "chainId_",
|
|
306
|
+
"type": "uint16"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"internalType": "bytes32",
|
|
310
|
+
"name": "nativeContract_",
|
|
311
|
+
"type": "bytes32"
|
|
312
|
+
}
|
|
313
|
+
],
|
|
314
|
+
"name": "initialize",
|
|
315
|
+
"outputs": [],
|
|
316
|
+
"stateMutability": "nonpayable",
|
|
317
|
+
"type": "function"
|
|
318
|
+
},
|
|
270
319
|
{
|
|
271
320
|
"inputs": [
|
|
272
321
|
{
|
|
273
322
|
"internalType": "address",
|
|
274
|
-
"name": "
|
|
323
|
+
"name": "account_",
|
|
275
324
|
"type": "address"
|
|
276
325
|
},
|
|
277
326
|
{
|
|
278
327
|
"internalType": "uint256",
|
|
279
|
-
"name": "
|
|
328
|
+
"name": "amount_",
|
|
280
329
|
"type": "uint256"
|
|
281
330
|
}
|
|
282
331
|
],
|
|
@@ -300,12 +349,12 @@ exports.TetherUSD_jsonAbi = [
|
|
|
300
349
|
},
|
|
301
350
|
{
|
|
302
351
|
"inputs": [],
|
|
303
|
-
"name": "
|
|
352
|
+
"name": "nativeContract",
|
|
304
353
|
"outputs": [
|
|
305
354
|
{
|
|
306
|
-
"internalType": "
|
|
355
|
+
"internalType": "bytes32",
|
|
307
356
|
"name": "",
|
|
308
|
-
"type": "
|
|
357
|
+
"type": "bytes32"
|
|
309
358
|
}
|
|
310
359
|
],
|
|
311
360
|
"stateMutability": "view",
|
|
@@ -315,23 +364,73 @@ exports.TetherUSD_jsonAbi = [
|
|
|
315
364
|
"inputs": [
|
|
316
365
|
{
|
|
317
366
|
"internalType": "address",
|
|
318
|
-
"name": "
|
|
367
|
+
"name": "owner_",
|
|
319
368
|
"type": "address"
|
|
320
|
-
}
|
|
369
|
+
}
|
|
370
|
+
],
|
|
371
|
+
"name": "nonces",
|
|
372
|
+
"outputs": [
|
|
321
373
|
{
|
|
322
374
|
"internalType": "uint256",
|
|
323
|
-
"name": "
|
|
375
|
+
"name": "",
|
|
324
376
|
"type": "uint256"
|
|
325
377
|
}
|
|
326
378
|
],
|
|
327
|
-
"
|
|
328
|
-
"outputs": [],
|
|
329
|
-
"stateMutability": "nonpayable",
|
|
379
|
+
"stateMutability": "view",
|
|
330
380
|
"type": "function"
|
|
331
381
|
},
|
|
332
382
|
{
|
|
333
383
|
"inputs": [],
|
|
334
|
-
"name": "
|
|
384
|
+
"name": "owner",
|
|
385
|
+
"outputs": [
|
|
386
|
+
{
|
|
387
|
+
"internalType": "address",
|
|
388
|
+
"name": "",
|
|
389
|
+
"type": "address"
|
|
390
|
+
}
|
|
391
|
+
],
|
|
392
|
+
"stateMutability": "view",
|
|
393
|
+
"type": "function"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"inputs": [
|
|
397
|
+
{
|
|
398
|
+
"internalType": "address",
|
|
399
|
+
"name": "owner_",
|
|
400
|
+
"type": "address"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"internalType": "address",
|
|
404
|
+
"name": "spender_",
|
|
405
|
+
"type": "address"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"internalType": "uint256",
|
|
409
|
+
"name": "value_",
|
|
410
|
+
"type": "uint256"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"internalType": "uint256",
|
|
414
|
+
"name": "deadline_",
|
|
415
|
+
"type": "uint256"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
"internalType": "uint8",
|
|
419
|
+
"name": "v_",
|
|
420
|
+
"type": "uint8"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"internalType": "bytes32",
|
|
424
|
+
"name": "r_",
|
|
425
|
+
"type": "bytes32"
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"internalType": "bytes32",
|
|
429
|
+
"name": "s_",
|
|
430
|
+
"type": "bytes32"
|
|
431
|
+
}
|
|
432
|
+
],
|
|
433
|
+
"name": "permit",
|
|
335
434
|
"outputs": [],
|
|
336
435
|
"stateMutability": "nonpayable",
|
|
337
436
|
"type": "function"
|
|
@@ -366,12 +465,12 @@ exports.TetherUSD_jsonAbi = [
|
|
|
366
465
|
"inputs": [
|
|
367
466
|
{
|
|
368
467
|
"internalType": "address",
|
|
369
|
-
"name": "
|
|
468
|
+
"name": "recipient_",
|
|
370
469
|
"type": "address"
|
|
371
470
|
},
|
|
372
471
|
{
|
|
373
472
|
"internalType": "uint256",
|
|
374
|
-
"name": "
|
|
473
|
+
"name": "amount_",
|
|
375
474
|
"type": "uint256"
|
|
376
475
|
}
|
|
377
476
|
],
|
|
@@ -390,17 +489,17 @@ exports.TetherUSD_jsonAbi = [
|
|
|
390
489
|
"inputs": [
|
|
391
490
|
{
|
|
392
491
|
"internalType": "address",
|
|
393
|
-
"name": "
|
|
492
|
+
"name": "sender_",
|
|
394
493
|
"type": "address"
|
|
395
494
|
},
|
|
396
495
|
{
|
|
397
496
|
"internalType": "address",
|
|
398
|
-
"name": "
|
|
497
|
+
"name": "recipient_",
|
|
399
498
|
"type": "address"
|
|
400
499
|
},
|
|
401
500
|
{
|
|
402
501
|
"internalType": "uint256",
|
|
403
|
-
"name": "
|
|
502
|
+
"name": "amount_",
|
|
404
503
|
"type": "uint256"
|
|
405
504
|
}
|
|
406
505
|
],
|
|
@@ -418,19 +517,29 @@ exports.TetherUSD_jsonAbi = [
|
|
|
418
517
|
{
|
|
419
518
|
"inputs": [
|
|
420
519
|
{
|
|
421
|
-
"internalType": "
|
|
422
|
-
"name": "
|
|
423
|
-
"type": "
|
|
520
|
+
"internalType": "string",
|
|
521
|
+
"name": "name_",
|
|
522
|
+
"type": "string"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"internalType": "string",
|
|
526
|
+
"name": "symbol_",
|
|
527
|
+
"type": "string"
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
"internalType": "uint64",
|
|
531
|
+
"name": "sequence_",
|
|
532
|
+
"type": "uint64"
|
|
424
533
|
}
|
|
425
534
|
],
|
|
426
|
-
"name": "
|
|
535
|
+
"name": "updateDetails",
|
|
427
536
|
"outputs": [],
|
|
428
537
|
"stateMutability": "nonpayable",
|
|
429
538
|
"type": "function"
|
|
430
539
|
}
|
|
431
540
|
];
|
|
432
541
|
/**
|
|
433
|
-
*
|
|
542
|
+
* TokenImplementation_json Contract Class
|
|
434
543
|
*
|
|
435
544
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
436
545
|
*
|
|
@@ -438,12 +547,12 @@ exports.TetherUSD_jsonAbi = [
|
|
|
438
547
|
* ```typescript
|
|
439
548
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
440
549
|
* import { mainnet } from 'viem/chains';
|
|
441
|
-
* import {
|
|
550
|
+
* import { TokenImplementation_json } from 'TokenImplementation_json';
|
|
442
551
|
*
|
|
443
552
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
444
553
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
445
554
|
*
|
|
446
|
-
* const contract = new
|
|
555
|
+
* const contract = new TokenImplementation_json('0x...', { publicClient, walletClient });
|
|
447
556
|
*
|
|
448
557
|
* // Read functions
|
|
449
558
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -461,13 +570,13 @@ exports.TetherUSD_jsonAbi = [
|
|
|
461
570
|
* });
|
|
462
571
|
* ```
|
|
463
572
|
*/
|
|
464
|
-
class
|
|
573
|
+
class TokenImplementation_json {
|
|
465
574
|
constructor(address, clients) {
|
|
466
575
|
this.contractAddress = address;
|
|
467
576
|
this.publicClient = clients.publicClient;
|
|
468
577
|
this.contract = (0, viem_1.getContract)({
|
|
469
578
|
address,
|
|
470
|
-
abi: exports.
|
|
579
|
+
abi: exports.TokenImplementation_jsonAbi,
|
|
471
580
|
client: {
|
|
472
581
|
public: clients.publicClient,
|
|
473
582
|
wallet: clients.walletClient,
|
|
@@ -487,32 +596,32 @@ class TetherUSD_json {
|
|
|
487
596
|
return this.contract;
|
|
488
597
|
}
|
|
489
598
|
/**
|
|
490
|
-
*
|
|
599
|
+
* DOMAIN_SEPARATOR
|
|
491
600
|
* view
|
|
492
601
|
*/
|
|
493
|
-
async
|
|
494
|
-
return this.contract.read.
|
|
602
|
+
async DOMAIN_SEPARATOR() {
|
|
603
|
+
return this.contract.read.DOMAIN_SEPARATOR();
|
|
495
604
|
}
|
|
496
605
|
/**
|
|
497
|
-
*
|
|
606
|
+
* allowance
|
|
498
607
|
* view
|
|
499
608
|
*/
|
|
500
|
-
async
|
|
501
|
-
return this.contract.read.
|
|
609
|
+
async allowance(owner_, spender_) {
|
|
610
|
+
return this.contract.read.allowance([owner_, spender_]);
|
|
502
611
|
}
|
|
503
612
|
/**
|
|
504
|
-
*
|
|
613
|
+
* balanceOf
|
|
505
614
|
* view
|
|
506
615
|
*/
|
|
507
|
-
async
|
|
508
|
-
return this.contract.read.
|
|
616
|
+
async balanceOf(account_) {
|
|
617
|
+
return this.contract.read.balanceOf([account_]);
|
|
509
618
|
}
|
|
510
619
|
/**
|
|
511
|
-
*
|
|
620
|
+
* chainId
|
|
512
621
|
* view
|
|
513
622
|
*/
|
|
514
|
-
async
|
|
515
|
-
return this.contract.read.
|
|
623
|
+
async chainId() {
|
|
624
|
+
return this.contract.read.chainId();
|
|
516
625
|
}
|
|
517
626
|
/**
|
|
518
627
|
* decimals
|
|
@@ -521,6 +630,13 @@ class TetherUSD_json {
|
|
|
521
630
|
async decimals() {
|
|
522
631
|
return this.contract.read.decimals();
|
|
523
632
|
}
|
|
633
|
+
/**
|
|
634
|
+
* eip712Domain
|
|
635
|
+
* view
|
|
636
|
+
*/
|
|
637
|
+
async eip712Domain() {
|
|
638
|
+
return this.contract.read.eip712Domain();
|
|
639
|
+
}
|
|
524
640
|
/**
|
|
525
641
|
* name
|
|
526
642
|
* view
|
|
@@ -528,6 +644,20 @@ class TetherUSD_json {
|
|
|
528
644
|
async name() {
|
|
529
645
|
return this.contract.read.name();
|
|
530
646
|
}
|
|
647
|
+
/**
|
|
648
|
+
* nativeContract
|
|
649
|
+
* view
|
|
650
|
+
*/
|
|
651
|
+
async nativeContract() {
|
|
652
|
+
return this.contract.read.nativeContract();
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* nonces
|
|
656
|
+
* view
|
|
657
|
+
*/
|
|
658
|
+
async nonces(owner_) {
|
|
659
|
+
return this.contract.read.nonces([owner_]);
|
|
660
|
+
}
|
|
531
661
|
/**
|
|
532
662
|
* owner
|
|
533
663
|
* view
|
|
@@ -554,99 +684,110 @@ class TetherUSD_json {
|
|
|
554
684
|
* nonpayable
|
|
555
685
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
556
686
|
*/
|
|
557
|
-
async approve(
|
|
687
|
+
async approve(spender_, amount_, options) {
|
|
558
688
|
if (!this.contract.write) {
|
|
559
689
|
throw new Error('Wallet client is required for write operations');
|
|
560
690
|
}
|
|
561
|
-
return this.contract.write.approve([
|
|
691
|
+
return this.contract.write.approve([spender_, amount_], options);
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* burn
|
|
695
|
+
* nonpayable
|
|
696
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
697
|
+
*/
|
|
698
|
+
async burn(account_, amount_, options) {
|
|
699
|
+
if (!this.contract.write) {
|
|
700
|
+
throw new Error('Wallet client is required for write operations');
|
|
701
|
+
}
|
|
702
|
+
return this.contract.write.burn([account_, amount_], options);
|
|
562
703
|
}
|
|
563
704
|
/**
|
|
564
705
|
* decreaseAllowance
|
|
565
706
|
* nonpayable
|
|
566
707
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
567
708
|
*/
|
|
568
|
-
async decreaseAllowance(
|
|
709
|
+
async decreaseAllowance(spender_, subtractedValue_, options) {
|
|
569
710
|
if (!this.contract.write) {
|
|
570
711
|
throw new Error('Wallet client is required for write operations');
|
|
571
712
|
}
|
|
572
|
-
return this.contract.write.decreaseAllowance([
|
|
713
|
+
return this.contract.write.decreaseAllowance([spender_, subtractedValue_], options);
|
|
573
714
|
}
|
|
574
715
|
/**
|
|
575
716
|
* increaseAllowance
|
|
576
717
|
* nonpayable
|
|
577
718
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
578
719
|
*/
|
|
579
|
-
async increaseAllowance(
|
|
720
|
+
async increaseAllowance(spender_, addedValue_, options) {
|
|
580
721
|
if (!this.contract.write) {
|
|
581
722
|
throw new Error('Wallet client is required for write operations');
|
|
582
723
|
}
|
|
583
|
-
return this.contract.write.increaseAllowance([
|
|
724
|
+
return this.contract.write.increaseAllowance([spender_, addedValue_], options);
|
|
584
725
|
}
|
|
585
726
|
/**
|
|
586
|
-
*
|
|
727
|
+
* initialize
|
|
587
728
|
* nonpayable
|
|
588
729
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
589
730
|
*/
|
|
590
|
-
async
|
|
731
|
+
async initialize(name_, symbol_, decimals_, sequence_, owner_, chainId_, nativeContract_, options) {
|
|
591
732
|
if (!this.contract.write) {
|
|
592
733
|
throw new Error('Wallet client is required for write operations');
|
|
593
734
|
}
|
|
594
|
-
return this.contract.write.
|
|
735
|
+
return this.contract.write.initialize([name_, symbol_, decimals_, sequence_, owner_, chainId_, nativeContract_], options);
|
|
595
736
|
}
|
|
596
737
|
/**
|
|
597
|
-
*
|
|
738
|
+
* mint
|
|
598
739
|
* nonpayable
|
|
599
740
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
600
741
|
*/
|
|
601
|
-
async
|
|
742
|
+
async mint(account_, amount_, options) {
|
|
602
743
|
if (!this.contract.write) {
|
|
603
744
|
throw new Error('Wallet client is required for write operations');
|
|
604
745
|
}
|
|
605
|
-
return this.contract.write.
|
|
746
|
+
return this.contract.write.mint([account_, amount_], options);
|
|
606
747
|
}
|
|
607
748
|
/**
|
|
608
|
-
*
|
|
749
|
+
* permit
|
|
609
750
|
* nonpayable
|
|
610
751
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
611
752
|
*/
|
|
612
|
-
async
|
|
753
|
+
async permit(owner_, spender_, value_, deadline_, v_, r_, s_, options) {
|
|
613
754
|
if (!this.contract.write) {
|
|
614
755
|
throw new Error('Wallet client is required for write operations');
|
|
615
756
|
}
|
|
616
|
-
return this.contract.write.
|
|
757
|
+
return this.contract.write.permit([owner_, spender_, value_, deadline_, v_, r_, s_], options);
|
|
617
758
|
}
|
|
618
759
|
/**
|
|
619
760
|
* transfer
|
|
620
761
|
* nonpayable
|
|
621
762
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
622
763
|
*/
|
|
623
|
-
async transfer(
|
|
764
|
+
async transfer(recipient_, amount_, options) {
|
|
624
765
|
if (!this.contract.write) {
|
|
625
766
|
throw new Error('Wallet client is required for write operations');
|
|
626
767
|
}
|
|
627
|
-
return this.contract.write.transfer([
|
|
768
|
+
return this.contract.write.transfer([recipient_, amount_], options);
|
|
628
769
|
}
|
|
629
770
|
/**
|
|
630
771
|
* transferFrom
|
|
631
772
|
* nonpayable
|
|
632
773
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
633
774
|
*/
|
|
634
|
-
async transferFrom(
|
|
775
|
+
async transferFrom(sender_, recipient_, amount_, options) {
|
|
635
776
|
if (!this.contract.write) {
|
|
636
777
|
throw new Error('Wallet client is required for write operations');
|
|
637
778
|
}
|
|
638
|
-
return this.contract.write.transferFrom([
|
|
779
|
+
return this.contract.write.transferFrom([sender_, recipient_, amount_], options);
|
|
639
780
|
}
|
|
640
781
|
/**
|
|
641
|
-
*
|
|
782
|
+
* updateDetails
|
|
642
783
|
* nonpayable
|
|
643
784
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
644
785
|
*/
|
|
645
|
-
async
|
|
786
|
+
async updateDetails(name_, symbol_, sequence_, options) {
|
|
646
787
|
if (!this.contract.write) {
|
|
647
788
|
throw new Error('Wallet client is required for write operations');
|
|
648
789
|
}
|
|
649
|
-
return this.contract.write.
|
|
790
|
+
return this.contract.write.updateDetails([name_, symbol_, sequence_], options);
|
|
650
791
|
}
|
|
651
792
|
/**
|
|
652
793
|
* Simulate contract write operations (dry-run without sending transaction)
|
|
@@ -667,72 +808,80 @@ class TetherUSD_json {
|
|
|
667
808
|
* Returns gas estimate and result without sending transaction
|
|
668
809
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
669
810
|
*/
|
|
670
|
-
async approve(
|
|
671
|
-
return contract.simulate.approve([
|
|
811
|
+
async approve(spender_, amount_, options) {
|
|
812
|
+
return contract.simulate.approve([spender_, amount_], options);
|
|
813
|
+
},
|
|
814
|
+
/**
|
|
815
|
+
* Simulate burn
|
|
816
|
+
* Returns gas estimate and result without sending transaction
|
|
817
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
818
|
+
*/
|
|
819
|
+
async burn(account_, amount_, options) {
|
|
820
|
+
return contract.simulate.burn([account_, amount_], options);
|
|
672
821
|
},
|
|
673
822
|
/**
|
|
674
823
|
* Simulate decreaseAllowance
|
|
675
824
|
* Returns gas estimate and result without sending transaction
|
|
676
825
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
677
826
|
*/
|
|
678
|
-
async decreaseAllowance(
|
|
679
|
-
return contract.simulate.decreaseAllowance([
|
|
827
|
+
async decreaseAllowance(spender_, subtractedValue_, options) {
|
|
828
|
+
return contract.simulate.decreaseAllowance([spender_, subtractedValue_], options);
|
|
680
829
|
},
|
|
681
830
|
/**
|
|
682
831
|
* Simulate increaseAllowance
|
|
683
832
|
* Returns gas estimate and result without sending transaction
|
|
684
833
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
685
834
|
*/
|
|
686
|
-
async increaseAllowance(
|
|
687
|
-
return contract.simulate.increaseAllowance([
|
|
835
|
+
async increaseAllowance(spender_, addedValue_, options) {
|
|
836
|
+
return contract.simulate.increaseAllowance([spender_, addedValue_], options);
|
|
688
837
|
},
|
|
689
838
|
/**
|
|
690
|
-
* Simulate
|
|
839
|
+
* Simulate initialize
|
|
691
840
|
* Returns gas estimate and result without sending transaction
|
|
692
841
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
693
842
|
*/
|
|
694
|
-
async
|
|
695
|
-
return contract.simulate.
|
|
843
|
+
async initialize(name_, symbol_, decimals_, sequence_, owner_, chainId_, nativeContract_, options) {
|
|
844
|
+
return contract.simulate.initialize([name_, symbol_, decimals_, sequence_, owner_, chainId_, nativeContract_], options);
|
|
696
845
|
},
|
|
697
846
|
/**
|
|
698
|
-
* Simulate
|
|
847
|
+
* Simulate mint
|
|
699
848
|
* Returns gas estimate and result without sending transaction
|
|
700
849
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
701
850
|
*/
|
|
702
|
-
async
|
|
703
|
-
return contract.simulate.
|
|
851
|
+
async mint(account_, amount_, options) {
|
|
852
|
+
return contract.simulate.mint([account_, amount_], options);
|
|
704
853
|
},
|
|
705
854
|
/**
|
|
706
|
-
* Simulate
|
|
855
|
+
* Simulate permit
|
|
707
856
|
* Returns gas estimate and result without sending transaction
|
|
708
857
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
709
858
|
*/
|
|
710
|
-
async
|
|
711
|
-
return contract.simulate.
|
|
859
|
+
async permit(owner_, spender_, value_, deadline_, v_, r_, s_, options) {
|
|
860
|
+
return contract.simulate.permit([owner_, spender_, value_, deadline_, v_, r_, s_], options);
|
|
712
861
|
},
|
|
713
862
|
/**
|
|
714
863
|
* Simulate transfer
|
|
715
864
|
* Returns gas estimate and result without sending transaction
|
|
716
865
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
717
866
|
*/
|
|
718
|
-
async transfer(
|
|
719
|
-
return contract.simulate.transfer([
|
|
867
|
+
async transfer(recipient_, amount_, options) {
|
|
868
|
+
return contract.simulate.transfer([recipient_, amount_], options);
|
|
720
869
|
},
|
|
721
870
|
/**
|
|
722
871
|
* Simulate transferFrom
|
|
723
872
|
* Returns gas estimate and result without sending transaction
|
|
724
873
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
725
874
|
*/
|
|
726
|
-
async transferFrom(
|
|
727
|
-
return contract.simulate.transferFrom([
|
|
875
|
+
async transferFrom(sender_, recipient_, amount_, options) {
|
|
876
|
+
return contract.simulate.transferFrom([sender_, recipient_, amount_], options);
|
|
728
877
|
},
|
|
729
878
|
/**
|
|
730
|
-
* Simulate
|
|
879
|
+
* Simulate updateDetails
|
|
731
880
|
* Returns gas estimate and result without sending transaction
|
|
732
881
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
733
882
|
*/
|
|
734
|
-
async
|
|
735
|
-
return contract.simulate.
|
|
883
|
+
async updateDetails(name_, symbol_, sequence_, options) {
|
|
884
|
+
return contract.simulate.updateDetails([name_, symbol_, sequence_], options);
|
|
736
885
|
}
|
|
737
886
|
};
|
|
738
887
|
}
|
|
@@ -759,7 +908,7 @@ class TetherUSD_json {
|
|
|
759
908
|
Approval: (callback, filter) => {
|
|
760
909
|
return this.publicClient.watchContractEvent({
|
|
761
910
|
address: this.contractAddress,
|
|
762
|
-
abi: exports.
|
|
911
|
+
abi: exports.TokenImplementation_jsonAbi,
|
|
763
912
|
eventName: 'Approval',
|
|
764
913
|
args: filter,
|
|
765
914
|
onLogs: (logs) => {
|
|
@@ -769,25 +918,6 @@ class TetherUSD_json {
|
|
|
769
918
|
},
|
|
770
919
|
});
|
|
771
920
|
},
|
|
772
|
-
/**
|
|
773
|
-
* Watch OwnershipTransferred events
|
|
774
|
-
* @param callback Function to call when event is emitted
|
|
775
|
-
* @param filter Optional filter for indexed parameters
|
|
776
|
-
* @returns Unwatch function to stop listening
|
|
777
|
-
*/
|
|
778
|
-
OwnershipTransferred: (callback, filter) => {
|
|
779
|
-
return this.publicClient.watchContractEvent({
|
|
780
|
-
address: this.contractAddress,
|
|
781
|
-
abi: exports.TetherUSD_jsonAbi,
|
|
782
|
-
eventName: 'OwnershipTransferred',
|
|
783
|
-
args: filter,
|
|
784
|
-
onLogs: (logs) => {
|
|
785
|
-
logs.forEach((log) => {
|
|
786
|
-
callback(log.args);
|
|
787
|
-
});
|
|
788
|
-
},
|
|
789
|
-
});
|
|
790
|
-
},
|
|
791
921
|
/**
|
|
792
922
|
* Watch Transfer events
|
|
793
923
|
* @param callback Function to call when event is emitted
|
|
@@ -797,7 +927,7 @@ class TetherUSD_json {
|
|
|
797
927
|
Transfer: (callback, filter) => {
|
|
798
928
|
return this.publicClient.watchContractEvent({
|
|
799
929
|
address: this.contractAddress,
|
|
800
|
-
abi: exports.
|
|
930
|
+
abi: exports.TokenImplementation_jsonAbi,
|
|
801
931
|
eventName: 'Transfer',
|
|
802
932
|
args: filter,
|
|
803
933
|
onLogs: (logs) => {
|
|
@@ -810,4 +940,4 @@ class TetherUSD_json {
|
|
|
810
940
|
};
|
|
811
941
|
}
|
|
812
942
|
}
|
|
813
|
-
exports.
|
|
943
|
+
exports.TokenImplementation_json = TokenImplementation_json;
|