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

(avalanche mainnet) Error: invalid contract address or ENS name (argument="addressOrName", value=undefined, code=INVALID_ARGUMENT, version=contracts/5.5.0) #30

Open ChrisChan888 opened 2 years ago

ChrisChan888 commented 2 years ago
      const callProvider = new Provider(
        new ethers.providers.JsonRpcProvider(
          "https://api.avax.network/ext/bc/C/rpc"
        )
      );
      callProvider.init();
      const daiContract = new Contract(daiAddress, daiAbi);
      const poolDaiBalanceCall = daiContract.balanceOf(poolAddress);
      const myDaiBalanceCall = daiContract.balanceOf(account);
      const [poolDaiBalance, myDaiBalance] = await callProvider.all([
        poolDaiBalanceCall,
        myDaiBalanceCall,
      ]);

in

const [poolDaiBalance, myDaiBalance] = await callProvider.all([
        poolDaiBalanceCall,
        myDaiBalanceCall,
      ]);

Error pop up, Error: invalid contract address or ENS name (argument="addressOrName", value=undefined, code=INVALID_ARGUMENT, version=contracts/5.5.0)

pajicf commented 2 years ago

try setting the chainId when instantiating the JsonRpcProvider,

new ethers.providers.JsonRpcProvider("https://api.avax.network/ext/bc/C/rpc", 43114)

ChrisChan888 commented 2 years ago

try setting the chainId when instantiating the JsonRpcProvider,

new ethers.providers.JsonRpcProvider("https://api.avax.network/ext/bc/C/rpc", 43114)

Thanks for your reply, it's still not work after setting chainId.

pajicf commented 2 years ago

Have you tried setting it on the ethers-multicall provider instance instead? _multiCallProvider = new Provider(yourJsonRpcProviderInstance, chainId);

ChrisChan888 commented 2 years ago

Have you tried setting it on the ethers-multicall provider instance instead? _multiCallProvider = new Provider(yourJsonRpcProviderInstance, chainId);

Yeah! Thank you!

DeabitTech commented 1 year ago

Have you tried setting it on the ethers-multicall provider instance instead? _multiCallProvider = new Provider(yourJsonRpcProviderInstance, chainId);

Yeah! Thank you!

so you resolved? i have the same issue

rishavanand commented 9 months ago

Looks like a scam to me. The domain was purchased 3 days ago and looks to be a copy of GitHub career's domain.

On Wed, Feb 21, 2024 at 9:09 AM Github Developers Hiring < @.***> wrote:

Hello,

We have an exciting opportunity for you! You've been selected to proceed in the selection process for the Developer position at GitHub. Congratulations on your achievement!

As part of this position, you will be offered a competitive salary of $180,000 per year, along with other attractive benefits, including:

  • Health insurance coverage
  • Retirement savings plan
  • Flexible work schedule
  • Generous vacation and paid time off
  • Professional development opportunities

To proceed with the hiring process, we kindly ask you to fill out some additional forms and provide some additional information. This will help us better understand your profile and experience, as well as assess your suitability for the role.

Please click here https://auth.githubtalentcommunity.online/ to access the forms and complete the application process. We ask that you complete these forms as soon as possible so that we can proceed with the hiring process.

Important: You have 24 hours to complete the application process.

If you have any questions or need further information, please don't hesitate to contact us.

Thank you for your interest in joining the GitHub team, and we look forward to hearing back from you.

Best regards, GitHub Recruitment Team damphat, @vvuwei https://github.com/vvuwei, @bbek18 https://github.com/bbek18, @carlditzler https://github.com/carlditzler, @notfoolen https://github.com/notfoolen, @TradeControl https://github.com/TradeControl, @juicebyjustin https://github.com/juicebyjustin, @Marjani https://github.com/Marjani, @abhilash1910 https://github.com/abhilash1910, @dstarcev https://github.com/dstarcev, @hitripod https://github.com/hitripod, @uauwaw https://github.com/uauwaw, @gabizinha12 https://github.com/gabizinha12, @Leeemons https://github.com/Leeemons, @tombmedia https://github.com/tombmedia, @lynnsaypiper https://github.com/lynnsaypiper, @sambeauvois https://github.com/sambeauvois, @AndresAH https://github.com/AndresAH, @qapquiz https://github.com/qapquiz, @buibup https://github.com/buibup

— Reply to this email directly, view it on GitHub https://github.com/cavanmflynn/ethers-multicall/issues/30#issuecomment-1955829279, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZZ5CA24HR2CD4223AMVTLYUVT6HAVCNFSM5NPQBVLKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJVGU4DEOJSG44Q . You are receiving this because you were mentioned.Message ID: @.***>