Skip to content

Commit f8be2dc

Browse files
committed
release: 2.16.0
1 parent 4fb22ac commit f8be2dc

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ethereum-multicall",
3-
"version": "2.15.0",
3+
"version": "2.16.0",
44
"description": "Multicall allows multiple smart contract constant function calls to be grouped into a single call and the results aggregated into a single result",
55
"main": "dist/cjs/index.js",
66
"module": "./dist/esm/index.js",

src/multicall.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@ import {
99
AggregateResponse,
1010
CallReturnContext,
1111
ContractCallContext,
12+
ContractCallOptions,
1213
ContractCallResults,
1314
ContractCallReturnContext,
1415
MulticallOptionsCustomJsonRpcProvider,
1516
MulticallOptionsEthers,
1617
MulticallOptionsWeb3,
17-
ContractCallOptions,
1818
} from './models';
1919
import { Utils } from './utils';
2020

2121
export class Multicall {
22-
private readonly ABI = [
22+
// exposed as public as people can decide to use this outside multicall.call
23+
public static ABI = [
2324
{
2425
constant: false,
2526
inputs: [
@@ -288,9 +289,10 @@ export class Multicall {
288289

289290
/**
290291
* Build aggregate call context
292+
* exposed as public as people can decide to use this outside multicall.call
291293
* @param contractCallContexts The contract call contexts
292294
*/
293-
private buildAggregateCallContext(
295+
public buildAggregateCallContext(
294296
contractCallContexts: ContractCallContext[]
295297
): AggregateCallContext[] {
296298
const aggregateCallContext: AggregateCallContext[] = [];
@@ -379,7 +381,7 @@ export class Multicall {
379381
const web3 = this.getTypedOptions<MulticallOptionsWeb3>().web3Instance;
380382
const networkId = await web3.eth.net.getId();
381383
const contract = new web3.eth.Contract(
382-
this.ABI,
384+
Multicall.ABI,
383385
this.getContractBasedOnNetwork(networkId)
384386
);
385387
const callParams = [];
@@ -440,7 +442,7 @@ export class Multicall {
440442

441443
const contract = new ethers.Contract(
442444
this.getContractBasedOnNetwork(network.chainId),
443-
this.ABI,
445+
Multicall.ABI,
444446
ethersProvider
445447
);
446448
let overrideOptions = {};
@@ -510,9 +512,10 @@ export class Multicall {
510512

511513
/**
512514
* Map call contract to match contract format
515+
* exposed as public as people can decide to use this outside multicall.call
513516
* @param calls The calls context
514517
*/
515-
private mapCallContextToMatchContractFormat(
518+
public mapCallContextToMatchContractFormat(
516519
calls: AggregateCallContext[]
517520
): Array<{
518521
target: string;

0 commit comments

Comments
 (0)