@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
|
@@ -2,203 +2,16 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
|
|
|
2
2
|
import { getContract } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* StandardToken_json ABI
|
|
6
6
|
*
|
|
7
7
|
* This ABI is typed using viem's type system for full type safety.
|
|
8
8
|
*/
|
|
9
|
-
export const
|
|
9
|
+
export const StandardToken_jsonAbi = [
|
|
10
10
|
{
|
|
11
11
|
"inputs": [],
|
|
12
12
|
"stateMutability": "nonpayable",
|
|
13
13
|
"type": "constructor"
|
|
14
14
|
},
|
|
15
|
-
{
|
|
16
|
-
"inputs": [
|
|
17
|
-
{
|
|
18
|
-
"internalType": "address",
|
|
19
|
-
"name": "target",
|
|
20
|
-
"type": "address"
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"name": "AddressEmptyCode",
|
|
24
|
-
"type": "error"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"inputs": [
|
|
28
|
-
{
|
|
29
|
-
"internalType": "address",
|
|
30
|
-
"name": "account",
|
|
31
|
-
"type": "address"
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"name": "AddressInsufficientBalance",
|
|
35
|
-
"type": "error"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"inputs": [
|
|
39
|
-
{
|
|
40
|
-
"internalType": "address",
|
|
41
|
-
"name": "spender",
|
|
42
|
-
"type": "address"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"internalType": "uint256",
|
|
46
|
-
"name": "allowance",
|
|
47
|
-
"type": "uint256"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"internalType": "uint256",
|
|
51
|
-
"name": "needed",
|
|
52
|
-
"type": "uint256"
|
|
53
|
-
}
|
|
54
|
-
],
|
|
55
|
-
"name": "ERC20InsufficientAllowance",
|
|
56
|
-
"type": "error"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"inputs": [
|
|
60
|
-
{
|
|
61
|
-
"internalType": "address",
|
|
62
|
-
"name": "sender",
|
|
63
|
-
"type": "address"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"internalType": "uint256",
|
|
67
|
-
"name": "balance",
|
|
68
|
-
"type": "uint256"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"internalType": "uint256",
|
|
72
|
-
"name": "needed",
|
|
73
|
-
"type": "uint256"
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
"name": "ERC20InsufficientBalance",
|
|
77
|
-
"type": "error"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"inputs": [
|
|
81
|
-
{
|
|
82
|
-
"internalType": "address",
|
|
83
|
-
"name": "approver",
|
|
84
|
-
"type": "address"
|
|
85
|
-
}
|
|
86
|
-
],
|
|
87
|
-
"name": "ERC20InvalidApprover",
|
|
88
|
-
"type": "error"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"inputs": [
|
|
92
|
-
{
|
|
93
|
-
"internalType": "address",
|
|
94
|
-
"name": "receiver",
|
|
95
|
-
"type": "address"
|
|
96
|
-
}
|
|
97
|
-
],
|
|
98
|
-
"name": "ERC20InvalidReceiver",
|
|
99
|
-
"type": "error"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"inputs": [
|
|
103
|
-
{
|
|
104
|
-
"internalType": "address",
|
|
105
|
-
"name": "sender",
|
|
106
|
-
"type": "address"
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
"name": "ERC20InvalidSender",
|
|
110
|
-
"type": "error"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"inputs": [
|
|
114
|
-
{
|
|
115
|
-
"internalType": "address",
|
|
116
|
-
"name": "spender",
|
|
117
|
-
"type": "address"
|
|
118
|
-
}
|
|
119
|
-
],
|
|
120
|
-
"name": "ERC20InvalidSpender",
|
|
121
|
-
"type": "error"
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"inputs": [],
|
|
125
|
-
"name": "FailedInnerCall",
|
|
126
|
-
"type": "error"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"inputs": [
|
|
130
|
-
{
|
|
131
|
-
"internalType": "address",
|
|
132
|
-
"name": "AMM",
|
|
133
|
-
"type": "address"
|
|
134
|
-
}
|
|
135
|
-
],
|
|
136
|
-
"name": "InvalidAMM",
|
|
137
|
-
"type": "error"
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
"inputs": [
|
|
141
|
-
{
|
|
142
|
-
"internalType": "address",
|
|
143
|
-
"name": "tokenAddress",
|
|
144
|
-
"type": "address"
|
|
145
|
-
}
|
|
146
|
-
],
|
|
147
|
-
"name": "InvalidToken",
|
|
148
|
-
"type": "error"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"inputs": [
|
|
152
|
-
{
|
|
153
|
-
"internalType": "address",
|
|
154
|
-
"name": "owner",
|
|
155
|
-
"type": "address"
|
|
156
|
-
}
|
|
157
|
-
],
|
|
158
|
-
"name": "OwnableInvalidOwner",
|
|
159
|
-
"type": "error"
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
"inputs": [
|
|
163
|
-
{
|
|
164
|
-
"internalType": "address",
|
|
165
|
-
"name": "account",
|
|
166
|
-
"type": "address"
|
|
167
|
-
}
|
|
168
|
-
],
|
|
169
|
-
"name": "OwnableUnauthorizedAccount",
|
|
170
|
-
"type": "error"
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
"inputs": [
|
|
174
|
-
{
|
|
175
|
-
"internalType": "address",
|
|
176
|
-
"name": "token",
|
|
177
|
-
"type": "address"
|
|
178
|
-
}
|
|
179
|
-
],
|
|
180
|
-
"name": "SafeERC20FailedOperation",
|
|
181
|
-
"type": "error"
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"anonymous": false,
|
|
185
|
-
"inputs": [
|
|
186
|
-
{
|
|
187
|
-
"indexed": true,
|
|
188
|
-
"internalType": "address",
|
|
189
|
-
"name": "AMM",
|
|
190
|
-
"type": "address"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"indexed": false,
|
|
194
|
-
"internalType": "bool",
|
|
195
|
-
"name": "isAMM",
|
|
196
|
-
"type": "bool"
|
|
197
|
-
}
|
|
198
|
-
],
|
|
199
|
-
"name": "AMMUpdated",
|
|
200
|
-
"type": "event"
|
|
201
|
-
},
|
|
202
15
|
{
|
|
203
16
|
"anonymous": false,
|
|
204
17
|
"inputs": [
|
|
@@ -228,51 +41,13 @@ export const USD_Tehter_jsonAbi = [
|
|
|
228
41
|
"anonymous": false,
|
|
229
42
|
"inputs": [
|
|
230
43
|
{
|
|
231
|
-
"indexed":
|
|
232
|
-
"internalType": "
|
|
233
|
-
"name": "
|
|
234
|
-
"type": "
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
"indexed": true,
|
|
238
|
-
"internalType": "address",
|
|
239
|
-
"name": "newOwner",
|
|
240
|
-
"type": "address"
|
|
241
|
-
}
|
|
242
|
-
],
|
|
243
|
-
"name": "OwnershipTransferStarted",
|
|
244
|
-
"type": "event"
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
"anonymous": false,
|
|
248
|
-
"inputs": [
|
|
249
|
-
{
|
|
250
|
-
"indexed": true,
|
|
251
|
-
"internalType": "address",
|
|
252
|
-
"name": "previousOwner",
|
|
253
|
-
"type": "address"
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
"indexed": true,
|
|
257
|
-
"internalType": "address",
|
|
258
|
-
"name": "newOwner",
|
|
259
|
-
"type": "address"
|
|
260
|
-
}
|
|
261
|
-
],
|
|
262
|
-
"name": "OwnershipTransferred",
|
|
263
|
-
"type": "event"
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
"anonymous": false,
|
|
267
|
-
"inputs": [
|
|
268
|
-
{
|
|
269
|
-
"indexed": true,
|
|
270
|
-
"internalType": "address",
|
|
271
|
-
"name": "routerV2",
|
|
272
|
-
"type": "address"
|
|
44
|
+
"indexed": false,
|
|
45
|
+
"internalType": "uint8",
|
|
46
|
+
"name": "version",
|
|
47
|
+
"type": "uint8"
|
|
273
48
|
}
|
|
274
49
|
],
|
|
275
|
-
"name": "
|
|
50
|
+
"name": "Initialized",
|
|
276
51
|
"type": "event"
|
|
277
52
|
},
|
|
278
53
|
{
|
|
@@ -300,45 +75,6 @@ export const USD_Tehter_jsonAbi = [
|
|
|
300
75
|
"name": "Transfer",
|
|
301
76
|
"type": "event"
|
|
302
77
|
},
|
|
303
|
-
{
|
|
304
|
-
"inputs": [
|
|
305
|
-
{
|
|
306
|
-
"internalType": "address",
|
|
307
|
-
"name": "",
|
|
308
|
-
"type": "address"
|
|
309
|
-
}
|
|
310
|
-
],
|
|
311
|
-
"name": "AMMs",
|
|
312
|
-
"outputs": [
|
|
313
|
-
{
|
|
314
|
-
"internalType": "bool",
|
|
315
|
-
"name": "",
|
|
316
|
-
"type": "bool"
|
|
317
|
-
}
|
|
318
|
-
],
|
|
319
|
-
"stateMutability": "view",
|
|
320
|
-
"type": "function"
|
|
321
|
-
},
|
|
322
|
-
{
|
|
323
|
-
"inputs": [],
|
|
324
|
-
"name": "acceptOwnership",
|
|
325
|
-
"outputs": [],
|
|
326
|
-
"stateMutability": "nonpayable",
|
|
327
|
-
"type": "function"
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
"inputs": [
|
|
331
|
-
{
|
|
332
|
-
"internalType": "address",
|
|
333
|
-
"name": "_router",
|
|
334
|
-
"type": "address"
|
|
335
|
-
}
|
|
336
|
-
],
|
|
337
|
-
"name": "afterConstructor",
|
|
338
|
-
"outputs": [],
|
|
339
|
-
"stateMutability": "nonpayable",
|
|
340
|
-
"type": "function"
|
|
341
|
-
},
|
|
342
78
|
{
|
|
343
79
|
"inputs": [
|
|
344
80
|
{
|
|
@@ -372,7 +108,7 @@ export const USD_Tehter_jsonAbi = [
|
|
|
372
108
|
},
|
|
373
109
|
{
|
|
374
110
|
"internalType": "uint256",
|
|
375
|
-
"name": "
|
|
111
|
+
"name": "amount",
|
|
376
112
|
"type": "uint256"
|
|
377
113
|
}
|
|
378
114
|
],
|
|
@@ -410,7 +146,7 @@ export const USD_Tehter_jsonAbi = [
|
|
|
410
146
|
"inputs": [
|
|
411
147
|
{
|
|
412
148
|
"internalType": "uint256",
|
|
413
|
-
"name": "
|
|
149
|
+
"name": "amount",
|
|
414
150
|
"type": "uint256"
|
|
415
151
|
}
|
|
416
152
|
],
|
|
@@ -428,7 +164,7 @@ export const USD_Tehter_jsonAbi = [
|
|
|
428
164
|
},
|
|
429
165
|
{
|
|
430
166
|
"internalType": "uint256",
|
|
431
|
-
"name": "
|
|
167
|
+
"name": "amount",
|
|
432
168
|
"type": "uint256"
|
|
433
169
|
}
|
|
434
170
|
],
|
|
@@ -447,141 +183,114 @@ export const USD_Tehter_jsonAbi = [
|
|
|
447
183
|
"type": "uint8"
|
|
448
184
|
}
|
|
449
185
|
],
|
|
450
|
-
"stateMutability": "
|
|
186
|
+
"stateMutability": "view",
|
|
451
187
|
"type": "function"
|
|
452
188
|
},
|
|
453
189
|
{
|
|
454
|
-
"inputs": [
|
|
455
|
-
"name": "deploymentKey",
|
|
456
|
-
"outputs": [
|
|
190
|
+
"inputs": [
|
|
457
191
|
{
|
|
458
|
-
"internalType": "
|
|
459
|
-
"name": "",
|
|
460
|
-
"type": "
|
|
461
|
-
}
|
|
462
|
-
],
|
|
463
|
-
"stateMutability": "pure",
|
|
464
|
-
"type": "function"
|
|
465
|
-
},
|
|
466
|
-
{
|
|
467
|
-
"inputs": [],
|
|
468
|
-
"name": "name",
|
|
469
|
-
"outputs": [
|
|
192
|
+
"internalType": "address",
|
|
193
|
+
"name": "spender",
|
|
194
|
+
"type": "address"
|
|
195
|
+
},
|
|
470
196
|
{
|
|
471
|
-
"internalType": "
|
|
472
|
-
"name": "",
|
|
473
|
-
"type": "
|
|
197
|
+
"internalType": "uint256",
|
|
198
|
+
"name": "subtractedValue",
|
|
199
|
+
"type": "uint256"
|
|
474
200
|
}
|
|
475
201
|
],
|
|
476
|
-
"
|
|
477
|
-
"type": "function"
|
|
478
|
-
},
|
|
479
|
-
{
|
|
480
|
-
"inputs": [],
|
|
481
|
-
"name": "owner",
|
|
202
|
+
"name": "decreaseAllowance",
|
|
482
203
|
"outputs": [
|
|
483
204
|
{
|
|
484
|
-
"internalType": "
|
|
205
|
+
"internalType": "bool",
|
|
485
206
|
"name": "",
|
|
486
|
-
"type": "
|
|
207
|
+
"type": "bool"
|
|
487
208
|
}
|
|
488
209
|
],
|
|
489
|
-
"stateMutability": "
|
|
210
|
+
"stateMutability": "nonpayable",
|
|
490
211
|
"type": "function"
|
|
491
212
|
},
|
|
492
213
|
{
|
|
493
|
-
"inputs": [
|
|
494
|
-
"name": "pairV2",
|
|
495
|
-
"outputs": [
|
|
214
|
+
"inputs": [
|
|
496
215
|
{
|
|
497
216
|
"internalType": "address",
|
|
498
|
-
"name": "",
|
|
217
|
+
"name": "spender",
|
|
499
218
|
"type": "address"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"internalType": "uint256",
|
|
222
|
+
"name": "addedValue",
|
|
223
|
+
"type": "uint256"
|
|
500
224
|
}
|
|
501
225
|
],
|
|
502
|
-
"
|
|
503
|
-
"type": "function"
|
|
504
|
-
},
|
|
505
|
-
{
|
|
506
|
-
"inputs": [],
|
|
507
|
-
"name": "pendingOwner",
|
|
226
|
+
"name": "increaseAllowance",
|
|
508
227
|
"outputs": [
|
|
509
228
|
{
|
|
510
|
-
"internalType": "
|
|
229
|
+
"internalType": "bool",
|
|
511
230
|
"name": "",
|
|
512
|
-
"type": "
|
|
231
|
+
"type": "bool"
|
|
513
232
|
}
|
|
514
233
|
],
|
|
515
|
-
"stateMutability": "
|
|
234
|
+
"stateMutability": "nonpayable",
|
|
516
235
|
"type": "function"
|
|
517
236
|
},
|
|
518
237
|
{
|
|
519
238
|
"inputs": [
|
|
520
239
|
{
|
|
521
240
|
"internalType": "address",
|
|
522
|
-
"name": "
|
|
241
|
+
"name": "_owner",
|
|
523
242
|
"type": "address"
|
|
524
243
|
},
|
|
525
244
|
{
|
|
526
|
-
"internalType": "
|
|
527
|
-
"name": "
|
|
528
|
-
"type": "
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
245
|
+
"internalType": "string",
|
|
246
|
+
"name": "_name",
|
|
247
|
+
"type": "string"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"internalType": "string",
|
|
251
|
+
"name": "_symbol",
|
|
252
|
+
"type": "string"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"internalType": "uint8",
|
|
256
|
+
"name": "_decimals",
|
|
257
|
+
"type": "uint8"
|
|
258
|
+
},
|
|
538
259
|
{
|
|
539
260
|
"internalType": "uint256",
|
|
540
|
-
"name": "
|
|
261
|
+
"name": "_initialSupply",
|
|
541
262
|
"type": "uint256"
|
|
542
263
|
}
|
|
543
|
-
],
|
|
544
|
-
"name": "
|
|
545
|
-
"outputs": [],
|
|
546
|
-
"stateMutability": "nonpayable",
|
|
547
|
-
"type": "function"
|
|
548
|
-
},
|
|
549
|
-
{
|
|
550
|
-
"inputs": [],
|
|
551
|
-
"name": "renounceOwnership",
|
|
264
|
+
],
|
|
265
|
+
"name": "initialize",
|
|
552
266
|
"outputs": [],
|
|
553
267
|
"stateMutability": "nonpayable",
|
|
554
268
|
"type": "function"
|
|
555
269
|
},
|
|
556
270
|
{
|
|
557
271
|
"inputs": [],
|
|
558
|
-
"name": "
|
|
272
|
+
"name": "maxSupply",
|
|
559
273
|
"outputs": [
|
|
560
274
|
{
|
|
561
|
-
"internalType": "
|
|
275
|
+
"internalType": "uint256",
|
|
562
276
|
"name": "",
|
|
563
|
-
"type": "
|
|
277
|
+
"type": "uint256"
|
|
564
278
|
}
|
|
565
279
|
],
|
|
566
280
|
"stateMutability": "view",
|
|
567
281
|
"type": "function"
|
|
568
282
|
},
|
|
569
283
|
{
|
|
570
|
-
"inputs": [
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
"name": "AMM",
|
|
574
|
-
"type": "address"
|
|
575
|
-
},
|
|
284
|
+
"inputs": [],
|
|
285
|
+
"name": "name",
|
|
286
|
+
"outputs": [
|
|
576
287
|
{
|
|
577
|
-
"internalType": "
|
|
578
|
-
"name": "
|
|
579
|
-
"type": "
|
|
288
|
+
"internalType": "string",
|
|
289
|
+
"name": "",
|
|
290
|
+
"type": "string"
|
|
580
291
|
}
|
|
581
292
|
],
|
|
582
|
-
"
|
|
583
|
-
"outputs": [],
|
|
584
|
-
"stateMutability": "nonpayable",
|
|
293
|
+
"stateMutability": "view",
|
|
585
294
|
"type": "function"
|
|
586
295
|
},
|
|
587
296
|
{
|
|
@@ -619,7 +328,7 @@ export const USD_Tehter_jsonAbi = [
|
|
|
619
328
|
},
|
|
620
329
|
{
|
|
621
330
|
"internalType": "uint256",
|
|
622
|
-
"name": "
|
|
331
|
+
"name": "amount",
|
|
623
332
|
"type": "uint256"
|
|
624
333
|
}
|
|
625
334
|
],
|
|
@@ -648,7 +357,7 @@ export const USD_Tehter_jsonAbi = [
|
|
|
648
357
|
},
|
|
649
358
|
{
|
|
650
359
|
"internalType": "uint256",
|
|
651
|
-
"name": "
|
|
360
|
+
"name": "amount",
|
|
652
361
|
"type": "uint256"
|
|
653
362
|
}
|
|
654
363
|
],
|
|
@@ -662,36 +371,23 @@ export const USD_Tehter_jsonAbi = [
|
|
|
662
371
|
],
|
|
663
372
|
"stateMutability": "nonpayable",
|
|
664
373
|
"type": "function"
|
|
665
|
-
},
|
|
666
|
-
{
|
|
667
|
-
"inputs": [
|
|
668
|
-
{
|
|
669
|
-
"internalType": "address",
|
|
670
|
-
"name": "newOwner",
|
|
671
|
-
"type": "address"
|
|
672
|
-
}
|
|
673
|
-
],
|
|
674
|
-
"name": "transferOwnership",
|
|
675
|
-
"outputs": [],
|
|
676
|
-
"stateMutability": "nonpayable",
|
|
677
|
-
"type": "function"
|
|
678
374
|
}
|
|
679
375
|
] as const satisfies Abi;
|
|
680
376
|
|
|
681
377
|
/**
|
|
682
|
-
* Type-safe ABI for
|
|
378
|
+
* Type-safe ABI for StandardToken_json
|
|
683
379
|
*/
|
|
684
|
-
export type
|
|
380
|
+
export type StandardToken_jsonAbi = typeof StandardToken_jsonAbi;
|
|
685
381
|
|
|
686
382
|
/**
|
|
687
|
-
* Contract instance type for
|
|
383
|
+
* Contract instance type for StandardToken_json
|
|
688
384
|
*/
|
|
689
385
|
// Use any for contract type to avoid complex viem type issues
|
|
690
386
|
// The runtime behavior is type-safe through viem's ABI typing
|
|
691
|
-
export type
|
|
387
|
+
export type StandardToken_jsonContract = any;
|
|
692
388
|
|
|
693
389
|
/**
|
|
694
|
-
*
|
|
390
|
+
* StandardToken_json Contract Class
|
|
695
391
|
*
|
|
696
392
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
697
393
|
*
|
|
@@ -699,12 +395,12 @@ export type USD_Tehter_jsonContract = any;
|
|
|
699
395
|
* ```typescript
|
|
700
396
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
701
397
|
* import { mainnet } from 'viem/chains';
|
|
702
|
-
* import {
|
|
398
|
+
* import { StandardToken_json } from 'StandardToken_json';
|
|
703
399
|
*
|
|
704
400
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
705
401
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
706
402
|
*
|
|
707
|
-
* const contract = new
|
|
403
|
+
* const contract = new StandardToken_json('0x...', { publicClient, walletClient });
|
|
708
404
|
*
|
|
709
405
|
* // Read functions
|
|
710
406
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -722,8 +418,8 @@ export type USD_Tehter_jsonContract = any;
|
|
|
722
418
|
* });
|
|
723
419
|
* ```
|
|
724
420
|
*/
|
|
725
|
-
export class
|
|
726
|
-
private contract:
|
|
421
|
+
export class StandardToken_json {
|
|
422
|
+
private contract: StandardToken_jsonContract;
|
|
727
423
|
private contractAddress: Address;
|
|
728
424
|
private publicClient: PublicClient;
|
|
729
425
|
|
|
@@ -738,7 +434,7 @@ export class USD_Tehter_json {
|
|
|
738
434
|
this.publicClient = clients.publicClient;
|
|
739
435
|
this.contract = getContract({
|
|
740
436
|
address,
|
|
741
|
-
abi:
|
|
437
|
+
abi: StandardToken_jsonAbi,
|
|
742
438
|
client: {
|
|
743
439
|
public: clients.publicClient,
|
|
744
440
|
wallet: clients.walletClient,
|
|
@@ -756,18 +452,10 @@ export class USD_Tehter_json {
|
|
|
756
452
|
/**
|
|
757
453
|
* Get the underlying viem contract instance
|
|
758
454
|
*/
|
|
759
|
-
getContract():
|
|
455
|
+
getContract(): StandardToken_jsonContract {
|
|
760
456
|
return this.contract;
|
|
761
457
|
}
|
|
762
458
|
|
|
763
|
-
/**
|
|
764
|
-
* AMMs
|
|
765
|
-
* view
|
|
766
|
-
*/
|
|
767
|
-
async AMMs(arg0: `0x${string}`): Promise<boolean> {
|
|
768
|
-
return this.contract.read.AMMs([arg0] as const) as Promise<boolean>;
|
|
769
|
-
}
|
|
770
|
-
|
|
771
459
|
/**
|
|
772
460
|
* allowance
|
|
773
461
|
* view
|
|
@@ -786,18 +474,18 @@ export class USD_Tehter_json {
|
|
|
786
474
|
|
|
787
475
|
/**
|
|
788
476
|
* decimals
|
|
789
|
-
*
|
|
477
|
+
* view
|
|
790
478
|
*/
|
|
791
479
|
async decimals(): Promise<bigint> {
|
|
792
480
|
return this.contract.read.decimals() as Promise<bigint>;
|
|
793
481
|
}
|
|
794
482
|
|
|
795
483
|
/**
|
|
796
|
-
*
|
|
797
|
-
*
|
|
484
|
+
* maxSupply
|
|
485
|
+
* view
|
|
798
486
|
*/
|
|
799
|
-
async
|
|
800
|
-
return this.contract.read.
|
|
487
|
+
async maxSupply(): Promise<bigint> {
|
|
488
|
+
return this.contract.read.maxSupply() as Promise<bigint>;
|
|
801
489
|
}
|
|
802
490
|
|
|
803
491
|
/**
|
|
@@ -808,38 +496,6 @@ export class USD_Tehter_json {
|
|
|
808
496
|
return this.contract.read.name() as Promise<string>;
|
|
809
497
|
}
|
|
810
498
|
|
|
811
|
-
/**
|
|
812
|
-
* owner
|
|
813
|
-
* view
|
|
814
|
-
*/
|
|
815
|
-
async owner(): Promise<`0x${string}`> {
|
|
816
|
-
return this.contract.read.owner() as Promise<`0x${string}`>;
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
/**
|
|
820
|
-
* pairV2
|
|
821
|
-
* view
|
|
822
|
-
*/
|
|
823
|
-
async pairV2(): Promise<`0x${string}`> {
|
|
824
|
-
return this.contract.read.pairV2() as Promise<`0x${string}`>;
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
/**
|
|
828
|
-
* pendingOwner
|
|
829
|
-
* view
|
|
830
|
-
*/
|
|
831
|
-
async pendingOwner(): Promise<`0x${string}`> {
|
|
832
|
-
return this.contract.read.pendingOwner() as Promise<`0x${string}`>;
|
|
833
|
-
}
|
|
834
|
-
|
|
835
|
-
/**
|
|
836
|
-
* routerV2
|
|
837
|
-
* view
|
|
838
|
-
*/
|
|
839
|
-
async routerV2(): Promise<`0x${string}`> {
|
|
840
|
-
return this.contract.read.routerV2() as Promise<`0x${string}`>;
|
|
841
|
-
}
|
|
842
|
-
|
|
843
499
|
/**
|
|
844
500
|
* symbol
|
|
845
501
|
* view
|
|
@@ -856,58 +512,12 @@ export class USD_Tehter_json {
|
|
|
856
512
|
return this.contract.read.totalSupply() as Promise<bigint>;
|
|
857
513
|
}
|
|
858
514
|
|
|
859
|
-
/**
|
|
860
|
-
* acceptOwnership
|
|
861
|
-
* nonpayable
|
|
862
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
863
|
-
*/
|
|
864
|
-
async acceptOwnership(options?: {
|
|
865
|
-
accessList?: import('viem').AccessList;
|
|
866
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
867
|
-
chain?: import('viem').Chain | null;
|
|
868
|
-
dataSuffix?: `0x${string}`;
|
|
869
|
-
gas?: bigint;
|
|
870
|
-
gasPrice?: bigint;
|
|
871
|
-
maxFeePerGas?: bigint;
|
|
872
|
-
maxPriorityFeePerGas?: bigint;
|
|
873
|
-
nonce?: number;
|
|
874
|
-
value?: bigint;
|
|
875
|
-
}): Promise<`0x${string}`> {
|
|
876
|
-
if (!this.contract.write) {
|
|
877
|
-
throw new Error('Wallet client is required for write operations');
|
|
878
|
-
}
|
|
879
|
-
return this.contract.write.acceptOwnership(options) as Promise<`0x${string}`>;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
/**
|
|
883
|
-
* afterConstructor
|
|
884
|
-
* nonpayable
|
|
885
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
886
|
-
*/
|
|
887
|
-
async afterConstructor(_router: `0x${string}`, options?: {
|
|
888
|
-
accessList?: import('viem').AccessList;
|
|
889
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
890
|
-
chain?: import('viem').Chain | null;
|
|
891
|
-
dataSuffix?: `0x${string}`;
|
|
892
|
-
gas?: bigint;
|
|
893
|
-
gasPrice?: bigint;
|
|
894
|
-
maxFeePerGas?: bigint;
|
|
895
|
-
maxPriorityFeePerGas?: bigint;
|
|
896
|
-
nonce?: number;
|
|
897
|
-
value?: bigint;
|
|
898
|
-
}): Promise<`0x${string}`> {
|
|
899
|
-
if (!this.contract.write) {
|
|
900
|
-
throw new Error('Wallet client is required for write operations');
|
|
901
|
-
}
|
|
902
|
-
return this.contract.write.afterConstructor([_router] as const, options) as Promise<`0x${string}`>;
|
|
903
|
-
}
|
|
904
|
-
|
|
905
515
|
/**
|
|
906
516
|
* approve
|
|
907
517
|
* nonpayable
|
|
908
518
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
909
519
|
*/
|
|
910
|
-
async approve(spender: `0x${string}`,
|
|
520
|
+
async approve(spender: `0x${string}`, amount: bigint, options?: {
|
|
911
521
|
accessList?: import('viem').AccessList;
|
|
912
522
|
authorizationList?: import('viem').AuthorizationList;
|
|
913
523
|
chain?: import('viem').Chain | null;
|
|
@@ -922,7 +532,7 @@ export class USD_Tehter_json {
|
|
|
922
532
|
if (!this.contract.write) {
|
|
923
533
|
throw new Error('Wallet client is required for write operations');
|
|
924
534
|
}
|
|
925
|
-
return this.contract.write.approve([spender,
|
|
535
|
+
return this.contract.write.approve([spender, amount] as const, options) as Promise<`0x${string}`>;
|
|
926
536
|
}
|
|
927
537
|
|
|
928
538
|
/**
|
|
@@ -930,7 +540,7 @@ export class USD_Tehter_json {
|
|
|
930
540
|
* nonpayable
|
|
931
541
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
932
542
|
*/
|
|
933
|
-
async burn(
|
|
543
|
+
async burn(amount: bigint, options?: {
|
|
934
544
|
accessList?: import('viem').AccessList;
|
|
935
545
|
authorizationList?: import('viem').AuthorizationList;
|
|
936
546
|
chain?: import('viem').Chain | null;
|
|
@@ -945,7 +555,7 @@ export class USD_Tehter_json {
|
|
|
945
555
|
if (!this.contract.write) {
|
|
946
556
|
throw new Error('Wallet client is required for write operations');
|
|
947
557
|
}
|
|
948
|
-
return this.contract.write.burn([
|
|
558
|
+
return this.contract.write.burn([amount] as const, options) as Promise<`0x${string}`>;
|
|
949
559
|
}
|
|
950
560
|
|
|
951
561
|
/**
|
|
@@ -953,30 +563,7 @@ export class USD_Tehter_json {
|
|
|
953
563
|
* nonpayable
|
|
954
564
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
955
565
|
*/
|
|
956
|
-
async burnFrom(account: `0x${string}`,
|
|
957
|
-
accessList?: import('viem').AccessList;
|
|
958
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
959
|
-
chain?: import('viem').Chain | null;
|
|
960
|
-
dataSuffix?: `0x${string}`;
|
|
961
|
-
gas?: bigint;
|
|
962
|
-
gasPrice?: bigint;
|
|
963
|
-
maxFeePerGas?: bigint;
|
|
964
|
-
maxPriorityFeePerGas?: bigint;
|
|
965
|
-
nonce?: number;
|
|
966
|
-
value?: bigint;
|
|
967
|
-
}): Promise<`0x${string}`> {
|
|
968
|
-
if (!this.contract.write) {
|
|
969
|
-
throw new Error('Wallet client is required for write operations');
|
|
970
|
-
}
|
|
971
|
-
return this.contract.write.burnFrom([account, value] as const, options) as Promise<`0x${string}`>;
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
/**
|
|
975
|
-
* recoverForeignERC20
|
|
976
|
-
* nonpayable
|
|
977
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
978
|
-
*/
|
|
979
|
-
async recoverForeignERC20(tokenAddress: `0x${string}`, amount: bigint, options?: {
|
|
566
|
+
async burnFrom(account: `0x${string}`, amount: bigint, options?: {
|
|
980
567
|
accessList?: import('viem').AccessList;
|
|
981
568
|
authorizationList?: import('viem').AuthorizationList;
|
|
982
569
|
chain?: import('viem').Chain | null;
|
|
@@ -991,15 +578,15 @@ export class USD_Tehter_json {
|
|
|
991
578
|
if (!this.contract.write) {
|
|
992
579
|
throw new Error('Wallet client is required for write operations');
|
|
993
580
|
}
|
|
994
|
-
return this.contract.write.
|
|
581
|
+
return this.contract.write.burnFrom([account, amount] as const, options) as Promise<`0x${string}`>;
|
|
995
582
|
}
|
|
996
583
|
|
|
997
584
|
/**
|
|
998
|
-
*
|
|
585
|
+
* decreaseAllowance
|
|
999
586
|
* nonpayable
|
|
1000
587
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1001
588
|
*/
|
|
1002
|
-
async
|
|
589
|
+
async decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
|
|
1003
590
|
accessList?: import('viem').AccessList;
|
|
1004
591
|
authorizationList?: import('viem').AuthorizationList;
|
|
1005
592
|
chain?: import('viem').Chain | null;
|
|
@@ -1014,15 +601,15 @@ export class USD_Tehter_json {
|
|
|
1014
601
|
if (!this.contract.write) {
|
|
1015
602
|
throw new Error('Wallet client is required for write operations');
|
|
1016
603
|
}
|
|
1017
|
-
return this.contract.write.
|
|
604
|
+
return this.contract.write.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<`0x${string}`>;
|
|
1018
605
|
}
|
|
1019
606
|
|
|
1020
607
|
/**
|
|
1021
|
-
*
|
|
608
|
+
* increaseAllowance
|
|
1022
609
|
* nonpayable
|
|
1023
610
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1024
611
|
*/
|
|
1025
|
-
async
|
|
612
|
+
async increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
|
|
1026
613
|
accessList?: import('viem').AccessList;
|
|
1027
614
|
authorizationList?: import('viem').AuthorizationList;
|
|
1028
615
|
chain?: import('viem').Chain | null;
|
|
@@ -1037,15 +624,15 @@ export class USD_Tehter_json {
|
|
|
1037
624
|
if (!this.contract.write) {
|
|
1038
625
|
throw new Error('Wallet client is required for write operations');
|
|
1039
626
|
}
|
|
1040
|
-
return this.contract.write.
|
|
627
|
+
return this.contract.write.increaseAllowance([spender, addedValue] as const, options) as Promise<`0x${string}`>;
|
|
1041
628
|
}
|
|
1042
629
|
|
|
1043
630
|
/**
|
|
1044
|
-
*
|
|
631
|
+
* initialize
|
|
1045
632
|
* nonpayable
|
|
1046
633
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1047
634
|
*/
|
|
1048
|
-
async
|
|
635
|
+
async initialize(_owner: `0x${string}`, _name: string, _symbol: string, _decimals: bigint, _initialSupply: bigint, options?: {
|
|
1049
636
|
accessList?: import('viem').AccessList;
|
|
1050
637
|
authorizationList?: import('viem').AuthorizationList;
|
|
1051
638
|
chain?: import('viem').Chain | null;
|
|
@@ -1060,7 +647,7 @@ export class USD_Tehter_json {
|
|
|
1060
647
|
if (!this.contract.write) {
|
|
1061
648
|
throw new Error('Wallet client is required for write operations');
|
|
1062
649
|
}
|
|
1063
|
-
return this.contract.write.
|
|
650
|
+
return this.contract.write.initialize([_owner, _name, _symbol, _decimals, _initialSupply] as const, options) as Promise<`0x${string}`>;
|
|
1064
651
|
}
|
|
1065
652
|
|
|
1066
653
|
/**
|
|
@@ -1068,7 +655,7 @@ export class USD_Tehter_json {
|
|
|
1068
655
|
* nonpayable
|
|
1069
656
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1070
657
|
*/
|
|
1071
|
-
async transfer(to: `0x${string}`,
|
|
658
|
+
async transfer(to: `0x${string}`, amount: bigint, options?: {
|
|
1072
659
|
accessList?: import('viem').AccessList;
|
|
1073
660
|
authorizationList?: import('viem').AuthorizationList;
|
|
1074
661
|
chain?: import('viem').Chain | null;
|
|
@@ -1083,7 +670,7 @@ export class USD_Tehter_json {
|
|
|
1083
670
|
if (!this.contract.write) {
|
|
1084
671
|
throw new Error('Wallet client is required for write operations');
|
|
1085
672
|
}
|
|
1086
|
-
return this.contract.write.transfer([to,
|
|
673
|
+
return this.contract.write.transfer([to, amount] as const, options) as Promise<`0x${string}`>;
|
|
1087
674
|
}
|
|
1088
675
|
|
|
1089
676
|
/**
|
|
@@ -1091,30 +678,7 @@ export class USD_Tehter_json {
|
|
|
1091
678
|
* nonpayable
|
|
1092
679
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1093
680
|
*/
|
|
1094
|
-
async transferFrom(from: `0x${string}`, to: `0x${string}`,
|
|
1095
|
-
accessList?: import('viem').AccessList;
|
|
1096
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1097
|
-
chain?: import('viem').Chain | null;
|
|
1098
|
-
dataSuffix?: `0x${string}`;
|
|
1099
|
-
gas?: bigint;
|
|
1100
|
-
gasPrice?: bigint;
|
|
1101
|
-
maxFeePerGas?: bigint;
|
|
1102
|
-
maxPriorityFeePerGas?: bigint;
|
|
1103
|
-
nonce?: number;
|
|
1104
|
-
value?: bigint;
|
|
1105
|
-
}): Promise<`0x${string}`> {
|
|
1106
|
-
if (!this.contract.write) {
|
|
1107
|
-
throw new Error('Wallet client is required for write operations');
|
|
1108
|
-
}
|
|
1109
|
-
return this.contract.write.transferFrom([from, to, value] as const, options) as Promise<`0x${string}`>;
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
/**
|
|
1113
|
-
* transferOwnership
|
|
1114
|
-
* nonpayable
|
|
1115
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1116
|
-
*/
|
|
1117
|
-
async transferOwnership(newOwner: `0x${string}`, options?: {
|
|
681
|
+
async transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
|
|
1118
682
|
accessList?: import('viem').AccessList;
|
|
1119
683
|
authorizationList?: import('viem').AuthorizationList;
|
|
1120
684
|
chain?: import('viem').Chain | null;
|
|
@@ -1129,7 +693,7 @@ export class USD_Tehter_json {
|
|
|
1129
693
|
if (!this.contract.write) {
|
|
1130
694
|
throw new Error('Wallet client is required for write operations');
|
|
1131
695
|
}
|
|
1132
|
-
return this.contract.write.
|
|
696
|
+
return this.contract.write.transferFrom([from, to, amount] as const, options) as Promise<`0x${string}`>;
|
|
1133
697
|
}
|
|
1134
698
|
|
|
1135
699
|
|
|
@@ -1148,50 +712,12 @@ export class USD_Tehter_json {
|
|
|
1148
712
|
throw new Error('Public client is required for simulation');
|
|
1149
713
|
}
|
|
1150
714
|
return {
|
|
1151
|
-
/**
|
|
1152
|
-
* Simulate acceptOwnership
|
|
1153
|
-
* Returns gas estimate and result without sending transaction
|
|
1154
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1155
|
-
*/
|
|
1156
|
-
async acceptOwnership(options?: {
|
|
1157
|
-
accessList?: import('viem').AccessList;
|
|
1158
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1159
|
-
chain?: import('viem').Chain | null;
|
|
1160
|
-
dataSuffix?: `0x${string}`;
|
|
1161
|
-
gas?: bigint;
|
|
1162
|
-
gasPrice?: bigint;
|
|
1163
|
-
maxFeePerGas?: bigint;
|
|
1164
|
-
maxPriorityFeePerGas?: bigint;
|
|
1165
|
-
nonce?: number;
|
|
1166
|
-
value?: bigint;
|
|
1167
|
-
}): Promise<void> {
|
|
1168
|
-
return contract.simulate.acceptOwnership(options) as Promise<void>;
|
|
1169
|
-
},
|
|
1170
|
-
/**
|
|
1171
|
-
* Simulate afterConstructor
|
|
1172
|
-
* Returns gas estimate and result without sending transaction
|
|
1173
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1174
|
-
*/
|
|
1175
|
-
async afterConstructor(_router: `0x${string}`, options?: {
|
|
1176
|
-
accessList?: import('viem').AccessList;
|
|
1177
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1178
|
-
chain?: import('viem').Chain | null;
|
|
1179
|
-
dataSuffix?: `0x${string}`;
|
|
1180
|
-
gas?: bigint;
|
|
1181
|
-
gasPrice?: bigint;
|
|
1182
|
-
maxFeePerGas?: bigint;
|
|
1183
|
-
maxPriorityFeePerGas?: bigint;
|
|
1184
|
-
nonce?: number;
|
|
1185
|
-
value?: bigint;
|
|
1186
|
-
}): Promise<void> {
|
|
1187
|
-
return contract.simulate.afterConstructor([_router] as const, options) as Promise<void>;
|
|
1188
|
-
},
|
|
1189
715
|
/**
|
|
1190
716
|
* Simulate approve
|
|
1191
717
|
* Returns gas estimate and result without sending transaction
|
|
1192
718
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1193
719
|
*/
|
|
1194
|
-
async approve(spender: `0x${string}`,
|
|
720
|
+
async approve(spender: `0x${string}`, amount: bigint, options?: {
|
|
1195
721
|
accessList?: import('viem').AccessList;
|
|
1196
722
|
authorizationList?: import('viem').AuthorizationList;
|
|
1197
723
|
chain?: import('viem').Chain | null;
|
|
@@ -1203,14 +729,14 @@ export class USD_Tehter_json {
|
|
|
1203
729
|
nonce?: number;
|
|
1204
730
|
value?: bigint;
|
|
1205
731
|
}): Promise<boolean> {
|
|
1206
|
-
return contract.simulate.approve([spender,
|
|
732
|
+
return contract.simulate.approve([spender, amount] as const, options) as Promise<boolean>;
|
|
1207
733
|
},
|
|
1208
734
|
/**
|
|
1209
735
|
* Simulate burn
|
|
1210
736
|
* Returns gas estimate and result without sending transaction
|
|
1211
737
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1212
738
|
*/
|
|
1213
|
-
async burn(
|
|
739
|
+
async burn(amount: bigint, options?: {
|
|
1214
740
|
accessList?: import('viem').AccessList;
|
|
1215
741
|
authorizationList?: import('viem').AuthorizationList;
|
|
1216
742
|
chain?: import('viem').Chain | null;
|
|
@@ -1222,33 +748,14 @@ export class USD_Tehter_json {
|
|
|
1222
748
|
nonce?: number;
|
|
1223
749
|
value?: bigint;
|
|
1224
750
|
}): Promise<void> {
|
|
1225
|
-
return contract.simulate.burn([
|
|
751
|
+
return contract.simulate.burn([amount] as const, options) as Promise<void>;
|
|
1226
752
|
},
|
|
1227
753
|
/**
|
|
1228
754
|
* Simulate burnFrom
|
|
1229
755
|
* Returns gas estimate and result without sending transaction
|
|
1230
756
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1231
757
|
*/
|
|
1232
|
-
async burnFrom(account: `0x${string}`,
|
|
1233
|
-
accessList?: import('viem').AccessList;
|
|
1234
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1235
|
-
chain?: import('viem').Chain | null;
|
|
1236
|
-
dataSuffix?: `0x${string}`;
|
|
1237
|
-
gas?: bigint;
|
|
1238
|
-
gasPrice?: bigint;
|
|
1239
|
-
maxFeePerGas?: bigint;
|
|
1240
|
-
maxPriorityFeePerGas?: bigint;
|
|
1241
|
-
nonce?: number;
|
|
1242
|
-
value?: bigint;
|
|
1243
|
-
}): Promise<void> {
|
|
1244
|
-
return contract.simulate.burnFrom([account, value] as const, options) as Promise<void>;
|
|
1245
|
-
},
|
|
1246
|
-
/**
|
|
1247
|
-
* Simulate recoverForeignERC20
|
|
1248
|
-
* Returns gas estimate and result without sending transaction
|
|
1249
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1250
|
-
*/
|
|
1251
|
-
async recoverForeignERC20(tokenAddress: `0x${string}`, amount: bigint, options?: {
|
|
758
|
+
async burnFrom(account: `0x${string}`, amount: bigint, options?: {
|
|
1252
759
|
accessList?: import('viem').AccessList;
|
|
1253
760
|
authorizationList?: import('viem').AuthorizationList;
|
|
1254
761
|
chain?: import('viem').Chain | null;
|
|
@@ -1260,14 +767,14 @@ export class USD_Tehter_json {
|
|
|
1260
767
|
nonce?: number;
|
|
1261
768
|
value?: bigint;
|
|
1262
769
|
}): Promise<void> {
|
|
1263
|
-
return contract.simulate.
|
|
770
|
+
return contract.simulate.burnFrom([account, amount] as const, options) as Promise<void>;
|
|
1264
771
|
},
|
|
1265
772
|
/**
|
|
1266
|
-
* Simulate
|
|
773
|
+
* Simulate decreaseAllowance
|
|
1267
774
|
* Returns gas estimate and result without sending transaction
|
|
1268
775
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1269
776
|
*/
|
|
1270
|
-
async
|
|
777
|
+
async decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
|
|
1271
778
|
accessList?: import('viem').AccessList;
|
|
1272
779
|
authorizationList?: import('viem').AuthorizationList;
|
|
1273
780
|
chain?: import('viem').Chain | null;
|
|
@@ -1278,15 +785,15 @@ export class USD_Tehter_json {
|
|
|
1278
785
|
maxPriorityFeePerGas?: bigint;
|
|
1279
786
|
nonce?: number;
|
|
1280
787
|
value?: bigint;
|
|
1281
|
-
}): Promise<
|
|
1282
|
-
return contract.simulate.
|
|
788
|
+
}): Promise<boolean> {
|
|
789
|
+
return contract.simulate.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<boolean>;
|
|
1283
790
|
},
|
|
1284
791
|
/**
|
|
1285
|
-
* Simulate
|
|
792
|
+
* Simulate increaseAllowance
|
|
1286
793
|
* Returns gas estimate and result without sending transaction
|
|
1287
794
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1288
795
|
*/
|
|
1289
|
-
async
|
|
796
|
+
async increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
|
|
1290
797
|
accessList?: import('viem').AccessList;
|
|
1291
798
|
authorizationList?: import('viem').AuthorizationList;
|
|
1292
799
|
chain?: import('viem').Chain | null;
|
|
@@ -1297,15 +804,15 @@ export class USD_Tehter_json {
|
|
|
1297
804
|
maxPriorityFeePerGas?: bigint;
|
|
1298
805
|
nonce?: number;
|
|
1299
806
|
value?: bigint;
|
|
1300
|
-
}): Promise<
|
|
1301
|
-
return contract.simulate.
|
|
807
|
+
}): Promise<boolean> {
|
|
808
|
+
return contract.simulate.increaseAllowance([spender, addedValue] as const, options) as Promise<boolean>;
|
|
1302
809
|
},
|
|
1303
810
|
/**
|
|
1304
|
-
* Simulate
|
|
811
|
+
* Simulate initialize
|
|
1305
812
|
* Returns gas estimate and result without sending transaction
|
|
1306
813
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1307
814
|
*/
|
|
1308
|
-
async
|
|
815
|
+
async initialize(_owner: `0x${string}`, _name: string, _symbol: string, _decimals: bigint, _initialSupply: bigint, options?: {
|
|
1309
816
|
accessList?: import('viem').AccessList;
|
|
1310
817
|
authorizationList?: import('viem').AuthorizationList;
|
|
1311
818
|
chain?: import('viem').Chain | null;
|
|
@@ -1317,14 +824,14 @@ export class USD_Tehter_json {
|
|
|
1317
824
|
nonce?: number;
|
|
1318
825
|
value?: bigint;
|
|
1319
826
|
}): Promise<void> {
|
|
1320
|
-
return contract.simulate.
|
|
827
|
+
return contract.simulate.initialize([_owner, _name, _symbol, _decimals, _initialSupply] as const, options) as Promise<void>;
|
|
1321
828
|
},
|
|
1322
829
|
/**
|
|
1323
830
|
* Simulate transfer
|
|
1324
831
|
* Returns gas estimate and result without sending transaction
|
|
1325
832
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1326
833
|
*/
|
|
1327
|
-
async transfer(to: `0x${string}`,
|
|
834
|
+
async transfer(to: `0x${string}`, amount: bigint, options?: {
|
|
1328
835
|
accessList?: import('viem').AccessList;
|
|
1329
836
|
authorizationList?: import('viem').AuthorizationList;
|
|
1330
837
|
chain?: import('viem').Chain | null;
|
|
@@ -1336,14 +843,14 @@ export class USD_Tehter_json {
|
|
|
1336
843
|
nonce?: number;
|
|
1337
844
|
value?: bigint;
|
|
1338
845
|
}): Promise<boolean> {
|
|
1339
|
-
return contract.simulate.transfer([to,
|
|
846
|
+
return contract.simulate.transfer([to, amount] as const, options) as Promise<boolean>;
|
|
1340
847
|
},
|
|
1341
848
|
/**
|
|
1342
849
|
* Simulate transferFrom
|
|
1343
850
|
* Returns gas estimate and result without sending transaction
|
|
1344
851
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1345
852
|
*/
|
|
1346
|
-
async transferFrom(from: `0x${string}`, to: `0x${string}`,
|
|
853
|
+
async transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
|
|
1347
854
|
accessList?: import('viem').AccessList;
|
|
1348
855
|
authorizationList?: import('viem').AuthorizationList;
|
|
1349
856
|
chain?: import('viem').Chain | null;
|
|
@@ -1355,26 +862,7 @@ export class USD_Tehter_json {
|
|
|
1355
862
|
nonce?: number;
|
|
1356
863
|
value?: bigint;
|
|
1357
864
|
}): Promise<boolean> {
|
|
1358
|
-
return contract.simulate.transferFrom([from, to,
|
|
1359
|
-
},
|
|
1360
|
-
/**
|
|
1361
|
-
* Simulate transferOwnership
|
|
1362
|
-
* Returns gas estimate and result without sending transaction
|
|
1363
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1364
|
-
*/
|
|
1365
|
-
async transferOwnership(newOwner: `0x${string}`, options?: {
|
|
1366
|
-
accessList?: import('viem').AccessList;
|
|
1367
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1368
|
-
chain?: import('viem').Chain | null;
|
|
1369
|
-
dataSuffix?: `0x${string}`;
|
|
1370
|
-
gas?: bigint;
|
|
1371
|
-
gasPrice?: bigint;
|
|
1372
|
-
maxFeePerGas?: bigint;
|
|
1373
|
-
maxPriorityFeePerGas?: bigint;
|
|
1374
|
-
nonce?: number;
|
|
1375
|
-
value?: bigint;
|
|
1376
|
-
}): Promise<void> {
|
|
1377
|
-
return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
|
|
865
|
+
return contract.simulate.transferFrom([from, to, amount] as const, options) as Promise<boolean>;
|
|
1378
866
|
}
|
|
1379
867
|
};
|
|
1380
868
|
}
|
|
@@ -1393,25 +881,6 @@ export class USD_Tehter_json {
|
|
|
1393
881
|
*/
|
|
1394
882
|
get watch() {
|
|
1395
883
|
return {
|
|
1396
|
-
/**
|
|
1397
|
-
* Watch AMMUpdated events
|
|
1398
|
-
* @param callback Function to call when event is emitted
|
|
1399
|
-
* @param filter Optional filter for indexed parameters
|
|
1400
|
-
* @returns Unwatch function to stop listening
|
|
1401
|
-
*/
|
|
1402
|
-
AMMUpdated: (callback: (event: { AMM: `0x${string}`; isAMM: boolean }) => void, filter?: { AMM: `0x${string}` }) => {
|
|
1403
|
-
return this.publicClient.watchContractEvent({
|
|
1404
|
-
address: this.contractAddress,
|
|
1405
|
-
abi: USD_Tehter_jsonAbi,
|
|
1406
|
-
eventName: 'AMMUpdated',
|
|
1407
|
-
args: filter,
|
|
1408
|
-
onLogs: (logs: any[]) => {
|
|
1409
|
-
logs.forEach((log: any) => {
|
|
1410
|
-
callback(log.args as any);
|
|
1411
|
-
});
|
|
1412
|
-
},
|
|
1413
|
-
}) as () => void;
|
|
1414
|
-
},
|
|
1415
884
|
/**
|
|
1416
885
|
* Watch Approval events
|
|
1417
886
|
* @param callback Function to call when event is emitted
|
|
@@ -1421,7 +890,7 @@ export class USD_Tehter_json {
|
|
|
1421
890
|
Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
|
|
1422
891
|
return this.publicClient.watchContractEvent({
|
|
1423
892
|
address: this.contractAddress,
|
|
1424
|
-
abi:
|
|
893
|
+
abi: StandardToken_jsonAbi,
|
|
1425
894
|
eventName: 'Approval',
|
|
1426
895
|
args: filter,
|
|
1427
896
|
onLogs: (logs: any[]) => {
|
|
@@ -1432,55 +901,17 @@ export class USD_Tehter_json {
|
|
|
1432
901
|
}) as () => void;
|
|
1433
902
|
},
|
|
1434
903
|
/**
|
|
1435
|
-
* Watch
|
|
1436
|
-
* @param callback Function to call when event is emitted
|
|
1437
|
-
* @param filter Optional filter for indexed parameters
|
|
1438
|
-
* @returns Unwatch function to stop listening
|
|
1439
|
-
*/
|
|
1440
|
-
OwnershipTransferStarted: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
|
|
1441
|
-
return this.publicClient.watchContractEvent({
|
|
1442
|
-
address: this.contractAddress,
|
|
1443
|
-
abi: USD_Tehter_jsonAbi,
|
|
1444
|
-
eventName: 'OwnershipTransferStarted',
|
|
1445
|
-
args: filter,
|
|
1446
|
-
onLogs: (logs: any[]) => {
|
|
1447
|
-
logs.forEach((log: any) => {
|
|
1448
|
-
callback(log.args as any);
|
|
1449
|
-
});
|
|
1450
|
-
},
|
|
1451
|
-
}) as () => void;
|
|
1452
|
-
},
|
|
1453
|
-
/**
|
|
1454
|
-
* Watch OwnershipTransferred events
|
|
904
|
+
* Watch Initialized events
|
|
1455
905
|
* @param callback Function to call when event is emitted
|
|
1456
906
|
* @param filter Optional filter for indexed parameters
|
|
1457
907
|
* @returns Unwatch function to stop listening
|
|
1458
908
|
*/
|
|
1459
|
-
|
|
909
|
+
Initialized: (callback: (event: { version: bigint }) => void) => {
|
|
1460
910
|
return this.publicClient.watchContractEvent({
|
|
1461
911
|
address: this.contractAddress,
|
|
1462
|
-
abi:
|
|
1463
|
-
eventName: '
|
|
1464
|
-
|
|
1465
|
-
onLogs: (logs: any[]) => {
|
|
1466
|
-
logs.forEach((log: any) => {
|
|
1467
|
-
callback(log.args as any);
|
|
1468
|
-
});
|
|
1469
|
-
},
|
|
1470
|
-
}) as () => void;
|
|
1471
|
-
},
|
|
1472
|
-
/**
|
|
1473
|
-
* Watch RouterV2Updated events
|
|
1474
|
-
* @param callback Function to call when event is emitted
|
|
1475
|
-
* @param filter Optional filter for indexed parameters
|
|
1476
|
-
* @returns Unwatch function to stop listening
|
|
1477
|
-
*/
|
|
1478
|
-
RouterV2Updated: (callback: (event: { routerV2: `0x${string}` }) => void, filter?: { routerV2: `0x${string}` }) => {
|
|
1479
|
-
return this.publicClient.watchContractEvent({
|
|
1480
|
-
address: this.contractAddress,
|
|
1481
|
-
abi: USD_Tehter_jsonAbi,
|
|
1482
|
-
eventName: 'RouterV2Updated',
|
|
1483
|
-
args: filter,
|
|
912
|
+
abi: StandardToken_jsonAbi,
|
|
913
|
+
eventName: 'Initialized',
|
|
914
|
+
|
|
1484
915
|
onLogs: (logs: any[]) => {
|
|
1485
916
|
logs.forEach((log: any) => {
|
|
1486
917
|
callback(log.args as any);
|
|
@@ -1497,7 +928,7 @@ export class USD_Tehter_json {
|
|
|
1497
928
|
Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
|
|
1498
929
|
return this.publicClient.watchContractEvent({
|
|
1499
930
|
address: this.contractAddress,
|
|
1500
|
-
abi:
|
|
931
|
+
abi: StandardToken_jsonAbi,
|
|
1501
932
|
eventName: 'Transfer',
|
|
1502
933
|
args: filter,
|
|
1503
934
|
onLogs: (logs: any[]) => {
|