Truffle is a development environment, testing framework and asset pipeline for Ethereum, aiming to make life as an Ethereum developer easier.
Requirements:
- yarn>=1.1 (recommended) or npm >= 5.0
- node >= 8.0
Below we will use yarn but if you prefer you can adapt to use npm
git clone https://github.com/DevchainUserGroup/environment.git
cd environment/truffle
yarn install
Next we need to add executable to our PATH. There are 2 ways to do it. Below, the <environment-repo> is a placeholder for path where you cloned this repository.
-
Add project bin to your PATH by editing your
.profile(assuming you are sourcing it).export <environment-repo>/truffle/node_modules/.bin -
Add links to the executables into a directory which is in your PATH. Below I assume
~/binis in your PATH. You can choose another directory which is in your PATH (eg/usr/local/bin- but this one will probably require a root access)cd ~/bin for f in solium standard testrpc truffle; do ln -s <environment-repo>/truffle/node_modules/.bin/$f ./; done
For those who don't want to install npm modules for development (truffle, testrpc...) we provide the eth-polygon container. It will start the testrpc on the 8544 port. Please look at the Makefile to find more how to access the polygon container.
- Create a new directory
- Run
truffle init - link the
Makefileto that directory - Run
make run-testrpc