@ethereum-js/multicall
Version:
Multicall allows multiple smart contract constant function calls to be grouped into a single call and the results aggregated into a single result
76 lines (75 loc) • 2.04 kB
TypeScript
import { ethers } from "ethers";
import { CallOptions, CallData, MulticalSetup } from "./types";
import { ethers as etherV5 } from "ethers-v5";
export declare enum Networks {
mainnet = 1,
ropsten = 3,
rinkeby = 4,
goerli = 5,
optimism = 10,
kovan = 42,
matic = 137,
kovanOptimism = 69,
xdai = 100,
goerliOptimism = 420,
arbitrum = 42161,
rinkebyArbitrum = 421611,
goerliArbitrum = 421613,
mumbai = 80001,
sepolia = 11155111,
avalancheMainnet = 43114,
avalancheFuji = 43113,
fantomTestnet = 4002,
fantom = 250,
bsc = 56,
bsc_testnet = 97,
moonbeam = 1284,
moonriver = 1285,
moonbaseAlphaTestnet = 1287,
harmony = 1666600000,
cronos = 25,
fuse = 122,
songbirdCanaryNetwork = 19,
costonTestnet = 16,
boba = 288,
aurora = 1313161554,
astar = 592,
okc = 66,
heco = 128,
metis = 1088,
rsk = 30,
rskTestnet = 31,
evmos = 9001,
evmosTestnet = 9000,
thundercore = 108,
thundercoreTestnet = 18,
oasis = 26863,
celo = 42220,
godwoken = 71402,
godwokentestnet = 71401,
klatyn = 8217,
milkomeda = 2001,
kcc = 321,
etherlite = 111,
lineaTestnet = 59140
}
export declare const getContractAddressFromChainId: (chainId: number) => "0xcA11bde05977b3631167028862bE2a173976CA11" | "0x21681750D7ddCB8d1240eD47338dC984f94AF2aC";
export default class Ethers {
static isV5: boolean;
static v5: typeof etherV5;
static v6: typeof ethers;
static getInterface(abi: any[]): etherV5.utils.Interface | ethers.Interface;
static getOutput(abi: any[], method: string): any;
static abiDecode(types: any, data: any): etherV5.utils.Result;
}
export declare class Multicall {
private _setup;
constructor(setup: MulticalSetup);
call(contractsCallData: CallData[], callOptions?: CallOptions): Promise<{
blockNumber: number;
results: any[];
}>;
private execute;
private executeEtherV5;
private executeEtherV6;
}