This repository is split to on-chain and off-chain oracle implementation.
You can learn more about the Orakl Network from documentation.
Run local data feed connected to testnet.
- Deploy contracts in testnet(baobab)
- Run postgres & redis
- Run orakl-api & orakl-delegator
- Insert deployed data feed & set delegator fee payer
- Run listener, worker, reporter, and fetcher
- Activate inserted data feed
- Docker
brew install docker
brew install docker-compose
- Env setup
Nearly everything is already setup, but there are two variables that should be set manually in following env files:
dockerfiles/local-data-feed/envs/.contracts.env
MNEMONIC="{MNEMONIC for contract deployer wallet}"
dockerfiles/local-data-feed/envs/.cli.env
DELEGATOR_REPORTER_PK={private key for delegator fee payer}
- Docker Compose Build Builds all required images for docker-compose.
docker-compose -f docker-compose.local-data-feed.yaml build
- Docker Compose Up Runs all required images to run datafeed locally.
docker-compose -f docker-compose.local-data-feed.yaml up
- Docker Compose Down Close all related containers.
docker-compose -f docker-compose.local-data-feed.yaml down -v
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:
api
,postgres
,redis
, andjson-rpc
services will start as separate docker containerspostgres
will get populated with necessary data:- chains
- services
- vrf keys in case if the service is vrf
- listener (after contracts are deployed)
- reporter (after contracts are deployed)
- if the chain is
localhost
:- migration files in
contracts/v0.1/migration/
get updated with provided keys and other values contracts/v0.1/hardhat.config.cjs
file gets updated withPROVIDER_URL
- relevant coordinator and prepayment contracts get deployed
- migration files in
To start core microservices (listener, worker, reporter) as a singleton service run:
- production mode
yarn start:core:vrf # or yarn start:core:request_response
- development mode
yarn dev:core:vrf # or yarn dev:core:request_response
The microservices can also be started separately in any arbitrary order by replacing core
in the above commands with either listener
, worker
, or reporter
- node v0.0.1.20240624.0427.15e4017
PR
: OraklNode Websocket dex fetche... - node v0.0.1.20240624.0527.8a67f20
PR
: OraklNode Update fetcher init - sentinel v0.0.1.20240624.0545.3e49d01
PR
: OraklNode Update fetcher init - sentinel v0.0.1.20240624.0757.8096587
PR
: send service is up slack messa... - node v0.0.1.20240624.0815.2b2ed32
PR
: OraklNode Update proxy request - node v0.0.1.20240624.0824.a6ca4ab
PR
: OraklNode Index out of bound p... - node v0.0.1.20240624.2328.3517cf5
PR
: OraklNode Execute local aggreg... - node v0.0.1.20240624.2359.c658e51
PR
: OraklNode Reduce intervals - sentinel v0.0.1.20240625.0255.5673f9d
PR
: Sentinel Add external signers ... - node v0.0.1.20240626.0736.d9a8df4
PR
: OraklNode Rollback klayswap ba... - node v0.0.1.20240626.0926.c3f91cb
PR
: OraklNode Update sync - node v0.0.1.20240627.0431.bac3940
PR
: OraklNode Update klayswap to u...