cavanmflynn/ethers-multicall

Not sure why ethers-multicall not work in Fantom

mushroomsforest opened this issue · 4 comments

We are trying to use ethers-multicall (https://www.npmjs.com/package/ethers-multicall) to group multiple calls to Fantom RPC, but it seems not working. Would you mind to take a look at and share any thoughts/guidance if possible?

image
sample reproduction code:

let mushContract = new Contract("0x883fb00742161dce2235bbf4a67df84cd0e50c08", "contractABI");

let marketPriceCall = mushContract.getMarkPrice("0x321162Cd933E2Be498Cd2267a90534A804051b11");
let exposureBalanceCall = mushContract.exposureBalances("0x43229759E12eFbe3e2A0fB0510B15e516d046442", "0x321162Cd933E2Be498Cd2267a90534A804051b11");
let tokenBalanceCall = mushContract.tokenBalances("0x43229759E12eFbe3e2A0fB0510B15e516d046442", "0x321162Cd933E2Be498Cd2267a90534A804051b11");
let exposureLeverageBpsCall = mushContract.exposureLeverageBps("0x43229759E12eFbe3e2A0fB0510B15e516d046442","0x321162Cd933E2Be498Cd2267a90534A804051b11");


let [
    marketPrice,
    exposureBalance,
    tokenBalance,
    exposureLeverageBps,
] = await callProvider.all([
    marketPriceCall,
    exposureBalanceCall,
    tokenBalanceCall,
    exposureLeverageBpsCall,
]);

no worry, we submit a PR for Fantom: #22

I have this error on avalanche...

@mushroomsforest do I understand correctly that you need to deploy a contract on Fantom to get rid of this error? Could you point to which contract needs to be deployed?

@mushroomsforest do I understand correctly that you need to deploy a contract on Fantom to get rid of this error? Could you point to which contract needs to be deployed?

It is already deployed and you could find it in this PR #21 (comment)