ethers-multicall icon indicating copy to clipboard operation
ethers-multicall copied to clipboard

Multicall.all() yields Cannot read properties of undefined (reading 'length')

Open raparri01 opened this issue 3 years ago • 1 comments

I am currently running into this error when await-ing the result of a multicall.all() call.

ethers-multicall: ^0.2.3 ethers: ^5.7.2

Below is the relevant code:

const multicallProvider = new Provider(provider, 1); //Provider is an AlchemyProvider
const call1 = new Contract(address, abi).liquidity; // ethers-multicall contract
const call2 = new Contract(address, abi).protocolFees; //ethers-multicall-contract
await multicallProvider.all([call1, call2]) //Fails and throws error

Thanks!

raparri01 avatar Nov 23 '22 19:11 raparri01

hello, you resolved i have this other error like yours: Possible Unhandled Promise Rejection (id: 56): "undefined is not an object (evaluating 'inputs_1.length')"

DeabitTech avatar Jan 28 '23 16:01 DeabitTech