@gitmyabi/usdt 1.0.5 → 1.0.7
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/{TokenImplementation_json.d.ts → MyToken_json.d.ts} +121 -354
- package/contracts/{TokenImplementation_json.js → MyToken_json.js} +156 -382
- package/contracts/{TokenImplementation_json.ts → MyToken_json.ts} +160 -458
- package/contracts/index.d.ts +2 -4
- package/contracts/index.js +4 -7
- package/contracts/index.ts +2 -4
- package/package.json +3 -3
- package/contracts/BridgeToken_json.d.ts +0 -169
- package/contracts/BridgeToken_json.js +0 -221
- package/contracts/BridgeToken_json.ts +0 -251
|
@@ -2,11 +2,42 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
|
|
|
2
2
|
import { getContract } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* MyToken_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 MyToken_jsonAbi = [
|
|
10
|
+
{
|
|
11
|
+
"inputs": [
|
|
12
|
+
{
|
|
13
|
+
"internalType": "string",
|
|
14
|
+
"name": "_name",
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"internalType": "string",
|
|
19
|
+
"name": "_symbol",
|
|
20
|
+
"type": "string"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"internalType": "uint256",
|
|
24
|
+
"name": "_cap",
|
|
25
|
+
"type": "uint256"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"internalType": "uint256",
|
|
29
|
+
"name": "_initialSupply",
|
|
30
|
+
"type": "uint256"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"internalType": "string",
|
|
34
|
+
"name": "_logoURI",
|
|
35
|
+
"type": "string"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"stateMutability": "nonpayable",
|
|
39
|
+
"type": "constructor"
|
|
40
|
+
},
|
|
10
41
|
{
|
|
11
42
|
"anonymous": false,
|
|
12
43
|
"inputs": [
|
|
@@ -32,6 +63,25 @@ export const TokenImplementation_jsonAbi = [
|
|
|
32
63
|
"name": "Approval",
|
|
33
64
|
"type": "event"
|
|
34
65
|
},
|
|
66
|
+
{
|
|
67
|
+
"anonymous": false,
|
|
68
|
+
"inputs": [
|
|
69
|
+
{
|
|
70
|
+
"indexed": true,
|
|
71
|
+
"internalType": "address",
|
|
72
|
+
"name": "previousOwner",
|
|
73
|
+
"type": "address"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"indexed": true,
|
|
77
|
+
"internalType": "address",
|
|
78
|
+
"name": "newOwner",
|
|
79
|
+
"type": "address"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"name": "OwnershipTransferred",
|
|
83
|
+
"type": "event"
|
|
84
|
+
},
|
|
35
85
|
{
|
|
36
86
|
"anonymous": false,
|
|
37
87
|
"inputs": [
|
|
@@ -57,29 +107,16 @@ export const TokenImplementation_jsonAbi = [
|
|
|
57
107
|
"name": "Transfer",
|
|
58
108
|
"type": "event"
|
|
59
109
|
},
|
|
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
|
-
},
|
|
73
110
|
{
|
|
74
111
|
"inputs": [
|
|
75
112
|
{
|
|
76
113
|
"internalType": "address",
|
|
77
|
-
"name": "
|
|
114
|
+
"name": "",
|
|
78
115
|
"type": "address"
|
|
79
116
|
},
|
|
80
117
|
{
|
|
81
118
|
"internalType": "address",
|
|
82
|
-
"name": "
|
|
119
|
+
"name": "",
|
|
83
120
|
"type": "address"
|
|
84
121
|
}
|
|
85
122
|
],
|
|
@@ -98,12 +135,12 @@ export const TokenImplementation_jsonAbi = [
|
|
|
98
135
|
"inputs": [
|
|
99
136
|
{
|
|
100
137
|
"internalType": "address",
|
|
101
|
-
"name": "
|
|
138
|
+
"name": "spender",
|
|
102
139
|
"type": "address"
|
|
103
140
|
},
|
|
104
141
|
{
|
|
105
142
|
"internalType": "uint256",
|
|
106
|
-
"name": "
|
|
143
|
+
"name": "value",
|
|
107
144
|
"type": "uint256"
|
|
108
145
|
}
|
|
109
146
|
],
|
|
@@ -122,7 +159,7 @@ export const TokenImplementation_jsonAbi = [
|
|
|
122
159
|
"inputs": [
|
|
123
160
|
{
|
|
124
161
|
"internalType": "address",
|
|
125
|
-
"name": "
|
|
162
|
+
"name": "",
|
|
126
163
|
"type": "address"
|
|
127
164
|
}
|
|
128
165
|
],
|
|
@@ -137,32 +174,14 @@ export const TokenImplementation_jsonAbi = [
|
|
|
137
174
|
"stateMutability": "view",
|
|
138
175
|
"type": "function"
|
|
139
176
|
},
|
|
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
177
|
{
|
|
159
178
|
"inputs": [],
|
|
160
|
-
"name": "
|
|
179
|
+
"name": "cap",
|
|
161
180
|
"outputs": [
|
|
162
181
|
{
|
|
163
|
-
"internalType": "
|
|
182
|
+
"internalType": "uint256",
|
|
164
183
|
"name": "",
|
|
165
|
-
"type": "
|
|
184
|
+
"type": "uint256"
|
|
166
185
|
}
|
|
167
186
|
],
|
|
168
187
|
"stateMutability": "view",
|
|
@@ -181,150 +200,29 @@ export const TokenImplementation_jsonAbi = [
|
|
|
181
200
|
"stateMutability": "view",
|
|
182
201
|
"type": "function"
|
|
183
202
|
},
|
|
184
|
-
{
|
|
185
|
-
"inputs": [
|
|
186
|
-
{
|
|
187
|
-
"internalType": "address",
|
|
188
|
-
"name": "spender_",
|
|
189
|
-
"type": "address"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
"internalType": "uint256",
|
|
193
|
-
"name": "subtractedValue_",
|
|
194
|
-
"type": "uint256"
|
|
195
|
-
}
|
|
196
|
-
],
|
|
197
|
-
"name": "decreaseAllowance",
|
|
198
|
-
"outputs": [
|
|
199
|
-
{
|
|
200
|
-
"internalType": "bool",
|
|
201
|
-
"name": "",
|
|
202
|
-
"type": "bool"
|
|
203
|
-
}
|
|
204
|
-
],
|
|
205
|
-
"stateMutability": "nonpayable",
|
|
206
|
-
"type": "function"
|
|
207
|
-
},
|
|
208
203
|
{
|
|
209
204
|
"inputs": [],
|
|
210
|
-
"name": "
|
|
205
|
+
"name": "logoURI",
|
|
211
206
|
"outputs": [
|
|
212
|
-
{
|
|
213
|
-
"internalType": "bytes1",
|
|
214
|
-
"name": "domainFields",
|
|
215
|
-
"type": "bytes1"
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
"internalType": "string",
|
|
219
|
-
"name": "domainName",
|
|
220
|
-
"type": "string"
|
|
221
|
-
},
|
|
222
207
|
{
|
|
223
208
|
"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
|
-
},
|
|
251
|
-
{
|
|
252
|
-
"inputs": [
|
|
253
|
-
{
|
|
254
|
-
"internalType": "address",
|
|
255
|
-
"name": "spender_",
|
|
256
|
-
"type": "address"
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
"internalType": "uint256",
|
|
260
|
-
"name": "addedValue_",
|
|
261
|
-
"type": "uint256"
|
|
262
|
-
}
|
|
263
|
-
],
|
|
264
|
-
"name": "increaseAllowance",
|
|
265
|
-
"outputs": [
|
|
266
|
-
{
|
|
267
|
-
"internalType": "bool",
|
|
268
209
|
"name": "",
|
|
269
|
-
"type": "bool"
|
|
270
|
-
}
|
|
271
|
-
],
|
|
272
|
-
"stateMutability": "nonpayable",
|
|
273
|
-
"type": "function"
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
"inputs": [
|
|
277
|
-
{
|
|
278
|
-
"internalType": "string",
|
|
279
|
-
"name": "name_",
|
|
280
|
-
"type": "string"
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
"internalType": "string",
|
|
284
|
-
"name": "symbol_",
|
|
285
210
|
"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"
|
|
311
211
|
}
|
|
312
212
|
],
|
|
313
|
-
"
|
|
314
|
-
"outputs": [],
|
|
315
|
-
"stateMutability": "nonpayable",
|
|
213
|
+
"stateMutability": "view",
|
|
316
214
|
"type": "function"
|
|
317
215
|
},
|
|
318
216
|
{
|
|
319
217
|
"inputs": [
|
|
320
218
|
{
|
|
321
219
|
"internalType": "address",
|
|
322
|
-
"name": "
|
|
220
|
+
"name": "to",
|
|
323
221
|
"type": "address"
|
|
324
222
|
},
|
|
325
223
|
{
|
|
326
224
|
"internalType": "uint256",
|
|
327
|
-
"name": "
|
|
225
|
+
"name": "amount",
|
|
328
226
|
"type": "uint256"
|
|
329
227
|
}
|
|
330
228
|
],
|
|
@@ -348,31 +246,12 @@ export const TokenImplementation_jsonAbi = [
|
|
|
348
246
|
},
|
|
349
247
|
{
|
|
350
248
|
"inputs": [],
|
|
351
|
-
"name": "
|
|
249
|
+
"name": "owner",
|
|
352
250
|
"outputs": [
|
|
353
|
-
{
|
|
354
|
-
"internalType": "bytes32",
|
|
355
|
-
"name": "",
|
|
356
|
-
"type": "bytes32"
|
|
357
|
-
}
|
|
358
|
-
],
|
|
359
|
-
"stateMutability": "view",
|
|
360
|
-
"type": "function"
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
"inputs": [
|
|
364
251
|
{
|
|
365
252
|
"internalType": "address",
|
|
366
|
-
"name": "owner_",
|
|
367
|
-
"type": "address"
|
|
368
|
-
}
|
|
369
|
-
],
|
|
370
|
-
"name": "nonces",
|
|
371
|
-
"outputs": [
|
|
372
|
-
{
|
|
373
|
-
"internalType": "uint256",
|
|
374
253
|
"name": "",
|
|
375
|
-
"type": "
|
|
254
|
+
"type": "address"
|
|
376
255
|
}
|
|
377
256
|
],
|
|
378
257
|
"stateMutability": "view",
|
|
@@ -380,56 +259,20 @@ export const TokenImplementation_jsonAbi = [
|
|
|
380
259
|
},
|
|
381
260
|
{
|
|
382
261
|
"inputs": [],
|
|
383
|
-
"name": "
|
|
384
|
-
"outputs": [
|
|
385
|
-
|
|
386
|
-
"internalType": "address",
|
|
387
|
-
"name": "",
|
|
388
|
-
"type": "address"
|
|
389
|
-
}
|
|
390
|
-
],
|
|
391
|
-
"stateMutability": "view",
|
|
262
|
+
"name": "renounceOwnership",
|
|
263
|
+
"outputs": [],
|
|
264
|
+
"stateMutability": "nonpayable",
|
|
392
265
|
"type": "function"
|
|
393
266
|
},
|
|
394
267
|
{
|
|
395
268
|
"inputs": [
|
|
396
269
|
{
|
|
397
|
-
"internalType": "
|
|
398
|
-
"name": "
|
|
399
|
-
"type": "
|
|
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"
|
|
270
|
+
"internalType": "string",
|
|
271
|
+
"name": "_logoURI",
|
|
272
|
+
"type": "string"
|
|
430
273
|
}
|
|
431
274
|
],
|
|
432
|
-
"name": "
|
|
275
|
+
"name": "setLogoURI",
|
|
433
276
|
"outputs": [],
|
|
434
277
|
"stateMutability": "nonpayable",
|
|
435
278
|
"type": "function"
|
|
@@ -464,12 +307,12 @@ export const TokenImplementation_jsonAbi = [
|
|
|
464
307
|
"inputs": [
|
|
465
308
|
{
|
|
466
309
|
"internalType": "address",
|
|
467
|
-
"name": "
|
|
310
|
+
"name": "to",
|
|
468
311
|
"type": "address"
|
|
469
312
|
},
|
|
470
313
|
{
|
|
471
314
|
"internalType": "uint256",
|
|
472
|
-
"name": "
|
|
315
|
+
"name": "value",
|
|
473
316
|
"type": "uint256"
|
|
474
317
|
}
|
|
475
318
|
],
|
|
@@ -488,17 +331,17 @@ export const TokenImplementation_jsonAbi = [
|
|
|
488
331
|
"inputs": [
|
|
489
332
|
{
|
|
490
333
|
"internalType": "address",
|
|
491
|
-
"name": "
|
|
334
|
+
"name": "from",
|
|
492
335
|
"type": "address"
|
|
493
336
|
},
|
|
494
337
|
{
|
|
495
338
|
"internalType": "address",
|
|
496
|
-
"name": "
|
|
339
|
+
"name": "to",
|
|
497
340
|
"type": "address"
|
|
498
341
|
},
|
|
499
342
|
{
|
|
500
343
|
"internalType": "uint256",
|
|
501
|
-
"name": "
|
|
344
|
+
"name": "value",
|
|
502
345
|
"type": "uint256"
|
|
503
346
|
}
|
|
504
347
|
],
|
|
@@ -516,22 +359,12 @@ export const TokenImplementation_jsonAbi = [
|
|
|
516
359
|
{
|
|
517
360
|
"inputs": [
|
|
518
361
|
{
|
|
519
|
-
"internalType": "
|
|
520
|
-
"name": "
|
|
521
|
-
"type": "
|
|
522
|
-
},
|
|
523
|
-
{
|
|
524
|
-
"internalType": "string",
|
|
525
|
-
"name": "symbol_",
|
|
526
|
-
"type": "string"
|
|
527
|
-
},
|
|
528
|
-
{
|
|
529
|
-
"internalType": "uint64",
|
|
530
|
-
"name": "sequence_",
|
|
531
|
-
"type": "uint64"
|
|
362
|
+
"internalType": "address",
|
|
363
|
+
"name": "newOwner",
|
|
364
|
+
"type": "address"
|
|
532
365
|
}
|
|
533
366
|
],
|
|
534
|
-
"name": "
|
|
367
|
+
"name": "transferOwnership",
|
|
535
368
|
"outputs": [],
|
|
536
369
|
"stateMutability": "nonpayable",
|
|
537
370
|
"type": "function"
|
|
@@ -539,19 +372,19 @@ export const TokenImplementation_jsonAbi = [
|
|
|
539
372
|
] as const satisfies Abi;
|
|
540
373
|
|
|
541
374
|
/**
|
|
542
|
-
* Type-safe ABI for
|
|
375
|
+
* Type-safe ABI for MyToken_json
|
|
543
376
|
*/
|
|
544
|
-
export type
|
|
377
|
+
export type MyToken_jsonAbi = typeof MyToken_jsonAbi;
|
|
545
378
|
|
|
546
379
|
/**
|
|
547
|
-
* Contract instance type for
|
|
380
|
+
* Contract instance type for MyToken_json
|
|
548
381
|
*/
|
|
549
382
|
// Use any for contract type to avoid complex viem type issues
|
|
550
383
|
// The runtime behavior is type-safe through viem's ABI typing
|
|
551
|
-
export type
|
|
384
|
+
export type MyToken_jsonContract = any;
|
|
552
385
|
|
|
553
386
|
/**
|
|
554
|
-
*
|
|
387
|
+
* MyToken_json Contract Class
|
|
555
388
|
*
|
|
556
389
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
557
390
|
*
|
|
@@ -559,12 +392,12 @@ export type TokenImplementation_jsonContract = any;
|
|
|
559
392
|
* ```typescript
|
|
560
393
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
561
394
|
* import { mainnet } from 'viem/chains';
|
|
562
|
-
* import {
|
|
395
|
+
* import { MyToken_json } from 'MyToken_json';
|
|
563
396
|
*
|
|
564
397
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
565
398
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
566
399
|
*
|
|
567
|
-
* const contract = new
|
|
400
|
+
* const contract = new MyToken_json('0x...', { publicClient, walletClient });
|
|
568
401
|
*
|
|
569
402
|
* // Read functions
|
|
570
403
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -582,8 +415,8 @@ export type TokenImplementation_jsonContract = any;
|
|
|
582
415
|
* });
|
|
583
416
|
* ```
|
|
584
417
|
*/
|
|
585
|
-
export class
|
|
586
|
-
private contract:
|
|
418
|
+
export class MyToken_json {
|
|
419
|
+
private contract: MyToken_jsonContract;
|
|
587
420
|
private contractAddress: Address;
|
|
588
421
|
private publicClient: PublicClient;
|
|
589
422
|
|
|
@@ -598,7 +431,7 @@ export class TokenImplementation_json {
|
|
|
598
431
|
this.publicClient = clients.publicClient;
|
|
599
432
|
this.contract = getContract({
|
|
600
433
|
address,
|
|
601
|
-
abi:
|
|
434
|
+
abi: MyToken_jsonAbi,
|
|
602
435
|
client: {
|
|
603
436
|
public: clients.publicClient,
|
|
604
437
|
wallet: clients.walletClient,
|
|
@@ -616,40 +449,32 @@ export class TokenImplementation_json {
|
|
|
616
449
|
/**
|
|
617
450
|
* Get the underlying viem contract instance
|
|
618
451
|
*/
|
|
619
|
-
getContract():
|
|
452
|
+
getContract(): MyToken_jsonContract {
|
|
620
453
|
return this.contract;
|
|
621
454
|
}
|
|
622
455
|
|
|
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
|
-
|
|
631
456
|
/**
|
|
632
457
|
* allowance
|
|
633
458
|
* view
|
|
634
459
|
*/
|
|
635
|
-
async allowance(
|
|
636
|
-
return this.contract.read.allowance([
|
|
460
|
+
async allowance(arg0: `0x${string}`, arg1: `0x${string}`): Promise<bigint> {
|
|
461
|
+
return this.contract.read.allowance([arg0, arg1] as const) as Promise<bigint>;
|
|
637
462
|
}
|
|
638
463
|
|
|
639
464
|
/**
|
|
640
465
|
* balanceOf
|
|
641
466
|
* view
|
|
642
467
|
*/
|
|
643
|
-
async balanceOf(
|
|
644
|
-
return this.contract.read.balanceOf([
|
|
468
|
+
async balanceOf(arg0: `0x${string}`): Promise<bigint> {
|
|
469
|
+
return this.contract.read.balanceOf([arg0] as const) as Promise<bigint>;
|
|
645
470
|
}
|
|
646
471
|
|
|
647
472
|
/**
|
|
648
|
-
*
|
|
473
|
+
* cap
|
|
649
474
|
* view
|
|
650
475
|
*/
|
|
651
|
-
async
|
|
652
|
-
return this.contract.read.
|
|
476
|
+
async cap(): Promise<bigint> {
|
|
477
|
+
return this.contract.read.cap() as Promise<bigint>;
|
|
653
478
|
}
|
|
654
479
|
|
|
655
480
|
/**
|
|
@@ -661,11 +486,11 @@ export class TokenImplementation_json {
|
|
|
661
486
|
}
|
|
662
487
|
|
|
663
488
|
/**
|
|
664
|
-
*
|
|
489
|
+
* logoURI
|
|
665
490
|
* view
|
|
666
491
|
*/
|
|
667
|
-
async
|
|
668
|
-
return this.contract.read.
|
|
492
|
+
async logoURI(): Promise<string> {
|
|
493
|
+
return this.contract.read.logoURI() as Promise<string>;
|
|
669
494
|
}
|
|
670
495
|
|
|
671
496
|
/**
|
|
@@ -676,22 +501,6 @@ export class TokenImplementation_json {
|
|
|
676
501
|
return this.contract.read.name() as Promise<string>;
|
|
677
502
|
}
|
|
678
503
|
|
|
679
|
-
/**
|
|
680
|
-
* nativeContract
|
|
681
|
-
* view
|
|
682
|
-
*/
|
|
683
|
-
async nativeContract(): Promise<`0x${string}`> {
|
|
684
|
-
return this.contract.read.nativeContract() as Promise<`0x${string}`>;
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
/**
|
|
688
|
-
* nonces
|
|
689
|
-
* view
|
|
690
|
-
*/
|
|
691
|
-
async nonces(owner_: `0x${string}`): Promise<bigint> {
|
|
692
|
-
return this.contract.read.nonces([owner_] as const) as Promise<bigint>;
|
|
693
|
-
}
|
|
694
|
-
|
|
695
504
|
/**
|
|
696
505
|
* owner
|
|
697
506
|
* view
|
|
@@ -721,7 +530,7 @@ export class TokenImplementation_json {
|
|
|
721
530
|
* nonpayable
|
|
722
531
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
723
532
|
*/
|
|
724
|
-
async approve(
|
|
533
|
+
async approve(spender: `0x${string}`, value: bigint, options?: {
|
|
725
534
|
accessList?: import('viem').AccessList;
|
|
726
535
|
authorizationList?: import('viem').AuthorizationList;
|
|
727
536
|
chain?: import('viem').Chain | null;
|
|
@@ -736,84 +545,15 @@ export class TokenImplementation_json {
|
|
|
736
545
|
if (!this.contract.write) {
|
|
737
546
|
throw new Error('Wallet client is required for write operations');
|
|
738
547
|
}
|
|
739
|
-
return this.contract.write.approve([
|
|
548
|
+
return this.contract.write.approve([spender, value] as const, options) as Promise<`0x${string}`>;
|
|
740
549
|
}
|
|
741
550
|
|
|
742
551
|
/**
|
|
743
|
-
*
|
|
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}`>;
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
/**
|
|
766
|
-
* decreaseAllowance
|
|
767
|
-
* nonpayable
|
|
768
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
769
|
-
*/
|
|
770
|
-
async decreaseAllowance(spender_: `0x${string}`, subtractedValue_: bigint, options?: {
|
|
771
|
-
accessList?: import('viem').AccessList;
|
|
772
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
773
|
-
chain?: import('viem').Chain | null;
|
|
774
|
-
dataSuffix?: `0x${string}`;
|
|
775
|
-
gas?: bigint;
|
|
776
|
-
gasPrice?: bigint;
|
|
777
|
-
maxFeePerGas?: bigint;
|
|
778
|
-
maxPriorityFeePerGas?: bigint;
|
|
779
|
-
nonce?: number;
|
|
780
|
-
value?: bigint;
|
|
781
|
-
}): Promise<`0x${string}`> {
|
|
782
|
-
if (!this.contract.write) {
|
|
783
|
-
throw new Error('Wallet client is required for write operations');
|
|
784
|
-
}
|
|
785
|
-
return this.contract.write.decreaseAllowance([spender_, subtractedValue_] as const, options) as Promise<`0x${string}`>;
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
/**
|
|
789
|
-
* increaseAllowance
|
|
790
|
-
* nonpayable
|
|
791
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
792
|
-
*/
|
|
793
|
-
async increaseAllowance(spender_: `0x${string}`, addedValue_: bigint, options?: {
|
|
794
|
-
accessList?: import('viem').AccessList;
|
|
795
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
796
|
-
chain?: import('viem').Chain | null;
|
|
797
|
-
dataSuffix?: `0x${string}`;
|
|
798
|
-
gas?: bigint;
|
|
799
|
-
gasPrice?: bigint;
|
|
800
|
-
maxFeePerGas?: bigint;
|
|
801
|
-
maxPriorityFeePerGas?: bigint;
|
|
802
|
-
nonce?: number;
|
|
803
|
-
value?: bigint;
|
|
804
|
-
}): Promise<`0x${string}`> {
|
|
805
|
-
if (!this.contract.write) {
|
|
806
|
-
throw new Error('Wallet client is required for write operations');
|
|
807
|
-
}
|
|
808
|
-
return this.contract.write.increaseAllowance([spender_, addedValue_] as const, options) as Promise<`0x${string}`>;
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
/**
|
|
812
|
-
* initialize
|
|
552
|
+
* mint
|
|
813
553
|
* nonpayable
|
|
814
554
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
815
555
|
*/
|
|
816
|
-
async
|
|
556
|
+
async mint(to: `0x${string}`, amount: bigint, options?: {
|
|
817
557
|
accessList?: import('viem').AccessList;
|
|
818
558
|
authorizationList?: import('viem').AuthorizationList;
|
|
819
559
|
chain?: import('viem').Chain | null;
|
|
@@ -828,15 +568,15 @@ export class TokenImplementation_json {
|
|
|
828
568
|
if (!this.contract.write) {
|
|
829
569
|
throw new Error('Wallet client is required for write operations');
|
|
830
570
|
}
|
|
831
|
-
return this.contract.write.
|
|
571
|
+
return this.contract.write.mint([to, amount] as const, options) as Promise<`0x${string}`>;
|
|
832
572
|
}
|
|
833
573
|
|
|
834
574
|
/**
|
|
835
|
-
*
|
|
575
|
+
* renounceOwnership
|
|
836
576
|
* nonpayable
|
|
837
577
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
838
578
|
*/
|
|
839
|
-
async
|
|
579
|
+
async renounceOwnership(options?: {
|
|
840
580
|
accessList?: import('viem').AccessList;
|
|
841
581
|
authorizationList?: import('viem').AuthorizationList;
|
|
842
582
|
chain?: import('viem').Chain | null;
|
|
@@ -851,15 +591,15 @@ export class TokenImplementation_json {
|
|
|
851
591
|
if (!this.contract.write) {
|
|
852
592
|
throw new Error('Wallet client is required for write operations');
|
|
853
593
|
}
|
|
854
|
-
return this.contract.write.
|
|
594
|
+
return this.contract.write.renounceOwnership(options) as Promise<`0x${string}`>;
|
|
855
595
|
}
|
|
856
596
|
|
|
857
597
|
/**
|
|
858
|
-
*
|
|
598
|
+
* setLogoURI
|
|
859
599
|
* nonpayable
|
|
860
600
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
861
601
|
*/
|
|
862
|
-
async
|
|
602
|
+
async setLogoURI(_logoURI: string, options?: {
|
|
863
603
|
accessList?: import('viem').AccessList;
|
|
864
604
|
authorizationList?: import('viem').AuthorizationList;
|
|
865
605
|
chain?: import('viem').Chain | null;
|
|
@@ -874,7 +614,7 @@ export class TokenImplementation_json {
|
|
|
874
614
|
if (!this.contract.write) {
|
|
875
615
|
throw new Error('Wallet client is required for write operations');
|
|
876
616
|
}
|
|
877
|
-
return this.contract.write.
|
|
617
|
+
return this.contract.write.setLogoURI([_logoURI] as const, options) as Promise<`0x${string}`>;
|
|
878
618
|
}
|
|
879
619
|
|
|
880
620
|
/**
|
|
@@ -882,7 +622,7 @@ export class TokenImplementation_json {
|
|
|
882
622
|
* nonpayable
|
|
883
623
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
884
624
|
*/
|
|
885
|
-
async transfer(
|
|
625
|
+
async transfer(to: `0x${string}`, value: bigint, options?: {
|
|
886
626
|
accessList?: import('viem').AccessList;
|
|
887
627
|
authorizationList?: import('viem').AuthorizationList;
|
|
888
628
|
chain?: import('viem').Chain | null;
|
|
@@ -897,7 +637,7 @@ export class TokenImplementation_json {
|
|
|
897
637
|
if (!this.contract.write) {
|
|
898
638
|
throw new Error('Wallet client is required for write operations');
|
|
899
639
|
}
|
|
900
|
-
return this.contract.write.transfer([
|
|
640
|
+
return this.contract.write.transfer([to, value] as const, options) as Promise<`0x${string}`>;
|
|
901
641
|
}
|
|
902
642
|
|
|
903
643
|
/**
|
|
@@ -905,7 +645,7 @@ export class TokenImplementation_json {
|
|
|
905
645
|
* nonpayable
|
|
906
646
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
907
647
|
*/
|
|
908
|
-
async transferFrom(
|
|
648
|
+
async transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
|
|
909
649
|
accessList?: import('viem').AccessList;
|
|
910
650
|
authorizationList?: import('viem').AuthorizationList;
|
|
911
651
|
chain?: import('viem').Chain | null;
|
|
@@ -920,15 +660,15 @@ export class TokenImplementation_json {
|
|
|
920
660
|
if (!this.contract.write) {
|
|
921
661
|
throw new Error('Wallet client is required for write operations');
|
|
922
662
|
}
|
|
923
|
-
return this.contract.write.transferFrom([
|
|
663
|
+
return this.contract.write.transferFrom([from, to, value] as const, options) as Promise<`0x${string}`>;
|
|
924
664
|
}
|
|
925
665
|
|
|
926
666
|
/**
|
|
927
|
-
*
|
|
667
|
+
* transferOwnership
|
|
928
668
|
* nonpayable
|
|
929
669
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
930
670
|
*/
|
|
931
|
-
async
|
|
671
|
+
async transferOwnership(newOwner: `0x${string}`, options?: {
|
|
932
672
|
accessList?: import('viem').AccessList;
|
|
933
673
|
authorizationList?: import('viem').AuthorizationList;
|
|
934
674
|
chain?: import('viem').Chain | null;
|
|
@@ -943,7 +683,7 @@ export class TokenImplementation_json {
|
|
|
943
683
|
if (!this.contract.write) {
|
|
944
684
|
throw new Error('Wallet client is required for write operations');
|
|
945
685
|
}
|
|
946
|
-
return this.contract.write.
|
|
686
|
+
return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
|
|
947
687
|
}
|
|
948
688
|
|
|
949
689
|
|
|
@@ -967,7 +707,7 @@ export class TokenImplementation_json {
|
|
|
967
707
|
* Returns gas estimate and result without sending transaction
|
|
968
708
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
969
709
|
*/
|
|
970
|
-
async approve(
|
|
710
|
+
async approve(spender: `0x${string}`, value: bigint, options?: {
|
|
971
711
|
accessList?: import('viem').AccessList;
|
|
972
712
|
authorizationList?: import('viem').AuthorizationList;
|
|
973
713
|
chain?: import('viem').Chain | null;
|
|
@@ -979,71 +719,14 @@ export class TokenImplementation_json {
|
|
|
979
719
|
nonce?: number;
|
|
980
720
|
value?: bigint;
|
|
981
721
|
}): Promise<boolean> {
|
|
982
|
-
return contract.simulate.approve([
|
|
722
|
+
return contract.simulate.approve([spender, value] as const, options) as Promise<boolean>;
|
|
983
723
|
},
|
|
984
724
|
/**
|
|
985
|
-
* Simulate
|
|
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>;
|
|
1002
|
-
},
|
|
1003
|
-
/**
|
|
1004
|
-
* Simulate decreaseAllowance
|
|
1005
|
-
* Returns gas estimate and result without sending transaction
|
|
1006
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1007
|
-
*/
|
|
1008
|
-
async decreaseAllowance(spender_: `0x${string}`, subtractedValue_: bigint, options?: {
|
|
1009
|
-
accessList?: import('viem').AccessList;
|
|
1010
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1011
|
-
chain?: import('viem').Chain | null;
|
|
1012
|
-
dataSuffix?: `0x${string}`;
|
|
1013
|
-
gas?: bigint;
|
|
1014
|
-
gasPrice?: bigint;
|
|
1015
|
-
maxFeePerGas?: bigint;
|
|
1016
|
-
maxPriorityFeePerGas?: bigint;
|
|
1017
|
-
nonce?: number;
|
|
1018
|
-
value?: bigint;
|
|
1019
|
-
}): Promise<boolean> {
|
|
1020
|
-
return contract.simulate.decreaseAllowance([spender_, subtractedValue_] as const, options) as Promise<boolean>;
|
|
1021
|
-
},
|
|
1022
|
-
/**
|
|
1023
|
-
* Simulate increaseAllowance
|
|
1024
|
-
* Returns gas estimate and result without sending transaction
|
|
1025
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1026
|
-
*/
|
|
1027
|
-
async increaseAllowance(spender_: `0x${string}`, addedValue_: bigint, options?: {
|
|
1028
|
-
accessList?: import('viem').AccessList;
|
|
1029
|
-
authorizationList?: import('viem').AuthorizationList;
|
|
1030
|
-
chain?: import('viem').Chain | null;
|
|
1031
|
-
dataSuffix?: `0x${string}`;
|
|
1032
|
-
gas?: bigint;
|
|
1033
|
-
gasPrice?: bigint;
|
|
1034
|
-
maxFeePerGas?: bigint;
|
|
1035
|
-
maxPriorityFeePerGas?: bigint;
|
|
1036
|
-
nonce?: number;
|
|
1037
|
-
value?: bigint;
|
|
1038
|
-
}): Promise<boolean> {
|
|
1039
|
-
return contract.simulate.increaseAllowance([spender_, addedValue_] as const, options) as Promise<boolean>;
|
|
1040
|
-
},
|
|
1041
|
-
/**
|
|
1042
|
-
* Simulate initialize
|
|
725
|
+
* Simulate mint
|
|
1043
726
|
* Returns gas estimate and result without sending transaction
|
|
1044
727
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1045
728
|
*/
|
|
1046
|
-
async
|
|
729
|
+
async mint(to: `0x${string}`, amount: bigint, options?: {
|
|
1047
730
|
accessList?: import('viem').AccessList;
|
|
1048
731
|
authorizationList?: import('viem').AuthorizationList;
|
|
1049
732
|
chain?: import('viem').Chain | null;
|
|
@@ -1055,14 +738,14 @@ export class TokenImplementation_json {
|
|
|
1055
738
|
nonce?: number;
|
|
1056
739
|
value?: bigint;
|
|
1057
740
|
}): Promise<void> {
|
|
1058
|
-
return contract.simulate.
|
|
741
|
+
return contract.simulate.mint([to, amount] as const, options) as Promise<void>;
|
|
1059
742
|
},
|
|
1060
743
|
/**
|
|
1061
|
-
* Simulate
|
|
744
|
+
* Simulate renounceOwnership
|
|
1062
745
|
* Returns gas estimate and result without sending transaction
|
|
1063
746
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1064
747
|
*/
|
|
1065
|
-
async
|
|
748
|
+
async renounceOwnership(options?: {
|
|
1066
749
|
accessList?: import('viem').AccessList;
|
|
1067
750
|
authorizationList?: import('viem').AuthorizationList;
|
|
1068
751
|
chain?: import('viem').Chain | null;
|
|
@@ -1074,14 +757,14 @@ export class TokenImplementation_json {
|
|
|
1074
757
|
nonce?: number;
|
|
1075
758
|
value?: bigint;
|
|
1076
759
|
}): Promise<void> {
|
|
1077
|
-
return contract.simulate.
|
|
760
|
+
return contract.simulate.renounceOwnership(options) as Promise<void>;
|
|
1078
761
|
},
|
|
1079
762
|
/**
|
|
1080
|
-
* Simulate
|
|
763
|
+
* Simulate setLogoURI
|
|
1081
764
|
* Returns gas estimate and result without sending transaction
|
|
1082
765
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1083
766
|
*/
|
|
1084
|
-
async
|
|
767
|
+
async setLogoURI(_logoURI: string, options?: {
|
|
1085
768
|
accessList?: import('viem').AccessList;
|
|
1086
769
|
authorizationList?: import('viem').AuthorizationList;
|
|
1087
770
|
chain?: import('viem').Chain | null;
|
|
@@ -1093,14 +776,14 @@ export class TokenImplementation_json {
|
|
|
1093
776
|
nonce?: number;
|
|
1094
777
|
value?: bigint;
|
|
1095
778
|
}): Promise<void> {
|
|
1096
|
-
return contract.simulate.
|
|
779
|
+
return contract.simulate.setLogoURI([_logoURI] as const, options) as Promise<void>;
|
|
1097
780
|
},
|
|
1098
781
|
/**
|
|
1099
782
|
* Simulate transfer
|
|
1100
783
|
* Returns gas estimate and result without sending transaction
|
|
1101
784
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1102
785
|
*/
|
|
1103
|
-
async transfer(
|
|
786
|
+
async transfer(to: `0x${string}`, value: bigint, options?: {
|
|
1104
787
|
accessList?: import('viem').AccessList;
|
|
1105
788
|
authorizationList?: import('viem').AuthorizationList;
|
|
1106
789
|
chain?: import('viem').Chain | null;
|
|
@@ -1112,14 +795,14 @@ export class TokenImplementation_json {
|
|
|
1112
795
|
nonce?: number;
|
|
1113
796
|
value?: bigint;
|
|
1114
797
|
}): Promise<boolean> {
|
|
1115
|
-
return contract.simulate.transfer([
|
|
798
|
+
return contract.simulate.transfer([to, value] as const, options) as Promise<boolean>;
|
|
1116
799
|
},
|
|
1117
800
|
/**
|
|
1118
801
|
* Simulate transferFrom
|
|
1119
802
|
* Returns gas estimate and result without sending transaction
|
|
1120
803
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1121
804
|
*/
|
|
1122
|
-
async transferFrom(
|
|
805
|
+
async transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
|
|
1123
806
|
accessList?: import('viem').AccessList;
|
|
1124
807
|
authorizationList?: import('viem').AuthorizationList;
|
|
1125
808
|
chain?: import('viem').Chain | null;
|
|
@@ -1131,14 +814,14 @@ export class TokenImplementation_json {
|
|
|
1131
814
|
nonce?: number;
|
|
1132
815
|
value?: bigint;
|
|
1133
816
|
}): Promise<boolean> {
|
|
1134
|
-
return contract.simulate.transferFrom([
|
|
817
|
+
return contract.simulate.transferFrom([from, to, value] as const, options) as Promise<boolean>;
|
|
1135
818
|
},
|
|
1136
819
|
/**
|
|
1137
|
-
* Simulate
|
|
820
|
+
* Simulate transferOwnership
|
|
1138
821
|
* Returns gas estimate and result without sending transaction
|
|
1139
822
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1140
823
|
*/
|
|
1141
|
-
async
|
|
824
|
+
async transferOwnership(newOwner: `0x${string}`, options?: {
|
|
1142
825
|
accessList?: import('viem').AccessList;
|
|
1143
826
|
authorizationList?: import('viem').AuthorizationList;
|
|
1144
827
|
chain?: import('viem').Chain | null;
|
|
@@ -1150,7 +833,7 @@ export class TokenImplementation_json {
|
|
|
1150
833
|
nonce?: number;
|
|
1151
834
|
value?: bigint;
|
|
1152
835
|
}): Promise<void> {
|
|
1153
|
-
return contract.simulate.
|
|
836
|
+
return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
|
|
1154
837
|
}
|
|
1155
838
|
};
|
|
1156
839
|
}
|
|
@@ -1178,7 +861,7 @@ export class TokenImplementation_json {
|
|
|
1178
861
|
Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
|
|
1179
862
|
return this.publicClient.watchContractEvent({
|
|
1180
863
|
address: this.contractAddress,
|
|
1181
|
-
abi:
|
|
864
|
+
abi: MyToken_jsonAbi,
|
|
1182
865
|
eventName: 'Approval',
|
|
1183
866
|
args: filter,
|
|
1184
867
|
onLogs: (logs: any[]) => {
|
|
@@ -1188,6 +871,25 @@ export class TokenImplementation_json {
|
|
|
1188
871
|
},
|
|
1189
872
|
}) as () => void;
|
|
1190
873
|
},
|
|
874
|
+
/**
|
|
875
|
+
* Watch OwnershipTransferred events
|
|
876
|
+
* @param callback Function to call when event is emitted
|
|
877
|
+
* @param filter Optional filter for indexed parameters
|
|
878
|
+
* @returns Unwatch function to stop listening
|
|
879
|
+
*/
|
|
880
|
+
OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
|
|
881
|
+
return this.publicClient.watchContractEvent({
|
|
882
|
+
address: this.contractAddress,
|
|
883
|
+
abi: MyToken_jsonAbi,
|
|
884
|
+
eventName: 'OwnershipTransferred',
|
|
885
|
+
args: filter,
|
|
886
|
+
onLogs: (logs: any[]) => {
|
|
887
|
+
logs.forEach((log: any) => {
|
|
888
|
+
callback(log.args as any);
|
|
889
|
+
});
|
|
890
|
+
},
|
|
891
|
+
}) as () => void;
|
|
892
|
+
},
|
|
1191
893
|
/**
|
|
1192
894
|
* Watch Transfer events
|
|
1193
895
|
* @param callback Function to call when event is emitted
|
|
@@ -1197,7 +899,7 @@ export class TokenImplementation_json {
|
|
|
1197
899
|
Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
|
|
1198
900
|
return this.publicClient.watchContractEvent({
|
|
1199
901
|
address: this.contractAddress,
|
|
1200
|
-
abi:
|
|
902
|
+
abi: MyToken_jsonAbi,
|
|
1201
903
|
eventName: 'Transfer',
|
|
1202
904
|
args: filter,
|
|
1203
905
|
onLogs: (logs: any[]) => {
|