Setup truffle
Last updated
Last updated
create and edit truffle-config.js
:
We specified to use solc
version 0.5.2
as the contract compiler and we set the contract build directory to ./src/contract_build
because the default build directory is ./build
which conflicts with react application build folder. Another reason is later on we'll use react to load the Counter.json
from the build directory which must be located inside the src
directory.
You can check if it's setup correctly by running truffle compile
The command will success and print something like:
truffle compile will check the contracts which needs compile to evm byte code. Truffle thinks everything is update to date since we're not having any smart contract in this project.