@gitmyabi/weth 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.
@@ -2,304 +2,154 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
2
2
  import { getContract } from 'viem';
3
3
 
4
4
  /**
5
- * Name_json ABI
5
+ * Proxy_json ABI
6
6
  *
7
7
  * This ABI is typed using viem's type system for full type safety.
8
8
  */
9
- export const Name_jsonAbi = [
9
+ export const Proxy_jsonAbi = [
10
10
  {
11
- "constant": true,
12
- "inputs": [],
13
- "name": "name",
14
- "outputs": [
15
- {
16
- "name": "",
17
- "type": "string"
18
- }
19
- ],
20
- "payable": false,
21
- "stateMutability": "view",
22
- "type": "function"
23
- },
24
- {
25
- "constant": false,
26
11
  "inputs": [
27
12
  {
28
- "name": "guy",
13
+ "internalType": "address",
14
+ "name": "_admin",
29
15
  "type": "address"
30
- },
31
- {
32
- "name": "wad",
33
- "type": "uint256"
34
16
  }
35
17
  ],
36
- "name": "approve",
37
- "outputs": [
38
- {
39
- "name": "",
40
- "type": "bool"
41
- }
42
- ],
43
- "payable": false,
44
18
  "stateMutability": "nonpayable",
45
- "type": "function"
46
- },
47
- {
48
- "constant": true,
49
- "inputs": [],
50
- "name": "totalSupply",
51
- "outputs": [
52
- {
53
- "name": "",
54
- "type": "uint256"
55
- }
56
- ],
57
- "payable": false,
58
- "stateMutability": "view",
59
- "type": "function"
19
+ "type": "constructor"
60
20
  },
61
21
  {
62
- "constant": false,
22
+ "anonymous": false,
63
23
  "inputs": [
64
24
  {
65
- "name": "src",
25
+ "indexed": false,
26
+ "internalType": "address",
27
+ "name": "previousAdmin",
66
28
  "type": "address"
67
29
  },
68
30
  {
69
- "name": "dst",
31
+ "indexed": false,
32
+ "internalType": "address",
33
+ "name": "newAdmin",
70
34
  "type": "address"
71
- },
72
- {
73
- "name": "wad",
74
- "type": "uint256"
75
35
  }
76
36
  ],
77
- "name": "transferFrom",
78
- "outputs": [
79
- {
80
- "name": "",
81
- "type": "bool"
82
- }
83
- ],
84
- "payable": false,
85
- "stateMutability": "nonpayable",
86
- "type": "function"
37
+ "name": "AdminChanged",
38
+ "type": "event"
87
39
  },
88
40
  {
89
- "constant": false,
41
+ "anonymous": false,
90
42
  "inputs": [
91
43
  {
92
- "name": "wad",
93
- "type": "uint256"
44
+ "indexed": true,
45
+ "internalType": "address",
46
+ "name": "implementation",
47
+ "type": "address"
94
48
  }
95
49
  ],
96
- "name": "withdraw",
97
- "outputs": [],
98
- "payable": false,
99
- "stateMutability": "nonpayable",
100
- "type": "function"
50
+ "name": "Upgraded",
51
+ "type": "event"
52
+ },
53
+ {
54
+ "stateMutability": "payable",
55
+ "type": "fallback"
101
56
  },
102
57
  {
103
- "constant": true,
104
58
  "inputs": [],
105
- "name": "decimals",
59
+ "name": "admin",
106
60
  "outputs": [
107
61
  {
62
+ "internalType": "address",
108
63
  "name": "",
109
- "type": "uint8"
64
+ "type": "address"
110
65
  }
111
66
  ],
112
- "payable": false,
113
- "stateMutability": "view",
67
+ "stateMutability": "nonpayable",
114
68
  "type": "function"
115
69
  },
116
70
  {
117
- "constant": true,
118
71
  "inputs": [
119
72
  {
120
- "name": "",
73
+ "internalType": "address",
74
+ "name": "_admin",
121
75
  "type": "address"
122
76
  }
123
77
  ],
124
- "name": "balanceOf",
125
- "outputs": [
126
- {
127
- "name": "",
128
- "type": "uint256"
129
- }
130
- ],
131
- "payable": false,
132
- "stateMutability": "view",
78
+ "name": "changeAdmin",
79
+ "outputs": [],
80
+ "stateMutability": "nonpayable",
133
81
  "type": "function"
134
82
  },
135
83
  {
136
- "constant": true,
137
84
  "inputs": [],
138
- "name": "symbol",
85
+ "name": "implementation",
139
86
  "outputs": [
140
87
  {
88
+ "internalType": "address",
141
89
  "name": "",
142
- "type": "string"
90
+ "type": "address"
143
91
  }
144
92
  ],
145
- "payable": false,
146
- "stateMutability": "view",
93
+ "stateMutability": "nonpayable",
147
94
  "type": "function"
148
95
  },
149
96
  {
150
- "constant": false,
151
97
  "inputs": [
152
98
  {
153
- "name": "dst",
99
+ "internalType": "address",
100
+ "name": "_implementation",
154
101
  "type": "address"
155
- },
156
- {
157
- "name": "wad",
158
- "type": "uint256"
159
- }
160
- ],
161
- "name": "transfer",
162
- "outputs": [
163
- {
164
- "name": "",
165
- "type": "bool"
166
102
  }
167
103
  ],
168
- "payable": false,
169
- "stateMutability": "nonpayable",
170
- "type": "function"
171
- },
172
- {
173
- "constant": false,
174
- "inputs": [],
175
- "name": "deposit",
104
+ "name": "upgradeTo",
176
105
  "outputs": [],
177
- "payable": true,
178
- "stateMutability": "payable",
106
+ "stateMutability": "nonpayable",
179
107
  "type": "function"
180
108
  },
181
109
  {
182
- "constant": true,
183
110
  "inputs": [
184
111
  {
185
- "name": "",
112
+ "internalType": "address",
113
+ "name": "_implementation",
186
114
  "type": "address"
187
115
  },
188
116
  {
189
- "name": "",
190
- "type": "address"
117
+ "internalType": "bytes",
118
+ "name": "_data",
119
+ "type": "bytes"
191
120
  }
192
121
  ],
193
- "name": "allowance",
122
+ "name": "upgradeToAndCall",
194
123
  "outputs": [
195
124
  {
125
+ "internalType": "bytes",
196
126
  "name": "",
197
- "type": "uint256"
127
+ "type": "bytes"
198
128
  }
199
129
  ],
200
- "payable": false,
201
- "stateMutability": "view",
130
+ "stateMutability": "payable",
202
131
  "type": "function"
203
132
  },
204
133
  {
205
- "payable": true,
206
134
  "stateMutability": "payable",
207
- "type": "fallback"
208
- },
209
- {
210
- "anonymous": false,
211
- "inputs": [
212
- {
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"
226
- }
227
- ],
228
- "name": "Approval",
229
- "type": "event"
230
- },
231
- {
232
- "anonymous": false,
233
- "inputs": [
234
- {
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",
247
- "type": "uint256"
248
- }
249
- ],
250
- "name": "Transfer",
251
- "type": "event"
252
- },
253
- {
254
- "anonymous": false,
255
- "inputs": [
256
- {
257
- "indexed": true,
258
- "name": "dst",
259
- "type": "address"
260
- },
261
- {
262
- "indexed": false,
263
- "name": "wad",
264
- "type": "uint256"
265
- }
266
- ],
267
- "name": "Deposit",
268
- "type": "event"
269
- },
270
- {
271
- "anonymous": false,
272
- "inputs": [
273
- {
274
- "indexed": true,
275
- "name": "src",
276
- "type": "address"
277
- },
278
- {
279
- "indexed": false,
280
- "name": "wad",
281
- "type": "uint256"
282
- }
283
- ],
284
- "name": "Withdrawal",
285
- "type": "event"
135
+ "type": "receive"
286
136
  }
287
137
  ] as const satisfies Abi;
288
138
 
289
139
  /**
290
- * Type-safe ABI for Name_json
140
+ * Type-safe ABI for Proxy_json
291
141
  */
292
- export type Name_jsonAbi = typeof Name_jsonAbi;
142
+ export type Proxy_jsonAbi = typeof Proxy_jsonAbi;
293
143
 
294
144
  /**
295
- * Contract instance type for Name_json
145
+ * Contract instance type for Proxy_json
296
146
  */
297
147
  // Use any for contract type to avoid complex viem type issues
298
148
  // The runtime behavior is type-safe through viem's ABI typing
299
- export type Name_jsonContract = any;
149
+ export type Proxy_jsonContract = any;
300
150
 
301
151
  /**
302
- * Name_json Contract Class
152
+ * Proxy_json Contract Class
303
153
  *
304
154
  * Provides a class-based API similar to TypeChain for interacting with the contract.
305
155
  *
@@ -307,12 +157,12 @@ export type Name_jsonContract = any;
307
157
  * ```typescript
308
158
  * import { createPublicClient, createWalletClient, http } from 'viem';
309
159
  * import { mainnet } from 'viem/chains';
310
- * import { Name_json } from 'Name_json';
160
+ * import { Proxy_json } from 'Proxy_json';
311
161
  *
312
162
  * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
313
163
  * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
314
164
  *
315
- * const contract = new Name_json('0x...', { publicClient, walletClient });
165
+ * const contract = new Proxy_json('0x...', { publicClient, walletClient });
316
166
  *
317
167
  * // Read functions
318
168
  * const result = await contract.balanceOf('0x...');
@@ -330,8 +180,8 @@ export type Name_jsonContract = any;
330
180
  * });
331
181
  * ```
332
182
  */
333
- export class Name_json {
334
- private contract: Name_jsonContract;
183
+ export class Proxy_json {
184
+ private contract: Proxy_jsonContract;
335
185
  private contractAddress: Address;
336
186
  private publicClient: PublicClient;
337
187
 
@@ -346,7 +196,7 @@ export class Name_json {
346
196
  this.publicClient = clients.publicClient;
347
197
  this.contract = getContract({
348
198
  address,
349
- abi: Name_jsonAbi,
199
+ abi: Proxy_jsonAbi,
350
200
  client: {
351
201
  public: clients.publicClient,
352
202
  wallet: clients.walletClient,
@@ -364,64 +214,18 @@ export class Name_json {
364
214
  /**
365
215
  * Get the underlying viem contract instance
366
216
  */
367
- getContract(): Name_jsonContract {
217
+ getContract(): Proxy_jsonContract {
368
218
  return this.contract;
369
219
  }
370
220
 
371
- /**
372
- * name
373
- * view
374
- */
375
- async name(): Promise<string> {
376
- return this.contract.read.name() as Promise<string>;
377
- }
378
-
379
- /**
380
- * totalSupply
381
- * view
382
- */
383
- async totalSupply(): Promise<bigint> {
384
- return this.contract.read.totalSupply() as Promise<bigint>;
385
- }
221
+ // No read functions
386
222
 
387
223
  /**
388
- * decimals
389
- * view
390
- */
391
- async decimals(): Promise<bigint> {
392
- return this.contract.read.decimals() as Promise<bigint>;
393
- }
394
-
395
- /**
396
- * balanceOf
397
- * view
398
- */
399
- async balanceOf(arg0: `0x${string}`): Promise<bigint> {
400
- return this.contract.read.balanceOf([arg0] as const) as Promise<bigint>;
401
- }
402
-
403
- /**
404
- * symbol
405
- * view
406
- */
407
- async symbol(): Promise<string> {
408
- return this.contract.read.symbol() as Promise<string>;
409
- }
410
-
411
- /**
412
- * allowance
413
- * view
414
- */
415
- async allowance(arg0: `0x${string}`, arg1: `0x${string}`): Promise<bigint> {
416
- return this.contract.read.allowance([arg0, arg1] as const) as Promise<bigint>;
417
- }
418
-
419
- /**
420
- * approve
224
+ * admin
421
225
  * nonpayable
422
226
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
423
227
  */
424
- async approve(guy: `0x${string}`, wad: bigint, options?: {
228
+ async admin(options?: {
425
229
  accessList?: import('viem').AccessList;
426
230
  authorizationList?: import('viem').AuthorizationList;
427
231
  chain?: import('viem').Chain | null;
@@ -436,15 +240,15 @@ export class Name_json {
436
240
  if (!this.contract.write) {
437
241
  throw new Error('Wallet client is required for write operations');
438
242
  }
439
- return this.contract.write.approve([guy, wad] as const, options) as Promise<`0x${string}`>;
243
+ return this.contract.write.admin(options) as Promise<`0x${string}`>;
440
244
  }
441
245
 
442
246
  /**
443
- * transferFrom
247
+ * changeAdmin
444
248
  * nonpayable
445
249
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
446
250
  */
447
- async transferFrom(src: `0x${string}`, dst: `0x${string}`, wad: bigint, options?: {
251
+ async changeAdmin(_admin: `0x${string}`, options?: {
448
252
  accessList?: import('viem').AccessList;
449
253
  authorizationList?: import('viem').AuthorizationList;
450
254
  chain?: import('viem').Chain | null;
@@ -459,15 +263,15 @@ export class Name_json {
459
263
  if (!this.contract.write) {
460
264
  throw new Error('Wallet client is required for write operations');
461
265
  }
462
- return this.contract.write.transferFrom([src, dst, wad] as const, options) as Promise<`0x${string}`>;
266
+ return this.contract.write.changeAdmin([_admin] as const, options) as Promise<`0x${string}`>;
463
267
  }
464
268
 
465
269
  /**
466
- * withdraw
270
+ * implementation
467
271
  * nonpayable
468
272
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
469
273
  */
470
- async withdraw(wad: bigint, options?: {
274
+ async implementation(options?: {
471
275
  accessList?: import('viem').AccessList;
472
276
  authorizationList?: import('viem').AuthorizationList;
473
277
  chain?: import('viem').Chain | null;
@@ -482,15 +286,15 @@ export class Name_json {
482
286
  if (!this.contract.write) {
483
287
  throw new Error('Wallet client is required for write operations');
484
288
  }
485
- return this.contract.write.withdraw([wad] as const, options) as Promise<`0x${string}`>;
289
+ return this.contract.write.implementation(options) as Promise<`0x${string}`>;
486
290
  }
487
291
 
488
292
  /**
489
- * transfer
293
+ * upgradeTo
490
294
  * nonpayable
491
295
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
492
296
  */
493
- async transfer(dst: `0x${string}`, wad: bigint, options?: {
297
+ async upgradeTo(_implementation: `0x${string}`, options?: {
494
298
  accessList?: import('viem').AccessList;
495
299
  authorizationList?: import('viem').AuthorizationList;
496
300
  chain?: import('viem').Chain | null;
@@ -505,15 +309,15 @@ export class Name_json {
505
309
  if (!this.contract.write) {
506
310
  throw new Error('Wallet client is required for write operations');
507
311
  }
508
- return this.contract.write.transfer([dst, wad] as const, options) as Promise<`0x${string}`>;
312
+ return this.contract.write.upgradeTo([_implementation] as const, options) as Promise<`0x${string}`>;
509
313
  }
510
314
 
511
315
  /**
512
- * deposit
316
+ * upgradeToAndCall
513
317
  * payable
514
318
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
515
319
  */
516
- async deposit(options?: {
320
+ async upgradeToAndCall(_implementation: `0x${string}`, _data: `0x${string}`, options?: {
517
321
  accessList?: import('viem').AccessList;
518
322
  authorizationList?: import('viem').AuthorizationList;
519
323
  chain?: import('viem').Chain | null;
@@ -528,7 +332,7 @@ export class Name_json {
528
332
  if (!this.contract.write) {
529
333
  throw new Error('Wallet client is required for write operations');
530
334
  }
531
- return this.contract.write.deposit(options) as Promise<`0x${string}`>;
335
+ return this.contract.write.upgradeToAndCall([_implementation, _data] as const, options) as Promise<`0x${string}`>;
532
336
  }
533
337
 
534
338
 
@@ -548,11 +352,11 @@ export class Name_json {
548
352
  }
549
353
  return {
550
354
  /**
551
- * Simulate approve
355
+ * Simulate admin
552
356
  * Returns gas estimate and result without sending transaction
553
357
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
554
358
  */
555
- async approve(guy: `0x${string}`, wad: bigint, options?: {
359
+ async admin(options?: {
556
360
  accessList?: import('viem').AccessList;
557
361
  authorizationList?: import('viem').AuthorizationList;
558
362
  chain?: import('viem').Chain | null;
@@ -563,15 +367,15 @@ export class Name_json {
563
367
  maxPriorityFeePerGas?: bigint;
564
368
  nonce?: number;
565
369
  value?: bigint;
566
- }): Promise<boolean> {
567
- return contract.simulate.approve([guy, wad] as const, options) as Promise<boolean>;
370
+ }): Promise<`0x${string}`> {
371
+ return contract.simulate.admin(options) as Promise<`0x${string}`>;
568
372
  },
569
373
  /**
570
- * Simulate transferFrom
374
+ * Simulate changeAdmin
571
375
  * Returns gas estimate and result without sending transaction
572
376
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
573
377
  */
574
- async transferFrom(src: `0x${string}`, dst: `0x${string}`, wad: bigint, options?: {
378
+ async changeAdmin(_admin: `0x${string}`, options?: {
575
379
  accessList?: import('viem').AccessList;
576
380
  authorizationList?: import('viem').AuthorizationList;
577
381
  chain?: import('viem').Chain | null;
@@ -582,15 +386,15 @@ export class Name_json {
582
386
  maxPriorityFeePerGas?: bigint;
583
387
  nonce?: number;
584
388
  value?: bigint;
585
- }): Promise<boolean> {
586
- return contract.simulate.transferFrom([src, dst, wad] as const, options) as Promise<boolean>;
389
+ }): Promise<void> {
390
+ return contract.simulate.changeAdmin([_admin] as const, options) as Promise<void>;
587
391
  },
588
392
  /**
589
- * Simulate withdraw
393
+ * Simulate implementation
590
394
  * Returns gas estimate and result without sending transaction
591
395
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
592
396
  */
593
- async withdraw(wad: bigint, options?: {
397
+ async implementation(options?: {
594
398
  accessList?: import('viem').AccessList;
595
399
  authorizationList?: import('viem').AuthorizationList;
596
400
  chain?: import('viem').Chain | null;
@@ -601,15 +405,15 @@ export class Name_json {
601
405
  maxPriorityFeePerGas?: bigint;
602
406
  nonce?: number;
603
407
  value?: bigint;
604
- }): Promise<void> {
605
- return contract.simulate.withdraw([wad] as const, options) as Promise<void>;
408
+ }): Promise<`0x${string}`> {
409
+ return contract.simulate.implementation(options) as Promise<`0x${string}`>;
606
410
  },
607
411
  /**
608
- * Simulate transfer
412
+ * Simulate upgradeTo
609
413
  * Returns gas estimate and result without sending transaction
610
414
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
611
415
  */
612
- async transfer(dst: `0x${string}`, wad: bigint, options?: {
416
+ async upgradeTo(_implementation: `0x${string}`, options?: {
613
417
  accessList?: import('viem').AccessList;
614
418
  authorizationList?: import('viem').AuthorizationList;
615
419
  chain?: import('viem').Chain | null;
@@ -620,15 +424,15 @@ export class Name_json {
620
424
  maxPriorityFeePerGas?: bigint;
621
425
  nonce?: number;
622
426
  value?: bigint;
623
- }): Promise<boolean> {
624
- return contract.simulate.transfer([dst, wad] as const, options) as Promise<boolean>;
427
+ }): Promise<void> {
428
+ return contract.simulate.upgradeTo([_implementation] as const, options) as Promise<void>;
625
429
  },
626
430
  /**
627
- * Simulate deposit
431
+ * Simulate upgradeToAndCall
628
432
  * Returns gas estimate and result without sending transaction
629
433
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
630
434
  */
631
- async deposit(options?: {
435
+ async upgradeToAndCall(_implementation: `0x${string}`, _data: `0x${string}`, options?: {
632
436
  accessList?: import('viem').AccessList;
633
437
  authorizationList?: import('viem').AuthorizationList;
634
438
  chain?: import('viem').Chain | null;
@@ -639,8 +443,8 @@ export class Name_json {
639
443
  maxPriorityFeePerGas?: bigint;
640
444
  nonce?: number;
641
445
  value?: bigint;
642
- }): Promise<void> {
643
- return contract.simulate.deposit(options) as Promise<void>;
446
+ }): Promise<`0x${string}`> {
447
+ return contract.simulate.upgradeToAndCall([_implementation, _data] as const, options) as Promise<`0x${string}`>;
644
448
  }
645
449
  };
646
450
  }
@@ -660,55 +464,17 @@ export class Name_json {
660
464
  get watch() {
661
465
  return {
662
466
  /**
663
- * Watch Approval events
467
+ * Watch AdminChanged events
664
468
  * @param callback Function to call when event is emitted
665
469
  * @param filter Optional filter for indexed parameters
666
470
  * @returns Unwatch function to stop listening
667
471
  */
668
- Approval: (callback: (event: { src: `0x${string}`; guy: `0x${string}`; wad: bigint }) => void, filter?: { src: `0x${string}`; guy: `0x${string}` }) => {
472
+ AdminChanged: (callback: (event: { previousAdmin: `0x${string}`; newAdmin: `0x${string}` }) => void) => {
669
473
  return this.publicClient.watchContractEvent({
670
474
  address: this.contractAddress,
671
- abi: Name_jsonAbi,
672
- eventName: 'Approval',
673
- args: filter,
674
- onLogs: (logs: any[]) => {
675
- logs.forEach((log: any) => {
676
- callback(log.args as any);
677
- });
678
- },
679
- }) as () => void;
680
- },
681
- /**
682
- * Watch Transfer events
683
- * @param callback Function to call when event is emitted
684
- * @param filter Optional filter for indexed parameters
685
- * @returns Unwatch function to stop listening
686
- */
687
- Transfer: (callback: (event: { src: `0x${string}`; dst: `0x${string}`; wad: bigint }) => void, filter?: { src: `0x${string}`; dst: `0x${string}` }) => {
688
- return this.publicClient.watchContractEvent({
689
- address: this.contractAddress,
690
- abi: Name_jsonAbi,
691
- eventName: 'Transfer',
692
- args: filter,
693
- onLogs: (logs: any[]) => {
694
- logs.forEach((log: any) => {
695
- callback(log.args as any);
696
- });
697
- },
698
- }) as () => void;
699
- },
700
- /**
701
- * Watch Deposit events
702
- * @param callback Function to call when event is emitted
703
- * @param filter Optional filter for indexed parameters
704
- * @returns Unwatch function to stop listening
705
- */
706
- Deposit: (callback: (event: { dst: `0x${string}`; wad: bigint }) => void, filter?: { dst: `0x${string}` }) => {
707
- return this.publicClient.watchContractEvent({
708
- address: this.contractAddress,
709
- abi: Name_jsonAbi,
710
- eventName: 'Deposit',
711
- args: filter,
475
+ abi: Proxy_jsonAbi,
476
+ eventName: 'AdminChanged',
477
+
712
478
  onLogs: (logs: any[]) => {
713
479
  logs.forEach((log: any) => {
714
480
  callback(log.args as any);
@@ -717,16 +483,16 @@ export class Name_json {
717
483
  }) as () => void;
718
484
  },
719
485
  /**
720
- * Watch Withdrawal events
486
+ * Watch Upgraded events
721
487
  * @param callback Function to call when event is emitted
722
488
  * @param filter Optional filter for indexed parameters
723
489
  * @returns Unwatch function to stop listening
724
490
  */
725
- Withdrawal: (callback: (event: { src: `0x${string}`; wad: bigint }) => void, filter?: { src: `0x${string}` }) => {
491
+ Upgraded: (callback: (event: { implementation: `0x${string}` }) => void, filter?: { implementation: `0x${string}` }) => {
726
492
  return this.publicClient.watchContractEvent({
727
493
  address: this.contractAddress,
728
- abi: Name_jsonAbi,
729
- eventName: 'Withdrawal',
494
+ abi: Proxy_jsonAbi,
495
+ eventName: 'Upgraded',
730
496
  args: filter,
731
497
  onLogs: (logs: any[]) => {
732
498
  logs.forEach((log: any) => {