From be905f2b7127155b776f4502bbbc581065f45185 Mon Sep 17 00:00:00 2001 From: Danil Kovtonyuk Date: Fri, 18 Mar 2022 05:19:29 +1000 Subject: [PATCH] fix: mainnet oracles --- package.json | 2 +- src/config/mainnet.ts | 46 +++++++++++++++++++++---------------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 68e3927..4421259 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gas-price-oracle", - "version": "0.4.4", + "version": "0.4.5", "description": "Gas Price Oracle library for Ethereum dApps.", "main": "lib/index.js", "homepage": "https://github.com/peppersec/gas-price-oracle", diff --git a/src/config/mainnet.ts b/src/config/mainnet.ts index 378fb26..2eb350f 100644 --- a/src/config/mainnet.ts +++ b/src/config/mainnet.ts @@ -18,31 +18,31 @@ const etherchain: OffChainOracle = { fastPropertyName: 'fast', standardPropertyName: 'standard', lowPropertyName: 'slow', - denominator: 1, + denominator: 1e9, additionalDataProperty: 'data', }; -const blockscout: OffChainOracle = { - name: 'blockscout', - url: 'https://blockscout.com/eth/mainnet/api/v1/gas-price-oracle', - instantPropertyName: 'fast', - fastPropertyName: 'average', - standardPropertyName: 'slow', - lowPropertyName: 'slow', - denominator: 1, - additionalDataProperty: null, -}; +// const blockscout: OffChainOracle = { +// name: 'blockscout', +// url: 'https://blockscout.com/eth/mainnet/api/v1/gas-price-oracle', +// instantPropertyName: 'fast', +// fastPropertyName: 'average', +// standardPropertyName: 'slow', +// lowPropertyName: 'slow', +// denominator: 1, +// additionalDataProperty: null, +// }; -const anyblock: OffChainOracle = { - name: 'anyblock', - url: 'https://api.anyblock.tools/ethereum/latest-minimum-gasprice', - instantPropertyName: 'instant', - fastPropertyName: 'fast', - standardPropertyName: 'standard', - lowPropertyName: 'slow', - denominator: 1, - additionalDataProperty: null, -}; +// const anyblock: OffChainOracle = { +// name: 'anyblock', +// url: 'https://api.anyblock.tools/ethereum/latest-minimum-gasprice', +// instantPropertyName: 'instant', +// fastPropertyName: 'fast', +// standardPropertyName: 'standard', +// lowPropertyName: 'slow', +// denominator: 1, +// additionalDataProperty: null, +// }; const chainlink: OnChainOracle = { name: 'chainlink', @@ -53,8 +53,8 @@ const chainlink: OnChainOracle = { export const offChainOracles: OffChainOracles = { ethgasstation, - anyblock, - blockscout, + // anyblock, + // blockscout, etherchain, };