Skip to content

aaronjan98/Nifty-Minter-Frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nifty Minter Dapp - Front End

Version License: MIT Twitter: AJanovitch

Create unique NFTs from text descriptions with AI image generation and sell them on OpenSea

Resources

Run Locally

Install

  • run this command for back and front end repos

    npm install
  • N.B. API keys are required in your front end .env

    REACT_APP_INFURA_API_KEY=""
    REACT_APP_INFURA_PROJECT_ID=""
    REACT_APP_HUGGING_FACE_KEY=""

Usage

  1. Run blockchain node with ganache at the root of the back end
npm run ganache
  1. Add the network to MetaMask and import the ganache accounts
  • you can change the port and chain ID in the package.json scripts, but by default the RPC URL is http://127.0.0.1:9002, the chain ID is 1338, and the currency symbol is ETH.
  1. Deploy NFT contract to local blockchain
  • If the front end and back end repos are adjacent to each other, then the NFT ABI will automatically be written to the front end. Otherwise you'll have to change the file path in common/tokens.js.

    npx hardhat run scripts/deploy.js --network ganache
  1. Then you'll need to copy the outputted NFT address from the previous command and update the NFT address in the front end file src/config.json
  • Optionally, you can view the ganache/hardhat accounts' Ether balances with this command

    npx hardhat run scripts/getBalances.js --network ganache
  1. start localhost server for front end
npm run dev

Run tests

  • Test contracts with hardhat
npx hardhat test

Author

👤 aaronjanovitch@gmail.com

Show your support

Give a ⭐️ if this project helped you!