Property DAPP
A Dapp built with react which uses web3.js to interact with solidity smart contracts hosted on the rinkeby blockchain.
Frontend
App.jsfile holds a single page application- Smart contract functions
loadWeb3– initialize web3 and contractsgetInitialData– get property and purchase listsbuyProperty– new buy property transaction on the blockchainsetPropertyAvailability– modify availability of property on the blockchain
Contracts
Contracts are located in the src/contracts folder
Registry.solProperty.sol
The ABIs for the contracts are located in src/abis folder
Setup
- Install
node.js - Run
npm installfrom project root to install packages - Create a
.envfile in project root like the following and put your contract addresses
PROPERTY_CONTRACT_ADDRESS=<here>
REGISTRY_CONTRACT_ADDRESS=<here>
- Install
metamask, setup account - Set network on
metamaskto ‘Rinkeby Test Network’ (if you deployed smart contracts torinkeby). Might need to enable test networks in settings. - Run
npm startto run server and visit http://locahost:3000/ - Should get prompted by metamask to connect to the website. Accept it and you’re good to go!
