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