Utilities for operating a chainlink node.
Project description
Chainlink Tools
chainlink-tools
is a command line utility designed to make life easier for Chainlink node operators.
Notes
Authentication with the node is managed by the same .api
file as outlined in the official Chainlink documentation.
Install
$ pip install chainlink-tools
Bootstrapping a node
The bootstrap-jobs
subcommand allows for easy bootstrapping when setting up a node for the first time.
$ chainlink-tools \
--credentials "/path/to/.api/file" \
--node-url "http://localhost:6688" \
bootstrap-jobs \
--oracle-address "YOUR_ORACLE_CONTRACT_ADDRESS"
This will add the five default jobs to the node, as outlined in the Chainlink docs:
- EthBytes32 (GET)
- EthBytes32 (POST)
- EthInt256
- EthUint256
- EthBool
The address you pass in for --oracle-address
will be set as the address for the RunLog
initiator.
Adding new jobs to a node
chainlink-tools
provides two different mechanisms for adding new jobs to a node.
Syncing a directory of jobs
The sync-jobs
subcommand allows for syncing a directory of job specs to a running node.
$ chainlink-tools \
--credentials "/path/to/.api/file" \
--node-url "http://localhost:6688" \
sync-jobs \
--jobs_dir "/path/to/jobs/dir"
--jobs-dir
should be the path to a directory of .json
files of job specs:
chainlink-jobs
| ethusd.json
| btcusd.json
| linkusd.json
sync-jobs
will first check to see if the job already exists in the node. This is done by doing a comparison of all initators, tasks, and other top level fields. For any jobs in the specified directory not already found on the node, sync-jobs
will add them to the node.
This allows you to keep a single running directory of all your jobs and run sync-jobs
on the whole directory every time you add a new one.
Note: For comparison purposes, all ETH addresses that appear in a job spec should be lowercase.
Specifying a single job to add to a node
Alternatively, if you would like to manually create each individual job, the create-job
subcommand allows for specifying a single job to add to a node.
$ chainlink-tools \
--credentials "/path/to/.api/file" \
--node-url "http://localhost:6688" \
create-job \
--job "/path/to/job1.json"
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file chainlink-tools-0.1.0.tar.gz
.
File metadata
- Download URL: chainlink-tools-0.1.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe0431c01467f2dfa3c26641c530ea76abcda16c99bbb5f0af22bdb12d4f1e3c |
|
MD5 | 8df0eab639f3579defd0b9217a2abdc0 |
|
BLAKE2b-256 | a99b38a1978ef13a7ebb143f7b734db83e221854e1e2a597371d72f8af93615e |
File details
Details for the file chainlink_tools-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: chainlink_tools-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e64e9356910b87d80605e05c7b258718aff84a0a032317ed2a6a6ac8688512f |
|
MD5 | 2aa14dd1325256cbb53ea1d5d97305bc |
|
BLAKE2b-256 | 09c22ca4ebec74013968eec1a20db9579f7027a282c9c30f59b0d00ec4f159c5 |