@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.
- package/README.md +108 -0
- package/contracts/Multicall3_json.d.ts +696 -0
- package/contracts/Multicall3_json.js +716 -0
- package/contracts/Multicall3_json.ts +926 -0
- package/contracts/OwnableDelegateProxy_json.d.ts +351 -0
- package/contracts/OwnableDelegateProxy_json.js +379 -0
- package/contracts/OwnableDelegateProxy_json.ts +480 -0
- package/contracts/index.d.ts +4 -0
- package/contracts/index.js +10 -0
- package/contracts/index.ts +5 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +43 -0
|
@@ -0,0 +1,696 @@
|
|
|
1
|
+
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* Multicall3.Call struct type
|
|
4
|
+
*/
|
|
5
|
+
export type Multicall3_Call = {
|
|
6
|
+
target: `0x${string}`;
|
|
7
|
+
callData: `0x${string}`;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Multicall3.Call3 struct type
|
|
11
|
+
*/
|
|
12
|
+
export type Multicall3_Call3 = {
|
|
13
|
+
target: `0x${string}`;
|
|
14
|
+
allowFailure: boolean;
|
|
15
|
+
callData: `0x${string}`;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Multicall3.Result struct type
|
|
19
|
+
*/
|
|
20
|
+
export type Multicall3_Result = {
|
|
21
|
+
success: boolean;
|
|
22
|
+
returnData: `0x${string}`;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Multicall3.Call3Value struct type
|
|
26
|
+
*/
|
|
27
|
+
export type Multicall3_Call3Value = {
|
|
28
|
+
target: `0x${string}`;
|
|
29
|
+
allowFailure: boolean;
|
|
30
|
+
value: bigint;
|
|
31
|
+
callData: `0x${string}`;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Multicall3_json ABI
|
|
35
|
+
*
|
|
36
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
37
|
+
*/
|
|
38
|
+
export declare const Multicall3_jsonAbi: readonly [{
|
|
39
|
+
readonly inputs: readonly [{
|
|
40
|
+
readonly components: readonly [{
|
|
41
|
+
readonly internalType: "address";
|
|
42
|
+
readonly name: "target";
|
|
43
|
+
readonly type: "address";
|
|
44
|
+
}, {
|
|
45
|
+
readonly internalType: "bytes";
|
|
46
|
+
readonly name: "callData";
|
|
47
|
+
readonly type: "bytes";
|
|
48
|
+
}];
|
|
49
|
+
readonly internalType: "struct Multicall3.Call[]";
|
|
50
|
+
readonly name: "calls";
|
|
51
|
+
readonly type: "tuple[]";
|
|
52
|
+
}];
|
|
53
|
+
readonly name: "aggregate";
|
|
54
|
+
readonly outputs: readonly [{
|
|
55
|
+
readonly internalType: "uint256";
|
|
56
|
+
readonly name: "blockNumber";
|
|
57
|
+
readonly type: "uint256";
|
|
58
|
+
}, {
|
|
59
|
+
readonly internalType: "bytes[]";
|
|
60
|
+
readonly name: "returnData";
|
|
61
|
+
readonly type: "bytes[]";
|
|
62
|
+
}];
|
|
63
|
+
readonly stateMutability: "payable";
|
|
64
|
+
readonly type: "function";
|
|
65
|
+
}, {
|
|
66
|
+
readonly inputs: readonly [{
|
|
67
|
+
readonly components: readonly [{
|
|
68
|
+
readonly internalType: "address";
|
|
69
|
+
readonly name: "target";
|
|
70
|
+
readonly type: "address";
|
|
71
|
+
}, {
|
|
72
|
+
readonly internalType: "bool";
|
|
73
|
+
readonly name: "allowFailure";
|
|
74
|
+
readonly type: "bool";
|
|
75
|
+
}, {
|
|
76
|
+
readonly internalType: "bytes";
|
|
77
|
+
readonly name: "callData";
|
|
78
|
+
readonly type: "bytes";
|
|
79
|
+
}];
|
|
80
|
+
readonly internalType: "struct Multicall3.Call3[]";
|
|
81
|
+
readonly name: "calls";
|
|
82
|
+
readonly type: "tuple[]";
|
|
83
|
+
}];
|
|
84
|
+
readonly name: "aggregate3";
|
|
85
|
+
readonly outputs: readonly [{
|
|
86
|
+
readonly components: readonly [{
|
|
87
|
+
readonly internalType: "bool";
|
|
88
|
+
readonly name: "success";
|
|
89
|
+
readonly type: "bool";
|
|
90
|
+
}, {
|
|
91
|
+
readonly internalType: "bytes";
|
|
92
|
+
readonly name: "returnData";
|
|
93
|
+
readonly type: "bytes";
|
|
94
|
+
}];
|
|
95
|
+
readonly internalType: "struct Multicall3.Result[]";
|
|
96
|
+
readonly name: "returnData";
|
|
97
|
+
readonly type: "tuple[]";
|
|
98
|
+
}];
|
|
99
|
+
readonly stateMutability: "payable";
|
|
100
|
+
readonly type: "function";
|
|
101
|
+
}, {
|
|
102
|
+
readonly inputs: readonly [{
|
|
103
|
+
readonly components: readonly [{
|
|
104
|
+
readonly internalType: "address";
|
|
105
|
+
readonly name: "target";
|
|
106
|
+
readonly type: "address";
|
|
107
|
+
}, {
|
|
108
|
+
readonly internalType: "bool";
|
|
109
|
+
readonly name: "allowFailure";
|
|
110
|
+
readonly type: "bool";
|
|
111
|
+
}, {
|
|
112
|
+
readonly internalType: "uint256";
|
|
113
|
+
readonly name: "value";
|
|
114
|
+
readonly type: "uint256";
|
|
115
|
+
}, {
|
|
116
|
+
readonly internalType: "bytes";
|
|
117
|
+
readonly name: "callData";
|
|
118
|
+
readonly type: "bytes";
|
|
119
|
+
}];
|
|
120
|
+
readonly internalType: "struct Multicall3.Call3Value[]";
|
|
121
|
+
readonly name: "calls";
|
|
122
|
+
readonly type: "tuple[]";
|
|
123
|
+
}];
|
|
124
|
+
readonly name: "aggregate3Value";
|
|
125
|
+
readonly outputs: readonly [{
|
|
126
|
+
readonly components: readonly [{
|
|
127
|
+
readonly internalType: "bool";
|
|
128
|
+
readonly name: "success";
|
|
129
|
+
readonly type: "bool";
|
|
130
|
+
}, {
|
|
131
|
+
readonly internalType: "bytes";
|
|
132
|
+
readonly name: "returnData";
|
|
133
|
+
readonly type: "bytes";
|
|
134
|
+
}];
|
|
135
|
+
readonly internalType: "struct Multicall3.Result[]";
|
|
136
|
+
readonly name: "returnData";
|
|
137
|
+
readonly type: "tuple[]";
|
|
138
|
+
}];
|
|
139
|
+
readonly stateMutability: "payable";
|
|
140
|
+
readonly type: "function";
|
|
141
|
+
}, {
|
|
142
|
+
readonly inputs: readonly [{
|
|
143
|
+
readonly components: readonly [{
|
|
144
|
+
readonly internalType: "address";
|
|
145
|
+
readonly name: "target";
|
|
146
|
+
readonly type: "address";
|
|
147
|
+
}, {
|
|
148
|
+
readonly internalType: "bytes";
|
|
149
|
+
readonly name: "callData";
|
|
150
|
+
readonly type: "bytes";
|
|
151
|
+
}];
|
|
152
|
+
readonly internalType: "struct Multicall3.Call[]";
|
|
153
|
+
readonly name: "calls";
|
|
154
|
+
readonly type: "tuple[]";
|
|
155
|
+
}];
|
|
156
|
+
readonly name: "blockAndAggregate";
|
|
157
|
+
readonly outputs: readonly [{
|
|
158
|
+
readonly internalType: "uint256";
|
|
159
|
+
readonly name: "blockNumber";
|
|
160
|
+
readonly type: "uint256";
|
|
161
|
+
}, {
|
|
162
|
+
readonly internalType: "bytes32";
|
|
163
|
+
readonly name: "blockHash";
|
|
164
|
+
readonly type: "bytes32";
|
|
165
|
+
}, {
|
|
166
|
+
readonly components: readonly [{
|
|
167
|
+
readonly internalType: "bool";
|
|
168
|
+
readonly name: "success";
|
|
169
|
+
readonly type: "bool";
|
|
170
|
+
}, {
|
|
171
|
+
readonly internalType: "bytes";
|
|
172
|
+
readonly name: "returnData";
|
|
173
|
+
readonly type: "bytes";
|
|
174
|
+
}];
|
|
175
|
+
readonly internalType: "struct Multicall3.Result[]";
|
|
176
|
+
readonly name: "returnData";
|
|
177
|
+
readonly type: "tuple[]";
|
|
178
|
+
}];
|
|
179
|
+
readonly stateMutability: "payable";
|
|
180
|
+
readonly type: "function";
|
|
181
|
+
}, {
|
|
182
|
+
readonly inputs: readonly [];
|
|
183
|
+
readonly name: "getBasefee";
|
|
184
|
+
readonly outputs: readonly [{
|
|
185
|
+
readonly internalType: "uint256";
|
|
186
|
+
readonly name: "basefee";
|
|
187
|
+
readonly type: "uint256";
|
|
188
|
+
}];
|
|
189
|
+
readonly stateMutability: "view";
|
|
190
|
+
readonly type: "function";
|
|
191
|
+
}, {
|
|
192
|
+
readonly inputs: readonly [{
|
|
193
|
+
readonly internalType: "uint256";
|
|
194
|
+
readonly name: "blockNumber";
|
|
195
|
+
readonly type: "uint256";
|
|
196
|
+
}];
|
|
197
|
+
readonly name: "getBlockHash";
|
|
198
|
+
readonly outputs: readonly [{
|
|
199
|
+
readonly internalType: "bytes32";
|
|
200
|
+
readonly name: "blockHash";
|
|
201
|
+
readonly type: "bytes32";
|
|
202
|
+
}];
|
|
203
|
+
readonly stateMutability: "view";
|
|
204
|
+
readonly type: "function";
|
|
205
|
+
}, {
|
|
206
|
+
readonly inputs: readonly [];
|
|
207
|
+
readonly name: "getBlockNumber";
|
|
208
|
+
readonly outputs: readonly [{
|
|
209
|
+
readonly internalType: "uint256";
|
|
210
|
+
readonly name: "blockNumber";
|
|
211
|
+
readonly type: "uint256";
|
|
212
|
+
}];
|
|
213
|
+
readonly stateMutability: "view";
|
|
214
|
+
readonly type: "function";
|
|
215
|
+
}, {
|
|
216
|
+
readonly inputs: readonly [];
|
|
217
|
+
readonly name: "getChainId";
|
|
218
|
+
readonly outputs: readonly [{
|
|
219
|
+
readonly internalType: "uint256";
|
|
220
|
+
readonly name: "chainid";
|
|
221
|
+
readonly type: "uint256";
|
|
222
|
+
}];
|
|
223
|
+
readonly stateMutability: "view";
|
|
224
|
+
readonly type: "function";
|
|
225
|
+
}, {
|
|
226
|
+
readonly inputs: readonly [];
|
|
227
|
+
readonly name: "getCurrentBlockCoinbase";
|
|
228
|
+
readonly outputs: readonly [{
|
|
229
|
+
readonly internalType: "address";
|
|
230
|
+
readonly name: "coinbase";
|
|
231
|
+
readonly type: "address";
|
|
232
|
+
}];
|
|
233
|
+
readonly stateMutability: "view";
|
|
234
|
+
readonly type: "function";
|
|
235
|
+
}, {
|
|
236
|
+
readonly inputs: readonly [];
|
|
237
|
+
readonly name: "getCurrentBlockDifficulty";
|
|
238
|
+
readonly outputs: readonly [{
|
|
239
|
+
readonly internalType: "uint256";
|
|
240
|
+
readonly name: "difficulty";
|
|
241
|
+
readonly type: "uint256";
|
|
242
|
+
}];
|
|
243
|
+
readonly stateMutability: "view";
|
|
244
|
+
readonly type: "function";
|
|
245
|
+
}, {
|
|
246
|
+
readonly inputs: readonly [];
|
|
247
|
+
readonly name: "getCurrentBlockGasLimit";
|
|
248
|
+
readonly outputs: readonly [{
|
|
249
|
+
readonly internalType: "uint256";
|
|
250
|
+
readonly name: "gaslimit";
|
|
251
|
+
readonly type: "uint256";
|
|
252
|
+
}];
|
|
253
|
+
readonly stateMutability: "view";
|
|
254
|
+
readonly type: "function";
|
|
255
|
+
}, {
|
|
256
|
+
readonly inputs: readonly [];
|
|
257
|
+
readonly name: "getCurrentBlockTimestamp";
|
|
258
|
+
readonly outputs: readonly [{
|
|
259
|
+
readonly internalType: "uint256";
|
|
260
|
+
readonly name: "timestamp";
|
|
261
|
+
readonly type: "uint256";
|
|
262
|
+
}];
|
|
263
|
+
readonly stateMutability: "view";
|
|
264
|
+
readonly type: "function";
|
|
265
|
+
}, {
|
|
266
|
+
readonly inputs: readonly [{
|
|
267
|
+
readonly internalType: "address";
|
|
268
|
+
readonly name: "addr";
|
|
269
|
+
readonly type: "address";
|
|
270
|
+
}];
|
|
271
|
+
readonly name: "getEthBalance";
|
|
272
|
+
readonly outputs: readonly [{
|
|
273
|
+
readonly internalType: "uint256";
|
|
274
|
+
readonly name: "balance";
|
|
275
|
+
readonly type: "uint256";
|
|
276
|
+
}];
|
|
277
|
+
readonly stateMutability: "view";
|
|
278
|
+
readonly type: "function";
|
|
279
|
+
}, {
|
|
280
|
+
readonly inputs: readonly [];
|
|
281
|
+
readonly name: "getLastBlockHash";
|
|
282
|
+
readonly outputs: readonly [{
|
|
283
|
+
readonly internalType: "bytes32";
|
|
284
|
+
readonly name: "blockHash";
|
|
285
|
+
readonly type: "bytes32";
|
|
286
|
+
}];
|
|
287
|
+
readonly stateMutability: "view";
|
|
288
|
+
readonly type: "function";
|
|
289
|
+
}, {
|
|
290
|
+
readonly inputs: readonly [{
|
|
291
|
+
readonly internalType: "bool";
|
|
292
|
+
readonly name: "requireSuccess";
|
|
293
|
+
readonly type: "bool";
|
|
294
|
+
}, {
|
|
295
|
+
readonly components: readonly [{
|
|
296
|
+
readonly internalType: "address";
|
|
297
|
+
readonly name: "target";
|
|
298
|
+
readonly type: "address";
|
|
299
|
+
}, {
|
|
300
|
+
readonly internalType: "bytes";
|
|
301
|
+
readonly name: "callData";
|
|
302
|
+
readonly type: "bytes";
|
|
303
|
+
}];
|
|
304
|
+
readonly internalType: "struct Multicall3.Call[]";
|
|
305
|
+
readonly name: "calls";
|
|
306
|
+
readonly type: "tuple[]";
|
|
307
|
+
}];
|
|
308
|
+
readonly name: "tryAggregate";
|
|
309
|
+
readonly outputs: readonly [{
|
|
310
|
+
readonly components: readonly [{
|
|
311
|
+
readonly internalType: "bool";
|
|
312
|
+
readonly name: "success";
|
|
313
|
+
readonly type: "bool";
|
|
314
|
+
}, {
|
|
315
|
+
readonly internalType: "bytes";
|
|
316
|
+
readonly name: "returnData";
|
|
317
|
+
readonly type: "bytes";
|
|
318
|
+
}];
|
|
319
|
+
readonly internalType: "struct Multicall3.Result[]";
|
|
320
|
+
readonly name: "returnData";
|
|
321
|
+
readonly type: "tuple[]";
|
|
322
|
+
}];
|
|
323
|
+
readonly stateMutability: "payable";
|
|
324
|
+
readonly type: "function";
|
|
325
|
+
}, {
|
|
326
|
+
readonly inputs: readonly [{
|
|
327
|
+
readonly internalType: "bool";
|
|
328
|
+
readonly name: "requireSuccess";
|
|
329
|
+
readonly type: "bool";
|
|
330
|
+
}, {
|
|
331
|
+
readonly components: readonly [{
|
|
332
|
+
readonly internalType: "address";
|
|
333
|
+
readonly name: "target";
|
|
334
|
+
readonly type: "address";
|
|
335
|
+
}, {
|
|
336
|
+
readonly internalType: "bytes";
|
|
337
|
+
readonly name: "callData";
|
|
338
|
+
readonly type: "bytes";
|
|
339
|
+
}];
|
|
340
|
+
readonly internalType: "struct Multicall3.Call[]";
|
|
341
|
+
readonly name: "calls";
|
|
342
|
+
readonly type: "tuple[]";
|
|
343
|
+
}];
|
|
344
|
+
readonly name: "tryBlockAndAggregate";
|
|
345
|
+
readonly outputs: readonly [{
|
|
346
|
+
readonly internalType: "uint256";
|
|
347
|
+
readonly name: "blockNumber";
|
|
348
|
+
readonly type: "uint256";
|
|
349
|
+
}, {
|
|
350
|
+
readonly internalType: "bytes32";
|
|
351
|
+
readonly name: "blockHash";
|
|
352
|
+
readonly type: "bytes32";
|
|
353
|
+
}, {
|
|
354
|
+
readonly components: readonly [{
|
|
355
|
+
readonly internalType: "bool";
|
|
356
|
+
readonly name: "success";
|
|
357
|
+
readonly type: "bool";
|
|
358
|
+
}, {
|
|
359
|
+
readonly internalType: "bytes";
|
|
360
|
+
readonly name: "returnData";
|
|
361
|
+
readonly type: "bytes";
|
|
362
|
+
}];
|
|
363
|
+
readonly internalType: "struct Multicall3.Result[]";
|
|
364
|
+
readonly name: "returnData";
|
|
365
|
+
readonly type: "tuple[]";
|
|
366
|
+
}];
|
|
367
|
+
readonly stateMutability: "payable";
|
|
368
|
+
readonly type: "function";
|
|
369
|
+
}];
|
|
370
|
+
/**
|
|
371
|
+
* Type-safe ABI for Multicall3_json
|
|
372
|
+
*/
|
|
373
|
+
export type Multicall3_jsonAbi = typeof Multicall3_jsonAbi;
|
|
374
|
+
/**
|
|
375
|
+
* Contract instance type for Multicall3_json
|
|
376
|
+
*/
|
|
377
|
+
export type Multicall3_jsonContract = any;
|
|
378
|
+
/**
|
|
379
|
+
* Multicall3_json Contract Class
|
|
380
|
+
*
|
|
381
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
382
|
+
*
|
|
383
|
+
* @example
|
|
384
|
+
* ```typescript
|
|
385
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
386
|
+
* import { mainnet } from 'viem/chains';
|
|
387
|
+
* import { Multicall3_json } from 'Multicall3_json';
|
|
388
|
+
*
|
|
389
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
390
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
391
|
+
*
|
|
392
|
+
* const contract = new Multicall3_json('0x...', { publicClient, walletClient });
|
|
393
|
+
*
|
|
394
|
+
* // Read functions
|
|
395
|
+
* const result = await contract.balanceOf('0x...');
|
|
396
|
+
*
|
|
397
|
+
* // Write functions
|
|
398
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
399
|
+
*
|
|
400
|
+
* // Simulate transactions (dry-run)
|
|
401
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
402
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
403
|
+
*
|
|
404
|
+
* // Watch events
|
|
405
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
406
|
+
* console.log('Transfer event:', event);
|
|
407
|
+
* });
|
|
408
|
+
* ```
|
|
409
|
+
*/
|
|
410
|
+
export declare class Multicall3_json {
|
|
411
|
+
private contract;
|
|
412
|
+
private contractAddress;
|
|
413
|
+
private publicClient;
|
|
414
|
+
constructor(address: Address, clients: {
|
|
415
|
+
publicClient: PublicClient;
|
|
416
|
+
walletClient?: WalletClient;
|
|
417
|
+
});
|
|
418
|
+
/**
|
|
419
|
+
* Get the contract address
|
|
420
|
+
*/
|
|
421
|
+
get address(): Address;
|
|
422
|
+
/**
|
|
423
|
+
* Get the underlying viem contract instance
|
|
424
|
+
*/
|
|
425
|
+
getContract(): Multicall3_jsonContract;
|
|
426
|
+
/**
|
|
427
|
+
* getBasefee
|
|
428
|
+
* view
|
|
429
|
+
*/
|
|
430
|
+
getBasefee(): Promise<bigint>;
|
|
431
|
+
/**
|
|
432
|
+
* getBlockHash
|
|
433
|
+
* view
|
|
434
|
+
*/
|
|
435
|
+
getBlockHash(blockNumber: bigint): Promise<`0x${string}`>;
|
|
436
|
+
/**
|
|
437
|
+
* getBlockNumber
|
|
438
|
+
* view
|
|
439
|
+
*/
|
|
440
|
+
getBlockNumber(): Promise<bigint>;
|
|
441
|
+
/**
|
|
442
|
+
* getChainId
|
|
443
|
+
* view
|
|
444
|
+
*/
|
|
445
|
+
getChainId(): Promise<bigint>;
|
|
446
|
+
/**
|
|
447
|
+
* getCurrentBlockCoinbase
|
|
448
|
+
* view
|
|
449
|
+
*/
|
|
450
|
+
getCurrentBlockCoinbase(): Promise<`0x${string}`>;
|
|
451
|
+
/**
|
|
452
|
+
* getCurrentBlockDifficulty
|
|
453
|
+
* view
|
|
454
|
+
*/
|
|
455
|
+
getCurrentBlockDifficulty(): Promise<bigint>;
|
|
456
|
+
/**
|
|
457
|
+
* getCurrentBlockGasLimit
|
|
458
|
+
* view
|
|
459
|
+
*/
|
|
460
|
+
getCurrentBlockGasLimit(): Promise<bigint>;
|
|
461
|
+
/**
|
|
462
|
+
* getCurrentBlockTimestamp
|
|
463
|
+
* view
|
|
464
|
+
*/
|
|
465
|
+
getCurrentBlockTimestamp(): Promise<bigint>;
|
|
466
|
+
/**
|
|
467
|
+
* getEthBalance
|
|
468
|
+
* view
|
|
469
|
+
*/
|
|
470
|
+
getEthBalance(addr: `0x${string}`): Promise<bigint>;
|
|
471
|
+
/**
|
|
472
|
+
* getLastBlockHash
|
|
473
|
+
* view
|
|
474
|
+
*/
|
|
475
|
+
getLastBlockHash(): Promise<`0x${string}`>;
|
|
476
|
+
/**
|
|
477
|
+
* aggregate
|
|
478
|
+
* payable
|
|
479
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
480
|
+
*/
|
|
481
|
+
aggregate(calls: Multicall3_Call[], options?: {
|
|
482
|
+
accessList?: import('viem').AccessList;
|
|
483
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
484
|
+
chain?: import('viem').Chain | null;
|
|
485
|
+
dataSuffix?: `0x${string}`;
|
|
486
|
+
gas?: bigint;
|
|
487
|
+
gasPrice?: bigint;
|
|
488
|
+
maxFeePerGas?: bigint;
|
|
489
|
+
maxPriorityFeePerGas?: bigint;
|
|
490
|
+
nonce?: number;
|
|
491
|
+
value?: bigint;
|
|
492
|
+
}): Promise<`0x${string}`>;
|
|
493
|
+
/**
|
|
494
|
+
* aggregate3
|
|
495
|
+
* payable
|
|
496
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
497
|
+
*/
|
|
498
|
+
aggregate3(calls: Multicall3_Call3[], options?: {
|
|
499
|
+
accessList?: import('viem').AccessList;
|
|
500
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
501
|
+
chain?: import('viem').Chain | null;
|
|
502
|
+
dataSuffix?: `0x${string}`;
|
|
503
|
+
gas?: bigint;
|
|
504
|
+
gasPrice?: bigint;
|
|
505
|
+
maxFeePerGas?: bigint;
|
|
506
|
+
maxPriorityFeePerGas?: bigint;
|
|
507
|
+
nonce?: number;
|
|
508
|
+
value?: bigint;
|
|
509
|
+
}): Promise<`0x${string}`>;
|
|
510
|
+
/**
|
|
511
|
+
* aggregate3Value
|
|
512
|
+
* payable
|
|
513
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
514
|
+
*/
|
|
515
|
+
aggregate3Value(calls: Multicall3_Call3Value[], options?: {
|
|
516
|
+
accessList?: import('viem').AccessList;
|
|
517
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
518
|
+
chain?: import('viem').Chain | null;
|
|
519
|
+
dataSuffix?: `0x${string}`;
|
|
520
|
+
gas?: bigint;
|
|
521
|
+
gasPrice?: bigint;
|
|
522
|
+
maxFeePerGas?: bigint;
|
|
523
|
+
maxPriorityFeePerGas?: bigint;
|
|
524
|
+
nonce?: number;
|
|
525
|
+
value?: bigint;
|
|
526
|
+
}): Promise<`0x${string}`>;
|
|
527
|
+
/**
|
|
528
|
+
* blockAndAggregate
|
|
529
|
+
* payable
|
|
530
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
531
|
+
*/
|
|
532
|
+
blockAndAggregate(calls: Multicall3_Call[], options?: {
|
|
533
|
+
accessList?: import('viem').AccessList;
|
|
534
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
535
|
+
chain?: import('viem').Chain | null;
|
|
536
|
+
dataSuffix?: `0x${string}`;
|
|
537
|
+
gas?: bigint;
|
|
538
|
+
gasPrice?: bigint;
|
|
539
|
+
maxFeePerGas?: bigint;
|
|
540
|
+
maxPriorityFeePerGas?: bigint;
|
|
541
|
+
nonce?: number;
|
|
542
|
+
value?: bigint;
|
|
543
|
+
}): Promise<`0x${string}`>;
|
|
544
|
+
/**
|
|
545
|
+
* tryAggregate
|
|
546
|
+
* payable
|
|
547
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
548
|
+
*/
|
|
549
|
+
tryAggregate(requireSuccess: boolean, calls: Multicall3_Call[], options?: {
|
|
550
|
+
accessList?: import('viem').AccessList;
|
|
551
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
552
|
+
chain?: import('viem').Chain | null;
|
|
553
|
+
dataSuffix?: `0x${string}`;
|
|
554
|
+
gas?: bigint;
|
|
555
|
+
gasPrice?: bigint;
|
|
556
|
+
maxFeePerGas?: bigint;
|
|
557
|
+
maxPriorityFeePerGas?: bigint;
|
|
558
|
+
nonce?: number;
|
|
559
|
+
value?: bigint;
|
|
560
|
+
}): Promise<`0x${string}`>;
|
|
561
|
+
/**
|
|
562
|
+
* tryBlockAndAggregate
|
|
563
|
+
* payable
|
|
564
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
565
|
+
*/
|
|
566
|
+
tryBlockAndAggregate(requireSuccess: boolean, calls: Multicall3_Call[], options?: {
|
|
567
|
+
accessList?: import('viem').AccessList;
|
|
568
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
569
|
+
chain?: import('viem').Chain | null;
|
|
570
|
+
dataSuffix?: `0x${string}`;
|
|
571
|
+
gas?: bigint;
|
|
572
|
+
gasPrice?: bigint;
|
|
573
|
+
maxFeePerGas?: bigint;
|
|
574
|
+
maxPriorityFeePerGas?: bigint;
|
|
575
|
+
nonce?: number;
|
|
576
|
+
value?: bigint;
|
|
577
|
+
}): Promise<`0x${string}`>;
|
|
578
|
+
/**
|
|
579
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
580
|
+
*
|
|
581
|
+
* @example
|
|
582
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
583
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
584
|
+
* console.log('Would succeed:', result.result);
|
|
585
|
+
*/
|
|
586
|
+
get simulate(): {
|
|
587
|
+
/**
|
|
588
|
+
* Simulate aggregate
|
|
589
|
+
* Returns gas estimate and result without sending transaction
|
|
590
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
591
|
+
*/
|
|
592
|
+
aggregate(calls: Multicall3_Call[], options?: {
|
|
593
|
+
accessList?: import("viem").AccessList;
|
|
594
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
595
|
+
chain?: import("viem").Chain | null;
|
|
596
|
+
dataSuffix?: `0x${string}`;
|
|
597
|
+
gas?: bigint;
|
|
598
|
+
gasPrice?: bigint;
|
|
599
|
+
maxFeePerGas?: bigint;
|
|
600
|
+
maxPriorityFeePerGas?: bigint;
|
|
601
|
+
nonce?: number;
|
|
602
|
+
value?: bigint;
|
|
603
|
+
}): Promise<[bigint, `0x${string}`[]]>;
|
|
604
|
+
/**
|
|
605
|
+
* Simulate aggregate3
|
|
606
|
+
* Returns gas estimate and result without sending transaction
|
|
607
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
608
|
+
*/
|
|
609
|
+
aggregate3(calls: Multicall3_Call3[], options?: {
|
|
610
|
+
accessList?: import("viem").AccessList;
|
|
611
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
612
|
+
chain?: import("viem").Chain | null;
|
|
613
|
+
dataSuffix?: `0x${string}`;
|
|
614
|
+
gas?: bigint;
|
|
615
|
+
gasPrice?: bigint;
|
|
616
|
+
maxFeePerGas?: bigint;
|
|
617
|
+
maxPriorityFeePerGas?: bigint;
|
|
618
|
+
nonce?: number;
|
|
619
|
+
value?: bigint;
|
|
620
|
+
}): Promise<Multicall3_Result[]>;
|
|
621
|
+
/**
|
|
622
|
+
* Simulate aggregate3Value
|
|
623
|
+
* Returns gas estimate and result without sending transaction
|
|
624
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
625
|
+
*/
|
|
626
|
+
aggregate3Value(calls: Multicall3_Call3Value[], options?: {
|
|
627
|
+
accessList?: import("viem").AccessList;
|
|
628
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
629
|
+
chain?: import("viem").Chain | null;
|
|
630
|
+
dataSuffix?: `0x${string}`;
|
|
631
|
+
gas?: bigint;
|
|
632
|
+
gasPrice?: bigint;
|
|
633
|
+
maxFeePerGas?: bigint;
|
|
634
|
+
maxPriorityFeePerGas?: bigint;
|
|
635
|
+
nonce?: number;
|
|
636
|
+
value?: bigint;
|
|
637
|
+
}): Promise<Multicall3_Result[]>;
|
|
638
|
+
/**
|
|
639
|
+
* Simulate blockAndAggregate
|
|
640
|
+
* Returns gas estimate and result without sending transaction
|
|
641
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
642
|
+
*/
|
|
643
|
+
blockAndAggregate(calls: Multicall3_Call[], options?: {
|
|
644
|
+
accessList?: import("viem").AccessList;
|
|
645
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
646
|
+
chain?: import("viem").Chain | null;
|
|
647
|
+
dataSuffix?: `0x${string}`;
|
|
648
|
+
gas?: bigint;
|
|
649
|
+
gasPrice?: bigint;
|
|
650
|
+
maxFeePerGas?: bigint;
|
|
651
|
+
maxPriorityFeePerGas?: bigint;
|
|
652
|
+
nonce?: number;
|
|
653
|
+
value?: bigint;
|
|
654
|
+
}): Promise<[bigint, `0x${string}`, Multicall3_Result[]]>;
|
|
655
|
+
/**
|
|
656
|
+
* Simulate tryAggregate
|
|
657
|
+
* Returns gas estimate and result without sending transaction
|
|
658
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
659
|
+
*/
|
|
660
|
+
tryAggregate(requireSuccess: boolean, calls: Multicall3_Call[], options?: {
|
|
661
|
+
accessList?: import("viem").AccessList;
|
|
662
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
663
|
+
chain?: import("viem").Chain | null;
|
|
664
|
+
dataSuffix?: `0x${string}`;
|
|
665
|
+
gas?: bigint;
|
|
666
|
+
gasPrice?: bigint;
|
|
667
|
+
maxFeePerGas?: bigint;
|
|
668
|
+
maxPriorityFeePerGas?: bigint;
|
|
669
|
+
nonce?: number;
|
|
670
|
+
value?: bigint;
|
|
671
|
+
}): Promise<Multicall3_Result[]>;
|
|
672
|
+
/**
|
|
673
|
+
* Simulate tryBlockAndAggregate
|
|
674
|
+
* Returns gas estimate and result without sending transaction
|
|
675
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
676
|
+
*/
|
|
677
|
+
tryBlockAndAggregate(requireSuccess: boolean, calls: Multicall3_Call[], options?: {
|
|
678
|
+
accessList?: import("viem").AccessList;
|
|
679
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
680
|
+
chain?: import("viem").Chain | null;
|
|
681
|
+
dataSuffix?: `0x${string}`;
|
|
682
|
+
gas?: bigint;
|
|
683
|
+
gasPrice?: bigint;
|
|
684
|
+
maxFeePerGas?: bigint;
|
|
685
|
+
maxPriorityFeePerGas?: bigint;
|
|
686
|
+
nonce?: number;
|
|
687
|
+
value?: bigint;
|
|
688
|
+
}): Promise<[bigint, `0x${string}`, Multicall3_Result[]]>;
|
|
689
|
+
};
|
|
690
|
+
/**
|
|
691
|
+
* Watch contract events
|
|
692
|
+
*
|
|
693
|
+
* Note: This contract has no events, so watch returns an empty object.
|
|
694
|
+
*/
|
|
695
|
+
get watch(): {};
|
|
696
|
+
}
|