Skip to content

ishtian-revee/property-dapp

Repository files navigation

Ethereum Solidity Web3.js React Next JS Semantic UI React

About The Project ⭐

This repository contains all the source code of a property decentralized application built on Ethereum Blockchain (Goerli Test Network).

This is a property marketplace where user can mint their property information as an NFT and can trade these NFTs to others. So, basically, anyone can buy properties in a form of NFTs. Also, the users need to trade their property NFTs with a custom ERC20 standard token called AWT (Awesome Token) instead of native Ethereum currency (ETH).

xd_prop_1

Built With 🛠

Following technologies, frameworks and libraries are used to build this project:

Features 🎯

Property DApp provides the following features:

  • Add/Mint new property
  • Buy properties
  • Set property availability status
  • Set approval status
  • Property purchases records
  • Get details of AWT and vendor contract
  • Purchase and Sell AWT
  • Mint and Burn AWTs
  • Withdraw vendor balance
  • AWT transfer records

Getting Started 🚀

To interact with this decentralized application you must need a Metamask wallet, must have some test ETH, and an Infura API Key for the Goerli test network. If you have all of these then you can jump to the Project Setup section skipping the following steps.

🔸 Step 1: Metamask Wallet Setup

Get Metamask wallet extension to your browser and set up your Metamask wallet account. When you set up a Metamask wallet, you will be asked to note down and then re-enter 12 words. These words are your Mnemonic seed phrase. Keep it somewhere safe.

🔸 Step 2: Get Test Ethers for Goerli Test Network

Make sure in your Metamask wallet Goerli Testnet is selected instead of Ethereum Mainnet. Now you need some test Ethers in your wallet. To get free test ETH you can go to any of the following Goerli Faucet links:

Provide your Metamask account address and get free test ETH.

🔸 Step 3: Get Your Infura API Key

To communicate with the Ethereum blockchain you need Infura API Key. Go to the Infura website, register, and create a new API key for Web3 API.

Project Setup 🏹

🔸 System Requirements

Before you begin, make sure you have the following installed:

🔸 Clone Project and Package Initialization

  1. Clone the project by running the following git command in your git-CLI:
git clone https://github.com/ishtian-revee/property-dapp.git
  1. Execute the following command in the project root folder:
npm install --legacy-peer-deps

🔸 Config File Setup

Go to the ethereum directory and create a config file named config.json. Then add the following lines to this file:

{
    "mnemonic" : "{YOUR_METAMASK_MNEMONIC_PHRASE}",
    "infura_api_key" : "{YOUR_GOERLI_INFURA_API_KEY}",
    "token_address" : "0x8F4cA6f968Ed3276f871C5AF6237FF4e143538d7",
    "vendor_address": "0x6074B60E0a6659aF74012278Cd55971B5aAE082d",
    "property_address": "0x9FBB7A582B7Cb5f5Ec952B4564d54dDB9Cc22a7c",
    "registry_address": "0x5f6d3e3590b0CCbc7CEf36fC519d334261df6B74"
}

Insert your Metamask Mnemonic Phrase and Goerli Infura API Key to the "mnemonic" and "infura_api_key" parameters accordingly.

🔸 Run The Project

  1. Now go back to the root directory and run the following command:
npm run dev
  1. After that visit http://locahost:3000/

  2. Metamask should be prompted. Connect to your wallet and you are all set! 🎉

User Flow 💡

  1. Initially users can go to the Get AWT tab. Here they can see all the basic information about this custom ERC20 token. Also some other information like total available tokens, vendor contract balance, minter account address, etc.
  2. Next a user can purchase or sell AWTs. Before purchasing a key point to remember:
1 ETH = 100 AWT

So, if a user wants to buy 10 AWT then they need to pay 0.1 ETH.

  1. In the AWT Transfers tab anyone can see all the AWT transaction records.
  2. Now, on click top left tab Property DApp the property marketplace page will load. From here users can buy any property NFT.
  3. On Owned Properties page users can see a list of properties that they own. They can change the availability status of these property NFTs at any time. Also, a user needs to set the approval status so that others can buy their NFTs.
  4. On Add Property page anyone can add or mint their property as NFT. They just simply need to insert the location, size, and prince (in AWT).
  5. In the Purchase History page all the purchase records are displayed.

Screenshots 📸

xd_prop_2 xd_awt_1

About

This repo contains all the source code for a property decentralized application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published