Giter Club home page Giter Club logo

create-and-mint-nft-collection's Introduction

The Peanut Gallery And Co's take on the code bases created by Hashlips and codeSTACKr

To find out more about The Peanut Gallery And Co, please visit:

💻 Discord

🐦 Twitter

📱 Instagram

🌲 Linktree

Base code is from the below repos - Massive thank you to the teams behind these repos!

File Uploads can be done via Pinata or a similar service that gives you a single CID for images and another one for meta files or NFTPort can be used.

Minting uses NFTPort

Reference the following videos from both the core code developers for more details.

Please note that some of the commands have changed and have been updated compared to the original videos, please see them under the different sections for each script / process that you can run.

TIP / Contributions Address

If you feel that this has benefitted you in any way and would like to make a contribution towards The Peanut Gallery And Co, then please use the following MetaMask wallet address:

  • 0x5cE5D823f4bD8Ec610868fBa65832B479152C7E1

NFT Collection

If you would like to support my NFT collection, please take a look at the below.

Banner V4

Run Below Command To Install Depedencies

  • npm install

Please note that if you have a Mac with a M1 chip and you run into issues with npm install, then please try to install Node.js version 14 instead of the latest Node version and try the npm install again

Code Repo Guide

Commands

ERC721 Product Contract Examples

ERC1155 Product Contract Examples

Error Examples

Video Examples


UPDATES & FIXES

Opensea Scripts

Added a new script utils/opensea/sell_nfts.js that will allow users to sell NFTs between two edition numbers (inclusive) to be put up for sale if the user owns the NFTs. This functionality uses Puppeteer and Chainsafe's Dappeteer, so please use at your own discretion as you will need to make use of your private key for this functionality to work.

Added a new script utils/opensea/cancel_on_sale_nfts.js that will allow users to remove NFTs that they own from being on sale between two edition numbers (inclusive). This functionality uses Puppeteer and Chainsafe's Dappeteer, so please use at your own discretion as you will need to make use of your private key for this functionality to work. Feature - Cancel NFTs On Sale On Opensea

Added Layer Global Maximum Repeatability Setting

Added a new layerItemsMaxRepeatedTrait setting that can be used to set the maximum repeatability for all items within a layer. If this is set to 2 for example and your layer has 8 layer items, then a maximum of 16 images will be generated. This allows users to set the maximum repeatability once off for a layer's items instead of specifying each layer item with the same maximum repeatability. Feature - Add Maximum Repeatability For All Items In A Layer In A Single Configuration


How To Use The Codebase

Below is a rough guideline of the order in which the processes can be used.

1. Download and unzip the main branch of this repo

Please note that when extracting the code base, there's two possibilities for the extracted folder. Please always make sure that you are opening the folder in VS Code or your terminal which matches the folder structure in step 2.

a. Extracted folder contains another folder called create-and-mint-nft-collection

If this is the case when extracting your folder, then be sure to "cd" or move into that folder before running step 2's install commands, otherwise you will receive module errors and the npm installs won't work and your build and upload commands will not work correctly. Screenshot 2022-01-19 at 15 44 26

b. Extracted folder contains all the files as in step 2

No need for any extra steps, you can start with step 2 where you run the npm install commands. Screenshot 2022-01-19 at 15 46 52

2. Run the dependency npm commands in the unzipped folder

Ensure that you are in this diretory before running the npm install commands, otherwise some of your commands will not work correctly.

Example of the contents of the root folder before running the installs: Screenshot 2022-01-13 at 12 45 28

Example of the contents of the root folder after running the installs: Screenshot 2022-01-13 at 12 46 51

3. Update The Main Configuration File For The Art Engine

Update the src/config.js file with the different settings for your generative art collection. Please watch the videos linked earlier on how to configure the Art Engine.

Modify the following parts at the very least, below are just sample values that I used in a demo.

a. If you are planning on using Solana, then update this section

Screenshot 2022-01-13 at 12 47 25

b. Update your layer configurations

Example of default configuration along with maximum repeatability and layer compatibility Screenshot 2022-05-05 at 17 55 14

c. Update the width and height of your canvas

Screenshot 2022-01-13 at 12 48 07

d. Update the extra metadata that you want to add into your NFT's metadata. You can remove both fields inside of this extraMetadata object or add more if you like

Screenshot 2022-01-13 at 12 49 21

4. Configure The NFT Creation Details

Update the constants/nft_details.js file with the details that you want to be added to your metadata for your generative art collection.

  • description - The description that will be added to each of your NFTs
  • namePrefix - The name prefix that will be added for each of your NFTs. Ex. Steaks #1, Steaks #2
  • imageFilesBase - Pinned IPFS CID when making use of a service like Pinata. Ex. QmP12prm2rp1omr1Ap2orm1oprm12FQWFQOFOGdnasnsda . Only update this if you are planning to upload the files via a service other than NFTPort where you host a single URL / CID base.
  • metaDataJSONFilesBase - Pinned IPFS CID when making use of a service like Pinata. Ex. QmP12prm2rp1omr1Ap2orm1oprm12FQWFQOFOGdnasnsda . Only update this if you are planning to upload the files via a service other than NFTPort where you host a single URL / CID base.
  • ignoreExactBlankName - This value is a boolean with a value of false or true. If true, then any layer that contains only the name "blank" with a rarity character and value in the metadata will be skipped and not added to the properties of the NFT. When set to false, then the information will be added to the metadata and added to the properties of the NFT.
  • genericTitle - Replace with what you want the generic titles to say. Only change if you are planning on using NFT reveal and want a different name for your NFTs.
  • genericDescription - Replace with what you want the generic descriptions to say. Only change if you are planning on using NFT reveal and want a different name for your NFTs.
  • genericURLs - Replace with the image URLs that your generic NFTs should show. Only change if you are planning on using NFT reveal and want a different name for your NFTs.
  • ignoreAllNamesWithBlank - This value is a boolean with a value of false or true. If true, then any layer item that contains the word blank within the filename will be skipped from being added to the metadata information. When set to false, then the information will be added to the metadata. E.x white_eyes_blank #100.png will be added to metadata if set to false, while being skipped if true.
  • startCollectionEditionFrom - This value is used to determine from which edition number the collection creation should start. It is set to '1' as default, which will start Sol collections at 0, while starting Eth collections at 1. If you plan on using Collection contracts from NFTPort, then be sure to set this value to '0' before generating your art work.

Modify only the parts that you will be using and keep the rest as set by default. For example, if you are planning on using NFTPort for your file and metadata uploads, then do not modify the imageFilesBase and metaDataJSONFilesBase fields. If you are planning on not doing a reveal NFT collection and simply have everything revealed, then do not modify the genericTitle, genericDescription and genericURLs fields. If you want your NFT properties on Opensea to show, for example "Blank #15.png", then set the ignoreExactBlankName value to false. If you want to remove all "blank" layer items from your NFT properties on Opensea, for example "white_eyes_blank #10.png", then set the ignoreAllNamesWithBlank value to true.

Example configuration: Screenshot 2022-03-17 at 21 50 54

5. Configure The NFTPort Account Details And API Limits - Only modify this if you are using NFTPort for uploading

Update the constants/account_details.js file with the NFTPort account details. These will only be used with the NFTPort scripts. This will be needed if you are uploading files or minting via NFTPort. Please ensure that your NFT contract was created with the metadata_updatable variable set to true as this allows for NFT metadata updates to be made and is needed if you are planning on doing NFT reveals after purchases. If not, then you can't change your NFT data and you will need to burn the NFT from the contract to remove it. This will cost you funds / tokens, so make sure you create your contract correctly!

  • auth - Add your APIKey here that the NFTPort team will provide. Ex. orm1or1-efe1-112a-cccd-kqwfkfmk
  • contract_address - Add your contract address here, not your transaction hash. After creating a contract on NFTPort, retrieve the contract address via the APIs. Ex. 0xfe81cm1l28b21753ebe117c84als2d6588e150ff
  • mint_to_address - Add your wallet address here that will be the owner of the minted NFTs. Ex. 0x5cE5D823f4bD8Ec610293fBa65832B479152C7E1
  • chain - Add the chain where the NFTs will be minted to here. At the time of writing, "polygon" and "rinkeby" are possible values.
  • max_rate_limit - This will rate limit your API calls towards the NFTPort platform. Be sure to set it according to what is allowed for your APIKey. Ex. '1'
  • numberOfRetries - This is the retry count that your NFTPort API calls will attempt when not receiving a successful response from the API. It is not advised to make the retry count too high. Ex. '3'
  • timeout - This is the waiting time in between API calls when errors arise on the APIs. This has been disabled at the moment as it causes the scripts to hang at times. E.x. 5000 = 5 seconds.
  • mint_range - If you only want to mint a specific range of editions, e.x everything between editions 5 and 10.
  • mint_item - If you only want to mint a specific edition, e.x 1.
  • uploadGenericMeta - If you are planning on using a reveal, then set this value to true, otherwise keep this as false. When it is true, then the uploadMetas files will read from the genericJSON directory to upload the metadata. If set to false (default), then it will read from the json directory which contains your revealed items.
  • batch_mint_size - The number of NFTs that are minted per batch_mint. Maximum is 50 NFTs per batch_mint. This is only applicable to ERC1155 contracts, not ERC721.
  • batch_mint_nft_amount - The number of times that each NFT will be minted. For example, if set to 5, then each NFT edition can be sold 5 times. This is only applicable to ERC1155 contracts, not ERC721.

Modify only the parts that you will be using and keep the rest as set by default. For example, if you are having issues and want more retries on the API or a higher rate limit, only then modify those fields. If you are planning on only minting a single edition or a range of editions, only then modify those fields. If you are planning on doing a reveal, only then modify the uploadGenericMeta field. If you are making use of ERC1155 contract, then update the batch_mint_size and batch_mint_nft_amount fields to change the number of NFTs per mint and the number of times that each NFT can be sold for.

Example configuration: Screenshot 2022-01-21 at 15 15 22

6. Create Image Layers

Create your different art layers, keeping all of them at the same Canvas size and ensuring they are all exported as .png files.

7. Art Engine

Review the Hashlips videos on what all of the configuration items in the src/config.js file means and what you need to set them to. All of the Art Engine Commands make use of this configuration file along with the constants/nft_details.js file.

Only run the commands from sections a, b and c that you would like to make use of.

a. Creation / Build

Use the Art Engine - Build Command below to create your generative art collection along with their metadata json files.

b. Additional Art Creation Options

  • Use the Art Engine - Pixelate Command below to create a pixelated art collection from your previous generative art collection.
  • Use the Art Engine - Preview Command below to create a preview of your generative art collection by combining a few of the images into a single image.
  • Use the Art Engine - Preview_Gif Command below to create a preview_gif of your generative art collection by combining a few of the images into a single gif that loops through some of your images.

c. Rarity Information

Use the Art Engine - Rarity Command below to generate a JSON output to the terminal that will show you how your layers will be distributed.

Use the Custom - Rarity_Md Command below to generate a JSON file (_metadata_with_rarity.json) in the build/json/ directory. This will add a rarity_score key to each attribute as well as a total_rarity_score and rank for each NFT edition. Use the Custom - Rarity_Rank Command below to pull information from the _metadata_with_rarity.json file, like the top X editions or the rank of a specific NFT edition.

Example of top 20 editions from my collection

create-and-mint-nft-collection roebou$ npm run rarity_rank

> [email protected] rarity_rank
> node utils/custom/rarity_rank.js

Enter 1 to get top ## NFTs by rarity or 2 to get a specific NFTs rarity: 1
Enter the number of NFTs you want to get: 20
[
  { name: 'Steak Bite #8237', rank: 1, total_rarity_score: 110.84 },
  { name: 'Steak Bite #5552', rank: 2, total_rarity_score: 110.66 },
  { name: 'Steak Bite #342', rank: 3, total_rarity_score: 105.64 },
  { name: 'Steak Bite #7612', rank: 4, total_rarity_score: 105.08 },
  { name: 'Steak Bite #5086', rank: 5, total_rarity_score: 103.83 },
  { name: 'Steak Bite #1093', rank: 6, total_rarity_score: 103.45 },
  { name: 'Steak Bite #2898', rank: 7, total_rarity_score: 101.94 },
  { name: 'Steak Bite #3326', rank: 8, total_rarity_score: 100.11 },
  { name: 'Steak Bite #4257', rank: 9, total_rarity_score: 98.16 },
  { name: 'Steak Bite #435', rank: 10, total_rarity_score: 96.26 },
  { name: 'Steak Bite #8675', rank: 11, total_rarity_score: 96.06 },
  { name: 'Steak Bite #1288', rank: 12, total_rarity_score: 95.43 },
  { name: 'Steak Bite #2966', rank: 13, total_rarity_score: 95.16 },
  { name: 'Steak Bite #7232', rank: 14, total_rarity_score: 95 },
  { name: 'Steak Bite #9128', rank: 15, total_rarity_score: 94.62 },
  { name: 'Steak Bite #6542', rank: 16, total_rarity_score: 94.58 },
  { name: 'Steak Bite #3942', rank: 17, total_rarity_score: 94.52 },
  { name: 'Steak Bite #9162', rank: 18, total_rarity_score: 94.41 },
  { name: 'Steak Bite #3864', rank: 19, total_rarity_score: 93.61 },
  { name: 'Steak Bite #1150', rank: 20, total_rarity_score: 93.46 }
]
create-and-mint-nft-collection roebou$

d. Provenance Information

Use the Art Engine - Create_Provenance Command below to generate two new JSON files within the build/json directory. To read up more on Provenance and how it can be used in your NFT Collections, please see the following Medium Link

  • concatedHash.json - This is a string that contains the concated hash string of all image URIs.
  • provenanceHash.json - This is the final proof of your collection. This is a hash based on the concatedHash.json file's contents.

provenanceHash.json structure:

{
"provenance": "",
collection: [
 {
 "tokenId": ,
      "image": "",
      "imageHash": "",
      "traits": [],
 }],
}

e. Generate metadata from images (Experimental)

Use the Art Engine - Generate_Metadata Command below to generate a json file for each of the image files in the build/images folder.

Please use this with caution as this will delete your build/json directory and generate a new directory with new files in it. If you would like to test this out, please be sure to backup your build/json directory first if you have one.

8. Update NFT's Info (Description And Name)

Use the Custom - Update_Nft_Info Command below to update all NFT JSON files with the new namePrefix and description from the constants/nft_details.js file.

Please note that this should be run before you run the NFTPort - UploadFiles Command, NFTPORT - UploadMetas Command, NFTPORT - UploadMetas_Directory Command and NFTPORT - Mint Command commands. Use this only if you want to use a different name and description for your NFTs compared to what got generated with the Art Engine - Build Command command.

9. Update NFTs For Reveal - Generic Image Until Purchased, Then Only Reveal NFT

Use the Custom - Update_Json_To_Generic_Meta Command below to update all NFT files with the genericTitle, genericDescription and genericURLs values set in the constants/nft_details.js file. This will be shown as your NFT's details and picture before a purchase.

This process will create a new genericJSON directory where the _metadata.json file will be located along with each file's generic JSON object file. Remember to change your uploadGenericMeta key's value to true in the constants/account_details.js file before making use of the UploadMetas and UploadMetas_Directory scripts so that it will upload the files in this directory instead of the normal json directory if you are making use of reveals.

Please remember that your contract needs to be updateable to use this, otherwise this image will stay the image of your NFT, before and after purchase.

Please remember to update the genericURLs field with the URLs where the generic images are located. You can upload your generic image files to IPFS by simply using the NFTPort API via the frontend to upload a file and receive an IPFS URL that you can use within the genericURLs field.

10. Uploading Files (Images and Metadata)

There are two options that you can follow to upload your images and json files onto IPFS. Option 1 would be to go via a service like Pinata that gives a static CID to be used, while Option 2 would be to go directly via NFTPort, however, the CID will be unique for each file.

a. Pinata Or Similar Service

Create an account on Pinata and then upload your images folder. Please note that once you have uploaded your folder, you can't add or remove any files from there. From there copy the CID into the constants/nft_details.js file against the imageFilesBase key.

Use the Custom - Update_Image_Info Command below to update the json files for each NFT. This process will only update the file_url and image fields within the json file as well as in the _metadata.json file.

Upload the json directory onto Pinata and copy the CID into the constants/nft_details.js file against the metaDataJSONFilesBase key. This should be either of your json or genericJSON directories, depending on whether you are doing a reveal or not. Just a note, it would make sense to get both of your json directories uploaded if you are doing a reveal so that you can simply update the metadata of your unrevealed NFT, but please see the section on NFT reveal steps to follow in the EXAMPLE - REVEAL (ERC721) and EXAMPLE - REVEAL (ERC1155) examples below.

Use the Custom - Update_Metadata_Info Command below to update the json files for each NFT. This process will create a new ipfsMetas folder, update each NFT json file with a metadata_uri field and create a _ipfsMetas.json file. All the new json files will be added to the ipfsMetas folder.

b. NFTPort

Create an account on NFTPort and get an APIKey. Be sure to check your rate limit of your account as well as the amount of NFTs that you can upload with your APIKey's access levels. Update your account's details in the constants/account_details.js file.

Use the NFTPort - UploadFiles Command below to upload the image files to IPFS. This process will also update the json file for each NFT with the IPFS URL and add it into the file_url and image fields. This process will only update the file_url and image fields within the json file as well as the corresponding object in the _metadata.json file.

Use the NFTPort - UploadMetas Command or NFTPORT - UploadMetas_Directory Command below to upload the json metadata files for each NFT to IPFS and then create a ipfsMetas folder with an _ipfsMetas.json file and a json file for every NFT, containing the upload API response. The new json files in the ipfsMetas directory will now contain a metadata_uri field and this has also been added to each object inside the _ipfsMetas.json file.

Important - Should you wish to do a reveal, please remember that your contract should allow for updates to your NFT files. You also need to update the uploadGenericMeta key's value to true in the constants/account_details.js file so that the genericJSON directory's metadata will be used instead of the json directory. Please see the section on NFT reveal steps to follow in the EXAMPLE - REVEAL (ERC721) and EXAMPLE - REVEAL (ERC1155) examples below.

11. Create Wallet Edition Combo

If you would like to mint your editions to different wallets, then you need to populate the account_details.js file's walletMintList with the wallet address and nft edition count. Once this is done, then run the Custom - Create_Wallet_Edition_Combo Command, which will generate a new _walletAddressMintList.json in the ipfsMetas directory. When you run the the ERC1155 Batch IPFS Metas Migration or Minting NFTs steps, then it will attempt to get the specific edition's wallet address that it needs to mint towards. If it can't find the _walletAddressMintList.json file or the edition is not in the file, then the mint process will default back to the mint_to_address field in the account_details.js file.

12. ERC1155 Batch IPFS Metas Migration

If you would like to make use of batch minting against an ERC1155 contract, you need to run the Custom - Batch_Ipfs_Metas_Migration script which will create a new batchIPFSMetas directory and it will create numbered json files, for example 1.json which will contain a list of tokens for that specific batch to be minted, and a new _batchIPFSMetas.json file which will be a combined json file of all the numbered json files. The NFTPort - Mint_Batch Command will use this file these files to mint the token batches.

Before you use the Custom - Batch_Ipfs_Metas_Migration script, please be sure to update the batch_mint_size and batch_mint_nft_amount key's values to what your requirement is. By default, it is set to 50 for the batch_mint_size key and 1 for the batch_mint_nft_amount key.

13. Minting NFTs

  • Use the NFTPort - Mint_Batch Command below to start minting against an ERC1155 contract where your mints will happen in batches.
  • Use the NFTPort - Mint Command below to start minting against an ERC721 contract where your mint will happen individually.
  • Use the NFTPort - Mint_Range Command below to start minting against an ERC721 contract for a range of NFTs between specific editions.
  • Use the NFTPort - Mint_Item Command below to start minting against an ERC721 contract for a specific NFT edition.

Before you use the NFTPort - Mint_Range Command script, please be sure to update the mint_range key's values to the from and to edition numbers that you would like to attempt to mint. Please note that both of these numbers are inclusive.

Before you use the NFTPort - Mint_Item Command script, please be sure to update the mint_item key's values to the edition number that you would like to attempt to mint.

Before you use the NFTPort - Mint_Batch Command script, please be sure to run the Custom - Batch_Ipfs_Metas_Migration script.

14. Checking NFT Mint Files For Issues

  • Use the Custom - Check_Mints Command below to start checking each mint file to determine if there are any issues with the minted files for ERC721 contract files (individual files).
  • Use the Custom - Check_Mints_Batch Command below to start checking each mint file to determine if there are any issues with the minted files for ERC1155 contract files (batch files).

The check performs validation of the issues experienced in the Minting NFTs section and writes out the json files into a failedMints directory.

The checks that this script performs to determine if a NFT mint has failed are done in all of the minting scripts before a mint is attempted for a specific file. The reason for adding this script is so that if you have 10 000 NFTs that you minted and you simply run one of the minting scripts again, then it will first scan the relevant file (depending on the mint command used) and then perform mint. This means if you use the mint script again, it will go through all 10 000 items, every time you run it. Should you use batch minting, then less files will be scanned, depending on your batch sizes.

The check mints scripts will go through the files once off, check all of their data and provide a list of items that need to be re-minted with the NFTPort - Remint Command or NFTPort - Remint_Batch Command, which will only scan the files that got picked up by the check mints processes.

Please note that every time this runs, it clears out the folder and starts again.

Please note that this process can take time to complete as it runs through every minted json file.

15. Re-Mint Failed NFTs

  • Use the NFTPort - ReMint Command below to start re-minting each of the json files in the failedMints directory for ERC721 (Individual files) contract files.
  • Use the NFTPort - ReMint_Batch Command below to start re-minting each of the json files in the failedMints directory for ERC1155 (batch files) contract files.

This process will write out a newly minted file in the reMinted directory as well as update the json file in the original minted directory. Due to this, a backup folder will be created every time this process runs with the date to keep a backup of the json file in the minted directory at the time of running this process just as a safe guard so that you have access to the original information or how the information changed in between your processing.

16. Check Your Work On The Marketplace

You are done with your minting process! Well done! Go and check out your mints on your marketplace and refresh the metadata where needde.

GOOD LUCK!

17. Refresh NFT Metadata For Opensea

Go to the utils/opensea/refresh_metadata.js file and update the START_EDITION and END_EDITION fields. Please make sure that the contract address that you are trying refresh has been set for the contract_address field in the constants/account_details.js file.

Use the Opensea - Refresh_Metadata Command below to start the refresh of metadata for each NFT edition between your start and end editions.

Please note this process will be time consuming for large editions.

18. Sell NFTS On Opensea

Selling NFTs

Go to the utils/opensea/sell_nfts.js file and update the START_EDITION, END_EDITION, NFT_PRICE, DROPDOWN_OPTION, DATE_PICK_SKIP, START_HOUR, START_MINUTE, END_HOUR, END_MINUTE and walletPrivateKey fields. Please make sure that the contract address that you are trying sell NFTs for has been set in the contract_address field in the constants/account_details.js file as well as that the chain value is correct for the specific contract address.

Use the Opensea - Sell_Nfts Command below to start the putting each NFT edition up for sale between your start and end editions for the given price.

Cancel On Sale NFTs

Go to the utils/opensea/cancel_on_sale_nfts.js file and update the START_EDITION, END_EDITION and walletPrivateKey fields. Please make sure that the contract address that you are trying cancel the sale of NFTs for has been set in the contract_address field in the constants/account_details.js file as well as that the chain value is correct for the specific contract address.

Use the Opensea - Cancel_On_Sale_Nfts Command below to start the removing each NFT edition from being on sale between your start and end editions.

Features:

Please read the warning very carefully within the the sell_nfts.js and cancel_on_sale_nfts.js files with regards to the walletPrivateKey field. Please note that this script will only work with the Polygon network Please note this process will be time consuming for large editions.

Art Engine Commands

Build Command

  • npm run build

Create_Provenance Command

  • npm run create_provenance
  • node utils/art_engine/create_provenance.js

Generate_Metadata Command

  • npm run generate_metadata
  • node utils/art_engine/generate_metadata.js

Pixelate Command

  • node utils/art_engine/pixelate.js
  • npm run pixelate

Preview Command

  • node utils/art_engine/preview.js
  • npm run preview

Preview_Gif Command

  • node utils/art_engine/preview_gif.js
  • npm run preview_gif

Rarity Command

  • node utils/art_engine/rarity.js
  • npm run rarity

Custom Commands

Use the following command from the code's root directory.

Batch_Ipfs_Metas_Migration Command

  • node utils/custom/batch_ipfs_metas_migration.js
  • npm run batch_ipfs_metas_migration

Check_Mints Command

  • node utils/custom/check_mints.js
  • npm run check_mints

Check_Mints_Batch Command

  • node utils/custom/check_mints_batch.js
  • npm run check_mints_batch

Create_Wallet_Edition_Combo Command

  • node utils/custom/create_wallet_edition_combo.js
  • npm run create_wallet_edition_combo

Rarity_Md Command

  • node utils/custom/getRarity_fromMetadata.js
  • npm run rarity_md

Rarity_Rank Command

  • node utils/custom/rarity_rank.js
  • npm run rarity_rank

Update_Image_Info Command

  • node utils/custom/update_image_info.js
  • npm run update_image_info

Update_Json_To_Generic_Meta Command

  • node utils/custom/update_json_to_generic_meta.js
  • npm run update_json_to_generic_meta

Update_Metadata_Info Command

  • node utils/custom/update_metadata_info.js
  • npm run update_metadata_info

Update_Nft_Info Command

  • node utils/custom/update_nft_info.js
  • npm run update_nft_info

NFTPort Commands

Use the following command from the code's root directory.

Mint_Batch Command

  • node utils/nftport/mint_batch.js
  • npm run mint_batch

Mint_Item Command

  • node utils/nftport/mint_item.js
  • npm run mint_item

Mint_Range Command

  • node utils/nftport/mint_range.js
  • npm run mint_range

Mint Command

  • node utils/nftport/mint.js
  • npm run mint

Remint Command

  • node utils/nftport/remint.js
  • npm run remint

Remint_Batch Command

  • node utils/nftport/remint_batch.js
  • npm run remint_batch

Reveal Command

  • node utils/nftport/reveal.js
  • npm run reveal

UploadFiles Command

  • node utils/nftport/uploadFiles.js
  • npm run uploadFiles

UploadMetas Command

  • node utils/nftport/uploadMetas.js
  • npm run uploadMetas

UploadMetas_Directory Command

  • node utils/nftport/uploadMetas_directory.js
  • npm run uploadMetas_directory

Opensea Commands

Use the following command from the code's root directory.

Cancel_On_Sale_Nfts Command

  • node utils/opensea/cancel_on_sale_nfts.js
  • npm run cancel_on_sale_nfts

Refresh_Metadata Command

  • node utils/opensea/refresh_metadata.js
  • npm run refresh_metadata

Sell_Nfts Command

  • node utils/opensea/sell_nfts.js
  • npm run sell_nfts

EXAMPLE - NO REVEAL (ERC721)

Download Repo And Extract

Screenshot 2022-01-14 at 01 26 11

Install Packages

Screenshot 2022-01-14 at 01 31 50

Update src/config.js

Screenshot 2022-01-14 at 01 33 20

Update constants/account_details.js

Screenshot 2022-01-21 at 16 49 35

Update constants/nft_details.js

Screenshot 2022-01-24 at 11 19 52

Art Engine - Build

Screenshot 2022-01-14 at 01 35 14

Upload Files

Screenshot 2022-01-14 at 01 37 22

Screenshot 2022-01-14 at 01 38 23

Upload Metas

Screenshot 2022-01-14 at 01 39 46

Screenshot 2022-01-14 at 01 40 49

Mint

Screenshot 2022-01-14 at 01 41 35

Screenshot 2022-01-14 at 11 56 04

Screenshot 2022-01-14 at 01 42 34

EXAMPLE - REVEAL (ERC721)

Download Repo And Extract

Screenshot 2022-01-14 at 01 26 11

Install Packages

Screenshot 2022-01-14 at 01 31 50

Update src/config.js

Screenshot 2022-01-14 at 01 33 20

Update constants/account_details.js

Make sure that your uploadGenericMeta key's value is set to false initially and that your contract's metadata_updatable value is set to true. Screenshot 2022-01-21 at 16 49 35

Update constants/nft_details.js

Screenshot 2022-01-24 at 11 19 52

Art Engine - Build

Screenshot 2022-01-14 at 01 35 14

Update JSON To Generic Meta

This script will utilize the generic field's values set in the constants/nft_details.js file and create a new genericJSON directory which will contain the metadata that you want to mint for the unrevealed NFTs. Ensure that you have updated the generic fields within the constants/nft_details.js file before running the script as it will use these fields to build the new generic json files.

Screenshot 2022-01-14 at 11 34 41

Screenshot 2022-01-14 at 11 34 24

Screenshot 2022-01-14 at 11 24 26

Upload Files

Screenshot 2022-01-14 at 01 37 22

Screenshot 2022-01-14 at 01 38 23

Upload Metas - This will upload your json directory's files

Screenshot 2022-01-14 at 01 39 46

Screenshot 2022-01-14 at 11 36 52

Screenshot 2022-01-14 at 01 40 49

Rename ipfsMetas directory

Rename the ipfsMetas directory to realIPFSMetas or anything other than ipfsMetas as these are the files to be used for revealing your data after purchases.

Screenshot 2022-01-14 at 11 19 53

Update constants/account_details.js

Update your uploadGenericMeta key's value to true. Screenshot 2022-01-21 at 17 15 10

Upload Metas - This will upload your genericJSON directory's files

Screenshot 2022-01-14 at 11 31 40

Screenshot 2022-01-14 at 11 37 54

Screenshot 2022-01-14 at 11 28 04

Mint - This will mint your unrevealed NFTs' metadata

Screenshot 2022-01-14 at 11 53 47

Screenshot 2022-01-14 at 11 56 04

Screenshot 2022-01-14 at 11 58 51

Manually Update Metadata After Purchase

Once your NFT has sold, go to NFTPort and go to the docs / API section. From there, go to the Minting section and choose the Update a minted NFT API. Take the packet on the API's right hand side and update it with the details from your unrevealed folder. (realIPFSMetas or whatever you called your backup folder)

Send the API request on the right hand side and if all goes well, then your NFT's metadata will now be updated and the revealed image will show.

Please note that if you want to freeze the metadata so that no more updates can happen, then include the optional freeze_metadata: true field and key to the json packet that you will send in the API call

Screenshot 2022-01-14 at 11 48 39

EXAMPLE - NO REVEAL (ERC1155)

Download Repo And Extract

Screenshot 2022-01-14 at 01 26 11

Install Packages

Screenshot 2022-01-14 at 01 31 50

Update src/config.js

Screenshot 2022-01-14 at 01 33 20

Update constants/account_details.js

Screenshot 2022-01-21 at 16 49 35

Update constants/nft_details.js

Screenshot 2022-01-24 at 11 19 52

Art Engine - Build

Screenshot 2022-01-14 at 01 35 14

Upload Files

Screenshot 2022-01-14 at 01 37 22

Screenshot 2022-01-14 at 01 38 23

Upload Metas

Screenshot 2022-01-14 at 01 39 46

Screenshot 2022-01-14 at 01 40 49

Batch IPFS Metas Migration

Screenshot 2022-01-21 at 17 19 10

Screenshot 2022-01-21 at 17 21 59

Screenshot 2022-01-21 at 17 22 07

Screenshot 2022-01-21 at 17 22 13

Mint Batch - This will mint your unrevealed NFTs' metadata

Screenshot 2022-01-21 at 17 27 10

Screenshot 2022-01-21 at 17 28 29

Screenshot 2022-01-21 at 17 31 46

EXAMPLE - REVEAL (ERC1155)

Download Repo And Extract

Screenshot 2022-01-14 at 01 26 11

Install Packages

Screenshot 2022-01-14 at 01 31 50

Update src/config.js

Screenshot 2022-01-14 at 01 33 20

Update constants/account_details.js

Make sure that your uploadGenericMeta key's value is set to false initially and that your contract's metadata_updatable value is set to true. Screenshot 2022-01-21 at 16 49 35

Update constants/nft_details.js

Screenshot 2022-01-24 at 11 19 52

Art Engine - Build

Screenshot 2022-01-14 at 01 35 14

Update JSON To Generic Meta

This script will utilize the generic field's values set in the constants/nft_details.js file and create a new genericJSON directory which will contain the metadata that you want to mint for the unrevealed NFTs. Ensure that you have updated the generic fields within the constants/nft_details.js file before running the script as it will use these fields to build the new generic json files.

Screenshot 2022-01-14 at 11 34 41

Screenshot 2022-01-14 at 11 34 24

Screenshot 2022-01-14 at 11 24 26

Upload Files

Screenshot 2022-01-14 at 01 37 22

Screenshot 2022-01-14 at 01 38 23

Upload Metas - This will upload your json directory's files

Screenshot 2022-01-14 at 01 39 46

Screenshot 2022-01-14 at 11 36 52

Screenshot 2022-01-14 at 01 40 49

Rename ipfsMetas directory

Rename the ipfsMetas directory to realIPFSMetas or anything other than ipfsMetas as these are the files to be used for revealing your data after purchases.

Screenshot 2022-01-14 at 11 19 53

Update constants/account_details.js

Update your uploadGenericMeta key's value to true. Screenshot 2022-01-21 at 17 15 10

Upload Metas - This will upload your genericJSON directory's files

Screenshot 2022-01-14 at 11 31 40

Screenshot 2022-01-14 at 11 37 54

Screenshot 2022-01-14 at 11 28 04

Batch IPFS Metas Migration

Screenshot 2022-01-21 at 17 19 10

Screenshot 2022-01-21 at 17 21 59

Screenshot 2022-01-21 at 17 22 07

Screenshot 2022-01-21 at 17 22 13

Mint Batch - This will mint your unrevealed NFTs' metadata

Screenshot 2022-01-21 at 17 27 10

Screenshot 2022-01-21 at 17 28 29

Screenshot 2022-01-21 at 17 31 46

Manually Update Metadata After Purchase

Once your NFT has sold, go to NFTPort and go to the docs / API section. From there, go to the Minting section and choose the Update a minted NFT API. Take the packet on the API's right hand side and update it with the details from your unrevealed folder. (realIPFSMetas or whatever you called your backup folder)

Send the API request on the right hand side and if all goes well, then your NFT's metadata will now be updated and the revealed image will show.

Please note that if you want to freeze the metadata so that no more updates can happen, then include the optional freeze_metadata: true field and key to the json packet that you will send in the API call

Screenshot 2022-01-14 at 11 48 39

EXAMPLE - DNA EXISTS AND NEED MORE LAYERS TO GROW EDITION

When you encounter DNA exists!, do not panic as this simply means the combination of elements have already created an image and it will try a different combination. If you encounter You need more layers or elements to grow your edition to 20 artworks!, with 20 being the number of NFTs you are trying to generate, then it simply means you do not have enough unique items within your layers to create the total number of NFTs that you are trying to create. You need to add more items to your layers, so maybe add a blank image so that your layers only sometimes populate. Another item that you can look to modify when you are working with big collections is the uniqueDnaTorrance setting in the src/config.js file. This is set to 10000 by default, but if you might need to make that a higher number and try to generate your collection again. For demo purposes, I set my uniqueDnaTorrance to 2 to for demo purposes to trigger the error.

Screenshot 2022-01-14 at 09 33 11

Screenshot 2022-01-14 at 09 38 09

EXAMPLE - FILE ALREADY UPLOADED

When you encounter 5 already uploaded. error in the uploadFiles script, it means that your json file already contains a https://xxxx URL for the file_url key. If you would really like to re-upload the image, simply remove the URL value (not the whole line, just the value, otherwise you will see an error if the field key is not there) or change it to IPFS, then run the uploadFiles script again and the files will be re-uploaded.

Screenshot 2022-01-14 at 09 56 57

Screenshot 2022-01-14 at 09 56 03

Screenshot 2022-01-14 at 09 58 40

Screenshot 2022-01-14 at 09 59 21

Screenshot 2022-01-14 at 10 03 21

EXAMPLE - UPLOAD GENERIC METAS WITHOUT CREATING GENERIC METAS FILES

When you are trying to upload your metadata files via the uploadMetas script, but you haven't run the update_json_to_generic_meta script before attempting the upload, then the below error will be seen as no genericJSON directory can be found.

Screenshot 2022-01-14 at 10 46 13

Screenshot 2022-01-14 at 10 44 21

EXAMPLE - METADATA ALREADY UPLOADED OUTPUT

Screenshot 2022-01-14 at 01 46 44

EXAMPLE - MINT FAILED, USING CHECK_MINTS AND REMINT

Screenshot 2022-01-21 at 17 48 58

Screenshot 2022-01-21 at 17 44 30

EXAMPLE - MINT BATCH FAILED, USING CHECK_MINTS_BATCH AND REMINT_BATCH

Screenshot 2022-01-21 at 17 44 02

Screenshot 2022-01-21 at 17 44 30

EXAMPLE - EDITION ALREADY MINTED

Screenshot 2022-01-14 at 01 47 30

EXAMPLE - CONTRACT ALREADY HAS THE GIVEN TOKEN ID

This means the edition number of the token that you are trying to mint already exists against your contract. Go to your contract address on your chain's explorer and you should see that the tokenid is already there.

Please note that there is no need to panic as you can't upload the same tokenid against a given contract, so you won't have any duplicates.

Screenshot 2022-01-14 at 10 59 49

Screenshot 2022-01-14 at 11 02 40

Screenshot 2022-01-14 at 11 02 59

create-and-mint-nft-collection's People

Contributors

razielll avatar roebou avatar thepeanutgalleryandco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

create-and-mint-nft-collection's Issues

[FEATURE] Update package.json with latest versions for sell_nfts script

Summary

Update the following packages in the package.json so that the sell_nfts.js script will work out the box.

@chainsafe/dappeteer: 2.4.1
puppeteer: 13.7.0
metamask: v10.8.1

Motivation

Selling script is not working on new code base anymore and struggling to download Metamask v10.1.1 as a work around needs to be in place for it to work.

Excluding layers in the combination

My NFT project has 11 layers, of which 3 are background layers, these 3 layers are part of a mandatory structure, I have used layer dependency settings and this is great! :D

I don't know if it's possible, but I would like these 3 background layers not to count in the combination layers, I mean, to generate my collection of 1,000 unique NFTs I want only the other 8 layers to be taken into account, this would be the structure:

Layer 1 (mandatory structure, does not count for randomizing the mix)
Layer 2 (mandatory structure, does not count for randomizing the mix)
Layer 3 (mandatory structure, does not count for randomizing the mix)
Layer 4 (Count for randomizing the mix)
Layer 5 (Count for randomizing the mix)
Layer 6 (Count for randomizing the mix)
Layer 7 (Count for randomizing the mix)
Layer 8 (Count for randomizing the mix)
Layer 9 (Count for randomizing the mix)
Layer 10 (Count for randomizing the mix)
Layer 11 (Count for randomizing the mix)

So I would have a collection where the 1,000 NFTs would be unique thanks to the combination of the last 8 layers and, in addition, each of those 1,000 NFTs would have 3 more layers added forcibly.

The 8 layers make up a character and the 3 layers add background to that character.

Thanks in advance, your work are amazing!

[FEATURE] Pinata Upload Files API Call

Summary

Add API calls from Pinata for users to make use of when they need to upload images or metadata files.

Basic example

Use a upload-images.js and upload-metas.js script to upload files to Pinata and receive a single CID back for each of the uploads.

Motivation

This will allow users to upload directly from their machines instead of uploading via the Pinata interface.

[QUESTION] Incompotible traits settings not working

Hi, I'm trying to generate collection but incompatible settings not working.

These are my settings for incompatible traits:

incompatibleTraits: {
"Hair/AllTraits": [
"Hat/AllTraits",
]
}

I also also tried to specify the first input but it's still not working and "Hair/Double_Blue" gets generated with "Hat" layer:

incompatibleTraits: {
"Hair/Double_Blue": [
"Hat/AllTraits",
]
}

Am I doing something wrong?

AllTraits - "*"

[FEATURE] Import GIFs as layers

Summary

I see Hashlips’project only allow import static images as layers. I hope a feature can import gifs as layers. After that, it will merge gifs and static image together in output file-- Your document is so great. Thanks for your team

Basic example

Motivation

[FEATURE] Opensea Polygon Script To Auto Sell NFTs Additional Fields

Summary

Allow users to choose a timeframe (days or months) from the date picker drop down and also allow users to specify the starting time and ending time.

Basic example

When the automation script gets to the selling of a NFT, then populate the date picker with the values in the script file instead of only making use of the default timeframe.

Motivation

Allow users to change the timeframe of how long the NFTs will be on sale for.

[FEATURE] SVG Support

Summary

As a user I would like to be able to use SVG files instead of PNG files to create my art works.

Basic example

Add SVG files instead of PNG files into the layers folder and the output in the images folder should also be SVG files.

Motivation

This allows for a new file type to be used by artists.

layerItemsMaxRepeatedTraits still returns duplicates

Hello, and thank you for sharing your work with us!

I have 7600 different layers in the folder(s) "Body x", and there will be a total of 7600 NFTs. I want every single layer to appear in the collection, and I want NO duplicates of the layers in the "Body" folders.
So I managed to type 7600 lines of code with "layerItemsMaxRepeatedTraits" and I still have a few items that do NOT appear (ex: Areion 275) and some layers appear multiple times (ex: Areion 292). Am I getting wrong this function, or am I doing something wrong and it's simply not working?
Here is my layer config:

const layerConfigurations = [
{
growEditionSizeTo: 100,
layersOrder: [
{ name: "Background" },
{ name: "Body 3", options: { displayName: "Body", }, },
{ name: "Hair" },
{ name: "Hat" },
{ name: "Beard" },
{ name: "Glasses DR", options: { displayName: "Glasses", }, },
],
layerItemsMaxRepeatedTraits: [
{ name: "Body 3/Areion 275", layerItemMaxRepeatedTrait: 1 },
{ name: "Body 3/Areion 276", layerItemMaxRepeatedTrait: 1 },
{ name: "Body 3/Areion 277", layerItemMaxRepeatedTrait: 1 },
{ name: "Body 3/Areion 278", layerItemMaxRepeatedTrait: 1 },
{ name: "Body 3/Areion 279", layerItemMaxRepeatedTrait: 1 },
{ name: "Body 3/Areion 280", layerItemMaxRepeatedTrait: 1 },
{ name: "Body 3/Areion 281", layerItemMaxRepeatedTrait: 1 },
{ name: "Body 3/Areion 282", layerItemMaxRepeatedTrait: 1 },
{ name: "Body 3/Areion 283", layerItemMaxRepeatedTrait: 1 },
{ name: "Body 3/Areion 284", layerItemMaxRepeatedTrait: 1 },
{ name: "Body 3/Areion 285", layerItemMaxRepeatedTrait: 1 },
{ name: "Body 3/Areion 286", layerItemMaxRepeatedTrait: 1 },
{ name: "Body 3/Areion 287", layerItemMaxRepeatedTrait: 1 },
{ name: "Body 3/Areion 288", layerItemMaxRepeatedTrait: 1 },
{ name: "Body 3/Areion 289", layerItemMaxRepeatedTrait: 1 },
{ name: "Body 3/Areion 290", layerItemMaxRepeatedTrait: 1 },
{ name: "Body 3/Areion 291", layerItemMaxRepeatedTrait: 1 },
{ name: "Body 3/Areion 292", layerItemMaxRepeatedTrait: 1 },
],
},
];

image

Thank you for your time!

[FEATURE] Add Maximum Repeatability For All Items In A Layer In A Single Configuration

Summary

Add the ability to specify the maximum repeatability for all items in a layer. At the moment, only the layer's repeatability can be set.

Basic example

Layer X with 10 layer items.
Each layer item should generate a maximum of 2 times.
Grow edition size to 20.
Set the maximum repeatability of layer X to 2.

20 Images should be generated with each layer X item only added twice. Any other generated attempts with the layer X item should be discarded and added to the fail count as the maximum repeatability has been reached.

Motivation

Instead of adding a maximum repeatability of 2 for each of layer X's items, the repeatability can be set once off for all layer items.

[QUESTION] Generate characters with one item in different places

Summary

Hello!
Example, i have a character layer with two items and hats layer with one item.

Character:

1.png
2.png
Hats:
Spike Hat.png

Hat is positioned differently (right / left) in characters, but have the same name item (Spike Hat) in the layer (Hats) when displayed in nft properties. How can this be done?

Thank you
12

[FEATURE] Opensea Polygon Script To Auto Sell NFTs Added Metamask Account Number

Summary

Users have multiple wallets / accounts on a seed phrase and need the ability to switch to a different one for selling functionality.

Basic example

Provide a seed phrase that contains multiple wallets and then have the ability to choose a specific account number on the seed phrase.

Motivation

Allow selling automation from different wallets, while using a single seed phrase.

[FEATURE] NFTPort API Addition - Upload Metadata Directory To IPFS

Summary

Add a new script for collection contracts that will allow users to upload a metadata json directory instead of uploading the files one by one.

Basic example

Take the build/json directory, then add all the file paths into an array and then upload that array of files to IPFS.

Motivation

This will allow users to make use of the code base for image generation as well as uploads in an automated way, while handling the one off APIs via the NFTPort website itself.

[FEATURE] Configuration should not be part of repository

The configuration should not be part of the repository.

Rename everything of the template/demo configuration. Those renamed files are part of the repo.

src/config.js -> src/config_demo.js (actually it would be even better to not have that in the src folder at all)
layers -> layer_demo

This would make it easier to contribute to the project without stashing stuff all the time. It is also a cleaner way.

[FEATURE] Trait dependencies

New exclusion rule that allows to setup dependencies between traits.
Use it when one trait will require a specific other trait. For those cases it is much shorter to define compared to the exclusion rules. You can also set an option to fix the dependency instead of rejecting those configurations. This can speed up generation dramatically when many dependency rules are set.

[FEATURE] Randomised Generic Metadata Images

Summary

Add the ability to provide a list of ipfs urls that can be used in the generation of generic metadata.

Basic example

Provide an array of IPFS URLs in the nft_details.js configuration file.

['https://ipfs.io/ipfs/bafkreigye3xz72jp2eskhrgq4blhh5ec3wwbj4isqejv4a6mdhqzcuvquy', 'https://ipfs.io/ipfs/bafkreigye3xz72jp2eskhrgq4blhh5ec3wwbj4isqejv4a6mdhqzcuvqu2', 'https://ipfs.io/ipfs/bafkreigye3xz72jp2eskhrgq4blhh5ec3wwbj4isqejv4a6mdhqzcuvqu3'] ;

Modify the "update_json_to_generic_meta.js" script to look at this URL list and then randomly choose one of the URLs and assign it to the generic JSON metadata.

Motivation

This will allow users to have different generic metadata images instead of a single generic metadata image before their reveal.

[FEATURE] Opensea Refresh Metadata Script

Summary

Add a new script that will allow users to automatically refresh all of their collection's NFT metadata.

Basic example

I would like to run a script that will then go to my contract / collection on Opensea and then refresh each NFT's metadata.

Motivation

It is a very time consuming activity to do this individually and this will give users more free time to focus on more important matters.

[FEATURE] Opensea Polygon Script To Auto Sell NFTs

Summary

Create a new script that can be used to automate the selling of NFTs for a specific price. As this is the initial script, only need to cater for a single price for all the NFTs that needs to be put up for sale. Script only needs to cater for putting Polygon NFTs up for sale in the initial build.

Basic example

Add a new script that can take a seed phrase to your wallet that contains the NFTs that needs to be put up for sale, a start edition number, an end edition number, a price and a contract address.

StartEdition: 1
EndEdition: 10
Price: 0.002 (Above $5, as that is the minimum)
Contract: 0x09aa1a14e572e6fc05f64e541699d3e0361c7f2f
Seed Phrase: one two three mountain lion test four five six big small town

Auto login to Opensea with the Seed phrase for the wallet that owns the NFTs that should be sold. Loop through editions 1 through to 10 (both inclusive) on the contract address and put each NFT up for sale if it can find the NFT edition number and your wallet owns it. Should the items be owned by someone else or the edition can't be found, then skip over to the next edition.

Motivation

This will allow users to put their NFTs up for sale automatically by simply running a script instead of manually putting each item up for sale.

[BUG] MODULE_NOT_FOUND

Description

When I download engine, npm run build(or npm run generate), the engine gets an error

Expected result

Error: Cannot find module 'C:\Users\Peter Rutherford\source\repos\create-and-mint-nft-collection\node_modules/sha1'
Require stack:

  • C:\Users\Peter Rutherford\source\repos\create-and-mint-nft-collection\src\main.js
  • C:\Users\Peter Rutherford\source\repos\create-and-mint-nft-collection\index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (C:\Users\Peter Rutherford\source\repos\create-and-mint-nft-collection\src\main.js:4:14)
    at Module._compile (node:internal/modules/cjs/loader:1103:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [

Actual result

Environment

  • OS Version: W11
  • Browser Version:

[FEATURE] Start Edition From X

Summary

Add the ability to set the starting edition value of the collection so that upon collection creation, editions can start from any number specified.

Basic example

Set the starting edition value to 0 in a settings file, then my editions in the images folder should start with 0 and my json file will also start with 0, along with the edition inside the json file.

Motivation

This is needed to allow users to make use of the art generation scripts when generating art for their NFTPort Collection Contracts.

[FEATURE] Generate based on metadata

Summary

Generate based off of metadata json.

Basic example

This would be a great feature if you've already generated a collection and would like another set of the same collection say in a different pose, or maybe if you wanted to make everything pixelated.

Motivation

This would be a great value add to long term holders of your collection.

[FEATURE] Reveal NFTs Functionality Via NFTPort

Summary

Add the ability to poll every X number of seconds to fetch all NFTs on a specific wallet address. Find all NFTs that belong to a specific contract from these NFTs. Match the NFTs from this new list with the list of NFTs from the original Minting process. If a NFT is in the original minting file, but it is not in the list retrieved, then the NFT should be revealed.

Once a NFT has been revealed, it should be recorded and future checks should not try to reveal the NFT again as it should first check the recorded files to check if it was revealed before or not.

Basic example

As a user, I have minted a 1000 NFT collection to contract ABC against wallet 12345.
Check wallet 12345 and find all NFTs available from contract ABC and add it into a list.
Loop through the minted NFT collection file and check if NFT in the list can be found in the list retrieved in the previous step.

If it can't be found, then reveal the NFT and write out a new reveal json file. If the NFT can be found in both lists, then skip the file as the NFT was not sold or transferred and still belongs to the original owner.

Motivation

Users can deploy a script that they leave running on a pc, laptop, cloud server that will manage their reveal processes. This will give users time to focus on the rest of the work like community building and not be concerned users' NFTs not being revealed once purchased.

[QUESTION] Why 'layerItemsMaxRepeatedTraits' don't work?

Hello guys!

Thanks a lot for your amazing code!

Im trying to use 'layerItemsMaxRepeatedTraits' because I want each item from "hat" layer to repeat only once.

This is my code:

doubt

It doesn't work for me, the "hat" layer items keep repeating more than once.

Does anyone know why?

Thanks in advance.

BR

Betty

[QUESTION]: deploy contract?

hi
can i deploy contract with your script? didnt see it in readme file or didnt see any deploy js file in utils/nftport

thanks

Error when trying to generate for Solana

Getting error when trying to generate for Solana. Currently don't have plans to use NFTPort - and just using your repo / code to bypass Blank from being added to metadata. Everything works perfectly when on network.eth but when I change to network.sol I get this error:

eddies-MBP:create-and-mint-nft-collection-1.3.1 eddie$ node index.js
/Users/eddie/Desktop/Solana/create-and-mint-nft-collection-1.3.1/src/main.js:323
  let metadata = metadataList.find((meta) => meta.custom_fields.edition == _editionCount);
                                                                ^

TypeError: Cannot read properties of undefined (reading 'edition')
    at /Users/eddie/Desktop/Solana/create-and-mint-nft-collection-1.3.1/src/main.js:323:65
    at Array.find (<anonymous>)
    at saveMetaDataSingleFile (/Users/eddie/Desktop/Solana/create-and-mint-nft-collection-1.3.1/src/main.js:323:31)
    at /Users/eddie/Desktop/Solana/create-and-mint-nft-collection-1.3.1/src/main.js:418:11
    at async startCreating (/Users/eddie/Desktop/Solana/create-and-mint-nft-collection-1.3.1/src/main.js:383:9)
eddies-MBP:create-and-mint-nft-collection-1.3.1 eddie$

Any way to fix? Seems to work okay in the original Hashlips Art Engine repo but get this error in yours.

Thanks in advance for your help! :)

[FEATURE] Minting Against Wallet List

Summary

Add the ability to provide an array of objects that contains a wallet address and a list of nft editions that needs to be minted to that wallet address.

Basic example

Provide an array of wallet address with nft editions list to be minted.

[
{
"wallet_address": "12345",
"nft_edition_count": "1"
},
{
"wallet_address": "45678",
"nft_edition_count": "5"
},
{
"wallet_address": "92231",
"nft_edition_count": "10"
}
]

When the mint process runs, it needs to mint 1 edition to wallet 12345, 5 editions to wallet 45678 and mint 10 editions to wallet 92231. This nft editions will then look as follow against the wallets.

Wallet 12345: 1
Wallet 45678: 2, 3, 4, 5, 6
Wallet 92231: 7, 8, 9, 10, 11, 12, 13, 14, 15, 16

Motivation

This will allow users to build up "minting lists" and then mint them directly to the minting wallets instead of to the contract's creator wallet and then having to transfer the items.

suggestion

if (selectedElement.name.trim().toLowerCase() !== "blank") {

wont it be better to check if (!selectedElement.name.trim().includes('blank')

this will allow disregarding any asset with 'blank' in its string, allowing maximal flexibility, as long as blank isn't used as a prop name

[FEATURE] Layer Combination Exclusions

Summary

Add the ability to exclude certain layer item combinations from appearing on the art being generated.

Basic example

If I have a character layer with one item, hair layer with two items and glasses with three items.

Character:
main.png

Hair:
short.png
long.png

Glasses:
funky.png
square.png
oversized.png

I do not want my art generations to contain a combination of long.png and oversized.png, but all other combinations should be able to generate.

Motivation

Users would like to be able to to skip certain combinations as their art work does not look correct when certain combinations are used.

[FEATURE] Layer Maximum Repeatability Settings

Summary

Add the ability to set the maximum number of times that a specific layer can repeat / be part of the collection.

Basic example

If I have a character layer with one item, hair layer with two items and glasses with three items.

Character:
main.png

Hair:
short.png
long.png

Glasses:
funky.png
square.png
oversized.png

Maximum layer repeatability: If I set my Glasses layer's maximum repeatability to 1, then only a single art work that gets generated will have one of the 3 glasses layer items. So with the layers, there would then be art work items generated:

  1. main.png + short.png
  2. main.png + long.png
  3. main.png + (short.png OR long.png) + (funky.png OR square.png OR oversized.png)

Motivation

Users would like to be able to force rarity on certain layers for their collections.

Rarity percentage not showing up[QUESTION]

Alright, first I am sure I did something wrong. I got my test NFTs on the rinkeby chain and uploaded to the openseas test site. When I view them it shows all the traits but no rarity. I ran the rarity command and have a separate .json that list all the rarities for each trait but how do I get that to show up for everyone else?
Untitled

[FEATURE] Opensea Unhide NFTs Script

Summary

As a user. I would like to run a script that will automatically unhide my NFTs.

Basic example

Running the script logs in via my private key onto Opensea and then starts unhiding my NFT collection items.

Motivation

It is very time consuming to manually unhide NFTs

[FEATURE] Layer Item Maximum Repeatability Settings

Summary

At the moment, it is only possible to set maximum repeatability for all layers and layer items at a global level. Add the ability to also set the maximum number of times that a specific layer or layer item can repeat / be part of the collection.

Basic example

If I have a character layer with one item, hair layer with two items and glasses with three items.

Character:
main.png

Hair:
short.png
long.png

Glasses:
funky.png
square.png
oversized.png

Maximum layer repeatability: If I set my Glasses layer's maximum repeatability to 1, then only a single art work that gets generated will have this layer item. So with the layers, there would then be art work items generated:

  1. main.png + short.png + (funky.png OR square.png OR oversized.png)

Maximum layer item repeatability: If I set my Glasses layer item funky.png's maximum repeatability to 1, then only a single art work that gets generated will have this layer item. So with the layers, there would then be art work items generated:

  1. main.png + short.png + square.png
  2. main.png + short.png + oversized.png
  3. main.png + long.png + square.png
  4. main.png + long.png + oversized.png
  5. main.png + (short.png OR long.png) + funky.png

Motivation

Users would like to be able to force rarity on certain layer items for their collections.

[BUG] UploadMetas_Directory Returns 502 Response Error On Windows Operating System

Description

When using the uploadMetas_directory script file, a 502 Response error is returned.

Steps to reproduce

Upload multiple json files (greater than 2000) to experience the 502 HTTP Response error.

Expected result

Uploading of JSON files should be successful and return an IPFS URL.

Actual result

Receive 502 HTTP Response error instead of IPFS URL to uploaded JSON files.

Environment

  • OS Version: Windows 11
  • Browser Version:

[FEATURE] Opensea Selling Scripts To Use Wallet PrivateKey

Summary

Making use of the seed phrase and account number is a bit cumbersome, especially if you have multiple wallets. Users would rather want to make use of their wallet private key to choose a specific wallet that they want to make use of in the sell_nfts.js and cancel_on_sale_nfts.js script files.

Basic example

Instead of providing a seed phrase and wallet account number, provide a wallet private key. Metamask should load that wallet and use it for the selling functionality.

Motivation

Making use of the seed phrase and account number is a bit cumbersome and problematic when you have multiple wallets.

[FEATURE] Cancel NFTs On Sale On Opensea

Summary

If a user decides to change their pricing strategy, then they want to be able to remove the items from being sale in an automated way.

Basic example

I want to move the price of my NFTs from 0.003 WETH to 0.0025 WETH to cater for pricing changes, then I would like to run a script that removes NFT editions X to Y. After this is done, I can run the sell_nfts script to put the items on sale again.

Motivation

Changing pricing strategies.

[FEATURE] Opensea Sell Script Support Different Currency Selection

Summary

As a user I would like to use currencies other than ETH (WETH) when listing my NFT.

Basic example

When listing a NFT, I would like to be able to select USDC instead of ETH.

Motivation

Some projects prefer to list on stable coins instead of ETH for their project and community.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.