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

Not sure why ethers-multicall not work in Fantom

Open mushroomsforest opened this issue 3 years ago • 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,
]);

mushroomsforest avatar Sep 02 '21 07:09 mushroomsforest

no worry, we submit a PR for Fantom: https://github.com/cavanmflynn/ethers-multicall/pull/22

mushroomsforest avatar Sep 02 '21 08:09 mushroomsforest

I have this error on avalanche...

ChrisChan888 avatar Feb 03 '22 17:02 ChrisChan888

@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?

TJakubek avatar Feb 09 '22 13:02 TJakubek

@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 https://github.com/cavanmflynn/ethers-multicall/issues/21#issuecomment-911363020

mushroomsforest avatar Feb 10 '22 15:02 mushroomsforest