/nft-sol-react

NFT Solidity Contract with React dApp

Primary LanguageJavaScript

Contract and NFT details

  • This is a fun project only. dApp Front end is published here.

  • The contract address on rinkeby etherscan is 0x03f6d53c4b337ee4d121db358baf33df8c71108c.

  • Minted NFTs can be seen on Rinkeby OpenSea. They are goofy legal terminology ERC721 tokens.

Goofy Legal NFTs

Stack

Hardhat, Solidity, JavaScript, Alchemy entrypoint to Ethereum node APIs.

Smart contract deployed on Rinkeby Network.

React frontend deployed on Netlify.

Notes

Run commands in the relevant directory, not in project root.

Use the Metamask Wallet Browser Extension

Use the Ethereum Rinkeby testnet.

ALWAYS REMEMBER... Any time the contract is changed:

  • Redeploy.
  • Update contract address in App.js.
  • Update ABI file in the frontend's ./abi folder.
  • update the contract address constant in App.js

Compile smart contract and deploy to local Hardhat chain

Run the following commands from inside the evm directory.

  1. Run npx hardhat run scripts/<scriptname.js> from the project root. Ensure its the local script. This will test that the solidity compiles.

  2. Run npx hardhat run scripts/deploy.js --network rinkeby to deploy to the testnet. Grab the contact address and assign it to the constant in mintNFT() in the ./dApp/src/App.js`.

  3. copy the freshly made ./evm/artifacts/contracts/EpicNFT.sol/EpicNFT.json file to ./dApp/src/configs so that the front end uses the latest ABI.

Useful Reference Docs

Useful tools