Implementation of a decentralised public distribution system using blockchain.
Coded in two days from scratch as part of Pragyan Hackathon 2019
- Ganache - For a personal Ethereum blockchain.
- Truffle - A development framework for building dapps.
- Solidity - For implementing smart contracts.
- Lots of 💙 from Team Alpha 🐺🐺🐺
git clone https://github.com/gigatesseract/smartPDS.git
- cd
smartPDS
npm install
(If npm command is not found, trysudo apt install nodejs npm
and thennpm install
)- Download ganache appImage here and run it.
- Install metamask extension for your browser.
- Configure the metamask extension to let it communicate between ganache and your dapp.
- Create a metamask account. You will be given a 8-word seed phrase. Keep the seed phrase safe
- Fire up the metamask extension. Change network to Custom RPC
- In the RPC URL field, enter the URL shown by Ganache at its top window and press Enter.
- In Ganache, click the 🔑 button of any one account and copy the Private key.
- In metamask, click your account image, go to import account and paste the Private key. Check here for more details.
- Once everything is set, you are good to go. Now go back to terminal.
truffle migrate
(Usetruffle migrate --reset
if you want to overwrite build files) If metamask configuration was done right this will deduct fake ethereum from the account which you configured in the metamask, as this is where the contract is deployed in the blockchainnpm run dev