This simple box comes with everything you need to start using Truffle to write, compile, test, and deploy smart contracts, and interact with them from a React app.
First ensure you are in an empty directory.
Run the unbox command using 1 of 2 ways.
# Install Truffle globally and run `truffle unbox`
$ npm install -g truffle
$ truffle unbox Diegoescalonaro/react-simple-truffle-box# Alternatively, run `truffle unbox` via npx
$ npx truffle unbox Diegoescalonaro/react-simple-truffle-boxCompile and migrate the smart contracts.
$ truffle compile
$ truffle migrateRun tests written in Solidity or JavaScript against your smart contracts.
$ truffle testStart the react dev server.
$ cd client
$ npm start
Starting the development server...Build the application for production using the build script. A production build will be in the dist/ folder.
$ cd client
$ npm run buildFrom there, follow the instructions on the hosted React app. It will walk you through using Truffle and Ganache to deploy the SimpleStorage contract, making calls to it, and sending transactions to change the contract's state.