@gitmyabi/arm-weth-steth 1.0.0

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.
@@ -0,0 +1,370 @@
1
+ import type { Address, PublicClient, WalletClient } from 'viem';
2
+ /**
3
+ * Proxy_json ABI
4
+ *
5
+ * This ABI is typed using viem's type system for full type safety.
6
+ */
7
+ export declare const Proxy_jsonAbi: readonly [{
8
+ readonly anonymous: false;
9
+ readonly inputs: readonly [{
10
+ readonly indexed: false;
11
+ readonly internalType: "address";
12
+ readonly name: "previousAdmin";
13
+ readonly type: "address";
14
+ }, {
15
+ readonly indexed: false;
16
+ readonly internalType: "address";
17
+ readonly name: "newAdmin";
18
+ readonly type: "address";
19
+ }];
20
+ readonly name: "AdminChanged";
21
+ readonly type: "event";
22
+ }, {
23
+ readonly anonymous: false;
24
+ readonly inputs: readonly [{
25
+ readonly indexed: true;
26
+ readonly internalType: "address";
27
+ readonly name: "implementation";
28
+ readonly type: "address";
29
+ }];
30
+ readonly name: "Upgraded";
31
+ readonly type: "event";
32
+ }, {
33
+ readonly stateMutability: "payable";
34
+ readonly type: "fallback";
35
+ }, {
36
+ readonly inputs: readonly [];
37
+ readonly name: "admin";
38
+ readonly outputs: readonly [{
39
+ readonly internalType: "address";
40
+ readonly name: "";
41
+ readonly type: "address";
42
+ }];
43
+ readonly stateMutability: "view";
44
+ readonly type: "function";
45
+ }, {
46
+ readonly inputs: readonly [];
47
+ readonly name: "implementation";
48
+ readonly outputs: readonly [{
49
+ readonly internalType: "address";
50
+ readonly name: "";
51
+ readonly type: "address";
52
+ }];
53
+ readonly stateMutability: "view";
54
+ readonly type: "function";
55
+ }, {
56
+ readonly inputs: readonly [{
57
+ readonly internalType: "address";
58
+ readonly name: "_logic";
59
+ readonly type: "address";
60
+ }, {
61
+ readonly internalType: "address";
62
+ readonly name: "_initOwner";
63
+ readonly type: "address";
64
+ }, {
65
+ readonly internalType: "bytes";
66
+ readonly name: "_data";
67
+ readonly type: "bytes";
68
+ }];
69
+ readonly name: "initialize";
70
+ readonly outputs: readonly [];
71
+ readonly stateMutability: "payable";
72
+ readonly type: "function";
73
+ }, {
74
+ readonly inputs: readonly [];
75
+ readonly name: "owner";
76
+ readonly outputs: readonly [{
77
+ readonly internalType: "address";
78
+ readonly name: "";
79
+ readonly type: "address";
80
+ }];
81
+ readonly stateMutability: "view";
82
+ readonly type: "function";
83
+ }, {
84
+ readonly inputs: readonly [{
85
+ readonly internalType: "address";
86
+ readonly name: "newOwner";
87
+ readonly type: "address";
88
+ }];
89
+ readonly name: "setOwner";
90
+ readonly outputs: readonly [];
91
+ readonly stateMutability: "nonpayable";
92
+ readonly type: "function";
93
+ }, {
94
+ readonly inputs: readonly [{
95
+ readonly internalType: "address";
96
+ readonly name: "newImplementation";
97
+ readonly type: "address";
98
+ }];
99
+ readonly name: "upgradeTo";
100
+ readonly outputs: readonly [];
101
+ readonly stateMutability: "nonpayable";
102
+ readonly type: "function";
103
+ }, {
104
+ readonly inputs: readonly [{
105
+ readonly internalType: "address";
106
+ readonly name: "newImplementation";
107
+ readonly type: "address";
108
+ }, {
109
+ readonly internalType: "bytes";
110
+ readonly name: "data";
111
+ readonly type: "bytes";
112
+ }];
113
+ readonly name: "upgradeToAndCall";
114
+ readonly outputs: readonly [];
115
+ readonly stateMutability: "payable";
116
+ readonly type: "function";
117
+ }];
118
+ /**
119
+ * Type-safe ABI for Proxy_json
120
+ */
121
+ export type Proxy_jsonAbi = typeof Proxy_jsonAbi;
122
+ /**
123
+ * Contract instance type for Proxy_json
124
+ */
125
+ export type Proxy_jsonContract = any;
126
+ /**
127
+ * Proxy_json Contract Class
128
+ *
129
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
130
+ *
131
+ * @example
132
+ * ```typescript
133
+ * import { createPublicClient, createWalletClient, http } from 'viem';
134
+ * import { mainnet } from 'viem/chains';
135
+ * import { Proxy_json } from 'Proxy_json';
136
+ *
137
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
138
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
139
+ *
140
+ * const contract = new Proxy_json('0x...', { publicClient, walletClient });
141
+ *
142
+ * // Read functions
143
+ * const result = await contract.balanceOf('0x...');
144
+ *
145
+ * // Write functions
146
+ * const hash = await contract.transfer('0x...', 1000n);
147
+ *
148
+ * // Simulate transactions (dry-run)
149
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
150
+ * console.log('Gas estimate:', simulation.request.gas);
151
+ *
152
+ * // Watch events
153
+ * const unwatch = contract.watch.Transfer((event) => {
154
+ * console.log('Transfer event:', event);
155
+ * });
156
+ * ```
157
+ */
158
+ export declare class Proxy_json {
159
+ private contract;
160
+ private contractAddress;
161
+ private publicClient;
162
+ constructor(address: Address, clients: {
163
+ publicClient: PublicClient;
164
+ walletClient?: WalletClient;
165
+ });
166
+ /**
167
+ * Get the contract address
168
+ */
169
+ get address(): Address;
170
+ /**
171
+ * Get the underlying viem contract instance
172
+ */
173
+ getContract(): Proxy_jsonContract;
174
+ /**
175
+ * admin
176
+ * view
177
+ */
178
+ admin(): Promise<`0x${string}`>;
179
+ /**
180
+ * implementation
181
+ * view
182
+ */
183
+ implementation(): Promise<`0x${string}`>;
184
+ /**
185
+ * owner
186
+ * view
187
+ */
188
+ owner(): Promise<`0x${string}`>;
189
+ /**
190
+ * initialize
191
+ * payable
192
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
193
+ */
194
+ initialize(_logic: `0x${string}`, _initOwner: `0x${string}`, _data: `0x${string}`, options?: {
195
+ accessList?: import('viem').AccessList;
196
+ authorizationList?: import('viem').AuthorizationList;
197
+ chain?: import('viem').Chain | null;
198
+ dataSuffix?: `0x${string}`;
199
+ gas?: bigint;
200
+ gasPrice?: bigint;
201
+ maxFeePerGas?: bigint;
202
+ maxPriorityFeePerGas?: bigint;
203
+ nonce?: number;
204
+ value?: bigint;
205
+ }): Promise<`0x${string}`>;
206
+ /**
207
+ * setOwner
208
+ * nonpayable
209
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
210
+ */
211
+ setOwner(newOwner: `0x${string}`, options?: {
212
+ accessList?: import('viem').AccessList;
213
+ authorizationList?: import('viem').AuthorizationList;
214
+ chain?: import('viem').Chain | null;
215
+ dataSuffix?: `0x${string}`;
216
+ gas?: bigint;
217
+ gasPrice?: bigint;
218
+ maxFeePerGas?: bigint;
219
+ maxPriorityFeePerGas?: bigint;
220
+ nonce?: number;
221
+ value?: bigint;
222
+ }): Promise<`0x${string}`>;
223
+ /**
224
+ * upgradeTo
225
+ * nonpayable
226
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
227
+ */
228
+ upgradeTo(newImplementation: `0x${string}`, options?: {
229
+ accessList?: import('viem').AccessList;
230
+ authorizationList?: import('viem').AuthorizationList;
231
+ chain?: import('viem').Chain | null;
232
+ dataSuffix?: `0x${string}`;
233
+ gas?: bigint;
234
+ gasPrice?: bigint;
235
+ maxFeePerGas?: bigint;
236
+ maxPriorityFeePerGas?: bigint;
237
+ nonce?: number;
238
+ value?: bigint;
239
+ }): Promise<`0x${string}`>;
240
+ /**
241
+ * upgradeToAndCall
242
+ * payable
243
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
244
+ */
245
+ upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
246
+ accessList?: import('viem').AccessList;
247
+ authorizationList?: import('viem').AuthorizationList;
248
+ chain?: import('viem').Chain | null;
249
+ dataSuffix?: `0x${string}`;
250
+ gas?: bigint;
251
+ gasPrice?: bigint;
252
+ maxFeePerGas?: bigint;
253
+ maxPriorityFeePerGas?: bigint;
254
+ nonce?: number;
255
+ value?: bigint;
256
+ }): Promise<`0x${string}`>;
257
+ /**
258
+ * Simulate contract write operations (dry-run without sending transaction)
259
+ *
260
+ * @example
261
+ * const result = await contract.simulate.transfer('0x...', 1000n);
262
+ * console.log('Gas estimate:', result.request.gas);
263
+ * console.log('Would succeed:', result.result);
264
+ */
265
+ get simulate(): {
266
+ /**
267
+ * Simulate initialize
268
+ * Returns gas estimate and result without sending transaction
269
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
270
+ */
271
+ initialize(_logic: `0x${string}`, _initOwner: `0x${string}`, _data: `0x${string}`, options?: {
272
+ accessList?: import("viem").AccessList;
273
+ authorizationList?: import("viem").AuthorizationList;
274
+ chain?: import("viem").Chain | null;
275
+ dataSuffix?: `0x${string}`;
276
+ gas?: bigint;
277
+ gasPrice?: bigint;
278
+ maxFeePerGas?: bigint;
279
+ maxPriorityFeePerGas?: bigint;
280
+ nonce?: number;
281
+ value?: bigint;
282
+ }): Promise<void>;
283
+ /**
284
+ * Simulate setOwner
285
+ * Returns gas estimate and result without sending transaction
286
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
287
+ */
288
+ setOwner(newOwner: `0x${string}`, options?: {
289
+ accessList?: import("viem").AccessList;
290
+ authorizationList?: import("viem").AuthorizationList;
291
+ chain?: import("viem").Chain | null;
292
+ dataSuffix?: `0x${string}`;
293
+ gas?: bigint;
294
+ gasPrice?: bigint;
295
+ maxFeePerGas?: bigint;
296
+ maxPriorityFeePerGas?: bigint;
297
+ nonce?: number;
298
+ value?: bigint;
299
+ }): Promise<void>;
300
+ /**
301
+ * Simulate upgradeTo
302
+ * Returns gas estimate and result without sending transaction
303
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
304
+ */
305
+ upgradeTo(newImplementation: `0x${string}`, options?: {
306
+ accessList?: import("viem").AccessList;
307
+ authorizationList?: import("viem").AuthorizationList;
308
+ chain?: import("viem").Chain | null;
309
+ dataSuffix?: `0x${string}`;
310
+ gas?: bigint;
311
+ gasPrice?: bigint;
312
+ maxFeePerGas?: bigint;
313
+ maxPriorityFeePerGas?: bigint;
314
+ nonce?: number;
315
+ value?: bigint;
316
+ }): Promise<void>;
317
+ /**
318
+ * Simulate upgradeToAndCall
319
+ * Returns gas estimate and result without sending transaction
320
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
321
+ */
322
+ upgradeToAndCall(newImplementation: `0x${string}`, data: `0x${string}`, options?: {
323
+ accessList?: import("viem").AccessList;
324
+ authorizationList?: import("viem").AuthorizationList;
325
+ chain?: import("viem").Chain | null;
326
+ dataSuffix?: `0x${string}`;
327
+ gas?: bigint;
328
+ gasPrice?: bigint;
329
+ maxFeePerGas?: bigint;
330
+ maxPriorityFeePerGas?: bigint;
331
+ nonce?: number;
332
+ value?: bigint;
333
+ }): Promise<void>;
334
+ };
335
+ /**
336
+ * Watch contract events
337
+ *
338
+ * @example
339
+ * // Watch all Transfer events
340
+ * const unwatch = contract.watch.Transfer((event) => {
341
+ * console.log('Transfer:', event);
342
+ * });
343
+ *
344
+ * // Stop watching
345
+ * unwatch();
346
+ */
347
+ get watch(): {
348
+ /**
349
+ * Watch AdminChanged events
350
+ * @param callback Function to call when event is emitted
351
+ * @param filter Optional filter for indexed parameters
352
+ * @returns Unwatch function to stop listening
353
+ */
354
+ AdminChanged: (callback: (event: {
355
+ previousAdmin: `0x${string}`;
356
+ newAdmin: `0x${string}`;
357
+ }) => void) => () => void;
358
+ /**
359
+ * Watch Upgraded events
360
+ * @param callback Function to call when event is emitted
361
+ * @param filter Optional filter for indexed parameters
362
+ * @returns Unwatch function to stop listening
363
+ */
364
+ Upgraded: (callback: (event: {
365
+ implementation: `0x${string}`;
366
+ }) => void, filter?: {
367
+ implementation: `0x${string}`;
368
+ }) => () => void;
369
+ };
370
+ }