Supported protocols • Chainstack blog • Chainstack docs • Blockchain API reference • Start for free
This project contains all of the tutorial files from The ultimate guide to NFTs: From concept to market success published on the Chainstack blog.
This repository contains scripts and contracts needed to create a new wallet, check its balance, compile an NFT contract, and mint NFTs using custom metadata on the Ethereum network.
Find the full tutorial article available on the Chainstack blog:
Clone this repository.
npm ci
Use
npm ci
to launch aclean install
of the dependencies, this will install the same version as in thepackage.json
file.
Edit the .env.sample
file, fill up the fields, and rename it to .env
.
ENDPOINT_URL = "https://YOUR_CHAINSTACK_ENDPOINT_HERE"
PUBLIC_KEY = "0x_YOUR_WALLET_ADDRESS"
PRIVATE_KEY = "YOUR_PRIVATE_KEY"
Fill the CONTRACT_KEY field once you deployed the smart contract.
Go into the contracts
directory:
cd contracts
Compile the smart contract with the solc
compiler:
solcjs --abi --bin --include-path ../ --base-path . -o compiled PCHNFT.sol
Now you will find the compiled smart contracts' bytecode and ABIs in the compiled
directory.
At this point, you can deploy the smart contract using the deploy.js
script in the scripts
directory.
Go into the scripts
folder and run:
node deploy
You just deployed your NFT smart contract. See the The ultimate guide to NFTs: From concept to market success to mint your NFTs.
The system requires at least:
- Node.js: ^16.17.0— install Node
- Solc.js installed globally
- web3.js: ^1.7.5
- @openzeppelin/contracts: ^4.7.2
- Solc.js: ^0.8.17
- dotenv: ^16.0.1
- fs: ^0.0.1-security
git clone https://github.com/soos3d/NFT-Minter-Tutorial.git
npm ci
Use
npm ci
to launch aclean install
of the dependencies, this will install the same version as in thepackage.json
file.
npm install -g solc
The following list shows how the end result looks like: