@gitmyabi/weth 1.0.2 → 1.0.3

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.
@@ -2,392 +2,304 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
2
2
  import { getContract } from 'viem';
3
3
 
4
4
  /**
5
- * StandardToken_json ABI
5
+ * WETH9_json ABI
6
6
  *
7
7
  * This ABI is typed using viem's type system for full type safety.
8
8
  */
9
- export const StandardToken_jsonAbi = [
9
+ export const WETH9_jsonAbi = [
10
10
  {
11
+ "constant": true,
11
12
  "inputs": [],
12
- "stateMutability": "nonpayable",
13
- "type": "constructor"
14
- },
15
- {
16
- "anonymous": false,
17
- "inputs": [
18
- {
19
- "indexed": true,
20
- "internalType": "address",
21
- "name": "owner",
22
- "type": "address"
23
- },
24
- {
25
- "indexed": true,
26
- "internalType": "address",
27
- "name": "spender",
28
- "type": "address"
29
- },
30
- {
31
- "indexed": false,
32
- "internalType": "uint256",
33
- "name": "value",
34
- "type": "uint256"
35
- }
36
- ],
37
- "name": "Approval",
38
- "type": "event"
39
- },
40
- {
41
- "anonymous": false,
42
- "inputs": [
43
- {
44
- "indexed": false,
45
- "internalType": "uint8",
46
- "name": "version",
47
- "type": "uint8"
48
- }
49
- ],
50
- "name": "Initialized",
51
- "type": "event"
52
- },
53
- {
54
- "anonymous": false,
55
- "inputs": [
56
- {
57
- "indexed": true,
58
- "internalType": "address",
59
- "name": "from",
60
- "type": "address"
61
- },
62
- {
63
- "indexed": true,
64
- "internalType": "address",
65
- "name": "to",
66
- "type": "address"
67
- },
68
- {
69
- "indexed": false,
70
- "internalType": "uint256",
71
- "name": "value",
72
- "type": "uint256"
73
- }
74
- ],
75
- "name": "Transfer",
76
- "type": "event"
77
- },
78
- {
79
- "inputs": [
80
- {
81
- "internalType": "address",
82
- "name": "owner",
83
- "type": "address"
84
- },
85
- {
86
- "internalType": "address",
87
- "name": "spender",
88
- "type": "address"
89
- }
90
- ],
91
- "name": "allowance",
13
+ "name": "name",
92
14
  "outputs": [
93
15
  {
94
- "internalType": "uint256",
95
16
  "name": "",
96
- "type": "uint256"
17
+ "type": "string"
97
18
  }
98
19
  ],
20
+ "payable": false,
99
21
  "stateMutability": "view",
100
22
  "type": "function"
101
23
  },
102
24
  {
25
+ "constant": false,
103
26
  "inputs": [
104
27
  {
105
- "internalType": "address",
106
- "name": "spender",
28
+ "name": "guy",
107
29
  "type": "address"
108
30
  },
109
31
  {
110
- "internalType": "uint256",
111
- "name": "amount",
32
+ "name": "wad",
112
33
  "type": "uint256"
113
34
  }
114
35
  ],
115
36
  "name": "approve",
116
37
  "outputs": [
117
38
  {
118
- "internalType": "bool",
119
39
  "name": "",
120
40
  "type": "bool"
121
41
  }
122
42
  ],
43
+ "payable": false,
123
44
  "stateMutability": "nonpayable",
124
45
  "type": "function"
125
46
  },
126
47
  {
127
- "inputs": [
128
- {
129
- "internalType": "address",
130
- "name": "account",
131
- "type": "address"
132
- }
133
- ],
134
- "name": "balanceOf",
48
+ "constant": true,
49
+ "inputs": [],
50
+ "name": "totalSupply",
135
51
  "outputs": [
136
52
  {
137
- "internalType": "uint256",
138
53
  "name": "",
139
54
  "type": "uint256"
140
55
  }
141
56
  ],
57
+ "payable": false,
142
58
  "stateMutability": "view",
143
59
  "type": "function"
144
60
  },
145
61
  {
62
+ "constant": false,
146
63
  "inputs": [
147
64
  {
148
- "internalType": "uint256",
149
- "name": "amount",
65
+ "name": "src",
66
+ "type": "address"
67
+ },
68
+ {
69
+ "name": "dst",
70
+ "type": "address"
71
+ },
72
+ {
73
+ "name": "wad",
150
74
  "type": "uint256"
151
75
  }
152
76
  ],
153
- "name": "burn",
154
- "outputs": [],
77
+ "name": "transferFrom",
78
+ "outputs": [
79
+ {
80
+ "name": "",
81
+ "type": "bool"
82
+ }
83
+ ],
84
+ "payable": false,
155
85
  "stateMutability": "nonpayable",
156
86
  "type": "function"
157
87
  },
158
88
  {
89
+ "constant": false,
159
90
  "inputs": [
160
91
  {
161
- "internalType": "address",
162
- "name": "account",
163
- "type": "address"
164
- },
165
- {
166
- "internalType": "uint256",
167
- "name": "amount",
92
+ "name": "wad",
168
93
  "type": "uint256"
169
94
  }
170
95
  ],
171
- "name": "burnFrom",
96
+ "name": "withdraw",
172
97
  "outputs": [],
98
+ "payable": false,
173
99
  "stateMutability": "nonpayable",
174
100
  "type": "function"
175
101
  },
176
102
  {
103
+ "constant": true,
177
104
  "inputs": [],
178
105
  "name": "decimals",
179
106
  "outputs": [
180
107
  {
181
- "internalType": "uint8",
182
108
  "name": "",
183
109
  "type": "uint8"
184
110
  }
185
111
  ],
112
+ "payable": false,
186
113
  "stateMutability": "view",
187
114
  "type": "function"
188
115
  },
189
116
  {
117
+ "constant": true,
190
118
  "inputs": [
191
119
  {
192
- "internalType": "address",
193
- "name": "spender",
120
+ "name": "",
194
121
  "type": "address"
195
- },
122
+ }
123
+ ],
124
+ "name": "balanceOf",
125
+ "outputs": [
196
126
  {
197
- "internalType": "uint256",
198
- "name": "subtractedValue",
127
+ "name": "",
199
128
  "type": "uint256"
200
129
  }
201
130
  ],
202
- "name": "decreaseAllowance",
131
+ "payable": false,
132
+ "stateMutability": "view",
133
+ "type": "function"
134
+ },
135
+ {
136
+ "constant": true,
137
+ "inputs": [],
138
+ "name": "symbol",
203
139
  "outputs": [
204
140
  {
205
- "internalType": "bool",
206
141
  "name": "",
207
- "type": "bool"
142
+ "type": "string"
208
143
  }
209
144
  ],
210
- "stateMutability": "nonpayable",
145
+ "payable": false,
146
+ "stateMutability": "view",
211
147
  "type": "function"
212
148
  },
213
149
  {
150
+ "constant": false,
214
151
  "inputs": [
215
152
  {
216
- "internalType": "address",
217
- "name": "spender",
153
+ "name": "dst",
218
154
  "type": "address"
219
155
  },
220
156
  {
221
- "internalType": "uint256",
222
- "name": "addedValue",
157
+ "name": "wad",
223
158
  "type": "uint256"
224
159
  }
225
160
  ],
226
- "name": "increaseAllowance",
161
+ "name": "transfer",
227
162
  "outputs": [
228
163
  {
229
- "internalType": "bool",
230
164
  "name": "",
231
165
  "type": "bool"
232
166
  }
233
167
  ],
168
+ "payable": false,
234
169
  "stateMutability": "nonpayable",
235
170
  "type": "function"
236
171
  },
237
172
  {
173
+ "constant": false,
174
+ "inputs": [],
175
+ "name": "deposit",
176
+ "outputs": [],
177
+ "payable": true,
178
+ "stateMutability": "payable",
179
+ "type": "function"
180
+ },
181
+ {
182
+ "constant": true,
238
183
  "inputs": [
239
184
  {
240
- "internalType": "address",
241
- "name": "_owner",
185
+ "name": "",
242
186
  "type": "address"
243
187
  },
244
188
  {
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
- },
259
- {
260
- "internalType": "uint256",
261
- "name": "_initialSupply",
262
- "type": "uint256"
189
+ "name": "",
190
+ "type": "address"
263
191
  }
264
192
  ],
265
- "name": "initialize",
266
- "outputs": [],
267
- "stateMutability": "nonpayable",
268
- "type": "function"
269
- },
270
- {
271
- "inputs": [],
272
- "name": "maxSupply",
193
+ "name": "allowance",
273
194
  "outputs": [
274
195
  {
275
- "internalType": "uint256",
276
196
  "name": "",
277
197
  "type": "uint256"
278
198
  }
279
199
  ],
200
+ "payable": false,
280
201
  "stateMutability": "view",
281
202
  "type": "function"
282
203
  },
283
204
  {
284
- "inputs": [],
285
- "name": "name",
286
- "outputs": [
287
- {
288
- "internalType": "string",
289
- "name": "",
290
- "type": "string"
291
- }
292
- ],
293
- "stateMutability": "view",
294
- "type": "function"
205
+ "payable": true,
206
+ "stateMutability": "payable",
207
+ "type": "fallback"
295
208
  },
296
209
  {
297
- "inputs": [],
298
- "name": "symbol",
299
- "outputs": [
210
+ "anonymous": false,
211
+ "inputs": [
300
212
  {
301
- "internalType": "string",
302
- "name": "",
303
- "type": "string"
213
+ "indexed": true,
214
+ "name": "src",
215
+ "type": "address"
216
+ },
217
+ {
218
+ "indexed": true,
219
+ "name": "guy",
220
+ "type": "address"
221
+ },
222
+ {
223
+ "indexed": false,
224
+ "name": "wad",
225
+ "type": "uint256"
304
226
  }
305
227
  ],
306
- "stateMutability": "view",
307
- "type": "function"
228
+ "name": "Approval",
229
+ "type": "event"
308
230
  },
309
231
  {
310
- "inputs": [],
311
- "name": "totalSupply",
312
- "outputs": [
232
+ "anonymous": false,
233
+ "inputs": [
313
234
  {
314
- "internalType": "uint256",
315
- "name": "",
235
+ "indexed": true,
236
+ "name": "src",
237
+ "type": "address"
238
+ },
239
+ {
240
+ "indexed": true,
241
+ "name": "dst",
242
+ "type": "address"
243
+ },
244
+ {
245
+ "indexed": false,
246
+ "name": "wad",
316
247
  "type": "uint256"
317
248
  }
318
249
  ],
319
- "stateMutability": "view",
320
- "type": "function"
250
+ "name": "Transfer",
251
+ "type": "event"
321
252
  },
322
253
  {
254
+ "anonymous": false,
323
255
  "inputs": [
324
256
  {
325
- "internalType": "address",
326
- "name": "to",
257
+ "indexed": true,
258
+ "name": "dst",
327
259
  "type": "address"
328
260
  },
329
261
  {
330
- "internalType": "uint256",
331
- "name": "amount",
262
+ "indexed": false,
263
+ "name": "wad",
332
264
  "type": "uint256"
333
265
  }
334
266
  ],
335
- "name": "transfer",
336
- "outputs": [
337
- {
338
- "internalType": "bool",
339
- "name": "",
340
- "type": "bool"
341
- }
342
- ],
343
- "stateMutability": "nonpayable",
344
- "type": "function"
267
+ "name": "Deposit",
268
+ "type": "event"
345
269
  },
346
270
  {
271
+ "anonymous": false,
347
272
  "inputs": [
348
273
  {
349
- "internalType": "address",
350
- "name": "from",
351
- "type": "address"
352
- },
353
- {
354
- "internalType": "address",
355
- "name": "to",
274
+ "indexed": true,
275
+ "name": "src",
356
276
  "type": "address"
357
277
  },
358
278
  {
359
- "internalType": "uint256",
360
- "name": "amount",
279
+ "indexed": false,
280
+ "name": "wad",
361
281
  "type": "uint256"
362
282
  }
363
283
  ],
364
- "name": "transferFrom",
365
- "outputs": [
366
- {
367
- "internalType": "bool",
368
- "name": "",
369
- "type": "bool"
370
- }
371
- ],
372
- "stateMutability": "nonpayable",
373
- "type": "function"
284
+ "name": "Withdrawal",
285
+ "type": "event"
374
286
  }
375
287
  ] as const satisfies Abi;
376
288
 
377
289
  /**
378
- * Type-safe ABI for StandardToken_json
290
+ * Type-safe ABI for WETH9_json
379
291
  */
380
- export type StandardToken_jsonAbi = typeof StandardToken_jsonAbi;
292
+ export type WETH9_jsonAbi = typeof WETH9_jsonAbi;
381
293
 
382
294
  /**
383
- * Contract instance type for StandardToken_json
295
+ * Contract instance type for WETH9_json
384
296
  */
385
297
  // Use any for contract type to avoid complex viem type issues
386
298
  // The runtime behavior is type-safe through viem's ABI typing
387
- export type StandardToken_jsonContract = any;
299
+ export type WETH9_jsonContract = any;
388
300
 
389
301
  /**
390
- * StandardToken_json Contract Class
302
+ * WETH9_json Contract Class
391
303
  *
392
304
  * Provides a class-based API similar to TypeChain for interacting with the contract.
393
305
  *
@@ -395,12 +307,12 @@ export type StandardToken_jsonContract = any;
395
307
  * ```typescript
396
308
  * import { createPublicClient, createWalletClient, http } from 'viem';
397
309
  * import { mainnet } from 'viem/chains';
398
- * import { StandardToken_json } from 'StandardToken_json';
310
+ * import { WETH9_json } from 'WETH9_json';
399
311
  *
400
312
  * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
401
313
  * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
402
314
  *
403
- * const contract = new StandardToken_json('0x...', { publicClient, walletClient });
315
+ * const contract = new WETH9_json('0x...', { publicClient, walletClient });
404
316
  *
405
317
  * // Read functions
406
318
  * const result = await contract.balanceOf('0x...');
@@ -418,8 +330,8 @@ export type StandardToken_jsonContract = any;
418
330
  * });
419
331
  * ```
420
332
  */
421
- export class StandardToken_json {
422
- private contract: StandardToken_jsonContract;
333
+ export class WETH9_json {
334
+ private contract: WETH9_jsonContract;
423
335
  private contractAddress: Address;
424
336
  private publicClient: PublicClient;
425
337
 
@@ -434,7 +346,7 @@ export class StandardToken_json {
434
346
  this.publicClient = clients.publicClient;
435
347
  this.contract = getContract({
436
348
  address,
437
- abi: StandardToken_jsonAbi,
349
+ abi: WETH9_jsonAbi,
438
350
  client: {
439
351
  public: clients.publicClient,
440
352
  wallet: clients.walletClient,
@@ -452,24 +364,24 @@ export class StandardToken_json {
452
364
  /**
453
365
  * Get the underlying viem contract instance
454
366
  */
455
- getContract(): StandardToken_jsonContract {
367
+ getContract(): WETH9_jsonContract {
456
368
  return this.contract;
457
369
  }
458
370
 
459
371
  /**
460
- * allowance
372
+ * name
461
373
  * view
462
374
  */
463
- async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
464
- return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
375
+ async name(): Promise<string> {
376
+ return this.contract.read.name() as Promise<string>;
465
377
  }
466
378
 
467
379
  /**
468
- * balanceOf
380
+ * totalSupply
469
381
  * view
470
382
  */
471
- async balanceOf(account: `0x${string}`): Promise<bigint> {
472
- return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
383
+ async totalSupply(): Promise<bigint> {
384
+ return this.contract.read.totalSupply() as Promise<bigint>;
473
385
  }
474
386
 
475
387
  /**
@@ -481,19 +393,11 @@ export class StandardToken_json {
481
393
  }
482
394
 
483
395
  /**
484
- * maxSupply
485
- * view
486
- */
487
- async maxSupply(): Promise<bigint> {
488
- return this.contract.read.maxSupply() as Promise<bigint>;
489
- }
490
-
491
- /**
492
- * name
396
+ * balanceOf
493
397
  * view
494
398
  */
495
- async name(): Promise<string> {
496
- return this.contract.read.name() as Promise<string>;
399
+ async balanceOf(arg0: `0x${string}`): Promise<bigint> {
400
+ return this.contract.read.balanceOf([arg0] as const) as Promise<bigint>;
497
401
  }
498
402
 
499
403
  /**
@@ -505,11 +409,11 @@ export class StandardToken_json {
505
409
  }
506
410
 
507
411
  /**
508
- * totalSupply
412
+ * allowance
509
413
  * view
510
414
  */
511
- async totalSupply(): Promise<bigint> {
512
- return this.contract.read.totalSupply() as Promise<bigint>;
415
+ async allowance(arg0: `0x${string}`, arg1: `0x${string}`): Promise<bigint> {
416
+ return this.contract.read.allowance([arg0, arg1] as const) as Promise<bigint>;
513
417
  }
514
418
 
515
419
  /**
@@ -517,53 +421,7 @@ export class StandardToken_json {
517
421
  * nonpayable
518
422
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
519
423
  */
520
- async approve(spender: `0x${string}`, amount: bigint, options?: {
521
- accessList?: import('viem').AccessList;
522
- authorizationList?: import('viem').AuthorizationList;
523
- chain?: import('viem').Chain | null;
524
- dataSuffix?: `0x${string}`;
525
- gas?: bigint;
526
- gasPrice?: bigint;
527
- maxFeePerGas?: bigint;
528
- maxPriorityFeePerGas?: bigint;
529
- nonce?: number;
530
- value?: bigint;
531
- }): Promise<`0x${string}`> {
532
- if (!this.contract.write) {
533
- throw new Error('Wallet client is required for write operations');
534
- }
535
- return this.contract.write.approve([spender, amount] as const, options) as Promise<`0x${string}`>;
536
- }
537
-
538
- /**
539
- * burn
540
- * nonpayable
541
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
542
- */
543
- async burn(amount: bigint, options?: {
544
- accessList?: import('viem').AccessList;
545
- authorizationList?: import('viem').AuthorizationList;
546
- chain?: import('viem').Chain | null;
547
- dataSuffix?: `0x${string}`;
548
- gas?: bigint;
549
- gasPrice?: bigint;
550
- maxFeePerGas?: bigint;
551
- maxPriorityFeePerGas?: bigint;
552
- nonce?: number;
553
- value?: bigint;
554
- }): Promise<`0x${string}`> {
555
- if (!this.contract.write) {
556
- throw new Error('Wallet client is required for write operations');
557
- }
558
- return this.contract.write.burn([amount] as const, options) as Promise<`0x${string}`>;
559
- }
560
-
561
- /**
562
- * burnFrom
563
- * nonpayable
564
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
565
- */
566
- async burnFrom(account: `0x${string}`, amount: bigint, options?: {
424
+ async approve(guy: `0x${string}`, wad: bigint, options?: {
567
425
  accessList?: import('viem').AccessList;
568
426
  authorizationList?: import('viem').AuthorizationList;
569
427
  chain?: import('viem').Chain | null;
@@ -578,38 +436,15 @@ export class StandardToken_json {
578
436
  if (!this.contract.write) {
579
437
  throw new Error('Wallet client is required for write operations');
580
438
  }
581
- return this.contract.write.burnFrom([account, amount] as const, options) as Promise<`0x${string}`>;
439
+ return this.contract.write.approve([guy, wad] as const, options) as Promise<`0x${string}`>;
582
440
  }
583
441
 
584
442
  /**
585
- * decreaseAllowance
586
- * nonpayable
587
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
588
- */
589
- async decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
590
- accessList?: import('viem').AccessList;
591
- authorizationList?: import('viem').AuthorizationList;
592
- chain?: import('viem').Chain | null;
593
- dataSuffix?: `0x${string}`;
594
- gas?: bigint;
595
- gasPrice?: bigint;
596
- maxFeePerGas?: bigint;
597
- maxPriorityFeePerGas?: bigint;
598
- nonce?: number;
599
- value?: bigint;
600
- }): Promise<`0x${string}`> {
601
- if (!this.contract.write) {
602
- throw new Error('Wallet client is required for write operations');
603
- }
604
- return this.contract.write.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<`0x${string}`>;
605
- }
606
-
607
- /**
608
- * increaseAllowance
443
+ * transferFrom
609
444
  * nonpayable
610
445
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
611
446
  */
612
- async increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
447
+ async transferFrom(src: `0x${string}`, dst: `0x${string}`, wad: bigint, options?: {
613
448
  accessList?: import('viem').AccessList;
614
449
  authorizationList?: import('viem').AuthorizationList;
615
450
  chain?: import('viem').Chain | null;
@@ -624,15 +459,15 @@ export class StandardToken_json {
624
459
  if (!this.contract.write) {
625
460
  throw new Error('Wallet client is required for write operations');
626
461
  }
627
- return this.contract.write.increaseAllowance([spender, addedValue] as const, options) as Promise<`0x${string}`>;
462
+ return this.contract.write.transferFrom([src, dst, wad] as const, options) as Promise<`0x${string}`>;
628
463
  }
629
464
 
630
465
  /**
631
- * initialize
466
+ * withdraw
632
467
  * nonpayable
633
468
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
634
469
  */
635
- async initialize(_owner: `0x${string}`, _name: string, _symbol: string, _decimals: bigint, _initialSupply: bigint, options?: {
470
+ async withdraw(wad: bigint, options?: {
636
471
  accessList?: import('viem').AccessList;
637
472
  authorizationList?: import('viem').AuthorizationList;
638
473
  chain?: import('viem').Chain | null;
@@ -647,7 +482,7 @@ export class StandardToken_json {
647
482
  if (!this.contract.write) {
648
483
  throw new Error('Wallet client is required for write operations');
649
484
  }
650
- return this.contract.write.initialize([_owner, _name, _symbol, _decimals, _initialSupply] as const, options) as Promise<`0x${string}`>;
485
+ return this.contract.write.withdraw([wad] as const, options) as Promise<`0x${string}`>;
651
486
  }
652
487
 
653
488
  /**
@@ -655,7 +490,7 @@ export class StandardToken_json {
655
490
  * nonpayable
656
491
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
657
492
  */
658
- async transfer(to: `0x${string}`, amount: bigint, options?: {
493
+ async transfer(dst: `0x${string}`, wad: bigint, options?: {
659
494
  accessList?: import('viem').AccessList;
660
495
  authorizationList?: import('viem').AuthorizationList;
661
496
  chain?: import('viem').Chain | null;
@@ -670,15 +505,15 @@ export class StandardToken_json {
670
505
  if (!this.contract.write) {
671
506
  throw new Error('Wallet client is required for write operations');
672
507
  }
673
- return this.contract.write.transfer([to, amount] as const, options) as Promise<`0x${string}`>;
508
+ return this.contract.write.transfer([dst, wad] as const, options) as Promise<`0x${string}`>;
674
509
  }
675
510
 
676
511
  /**
677
- * transferFrom
678
- * nonpayable
512
+ * deposit
513
+ * payable
679
514
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
680
515
  */
681
- async transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
516
+ async deposit(options?: {
682
517
  accessList?: import('viem').AccessList;
683
518
  authorizationList?: import('viem').AuthorizationList;
684
519
  chain?: import('viem').Chain | null;
@@ -693,7 +528,7 @@ export class StandardToken_json {
693
528
  if (!this.contract.write) {
694
529
  throw new Error('Wallet client is required for write operations');
695
530
  }
696
- return this.contract.write.transferFrom([from, to, amount] as const, options) as Promise<`0x${string}`>;
531
+ return this.contract.write.deposit(options) as Promise<`0x${string}`>;
697
532
  }
698
533
 
699
534
 
@@ -717,7 +552,7 @@ export class StandardToken_json {
717
552
  * Returns gas estimate and result without sending transaction
718
553
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
719
554
  */
720
- async approve(spender: `0x${string}`, amount: bigint, options?: {
555
+ async approve(guy: `0x${string}`, wad: bigint, options?: {
721
556
  accessList?: import('viem').AccessList;
722
557
  authorizationList?: import('viem').AuthorizationList;
723
558
  chain?: import('viem').Chain | null;
@@ -729,71 +564,14 @@ export class StandardToken_json {
729
564
  nonce?: number;
730
565
  value?: bigint;
731
566
  }): Promise<boolean> {
732
- return contract.simulate.approve([spender, amount] as const, options) as Promise<boolean>;
733
- },
734
- /**
735
- * Simulate burn
736
- * Returns gas estimate and result without sending transaction
737
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
738
- */
739
- async burn(amount: bigint, options?: {
740
- accessList?: import('viem').AccessList;
741
- authorizationList?: import('viem').AuthorizationList;
742
- chain?: import('viem').Chain | null;
743
- dataSuffix?: `0x${string}`;
744
- gas?: bigint;
745
- gasPrice?: bigint;
746
- maxFeePerGas?: bigint;
747
- maxPriorityFeePerGas?: bigint;
748
- nonce?: number;
749
- value?: bigint;
750
- }): Promise<void> {
751
- return contract.simulate.burn([amount] as const, options) as Promise<void>;
567
+ return contract.simulate.approve([guy, wad] as const, options) as Promise<boolean>;
752
568
  },
753
569
  /**
754
- * Simulate burnFrom
755
- * Returns gas estimate and result without sending transaction
756
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
757
- */
758
- async burnFrom(account: `0x${string}`, amount: bigint, options?: {
759
- accessList?: import('viem').AccessList;
760
- authorizationList?: import('viem').AuthorizationList;
761
- chain?: import('viem').Chain | null;
762
- dataSuffix?: `0x${string}`;
763
- gas?: bigint;
764
- gasPrice?: bigint;
765
- maxFeePerGas?: bigint;
766
- maxPriorityFeePerGas?: bigint;
767
- nonce?: number;
768
- value?: bigint;
769
- }): Promise<void> {
770
- return contract.simulate.burnFrom([account, amount] as const, options) as Promise<void>;
771
- },
772
- /**
773
- * Simulate decreaseAllowance
774
- * Returns gas estimate and result without sending transaction
775
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
776
- */
777
- async decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
778
- accessList?: import('viem').AccessList;
779
- authorizationList?: import('viem').AuthorizationList;
780
- chain?: import('viem').Chain | null;
781
- dataSuffix?: `0x${string}`;
782
- gas?: bigint;
783
- gasPrice?: bigint;
784
- maxFeePerGas?: bigint;
785
- maxPriorityFeePerGas?: bigint;
786
- nonce?: number;
787
- value?: bigint;
788
- }): Promise<boolean> {
789
- return contract.simulate.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<boolean>;
790
- },
791
- /**
792
- * Simulate increaseAllowance
570
+ * Simulate transferFrom
793
571
  * Returns gas estimate and result without sending transaction
794
572
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
795
573
  */
796
- async increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
574
+ async transferFrom(src: `0x${string}`, dst: `0x${string}`, wad: bigint, options?: {
797
575
  accessList?: import('viem').AccessList;
798
576
  authorizationList?: import('viem').AuthorizationList;
799
577
  chain?: import('viem').Chain | null;
@@ -805,14 +583,14 @@ export class StandardToken_json {
805
583
  nonce?: number;
806
584
  value?: bigint;
807
585
  }): Promise<boolean> {
808
- return contract.simulate.increaseAllowance([spender, addedValue] as const, options) as Promise<boolean>;
586
+ return contract.simulate.transferFrom([src, dst, wad] as const, options) as Promise<boolean>;
809
587
  },
810
588
  /**
811
- * Simulate initialize
589
+ * Simulate withdraw
812
590
  * Returns gas estimate and result without sending transaction
813
591
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
814
592
  */
815
- async initialize(_owner: `0x${string}`, _name: string, _symbol: string, _decimals: bigint, _initialSupply: bigint, options?: {
593
+ async withdraw(wad: bigint, options?: {
816
594
  accessList?: import('viem').AccessList;
817
595
  authorizationList?: import('viem').AuthorizationList;
818
596
  chain?: import('viem').Chain | null;
@@ -824,14 +602,14 @@ export class StandardToken_json {
824
602
  nonce?: number;
825
603
  value?: bigint;
826
604
  }): Promise<void> {
827
- return contract.simulate.initialize([_owner, _name, _symbol, _decimals, _initialSupply] as const, options) as Promise<void>;
605
+ return contract.simulate.withdraw([wad] as const, options) as Promise<void>;
828
606
  },
829
607
  /**
830
608
  * Simulate transfer
831
609
  * Returns gas estimate and result without sending transaction
832
610
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
833
611
  */
834
- async transfer(to: `0x${string}`, amount: bigint, options?: {
612
+ async transfer(dst: `0x${string}`, wad: bigint, options?: {
835
613
  accessList?: import('viem').AccessList;
836
614
  authorizationList?: import('viem').AuthorizationList;
837
615
  chain?: import('viem').Chain | null;
@@ -843,14 +621,14 @@ export class StandardToken_json {
843
621
  nonce?: number;
844
622
  value?: bigint;
845
623
  }): Promise<boolean> {
846
- return contract.simulate.transfer([to, amount] as const, options) as Promise<boolean>;
624
+ return contract.simulate.transfer([dst, wad] as const, options) as Promise<boolean>;
847
625
  },
848
626
  /**
849
- * Simulate transferFrom
627
+ * Simulate deposit
850
628
  * Returns gas estimate and result without sending transaction
851
629
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
852
630
  */
853
- async transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
631
+ async deposit(options?: {
854
632
  accessList?: import('viem').AccessList;
855
633
  authorizationList?: import('viem').AuthorizationList;
856
634
  chain?: import('viem').Chain | null;
@@ -861,8 +639,8 @@ export class StandardToken_json {
861
639
  maxPriorityFeePerGas?: bigint;
862
640
  nonce?: number;
863
641
  value?: bigint;
864
- }): Promise<boolean> {
865
- return contract.simulate.transferFrom([from, to, amount] as const, options) as Promise<boolean>;
642
+ }): Promise<void> {
643
+ return contract.simulate.deposit(options) as Promise<void>;
866
644
  }
867
645
  };
868
646
  }
@@ -887,10 +665,10 @@ export class StandardToken_json {
887
665
  * @param filter Optional filter for indexed parameters
888
666
  * @returns Unwatch function to stop listening
889
667
  */
890
- Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
668
+ Approval: (callback: (event: { src: `0x${string}`; guy: `0x${string}`; wad: bigint }) => void, filter?: { src: `0x${string}`; guy: `0x${string}` }) => {
891
669
  return this.publicClient.watchContractEvent({
892
670
  address: this.contractAddress,
893
- abi: StandardToken_jsonAbi,
671
+ abi: WETH9_jsonAbi,
894
672
  eventName: 'Approval',
895
673
  args: filter,
896
674
  onLogs: (logs: any[]) => {
@@ -901,17 +679,17 @@ export class StandardToken_json {
901
679
  }) as () => void;
902
680
  },
903
681
  /**
904
- * Watch Initialized events
682
+ * Watch Transfer events
905
683
  * @param callback Function to call when event is emitted
906
684
  * @param filter Optional filter for indexed parameters
907
685
  * @returns Unwatch function to stop listening
908
686
  */
909
- Initialized: (callback: (event: { version: bigint }) => void) => {
687
+ Transfer: (callback: (event: { src: `0x${string}`; dst: `0x${string}`; wad: bigint }) => void, filter?: { src: `0x${string}`; dst: `0x${string}` }) => {
910
688
  return this.publicClient.watchContractEvent({
911
689
  address: this.contractAddress,
912
- abi: StandardToken_jsonAbi,
913
- eventName: 'Initialized',
914
-
690
+ abi: WETH9_jsonAbi,
691
+ eventName: 'Transfer',
692
+ args: filter,
915
693
  onLogs: (logs: any[]) => {
916
694
  logs.forEach((log: any) => {
917
695
  callback(log.args as any);
@@ -920,16 +698,35 @@ export class StandardToken_json {
920
698
  }) as () => void;
921
699
  },
922
700
  /**
923
- * Watch Transfer events
701
+ * Watch Deposit events
924
702
  * @param callback Function to call when event is emitted
925
703
  * @param filter Optional filter for indexed parameters
926
704
  * @returns Unwatch function to stop listening
927
705
  */
928
- Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
706
+ Deposit: (callback: (event: { dst: `0x${string}`; wad: bigint }) => void, filter?: { dst: `0x${string}` }) => {
929
707
  return this.publicClient.watchContractEvent({
930
708
  address: this.contractAddress,
931
- abi: StandardToken_jsonAbi,
932
- eventName: 'Transfer',
709
+ abi: WETH9_jsonAbi,
710
+ eventName: 'Deposit',
711
+ args: filter,
712
+ onLogs: (logs: any[]) => {
713
+ logs.forEach((log: any) => {
714
+ callback(log.args as any);
715
+ });
716
+ },
717
+ }) as () => void;
718
+ },
719
+ /**
720
+ * Watch Withdrawal events
721
+ * @param callback Function to call when event is emitted
722
+ * @param filter Optional filter for indexed parameters
723
+ * @returns Unwatch function to stop listening
724
+ */
725
+ Withdrawal: (callback: (event: { src: `0x${string}`; wad: bigint }) => void, filter?: { src: `0x${string}` }) => {
726
+ return this.publicClient.watchContractEvent({
727
+ address: this.contractAddress,
728
+ abi: WETH9_jsonAbi,
729
+ eventName: 'Withdrawal',
933
730
  args: filter,
934
731
  onLogs: (logs: any[]) => {
935
732
  logs.forEach((log: any) => {