All Projects → smartcontractkit → Chainlink

smartcontractkit / Chainlink

Licence: mit
node of the decentralized oracle network, bridging on and off-chain computation

Programming Languages

go
31211 projects - #10 most used programming language
solidity
1140 projects
typescript
32286 projects
shell
77523 projects
PLpgSQL
1095 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Chainlink

Chainlink Ruby
Easily connect your applications to blockchains
Stars: ✭ 152 (-94.33%)
Mutual labels:  blockchain, ethereum, oracle
Hashed Timelock Contract Ethereum
Hashed Timelock Contracts for ETH, ERC20 and ERC721 on Ethereum
Stars: ✭ 128 (-95.22%)
Mutual labels:  blockchain, ethereum
Carmel
The Open Digital Innovation Marketplace
Stars: ✭ 136 (-94.93%)
Mutual labels:  blockchain, ethereum
Consensys Academy Notes
A series of notes that were taken during the ConsenSys Academy program.
Stars: ✭ 138 (-94.85%)
Mutual labels:  blockchain, ethereum
Hadoopcryptoledger
Hadoop Crypto Ledger - Analyzing CryptoLedgers, such as Bitcoin Blockchain, on Big Data platforms, such as Hadoop/Spark/Flink/Hive
Stars: ✭ 126 (-95.3%)
Mutual labels:  blockchain, ethereum
Deltabalances.github.io
The Ethereum decentralized exchange assistant. Check token balances, transaction details & trade history.
Stars: ✭ 128 (-95.22%)
Mutual labels:  blockchain, ethereum
Chainabstractionlayer
Blockchain abstraction layer
Stars: ✭ 131 (-95.11%)
Mutual labels:  blockchain, ethereum
Ion
General interoperability framework for trustless cross-system interaction
Stars: ✭ 122 (-95.45%)
Mutual labels:  blockchain, ethereum
Your first decentralized application python
An up to date and bare minimum tutorial on deploying smart contracts with python
Stars: ✭ 132 (-95.07%)
Mutual labels:  blockchain, ethereum
Awesome Dapps
A curated list of awesome decentralized applications / resources
Stars: ✭ 130 (-95.15%)
Mutual labels:  blockchain, ethereum
Yearn Vaults
Yearn Vault smart contracts
Stars: ✭ 132 (-95.07%)
Mutual labels:  blockchain, ethereum
Py Solc
Python wrapper around the solc Solidity compiler.
Stars: ✭ 126 (-95.3%)
Mutual labels:  blockchain, ethereum
Mythril
Security analysis tool for EVM bytecode. Supports smart contracts built for Ethereum, Hedera, Quorum, Vechain, Roostock, Tron and other EVM-compatible blockchains.
Stars: ✭ 1,968 (-26.57%)
Mutual labels:  blockchain, ethereum
Hanzo.js
🚀 Hanzo JavaScript SDK. Develop cutting-edge decentralized applications.
Stars: ✭ 128 (-95.22%)
Mutual labels:  blockchain, ethereum
Ethvtx
🌀🛰 ethereum-ready & framework-agnostic redux store configuration
Stars: ✭ 125 (-95.34%)
Mutual labels:  blockchain, ethereum
Awesome Openzeppelin
Blockchain educational resources curated by the OpenZeppelin team
Stars: ✭ 129 (-95.19%)
Mutual labels:  blockchain, ethereum
Alpha Wallet Android
An advanced Ethereum mobile wallet
Stars: ✭ 133 (-95.04%)
Mutual labels:  blockchain, ethereum
Open Bounty
Enable communities to distribute funds to push their cause forward.
Stars: ✭ 121 (-95.49%)
Mutual labels:  blockchain, ethereum
Remix Ide
Documentation for Remix IDE
Stars: ✭ 1,768 (-34.03%)
Mutual labels:  blockchain, ethereum
Contracts
Smart contracts comprising the business logic of the Matic Network
Stars: ✭ 130 (-95.15%)
Mutual labels:  blockchain, ethereum

Chainlink logo


GitHub tag (latest SemVer) GitHub license GitHub workflow changelog CircleCI build GitHub contributors GitHub commit activity

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.

Features

  • 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 Chainlink Truffle Box.

Community

Chainlink has an active and ever growing community. Discord is the primary communication channel used for day to day communication, answering development questions, and aggregating Chainlink related content. Take a look at the community docs for more information regarding Chainlink social accounts, news, and networking.

Install

  1. Install Go 1.17, and add your GOPATH's bin directory to your PATH
    • Example Path for macOS export PATH=$GOPATH/bin:$PATH & export GOPATH=/Users/$USER/go
  2. Install NodeJS 12.22 & Yarn
    • It might be easier long term to use nvm to switch between node versions for different projects: nvm install 12.22 && nvm use 12.22
  3. Install Postgres (>= 11.x).
  4. Ensure you have Python 3 installed (this is required by solc-select which is needed to compile solidity contracts)
  5. Download Chainlink: git clone https://github.com/smartcontractkit/chainlink && cd chainlink
  6. Build and install Chainlink: make install
    • If you got any errors regarding locked yarn package, try running yarn install before this step
    • If yarn install throws a network connection error, try increasing the network timeout by running yarn install --network-timeout 150000 before this step
  7. 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 tools/bin/self-signed-certs or manually.

To start your Chainlink node, simply run:

chainlink node start

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 jobs list

View details of a specific job with:

chainlink job show [$JOB_ID]

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

Check out the doc pages on Jobs to learn more about how to create Jobs.

Configure

You can configure your node's behavior by setting environment variables. All the environment variables can be found in the ConfigSchema struct of schema.go. You can also read the official documentation to learn the most up to date information on each of them. For every variable, default values get used if no corresponding environment variable is found.

Project Structure

Chainlink is a monorepo containing several logically separatable and relatable projects.

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 ./core/
  • Run the binary:
./chainlink

Test Core

  1. Install Yarn

  2. Install gencodec and jq to be able to run go generate ./... and make abigen

  3. Install mockery

make mockery

Using the make command will install the correct version.

  1. Build contracts:
yarn
yarn setup:contracts
  1. Generate and compile static assets:
go generate ./...
  1. Prepare your development environment:
export DATABASE_URL=postgresql://127.0.0.1:5432/chainlink_test?sslmode=disable
export CHAINLINK_DEV=true # I prefer to use direnv and skip this
  1. Drop/Create test database and run migrations:
go run ./core/main.go local db preparetest

If you do end up modifying the migrations for the database, you will need to rerun

  1. Run tests:
go test -parallel=1 ./...

Solidity Development

Inside the contracts/ directory:

  1. Install dependencies:
yarn
  1. Run tests:
yarn test

Use of Go Generate

Go generate is used to generate mocks in this project. Mocks are generated with mockery and live in core/internal/mocks.

Nix Flake

A flake is provided for use with the Nix package manager. It defines a declarative, reproducible development environment.

To use it:

  1. Nix has to be installed with flake support.
  2. Run nix develop. You will be put in shell containing all the dependencies. Alternatively, a direnv integration exists to automatically change the environment when cd-ing into the folder.
  3. Create a local postgres database:
cd $PGDATA/
initdb
pg_ctl -l $PGDATA/postgres.log -o "--unix_socket_directories='$PWD'" start
createdb chainlink_test -h localhost
createuser --superuser --no-password chainlink -h localhost
  1. Start postgres, pg_ctl -l $PGDATA/postgres.log -o "--unix_socket_directories='$PWD'" start

Now you can run tests or compile code as usual.

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!

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].