Skip to content

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

License

Notifications You must be signed in to change notification settings

plinki/nulink

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NuLink

Join the chat at https://discord.gg/pXBH9m7

NuLink is middleware to simplify communication with blockchains. Here you'll find the NuLink 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 NuLink's decentralized oracle network. Further development of the NuLink Node and NuLink 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 NuLinks can be found in the examples directory.

Install

  1. Install Go 1.12+, and add your GOPATH's bin directory to your PATH
  2. Install NodeJS & Yarn
  3. Download NuLink: git clone https://github.com/smartercontractkit/nulink && cd nulink
  4. Build and install NuLink: make install
  5. Run the node: nulink help

Ethereum Node Requirements

In order to run the NuLink 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, nulink 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 NuLink node, simply run:

$ nulink local 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:

$ nulink jobspecs

View details of a specific job with:

$ nulink show $JOB_ID

To find out more about the NuLink CLI, you can always run nulink 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 docs.

Project Directory

This project contains several sub-projects, some with their own documentation.

External Adapters

External adapters are what make NuLink easily extensible, providing simple integration of custom computations and specialized APIs. A NuLink 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 nulink ./core/
  • Run the binary:
$ ./nulink

Test

  1. Install Yarn

  2. Build contracts:

$ yarn
$ yarn setup:contracts
  1. Ready for testing:
$ go test -parallel=1 ./...

Solidity Development

  1. Install Yarn
  2. Install the dependencies:
$ cd evm
$ yarn install
  1. Run tests:
$ yarn run test-sol

Use of Go Generate

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

Development Tips

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

Contributing

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

Please check out our contributing guidelines for more details.

Thank you!

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 40.8%
  • TypeScript 23.7%
  • CSS 15.9%
  • Solidity 7.4%
  • JavaScript 7.2%
  • Rust 3.5%
  • Other 1.5%