Generate NFTs with this simple code (this could make you millions) PART 1

Sure did. Not sure what else to try.

Can you find the location where npm should be installed?

Its installed to the recommended path. Im over it. Will need to find another solution as moralis just isnt it for my rig. Maybe its cause im on an M1, who knows. Thank you for your time.

npx works for you? This is not something specific to Moralis, is something specific to node

https://justinwride.medium.com/install-node-and-npm-natively-on-apple-silicon-mac-m1-7432c826389b

running npx npm works for you?

yes it does work for me. I ran the stuff in the link and still getting the exact same errors.

you could try to prefix the command that you want to run with npx

Hi there, thanks for the great video. I had a few questions:

  1. In index.js, beside the master key and xAPI key it says “do not display in public dir”, what changes therefore (if any) need to be made anywhere when the NFTs are minted to mainnet vs testnet? Do you need to change anything before moving to live NFTs?

  2. On the .sol NFT contract on remix, the video shows you manually typing in what NFTs to make (i.e. 1 to 3) using the _mint(msg.sender, 1, 1, “”); code line. How can edit code it so you mint thousands of NFTs (if that is how many are in your collection) without typing in each number manually 1,2,3,4…100,000 etc

  3. the node index.js code seems to work fine if I try with smaller numbers of NFTs. I tried creating c.100,000 images, they successfully saved on my local drive but I got the following error and it did not seem to create the metadata files either?

  4. What does the metadata actually do on Opensea. I can’t see attributes etc, so how can you make it such that the metadata we have collected actually displays on the listing?

+++
Q3 error.

error

for q3 you may need to have a lower number of files, or to change the code so that it doesn’t keep so many files opened at the same time, or change the settings on your operating system to support more file handles per process.

for q2, usually you will have to pay the gas for that minting, and if you want to mint 100k tokens then you will have to pay the price in gas for those transactions. You could let the users do the mint after you prepared the metadata, so that you don’t have to pay that gas fee. But it may require changes on how you do it.

for q4, after successful mint, you should see some metadata and picture on opensea too, but there could be different problems from how the smart contract was deployed to the path of the files with the metadata.

Thanks for the reply,

On Q3, do you know practically how / where I would edit the code exactly? What code do I need to add or change?

Qn Q2, assuming I am happy to pay the gas, how could I edit the code to mint 100,000? Is there a javascript shortcut instead of typing in each number 1 to 100,000

Thanks on Q4.

Do you know on Q1?

Thanks again

for q1: in order to mint on mainnet, you will need a smart contract deployed on mainnet

for q3, you could try with ulimit in an unix system, I don’t know where exactly you need to change the code, but it should be possible to change it so that it doesn’t keep opened all the files

on q2, you can add another function in your smart contract (written in solidity) where you could mint 100 or 1000 nfts once, and you could call that function when you want to mint more nfts.

1 Like

still not orking seems to be a permission issue I cannot get passed. Tried installing homebrew same. sigh

Thank you. Just to clarify on Q1, understood. What I am saying is in the original NFT creation code there are comments beside the master key and xAPI key that say “do not display in public dir”. So, what, if anything, do I need to change when I am minting to main-net. What does “do not display in public dir” mean? Do I have to do anything to prevent it displaying?

Hello,

I can’t find documentation about what the edition part that you can edit in the config file are for, and I’m very interested on it.

I specifically mean the “startEditionFrom”, the “editionSize”, and the “editionDnaPrefix”.
My question is the following:
Can I create a collection of let’s say 10000 NFTs with 10 editions of 1000NFTs each?
Practical example:

  • Let’s say I have a collection of pieces 10000 of 10 different houses which 1000 variations of each house. So I want to create 1000 versions of 1 house, 1000 of another house and so on until the total 10000 houses that the collection has.
  • Also can I open the mint only for the 1000 variations of the first house? and then later on open the mint for the 1000 variations of the following house?

Is this why is the edition used for?

Thank you.