0xPuddi / QD-Oracle

QuarryDraw's on-chain price feed Oracle infrastructure. Oracle Script.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Quarry Draw Oracle

This is a three repo project: Quarry Draw Oracle, Quarry Draw Oracle Server and Quarry Draw Validator Contracts.

The project consist of an on-chain price feed Oracle.

The Oracle uses a series of GET API endpoints provided by the Quarry Draw Oracle Server to fetch price data, then on a regular time basis it updates the on-chain price.

Usage

Start with adding the environment variables in your .env that are needed in the oracle, where:

  • BASE_URL is the base URL of the Quarry Draw Oracle Server
  • RPC is the blockchain rpc URL the Oracle will send transactions to.
  • ORACLE_WALLET_PRIVATE_KEY is the private key of the wallet the Oracle will use to transact.
  • CONTRACT_ADDRESS is the address of the contract the Oracle will send transactions to.

For syntax example refer to .env.example

Before running the script install all required packages:

npm i

Then run the Oracle with any js runtime (node):

node index.js

About

QuarryDraw's on-chain price feed Oracle infrastructure. Oracle Script.

License:MIT License


Languages

Language:JavaScript 100.0%