@gitmyabi/usd 1.0.0 → 1.0.1
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/{USD_Tehter_json.d.ts → StandardToken_json.d.ts} +99 -531
- package/contracts/{USD_Tehter_json.js → StandardToken_json.js} +118 -591
- package/contracts/{USD_Tehter_json.ts → StandardToken_json.ts} +127 -696
- 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,205 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.StandardToken_json = exports.StandardToken_jsonAbi = void 0;
|
|
4
4
|
const viem_1 = require("viem");
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* StandardToken_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.StandardToken_jsonAbi = [
|
|
11
11
|
{
|
|
12
12
|
"inputs": [],
|
|
13
13
|
"stateMutability": "nonpayable",
|
|
14
14
|
"type": "constructor"
|
|
15
15
|
},
|
|
16
|
-
{
|
|
17
|
-
"inputs": [
|
|
18
|
-
{
|
|
19
|
-
"internalType": "address",
|
|
20
|
-
"name": "target",
|
|
21
|
-
"type": "address"
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
"name": "AddressEmptyCode",
|
|
25
|
-
"type": "error"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"inputs": [
|
|
29
|
-
{
|
|
30
|
-
"internalType": "address",
|
|
31
|
-
"name": "account",
|
|
32
|
-
"type": "address"
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
|
-
"name": "AddressInsufficientBalance",
|
|
36
|
-
"type": "error"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"inputs": [
|
|
40
|
-
{
|
|
41
|
-
"internalType": "address",
|
|
42
|
-
"name": "spender",
|
|
43
|
-
"type": "address"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"internalType": "uint256",
|
|
47
|
-
"name": "allowance",
|
|
48
|
-
"type": "uint256"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"internalType": "uint256",
|
|
52
|
-
"name": "needed",
|
|
53
|
-
"type": "uint256"
|
|
54
|
-
}
|
|
55
|
-
],
|
|
56
|
-
"name": "ERC20InsufficientAllowance",
|
|
57
|
-
"type": "error"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"inputs": [
|
|
61
|
-
{
|
|
62
|
-
"internalType": "address",
|
|
63
|
-
"name": "sender",
|
|
64
|
-
"type": "address"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"internalType": "uint256",
|
|
68
|
-
"name": "balance",
|
|
69
|
-
"type": "uint256"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"internalType": "uint256",
|
|
73
|
-
"name": "needed",
|
|
74
|
-
"type": "uint256"
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
"name": "ERC20InsufficientBalance",
|
|
78
|
-
"type": "error"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"inputs": [
|
|
82
|
-
{
|
|
83
|
-
"internalType": "address",
|
|
84
|
-
"name": "approver",
|
|
85
|
-
"type": "address"
|
|
86
|
-
}
|
|
87
|
-
],
|
|
88
|
-
"name": "ERC20InvalidApprover",
|
|
89
|
-
"type": "error"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"inputs": [
|
|
93
|
-
{
|
|
94
|
-
"internalType": "address",
|
|
95
|
-
"name": "receiver",
|
|
96
|
-
"type": "address"
|
|
97
|
-
}
|
|
98
|
-
],
|
|
99
|
-
"name": "ERC20InvalidReceiver",
|
|
100
|
-
"type": "error"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"inputs": [
|
|
104
|
-
{
|
|
105
|
-
"internalType": "address",
|
|
106
|
-
"name": "sender",
|
|
107
|
-
"type": "address"
|
|
108
|
-
}
|
|
109
|
-
],
|
|
110
|
-
"name": "ERC20InvalidSender",
|
|
111
|
-
"type": "error"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"inputs": [
|
|
115
|
-
{
|
|
116
|
-
"internalType": "address",
|
|
117
|
-
"name": "spender",
|
|
118
|
-
"type": "address"
|
|
119
|
-
}
|
|
120
|
-
],
|
|
121
|
-
"name": "ERC20InvalidSpender",
|
|
122
|
-
"type": "error"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"inputs": [],
|
|
126
|
-
"name": "FailedInnerCall",
|
|
127
|
-
"type": "error"
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"inputs": [
|
|
131
|
-
{
|
|
132
|
-
"internalType": "address",
|
|
133
|
-
"name": "AMM",
|
|
134
|
-
"type": "address"
|
|
135
|
-
}
|
|
136
|
-
],
|
|
137
|
-
"name": "InvalidAMM",
|
|
138
|
-
"type": "error"
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
"inputs": [
|
|
142
|
-
{
|
|
143
|
-
"internalType": "address",
|
|
144
|
-
"name": "tokenAddress",
|
|
145
|
-
"type": "address"
|
|
146
|
-
}
|
|
147
|
-
],
|
|
148
|
-
"name": "InvalidToken",
|
|
149
|
-
"type": "error"
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"inputs": [
|
|
153
|
-
{
|
|
154
|
-
"internalType": "address",
|
|
155
|
-
"name": "owner",
|
|
156
|
-
"type": "address"
|
|
157
|
-
}
|
|
158
|
-
],
|
|
159
|
-
"name": "OwnableInvalidOwner",
|
|
160
|
-
"type": "error"
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
"inputs": [
|
|
164
|
-
{
|
|
165
|
-
"internalType": "address",
|
|
166
|
-
"name": "account",
|
|
167
|
-
"type": "address"
|
|
168
|
-
}
|
|
169
|
-
],
|
|
170
|
-
"name": "OwnableUnauthorizedAccount",
|
|
171
|
-
"type": "error"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"inputs": [
|
|
175
|
-
{
|
|
176
|
-
"internalType": "address",
|
|
177
|
-
"name": "token",
|
|
178
|
-
"type": "address"
|
|
179
|
-
}
|
|
180
|
-
],
|
|
181
|
-
"name": "SafeERC20FailedOperation",
|
|
182
|
-
"type": "error"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
"anonymous": false,
|
|
186
|
-
"inputs": [
|
|
187
|
-
{
|
|
188
|
-
"indexed": true,
|
|
189
|
-
"internalType": "address",
|
|
190
|
-
"name": "AMM",
|
|
191
|
-
"type": "address"
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
"indexed": false,
|
|
195
|
-
"internalType": "bool",
|
|
196
|
-
"name": "isAMM",
|
|
197
|
-
"type": "bool"
|
|
198
|
-
}
|
|
199
|
-
],
|
|
200
|
-
"name": "AMMUpdated",
|
|
201
|
-
"type": "event"
|
|
202
|
-
},
|
|
203
16
|
{
|
|
204
17
|
"anonymous": false,
|
|
205
18
|
"inputs": [
|
|
@@ -229,51 +42,13 @@ exports.USD_Tehter_jsonAbi = [
|
|
|
229
42
|
"anonymous": false,
|
|
230
43
|
"inputs": [
|
|
231
44
|
{
|
|
232
|
-
"indexed":
|
|
233
|
-
"internalType": "
|
|
234
|
-
"name": "
|
|
235
|
-
"type": "
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
"indexed": true,
|
|
239
|
-
"internalType": "address",
|
|
240
|
-
"name": "newOwner",
|
|
241
|
-
"type": "address"
|
|
242
|
-
}
|
|
243
|
-
],
|
|
244
|
-
"name": "OwnershipTransferStarted",
|
|
245
|
-
"type": "event"
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
"anonymous": false,
|
|
249
|
-
"inputs": [
|
|
250
|
-
{
|
|
251
|
-
"indexed": true,
|
|
252
|
-
"internalType": "address",
|
|
253
|
-
"name": "previousOwner",
|
|
254
|
-
"type": "address"
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
"indexed": true,
|
|
258
|
-
"internalType": "address",
|
|
259
|
-
"name": "newOwner",
|
|
260
|
-
"type": "address"
|
|
261
|
-
}
|
|
262
|
-
],
|
|
263
|
-
"name": "OwnershipTransferred",
|
|
264
|
-
"type": "event"
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
"anonymous": false,
|
|
268
|
-
"inputs": [
|
|
269
|
-
{
|
|
270
|
-
"indexed": true,
|
|
271
|
-
"internalType": "address",
|
|
272
|
-
"name": "routerV2",
|
|
273
|
-
"type": "address"
|
|
45
|
+
"indexed": false,
|
|
46
|
+
"internalType": "uint8",
|
|
47
|
+
"name": "version",
|
|
48
|
+
"type": "uint8"
|
|
274
49
|
}
|
|
275
50
|
],
|
|
276
|
-
"name": "
|
|
51
|
+
"name": "Initialized",
|
|
277
52
|
"type": "event"
|
|
278
53
|
},
|
|
279
54
|
{
|
|
@@ -301,45 +76,6 @@ exports.USD_Tehter_jsonAbi = [
|
|
|
301
76
|
"name": "Transfer",
|
|
302
77
|
"type": "event"
|
|
303
78
|
},
|
|
304
|
-
{
|
|
305
|
-
"inputs": [
|
|
306
|
-
{
|
|
307
|
-
"internalType": "address",
|
|
308
|
-
"name": "",
|
|
309
|
-
"type": "address"
|
|
310
|
-
}
|
|
311
|
-
],
|
|
312
|
-
"name": "AMMs",
|
|
313
|
-
"outputs": [
|
|
314
|
-
{
|
|
315
|
-
"internalType": "bool",
|
|
316
|
-
"name": "",
|
|
317
|
-
"type": "bool"
|
|
318
|
-
}
|
|
319
|
-
],
|
|
320
|
-
"stateMutability": "view",
|
|
321
|
-
"type": "function"
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
"inputs": [],
|
|
325
|
-
"name": "acceptOwnership",
|
|
326
|
-
"outputs": [],
|
|
327
|
-
"stateMutability": "nonpayable",
|
|
328
|
-
"type": "function"
|
|
329
|
-
},
|
|
330
|
-
{
|
|
331
|
-
"inputs": [
|
|
332
|
-
{
|
|
333
|
-
"internalType": "address",
|
|
334
|
-
"name": "_router",
|
|
335
|
-
"type": "address"
|
|
336
|
-
}
|
|
337
|
-
],
|
|
338
|
-
"name": "afterConstructor",
|
|
339
|
-
"outputs": [],
|
|
340
|
-
"stateMutability": "nonpayable",
|
|
341
|
-
"type": "function"
|
|
342
|
-
},
|
|
343
79
|
{
|
|
344
80
|
"inputs": [
|
|
345
81
|
{
|
|
@@ -373,7 +109,7 @@ exports.USD_Tehter_jsonAbi = [
|
|
|
373
109
|
},
|
|
374
110
|
{
|
|
375
111
|
"internalType": "uint256",
|
|
376
|
-
"name": "
|
|
112
|
+
"name": "amount",
|
|
377
113
|
"type": "uint256"
|
|
378
114
|
}
|
|
379
115
|
],
|
|
@@ -411,7 +147,7 @@ exports.USD_Tehter_jsonAbi = [
|
|
|
411
147
|
"inputs": [
|
|
412
148
|
{
|
|
413
149
|
"internalType": "uint256",
|
|
414
|
-
"name": "
|
|
150
|
+
"name": "amount",
|
|
415
151
|
"type": "uint256"
|
|
416
152
|
}
|
|
417
153
|
],
|
|
@@ -429,7 +165,7 @@ exports.USD_Tehter_jsonAbi = [
|
|
|
429
165
|
},
|
|
430
166
|
{
|
|
431
167
|
"internalType": "uint256",
|
|
432
|
-
"name": "
|
|
168
|
+
"name": "amount",
|
|
433
169
|
"type": "uint256"
|
|
434
170
|
}
|
|
435
171
|
],
|
|
@@ -448,143 +184,116 @@ exports.USD_Tehter_jsonAbi = [
|
|
|
448
184
|
"type": "uint8"
|
|
449
185
|
}
|
|
450
186
|
],
|
|
451
|
-
"stateMutability": "
|
|
187
|
+
"stateMutability": "view",
|
|
452
188
|
"type": "function"
|
|
453
189
|
},
|
|
454
190
|
{
|
|
455
|
-
"inputs": [
|
|
456
|
-
"name": "deploymentKey",
|
|
457
|
-
"outputs": [
|
|
191
|
+
"inputs": [
|
|
458
192
|
{
|
|
459
|
-
"internalType": "
|
|
460
|
-
"name": "",
|
|
461
|
-
"type": "
|
|
462
|
-
}
|
|
463
|
-
],
|
|
464
|
-
"stateMutability": "pure",
|
|
465
|
-
"type": "function"
|
|
466
|
-
},
|
|
467
|
-
{
|
|
468
|
-
"inputs": [],
|
|
469
|
-
"name": "name",
|
|
470
|
-
"outputs": [
|
|
193
|
+
"internalType": "address",
|
|
194
|
+
"name": "spender",
|
|
195
|
+
"type": "address"
|
|
196
|
+
},
|
|
471
197
|
{
|
|
472
|
-
"internalType": "
|
|
473
|
-
"name": "",
|
|
474
|
-
"type": "
|
|
198
|
+
"internalType": "uint256",
|
|
199
|
+
"name": "subtractedValue",
|
|
200
|
+
"type": "uint256"
|
|
475
201
|
}
|
|
476
202
|
],
|
|
477
|
-
"
|
|
478
|
-
"type": "function"
|
|
479
|
-
},
|
|
480
|
-
{
|
|
481
|
-
"inputs": [],
|
|
482
|
-
"name": "owner",
|
|
203
|
+
"name": "decreaseAllowance",
|
|
483
204
|
"outputs": [
|
|
484
205
|
{
|
|
485
|
-
"internalType": "
|
|
206
|
+
"internalType": "bool",
|
|
486
207
|
"name": "",
|
|
487
|
-
"type": "
|
|
208
|
+
"type": "bool"
|
|
488
209
|
}
|
|
489
210
|
],
|
|
490
|
-
"stateMutability": "
|
|
211
|
+
"stateMutability": "nonpayable",
|
|
491
212
|
"type": "function"
|
|
492
213
|
},
|
|
493
214
|
{
|
|
494
|
-
"inputs": [
|
|
495
|
-
"name": "pairV2",
|
|
496
|
-
"outputs": [
|
|
215
|
+
"inputs": [
|
|
497
216
|
{
|
|
498
217
|
"internalType": "address",
|
|
499
|
-
"name": "",
|
|
218
|
+
"name": "spender",
|
|
500
219
|
"type": "address"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"internalType": "uint256",
|
|
223
|
+
"name": "addedValue",
|
|
224
|
+
"type": "uint256"
|
|
501
225
|
}
|
|
502
226
|
],
|
|
503
|
-
"
|
|
504
|
-
"type": "function"
|
|
505
|
-
},
|
|
506
|
-
{
|
|
507
|
-
"inputs": [],
|
|
508
|
-
"name": "pendingOwner",
|
|
227
|
+
"name": "increaseAllowance",
|
|
509
228
|
"outputs": [
|
|
510
229
|
{
|
|
511
|
-
"internalType": "
|
|
230
|
+
"internalType": "bool",
|
|
512
231
|
"name": "",
|
|
513
|
-
"type": "
|
|
232
|
+
"type": "bool"
|
|
514
233
|
}
|
|
515
234
|
],
|
|
516
|
-
"stateMutability": "
|
|
235
|
+
"stateMutability": "nonpayable",
|
|
517
236
|
"type": "function"
|
|
518
237
|
},
|
|
519
238
|
{
|
|
520
239
|
"inputs": [
|
|
521
240
|
{
|
|
522
241
|
"internalType": "address",
|
|
523
|
-
"name": "
|
|
242
|
+
"name": "_owner",
|
|
524
243
|
"type": "address"
|
|
525
244
|
},
|
|
245
|
+
{
|
|
246
|
+
"internalType": "string",
|
|
247
|
+
"name": "_name",
|
|
248
|
+
"type": "string"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"internalType": "string",
|
|
252
|
+
"name": "_symbol",
|
|
253
|
+
"type": "string"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"internalType": "uint8",
|
|
257
|
+
"name": "_decimals",
|
|
258
|
+
"type": "uint8"
|
|
259
|
+
},
|
|
526
260
|
{
|
|
527
261
|
"internalType": "uint256",
|
|
528
|
-
"name": "
|
|
262
|
+
"name": "_initialSupply",
|
|
529
263
|
"type": "uint256"
|
|
530
264
|
}
|
|
531
265
|
],
|
|
532
|
-
"name": "
|
|
266
|
+
"name": "initialize",
|
|
533
267
|
"outputs": [],
|
|
534
268
|
"stateMutability": "nonpayable",
|
|
535
269
|
"type": "function"
|
|
536
270
|
},
|
|
537
271
|
{
|
|
538
|
-
"inputs": [
|
|
272
|
+
"inputs": [],
|
|
273
|
+
"name": "maxSupply",
|
|
274
|
+
"outputs": [
|
|
539
275
|
{
|
|
540
276
|
"internalType": "uint256",
|
|
541
|
-
"name": "
|
|
277
|
+
"name": "",
|
|
542
278
|
"type": "uint256"
|
|
543
279
|
}
|
|
544
280
|
],
|
|
545
|
-
"
|
|
546
|
-
"outputs": [],
|
|
547
|
-
"stateMutability": "nonpayable",
|
|
548
|
-
"type": "function"
|
|
549
|
-
},
|
|
550
|
-
{
|
|
551
|
-
"inputs": [],
|
|
552
|
-
"name": "renounceOwnership",
|
|
553
|
-
"outputs": [],
|
|
554
|
-
"stateMutability": "nonpayable",
|
|
281
|
+
"stateMutability": "view",
|
|
555
282
|
"type": "function"
|
|
556
283
|
},
|
|
557
284
|
{
|
|
558
285
|
"inputs": [],
|
|
559
|
-
"name": "
|
|
286
|
+
"name": "name",
|
|
560
287
|
"outputs": [
|
|
561
288
|
{
|
|
562
|
-
"internalType": "
|
|
289
|
+
"internalType": "string",
|
|
563
290
|
"name": "",
|
|
564
|
-
"type": "
|
|
291
|
+
"type": "string"
|
|
565
292
|
}
|
|
566
293
|
],
|
|
567
294
|
"stateMutability": "view",
|
|
568
295
|
"type": "function"
|
|
569
296
|
},
|
|
570
|
-
{
|
|
571
|
-
"inputs": [
|
|
572
|
-
{
|
|
573
|
-
"internalType": "address",
|
|
574
|
-
"name": "AMM",
|
|
575
|
-
"type": "address"
|
|
576
|
-
},
|
|
577
|
-
{
|
|
578
|
-
"internalType": "bool",
|
|
579
|
-
"name": "isAMM",
|
|
580
|
-
"type": "bool"
|
|
581
|
-
}
|
|
582
|
-
],
|
|
583
|
-
"name": "setAMM",
|
|
584
|
-
"outputs": [],
|
|
585
|
-
"stateMutability": "nonpayable",
|
|
586
|
-
"type": "function"
|
|
587
|
-
},
|
|
588
297
|
{
|
|
589
298
|
"inputs": [],
|
|
590
299
|
"name": "symbol",
|
|
@@ -620,7 +329,7 @@ exports.USD_Tehter_jsonAbi = [
|
|
|
620
329
|
},
|
|
621
330
|
{
|
|
622
331
|
"internalType": "uint256",
|
|
623
|
-
"name": "
|
|
332
|
+
"name": "amount",
|
|
624
333
|
"type": "uint256"
|
|
625
334
|
}
|
|
626
335
|
],
|
|
@@ -649,7 +358,7 @@ exports.USD_Tehter_jsonAbi = [
|
|
|
649
358
|
},
|
|
650
359
|
{
|
|
651
360
|
"internalType": "uint256",
|
|
652
|
-
"name": "
|
|
361
|
+
"name": "amount",
|
|
653
362
|
"type": "uint256"
|
|
654
363
|
}
|
|
655
364
|
],
|
|
@@ -663,23 +372,10 @@ exports.USD_Tehter_jsonAbi = [
|
|
|
663
372
|
],
|
|
664
373
|
"stateMutability": "nonpayable",
|
|
665
374
|
"type": "function"
|
|
666
|
-
},
|
|
667
|
-
{
|
|
668
|
-
"inputs": [
|
|
669
|
-
{
|
|
670
|
-
"internalType": "address",
|
|
671
|
-
"name": "newOwner",
|
|
672
|
-
"type": "address"
|
|
673
|
-
}
|
|
674
|
-
],
|
|
675
|
-
"name": "transferOwnership",
|
|
676
|
-
"outputs": [],
|
|
677
|
-
"stateMutability": "nonpayable",
|
|
678
|
-
"type": "function"
|
|
679
375
|
}
|
|
680
376
|
];
|
|
681
377
|
/**
|
|
682
|
-
*
|
|
378
|
+
* StandardToken_json Contract Class
|
|
683
379
|
*
|
|
684
380
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
685
381
|
*
|
|
@@ -687,12 +383,12 @@ exports.USD_Tehter_jsonAbi = [
|
|
|
687
383
|
* ```typescript
|
|
688
384
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
689
385
|
* import { mainnet } from 'viem/chains';
|
|
690
|
-
* import {
|
|
386
|
+
* import { StandardToken_json } from 'StandardToken_json';
|
|
691
387
|
*
|
|
692
388
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
693
389
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
694
390
|
*
|
|
695
|
-
* const contract = new
|
|
391
|
+
* const contract = new StandardToken_json('0x...', { publicClient, walletClient });
|
|
696
392
|
*
|
|
697
393
|
* // Read functions
|
|
698
394
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -710,13 +406,13 @@ exports.USD_Tehter_jsonAbi = [
|
|
|
710
406
|
* });
|
|
711
407
|
* ```
|
|
712
408
|
*/
|
|
713
|
-
class
|
|
409
|
+
class StandardToken_json {
|
|
714
410
|
constructor(address, clients) {
|
|
715
411
|
this.contractAddress = address;
|
|
716
412
|
this.publicClient = clients.publicClient;
|
|
717
413
|
this.contract = (0, viem_1.getContract)({
|
|
718
414
|
address,
|
|
719
|
-
abi: exports.
|
|
415
|
+
abi: exports.StandardToken_jsonAbi,
|
|
720
416
|
client: {
|
|
721
417
|
public: clients.publicClient,
|
|
722
418
|
wallet: clients.walletClient,
|
|
@@ -735,13 +431,6 @@ class USD_Tehter_json {
|
|
|
735
431
|
getContract() {
|
|
736
432
|
return this.contract;
|
|
737
433
|
}
|
|
738
|
-
/**
|
|
739
|
-
* AMMs
|
|
740
|
-
* view
|
|
741
|
-
*/
|
|
742
|
-
async AMMs(arg0) {
|
|
743
|
-
return this.contract.read.AMMs([arg0]);
|
|
744
|
-
}
|
|
745
434
|
/**
|
|
746
435
|
* allowance
|
|
747
436
|
* view
|
|
@@ -758,17 +447,17 @@ class USD_Tehter_json {
|
|
|
758
447
|
}
|
|
759
448
|
/**
|
|
760
449
|
* decimals
|
|
761
|
-
*
|
|
450
|
+
* view
|
|
762
451
|
*/
|
|
763
452
|
async decimals() {
|
|
764
453
|
return this.contract.read.decimals();
|
|
765
454
|
}
|
|
766
455
|
/**
|
|
767
|
-
*
|
|
768
|
-
*
|
|
456
|
+
* maxSupply
|
|
457
|
+
* view
|
|
769
458
|
*/
|
|
770
|
-
async
|
|
771
|
-
return this.contract.read.
|
|
459
|
+
async maxSupply() {
|
|
460
|
+
return this.contract.read.maxSupply();
|
|
772
461
|
}
|
|
773
462
|
/**
|
|
774
463
|
* name
|
|
@@ -777,34 +466,6 @@ class USD_Tehter_json {
|
|
|
777
466
|
async name() {
|
|
778
467
|
return this.contract.read.name();
|
|
779
468
|
}
|
|
780
|
-
/**
|
|
781
|
-
* owner
|
|
782
|
-
* view
|
|
783
|
-
*/
|
|
784
|
-
async owner() {
|
|
785
|
-
return this.contract.read.owner();
|
|
786
|
-
}
|
|
787
|
-
/**
|
|
788
|
-
* pairV2
|
|
789
|
-
* view
|
|
790
|
-
*/
|
|
791
|
-
async pairV2() {
|
|
792
|
-
return this.contract.read.pairV2();
|
|
793
|
-
}
|
|
794
|
-
/**
|
|
795
|
-
* pendingOwner
|
|
796
|
-
* view
|
|
797
|
-
*/
|
|
798
|
-
async pendingOwner() {
|
|
799
|
-
return this.contract.read.pendingOwner();
|
|
800
|
-
}
|
|
801
|
-
/**
|
|
802
|
-
* routerV2
|
|
803
|
-
* view
|
|
804
|
-
*/
|
|
805
|
-
async routerV2() {
|
|
806
|
-
return this.contract.read.routerV2();
|
|
807
|
-
}
|
|
808
469
|
/**
|
|
809
470
|
* symbol
|
|
810
471
|
* view
|
|
@@ -819,137 +480,93 @@ class USD_Tehter_json {
|
|
|
819
480
|
async totalSupply() {
|
|
820
481
|
return this.contract.read.totalSupply();
|
|
821
482
|
}
|
|
822
|
-
/**
|
|
823
|
-
* acceptOwnership
|
|
824
|
-
* nonpayable
|
|
825
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
826
|
-
*/
|
|
827
|
-
async acceptOwnership(options) {
|
|
828
|
-
if (!this.contract.write) {
|
|
829
|
-
throw new Error('Wallet client is required for write operations');
|
|
830
|
-
}
|
|
831
|
-
return this.contract.write.acceptOwnership(options);
|
|
832
|
-
}
|
|
833
|
-
/**
|
|
834
|
-
* afterConstructor
|
|
835
|
-
* nonpayable
|
|
836
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
837
|
-
*/
|
|
838
|
-
async afterConstructor(_router, options) {
|
|
839
|
-
if (!this.contract.write) {
|
|
840
|
-
throw new Error('Wallet client is required for write operations');
|
|
841
|
-
}
|
|
842
|
-
return this.contract.write.afterConstructor([_router], options);
|
|
843
|
-
}
|
|
844
483
|
/**
|
|
845
484
|
* approve
|
|
846
485
|
* nonpayable
|
|
847
486
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
848
487
|
*/
|
|
849
|
-
async approve(spender,
|
|
488
|
+
async approve(spender, amount, options) {
|
|
850
489
|
if (!this.contract.write) {
|
|
851
490
|
throw new Error('Wallet client is required for write operations');
|
|
852
491
|
}
|
|
853
|
-
return this.contract.write.approve([spender,
|
|
492
|
+
return this.contract.write.approve([spender, amount], options);
|
|
854
493
|
}
|
|
855
494
|
/**
|
|
856
495
|
* burn
|
|
857
496
|
* nonpayable
|
|
858
497
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
859
498
|
*/
|
|
860
|
-
async burn(
|
|
499
|
+
async burn(amount, options) {
|
|
861
500
|
if (!this.contract.write) {
|
|
862
501
|
throw new Error('Wallet client is required for write operations');
|
|
863
502
|
}
|
|
864
|
-
return this.contract.write.burn([
|
|
503
|
+
return this.contract.write.burn([amount], options);
|
|
865
504
|
}
|
|
866
505
|
/**
|
|
867
506
|
* burnFrom
|
|
868
507
|
* nonpayable
|
|
869
508
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
870
509
|
*/
|
|
871
|
-
async burnFrom(account,
|
|
872
|
-
if (!this.contract.write) {
|
|
873
|
-
throw new Error('Wallet client is required for write operations');
|
|
874
|
-
}
|
|
875
|
-
return this.contract.write.burnFrom([account, value], options);
|
|
876
|
-
}
|
|
877
|
-
/**
|
|
878
|
-
* recoverForeignERC20
|
|
879
|
-
* nonpayable
|
|
880
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
881
|
-
*/
|
|
882
|
-
async recoverForeignERC20(tokenAddress, amount, options) {
|
|
510
|
+
async burnFrom(account, amount, options) {
|
|
883
511
|
if (!this.contract.write) {
|
|
884
512
|
throw new Error('Wallet client is required for write operations');
|
|
885
513
|
}
|
|
886
|
-
return this.contract.write.
|
|
514
|
+
return this.contract.write.burnFrom([account, amount], options);
|
|
887
515
|
}
|
|
888
516
|
/**
|
|
889
|
-
*
|
|
517
|
+
* decreaseAllowance
|
|
890
518
|
* nonpayable
|
|
891
519
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
892
520
|
*/
|
|
893
|
-
async
|
|
521
|
+
async decreaseAllowance(spender, subtractedValue, options) {
|
|
894
522
|
if (!this.contract.write) {
|
|
895
523
|
throw new Error('Wallet client is required for write operations');
|
|
896
524
|
}
|
|
897
|
-
return this.contract.write.
|
|
525
|
+
return this.contract.write.decreaseAllowance([spender, subtractedValue], options);
|
|
898
526
|
}
|
|
899
527
|
/**
|
|
900
|
-
*
|
|
528
|
+
* increaseAllowance
|
|
901
529
|
* nonpayable
|
|
902
530
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
903
531
|
*/
|
|
904
|
-
async
|
|
532
|
+
async increaseAllowance(spender, addedValue, options) {
|
|
905
533
|
if (!this.contract.write) {
|
|
906
534
|
throw new Error('Wallet client is required for write operations');
|
|
907
535
|
}
|
|
908
|
-
return this.contract.write.
|
|
536
|
+
return this.contract.write.increaseAllowance([spender, addedValue], options);
|
|
909
537
|
}
|
|
910
538
|
/**
|
|
911
|
-
*
|
|
539
|
+
* initialize
|
|
912
540
|
* nonpayable
|
|
913
541
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
914
542
|
*/
|
|
915
|
-
async
|
|
543
|
+
async initialize(_owner, _name, _symbol, _decimals, _initialSupply, options) {
|
|
916
544
|
if (!this.contract.write) {
|
|
917
545
|
throw new Error('Wallet client is required for write operations');
|
|
918
546
|
}
|
|
919
|
-
return this.contract.write.
|
|
547
|
+
return this.contract.write.initialize([_owner, _name, _symbol, _decimals, _initialSupply], options);
|
|
920
548
|
}
|
|
921
549
|
/**
|
|
922
550
|
* transfer
|
|
923
551
|
* nonpayable
|
|
924
552
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
925
553
|
*/
|
|
926
|
-
async transfer(to,
|
|
554
|
+
async transfer(to, amount, options) {
|
|
927
555
|
if (!this.contract.write) {
|
|
928
556
|
throw new Error('Wallet client is required for write operations');
|
|
929
557
|
}
|
|
930
|
-
return this.contract.write.transfer([to,
|
|
558
|
+
return this.contract.write.transfer([to, amount], options);
|
|
931
559
|
}
|
|
932
560
|
/**
|
|
933
561
|
* transferFrom
|
|
934
562
|
* nonpayable
|
|
935
563
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
936
564
|
*/
|
|
937
|
-
async transferFrom(from, to,
|
|
938
|
-
if (!this.contract.write) {
|
|
939
|
-
throw new Error('Wallet client is required for write operations');
|
|
940
|
-
}
|
|
941
|
-
return this.contract.write.transferFrom([from, to, value], options);
|
|
942
|
-
}
|
|
943
|
-
/**
|
|
944
|
-
* transferOwnership
|
|
945
|
-
* nonpayable
|
|
946
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
947
|
-
*/
|
|
948
|
-
async transferOwnership(newOwner, options) {
|
|
565
|
+
async transferFrom(from, to, amount, options) {
|
|
949
566
|
if (!this.contract.write) {
|
|
950
567
|
throw new Error('Wallet client is required for write operations');
|
|
951
568
|
}
|
|
952
|
-
return this.contract.write.
|
|
569
|
+
return this.contract.write.transferFrom([from, to, amount], options);
|
|
953
570
|
}
|
|
954
571
|
/**
|
|
955
572
|
* Simulate contract write operations (dry-run without sending transaction)
|
|
@@ -965,101 +582,69 @@ class USD_Tehter_json {
|
|
|
965
582
|
throw new Error('Public client is required for simulation');
|
|
966
583
|
}
|
|
967
584
|
return {
|
|
968
|
-
/**
|
|
969
|
-
* Simulate acceptOwnership
|
|
970
|
-
* Returns gas estimate and result without sending transaction
|
|
971
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
972
|
-
*/
|
|
973
|
-
async acceptOwnership(options) {
|
|
974
|
-
return contract.simulate.acceptOwnership(options);
|
|
975
|
-
},
|
|
976
|
-
/**
|
|
977
|
-
* Simulate afterConstructor
|
|
978
|
-
* Returns gas estimate and result without sending transaction
|
|
979
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
980
|
-
*/
|
|
981
|
-
async afterConstructor(_router, options) {
|
|
982
|
-
return contract.simulate.afterConstructor([_router], options);
|
|
983
|
-
},
|
|
984
585
|
/**
|
|
985
586
|
* Simulate approve
|
|
986
587
|
* Returns gas estimate and result without sending transaction
|
|
987
588
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
988
589
|
*/
|
|
989
|
-
async approve(spender,
|
|
990
|
-
return contract.simulate.approve([spender,
|
|
590
|
+
async approve(spender, amount, options) {
|
|
591
|
+
return contract.simulate.approve([spender, amount], options);
|
|
991
592
|
},
|
|
992
593
|
/**
|
|
993
594
|
* Simulate burn
|
|
994
595
|
* Returns gas estimate and result without sending transaction
|
|
995
596
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
996
597
|
*/
|
|
997
|
-
async burn(
|
|
998
|
-
return contract.simulate.burn([
|
|
598
|
+
async burn(amount, options) {
|
|
599
|
+
return contract.simulate.burn([amount], options);
|
|
999
600
|
},
|
|
1000
601
|
/**
|
|
1001
602
|
* Simulate burnFrom
|
|
1002
603
|
* Returns gas estimate and result without sending transaction
|
|
1003
604
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1004
605
|
*/
|
|
1005
|
-
async burnFrom(account,
|
|
1006
|
-
return contract.simulate.burnFrom([account,
|
|
1007
|
-
},
|
|
1008
|
-
/**
|
|
1009
|
-
* Simulate recoverForeignERC20
|
|
1010
|
-
* Returns gas estimate and result without sending transaction
|
|
1011
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1012
|
-
*/
|
|
1013
|
-
async recoverForeignERC20(tokenAddress, amount, options) {
|
|
1014
|
-
return contract.simulate.recoverForeignERC20([tokenAddress, amount], options);
|
|
606
|
+
async burnFrom(account, amount, options) {
|
|
607
|
+
return contract.simulate.burnFrom([account, amount], options);
|
|
1015
608
|
},
|
|
1016
609
|
/**
|
|
1017
|
-
* Simulate
|
|
610
|
+
* Simulate decreaseAllowance
|
|
1018
611
|
* Returns gas estimate and result without sending transaction
|
|
1019
612
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1020
613
|
*/
|
|
1021
|
-
async
|
|
1022
|
-
return contract.simulate.
|
|
614
|
+
async decreaseAllowance(spender, subtractedValue, options) {
|
|
615
|
+
return contract.simulate.decreaseAllowance([spender, subtractedValue], options);
|
|
1023
616
|
},
|
|
1024
617
|
/**
|
|
1025
|
-
* Simulate
|
|
618
|
+
* Simulate increaseAllowance
|
|
1026
619
|
* Returns gas estimate and result without sending transaction
|
|
1027
620
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1028
621
|
*/
|
|
1029
|
-
async
|
|
1030
|
-
return contract.simulate.
|
|
622
|
+
async increaseAllowance(spender, addedValue, options) {
|
|
623
|
+
return contract.simulate.increaseAllowance([spender, addedValue], options);
|
|
1031
624
|
},
|
|
1032
625
|
/**
|
|
1033
|
-
* Simulate
|
|
626
|
+
* Simulate initialize
|
|
1034
627
|
* Returns gas estimate and result without sending transaction
|
|
1035
628
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1036
629
|
*/
|
|
1037
|
-
async
|
|
1038
|
-
return contract.simulate.
|
|
630
|
+
async initialize(_owner, _name, _symbol, _decimals, _initialSupply, options) {
|
|
631
|
+
return contract.simulate.initialize([_owner, _name, _symbol, _decimals, _initialSupply], options);
|
|
1039
632
|
},
|
|
1040
633
|
/**
|
|
1041
634
|
* Simulate transfer
|
|
1042
635
|
* Returns gas estimate and result without sending transaction
|
|
1043
636
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1044
637
|
*/
|
|
1045
|
-
async transfer(to,
|
|
1046
|
-
return contract.simulate.transfer([to,
|
|
638
|
+
async transfer(to, amount, options) {
|
|
639
|
+
return contract.simulate.transfer([to, amount], options);
|
|
1047
640
|
},
|
|
1048
641
|
/**
|
|
1049
642
|
* Simulate transferFrom
|
|
1050
643
|
* Returns gas estimate and result without sending transaction
|
|
1051
644
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1052
645
|
*/
|
|
1053
|
-
async transferFrom(from, to,
|
|
1054
|
-
return contract.simulate.transferFrom([from, to,
|
|
1055
|
-
},
|
|
1056
|
-
/**
|
|
1057
|
-
* Simulate transferOwnership
|
|
1058
|
-
* Returns gas estimate and result without sending transaction
|
|
1059
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1060
|
-
*/
|
|
1061
|
-
async transferOwnership(newOwner, options) {
|
|
1062
|
-
return contract.simulate.transferOwnership([newOwner], options);
|
|
646
|
+
async transferFrom(from, to, amount, options) {
|
|
647
|
+
return contract.simulate.transferFrom([from, to, amount], options);
|
|
1063
648
|
}
|
|
1064
649
|
};
|
|
1065
650
|
}
|
|
@@ -1077,25 +662,6 @@ class USD_Tehter_json {
|
|
|
1077
662
|
*/
|
|
1078
663
|
get watch() {
|
|
1079
664
|
return {
|
|
1080
|
-
/**
|
|
1081
|
-
* Watch AMMUpdated events
|
|
1082
|
-
* @param callback Function to call when event is emitted
|
|
1083
|
-
* @param filter Optional filter for indexed parameters
|
|
1084
|
-
* @returns Unwatch function to stop listening
|
|
1085
|
-
*/
|
|
1086
|
-
AMMUpdated: (callback, filter) => {
|
|
1087
|
-
return this.publicClient.watchContractEvent({
|
|
1088
|
-
address: this.contractAddress,
|
|
1089
|
-
abi: exports.USD_Tehter_jsonAbi,
|
|
1090
|
-
eventName: 'AMMUpdated',
|
|
1091
|
-
args: filter,
|
|
1092
|
-
onLogs: (logs) => {
|
|
1093
|
-
logs.forEach((log) => {
|
|
1094
|
-
callback(log.args);
|
|
1095
|
-
});
|
|
1096
|
-
},
|
|
1097
|
-
});
|
|
1098
|
-
},
|
|
1099
665
|
/**
|
|
1100
666
|
* Watch Approval events
|
|
1101
667
|
* @param callback Function to call when event is emitted
|
|
@@ -1105,7 +671,7 @@ class USD_Tehter_json {
|
|
|
1105
671
|
Approval: (callback, filter) => {
|
|
1106
672
|
return this.publicClient.watchContractEvent({
|
|
1107
673
|
address: this.contractAddress,
|
|
1108
|
-
abi: exports.
|
|
674
|
+
abi: exports.StandardToken_jsonAbi,
|
|
1109
675
|
eventName: 'Approval',
|
|
1110
676
|
args: filter,
|
|
1111
677
|
onLogs: (logs) => {
|
|
@@ -1116,55 +682,16 @@ class USD_Tehter_json {
|
|
|
1116
682
|
});
|
|
1117
683
|
},
|
|
1118
684
|
/**
|
|
1119
|
-
* Watch
|
|
685
|
+
* Watch Initialized events
|
|
1120
686
|
* @param callback Function to call when event is emitted
|
|
1121
687
|
* @param filter Optional filter for indexed parameters
|
|
1122
688
|
* @returns Unwatch function to stop listening
|
|
1123
689
|
*/
|
|
1124
|
-
|
|
690
|
+
Initialized: (callback) => {
|
|
1125
691
|
return this.publicClient.watchContractEvent({
|
|
1126
692
|
address: this.contractAddress,
|
|
1127
|
-
abi: exports.
|
|
1128
|
-
eventName: '
|
|
1129
|
-
args: filter,
|
|
1130
|
-
onLogs: (logs) => {
|
|
1131
|
-
logs.forEach((log) => {
|
|
1132
|
-
callback(log.args);
|
|
1133
|
-
});
|
|
1134
|
-
},
|
|
1135
|
-
});
|
|
1136
|
-
},
|
|
1137
|
-
/**
|
|
1138
|
-
* Watch OwnershipTransferred events
|
|
1139
|
-
* @param callback Function to call when event is emitted
|
|
1140
|
-
* @param filter Optional filter for indexed parameters
|
|
1141
|
-
* @returns Unwatch function to stop listening
|
|
1142
|
-
*/
|
|
1143
|
-
OwnershipTransferred: (callback, filter) => {
|
|
1144
|
-
return this.publicClient.watchContractEvent({
|
|
1145
|
-
address: this.contractAddress,
|
|
1146
|
-
abi: exports.USD_Tehter_jsonAbi,
|
|
1147
|
-
eventName: 'OwnershipTransferred',
|
|
1148
|
-
args: filter,
|
|
1149
|
-
onLogs: (logs) => {
|
|
1150
|
-
logs.forEach((log) => {
|
|
1151
|
-
callback(log.args);
|
|
1152
|
-
});
|
|
1153
|
-
},
|
|
1154
|
-
});
|
|
1155
|
-
},
|
|
1156
|
-
/**
|
|
1157
|
-
* Watch RouterV2Updated events
|
|
1158
|
-
* @param callback Function to call when event is emitted
|
|
1159
|
-
* @param filter Optional filter for indexed parameters
|
|
1160
|
-
* @returns Unwatch function to stop listening
|
|
1161
|
-
*/
|
|
1162
|
-
RouterV2Updated: (callback, filter) => {
|
|
1163
|
-
return this.publicClient.watchContractEvent({
|
|
1164
|
-
address: this.contractAddress,
|
|
1165
|
-
abi: exports.USD_Tehter_jsonAbi,
|
|
1166
|
-
eventName: 'RouterV2Updated',
|
|
1167
|
-
args: filter,
|
|
693
|
+
abi: exports.StandardToken_jsonAbi,
|
|
694
|
+
eventName: 'Initialized',
|
|
1168
695
|
onLogs: (logs) => {
|
|
1169
696
|
logs.forEach((log) => {
|
|
1170
697
|
callback(log.args);
|
|
@@ -1181,7 +708,7 @@ class USD_Tehter_json {
|
|
|
1181
708
|
Transfer: (callback, filter) => {
|
|
1182
709
|
return this.publicClient.watchContractEvent({
|
|
1183
710
|
address: this.contractAddress,
|
|
1184
|
-
abi: exports.
|
|
711
|
+
abi: exports.StandardToken_jsonAbi,
|
|
1185
712
|
eventName: 'Transfer',
|
|
1186
713
|
args: filter,
|
|
1187
714
|
onLogs: (logs) => {
|
|
@@ -1194,4 +721,4 @@ class USD_Tehter_json {
|
|
|
1194
721
|
};
|
|
1195
722
|
}
|
|
1196
723
|
}
|
|
1197
|
-
exports.
|
|
724
|
+
exports.StandardToken_json = StandardToken_json;
|