-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Development Setup Guide
Thomas edited this page Jun 27, 2018
·
43 revisions
Debian-based Linux (Ubuntu, Mint, etc.)
sudo apt install -y git build-essential python curl golang-go
Red Hat-based Linux (CentOS, Fedora, etc.)
sudo yum groupinstall -y 'C Development Tools and Libraries'
sudo yum install -y git python curl golang-go
Mac OSX
brew install git curl golang
Windows-based environments can follow the instructions here.
After this point, instructions should be general for any *nix flavored operating system.
Install Node.JS
sudo npm install -g truffle
sudo npm install -g yarn
Install Docker for Mac or Docker CE (follow instructions on site)
sudo gpasswd -a $USER docker
su $USER # Or log out and log back in
Ensure you have the latest Go
mkdir ~/go
export GOPATH=~/go
export PATH=$PATH:/usr/local/go/bin:~/go/bin
echo "GOPATH=$GOPATH" >> ~/.bashrc
echo "PATH=$PATH" >> ~/.bashrc
source ~/.bashrc
go get -u github.com/golang/dep/cmd/dep
go get -d github.com/smartcontractkit/chainlink
cd $GOPATH/src/github.com/smartcontractkit/chainlink
make dep
cd $GOPATH/src/github.com/smartcontractkit/chainlink
./internal/bin/devnet
cd $GOPATH/src/github.com/smartcontractkit/chainlink
yarn install
cd solidity
truffle migrate --network development
truffle console --network development
You can use the Truffle Console to interact with the deployed contracts:
GetterSetter.deployed().then(con => con.getUint256())
GetterSetter.deployed().then(con => con.setUint256(45))
GetterSetter.deployed().then(con => con.getUint256())
cd $GOPATH/src/github.com/smartcontractkit/chainlink
./internal/bin/cldev
Now you can navigate to the interacting with the Chainlink node page.