https://github.com/0xpuddi/qd-oracle
QuarryDraw's on-chain price feed Oracle infrastructure. Oracle Script.
https://github.com/0xpuddi/qd-oracle
javascript oracle script
Last synced: 10 months ago
JSON representation
QuarryDraw's on-chain price feed Oracle infrastructure. Oracle Script.
- Host: GitHub
- URL: https://github.com/0xpuddi/qd-oracle
- Owner: 0xPuddi
- License: mit
- Created: 2023-03-12T15:43:38.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-08T14:06:07.000Z (over 2 years ago)
- Last Synced: 2025-05-17T05:35:46.180Z (about 1 year ago)
- Topics: javascript, oracle, script
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Quarry Draw Oracle
This is a three repo project: Quarry Draw Oracle, [Quarry Draw Oracle Server](https://github.com/Puddi1/QD-OracleServer) and [Quarry Draw Validator Contracts](https://github.com/Puddi1/QD-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](https://github.com/Puddi1/OracleServer) 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](https://github.com/Puddi1/QD-OracleServer)
- `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:
```sh
npm i
```
Then run the Oracle with any js runtime (node):
```sh
node index.js
```