Truffle React DApp
This project is build for react dapp developing, include
solidity contract writing and
web3.js API using demo.
- Install Truffle
yarn global add truffle
- Download the box with the
truffle unbox tpai/truffle-react-dapp
- Lauch local blockchain server, you could use truffle develop console, or UI interface Ganache.
- Compile and deploy contracts
truffle compile truffle migrate
- Install metamask extension, switch to private network first, and configure custom RPC URL
http://127.0.0.1:7545, then use
seed phraseto login, you will have first account logged in.
- Start web server, visit
http://localhost:3000, try to send some ETH and Token from current account to another account and see what happens.
// If this is your first time running the start command, you'll also need to run `yarn` to install the necessary dependencies. cd client && yarn start