This is the mint function I write in my contract. Each non-fungible token here represents a mobile device with a unique device ID and the device belongs to a certain owner. So apart from the token id, it contains owner's information including his/her ID, wallet address and ipfs hash value of user identity profile. The token does not contain any metadata.

First part of the function is a for loop mapping owner's information to the token; Second is the mintBatch function that actually mints multiple non-fungible tokens to one address.

enter image description here

I am wondering if there is any upper limit on the number of NFTs I can mint using this function.

For instance, if I mint 100,000 such NFTs to an address, would the miner be unwilling to package this transaction into a new block because the size of the transaction is too big that it would slow down the whole mining process.

And would the EVM be able to handle such a large amount of state changes in a short time?

1 Answer 1


The rule of thumb seems to be up to 20 NFTs if you want to be sure it fits into a block the traditional way.

Otherwise you might want to look into Ghost minting and LazyArray techniques pioneered by William Entriken in AreaWorld project:



  • Thank you sir, I will look up the project you mentioned. And by the way, I would like to ask if there's a limit on the number of erc20 tokens that can be minted in one transaction? Dec 10, 2021 at 8:43
  • I don't think there is a limit for fungible tokens as you don't have to loop through a cycle. Dec 10, 2021 at 23:10
  • Ok thank you sir Dec 11, 2021 at 9:58
  • :) you're welcome, please feel free to mark the answer as correct if you think it is Dec 13, 2021 at 13:24
  • Hi Taras Filatov, not to be rude but where do you find this 20 NFT, rule of thumb?
    – Lonewarp
    Jun 28 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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