- Install ganache and run server on port 7545
- Run
yarn install
in root directory to install truffle - Run
yarn install
inclient
directory to install react front-end dependencies - Write smart contracts in
contracts
directory - Add new smart contracts to
migrations/2_deploy_contracts.js
file - Run
yarn truffle compile
to compile smart contracts - Run
yarn truffle test
to execute smart contract tests intest
directory - Run
yarn truffle migrate --reset
to deploy contracts to blockchain - Add the following network to metamask in order to connect to local blockchain:
Network name: http://127.0.0.1:7545
New RPC URL: http://127.0.0.1:7545
Chain ID: 1337
- Add smart contract ABI (JSON) file location to the
client/src/smartContract.js