Need to authorise each exchange oracle. Set up .env with wallet and pkey for contract owner, then run:
node ./oracle-service/index.js add-oracle digifinex 0xd03ea8624C8C5987235048901fB614fDcA89b117Thresholds can be set for each pair:
node ./oracle-service/index.js set-threshold LINK/BTC 0.01Each oracle requires its own .env, with values set for:
EXCHANGE=
WALLET_ADDRESS=
WALLET_PKEY=Once configured, run via cron etc.:
node ./oracle-service/index.js run-oracle
Set up the DB to gather data from contract. Edit common/db/config/config.json and run:
cd common/db
npx sequelize-cli db:migrateRun via pm2
For currency updates:
node backend/index.js --run=watch-event --event=CurrencyUpdateFor discrepancies:
node backend/index.js --run=watch-event --event=DiscrepancyFor WRKCHain block hash submission:
node backend/index.js wrkchainIf ganache-cli is not installed, install with:
npm install -i ganache-cliRun ganache-cli with:
npx ganache-cli --deterministic --accounts=20 --blockTime=15The --deterministic flag will ensure the same keys and accounts are generated
each time
Deploy with:
npx oz deploy