cavanmflynn / ethers-multicall

Make multiple Ethereum network requests in a single HTTP query. ethcall for ethers v5.
MIT License
224 stars 100 forks source link

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

Open raparri01 opened 1 year ago

raparri01 commented 1 year ago

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!

DeabitTech commented 1 year ago

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')"