[SOLVED]React-Moralis About speedynodes error

I’m using react-moralis for my project
and i having this error on console when fetching NFT from wallet

and this is the code

const options = { chain: chainName, address: ethAddress, token_address: nftAddress };
const results = await Web3API.account.getNFTsForContract(options);

this is the version i using
“moralis-v1”: “^1.11.0”,
“react-moralis”: “^1.4.2”,

anyone know what cause the error? and how to solve it?

as per the image, it looks like the error is from syncSpaceShips function in cloud code. In case if you are using moralis web3 provided in your cloud code, you need to updated it to use your own speedy node url, as the moralis speedy nodes are now discontinued.

You can follow it as shown in this docs.
https://v1docs.moralis.io/moralis-dapp/cloud-code/cloud-functions#contracts

i use web3bychain, i don’t setup any speedy nodes before and it worked previously.

is the web3bychain discontinued?

do i need too replace it?

const web3 = Moralis.web3ByChain("0x13881");//mumbai

const logger = Moralis.Cloud.getLogger();

const tokenContract = new web3.eth.Contract(tokenAbi,tokenAddress);

const nftContract = new web3.eth.Contract(nftAbi,nftAddress);

Yes web3ByChain, does not work now. You need to define web3 using your own speedy node url.

const web3 = new Moralis.Web3(
    new Moralis.Web3.providers.HttpProvider(
      "SPEEDY NODE URL"
    )
  );

You can get speedy node url from https://moralis.io/largenodes.

1 Like

thanks, it worked now.