Skip to content

Tutorial source code for "Procedurally generated NFTs: Being an artist as a developer" originally published on the Chainstack blog

License

Notifications You must be signed in to change notification settings

chainstacklabs/procedural-nft-generator

Repository files navigation

Procedural NFT Generator Tutorial Repo

Description

Repo containing all tutorial files from "Procedurally generated NFTs: Being an artist as a developer" originally published on the Chainstack blog. Contains scripts, contracts, ABI, BIN, and JSON files needed to create a new wallet, check its balance, compile an NFT contract, and mint NFTs using custom procedurally generated metadata on the Ethereum network.

Tutorial link

Find the full tutorial article available on the Chainstack blog: https://chainstack.com/procedurally-generated-nfts/

Usage

Clone or fork this repo to a preferred location. Install dependencies by running in CLI:

npm install

Generate a new wallet address and key pair by running in CLI:

node keys.js

Check wallet balance by running in CLI:

node balance.js

Deploy the NFT minter smartcontract from the ABI & BIN files by running in CLI:

node deploy.js

Mint an NFT with the metadata from one of the JSON files by running in CLI:

node mint.js

Generate, merge and mint 3 image layers with corresponding metadata

node generate.js

File list

  • keys.js - Script to generate a wallet address and key pair
  • balance.js - Script to check the balance of a wallet address
  • PCHNFT.sol - Smartcontract supporting functions to mint NFTs with custom tokenURI
  • PCHNFT_sol_PlaceholderHeroes.abi - ABI compiled from the NFT minter smartcontract
  • PCHNFT_sol_PlaceholderHeroes.bin - BIN compiled from the NFT minter smartcontract
  • node_modules_@openzeppelin*.* - ABI & BIN files compiled from the contract dependencies
  • deploy.js - Script to deploy the NFT minter smartcontract from the ABI & BIN files
  • testorius.json - JSON array containing metadata needed to mint the Testorius NFT (1/3)
  • lorema.json - JSON array containing metadata needed to mint the Lorema NFT (2/3)
  • sampli.json - JSON array containing metadata needed to mint the Sampli NFT (3/3)
  • mint.js - Script to mint an NFT with the metadata from one of the JSON arrays
  • .env - Dotenv file containing pre-formatted slots needed for key script variables
  • generate.js - Script to generate, merge and mint 3 image layers with corresponding metadata

Dependency list

End result

About

Tutorial source code for "Procedurally generated NFTs: Being an artist as a developer" originally published on the Chainstack blog

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published