@gitmyabi/usdt 1.0.4 → 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/{USDToken_json.d.ts → TokenImplementation_json.d.ts} +315 -164
- package/contracts/{USDToken_json.js → TokenImplementation_json.js} +354 -227
- package/contracts/{USDToken_json.ts → TokenImplementation_json.ts} +406 -233
- package/contracts/index.d.ts +4 -2
- package/contracts/index.js +7 -4
- package/contracts/index.ts +4 -2
- package/package.json +3 -3
|
@@ -2,16 +2,11 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
|
|
|
2
2
|
import { getContract } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* TokenImplementation_json ABI
|
|
6
6
|
*
|
|
7
7
|
* This ABI is typed using viem's type system for full type safety.
|
|
8
8
|
*/
|
|
9
|
-
export const
|
|
10
|
-
{
|
|
11
|
-
"inputs": [],
|
|
12
|
-
"stateMutability": "nonpayable",
|
|
13
|
-
"type": "constructor"
|
|
14
|
-
},
|
|
9
|
+
export const TokenImplementation_jsonAbi = [
|
|
15
10
|
{
|
|
16
11
|
"anonymous": false,
|
|
17
12
|
"inputs": [
|
|
@@ -37,45 +32,6 @@ export const USDToken_jsonAbi = [
|
|
|
37
32
|
"name": "Approval",
|
|
38
33
|
"type": "event"
|
|
39
34
|
},
|
|
40
|
-
{
|
|
41
|
-
"anonymous": false,
|
|
42
|
-
"inputs": [
|
|
43
|
-
{
|
|
44
|
-
"indexed": false,
|
|
45
|
-
"internalType": "string",
|
|
46
|
-
"name": "newName",
|
|
47
|
-
"type": "string"
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
"name": "NameChanged",
|
|
51
|
-
"type": "event"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"anonymous": false,
|
|
55
|
-
"inputs": [
|
|
56
|
-
{
|
|
57
|
-
"indexed": true,
|
|
58
|
-
"internalType": "address",
|
|
59
|
-
"name": "previousOwner",
|
|
60
|
-
"type": "address"
|
|
61
|
-
}
|
|
62
|
-
],
|
|
63
|
-
"name": "OwnershipRenounced",
|
|
64
|
-
"type": "event"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"anonymous": false,
|
|
68
|
-
"inputs": [
|
|
69
|
-
{
|
|
70
|
-
"indexed": false,
|
|
71
|
-
"internalType": "string",
|
|
72
|
-
"name": "newSymbol",
|
|
73
|
-
"type": "string"
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
"name": "SymbolChanged",
|
|
77
|
-
"type": "event"
|
|
78
|
-
},
|
|
79
35
|
{
|
|
80
36
|
"anonymous": false,
|
|
81
37
|
"inputs": [
|
|
@@ -101,16 +57,29 @@ export const USDToken_jsonAbi = [
|
|
|
101
57
|
"name": "Transfer",
|
|
102
58
|
"type": "event"
|
|
103
59
|
},
|
|
60
|
+
{
|
|
61
|
+
"inputs": [],
|
|
62
|
+
"name": "DOMAIN_SEPARATOR",
|
|
63
|
+
"outputs": [
|
|
64
|
+
{
|
|
65
|
+
"internalType": "bytes32",
|
|
66
|
+
"name": "",
|
|
67
|
+
"type": "bytes32"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"stateMutability": "view",
|
|
71
|
+
"type": "function"
|
|
72
|
+
},
|
|
104
73
|
{
|
|
105
74
|
"inputs": [
|
|
106
75
|
{
|
|
107
76
|
"internalType": "address",
|
|
108
|
-
"name": "",
|
|
77
|
+
"name": "owner_",
|
|
109
78
|
"type": "address"
|
|
110
79
|
},
|
|
111
80
|
{
|
|
112
81
|
"internalType": "address",
|
|
113
|
-
"name": "",
|
|
82
|
+
"name": "spender_",
|
|
114
83
|
"type": "address"
|
|
115
84
|
}
|
|
116
85
|
],
|
|
@@ -129,12 +98,12 @@ export const USDToken_jsonAbi = [
|
|
|
129
98
|
"inputs": [
|
|
130
99
|
{
|
|
131
100
|
"internalType": "address",
|
|
132
|
-
"name": "
|
|
101
|
+
"name": "spender_",
|
|
133
102
|
"type": "address"
|
|
134
103
|
},
|
|
135
104
|
{
|
|
136
105
|
"internalType": "uint256",
|
|
137
|
-
"name": "
|
|
106
|
+
"name": "amount_",
|
|
138
107
|
"type": "uint256"
|
|
139
108
|
}
|
|
140
109
|
],
|
|
@@ -153,7 +122,7 @@ export const USDToken_jsonAbi = [
|
|
|
153
122
|
"inputs": [
|
|
154
123
|
{
|
|
155
124
|
"internalType": "address",
|
|
156
|
-
"name": "",
|
|
125
|
+
"name": "account_",
|
|
157
126
|
"type": "address"
|
|
158
127
|
}
|
|
159
128
|
],
|
|
@@ -168,6 +137,37 @@ export const USDToken_jsonAbi = [
|
|
|
168
137
|
"stateMutability": "view",
|
|
169
138
|
"type": "function"
|
|
170
139
|
},
|
|
140
|
+
{
|
|
141
|
+
"inputs": [
|
|
142
|
+
{
|
|
143
|
+
"internalType": "address",
|
|
144
|
+
"name": "account_",
|
|
145
|
+
"type": "address"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"internalType": "uint256",
|
|
149
|
+
"name": "amount_",
|
|
150
|
+
"type": "uint256"
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"name": "burn",
|
|
154
|
+
"outputs": [],
|
|
155
|
+
"stateMutability": "nonpayable",
|
|
156
|
+
"type": "function"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"inputs": [],
|
|
160
|
+
"name": "chainId",
|
|
161
|
+
"outputs": [
|
|
162
|
+
{
|
|
163
|
+
"internalType": "uint16",
|
|
164
|
+
"name": "",
|
|
165
|
+
"type": "uint16"
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"stateMutability": "view",
|
|
169
|
+
"type": "function"
|
|
170
|
+
},
|
|
171
171
|
{
|
|
172
172
|
"inputs": [],
|
|
173
173
|
"name": "decimals",
|
|
@@ -185,12 +185,12 @@ export const USDToken_jsonAbi = [
|
|
|
185
185
|
"inputs": [
|
|
186
186
|
{
|
|
187
187
|
"internalType": "address",
|
|
188
|
-
"name": "
|
|
188
|
+
"name": "spender_",
|
|
189
189
|
"type": "address"
|
|
190
190
|
},
|
|
191
191
|
{
|
|
192
192
|
"internalType": "uint256",
|
|
193
|
-
"name": "
|
|
193
|
+
"name": "subtractedValue_",
|
|
194
194
|
"type": "uint256"
|
|
195
195
|
}
|
|
196
196
|
],
|
|
@@ -205,16 +205,59 @@ export const USDToken_jsonAbi = [
|
|
|
205
205
|
"stateMutability": "nonpayable",
|
|
206
206
|
"type": "function"
|
|
207
207
|
},
|
|
208
|
+
{
|
|
209
|
+
"inputs": [],
|
|
210
|
+
"name": "eip712Domain",
|
|
211
|
+
"outputs": [
|
|
212
|
+
{
|
|
213
|
+
"internalType": "bytes1",
|
|
214
|
+
"name": "domainFields",
|
|
215
|
+
"type": "bytes1"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"internalType": "string",
|
|
219
|
+
"name": "domainName",
|
|
220
|
+
"type": "string"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"internalType": "string",
|
|
224
|
+
"name": "domainVersion",
|
|
225
|
+
"type": "string"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"internalType": "uint256",
|
|
229
|
+
"name": "domainChainId",
|
|
230
|
+
"type": "uint256"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"internalType": "address",
|
|
234
|
+
"name": "domainVerifyingContract",
|
|
235
|
+
"type": "address"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"internalType": "bytes32",
|
|
239
|
+
"name": "domainSalt",
|
|
240
|
+
"type": "bytes32"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"internalType": "uint256[]",
|
|
244
|
+
"name": "domainExtensions",
|
|
245
|
+
"type": "uint256[]"
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
"stateMutability": "view",
|
|
249
|
+
"type": "function"
|
|
250
|
+
},
|
|
208
251
|
{
|
|
209
252
|
"inputs": [
|
|
210
253
|
{
|
|
211
254
|
"internalType": "address",
|
|
212
|
-
"name": "
|
|
255
|
+
"name": "spender_",
|
|
213
256
|
"type": "address"
|
|
214
257
|
},
|
|
215
258
|
{
|
|
216
259
|
"internalType": "uint256",
|
|
217
|
-
"name": "
|
|
260
|
+
"name": "addedValue_",
|
|
218
261
|
"type": "uint256"
|
|
219
262
|
}
|
|
220
263
|
],
|
|
@@ -230,16 +273,64 @@ export const USDToken_jsonAbi = [
|
|
|
230
273
|
"type": "function"
|
|
231
274
|
},
|
|
232
275
|
{
|
|
233
|
-
"inputs": [
|
|
234
|
-
"name": "isRenounced",
|
|
235
|
-
"outputs": [
|
|
276
|
+
"inputs": [
|
|
236
277
|
{
|
|
237
|
-
"internalType": "
|
|
238
|
-
"name": "",
|
|
239
|
-
"type": "
|
|
278
|
+
"internalType": "string",
|
|
279
|
+
"name": "name_",
|
|
280
|
+
"type": "string"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"internalType": "string",
|
|
284
|
+
"name": "symbol_",
|
|
285
|
+
"type": "string"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"internalType": "uint8",
|
|
289
|
+
"name": "decimals_",
|
|
290
|
+
"type": "uint8"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"internalType": "uint64",
|
|
294
|
+
"name": "sequence_",
|
|
295
|
+
"type": "uint64"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"internalType": "address",
|
|
299
|
+
"name": "owner_",
|
|
300
|
+
"type": "address"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"internalType": "uint16",
|
|
304
|
+
"name": "chainId_",
|
|
305
|
+
"type": "uint16"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"internalType": "bytes32",
|
|
309
|
+
"name": "nativeContract_",
|
|
310
|
+
"type": "bytes32"
|
|
240
311
|
}
|
|
241
312
|
],
|
|
242
|
-
"
|
|
313
|
+
"name": "initialize",
|
|
314
|
+
"outputs": [],
|
|
315
|
+
"stateMutability": "nonpayable",
|
|
316
|
+
"type": "function"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"inputs": [
|
|
320
|
+
{
|
|
321
|
+
"internalType": "address",
|
|
322
|
+
"name": "account_",
|
|
323
|
+
"type": "address"
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"internalType": "uint256",
|
|
327
|
+
"name": "amount_",
|
|
328
|
+
"type": "uint256"
|
|
329
|
+
}
|
|
330
|
+
],
|
|
331
|
+
"name": "mint",
|
|
332
|
+
"outputs": [],
|
|
333
|
+
"stateMutability": "nonpayable",
|
|
243
334
|
"type": "function"
|
|
244
335
|
},
|
|
245
336
|
{
|
|
@@ -257,59 +348,88 @@ export const USDToken_jsonAbi = [
|
|
|
257
348
|
},
|
|
258
349
|
{
|
|
259
350
|
"inputs": [],
|
|
260
|
-
"name": "
|
|
351
|
+
"name": "nativeContract",
|
|
261
352
|
"outputs": [
|
|
262
353
|
{
|
|
263
|
-
"internalType": "
|
|
354
|
+
"internalType": "bytes32",
|
|
264
355
|
"name": "",
|
|
265
|
-
"type": "
|
|
356
|
+
"type": "bytes32"
|
|
266
357
|
}
|
|
267
358
|
],
|
|
268
359
|
"stateMutability": "view",
|
|
269
360
|
"type": "function"
|
|
270
361
|
},
|
|
271
362
|
{
|
|
272
|
-
"inputs": [
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
"
|
|
280
|
-
"name": "renounced",
|
|
363
|
+
"inputs": [
|
|
364
|
+
{
|
|
365
|
+
"internalType": "address",
|
|
366
|
+
"name": "owner_",
|
|
367
|
+
"type": "address"
|
|
368
|
+
}
|
|
369
|
+
],
|
|
370
|
+
"name": "nonces",
|
|
281
371
|
"outputs": [
|
|
282
372
|
{
|
|
283
|
-
"internalType": "
|
|
373
|
+
"internalType": "uint256",
|
|
284
374
|
"name": "",
|
|
285
|
-
"type": "
|
|
375
|
+
"type": "uint256"
|
|
286
376
|
}
|
|
287
377
|
],
|
|
288
378
|
"stateMutability": "view",
|
|
289
379
|
"type": "function"
|
|
290
380
|
},
|
|
291
381
|
{
|
|
292
|
-
"inputs": [
|
|
382
|
+
"inputs": [],
|
|
383
|
+
"name": "owner",
|
|
384
|
+
"outputs": [
|
|
293
385
|
{
|
|
294
|
-
"internalType": "
|
|
295
|
-
"name": "
|
|
296
|
-
"type": "
|
|
386
|
+
"internalType": "address",
|
|
387
|
+
"name": "",
|
|
388
|
+
"type": "address"
|
|
297
389
|
}
|
|
298
390
|
],
|
|
299
|
-
"
|
|
300
|
-
"outputs": [],
|
|
301
|
-
"stateMutability": "nonpayable",
|
|
391
|
+
"stateMutability": "view",
|
|
302
392
|
"type": "function"
|
|
303
393
|
},
|
|
304
394
|
{
|
|
305
395
|
"inputs": [
|
|
306
396
|
{
|
|
307
|
-
"internalType": "
|
|
308
|
-
"name": "
|
|
309
|
-
"type": "
|
|
397
|
+
"internalType": "address",
|
|
398
|
+
"name": "owner_",
|
|
399
|
+
"type": "address"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"internalType": "address",
|
|
403
|
+
"name": "spender_",
|
|
404
|
+
"type": "address"
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"internalType": "uint256",
|
|
408
|
+
"name": "value_",
|
|
409
|
+
"type": "uint256"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"internalType": "uint256",
|
|
413
|
+
"name": "deadline_",
|
|
414
|
+
"type": "uint256"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"internalType": "uint8",
|
|
418
|
+
"name": "v_",
|
|
419
|
+
"type": "uint8"
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"internalType": "bytes32",
|
|
423
|
+
"name": "r_",
|
|
424
|
+
"type": "bytes32"
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"internalType": "bytes32",
|
|
428
|
+
"name": "s_",
|
|
429
|
+
"type": "bytes32"
|
|
310
430
|
}
|
|
311
431
|
],
|
|
312
|
-
"name": "
|
|
432
|
+
"name": "permit",
|
|
313
433
|
"outputs": [],
|
|
314
434
|
"stateMutability": "nonpayable",
|
|
315
435
|
"type": "function"
|
|
@@ -327,19 +447,6 @@ export const USDToken_jsonAbi = [
|
|
|
327
447
|
"stateMutability": "view",
|
|
328
448
|
"type": "function"
|
|
329
449
|
},
|
|
330
|
-
{
|
|
331
|
-
"inputs": [],
|
|
332
|
-
"name": "tokenImage",
|
|
333
|
-
"outputs": [
|
|
334
|
-
{
|
|
335
|
-
"internalType": "string",
|
|
336
|
-
"name": "",
|
|
337
|
-
"type": "string"
|
|
338
|
-
}
|
|
339
|
-
],
|
|
340
|
-
"stateMutability": "pure",
|
|
341
|
-
"type": "function"
|
|
342
|
-
},
|
|
343
450
|
{
|
|
344
451
|
"inputs": [],
|
|
345
452
|
"name": "totalSupply",
|
|
@@ -357,12 +464,12 @@ export const USDToken_jsonAbi = [
|
|
|
357
464
|
"inputs": [
|
|
358
465
|
{
|
|
359
466
|
"internalType": "address",
|
|
360
|
-
"name": "
|
|
467
|
+
"name": "recipient_",
|
|
361
468
|
"type": "address"
|
|
362
469
|
},
|
|
363
470
|
{
|
|
364
471
|
"internalType": "uint256",
|
|
365
|
-
"name": "
|
|
472
|
+
"name": "amount_",
|
|
366
473
|
"type": "uint256"
|
|
367
474
|
}
|
|
368
475
|
],
|
|
@@ -381,17 +488,17 @@ export const USDToken_jsonAbi = [
|
|
|
381
488
|
"inputs": [
|
|
382
489
|
{
|
|
383
490
|
"internalType": "address",
|
|
384
|
-
"name": "
|
|
491
|
+
"name": "sender_",
|
|
385
492
|
"type": "address"
|
|
386
493
|
},
|
|
387
494
|
{
|
|
388
495
|
"internalType": "address",
|
|
389
|
-
"name": "
|
|
496
|
+
"name": "recipient_",
|
|
390
497
|
"type": "address"
|
|
391
498
|
},
|
|
392
499
|
{
|
|
393
500
|
"internalType": "uint256",
|
|
394
|
-
"name": "
|
|
501
|
+
"name": "amount_",
|
|
395
502
|
"type": "uint256"
|
|
396
503
|
}
|
|
397
504
|
],
|
|
@@ -405,23 +512,46 @@ export const USDToken_jsonAbi = [
|
|
|
405
512
|
],
|
|
406
513
|
"stateMutability": "nonpayable",
|
|
407
514
|
"type": "function"
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"inputs": [
|
|
518
|
+
{
|
|
519
|
+
"internalType": "string",
|
|
520
|
+
"name": "name_",
|
|
521
|
+
"type": "string"
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"internalType": "string",
|
|
525
|
+
"name": "symbol_",
|
|
526
|
+
"type": "string"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"internalType": "uint64",
|
|
530
|
+
"name": "sequence_",
|
|
531
|
+
"type": "uint64"
|
|
532
|
+
}
|
|
533
|
+
],
|
|
534
|
+
"name": "updateDetails",
|
|
535
|
+
"outputs": [],
|
|
536
|
+
"stateMutability": "nonpayable",
|
|
537
|
+
"type": "function"
|
|
408
538
|
}
|
|
409
539
|
] as const satisfies Abi;
|
|
410
540
|
|
|
411
541
|
/**
|
|
412
|
-
* Type-safe ABI for
|
|
542
|
+
* Type-safe ABI for TokenImplementation_json
|
|
413
543
|
*/
|
|
414
|
-
export type
|
|
544
|
+
export type TokenImplementation_jsonAbi = typeof TokenImplementation_jsonAbi;
|
|
415
545
|
|
|
416
546
|
/**
|
|
417
|
-
* Contract instance type for
|
|
547
|
+
* Contract instance type for TokenImplementation_json
|
|
418
548
|
*/
|
|
419
549
|
// Use any for contract type to avoid complex viem type issues
|
|
420
550
|
// The runtime behavior is type-safe through viem's ABI typing
|
|
421
|
-
export type
|
|
551
|
+
export type TokenImplementation_jsonContract = any;
|
|
422
552
|
|
|
423
553
|
/**
|
|
424
|
-
*
|
|
554
|
+
* TokenImplementation_json Contract Class
|
|
425
555
|
*
|
|
426
556
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
427
557
|
*
|
|
@@ -429,12 +559,12 @@ export type USDToken_jsonContract = any;
|
|
|
429
559
|
* ```typescript
|
|
430
560
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
431
561
|
* import { mainnet } from 'viem/chains';
|
|
432
|
-
* import {
|
|
562
|
+
* import { TokenImplementation_json } from 'TokenImplementation_json';
|
|
433
563
|
*
|
|
434
564
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
435
565
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
436
566
|
*
|
|
437
|
-
* const contract = new
|
|
567
|
+
* const contract = new TokenImplementation_json('0x...', { publicClient, walletClient });
|
|
438
568
|
*
|
|
439
569
|
* // Read functions
|
|
440
570
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -452,8 +582,8 @@ export type USDToken_jsonContract = any;
|
|
|
452
582
|
* });
|
|
453
583
|
* ```
|
|
454
584
|
*/
|
|
455
|
-
export class
|
|
456
|
-
private contract:
|
|
585
|
+
export class TokenImplementation_json {
|
|
586
|
+
private contract: TokenImplementation_jsonContract;
|
|
457
587
|
private contractAddress: Address;
|
|
458
588
|
private publicClient: PublicClient;
|
|
459
589
|
|
|
@@ -468,7 +598,7 @@ export class USDToken_json {
|
|
|
468
598
|
this.publicClient = clients.publicClient;
|
|
469
599
|
this.contract = getContract({
|
|
470
600
|
address,
|
|
471
|
-
abi:
|
|
601
|
+
abi: TokenImplementation_jsonAbi,
|
|
472
602
|
client: {
|
|
473
603
|
public: clients.publicClient,
|
|
474
604
|
wallet: clients.walletClient,
|
|
@@ -486,24 +616,40 @@ export class USDToken_json {
|
|
|
486
616
|
/**
|
|
487
617
|
* Get the underlying viem contract instance
|
|
488
618
|
*/
|
|
489
|
-
getContract():
|
|
619
|
+
getContract(): TokenImplementation_jsonContract {
|
|
490
620
|
return this.contract;
|
|
491
621
|
}
|
|
492
622
|
|
|
623
|
+
/**
|
|
624
|
+
* DOMAIN_SEPARATOR
|
|
625
|
+
* view
|
|
626
|
+
*/
|
|
627
|
+
async DOMAIN_SEPARATOR(): Promise<`0x${string}`> {
|
|
628
|
+
return this.contract.read.DOMAIN_SEPARATOR() as Promise<`0x${string}`>;
|
|
629
|
+
}
|
|
630
|
+
|
|
493
631
|
/**
|
|
494
632
|
* allowance
|
|
495
633
|
* view
|
|
496
634
|
*/
|
|
497
|
-
async allowance(
|
|
498
|
-
return this.contract.read.allowance([
|
|
635
|
+
async allowance(owner_: `0x${string}`, spender_: `0x${string}`): Promise<bigint> {
|
|
636
|
+
return this.contract.read.allowance([owner_, spender_] as const) as Promise<bigint>;
|
|
499
637
|
}
|
|
500
638
|
|
|
501
639
|
/**
|
|
502
640
|
* balanceOf
|
|
503
641
|
* view
|
|
504
642
|
*/
|
|
505
|
-
async balanceOf(
|
|
506
|
-
return this.contract.read.balanceOf([
|
|
643
|
+
async balanceOf(account_: `0x${string}`): Promise<bigint> {
|
|
644
|
+
return this.contract.read.balanceOf([account_] as const) as Promise<bigint>;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* chainId
|
|
649
|
+
* view
|
|
650
|
+
*/
|
|
651
|
+
async chainId(): Promise<bigint> {
|
|
652
|
+
return this.contract.read.chainId() as Promise<bigint>;
|
|
507
653
|
}
|
|
508
654
|
|
|
509
655
|
/**
|
|
@@ -515,11 +661,11 @@ export class USDToken_json {
|
|
|
515
661
|
}
|
|
516
662
|
|
|
517
663
|
/**
|
|
518
|
-
*
|
|
664
|
+
* eip712Domain
|
|
519
665
|
* view
|
|
520
666
|
*/
|
|
521
|
-
async
|
|
522
|
-
return this.contract.read.
|
|
667
|
+
async eip712Domain(): Promise<[`0x${string}`, string, string, bigint, `0x${string}`, `0x${string}`, bigint[]]> {
|
|
668
|
+
return this.contract.read.eip712Domain() as Promise<[`0x${string}`, string, string, bigint, `0x${string}`, `0x${string}`, bigint[]]>;
|
|
523
669
|
}
|
|
524
670
|
|
|
525
671
|
/**
|
|
@@ -531,35 +677,35 @@ export class USDToken_json {
|
|
|
531
677
|
}
|
|
532
678
|
|
|
533
679
|
/**
|
|
534
|
-
*
|
|
680
|
+
* nativeContract
|
|
535
681
|
* view
|
|
536
682
|
*/
|
|
537
|
-
async
|
|
538
|
-
return this.contract.read.
|
|
683
|
+
async nativeContract(): Promise<`0x${string}`> {
|
|
684
|
+
return this.contract.read.nativeContract() as Promise<`0x${string}`>;
|
|
539
685
|
}
|
|
540
686
|
|
|
541
687
|
/**
|
|
542
|
-
*
|
|
688
|
+
* nonces
|
|
543
689
|
* view
|
|
544
690
|
*/
|
|
545
|
-
async
|
|
546
|
-
return this.contract.read.
|
|
691
|
+
async nonces(owner_: `0x${string}`): Promise<bigint> {
|
|
692
|
+
return this.contract.read.nonces([owner_] as const) as Promise<bigint>;
|
|
547
693
|
}
|
|
548
694
|
|
|
549
695
|
/**
|
|
550
|
-
*
|
|
696
|
+
* owner
|
|
551
697
|
* view
|
|
552
698
|
*/
|
|
553
|
-
async
|
|
554
|
-
return this.contract.read.
|
|
699
|
+
async owner(): Promise<`0x${string}`> {
|
|
700
|
+
return this.contract.read.owner() as Promise<`0x${string}`>;
|
|
555
701
|
}
|
|
556
702
|
|
|
557
703
|
/**
|
|
558
|
-
*
|
|
559
|
-
*
|
|
704
|
+
* symbol
|
|
705
|
+
* view
|
|
560
706
|
*/
|
|
561
|
-
async
|
|
562
|
-
return this.contract.read.
|
|
707
|
+
async symbol(): Promise<string> {
|
|
708
|
+
return this.contract.read.symbol() as Promise<string>;
|
|
563
709
|
}
|
|
564
710
|
|
|
565
711
|
/**
|
|
@@ -575,7 +721,7 @@ export class USDToken_json {
|
|
|
575
721
|
* nonpayable
|
|
576
722
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
577
723
|
*/
|
|
578
|
-
async approve(
|
|
724
|
+
async approve(spender_: `0x${string}`, amount_: bigint, options?: {
|
|
579
725
|
accessList?: import('viem').AccessList;
|
|
580
726
|
authorizationList?: import('viem').AuthorizationList;
|
|
581
727
|
chain?: import('viem').Chain | null;
|
|
@@ -590,7 +736,30 @@ export class USDToken_json {
|
|
|
590
736
|
if (!this.contract.write) {
|
|
591
737
|
throw new Error('Wallet client is required for write operations');
|
|
592
738
|
}
|
|
593
|
-
return this.contract.write.approve([
|
|
739
|
+
return this.contract.write.approve([spender_, amount_] as const, options) as Promise<`0x${string}`>;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
/**
|
|
743
|
+
* burn
|
|
744
|
+
* nonpayable
|
|
745
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
746
|
+
*/
|
|
747
|
+
async burn(account_: `0x${string}`, amount_: bigint, options?: {
|
|
748
|
+
accessList?: import('viem').AccessList;
|
|
749
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
750
|
+
chain?: import('viem').Chain | null;
|
|
751
|
+
dataSuffix?: `0x${string}`;
|
|
752
|
+
gas?: bigint;
|
|
753
|
+
gasPrice?: bigint;
|
|
754
|
+
maxFeePerGas?: bigint;
|
|
755
|
+
maxPriorityFeePerGas?: bigint;
|
|
756
|
+
nonce?: number;
|
|
757
|
+
value?: bigint;
|
|
758
|
+
}): Promise<`0x${string}`> {
|
|
759
|
+
if (!this.contract.write) {
|
|
760
|
+
throw new Error('Wallet client is required for write operations');
|
|
761
|
+
}
|
|
762
|
+
return this.contract.write.burn([account_, amount_] as const, options) as Promise<`0x${string}`>;
|
|
594
763
|
}
|
|
595
764
|
|
|
596
765
|
/**
|
|
@@ -598,7 +767,7 @@ export class USDToken_json {
|
|
|
598
767
|
* nonpayable
|
|
599
768
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
600
769
|
*/
|
|
601
|
-
async decreaseAllowance(
|
|
770
|
+
async decreaseAllowance(spender_: `0x${string}`, subtractedValue_: bigint, options?: {
|
|
602
771
|
accessList?: import('viem').AccessList;
|
|
603
772
|
authorizationList?: import('viem').AuthorizationList;
|
|
604
773
|
chain?: import('viem').Chain | null;
|
|
@@ -613,7 +782,7 @@ export class USDToken_json {
|
|
|
613
782
|
if (!this.contract.write) {
|
|
614
783
|
throw new Error('Wallet client is required for write operations');
|
|
615
784
|
}
|
|
616
|
-
return this.contract.write.decreaseAllowance([
|
|
785
|
+
return this.contract.write.decreaseAllowance([spender_, subtractedValue_] as const, options) as Promise<`0x${string}`>;
|
|
617
786
|
}
|
|
618
787
|
|
|
619
788
|
/**
|
|
@@ -621,7 +790,7 @@ export class USDToken_json {
|
|
|
621
790
|
* nonpayable
|
|
622
791
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
623
792
|
*/
|
|
624
|
-
async increaseAllowance(
|
|
793
|
+
async increaseAllowance(spender_: `0x${string}`, addedValue_: bigint, options?: {
|
|
625
794
|
accessList?: import('viem').AccessList;
|
|
626
795
|
authorizationList?: import('viem').AuthorizationList;
|
|
627
796
|
chain?: import('viem').Chain | null;
|
|
@@ -636,15 +805,15 @@ export class USDToken_json {
|
|
|
636
805
|
if (!this.contract.write) {
|
|
637
806
|
throw new Error('Wallet client is required for write operations');
|
|
638
807
|
}
|
|
639
|
-
return this.contract.write.increaseAllowance([
|
|
808
|
+
return this.contract.write.increaseAllowance([spender_, addedValue_] as const, options) as Promise<`0x${string}`>;
|
|
640
809
|
}
|
|
641
810
|
|
|
642
811
|
/**
|
|
643
|
-
*
|
|
812
|
+
* initialize
|
|
644
813
|
* nonpayable
|
|
645
814
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
646
815
|
*/
|
|
647
|
-
async
|
|
816
|
+
async initialize(name_: string, symbol_: string, decimals_: bigint, sequence_: bigint, owner_: `0x${string}`, chainId_: bigint, nativeContract_: `0x${string}`, options?: {
|
|
648
817
|
accessList?: import('viem').AccessList;
|
|
649
818
|
authorizationList?: import('viem').AuthorizationList;
|
|
650
819
|
chain?: import('viem').Chain | null;
|
|
@@ -659,15 +828,15 @@ export class USDToken_json {
|
|
|
659
828
|
if (!this.contract.write) {
|
|
660
829
|
throw new Error('Wallet client is required for write operations');
|
|
661
830
|
}
|
|
662
|
-
return this.contract.write.
|
|
831
|
+
return this.contract.write.initialize([name_, symbol_, decimals_, sequence_, owner_, chainId_, nativeContract_] as const, options) as Promise<`0x${string}`>;
|
|
663
832
|
}
|
|
664
833
|
|
|
665
834
|
/**
|
|
666
|
-
*
|
|
835
|
+
* mint
|
|
667
836
|
* nonpayable
|
|
668
837
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
669
838
|
*/
|
|
670
|
-
async
|
|
839
|
+
async mint(account_: `0x${string}`, amount_: bigint, options?: {
|
|
671
840
|
accessList?: import('viem').AccessList;
|
|
672
841
|
authorizationList?: import('viem').AuthorizationList;
|
|
673
842
|
chain?: import('viem').Chain | null;
|
|
@@ -682,15 +851,15 @@ export class USDToken_json {
|
|
|
682
851
|
if (!this.contract.write) {
|
|
683
852
|
throw new Error('Wallet client is required for write operations');
|
|
684
853
|
}
|
|
685
|
-
return this.contract.write.
|
|
854
|
+
return this.contract.write.mint([account_, amount_] as const, options) as Promise<`0x${string}`>;
|
|
686
855
|
}
|
|
687
856
|
|
|
688
857
|
/**
|
|
689
|
-
*
|
|
858
|
+
* permit
|
|
690
859
|
* nonpayable
|
|
691
860
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
692
861
|
*/
|
|
693
|
-
async
|
|
862
|
+
async permit(owner_: `0x${string}`, spender_: `0x${string}`, value_: bigint, deadline_: bigint, v_: bigint, r_: `0x${string}`, s_: `0x${string}`, options?: {
|
|
694
863
|
accessList?: import('viem').AccessList;
|
|
695
864
|
authorizationList?: import('viem').AuthorizationList;
|
|
696
865
|
chain?: import('viem').Chain | null;
|
|
@@ -705,7 +874,7 @@ export class USDToken_json {
|
|
|
705
874
|
if (!this.contract.write) {
|
|
706
875
|
throw new Error('Wallet client is required for write operations');
|
|
707
876
|
}
|
|
708
|
-
return this.contract.write.
|
|
877
|
+
return this.contract.write.permit([owner_, spender_, value_, deadline_, v_, r_, s_] as const, options) as Promise<`0x${string}`>;
|
|
709
878
|
}
|
|
710
879
|
|
|
711
880
|
/**
|
|
@@ -713,7 +882,7 @@ export class USDToken_json {
|
|
|
713
882
|
* nonpayable
|
|
714
883
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
715
884
|
*/
|
|
716
|
-
async transfer(
|
|
885
|
+
async transfer(recipient_: `0x${string}`, amount_: bigint, options?: {
|
|
717
886
|
accessList?: import('viem').AccessList;
|
|
718
887
|
authorizationList?: import('viem').AuthorizationList;
|
|
719
888
|
chain?: import('viem').Chain | null;
|
|
@@ -728,7 +897,7 @@ export class USDToken_json {
|
|
|
728
897
|
if (!this.contract.write) {
|
|
729
898
|
throw new Error('Wallet client is required for write operations');
|
|
730
899
|
}
|
|
731
|
-
return this.contract.write.transfer([
|
|
900
|
+
return this.contract.write.transfer([recipient_, amount_] as const, options) as Promise<`0x${string}`>;
|
|
732
901
|
}
|
|
733
902
|
|
|
734
903
|
/**
|
|
@@ -736,7 +905,30 @@ export class USDToken_json {
|
|
|
736
905
|
* nonpayable
|
|
737
906
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
738
907
|
*/
|
|
739
|
-
async transferFrom(
|
|
908
|
+
async transferFrom(sender_: `0x${string}`, recipient_: `0x${string}`, amount_: bigint, options?: {
|
|
909
|
+
accessList?: import('viem').AccessList;
|
|
910
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
911
|
+
chain?: import('viem').Chain | null;
|
|
912
|
+
dataSuffix?: `0x${string}`;
|
|
913
|
+
gas?: bigint;
|
|
914
|
+
gasPrice?: bigint;
|
|
915
|
+
maxFeePerGas?: bigint;
|
|
916
|
+
maxPriorityFeePerGas?: bigint;
|
|
917
|
+
nonce?: number;
|
|
918
|
+
value?: bigint;
|
|
919
|
+
}): Promise<`0x${string}`> {
|
|
920
|
+
if (!this.contract.write) {
|
|
921
|
+
throw new Error('Wallet client is required for write operations');
|
|
922
|
+
}
|
|
923
|
+
return this.contract.write.transferFrom([sender_, recipient_, amount_] as const, options) as Promise<`0x${string}`>;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
* updateDetails
|
|
928
|
+
* nonpayable
|
|
929
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
930
|
+
*/
|
|
931
|
+
async updateDetails(name_: string, symbol_: string, sequence_: bigint, options?: {
|
|
740
932
|
accessList?: import('viem').AccessList;
|
|
741
933
|
authorizationList?: import('viem').AuthorizationList;
|
|
742
934
|
chain?: import('viem').Chain | null;
|
|
@@ -751,7 +943,7 @@ export class USDToken_json {
|
|
|
751
943
|
if (!this.contract.write) {
|
|
752
944
|
throw new Error('Wallet client is required for write operations');
|
|
753
945
|
}
|
|
754
|
-
return this.contract.write.
|
|
946
|
+
return this.contract.write.updateDetails([name_, symbol_, sequence_] as const, options) as Promise<`0x${string}`>;
|
|
755
947
|
}
|
|
756
948
|
|
|
757
949
|
|
|
@@ -775,7 +967,7 @@ export class USDToken_json {
|
|
|
775
967
|
* Returns gas estimate and result without sending transaction
|
|
776
968
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
777
969
|
*/
|
|
778
|
-
async approve(
|
|
970
|
+
async approve(spender_: `0x${string}`, amount_: bigint, options?: {
|
|
779
971
|
accessList?: import('viem').AccessList;
|
|
780
972
|
authorizationList?: import('viem').AuthorizationList;
|
|
781
973
|
chain?: import('viem').Chain | null;
|
|
@@ -787,14 +979,33 @@ export class USDToken_json {
|
|
|
787
979
|
nonce?: number;
|
|
788
980
|
value?: bigint;
|
|
789
981
|
}): Promise<boolean> {
|
|
790
|
-
return contract.simulate.approve([
|
|
982
|
+
return contract.simulate.approve([spender_, amount_] as const, options) as Promise<boolean>;
|
|
983
|
+
},
|
|
984
|
+
/**
|
|
985
|
+
* Simulate burn
|
|
986
|
+
* Returns gas estimate and result without sending transaction
|
|
987
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
988
|
+
*/
|
|
989
|
+
async burn(account_: `0x${string}`, amount_: bigint, options?: {
|
|
990
|
+
accessList?: import('viem').AccessList;
|
|
991
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
992
|
+
chain?: import('viem').Chain | null;
|
|
993
|
+
dataSuffix?: `0x${string}`;
|
|
994
|
+
gas?: bigint;
|
|
995
|
+
gasPrice?: bigint;
|
|
996
|
+
maxFeePerGas?: bigint;
|
|
997
|
+
maxPriorityFeePerGas?: bigint;
|
|
998
|
+
nonce?: number;
|
|
999
|
+
value?: bigint;
|
|
1000
|
+
}): Promise<void> {
|
|
1001
|
+
return contract.simulate.burn([account_, amount_] as const, options) as Promise<void>;
|
|
791
1002
|
},
|
|
792
1003
|
/**
|
|
793
1004
|
* Simulate decreaseAllowance
|
|
794
1005
|
* Returns gas estimate and result without sending transaction
|
|
795
1006
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
796
1007
|
*/
|
|
797
|
-
async decreaseAllowance(
|
|
1008
|
+
async decreaseAllowance(spender_: `0x${string}`, subtractedValue_: bigint, options?: {
|
|
798
1009
|
accessList?: import('viem').AccessList;
|
|
799
1010
|
authorizationList?: import('viem').AuthorizationList;
|
|
800
1011
|
chain?: import('viem').Chain | null;
|
|
@@ -806,14 +1017,14 @@ export class USDToken_json {
|
|
|
806
1017
|
nonce?: number;
|
|
807
1018
|
value?: bigint;
|
|
808
1019
|
}): Promise<boolean> {
|
|
809
|
-
return contract.simulate.decreaseAllowance([
|
|
1020
|
+
return contract.simulate.decreaseAllowance([spender_, subtractedValue_] as const, options) as Promise<boolean>;
|
|
810
1021
|
},
|
|
811
1022
|
/**
|
|
812
1023
|
* Simulate increaseAllowance
|
|
813
1024
|
* Returns gas estimate and result without sending transaction
|
|
814
1025
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
815
1026
|
*/
|
|
816
|
-
async increaseAllowance(
|
|
1027
|
+
async increaseAllowance(spender_: `0x${string}`, addedValue_: bigint, options?: {
|
|
817
1028
|
accessList?: import('viem').AccessList;
|
|
818
1029
|
authorizationList?: import('viem').AuthorizationList;
|
|
819
1030
|
chain?: import('viem').Chain | null;
|
|
@@ -825,14 +1036,14 @@ export class USDToken_json {
|
|
|
825
1036
|
nonce?: number;
|
|
826
1037
|
value?: bigint;
|
|
827
1038
|
}): Promise<boolean> {
|
|
828
|
-
return contract.simulate.increaseAllowance([
|
|
1039
|
+
return contract.simulate.increaseAllowance([spender_, addedValue_] as const, options) as Promise<boolean>;
|
|
829
1040
|
},
|
|
830
1041
|
/**
|
|
831
|
-
* Simulate
|
|
1042
|
+
* Simulate initialize
|
|
832
1043
|
* Returns gas estimate and result without sending transaction
|
|
833
1044
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
834
1045
|
*/
|
|
835
|
-
async
|
|
1046
|
+
async initialize(name_: string, symbol_: string, decimals_: bigint, sequence_: bigint, owner_: `0x${string}`, chainId_: bigint, nativeContract_: `0x${string}`, options?: {
|
|
836
1047
|
accessList?: import('viem').AccessList;
|
|
837
1048
|
authorizationList?: import('viem').AuthorizationList;
|
|
838
1049
|
chain?: import('viem').Chain | null;
|
|
@@ -844,14 +1055,14 @@ export class USDToken_json {
|
|
|
844
1055
|
nonce?: number;
|
|
845
1056
|
value?: bigint;
|
|
846
1057
|
}): Promise<void> {
|
|
847
|
-
return contract.simulate.
|
|
1058
|
+
return contract.simulate.initialize([name_, symbol_, decimals_, sequence_, owner_, chainId_, nativeContract_] as const, options) as Promise<void>;
|
|
848
1059
|
},
|
|
849
1060
|
/**
|
|
850
|
-
* Simulate
|
|
1061
|
+
* Simulate mint
|
|
851
1062
|
* Returns gas estimate and result without sending transaction
|
|
852
1063
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
853
1064
|
*/
|
|
854
|
-
async
|
|
1065
|
+
async mint(account_: `0x${string}`, amount_: bigint, options?: {
|
|
855
1066
|
accessList?: import('viem').AccessList;
|
|
856
1067
|
authorizationList?: import('viem').AuthorizationList;
|
|
857
1068
|
chain?: import('viem').Chain | null;
|
|
@@ -863,14 +1074,14 @@ export class USDToken_json {
|
|
|
863
1074
|
nonce?: number;
|
|
864
1075
|
value?: bigint;
|
|
865
1076
|
}): Promise<void> {
|
|
866
|
-
return contract.simulate.
|
|
1077
|
+
return contract.simulate.mint([account_, amount_] as const, options) as Promise<void>;
|
|
867
1078
|
},
|
|
868
1079
|
/**
|
|
869
|
-
* Simulate
|
|
1080
|
+
* Simulate permit
|
|
870
1081
|
* Returns gas estimate and result without sending transaction
|
|
871
1082
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
872
1083
|
*/
|
|
873
|
-
async
|
|
1084
|
+
async permit(owner_: `0x${string}`, spender_: `0x${string}`, value_: bigint, deadline_: bigint, v_: bigint, r_: `0x${string}`, s_: `0x${string}`, options?: {
|
|
874
1085
|
accessList?: import('viem').AccessList;
|
|
875
1086
|
authorizationList?: import('viem').AuthorizationList;
|
|
876
1087
|
chain?: import('viem').Chain | null;
|
|
@@ -882,14 +1093,14 @@ export class USDToken_json {
|
|
|
882
1093
|
nonce?: number;
|
|
883
1094
|
value?: bigint;
|
|
884
1095
|
}): Promise<void> {
|
|
885
|
-
return contract.simulate.
|
|
1096
|
+
return contract.simulate.permit([owner_, spender_, value_, deadline_, v_, r_, s_] as const, options) as Promise<void>;
|
|
886
1097
|
},
|
|
887
1098
|
/**
|
|
888
1099
|
* Simulate transfer
|
|
889
1100
|
* Returns gas estimate and result without sending transaction
|
|
890
1101
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
891
1102
|
*/
|
|
892
|
-
async transfer(
|
|
1103
|
+
async transfer(recipient_: `0x${string}`, amount_: bigint, options?: {
|
|
893
1104
|
accessList?: import('viem').AccessList;
|
|
894
1105
|
authorizationList?: import('viem').AuthorizationList;
|
|
895
1106
|
chain?: import('viem').Chain | null;
|
|
@@ -901,14 +1112,14 @@ export class USDToken_json {
|
|
|
901
1112
|
nonce?: number;
|
|
902
1113
|
value?: bigint;
|
|
903
1114
|
}): Promise<boolean> {
|
|
904
|
-
return contract.simulate.transfer([
|
|
1115
|
+
return contract.simulate.transfer([recipient_, amount_] as const, options) as Promise<boolean>;
|
|
905
1116
|
},
|
|
906
1117
|
/**
|
|
907
1118
|
* Simulate transferFrom
|
|
908
1119
|
* Returns gas estimate and result without sending transaction
|
|
909
1120
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
910
1121
|
*/
|
|
911
|
-
async transferFrom(
|
|
1122
|
+
async transferFrom(sender_: `0x${string}`, recipient_: `0x${string}`, amount_: bigint, options?: {
|
|
912
1123
|
accessList?: import('viem').AccessList;
|
|
913
1124
|
authorizationList?: import('viem').AuthorizationList;
|
|
914
1125
|
chain?: import('viem').Chain | null;
|
|
@@ -920,7 +1131,26 @@ export class USDToken_json {
|
|
|
920
1131
|
nonce?: number;
|
|
921
1132
|
value?: bigint;
|
|
922
1133
|
}): Promise<boolean> {
|
|
923
|
-
return contract.simulate.transferFrom([
|
|
1134
|
+
return contract.simulate.transferFrom([sender_, recipient_, amount_] as const, options) as Promise<boolean>;
|
|
1135
|
+
},
|
|
1136
|
+
/**
|
|
1137
|
+
* Simulate updateDetails
|
|
1138
|
+
* Returns gas estimate and result without sending transaction
|
|
1139
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1140
|
+
*/
|
|
1141
|
+
async updateDetails(name_: string, symbol_: string, sequence_: bigint, options?: {
|
|
1142
|
+
accessList?: import('viem').AccessList;
|
|
1143
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1144
|
+
chain?: import('viem').Chain | null;
|
|
1145
|
+
dataSuffix?: `0x${string}`;
|
|
1146
|
+
gas?: bigint;
|
|
1147
|
+
gasPrice?: bigint;
|
|
1148
|
+
maxFeePerGas?: bigint;
|
|
1149
|
+
maxPriorityFeePerGas?: bigint;
|
|
1150
|
+
nonce?: number;
|
|
1151
|
+
value?: bigint;
|
|
1152
|
+
}): Promise<void> {
|
|
1153
|
+
return contract.simulate.updateDetails([name_, symbol_, sequence_] as const, options) as Promise<void>;
|
|
924
1154
|
}
|
|
925
1155
|
};
|
|
926
1156
|
}
|
|
@@ -948,7 +1178,7 @@ export class USDToken_json {
|
|
|
948
1178
|
Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
|
|
949
1179
|
return this.publicClient.watchContractEvent({
|
|
950
1180
|
address: this.contractAddress,
|
|
951
|
-
abi:
|
|
1181
|
+
abi: TokenImplementation_jsonAbi,
|
|
952
1182
|
eventName: 'Approval',
|
|
953
1183
|
args: filter,
|
|
954
1184
|
onLogs: (logs: any[]) => {
|
|
@@ -958,63 +1188,6 @@ export class USDToken_json {
|
|
|
958
1188
|
},
|
|
959
1189
|
}) as () => void;
|
|
960
1190
|
},
|
|
961
|
-
/**
|
|
962
|
-
* Watch NameChanged events
|
|
963
|
-
* @param callback Function to call when event is emitted
|
|
964
|
-
* @param filter Optional filter for indexed parameters
|
|
965
|
-
* @returns Unwatch function to stop listening
|
|
966
|
-
*/
|
|
967
|
-
NameChanged: (callback: (event: { newName: string }) => void) => {
|
|
968
|
-
return this.publicClient.watchContractEvent({
|
|
969
|
-
address: this.contractAddress,
|
|
970
|
-
abi: USDToken_jsonAbi,
|
|
971
|
-
eventName: 'NameChanged',
|
|
972
|
-
|
|
973
|
-
onLogs: (logs: any[]) => {
|
|
974
|
-
logs.forEach((log: any) => {
|
|
975
|
-
callback(log.args as any);
|
|
976
|
-
});
|
|
977
|
-
},
|
|
978
|
-
}) as () => void;
|
|
979
|
-
},
|
|
980
|
-
/**
|
|
981
|
-
* Watch OwnershipRenounced events
|
|
982
|
-
* @param callback Function to call when event is emitted
|
|
983
|
-
* @param filter Optional filter for indexed parameters
|
|
984
|
-
* @returns Unwatch function to stop listening
|
|
985
|
-
*/
|
|
986
|
-
OwnershipRenounced: (callback: (event: { previousOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}` }) => {
|
|
987
|
-
return this.publicClient.watchContractEvent({
|
|
988
|
-
address: this.contractAddress,
|
|
989
|
-
abi: USDToken_jsonAbi,
|
|
990
|
-
eventName: 'OwnershipRenounced',
|
|
991
|
-
args: filter,
|
|
992
|
-
onLogs: (logs: any[]) => {
|
|
993
|
-
logs.forEach((log: any) => {
|
|
994
|
-
callback(log.args as any);
|
|
995
|
-
});
|
|
996
|
-
},
|
|
997
|
-
}) as () => void;
|
|
998
|
-
},
|
|
999
|
-
/**
|
|
1000
|
-
* Watch SymbolChanged events
|
|
1001
|
-
* @param callback Function to call when event is emitted
|
|
1002
|
-
* @param filter Optional filter for indexed parameters
|
|
1003
|
-
* @returns Unwatch function to stop listening
|
|
1004
|
-
*/
|
|
1005
|
-
SymbolChanged: (callback: (event: { newSymbol: string }) => void) => {
|
|
1006
|
-
return this.publicClient.watchContractEvent({
|
|
1007
|
-
address: this.contractAddress,
|
|
1008
|
-
abi: USDToken_jsonAbi,
|
|
1009
|
-
eventName: 'SymbolChanged',
|
|
1010
|
-
|
|
1011
|
-
onLogs: (logs: any[]) => {
|
|
1012
|
-
logs.forEach((log: any) => {
|
|
1013
|
-
callback(log.args as any);
|
|
1014
|
-
});
|
|
1015
|
-
},
|
|
1016
|
-
}) as () => void;
|
|
1017
|
-
},
|
|
1018
1191
|
/**
|
|
1019
1192
|
* Watch Transfer events
|
|
1020
1193
|
* @param callback Function to call when event is emitted
|
|
@@ -1024,7 +1197,7 @@ export class USDToken_json {
|
|
|
1024
1197
|
Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
|
|
1025
1198
|
return this.publicClient.watchContractEvent({
|
|
1026
1199
|
address: this.contractAddress,
|
|
1027
|
-
abi:
|
|
1200
|
+
abi: TokenImplementation_jsonAbi,
|
|
1028
1201
|
eventName: 'Transfer',
|
|
1029
1202
|
args: filter,
|
|
1030
1203
|
onLogs: (logs: any[]) => {
|