-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Development Setup Guide
Thomas edited this page Jun 15, 2019
·
43 revisions
Debian-based Linux (Ubuntu, Mint, etc.)
sudo apt install -y git build-essential python curlRed Hat-based Linux (CentOS, Fedora, etc.)
sudo yum groupinstall -y 'C Development Tools and Libraries'
sudo yum install -y git python curlMac OSX
brew install git curl golangWindows-based environments can follow the instructions here.
After this point, instructions should be general for any *nix flavored operating system.
Install Node.JS v10.15
npm install -g truffle
npm install -g yarnDownload Go (if not previously installed)
If needed, adjust the location of your Go installation and .bashrc to your setup.
mkdir ~/go
export GOPATH=~/go
export PATH=$PATH:/usr/local/go/bin:~/go/bin
echo "GOPATH=$GOPATH" >> ~/.bashrc
echo "PATH=$PATH" >> ~/.bashrc
source ~/.bashrcgo get -u github.com/golang/dep/cmd/depgo get -d github.com/smartcontractkit/chainlink
# Output will say no Go files, this is fine
cd $GOPATH/src/github.com/smartcontractkit/chainlink
make installThe first time running make install will take a while to finish.
Once complete, you can run chainlink -h to check that the binary was created.
For local development, tools are available in the tools/bin/ directory:
-
cldev: sets environment variables and runs the source of the node directly -
gethnet: (requires Geth to be installed) runs a local Geth Ethereum instance -
devnet: (requires Docker to be installed) runs a local Parity Ethereum instance
cd $GOPATH/src/github.com/smartcontractkit/chainlink/evm
yarn install
yarn test