Bisonai / orakl

Official Oracle of Kaia Blockchain
https://orakl.network
MIT License
69 stars 13 forks source link
blockchain data-feed evm kaia klaytn off-chain-aggregation oracle orakl-network proof-of-reserve request-response solidity vrf web3

Orakl Network

This repository is split to on-chain and off-chain oracle implementation.

You can learn more about the Orakl Network from documentation.

Test Data Feed Locally Using Docker

Run local data feed connected to testnet.

Steps run through docker compose

Prerequisites

  1. Docker
brew install docker
brew install docker-compose
  1. Env setup

Nearly everything is already setup, but there are two variables that should be set manually in following env files:

MNEMONIC="{MNEMONIC for contract deployer wallet}"
DELEGATOR_REPORTER_PK={private key for delegator fee payer}

Run docker

Data feed

  1. Docker Compose Build Builds all required images for docker-compose.
docker-compose -f docker-compose.local-data-feed.yaml build
  1. Docker Compose Up Runs all required images to run datafeed locally.
docker-compose -f docker-compose.local-data-feed.yaml up
  1. Docker Compose Down Close all related containers.
docker-compose -f docker-compose.local-data-feed.yaml down -v

VRF / Request-Response

Run the following command to build all images

docker-compose -f docker-compose.local-core.yaml build

Set wallet credentials, ADDRESS and PRIVATE_KEY values, in the .core-cli-contracts.env file. You can update CHAIN to either baobab and cypress. For running the VRF service, update vrf-keys-baobab.json or vrf-keys-cypress.json. If the chain is not localhost, Coordinator and Prepayment contracts won't be deployed. Instead, Bisonai's already deployed contract addresses (VRF, RR) will be used. Run the following command to start the VRF / RequestResponse service:

SERVICE=vrf docker-compose -f docker-compose.local-core.yaml up --force-recreate -d

SERVICE is an env variable that will be used to spin up the specified service. The options are rr and vrf stands for Request-Response and VRF, respectively.

Note that the current docker implementation is designed to run a single service, either rr or vrf, at a time. Therefore, it's highly recommended to add --force-recreate when running docker-compose up command. That will restart all containers thus removing all the modified data in those containers.

Here is what happens after the above command is run:

To start core microservices (listener, worker, reporter) as a singleton service run:

The microservices can also be started separately in any arbitrary order by replacing core in the above commands with either listener, worker, or reporter

Image tag release (do not write under this section)