node of the decentralized oracle network, bridging on and off-chain computation
coventry Merge pull request #720 from smartcontractkit/feature/service-agreeme…
…nt-execution

Add basic handling of service-agreement request.
Latest commit 30385b3 Nov 14, 2018
Permalink
Failed to load latest commit information.
.circleci Use builder 1.0.14 for chrome dependencies Nov 8, 2018
adapters Add deserialization test for eth_tx Nov 14, 2018
cmd Add basic handling of service-agreement request Nov 14, 2018
docs Remove make build and clean up Dockerfile* Nov 5, 2018
e2e Move integration/gui.test.js to e2e/createAndRunJob.test.js Nov 9, 2018
examples Merge pull request #729 from smartcontractkit/features/contract-cleanup Nov 13, 2018
gui Humanize createdAt on jobs show Nov 13, 2018
integration Add basic handling of service-agreement request Nov 14, 2018
internal Merge pull request #720 from smartcontractkit/feature/service-agreeme… Nov 14, 2018
logger sort details by key name Oct 20, 2018
services Merge pull request #720 from smartcontractkit/feature/service-agreeme… Nov 14, 2018
sgx Use the system allocater for libadapters to reduce mem pressure Nov 13, 2018
solidity Add basic handling of service-agreement request Nov 14, 2018
store Merge pull request #720 from smartcontractkit/feature/service-agreeme… Nov 14, 2018
tools migrate account balances to users controller Oct 4, 2018
utils Support bytes encoding for input value in EthTx Nov 14, 2018
web Add basic handling of service-agreement request Nov 14, 2018
.babelrc Add babel parser to standard linter Jul 17, 2018
.dockerignore Update .dockerignore to ignore vendor/,Dockerfile-sgx,etc Nov 5, 2018
.gitignore Add NewBox() packr.Box to Application to improve testability Oct 25, 2018
.nvmrc Specify node version to lts/carbon May 7, 2018
.soliumignore Update guides to use docs site Nov 1, 2018
.soliumrc.json Add Zeppelin plugin for Solium Sep 6, 2018
Dockerfile Remove make build and clean up Dockerfile* Nov 5, 2018
Dockerfile-sgx Remove make build and clean up Dockerfile* Nov 5, 2018
Gopkg.lock Add deserialization test for eth_tx Nov 14, 2018
Gopkg.toml Add deserialization test for eth_tx Nov 14, 2018
LICENSE add license Feb 15, 2018
Makefile Add a phony enclave target to the makefile for convenience Nov 6, 2018
README.md Introduce dependencies and bootstrap make targets Oct 25, 2018
VERSION Bump version to 0.5.0 and flatten RopstenConsumer contract Oct 3, 2018
chainlink-launcher-sgx.sh Return chainlink exit code when run as node Nov 5, 2018
chainlink-launcher.sh separate chainlink-launcher from sgx for proper user prompts Oct 22, 2018
docker-compose.yaml Docker compose use sgx and adds apicredentials Oct 29, 2018
jest.config.js Remove jest preset: jest-puppeteer and manually include expect Nov 8, 2018
jest.setup.js Add finally shim for older browser support Nov 12, 2018
main.go Generate packr boxes directly, rather than thru go generate Oct 25, 2018
main_test.go add show run command to cli Oct 20, 2018
package.json Add basic handling of service-agreement request Nov 14, 2018
yarn.lock Merge pull request #713 from smartcontractkit/chores/normalize-shape-… Nov 13, 2018

README.md

Chainlink CircleCI Maintainability Go Report Card Join the chat at https://gitter.im/smartcontractkit-chainlink/Lobby Test Coverage GoDoc

Chainlink is middleware to simplify communication with blockchains. Here you'll find the Chainlink Golang node, currently in alpha. This initial implementation is intended for use and review by developers, and will go on to form the basis for Chainlink's decentralized oracle network. Further development of the Chainlink Node and Chainlink Network will happen here, if you are interested in contributing please see our contribution guidelines. The current node supports:

  • easy connectivity of on-chain contracts to any off-chain computation or API
  • multiple methods for scheduling both on-chain and off-chain computation for a user's smart contract
  • automatic gas price bumping to prevent stuck transactions, assuring your data is delivered in a timely manner
  • push notification of smart contract state changes to off-chain systems, by tracking Ethereum logs
  • translation of various off-chain data types into EVM consumable types and transactions
  • easy to implement smart contract libraries for connecting smart contracts directly to their preferred oracles
  • easy to install node, which runs natively across operating systems, blazingly fast, and with a low memory footprint

Examples of how to utilize and integrate Chainlinks can be found in the examples directory.

Install

  1. Install Go 1.10+, and add your GOPATH's bin directory to your PATH
  2. Install NodeJS & Yarn
  3. Download Chainlink: go get -d github.com/smartcontractkit/chainlink && cd $GOPATH/src/github.com/smartcontractkit/chainlink
  4. Bootstrap: make bootstrap
  5. Run the node: chainlink help

Ethereum Node Requirements

In order to run the Chainlink node you must have access to a running Ethereum node with an open websocket connection. Any Ethereum based network will work once you've configured the chain ID. Ethereum node versions currently tested and supported:

Run

NOTE: By default, chainlink will run in TLS mode. For local development you can either disable this by setting CHAINLINK_DEV to true, or generate self signed certificates using internal/bin/self-signed-certs or manually.

To start your Chainlink node, simply run:

$ chainlink node

By default this will start on port 6688, where it exposes a REST API.

Once your node has started, you can view your current jobs with:

$ chainlink jobspecs

View details of a specific job with:

$ chainlink show $JOB_ID

To find out more about the Chainlink CLI, you can always run chainlink help.

Check out the wiki's pages on Adapters and Initiators to learn more about how to create Jobs and Runs.

Configure

You can configure your node's behavior by setting environment variables which can be, along with default values that get used if no corresponding environment variable is found. The latest information on configuration variables are available in the wiki.

External Adapters

External adapters are what make Chainlink easily extensible, providing simple integration of custom computations and specialized APIs. A Chainlink node communicates with external adapters via a simple REST API.

For more information on creating and using external adapters, please see our external adapters page.

Development Setup

For the latest information on setting up a development environment, see the guide here.

Build your current version

$ go build -o chainlink
  • Run the binary:
$ ./chainlink

Test

$ cd $GOPATH/src/github.com/smartcontractkit/chainlink
$ go test ./...

Solidity Development

  1. Install Yarn
  2. Install the dependencies:
$ cd $GOPATH/src/github.com/smartcontractkit/chainlink/solidity
$ yarn install
  1. Run tests:
$ yarn run test-sol

Development Tips

For more tips on how to build and test Chainlink, see our development tips page.

Contributing

Chainlink's source code is licensed under the MIT License, and contributions are welcome.

Please check out our contributing guidelines for more details.

Thank you!