This is a sample project written in Solidity programming language. The project is e-commerce store running on the ethereum network.
- Install nodejs (which includes npm).
- Install Truffle Framework.
$ npm install -g truffle
- Install Ganache CLI.
$ npm install -g ganache-cli
- Clone this repository locally
- Open console in the project folder and install all dependencies.
$ npm install
- Start local blockchain
$ ganache-cli
- Install Metamask extension in your browser.
- Connect to the blockchain in Metamask with "Custom RPC" option and paste the url that ganache-cli listens. The host and port in truffle-config.js must match that url.
- Copy the mnemonic that ganache-cli generates in the console and import account in Metamask
- Migrate contracts
$ truffle migrate
- Start dev server
$ npm run dev
- The first account in metamask is the owner of the contract