Skip to content

zkLinkProtocol/zklink-nova-oracle

Repository files navigation

zklink-nova-oracle

This repository describes how to use Oracle on the Nova network. price feeds are taken from the pyth network.

Prereqs

  1. Install dependencies
npm install
  1. Copy the .env.example file to .env and set the values accordingly:
    • DEFAULT_NETWORK: hardhat default network name
    • WALLET_PRIVATE_KEY: deployer's private key
    • NOVA_RPC: nova RPC for priceFeedService
    • SUPPORT_TOKEN_IDS: oracle supported Token identifiers, separated by , for example: 1,2,3
    • TOKEN_*_SYMBOL: token symbol, for example: ETH
    • TOKEN_*_PRICEFEED_ID: the symbol identifies the price feed on the pyth network
    • TOKEN_*_ADMIN_PK: the symbol sets the latest price of the wallet
    • TOKEN_*_PRICEFEED: PriceFeed contract address for this symbol
    • TOKEN_*_THRESHOLD: floating threshold for the updated price of the symbol
    • TOKEN_*_HEARTBEAT: maximum time difference when updating the price of this symbol

Deploy

Compile

npm run compile

Depoly

npm run deploy

Set admin

npm run set:admin

Test

npm run test

Upgrade

npx hardhat upgradePriceFeed --symbol "wETH"

Start service

Local

npm run run:priceFeed

pm2

pm2 start --name priceFeedService "npm run run:priceFeed"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published