@gitmyabi/weth 1.0.1 → 1.0.2

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.
@@ -1,293 +1,381 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WETH9_json = exports.WETH9_jsonAbi = void 0;
3
+ exports.StandardToken_json = exports.StandardToken_jsonAbi = void 0;
4
4
  const viem_1 = require("viem");
5
5
  /**
6
- * WETH9_json ABI
6
+ * StandardToken_json ABI
7
7
  *
8
8
  * This ABI is typed using viem's type system for full type safety.
9
9
  */
10
- exports.WETH9_jsonAbi = [
10
+ exports.StandardToken_jsonAbi = [
11
11
  {
12
- "constant": true,
13
12
  "inputs": [],
14
- "name": "name",
13
+ "stateMutability": "nonpayable",
14
+ "type": "constructor"
15
+ },
16
+ {
17
+ "anonymous": false,
18
+ "inputs": [
19
+ {
20
+ "indexed": true,
21
+ "internalType": "address",
22
+ "name": "owner",
23
+ "type": "address"
24
+ },
25
+ {
26
+ "indexed": true,
27
+ "internalType": "address",
28
+ "name": "spender",
29
+ "type": "address"
30
+ },
31
+ {
32
+ "indexed": false,
33
+ "internalType": "uint256",
34
+ "name": "value",
35
+ "type": "uint256"
36
+ }
37
+ ],
38
+ "name": "Approval",
39
+ "type": "event"
40
+ },
41
+ {
42
+ "anonymous": false,
43
+ "inputs": [
44
+ {
45
+ "indexed": false,
46
+ "internalType": "uint8",
47
+ "name": "version",
48
+ "type": "uint8"
49
+ }
50
+ ],
51
+ "name": "Initialized",
52
+ "type": "event"
53
+ },
54
+ {
55
+ "anonymous": false,
56
+ "inputs": [
57
+ {
58
+ "indexed": true,
59
+ "internalType": "address",
60
+ "name": "from",
61
+ "type": "address"
62
+ },
63
+ {
64
+ "indexed": true,
65
+ "internalType": "address",
66
+ "name": "to",
67
+ "type": "address"
68
+ },
69
+ {
70
+ "indexed": false,
71
+ "internalType": "uint256",
72
+ "name": "value",
73
+ "type": "uint256"
74
+ }
75
+ ],
76
+ "name": "Transfer",
77
+ "type": "event"
78
+ },
79
+ {
80
+ "inputs": [
81
+ {
82
+ "internalType": "address",
83
+ "name": "owner",
84
+ "type": "address"
85
+ },
86
+ {
87
+ "internalType": "address",
88
+ "name": "spender",
89
+ "type": "address"
90
+ }
91
+ ],
92
+ "name": "allowance",
15
93
  "outputs": [
16
94
  {
95
+ "internalType": "uint256",
17
96
  "name": "",
18
- "type": "string"
97
+ "type": "uint256"
19
98
  }
20
99
  ],
21
- "payable": false,
22
100
  "stateMutability": "view",
23
101
  "type": "function"
24
102
  },
25
103
  {
26
- "constant": false,
27
104
  "inputs": [
28
105
  {
29
- "name": "guy",
106
+ "internalType": "address",
107
+ "name": "spender",
30
108
  "type": "address"
31
109
  },
32
110
  {
33
- "name": "wad",
111
+ "internalType": "uint256",
112
+ "name": "amount",
34
113
  "type": "uint256"
35
114
  }
36
115
  ],
37
116
  "name": "approve",
38
117
  "outputs": [
39
118
  {
119
+ "internalType": "bool",
40
120
  "name": "",
41
121
  "type": "bool"
42
122
  }
43
123
  ],
44
- "payable": false,
45
124
  "stateMutability": "nonpayable",
46
125
  "type": "function"
47
126
  },
48
127
  {
49
- "constant": true,
50
- "inputs": [],
51
- "name": "totalSupply",
128
+ "inputs": [
129
+ {
130
+ "internalType": "address",
131
+ "name": "account",
132
+ "type": "address"
133
+ }
134
+ ],
135
+ "name": "balanceOf",
52
136
  "outputs": [
53
137
  {
138
+ "internalType": "uint256",
54
139
  "name": "",
55
140
  "type": "uint256"
56
141
  }
57
142
  ],
58
- "payable": false,
59
143
  "stateMutability": "view",
60
144
  "type": "function"
61
145
  },
62
146
  {
63
- "constant": false,
64
147
  "inputs": [
65
148
  {
66
- "name": "src",
67
- "type": "address"
68
- },
69
- {
70
- "name": "dst",
71
- "type": "address"
72
- },
73
- {
74
- "name": "wad",
149
+ "internalType": "uint256",
150
+ "name": "amount",
75
151
  "type": "uint256"
76
152
  }
77
153
  ],
78
- "name": "transferFrom",
79
- "outputs": [
80
- {
81
- "name": "",
82
- "type": "bool"
83
- }
84
- ],
85
- "payable": false,
154
+ "name": "burn",
155
+ "outputs": [],
86
156
  "stateMutability": "nonpayable",
87
157
  "type": "function"
88
158
  },
89
159
  {
90
- "constant": false,
91
160
  "inputs": [
92
161
  {
93
- "name": "wad",
162
+ "internalType": "address",
163
+ "name": "account",
164
+ "type": "address"
165
+ },
166
+ {
167
+ "internalType": "uint256",
168
+ "name": "amount",
94
169
  "type": "uint256"
95
170
  }
96
171
  ],
97
- "name": "withdraw",
172
+ "name": "burnFrom",
98
173
  "outputs": [],
99
- "payable": false,
100
174
  "stateMutability": "nonpayable",
101
175
  "type": "function"
102
176
  },
103
177
  {
104
- "constant": true,
105
178
  "inputs": [],
106
179
  "name": "decimals",
107
180
  "outputs": [
108
181
  {
182
+ "internalType": "uint8",
109
183
  "name": "",
110
184
  "type": "uint8"
111
185
  }
112
186
  ],
113
- "payable": false,
114
187
  "stateMutability": "view",
115
188
  "type": "function"
116
189
  },
117
190
  {
118
- "constant": true,
119
191
  "inputs": [
120
192
  {
121
- "name": "",
193
+ "internalType": "address",
194
+ "name": "spender",
122
195
  "type": "address"
123
- }
124
- ],
125
- "name": "balanceOf",
126
- "outputs": [
196
+ },
127
197
  {
128
- "name": "",
198
+ "internalType": "uint256",
199
+ "name": "subtractedValue",
129
200
  "type": "uint256"
130
201
  }
131
202
  ],
132
- "payable": false,
133
- "stateMutability": "view",
134
- "type": "function"
135
- },
136
- {
137
- "constant": true,
138
- "inputs": [],
139
- "name": "symbol",
203
+ "name": "decreaseAllowance",
140
204
  "outputs": [
141
205
  {
206
+ "internalType": "bool",
142
207
  "name": "",
143
- "type": "string"
208
+ "type": "bool"
144
209
  }
145
210
  ],
146
- "payable": false,
147
- "stateMutability": "view",
211
+ "stateMutability": "nonpayable",
148
212
  "type": "function"
149
213
  },
150
214
  {
151
- "constant": false,
152
215
  "inputs": [
153
216
  {
154
- "name": "dst",
217
+ "internalType": "address",
218
+ "name": "spender",
155
219
  "type": "address"
156
220
  },
157
221
  {
158
- "name": "wad",
222
+ "internalType": "uint256",
223
+ "name": "addedValue",
159
224
  "type": "uint256"
160
225
  }
161
226
  ],
162
- "name": "transfer",
227
+ "name": "increaseAllowance",
163
228
  "outputs": [
164
229
  {
230
+ "internalType": "bool",
165
231
  "name": "",
166
232
  "type": "bool"
167
233
  }
168
234
  ],
169
- "payable": false,
170
235
  "stateMutability": "nonpayable",
171
236
  "type": "function"
172
237
  },
173
238
  {
174
- "constant": false,
175
- "inputs": [],
176
- "name": "deposit",
177
- "outputs": [],
178
- "payable": true,
179
- "stateMutability": "payable",
180
- "type": "function"
181
- },
182
- {
183
- "constant": true,
184
239
  "inputs": [
185
240
  {
186
- "name": "",
241
+ "internalType": "address",
242
+ "name": "_owner",
187
243
  "type": "address"
188
244
  },
189
245
  {
190
- "name": "",
191
- "type": "address"
246
+ "internalType": "string",
247
+ "name": "_name",
248
+ "type": "string"
249
+ },
250
+ {
251
+ "internalType": "string",
252
+ "name": "_symbol",
253
+ "type": "string"
254
+ },
255
+ {
256
+ "internalType": "uint8",
257
+ "name": "_decimals",
258
+ "type": "uint8"
259
+ },
260
+ {
261
+ "internalType": "uint256",
262
+ "name": "_initialSupply",
263
+ "type": "uint256"
192
264
  }
193
265
  ],
194
- "name": "allowance",
266
+ "name": "initialize",
267
+ "outputs": [],
268
+ "stateMutability": "nonpayable",
269
+ "type": "function"
270
+ },
271
+ {
272
+ "inputs": [],
273
+ "name": "maxSupply",
195
274
  "outputs": [
196
275
  {
276
+ "internalType": "uint256",
197
277
  "name": "",
198
278
  "type": "uint256"
199
279
  }
200
280
  ],
201
- "payable": false,
202
281
  "stateMutability": "view",
203
282
  "type": "function"
204
283
  },
205
284
  {
206
- "payable": true,
207
- "stateMutability": "payable",
208
- "type": "fallback"
285
+ "inputs": [],
286
+ "name": "name",
287
+ "outputs": [
288
+ {
289
+ "internalType": "string",
290
+ "name": "",
291
+ "type": "string"
292
+ }
293
+ ],
294
+ "stateMutability": "view",
295
+ "type": "function"
209
296
  },
210
297
  {
211
- "anonymous": false,
212
- "inputs": [
213
- {
214
- "indexed": true,
215
- "name": "src",
216
- "type": "address"
217
- },
218
- {
219
- "indexed": true,
220
- "name": "guy",
221
- "type": "address"
222
- },
298
+ "inputs": [],
299
+ "name": "symbol",
300
+ "outputs": [
223
301
  {
224
- "indexed": false,
225
- "name": "wad",
226
- "type": "uint256"
302
+ "internalType": "string",
303
+ "name": "",
304
+ "type": "string"
227
305
  }
228
306
  ],
229
- "name": "Approval",
230
- "type": "event"
307
+ "stateMutability": "view",
308
+ "type": "function"
231
309
  },
232
310
  {
233
- "anonymous": false,
234
- "inputs": [
235
- {
236
- "indexed": true,
237
- "name": "src",
238
- "type": "address"
239
- },
240
- {
241
- "indexed": true,
242
- "name": "dst",
243
- "type": "address"
244
- },
311
+ "inputs": [],
312
+ "name": "totalSupply",
313
+ "outputs": [
245
314
  {
246
- "indexed": false,
247
- "name": "wad",
315
+ "internalType": "uint256",
316
+ "name": "",
248
317
  "type": "uint256"
249
318
  }
250
319
  ],
251
- "name": "Transfer",
252
- "type": "event"
320
+ "stateMutability": "view",
321
+ "type": "function"
253
322
  },
254
323
  {
255
- "anonymous": false,
256
324
  "inputs": [
257
325
  {
258
- "indexed": true,
259
- "name": "dst",
326
+ "internalType": "address",
327
+ "name": "to",
260
328
  "type": "address"
261
329
  },
262
330
  {
263
- "indexed": false,
264
- "name": "wad",
331
+ "internalType": "uint256",
332
+ "name": "amount",
265
333
  "type": "uint256"
266
334
  }
267
335
  ],
268
- "name": "Deposit",
269
- "type": "event"
336
+ "name": "transfer",
337
+ "outputs": [
338
+ {
339
+ "internalType": "bool",
340
+ "name": "",
341
+ "type": "bool"
342
+ }
343
+ ],
344
+ "stateMutability": "nonpayable",
345
+ "type": "function"
270
346
  },
271
347
  {
272
- "anonymous": false,
273
348
  "inputs": [
274
349
  {
275
- "indexed": true,
276
- "name": "src",
350
+ "internalType": "address",
351
+ "name": "from",
277
352
  "type": "address"
278
353
  },
279
354
  {
280
- "indexed": false,
281
- "name": "wad",
355
+ "internalType": "address",
356
+ "name": "to",
357
+ "type": "address"
358
+ },
359
+ {
360
+ "internalType": "uint256",
361
+ "name": "amount",
282
362
  "type": "uint256"
283
363
  }
284
364
  ],
285
- "name": "Withdrawal",
286
- "type": "event"
365
+ "name": "transferFrom",
366
+ "outputs": [
367
+ {
368
+ "internalType": "bool",
369
+ "name": "",
370
+ "type": "bool"
371
+ }
372
+ ],
373
+ "stateMutability": "nonpayable",
374
+ "type": "function"
287
375
  }
288
376
  ];
289
377
  /**
290
- * WETH9_json Contract Class
378
+ * StandardToken_json Contract Class
291
379
  *
292
380
  * Provides a class-based API similar to TypeChain for interacting with the contract.
293
381
  *
@@ -295,12 +383,12 @@ exports.WETH9_jsonAbi = [
295
383
  * ```typescript
296
384
  * import { createPublicClient, createWalletClient, http } from 'viem';
297
385
  * import { mainnet } from 'viem/chains';
298
- * import { WETH9_json } from 'WETH9_json';
386
+ * import { StandardToken_json } from 'StandardToken_json';
299
387
  *
300
388
  * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
301
389
  * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
302
390
  *
303
- * const contract = new WETH9_json('0x...', { publicClient, walletClient });
391
+ * const contract = new StandardToken_json('0x...', { publicClient, walletClient });
304
392
  *
305
393
  * // Read functions
306
394
  * const result = await contract.balanceOf('0x...');
@@ -318,13 +406,13 @@ exports.WETH9_jsonAbi = [
318
406
  * });
319
407
  * ```
320
408
  */
321
- class WETH9_json {
409
+ class StandardToken_json {
322
410
  constructor(address, clients) {
323
411
  this.contractAddress = address;
324
412
  this.publicClient = clients.publicClient;
325
413
  this.contract = (0, viem_1.getContract)({
326
414
  address,
327
- abi: exports.WETH9_jsonAbi,
415
+ abi: exports.StandardToken_jsonAbi,
328
416
  client: {
329
417
  public: clients.publicClient,
330
418
  wallet: clients.walletClient,
@@ -344,18 +432,18 @@ class WETH9_json {
344
432
  return this.contract;
345
433
  }
346
434
  /**
347
- * name
435
+ * allowance
348
436
  * view
349
437
  */
350
- async name() {
351
- return this.contract.read.name();
438
+ async allowance(owner, spender) {
439
+ return this.contract.read.allowance([owner, spender]);
352
440
  }
353
441
  /**
354
- * totalSupply
442
+ * balanceOf
355
443
  * view
356
444
  */
357
- async totalSupply() {
358
- return this.contract.read.totalSupply();
445
+ async balanceOf(account) {
446
+ return this.contract.read.balanceOf([account]);
359
447
  }
360
448
  /**
361
449
  * decimals
@@ -365,11 +453,18 @@ class WETH9_json {
365
453
  return this.contract.read.decimals();
366
454
  }
367
455
  /**
368
- * balanceOf
456
+ * maxSupply
457
+ * view
458
+ */
459
+ async maxSupply() {
460
+ return this.contract.read.maxSupply();
461
+ }
462
+ /**
463
+ * name
369
464
  * view
370
465
  */
371
- async balanceOf(arg0) {
372
- return this.contract.read.balanceOf([arg0]);
466
+ async name() {
467
+ return this.contract.read.name();
373
468
  }
374
469
  /**
375
470
  * symbol
@@ -379,66 +474,99 @@ class WETH9_json {
379
474
  return this.contract.read.symbol();
380
475
  }
381
476
  /**
382
- * allowance
477
+ * totalSupply
383
478
  * view
384
479
  */
385
- async allowance(arg0, arg1) {
386
- return this.contract.read.allowance([arg0, arg1]);
480
+ async totalSupply() {
481
+ return this.contract.read.totalSupply();
387
482
  }
388
483
  /**
389
484
  * approve
390
485
  * nonpayable
391
486
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
392
487
  */
393
- async approve(guy, wad, options) {
488
+ async approve(spender, amount, options) {
394
489
  if (!this.contract.write) {
395
490
  throw new Error('Wallet client is required for write operations');
396
491
  }
397
- return this.contract.write.approve([guy, wad], options);
492
+ return this.contract.write.approve([spender, amount], options);
398
493
  }
399
494
  /**
400
- * transferFrom
495
+ * burn
401
496
  * nonpayable
402
497
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
403
498
  */
404
- async transferFrom(src, dst, wad, options) {
499
+ async burn(amount, options) {
405
500
  if (!this.contract.write) {
406
501
  throw new Error('Wallet client is required for write operations');
407
502
  }
408
- return this.contract.write.transferFrom([src, dst, wad], options);
503
+ return this.contract.write.burn([amount], options);
409
504
  }
410
505
  /**
411
- * withdraw
506
+ * burnFrom
412
507
  * nonpayable
413
508
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
414
509
  */
415
- async withdraw(wad, options) {
510
+ async burnFrom(account, amount, options) {
416
511
  if (!this.contract.write) {
417
512
  throw new Error('Wallet client is required for write operations');
418
513
  }
419
- return this.contract.write.withdraw([wad], options);
514
+ return this.contract.write.burnFrom([account, amount], options);
515
+ }
516
+ /**
517
+ * decreaseAllowance
518
+ * nonpayable
519
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
520
+ */
521
+ async decreaseAllowance(spender, subtractedValue, options) {
522
+ if (!this.contract.write) {
523
+ throw new Error('Wallet client is required for write operations');
524
+ }
525
+ return this.contract.write.decreaseAllowance([spender, subtractedValue], options);
526
+ }
527
+ /**
528
+ * increaseAllowance
529
+ * nonpayable
530
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
531
+ */
532
+ async increaseAllowance(spender, addedValue, options) {
533
+ if (!this.contract.write) {
534
+ throw new Error('Wallet client is required for write operations');
535
+ }
536
+ return this.contract.write.increaseAllowance([spender, addedValue], options);
537
+ }
538
+ /**
539
+ * initialize
540
+ * nonpayable
541
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
542
+ */
543
+ async initialize(_owner, _name, _symbol, _decimals, _initialSupply, options) {
544
+ if (!this.contract.write) {
545
+ throw new Error('Wallet client is required for write operations');
546
+ }
547
+ return this.contract.write.initialize([_owner, _name, _symbol, _decimals, _initialSupply], options);
420
548
  }
421
549
  /**
422
550
  * transfer
423
551
  * nonpayable
424
552
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
425
553
  */
426
- async transfer(dst, wad, options) {
554
+ async transfer(to, amount, options) {
427
555
  if (!this.contract.write) {
428
556
  throw new Error('Wallet client is required for write operations');
429
557
  }
430
- return this.contract.write.transfer([dst, wad], options);
558
+ return this.contract.write.transfer([to, amount], options);
431
559
  }
432
560
  /**
433
- * deposit
434
- * payable
561
+ * transferFrom
562
+ * nonpayable
435
563
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
436
564
  */
437
- async deposit(options) {
565
+ async transferFrom(from, to, amount, options) {
438
566
  if (!this.contract.write) {
439
567
  throw new Error('Wallet client is required for write operations');
440
568
  }
441
- return this.contract.write.deposit(options);
569
+ return this.contract.write.transferFrom([from, to, amount], options);
442
570
  }
443
571
  /**
444
572
  * Simulate contract write operations (dry-run without sending transaction)
@@ -459,40 +587,64 @@ class WETH9_json {
459
587
  * Returns gas estimate and result without sending transaction
460
588
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
461
589
  */
462
- async approve(guy, wad, options) {
463
- return contract.simulate.approve([guy, wad], options);
590
+ async approve(spender, amount, options) {
591
+ return contract.simulate.approve([spender, amount], options);
464
592
  },
465
593
  /**
466
- * Simulate transferFrom
594
+ * Simulate burn
595
+ * Returns gas estimate and result without sending transaction
596
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
597
+ */
598
+ async burn(amount, options) {
599
+ return contract.simulate.burn([amount], options);
600
+ },
601
+ /**
602
+ * Simulate burnFrom
603
+ * Returns gas estimate and result without sending transaction
604
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
605
+ */
606
+ async burnFrom(account, amount, options) {
607
+ return contract.simulate.burnFrom([account, amount], options);
608
+ },
609
+ /**
610
+ * Simulate decreaseAllowance
467
611
  * Returns gas estimate and result without sending transaction
468
612
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
469
613
  */
470
- async transferFrom(src, dst, wad, options) {
471
- return contract.simulate.transferFrom([src, dst, wad], options);
614
+ async decreaseAllowance(spender, subtractedValue, options) {
615
+ return contract.simulate.decreaseAllowance([spender, subtractedValue], options);
472
616
  },
473
617
  /**
474
- * Simulate withdraw
618
+ * Simulate increaseAllowance
475
619
  * Returns gas estimate and result without sending transaction
476
620
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
477
621
  */
478
- async withdraw(wad, options) {
479
- return contract.simulate.withdraw([wad], options);
622
+ async increaseAllowance(spender, addedValue, options) {
623
+ return contract.simulate.increaseAllowance([spender, addedValue], options);
624
+ },
625
+ /**
626
+ * Simulate initialize
627
+ * Returns gas estimate and result without sending transaction
628
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
629
+ */
630
+ async initialize(_owner, _name, _symbol, _decimals, _initialSupply, options) {
631
+ return contract.simulate.initialize([_owner, _name, _symbol, _decimals, _initialSupply], options);
480
632
  },
481
633
  /**
482
634
  * Simulate transfer
483
635
  * Returns gas estimate and result without sending transaction
484
636
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
485
637
  */
486
- async transfer(dst, wad, options) {
487
- return contract.simulate.transfer([dst, wad], options);
638
+ async transfer(to, amount, options) {
639
+ return contract.simulate.transfer([to, amount], options);
488
640
  },
489
641
  /**
490
- * Simulate deposit
642
+ * Simulate transferFrom
491
643
  * Returns gas estimate and result without sending transaction
492
644
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
493
645
  */
494
- async deposit(options) {
495
- return contract.simulate.deposit(options);
646
+ async transferFrom(from, to, amount, options) {
647
+ return contract.simulate.transferFrom([from, to, amount], options);
496
648
  }
497
649
  };
498
650
  }
@@ -519,7 +671,7 @@ class WETH9_json {
519
671
  Approval: (callback, filter) => {
520
672
  return this.publicClient.watchContractEvent({
521
673
  address: this.contractAddress,
522
- abi: exports.WETH9_jsonAbi,
674
+ abi: exports.StandardToken_jsonAbi,
523
675
  eventName: 'Approval',
524
676
  args: filter,
525
677
  onLogs: (logs) => {
@@ -530,17 +682,16 @@ class WETH9_json {
530
682
  });
531
683
  },
532
684
  /**
533
- * Watch Transfer events
685
+ * Watch Initialized events
534
686
  * @param callback Function to call when event is emitted
535
687
  * @param filter Optional filter for indexed parameters
536
688
  * @returns Unwatch function to stop listening
537
689
  */
538
- Transfer: (callback, filter) => {
690
+ Initialized: (callback) => {
539
691
  return this.publicClient.watchContractEvent({
540
692
  address: this.contractAddress,
541
- abi: exports.WETH9_jsonAbi,
542
- eventName: 'Transfer',
543
- args: filter,
693
+ abi: exports.StandardToken_jsonAbi,
694
+ eventName: 'Initialized',
544
695
  onLogs: (logs) => {
545
696
  logs.forEach((log) => {
546
697
  callback(log.args);
@@ -549,35 +700,16 @@ class WETH9_json {
549
700
  });
550
701
  },
551
702
  /**
552
- * Watch Deposit events
553
- * @param callback Function to call when event is emitted
554
- * @param filter Optional filter for indexed parameters
555
- * @returns Unwatch function to stop listening
556
- */
557
- Deposit: (callback, filter) => {
558
- return this.publicClient.watchContractEvent({
559
- address: this.contractAddress,
560
- abi: exports.WETH9_jsonAbi,
561
- eventName: 'Deposit',
562
- args: filter,
563
- onLogs: (logs) => {
564
- logs.forEach((log) => {
565
- callback(log.args);
566
- });
567
- },
568
- });
569
- },
570
- /**
571
- * Watch Withdrawal events
703
+ * Watch Transfer events
572
704
  * @param callback Function to call when event is emitted
573
705
  * @param filter Optional filter for indexed parameters
574
706
  * @returns Unwatch function to stop listening
575
707
  */
576
- Withdrawal: (callback, filter) => {
708
+ Transfer: (callback, filter) => {
577
709
  return this.publicClient.watchContractEvent({
578
710
  address: this.contractAddress,
579
- abi: exports.WETH9_jsonAbi,
580
- eventName: 'Withdrawal',
711
+ abi: exports.StandardToken_jsonAbi,
712
+ eventName: 'Transfer',
581
713
  args: filter,
582
714
  onLogs: (logs) => {
583
715
  logs.forEach((log) => {
@@ -589,4 +721,4 @@ class WETH9_json {
589
721
  };
590
722
  }
591
723
  }
592
- exports.WETH9_json = WETH9_json;
724
+ exports.StandardToken_json = StandardToken_json;