0

When I try to mint 2000 items in remix I get this error:

Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? execution reverted

What should I do to mint 2000 items?

This is where I specified the number 2000:

contract TST is ERC721Enumerable, Ownable {
  using Strings for uint256;

  string baseURI;
  string public baseExtension = ".json";
  uint256 public cost = 0.05 ether;
  uint256 public maxSupply = 2000;
  uint256 public maxMintAmount = 2000;
  bool public paused = false;
  bool public revealed = false;
  string public notRevealedUri;

https://github.com/HashLips/hashlips_nft_contract/blob/main/contract/SimpleNft_flat.sol

[1]: https://i.sstatic.net/xeHXb.png

2
  • 1
    There's such a thing as a maximum block gas limit. No single transaction can consume more gas than this limit. Commented Aug 7, 2022 at 10:14
  • As Paul says, you need to split your mint actions to several Ethreum transactions. Commented Aug 7, 2022 at 12:49

1 Answer 1

1

Maximum gasLimit on Evm-based(Ethereum) is 30 million gas for a TX. you can specify higher gas limit on your remix IDE.

in large number of minting you may be faced with large amount of gas to pay because it has too state changes. the alternative way is that proceed minting with more than one transactions and separate them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.