@woof-software/contracts-tools-sdk-ethers 0.0.5 → 0.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.
package/lib/abis/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import MulticallABI from "./multicall.abi.json";
1
+ import { MulticallABI } from "./multicall.abi.js";
2
2
  export const MulticallAbi = MulticallABI;
@@ -0,0 +1,332 @@
1
+ export declare const MulticallABI: readonly [{
2
+ readonly inputs: readonly [{
3
+ readonly components: readonly [{
4
+ readonly internalType: "address";
5
+ readonly name: "target";
6
+ readonly type: "address";
7
+ }, {
8
+ readonly internalType: "bytes";
9
+ readonly name: "callData";
10
+ readonly type: "bytes";
11
+ }];
12
+ readonly internalType: "struct Multicall3.Call[]";
13
+ readonly name: "calls";
14
+ readonly type: "tuple[]";
15
+ }];
16
+ readonly name: "aggregate";
17
+ readonly outputs: readonly [{
18
+ readonly internalType: "uint256";
19
+ readonly name: "blockNumber";
20
+ readonly type: "uint256";
21
+ }, {
22
+ readonly internalType: "bytes[]";
23
+ readonly name: "returnData";
24
+ readonly type: "bytes[]";
25
+ }];
26
+ readonly stateMutability: "payable";
27
+ readonly type: "function";
28
+ }, {
29
+ readonly inputs: readonly [{
30
+ readonly components: readonly [{
31
+ readonly internalType: "address";
32
+ readonly name: "target";
33
+ readonly type: "address";
34
+ }, {
35
+ readonly internalType: "bool";
36
+ readonly name: "allowFailure";
37
+ readonly type: "bool";
38
+ }, {
39
+ readonly internalType: "bytes";
40
+ readonly name: "callData";
41
+ readonly type: "bytes";
42
+ }];
43
+ readonly internalType: "struct Multicall3.Call3[]";
44
+ readonly name: "calls";
45
+ readonly type: "tuple[]";
46
+ }];
47
+ readonly name: "aggregate3";
48
+ readonly outputs: readonly [{
49
+ readonly components: readonly [{
50
+ readonly internalType: "bool";
51
+ readonly name: "success";
52
+ readonly type: "bool";
53
+ }, {
54
+ readonly internalType: "bytes";
55
+ readonly name: "returnData";
56
+ readonly type: "bytes";
57
+ }];
58
+ readonly internalType: "struct Multicall3.Result[]";
59
+ readonly name: "returnData";
60
+ readonly type: "tuple[]";
61
+ }];
62
+ readonly stateMutability: "payable";
63
+ readonly type: "function";
64
+ }, {
65
+ readonly inputs: readonly [{
66
+ readonly components: readonly [{
67
+ readonly internalType: "address";
68
+ readonly name: "target";
69
+ readonly type: "address";
70
+ }, {
71
+ readonly internalType: "bool";
72
+ readonly name: "allowFailure";
73
+ readonly type: "bool";
74
+ }, {
75
+ readonly internalType: "uint256";
76
+ readonly name: "value";
77
+ readonly type: "uint256";
78
+ }, {
79
+ readonly internalType: "bytes";
80
+ readonly name: "callData";
81
+ readonly type: "bytes";
82
+ }];
83
+ readonly internalType: "struct Multicall3.Call3Value[]";
84
+ readonly name: "calls";
85
+ readonly type: "tuple[]";
86
+ }];
87
+ readonly name: "aggregate3Value";
88
+ readonly outputs: readonly [{
89
+ readonly components: readonly [{
90
+ readonly internalType: "bool";
91
+ readonly name: "success";
92
+ readonly type: "bool";
93
+ }, {
94
+ readonly internalType: "bytes";
95
+ readonly name: "returnData";
96
+ readonly type: "bytes";
97
+ }];
98
+ readonly internalType: "struct Multicall3.Result[]";
99
+ readonly name: "returnData";
100
+ readonly type: "tuple[]";
101
+ }];
102
+ readonly stateMutability: "payable";
103
+ readonly type: "function";
104
+ }, {
105
+ readonly inputs: readonly [{
106
+ readonly components: readonly [{
107
+ readonly internalType: "address";
108
+ readonly name: "target";
109
+ readonly type: "address";
110
+ }, {
111
+ readonly internalType: "bytes";
112
+ readonly name: "callData";
113
+ readonly type: "bytes";
114
+ }];
115
+ readonly internalType: "struct Multicall3.Call[]";
116
+ readonly name: "calls";
117
+ readonly type: "tuple[]";
118
+ }];
119
+ readonly name: "blockAndAggregate";
120
+ readonly outputs: readonly [{
121
+ readonly internalType: "uint256";
122
+ readonly name: "blockNumber";
123
+ readonly type: "uint256";
124
+ }, {
125
+ readonly internalType: "bytes32";
126
+ readonly name: "blockHash";
127
+ readonly type: "bytes32";
128
+ }, {
129
+ readonly components: readonly [{
130
+ readonly internalType: "bool";
131
+ readonly name: "success";
132
+ readonly type: "bool";
133
+ }, {
134
+ readonly internalType: "bytes";
135
+ readonly name: "returnData";
136
+ readonly type: "bytes";
137
+ }];
138
+ readonly internalType: "struct Multicall3.Result[]";
139
+ readonly name: "returnData";
140
+ readonly type: "tuple[]";
141
+ }];
142
+ readonly stateMutability: "payable";
143
+ readonly type: "function";
144
+ }, {
145
+ readonly inputs: readonly [];
146
+ readonly name: "getBasefee";
147
+ readonly outputs: readonly [{
148
+ readonly internalType: "uint256";
149
+ readonly name: "basefee";
150
+ readonly type: "uint256";
151
+ }];
152
+ readonly stateMutability: "view";
153
+ readonly type: "function";
154
+ }, {
155
+ readonly inputs: readonly [{
156
+ readonly internalType: "uint256";
157
+ readonly name: "blockNumber";
158
+ readonly type: "uint256";
159
+ }];
160
+ readonly name: "getBlockHash";
161
+ readonly outputs: readonly [{
162
+ readonly internalType: "bytes32";
163
+ readonly name: "blockHash";
164
+ readonly type: "bytes32";
165
+ }];
166
+ readonly stateMutability: "view";
167
+ readonly type: "function";
168
+ }, {
169
+ readonly inputs: readonly [];
170
+ readonly name: "getBlockNumber";
171
+ readonly outputs: readonly [{
172
+ readonly internalType: "uint256";
173
+ readonly name: "blockNumber";
174
+ readonly type: "uint256";
175
+ }];
176
+ readonly stateMutability: "view";
177
+ readonly type: "function";
178
+ }, {
179
+ readonly inputs: readonly [];
180
+ readonly name: "getChainId";
181
+ readonly outputs: readonly [{
182
+ readonly internalType: "uint256";
183
+ readonly name: "chainid";
184
+ readonly type: "uint256";
185
+ }];
186
+ readonly stateMutability: "view";
187
+ readonly type: "function";
188
+ }, {
189
+ readonly inputs: readonly [];
190
+ readonly name: "getCurrentBlockCoinbase";
191
+ readonly outputs: readonly [{
192
+ readonly internalType: "address";
193
+ readonly name: "coinbase";
194
+ readonly type: "address";
195
+ }];
196
+ readonly stateMutability: "view";
197
+ readonly type: "function";
198
+ }, {
199
+ readonly inputs: readonly [];
200
+ readonly name: "getCurrentBlockDifficulty";
201
+ readonly outputs: readonly [{
202
+ readonly internalType: "uint256";
203
+ readonly name: "difficulty";
204
+ readonly type: "uint256";
205
+ }];
206
+ readonly stateMutability: "view";
207
+ readonly type: "function";
208
+ }, {
209
+ readonly inputs: readonly [];
210
+ readonly name: "getCurrentBlockGasLimit";
211
+ readonly outputs: readonly [{
212
+ readonly internalType: "uint256";
213
+ readonly name: "gaslimit";
214
+ readonly type: "uint256";
215
+ }];
216
+ readonly stateMutability: "view";
217
+ readonly type: "function";
218
+ }, {
219
+ readonly inputs: readonly [];
220
+ readonly name: "getCurrentBlockTimestamp";
221
+ readonly outputs: readonly [{
222
+ readonly internalType: "uint256";
223
+ readonly name: "timestamp";
224
+ readonly type: "uint256";
225
+ }];
226
+ readonly stateMutability: "view";
227
+ readonly type: "function";
228
+ }, {
229
+ readonly inputs: readonly [{
230
+ readonly internalType: "address";
231
+ readonly name: "addr";
232
+ readonly type: "address";
233
+ }];
234
+ readonly name: "getEthBalance";
235
+ readonly outputs: readonly [{
236
+ readonly internalType: "uint256";
237
+ readonly name: "balance";
238
+ readonly type: "uint256";
239
+ }];
240
+ readonly stateMutability: "view";
241
+ readonly type: "function";
242
+ }, {
243
+ readonly inputs: readonly [];
244
+ readonly name: "getLastBlockHash";
245
+ readonly outputs: readonly [{
246
+ readonly internalType: "bytes32";
247
+ readonly name: "blockHash";
248
+ readonly type: "bytes32";
249
+ }];
250
+ readonly stateMutability: "view";
251
+ readonly type: "function";
252
+ }, {
253
+ readonly inputs: readonly [{
254
+ readonly internalType: "bool";
255
+ readonly name: "requireSuccess";
256
+ readonly type: "bool";
257
+ }, {
258
+ readonly components: readonly [{
259
+ readonly internalType: "address";
260
+ readonly name: "target";
261
+ readonly type: "address";
262
+ }, {
263
+ readonly internalType: "bytes";
264
+ readonly name: "callData";
265
+ readonly type: "bytes";
266
+ }];
267
+ readonly internalType: "struct Multicall3.Call[]";
268
+ readonly name: "calls";
269
+ readonly type: "tuple[]";
270
+ }];
271
+ readonly name: "tryAggregate";
272
+ readonly outputs: readonly [{
273
+ readonly components: readonly [{
274
+ readonly internalType: "bool";
275
+ readonly name: "success";
276
+ readonly type: "bool";
277
+ }, {
278
+ readonly internalType: "bytes";
279
+ readonly name: "returnData";
280
+ readonly type: "bytes";
281
+ }];
282
+ readonly internalType: "struct Multicall3.Result[]";
283
+ readonly name: "returnData";
284
+ readonly type: "tuple[]";
285
+ }];
286
+ readonly stateMutability: "payable";
287
+ readonly type: "function";
288
+ }, {
289
+ readonly inputs: readonly [{
290
+ readonly internalType: "bool";
291
+ readonly name: "requireSuccess";
292
+ readonly type: "bool";
293
+ }, {
294
+ readonly components: readonly [{
295
+ readonly internalType: "address";
296
+ readonly name: "target";
297
+ readonly type: "address";
298
+ }, {
299
+ readonly internalType: "bytes";
300
+ readonly name: "callData";
301
+ readonly type: "bytes";
302
+ }];
303
+ readonly internalType: "struct Multicall3.Call[]";
304
+ readonly name: "calls";
305
+ readonly type: "tuple[]";
306
+ }];
307
+ readonly name: "tryBlockAndAggregate";
308
+ readonly outputs: readonly [{
309
+ readonly internalType: "uint256";
310
+ readonly name: "blockNumber";
311
+ readonly type: "uint256";
312
+ }, {
313
+ readonly internalType: "bytes32";
314
+ readonly name: "blockHash";
315
+ readonly type: "bytes32";
316
+ }, {
317
+ readonly components: readonly [{
318
+ readonly internalType: "bool";
319
+ readonly name: "success";
320
+ readonly type: "bool";
321
+ }, {
322
+ readonly internalType: "bytes";
323
+ readonly name: "returnData";
324
+ readonly type: "bytes";
325
+ }];
326
+ readonly internalType: "struct Multicall3.Result[]";
327
+ readonly name: "returnData";
328
+ readonly type: "tuple[]";
329
+ }];
330
+ readonly stateMutability: "payable";
331
+ readonly type: "function";
332
+ }];
@@ -0,0 +1,440 @@
1
+ export const MulticallABI = [
2
+ {
3
+ inputs: [
4
+ {
5
+ components: [
6
+ {
7
+ internalType: "address",
8
+ name: "target",
9
+ type: "address",
10
+ },
11
+ {
12
+ internalType: "bytes",
13
+ name: "callData",
14
+ type: "bytes",
15
+ },
16
+ ],
17
+ internalType: "struct Multicall3.Call[]",
18
+ name: "calls",
19
+ type: "tuple[]",
20
+ },
21
+ ],
22
+ name: "aggregate",
23
+ outputs: [
24
+ {
25
+ internalType: "uint256",
26
+ name: "blockNumber",
27
+ type: "uint256",
28
+ },
29
+ {
30
+ internalType: "bytes[]",
31
+ name: "returnData",
32
+ type: "bytes[]",
33
+ },
34
+ ],
35
+ stateMutability: "payable",
36
+ type: "function",
37
+ },
38
+ {
39
+ inputs: [
40
+ {
41
+ components: [
42
+ {
43
+ internalType: "address",
44
+ name: "target",
45
+ type: "address",
46
+ },
47
+ {
48
+ internalType: "bool",
49
+ name: "allowFailure",
50
+ type: "bool",
51
+ },
52
+ {
53
+ internalType: "bytes",
54
+ name: "callData",
55
+ type: "bytes",
56
+ },
57
+ ],
58
+ internalType: "struct Multicall3.Call3[]",
59
+ name: "calls",
60
+ type: "tuple[]",
61
+ },
62
+ ],
63
+ name: "aggregate3",
64
+ outputs: [
65
+ {
66
+ components: [
67
+ {
68
+ internalType: "bool",
69
+ name: "success",
70
+ type: "bool",
71
+ },
72
+ {
73
+ internalType: "bytes",
74
+ name: "returnData",
75
+ type: "bytes",
76
+ },
77
+ ],
78
+ internalType: "struct Multicall3.Result[]",
79
+ name: "returnData",
80
+ type: "tuple[]",
81
+ },
82
+ ],
83
+ stateMutability: "payable",
84
+ type: "function",
85
+ },
86
+ {
87
+ inputs: [
88
+ {
89
+ components: [
90
+ {
91
+ internalType: "address",
92
+ name: "target",
93
+ type: "address",
94
+ },
95
+ {
96
+ internalType: "bool",
97
+ name: "allowFailure",
98
+ type: "bool",
99
+ },
100
+ {
101
+ internalType: "uint256",
102
+ name: "value",
103
+ type: "uint256",
104
+ },
105
+ {
106
+ internalType: "bytes",
107
+ name: "callData",
108
+ type: "bytes",
109
+ },
110
+ ],
111
+ internalType: "struct Multicall3.Call3Value[]",
112
+ name: "calls",
113
+ type: "tuple[]",
114
+ },
115
+ ],
116
+ name: "aggregate3Value",
117
+ outputs: [
118
+ {
119
+ components: [
120
+ {
121
+ internalType: "bool",
122
+ name: "success",
123
+ type: "bool",
124
+ },
125
+ {
126
+ internalType: "bytes",
127
+ name: "returnData",
128
+ type: "bytes",
129
+ },
130
+ ],
131
+ internalType: "struct Multicall3.Result[]",
132
+ name: "returnData",
133
+ type: "tuple[]",
134
+ },
135
+ ],
136
+ stateMutability: "payable",
137
+ type: "function",
138
+ },
139
+ {
140
+ inputs: [
141
+ {
142
+ components: [
143
+ {
144
+ internalType: "address",
145
+ name: "target",
146
+ type: "address",
147
+ },
148
+ {
149
+ internalType: "bytes",
150
+ name: "callData",
151
+ type: "bytes",
152
+ },
153
+ ],
154
+ internalType: "struct Multicall3.Call[]",
155
+ name: "calls",
156
+ type: "tuple[]",
157
+ },
158
+ ],
159
+ name: "blockAndAggregate",
160
+ outputs: [
161
+ {
162
+ internalType: "uint256",
163
+ name: "blockNumber",
164
+ type: "uint256",
165
+ },
166
+ {
167
+ internalType: "bytes32",
168
+ name: "blockHash",
169
+ type: "bytes32",
170
+ },
171
+ {
172
+ components: [
173
+ {
174
+ internalType: "bool",
175
+ name: "success",
176
+ type: "bool",
177
+ },
178
+ {
179
+ internalType: "bytes",
180
+ name: "returnData",
181
+ type: "bytes",
182
+ },
183
+ ],
184
+ internalType: "struct Multicall3.Result[]",
185
+ name: "returnData",
186
+ type: "tuple[]",
187
+ },
188
+ ],
189
+ stateMutability: "payable",
190
+ type: "function",
191
+ },
192
+ {
193
+ inputs: [],
194
+ name: "getBasefee",
195
+ outputs: [
196
+ {
197
+ internalType: "uint256",
198
+ name: "basefee",
199
+ type: "uint256",
200
+ },
201
+ ],
202
+ stateMutability: "view",
203
+ type: "function",
204
+ },
205
+ {
206
+ inputs: [
207
+ {
208
+ internalType: "uint256",
209
+ name: "blockNumber",
210
+ type: "uint256",
211
+ },
212
+ ],
213
+ name: "getBlockHash",
214
+ outputs: [
215
+ {
216
+ internalType: "bytes32",
217
+ name: "blockHash",
218
+ type: "bytes32",
219
+ },
220
+ ],
221
+ stateMutability: "view",
222
+ type: "function",
223
+ },
224
+ {
225
+ inputs: [],
226
+ name: "getBlockNumber",
227
+ outputs: [
228
+ {
229
+ internalType: "uint256",
230
+ name: "blockNumber",
231
+ type: "uint256",
232
+ },
233
+ ],
234
+ stateMutability: "view",
235
+ type: "function",
236
+ },
237
+ {
238
+ inputs: [],
239
+ name: "getChainId",
240
+ outputs: [
241
+ {
242
+ internalType: "uint256",
243
+ name: "chainid",
244
+ type: "uint256",
245
+ },
246
+ ],
247
+ stateMutability: "view",
248
+ type: "function",
249
+ },
250
+ {
251
+ inputs: [],
252
+ name: "getCurrentBlockCoinbase",
253
+ outputs: [
254
+ {
255
+ internalType: "address",
256
+ name: "coinbase",
257
+ type: "address",
258
+ },
259
+ ],
260
+ stateMutability: "view",
261
+ type: "function",
262
+ },
263
+ {
264
+ inputs: [],
265
+ name: "getCurrentBlockDifficulty",
266
+ outputs: [
267
+ {
268
+ internalType: "uint256",
269
+ name: "difficulty",
270
+ type: "uint256",
271
+ },
272
+ ],
273
+ stateMutability: "view",
274
+ type: "function",
275
+ },
276
+ {
277
+ inputs: [],
278
+ name: "getCurrentBlockGasLimit",
279
+ outputs: [
280
+ {
281
+ internalType: "uint256",
282
+ name: "gaslimit",
283
+ type: "uint256",
284
+ },
285
+ ],
286
+ stateMutability: "view",
287
+ type: "function",
288
+ },
289
+ {
290
+ inputs: [],
291
+ name: "getCurrentBlockTimestamp",
292
+ outputs: [
293
+ {
294
+ internalType: "uint256",
295
+ name: "timestamp",
296
+ type: "uint256",
297
+ },
298
+ ],
299
+ stateMutability: "view",
300
+ type: "function",
301
+ },
302
+ {
303
+ inputs: [
304
+ {
305
+ internalType: "address",
306
+ name: "addr",
307
+ type: "address",
308
+ },
309
+ ],
310
+ name: "getEthBalance",
311
+ outputs: [
312
+ {
313
+ internalType: "uint256",
314
+ name: "balance",
315
+ type: "uint256",
316
+ },
317
+ ],
318
+ stateMutability: "view",
319
+ type: "function",
320
+ },
321
+ {
322
+ inputs: [],
323
+ name: "getLastBlockHash",
324
+ outputs: [
325
+ {
326
+ internalType: "bytes32",
327
+ name: "blockHash",
328
+ type: "bytes32",
329
+ },
330
+ ],
331
+ stateMutability: "view",
332
+ type: "function",
333
+ },
334
+ {
335
+ inputs: [
336
+ {
337
+ internalType: "bool",
338
+ name: "requireSuccess",
339
+ type: "bool",
340
+ },
341
+ {
342
+ components: [
343
+ {
344
+ internalType: "address",
345
+ name: "target",
346
+ type: "address",
347
+ },
348
+ {
349
+ internalType: "bytes",
350
+ name: "callData",
351
+ type: "bytes",
352
+ },
353
+ ],
354
+ internalType: "struct Multicall3.Call[]",
355
+ name: "calls",
356
+ type: "tuple[]",
357
+ },
358
+ ],
359
+ name: "tryAggregate",
360
+ outputs: [
361
+ {
362
+ components: [
363
+ {
364
+ internalType: "bool",
365
+ name: "success",
366
+ type: "bool",
367
+ },
368
+ {
369
+ internalType: "bytes",
370
+ name: "returnData",
371
+ type: "bytes",
372
+ },
373
+ ],
374
+ internalType: "struct Multicall3.Result[]",
375
+ name: "returnData",
376
+ type: "tuple[]",
377
+ },
378
+ ],
379
+ stateMutability: "payable",
380
+ type: "function",
381
+ },
382
+ {
383
+ inputs: [
384
+ {
385
+ internalType: "bool",
386
+ name: "requireSuccess",
387
+ type: "bool",
388
+ },
389
+ {
390
+ components: [
391
+ {
392
+ internalType: "address",
393
+ name: "target",
394
+ type: "address",
395
+ },
396
+ {
397
+ internalType: "bytes",
398
+ name: "callData",
399
+ type: "bytes",
400
+ },
401
+ ],
402
+ internalType: "struct Multicall3.Call[]",
403
+ name: "calls",
404
+ type: "tuple[]",
405
+ },
406
+ ],
407
+ name: "tryBlockAndAggregate",
408
+ outputs: [
409
+ {
410
+ internalType: "uint256",
411
+ name: "blockNumber",
412
+ type: "uint256",
413
+ },
414
+ {
415
+ internalType: "bytes32",
416
+ name: "blockHash",
417
+ type: "bytes32",
418
+ },
419
+ {
420
+ components: [
421
+ {
422
+ internalType: "bool",
423
+ name: "success",
424
+ type: "bool",
425
+ },
426
+ {
427
+ internalType: "bytes",
428
+ name: "returnData",
429
+ type: "bytes",
430
+ },
431
+ ],
432
+ internalType: "struct Multicall3.Result[]",
433
+ name: "returnData",
434
+ type: "tuple[]",
435
+ },
436
+ ],
437
+ stateMutability: "payable",
438
+ type: "function",
439
+ },
440
+ ];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@woof-software/contracts-tools-sdk-ethers",
3
3
  "description": "Module simplify smart contract interactions and multicall3 aggregation on the Ethereum blockchain and other EVM-compatible networks.",
4
- "version": "0.0.5",
4
+ "version": "0.0.7",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/woof-compound/sandbox-sdks.git"