Code Monkey home page Code Monkey logo

debridge-launcher's Introduction

This repo allows to setup the oracles for few chains quickly with the same credentials.

Fast Testnet start

  1. Install full testnet nodes
  1. Set ETH_URL (node Websocket Endpoint) in files chainlink-eth.env, chainlink-bsc.env, chainlink-heco.env
  2. Set providers (node RPC Endpoint) ETH_PROVIDER, BSC_PROVIDER, ETH_PROVIDER in file postgres.env
  3. Change default (postgreschainlink) postgress password. Files: initiator/.env, chainlink-heco.env, chainlink-bsc.env, chainlink-eth.env
  4. Create file apicredentials with chainlink email and password. example docs. After that need to change CHAINLINK_EMAIL, CHAINLINK_PASSWORD in initiator/.env
  5. Put keystore file to secrets/keystore.json.
  6. Store the password that decrypts the key from keystore in password.txt
  7. Make your oracle-operator address to be whitelisted by deBridge governance
  8. Run the command docker-compose up --build -d.
  9. Run the script to create the initiators and prepare the jobs and store main configurations in the database:
bash chainlink-init-scripts/setup-initiators-and-jobs.sh
  1. Run the command docker-compose restart initiator.

Add new chain support

  1. Create and configure chainlink-[{CHAIN_TICKER}].env. At least the followed params should be added:
ROOT
ETH_CHAIN_ID
LINK_CONTRACT_ADDRESS
CHAINLINK_TLS_PORT
SECURE_COOKIES
GAS_UPDATER_ENABLED
ALLOW_ORIGINS
ETH_URL
DATABASE_URL
CHAINLINK_BASEURL
FEATURE_EXTERNAL_INITIATORS
CHAINLINK_DEV
CHAINLINK_PORT
CLIENT_NODE_URL

For more details, see the docs

  1. Add the container to the docker-compose.yml
  chainlink-[{CHAIN_TICKER}]:
    container_name: chainlink-[{CHAIN_TICKER}]
    image: smartcontract/chainlink:0.10.2
    entrypoint: /bin/sh -c "chainlink node import /run/secrets/keystore && chainlink node start -d -p /run/secrets/node_password -a /run/secrets/apicredentials"
    restart: always
    env_file:
      - chainlink-[{CHAIN_TICKER}].env
    ports:
      - [{PORT}]:6688
    secrets:
      - node_password
      - apicredentials
      - keystore
    depends_on:
      - postgres
    networks:
      - chainlink
  1. Add the new database name specified in DATABASE_URL to postgres.env at the end of POSTGRES_MULTIPLE_DATABASES using coma separator.

Note: if the database already exist the scrypt that creates the database won't be run. So the database either should be created manually or the volume with previous database can be removed:

docker volume rm pgdata

See Initialization scripts section in docs.

  1. Run the command docker-compose up.

  2. Extend setup-initiators-and-jobs.sh. Add to the end of the file:

echo "Add initiator for $NETWORK"
network=[[NETWORK_NAME]]
chain_id=[[NETWORK_CHAIN_ID]]
cl_url=[[CHAINLINK_NODE_URL]]
add_initiator $network

echo "Add jobs for $NETWORK"
add_jobs $network

echo "Prepare table for $NETWORK ie"
create_ei_table $chain_id $cl_url $network

echo "Add record for $NETWORK ie"
add_record $network

Miscellenious

Connect to the database:

docker exec -it debridge-launcher_postgres_1 psql -v ON_ERROR_STOP=1 --username postgres -d $DATABASE_NAME

debridge-launcher's People

Contributors

alekseismirnov avatar artyukh avatar kstasi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.