Decentralized App on Trade Promotion Management using blockchain with ethereaum and smart contract using solidity.
Install these prerequisites for the application to work
- NPM: https://nodejs.org
- Truffle: https://github.com/trufflesuite/truffle
- Ganache: http://truffleframework.com/ganache/
- Metamask: https://metamask.io/
git clone https://github.com/dipayan/trade-promotion-management-blockchain
$ cd trade-promotion-management-blockchain
$ npm install
Open the Ganache GUI client that you downloaded and installed. This will start your local blockchain instance.
$ truffle migrate --reset
Any modification to the smart contract (.sol) files , the application needs to be restarted.
- Open Metamask chrome extension
- Add a new Custom RPC
- Add http://localhost:7545 which is where the local blockchain network is running created by Ganache with 10 accounts with ether.
- Navigate back to the Ganache UI and select any one of the 10 accounts and then click on the key icon and select and copy the private key
- Next, in the Metamask UI , import a new account and then paste the private key to add the new account.
$ npm start
Visit this URL in your browser: http://localhost:8080
Dipayan Biswas