This repository describes how to use Oracle on the Nova network. price feeds are taken from the pyth network.
- Install dependencies
npm install
- Copy the
.env.example
file to.env
and set the values accordingly:DEFAULT_NETWORK
: hardhat default network nameWALLET_PRIVATE_KEY
: deployer's private keyNOVA_RPC
: nova RPC for priceFeedServiceSUPPORT_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 networkTOKEN_*_ADMIN_PK
: the symbol sets the latest price of the walletTOKEN_*_PRICEFEED
: PriceFeed contract address for this symbolTOKEN_*_THRESHOLD
: floating threshold for the updated price of the symbolTOKEN_*_HEARTBEAT
: maximum time difference when updating the price of this symbol
npm run compile
npm run deploy
npm run set:admin
npm run test
npx hardhat upgradePriceFeed --symbol "wETH"
npm run run:priceFeed
pm2 start --name priceFeedService "npm run run:priceFeed"