This is an example DApp (Decentralized Application) that shows how easy it is to create a truly peer to peer marketplace on the Ethereum blockchain with origin-js. Using only javascript, you can create and purchase listings, leave reviews, check identity, and more.
To learn more about Origin Protocol, please read our product brief and whitepaper for a high-level description of what we're building and why it matters. Our official website is https://www.originprotocol.com.
This demo is currently running on the Rinkeby testnet. (Note that this demo is slightly behind the current state of this repo.)
Make sure you have node
version 8.5.0 or greater
node --version
In a new tab:
git clone https://github.com/OriginProtocol/demo-dapp origin-demo-dapp && cd origin-demo-dapp
npm install
npm run start
A browser will open to http://localhost:3000. If you don't have the MetaMask extension (or another wallet provider) follow instructions of the next step.
-
Install MetaMask Chrome Browser Extension.
-
Follow the instructions to set up your wallet.
-
Click where it says "Ethereum Main Network" and select "Rinkeby Test Network" or "Ropsten Test Network". This takes us off of the real Ethereum network and onto a test network. Ethers on test networks cannot be exchanged for fiat currency.
Be careful not to mix up your test wallet with your real one on the Main Network.
- Get Rinkeby ether from the Rinkeby faucet.
- Get Ropsten ether from the Ropsten faucet.
Create a listing and post it to IPFS and Ethereum.
If you want hack on origin-js code, or if you just want to use a private local blockchain, follow these instructions.
Follow these instructions to setup and run origin-js.
Leave origin-js running and create a new terminal window. Then run the following:
git clone https://github.com/OriginProtocol/demo-dapp origin-demo-dapp && cd origin-demo-dapp
cp .env.dev .env # Use development env vars
npm run install:dev
npm run start
The install:dev
script performs the regular install and then links to your local origin-js from step 1. Changes made to origin-js code will then immediately reflected in Demo DApp without requiring npm install
.
Your browser will open to http://localhost:3000 and display the DApp.
-
Log out of MetaMask.
-
Click
Restore from seed phrase
-
Enter the following seed phrase (Mnemonic):
candy maple cake sugar pudding cream honey rich smooth crumble sweet treat
This is the default seed phrase used by Truffle for development.
-
Click where it says "Ethereum Main Network" and select "Localhost 8545". Click the back arrow to return to your account.
-
You should see your first test account now has 100 ETH and the address
0x627306090abaB3A6e1400e9345bC60c78a8BEf57
. Additional generated accounts will also have this amount.
Origin is an 100% open-source and community-driven project and we welcome contributions of all sorts. There are many ways to help, from reporting issues, contributing code, and helping us improve our community.
To get involved, please join our Discord channel and review our guide to contributing.