How to setup chainlink in Mac System
How to setup chainlink in Mac System
Pre-requisites to be done
-
Install Go 1.15, and add your GOPATH's bin directory to your PATH
-
Example Path for macOS
export PATH=$GOPATH/bin:$PATH
&export GOPATH=/Users/$USER/go
-
-
Install NodeJS 12.18 & Yarn
-
It might be easier long term to use nvm to switch between node versions for different projects:
nvm install 12.18 && nvm use 12.18
-
-
Install Postgres (>= 11.x).
-
You should configure Postgres to use SSL connection
-
-
Download Chainlink:
git clone https://github.com/smartcontractkit/chainlink && cd chainlink
-
Build and install Chainlink:
make install
-
If you got any errors regarding locked yarn package, try running
yarn install
before this step -
If you get error during make install with permission access apply this command
-
sudo chown -R ${whoami}:admin /usr/local/go/bin/
-
-
-
Run the node:
chainlink help
Postgres should have database chainlink_test created
Once all set, open up terminal and export these variable. Please note, the ETH_CHAIN_ID=1337 is for ganache. If you want to connect with mainnet or testnet, use appropriate ETH_CHAIN_ID. YOu can also update websocket URL to listen to
-
export DATABASE_URL=postgresql://127.0.0.1:5432/chainlink_test?sslmode=disable
-
export CHAINLINK_DEV=true # I prefer to use direnv and skip thi
-
export ETH_CHAIN_ID=1337 # for ganche
-
export CHAINLINK_TLS_PORT=0
export ETH_URL=websocket url (replace it)
Once all set, run below command ->
Chaincode node start
It will ask you to set keystore password, nd it should be in below combinations.. 3 capital letters, 3 small letters, 3 numbers and 3 special characters.
That's it, you will be able to open GUI by localhost:6688
Git clone -> https://github.com/smartcontractkit/chainlink
Setup Chainlink Node Using below command