Skip to content

Latest commit

 

History

History
101 lines (70 loc) · 2.69 KB

README.md

File metadata and controls

101 lines (70 loc) · 2.69 KB

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

👤 [email protected]

Show your support

Give a ⭐️ if this project helped you!