I am a new in solidity so have a questions regarding minting NFT from csv.

There is a .csv file with 1000 rows in each row - 5 attributes. These rows should be taken randomly for lazy minting 1000 NFT ERC721.

Where these attributes should be hold? Is it possible to hold these rows in SC, some array or mapping? Please advice in general, what is the best design approach for such kind of smart contract?

Also, how to handle randomness in this case?

Thanks in advance.

1 Answer 1


In general you can use Excel to arrange the rows and columns and to pick the random values.

After that you now have 1000 rows of which tokens gets which attributes.

Typically you will want to publish that right away.

But some people will try and keep it a secret and then mint the tokens and release the secret list.

  • Is it possible to read data from Excel in Solidity?
    – user85312
    Nov 11, 2021 at 16:27
  • Of course. In Excel put addresses in column A, token IDs in column B and then in column C use like ="("&A1&&","&B1&"),". Autofill that cell down, and then paste that as source code into the Solidity file. Nov 12, 2021 at 5:27

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.