Skip to content

Let's enter the world of Metaverse and purchase some plots of land...

Notifications You must be signed in to change notification settings

hellosumitg/meta-city

Repository files navigation

MetaCity

Theory

  • What is a Non-Fungible Token? Fungible means to be the same or interchangeable eg Eth is fungible. With this in mind, NFTs are unique; each one is different. Every single token has unique characteristics and values. They are all distinguishable from one another and are not interchangeable eg Unique Art NFT's Creation Process

  • What is ERC-721? ERC-721 is an open standard that describes how to build Non-Fungible tokens on EVM (Ethereum Virtual Machine) compatible blockchains; it is a standard interface for Non-Fungible tokens; it has a set of rules that make it easy to work with NFTs. Before moving ahead have a look at all the functions supported by ERC721

Technology Stack & Tools

  • Solidity (Writing Smart Contract)
  • Javascript (React & Testing)
  • Web3 (Blockchain Interaction)
  • Truffle (Development Framework)
  • Ganache (For Local Blockchain) for testing purpose
  • Goerli Testnet for deployment
  • MetaMask (Ethereum Wallet)
  • ThreeJS (3D Javascript library)
  • @react-three/fiber (React renderer for Three.js)
  • @react-three/drei (Extra helpers for React-Three-Fiber)

Requirements For Initial Setup

  • Install NodeJS, I recommend using node version v14 or v16 to avoid any potential dependency issues
  • Install Truffle, In your terminal, you can check to see if you have truffle by running truffle --version. To install truffle run npm i -g truffle.
  • Install Ganache.
  • Install MetaMask in your browser.

Setting Up

1. Clone/Download the Repository

2. Install Dependencies:

$ yarn

3. Migrate Smart Contracts

$ truffle migrate --reset or $ truffle migrate --reset --network goerli

4. Test Smart Contracts

$ truffle test

5. Start Frontend

$ yarn start

Requirements For Running App

1. Setup a local blockchain network for running Ganache-Cli with these credential or as per your choice:

  • Network name: "Local Network CLI"
  • New RPC URL: "http://127.0.0.1:8545/"
  • Chain ID: "31337"
  • Currency symbol: "ETH"
  • Block explorer URL(OPtional): fill it or leave it empty as per your choice

2. Run the Local blockchain in one terminal and keep it running by writing also copy and import first two accounts' private into your metamask wallet using :-

$ npx ganache-cli

3. Now start the App using new terminal and purchase the plot of land using:-

$ yarn start