MyElectricSheep / Sushi_nft

Fun project to learn about the Solidity programming language, smart contracts and NFTs!

Home Page:https://sushi.ben.express

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contract and NFT details

  • This is a fun project to learn about the Solidity programming language, smart contracts and NFTs!

  • The sushiNFT dApp's front-end is published here

  • The contract address on rinkeby etherscan is 0x0713dbA8E86881DE2465ab469570dD8C6995b983

  • Minted NFTs can be seen on the OpenSea Rinkeby Testnet. They are ERC721 types tokens

  • The MetaMask Browser Extension and an Account on the Rinkeby test network are necessary to use this app!

  • Each sushiNFT will generate a unique japanese haiku, an unrhymed three-line poem. sushiNFTs are hosted 100% on chain, as base64 encoded programmatically generated SVGs which makes them permanent and secure

sushi NFTs

Collection on OpenSea

Stack

Smart contract deployed on the Rinkeby Test Network.

React front-end deployed on Netlify.

Notes to self

Any time the contract is changed:

  • Update contract address and OpenSea address in the front-end's .env file
  • Update the ABI file in the ./utils folder
  • Redeploy
  • Update environment variables on Netlify

Compile smart contract and deploy it

Run the following commands from withing the smart-contract directory.

  1. Run npx hardhat run scripts/run.js from the project root. This will test that the contract compiles as expected. Shortcut command established as a script in the package.json is npm start

  2. Run npx hardhat run scripts/deploy.js --network rinkeby to deploy to the Rinkeby testnet. Grab the contact address and assign it to the REACT_APP_DEPLOYED_RINKEBY_CONTRACT_ADDRESS constant in the .env file in the front-end. Shortcut command established as a script in the package.json is npm run deploy

  3. Copy the freshly made ./smart-contract/artifacts/contracts/sushiNFT.sol/sushiNFT.json file to ./utils/sushiNFT.json so that the front-end uses the latest ABI.

  4. Once OpenSea picks up the contract, grab the new URL (i.e. https://testnets.opensea.io/collection/sushinft-someId) and assign it to the REACT_APP_OPENSEA_LINK constant in the .env file in the front-end.

Useful Reference Docs

Useful tools

About

Fun project to learn about the Solidity programming language, smart contracts and NFTs!

https://sushi.ben.express


Languages

Language:Solidity 40.3%Language:JavaScript 31.8%Language:CSS 24.7%Language:HTML 3.2%