Rarible Clone Moralis Tutorial - Gas Issue

I am following Moralis YT tutorials about how to create a Rarible clone, and I am on the episode 9 where we get to create our first NFT. However, when I click to “create NFT”, my MetaMask opens, and it says "ALERT: Gas limit must be at least 21000"

I’m just getting started with the whole Moralis/Blockchain thing. Does anyone know how to solve this?

Thank you very much in advance and have a great day,

Gas errors are often related to errors in the front end code. Usually forgetting to do the following after re-deploying the contract

  • Update the ABI
  • Update the contract address

I’m gonna try that. When you say “re-deploying contracts”, you mean when I run truffle migrate or truffle migrate --reset?

Correct. The terms “deploy” and “migrate” are interchangable when talking about truffle.

Got it, mayjer! I’m going to try that now, and get back to you.

That didn’t work. The ABI of the token contract didn’t change, and I updated the address, but I still get the same error message when creating an NFT.

For anyone still having issues: I solved it by adding a new RPC account to my meta mask. Make sure all the information about your local ganache server is entered correctly.

1 Like