0
const provider = new Provider(process.env[pv_key] , https://alchemy_Polygon_api_key); 
    const web3 = new Web3(provider);
    const networkId = await web3.eth.net.getId();
    const myContract = new web3.eth.Contract(
        abi,
        contractAddress
    );
    const receipt = await myContract.methods.mint(requestBody.recievedAmount,requestBody.wallet).send({ from: process.env.MANAGER_ADDRESS,gasPrice: String(gasPrice)});

After minting one nft, the api return time out error for next 2.5 minutes, that's very weird. And then it starts working again.

I have used web3. Now what can I do to dix this issue? Will retrying be able to solve this issue? And if the answer is retrying using alchemy sdk, how will I use it here in place of web3?

TylerH
  • 20,799
  • 66
  • 75
  • 101
Blockchain Kid
  • 315
  • 2
  • 9

0 Answers0