@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.
@@ -1,232 +1,117 @@
1
1
  import type { Address, PublicClient, WalletClient } from 'viem';
2
2
  /**
3
- * Name_json ABI
3
+ * Proxy_json ABI
4
4
  *
5
5
  * This ABI is typed using viem's type system for full type safety.
6
6
  */
7
- export declare const Name_jsonAbi: readonly [{
8
- readonly constant: true;
9
- readonly inputs: readonly [];
10
- readonly name: "name";
11
- readonly outputs: readonly [{
12
- readonly name: "";
13
- readonly type: "string";
14
- }];
15
- readonly payable: false;
16
- readonly stateMutability: "view";
17
- readonly type: "function";
18
- }, {
19
- readonly constant: false;
7
+ export declare const Proxy_jsonAbi: readonly [{
20
8
  readonly inputs: readonly [{
21
- readonly name: "guy";
9
+ readonly internalType: "address";
10
+ readonly name: "_admin";
22
11
  readonly type: "address";
23
- }, {
24
- readonly name: "wad";
25
- readonly type: "uint256";
26
12
  }];
27
- readonly name: "approve";
28
- readonly outputs: readonly [{
29
- readonly name: "";
30
- readonly type: "bool";
31
- }];
32
- readonly payable: false;
33
13
  readonly stateMutability: "nonpayable";
34
- readonly type: "function";
35
- }, {
36
- readonly constant: true;
37
- readonly inputs: readonly [];
38
- readonly name: "totalSupply";
39
- readonly outputs: readonly [{
40
- readonly name: "";
41
- readonly type: "uint256";
42
- }];
43
- readonly payable: false;
44
- readonly stateMutability: "view";
45
- readonly type: "function";
14
+ readonly type: "constructor";
46
15
  }, {
47
- readonly constant: false;
16
+ readonly anonymous: false;
48
17
  readonly inputs: readonly [{
49
- readonly name: "src";
18
+ readonly indexed: false;
19
+ readonly internalType: "address";
20
+ readonly name: "previousAdmin";
50
21
  readonly type: "address";
51
22
  }, {
52
- readonly name: "dst";
23
+ readonly indexed: false;
24
+ readonly internalType: "address";
25
+ readonly name: "newAdmin";
53
26
  readonly type: "address";
54
- }, {
55
- readonly name: "wad";
56
- readonly type: "uint256";
57
27
  }];
58
- readonly name: "transferFrom";
59
- readonly outputs: readonly [{
60
- readonly name: "";
61
- readonly type: "bool";
62
- }];
63
- readonly payable: false;
64
- readonly stateMutability: "nonpayable";
65
- readonly type: "function";
28
+ readonly name: "AdminChanged";
29
+ readonly type: "event";
66
30
  }, {
67
- readonly constant: false;
31
+ readonly anonymous: false;
68
32
  readonly inputs: readonly [{
69
- readonly name: "wad";
70
- readonly type: "uint256";
33
+ readonly indexed: true;
34
+ readonly internalType: "address";
35
+ readonly name: "implementation";
36
+ readonly type: "address";
71
37
  }];
72
- readonly name: "withdraw";
73
- readonly outputs: readonly [];
74
- readonly payable: false;
75
- readonly stateMutability: "nonpayable";
76
- readonly type: "function";
38
+ readonly name: "Upgraded";
39
+ readonly type: "event";
40
+ }, {
41
+ readonly stateMutability: "payable";
42
+ readonly type: "fallback";
77
43
  }, {
78
- readonly constant: true;
79
44
  readonly inputs: readonly [];
80
- readonly name: "decimals";
45
+ readonly name: "admin";
81
46
  readonly outputs: readonly [{
47
+ readonly internalType: "address";
82
48
  readonly name: "";
83
- readonly type: "uint8";
49
+ readonly type: "address";
84
50
  }];
85
- readonly payable: false;
86
- readonly stateMutability: "view";
51
+ readonly stateMutability: "nonpayable";
87
52
  readonly type: "function";
88
53
  }, {
89
- readonly constant: true;
90
54
  readonly inputs: readonly [{
91
- readonly name: "";
55
+ readonly internalType: "address";
56
+ readonly name: "_admin";
92
57
  readonly type: "address";
93
58
  }];
94
- readonly name: "balanceOf";
95
- readonly outputs: readonly [{
96
- readonly name: "";
97
- readonly type: "uint256";
98
- }];
99
- readonly payable: false;
100
- readonly stateMutability: "view";
59
+ readonly name: "changeAdmin";
60
+ readonly outputs: readonly [];
61
+ readonly stateMutability: "nonpayable";
101
62
  readonly type: "function";
102
63
  }, {
103
- readonly constant: true;
104
64
  readonly inputs: readonly [];
105
- readonly name: "symbol";
65
+ readonly name: "implementation";
106
66
  readonly outputs: readonly [{
67
+ readonly internalType: "address";
107
68
  readonly name: "";
108
- readonly type: "string";
69
+ readonly type: "address";
109
70
  }];
110
- readonly payable: false;
111
- readonly stateMutability: "view";
71
+ readonly stateMutability: "nonpayable";
112
72
  readonly type: "function";
113
73
  }, {
114
- readonly constant: false;
115
74
  readonly inputs: readonly [{
116
- readonly name: "dst";
75
+ readonly internalType: "address";
76
+ readonly name: "_implementation";
117
77
  readonly type: "address";
118
- }, {
119
- readonly name: "wad";
120
- readonly type: "uint256";
121
- }];
122
- readonly name: "transfer";
123
- readonly outputs: readonly [{
124
- readonly name: "";
125
- readonly type: "bool";
126
78
  }];
127
- readonly payable: false;
128
- readonly stateMutability: "nonpayable";
129
- readonly type: "function";
130
- }, {
131
- readonly constant: false;
132
- readonly inputs: readonly [];
133
- readonly name: "deposit";
79
+ readonly name: "upgradeTo";
134
80
  readonly outputs: readonly [];
135
- readonly payable: true;
136
- readonly stateMutability: "payable";
81
+ readonly stateMutability: "nonpayable";
137
82
  readonly type: "function";
138
83
  }, {
139
- readonly constant: true;
140
84
  readonly inputs: readonly [{
141
- readonly name: "";
85
+ readonly internalType: "address";
86
+ readonly name: "_implementation";
142
87
  readonly type: "address";
143
88
  }, {
144
- readonly name: "";
145
- readonly type: "address";
89
+ readonly internalType: "bytes";
90
+ readonly name: "_data";
91
+ readonly type: "bytes";
146
92
  }];
147
- readonly name: "allowance";
93
+ readonly name: "upgradeToAndCall";
148
94
  readonly outputs: readonly [{
95
+ readonly internalType: "bytes";
149
96
  readonly name: "";
150
- readonly type: "uint256";
97
+ readonly type: "bytes";
151
98
  }];
152
- readonly payable: false;
153
- readonly stateMutability: "view";
99
+ readonly stateMutability: "payable";
154
100
  readonly type: "function";
155
101
  }, {
156
- readonly payable: true;
157
102
  readonly stateMutability: "payable";
158
- readonly type: "fallback";
159
- }, {
160
- readonly anonymous: false;
161
- readonly inputs: readonly [{
162
- readonly indexed: true;
163
- readonly name: "src";
164
- readonly type: "address";
165
- }, {
166
- readonly indexed: true;
167
- readonly name: "guy";
168
- readonly type: "address";
169
- }, {
170
- readonly indexed: false;
171
- readonly name: "wad";
172
- readonly type: "uint256";
173
- }];
174
- readonly name: "Approval";
175
- readonly type: "event";
176
- }, {
177
- readonly anonymous: false;
178
- readonly inputs: readonly [{
179
- readonly indexed: true;
180
- readonly name: "src";
181
- readonly type: "address";
182
- }, {
183
- readonly indexed: true;
184
- readonly name: "dst";
185
- readonly type: "address";
186
- }, {
187
- readonly indexed: false;
188
- readonly name: "wad";
189
- readonly type: "uint256";
190
- }];
191
- readonly name: "Transfer";
192
- readonly type: "event";
193
- }, {
194
- readonly anonymous: false;
195
- readonly inputs: readonly [{
196
- readonly indexed: true;
197
- readonly name: "dst";
198
- readonly type: "address";
199
- }, {
200
- readonly indexed: false;
201
- readonly name: "wad";
202
- readonly type: "uint256";
203
- }];
204
- readonly name: "Deposit";
205
- readonly type: "event";
206
- }, {
207
- readonly anonymous: false;
208
- readonly inputs: readonly [{
209
- readonly indexed: true;
210
- readonly name: "src";
211
- readonly type: "address";
212
- }, {
213
- readonly indexed: false;
214
- readonly name: "wad";
215
- readonly type: "uint256";
216
- }];
217
- readonly name: "Withdrawal";
218
- readonly type: "event";
103
+ readonly type: "receive";
219
104
  }];
220
105
  /**
221
- * Type-safe ABI for Name_json
106
+ * Type-safe ABI for Proxy_json
222
107
  */
223
- export type Name_jsonAbi = typeof Name_jsonAbi;
108
+ export type Proxy_jsonAbi = typeof Proxy_jsonAbi;
224
109
  /**
225
- * Contract instance type for Name_json
110
+ * Contract instance type for Proxy_json
226
111
  */
227
- export type Name_jsonContract = any;
112
+ export type Proxy_jsonContract = any;
228
113
  /**
229
- * Name_json Contract Class
114
+ * Proxy_json Contract Class
230
115
  *
231
116
  * Provides a class-based API similar to TypeChain for interacting with the contract.
232
117
  *
@@ -234,12 +119,12 @@ export type Name_jsonContract = any;
234
119
  * ```typescript
235
120
  * import { createPublicClient, createWalletClient, http } from 'viem';
236
121
  * import { mainnet } from 'viem/chains';
237
- * import { Name_json } from 'Name_json';
122
+ * import { Proxy_json } from 'Proxy_json';
238
123
  *
239
124
  * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
240
125
  * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
241
126
  *
242
- * const contract = new Name_json('0x...', { publicClient, walletClient });
127
+ * const contract = new Proxy_json('0x...', { publicClient, walletClient });
243
128
  *
244
129
  * // Read functions
245
130
  * const result = await contract.balanceOf('0x...');
@@ -257,7 +142,7 @@ export type Name_jsonContract = any;
257
142
  * });
258
143
  * ```
259
144
  */
260
- export declare class Name_json {
145
+ export declare class Proxy_json {
261
146
  private contract;
262
147
  private contractAddress;
263
148
  private publicClient;
@@ -272,43 +157,13 @@ export declare class Name_json {
272
157
  /**
273
158
  * Get the underlying viem contract instance
274
159
  */
275
- getContract(): Name_jsonContract;
160
+ getContract(): Proxy_jsonContract;
276
161
  /**
277
- * name
278
- * view
279
- */
280
- name(): Promise<string>;
281
- /**
282
- * totalSupply
283
- * view
284
- */
285
- totalSupply(): Promise<bigint>;
286
- /**
287
- * decimals
288
- * view
289
- */
290
- decimals(): Promise<bigint>;
291
- /**
292
- * balanceOf
293
- * view
294
- */
295
- balanceOf(arg0: `0x${string}`): Promise<bigint>;
296
- /**
297
- * symbol
298
- * view
299
- */
300
- symbol(): Promise<string>;
301
- /**
302
- * allowance
303
- * view
304
- */
305
- allowance(arg0: `0x${string}`, arg1: `0x${string}`): Promise<bigint>;
306
- /**
307
- * approve
162
+ * admin
308
163
  * nonpayable
309
164
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
310
165
  */
311
- approve(guy: `0x${string}`, wad: bigint, options?: {
166
+ admin(options?: {
312
167
  accessList?: import('viem').AccessList;
313
168
  authorizationList?: import('viem').AuthorizationList;
314
169
  chain?: import('viem').Chain | null;
@@ -321,11 +176,11 @@ export declare class Name_json {
321
176
  value?: bigint;
322
177
  }): Promise<`0x${string}`>;
323
178
  /**
324
- * transferFrom
179
+ * changeAdmin
325
180
  * nonpayable
326
181
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
327
182
  */
328
- transferFrom(src: `0x${string}`, dst: `0x${string}`, wad: bigint, options?: {
183
+ changeAdmin(_admin: `0x${string}`, options?: {
329
184
  accessList?: import('viem').AccessList;
330
185
  authorizationList?: import('viem').AuthorizationList;
331
186
  chain?: import('viem').Chain | null;
@@ -338,11 +193,11 @@ export declare class Name_json {
338
193
  value?: bigint;
339
194
  }): Promise<`0x${string}`>;
340
195
  /**
341
- * withdraw
196
+ * implementation
342
197
  * nonpayable
343
198
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
344
199
  */
345
- withdraw(wad: bigint, options?: {
200
+ implementation(options?: {
346
201
  accessList?: import('viem').AccessList;
347
202
  authorizationList?: import('viem').AuthorizationList;
348
203
  chain?: import('viem').Chain | null;
@@ -355,11 +210,11 @@ export declare class Name_json {
355
210
  value?: bigint;
356
211
  }): Promise<`0x${string}`>;
357
212
  /**
358
- * transfer
213
+ * upgradeTo
359
214
  * nonpayable
360
215
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
361
216
  */
362
- transfer(dst: `0x${string}`, wad: bigint, options?: {
217
+ upgradeTo(_implementation: `0x${string}`, options?: {
363
218
  accessList?: import('viem').AccessList;
364
219
  authorizationList?: import('viem').AuthorizationList;
365
220
  chain?: import('viem').Chain | null;
@@ -372,11 +227,11 @@ export declare class Name_json {
372
227
  value?: bigint;
373
228
  }): Promise<`0x${string}`>;
374
229
  /**
375
- * deposit
230
+ * upgradeToAndCall
376
231
  * payable
377
232
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
378
233
  */
379
- deposit(options?: {
234
+ upgradeToAndCall(_implementation: `0x${string}`, _data: `0x${string}`, options?: {
380
235
  accessList?: import('viem').AccessList;
381
236
  authorizationList?: import('viem').AuthorizationList;
382
237
  chain?: import('viem').Chain | null;
@@ -398,11 +253,11 @@ export declare class Name_json {
398
253
  */
399
254
  get simulate(): {
400
255
  /**
401
- * Simulate approve
256
+ * Simulate admin
402
257
  * Returns gas estimate and result without sending transaction
403
258
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
404
259
  */
405
- approve(guy: `0x${string}`, wad: bigint, options?: {
260
+ admin(options?: {
406
261
  accessList?: import("viem").AccessList;
407
262
  authorizationList?: import("viem").AuthorizationList;
408
263
  chain?: import("viem").Chain | null;
@@ -413,13 +268,13 @@ export declare class Name_json {
413
268
  maxPriorityFeePerGas?: bigint;
414
269
  nonce?: number;
415
270
  value?: bigint;
416
- }): Promise<boolean>;
271
+ }): Promise<`0x${string}`>;
417
272
  /**
418
- * Simulate transferFrom
273
+ * Simulate changeAdmin
419
274
  * Returns gas estimate and result without sending transaction
420
275
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
421
276
  */
422
- transferFrom(src: `0x${string}`, dst: `0x${string}`, wad: bigint, options?: {
277
+ changeAdmin(_admin: `0x${string}`, options?: {
423
278
  accessList?: import("viem").AccessList;
424
279
  authorizationList?: import("viem").AuthorizationList;
425
280
  chain?: import("viem").Chain | null;
@@ -430,13 +285,13 @@ export declare class Name_json {
430
285
  maxPriorityFeePerGas?: bigint;
431
286
  nonce?: number;
432
287
  value?: bigint;
433
- }): Promise<boolean>;
288
+ }): Promise<void>;
434
289
  /**
435
- * Simulate withdraw
290
+ * Simulate implementation
436
291
  * Returns gas estimate and result without sending transaction
437
292
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
438
293
  */
439
- withdraw(wad: bigint, options?: {
294
+ implementation(options?: {
440
295
  accessList?: import("viem").AccessList;
441
296
  authorizationList?: import("viem").AuthorizationList;
442
297
  chain?: import("viem").Chain | null;
@@ -447,13 +302,13 @@ export declare class Name_json {
447
302
  maxPriorityFeePerGas?: bigint;
448
303
  nonce?: number;
449
304
  value?: bigint;
450
- }): Promise<void>;
305
+ }): Promise<`0x${string}`>;
451
306
  /**
452
- * Simulate transfer
307
+ * Simulate upgradeTo
453
308
  * Returns gas estimate and result without sending transaction
454
309
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
455
310
  */
456
- transfer(dst: `0x${string}`, wad: bigint, options?: {
311
+ upgradeTo(_implementation: `0x${string}`, options?: {
457
312
  accessList?: import("viem").AccessList;
458
313
  authorizationList?: import("viem").AuthorizationList;
459
314
  chain?: import("viem").Chain | null;
@@ -464,13 +319,13 @@ export declare class Name_json {
464
319
  maxPriorityFeePerGas?: bigint;
465
320
  nonce?: number;
466
321
  value?: bigint;
467
- }): Promise<boolean>;
322
+ }): Promise<void>;
468
323
  /**
469
- * Simulate deposit
324
+ * Simulate upgradeToAndCall
470
325
  * Returns gas estimate and result without sending transaction
471
326
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
472
327
  */
473
- deposit(options?: {
328
+ upgradeToAndCall(_implementation: `0x${string}`, _data: `0x${string}`, options?: {
474
329
  accessList?: import("viem").AccessList;
475
330
  authorizationList?: import("viem").AuthorizationList;
476
331
  chain?: import("viem").Chain | null;
@@ -481,7 +336,7 @@ export declare class Name_json {
481
336
  maxPriorityFeePerGas?: bigint;
482
337
  nonce?: number;
483
338
  value?: bigint;
484
- }): Promise<void>;
339
+ }): Promise<`0x${string}`>;
485
340
  };
486
341
  /**
487
342
  * Watch contract events
@@ -497,56 +352,25 @@ export declare class Name_json {
497
352
  */
498
353
  get watch(): {
499
354
  /**
500
- * Watch Approval events
355
+ * Watch AdminChanged events
501
356
  * @param callback Function to call when event is emitted
502
357
  * @param filter Optional filter for indexed parameters
503
358
  * @returns Unwatch function to stop listening
504
359
  */
505
- Approval: (callback: (event: {
506
- src: `0x${string}`;
507
- guy: `0x${string}`;
508
- wad: bigint;
509
- }) => void, filter?: {
510
- src: `0x${string}`;
511
- guy: `0x${string}`;
512
- }) => () => void;
513
- /**
514
- * Watch Transfer events
515
- * @param callback Function to call when event is emitted
516
- * @param filter Optional filter for indexed parameters
517
- * @returns Unwatch function to stop listening
518
- */
519
- Transfer: (callback: (event: {
520
- src: `0x${string}`;
521
- dst: `0x${string}`;
522
- wad: bigint;
523
- }) => void, filter?: {
524
- src: `0x${string}`;
525
- dst: `0x${string}`;
526
- }) => () => void;
527
- /**
528
- * Watch Deposit events
529
- * @param callback Function to call when event is emitted
530
- * @param filter Optional filter for indexed parameters
531
- * @returns Unwatch function to stop listening
532
- */
533
- Deposit: (callback: (event: {
534
- dst: `0x${string}`;
535
- wad: bigint;
536
- }) => void, filter?: {
537
- dst: `0x${string}`;
538
- }) => () => void;
360
+ AdminChanged: (callback: (event: {
361
+ previousAdmin: `0x${string}`;
362
+ newAdmin: `0x${string}`;
363
+ }) => void) => () => void;
539
364
  /**
540
- * Watch Withdrawal events
365
+ * Watch Upgraded events
541
366
  * @param callback Function to call when event is emitted
542
367
  * @param filter Optional filter for indexed parameters
543
368
  * @returns Unwatch function to stop listening
544
369
  */
545
- Withdrawal: (callback: (event: {
546
- src: `0x${string}`;
547
- wad: bigint;
370
+ Upgraded: (callback: (event: {
371
+ implementation: `0x${string}`;
548
372
  }) => void, filter?: {
549
- src: `0x${string}`;
373
+ implementation: `0x${string}`;
550
374
  }) => () => void;
551
375
  };
552
376
  }