Deployment to Ethereum Ropsten test net fails

Viewed 322

I am trying the freecodecamp project here: https://www.freecodecamp.org/news/how-to-make-an-nft/

I am stuck with the step

node ./scripts/deploy.js

But it fails to deploy to the Ropsten test network. I am a beginner with NFT and Ethereum and I am not sure how to debug that.

The error message is now that the funds are insufficient. but I got now more than 10 Ethereum in the Metamask wallet.

Error: insufficient funds for intrinsic transaction cost (error={"name":"ProviderError","code":-32000,"_isProviderError":true}, method="sendTransaction", transaction=undefined, code=INSUFFICIENT_FUNDS, version=providers/5.5.0)

How can I find out how much Ethereum I would need ? I expect it to be sufficient but not sure of course. And what can be the real reason for the failure ?

Here the deploy script:

// ethereum/scripts/deploy.js

async function main() {
  const EmotionalShapes = await ethers.getContractFactory("EmotionalShapes");
  const emotionalShapes = await EmotionalShapes.deploy();

  console.log("EmotionalShapes deployed:", emotionalShapes.address);
}

main()
  .then(() => process.exit(0))
  .catch((error) => {
    console.error(error);
    process.exit(1);
  });
0 Answers
Related