The goal of the project is to develop a smart contract on Ethereum for the sale of real estate.
In this project, we will refer to the real estate managed by the smart contract as a token.
Login to the site and interaction will be through the Ethereum Metamask wallet. On the homepage, one will be able to see all the tokens created on smart contract. From the web interface, it can be possible for the user connected to Metamask to create a token.
A token has different attributes:
- A name
- An address
- A price (in Ether)
- One or more images
From this one, the owner of the token can sell it or stop the sale. It is possible, from the website, to buy tokens put up for sale by other owners. When the token is sold, it is transferred to its new owner and the money from the sale is returned to the seller. When a token is sold, a 10% commission is paid to the contract. The contract owner can withdraw the commission funds at any time.
-
Truffle (Framework for Ethereum Smarts Contracts)
$ npm install --g [email protected]
-
Ganache (Ganache is used to set up a personal Ethereum BlockChain to test your Solidity contracts. It provides more functionality than Remix)
-
Metamask (browser extension)
-
Open Ganache (in QuickStart) and Configure Ganache on Metamask
1. Give the name of your choice and indicate the Http URL of Ganache RPC.
2. This will connect your Metamask to Ganache. Initially your balance will be 0 ether. You must import your Ganache account.
3. Open your accounts by clicking in the upper right corner of your Metamask and select Import Account.
-
- 4. You must provide your private key for your account in Ganache. Open Ganache and click on View Keys for any of your accounts, which will display your account address and your private key. Copy the private key and paste it into the metamask.
- -
Command to run:
$ npm install
- Reset migrations:
$ truffle migrate -reset
- Start the server:
$ npm run start
To access the application, you will have to go to: http://localhost:3000/
To start selling or buying goods, just click on "See our ads".
-
To buy :
-
Sell :
L. Alexandre