Decentralised Marketplace is the online platform that runs on the Ethereum blockchain where Seller can add new Products & their prices. And Buyer can purchase them by paying in cryptocurrency using ETH currency.
- Be a Truffle project ✔️
- Have a smart contract commented according to the specs which: ✔️
- Have a circuit breaker design pattern and at least one other design pattern in Module 10 Lesson 1 ✔️
- Have security features to protect against at least two attack vectors outlined in Module 9 Lesson 3 ✔️
- Use a library (SafeMath.sol, etc) or extend another contract ✔️
- Have at least 5 tests for each smart contract ✔️
- Smart contract should be deployed to a testnet ✔️
- Have a development server to serve the frontend interaction of the application locally (You should be able to visit a local URL and interact with the application) ✔️
- Frontend should work with web3.js / ethers.js, Infura and MetaMask to:
- Recognize and display current MM account ✔️
- Sign transactions that change a deployed contract’s state using MetaMask ✔️
- Reflect the successful state change in the UI ✔️
- Smart Contract & Business logic - Solidity V 0.5.16
- Front End : React JS
- Backend : web3.JS
- Clone the repo using git clone https://github.com/shailendrakumaromkar
- cd DApp_Marketplace directory and clone the client repo using git clone https://github.com/shailendrakumaromkar
- Navigate to the root of the working copy (where package.json is).
- Run npm install -g npm This will install all necessary dependencies.
- Have a local blockchain running on port 9545 (e.g. using Ganache)
- From the main project folder (crypto-fpl), deploy contracts with truffle migrate --reset
- Node: v12.19.0,
- Solidity: v0.5.16,
- Truffle: v5.1.47,
- chai: 4.2.0,
- react: 16.8.4,
- web3: 1.0.0-beta.55
- Navigate to the DApp_Marketplace directory with cd DApp_Marketplace
- Run npm install and then npm run start
- Open up your browser and the project should be up on localhost:3000
- Ensure your browser has a plugin (e.g. Metamask) that allows you to interact with the Ethereum blockchain
- Ensure you have a local blockchain running (e.g. on Ganache)
- Select Localhost:9545 or Custom RPC depending on which port your Ganache blockchain is running on Interact with the web interface
- Ensure your browser has a plugin (e.g. Metamask) that allows you to interact with the Ethereum blockchain
- Select Kovan Test Network and choose a Metamask account that has some testnet ether. You can obtain some Kovan testnet ether via https://faucet.kovan.network/ Interact with the web interface
- Create a new file on Remix and name it Marketplace.sol, paste the contents of Marketplace.sol from VS code
- Deploy the contracts on Remix and you should be good to go.
- If you have Ganache running, choose Web3 provider as your environment and connect to the port hosting the local blockchain (the default is http://localhost:9545).
- Otherwise you can select the provided Javascript VM.
You can run the tests by running truffle test from the DApp_Marketplace directory
- Serve the UI from IPFS
- Add ENS capability to resolve human-readable names to Ethereum addresses
- Implement upgradable design or autodeprecation