remove Arbitrum
This commit is contained in:
parent
be905f2b71
commit
d65b3dfe6c
@ -34,12 +34,6 @@ Current offchain list:
|
|||||||
|
|
||||||
- https://gasstation-mainnet.matic.network/
|
- https://gasstation-mainnet.matic.network/
|
||||||
|
|
||||||
### Arbitrum One
|
|
||||||
|
|
||||||
Current offchain list:
|
|
||||||
|
|
||||||
- https://ztake.org/
|
|
||||||
|
|
||||||
### Avalanche Mainnet
|
### Avalanche Mainnet
|
||||||
|
|
||||||
Current offchain list:
|
Current offchain list:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gas-price-oracle",
|
"name": "gas-price-oracle",
|
||||||
"version": "0.4.5",
|
"version": "0.4.6",
|
||||||
"description": "Gas Price Oracle library for Ethereum dApps.",
|
"description": "Gas Price Oracle library for Ethereum dApps.",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"homepage": "https://github.com/peppersec/gas-price-oracle",
|
"homepage": "https://github.com/peppersec/gas-price-oracle",
|
||||||
|
@ -1,23 +0,0 @@
|
|||||||
import { OffChainOracle, OffChainOracles, OnChainOracles } from '../types';
|
|
||||||
|
|
||||||
const ztake: OffChainOracle = {
|
|
||||||
name: 'ztake',
|
|
||||||
url: 'https://blockchains.ztake.org/api/h6WnmwNqw9CAJHzej5W4gD6LZ9n7v8EK/gasprice/arb/',
|
|
||||||
instantPropertyName: 'percentile_90',
|
|
||||||
fastPropertyName: 'percentile_80',
|
|
||||||
standardPropertyName: 'percentile_60',
|
|
||||||
lowPropertyName: 'percentile_30',
|
|
||||||
denominator: 1,
|
|
||||||
additionalDataProperty: null,
|
|
||||||
};
|
|
||||||
|
|
||||||
export const offChainOracles: OffChainOracles = {
|
|
||||||
ztake,
|
|
||||||
};
|
|
||||||
|
|
||||||
export const onChainOracles: OnChainOracles = {};
|
|
||||||
|
|
||||||
export default {
|
|
||||||
offChainOracles,
|
|
||||||
onChainOracles,
|
|
||||||
};
|
|
@ -4,7 +4,6 @@ import mainnetOracles from './mainnet';
|
|||||||
import bscOracles from './bsc';
|
import bscOracles from './bsc';
|
||||||
import xdaiOracles from './xdai';
|
import xdaiOracles from './xdai';
|
||||||
import polygonOracles from './polygon';
|
import polygonOracles from './polygon';
|
||||||
import arbitrumOracles from './arbitrum';
|
|
||||||
import avalancheOracles from './avalanche';
|
import avalancheOracles from './avalanche';
|
||||||
|
|
||||||
export enum ChainId {
|
export enum ChainId {
|
||||||
@ -12,7 +11,6 @@ export enum ChainId {
|
|||||||
BSC = 56,
|
BSC = 56,
|
||||||
XDAI = 100,
|
XDAI = 100,
|
||||||
POLYGON = 137,
|
POLYGON = 137,
|
||||||
ARBITRUM = 42161,
|
|
||||||
AVALANCHE = 43114,
|
AVALANCHE = 43114,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -21,6 +19,5 @@ export const NETWORKS: NetworkConfig = {
|
|||||||
[ChainId.BSC]: bscOracles,
|
[ChainId.BSC]: bscOracles,
|
||||||
[ChainId.XDAI]: xdaiOracles,
|
[ChainId.XDAI]: xdaiOracles,
|
||||||
[ChainId.POLYGON]: polygonOracles,
|
[ChainId.POLYGON]: polygonOracles,
|
||||||
[ChainId.ARBITRUM]: arbitrumOracles,
|
|
||||||
[ChainId.AVALANCHE]: avalancheOracles,
|
[ChainId.AVALANCHE]: avalancheOracles,
|
||||||
};
|
};
|
||||||
|
@ -285,12 +285,7 @@ describe('normalize result values', function () {
|
|||||||
|
|
||||||
it('rpc fallback should be normalized', async function () {
|
it('rpc fallback should be normalized', async function () {
|
||||||
const { GasPriceOracle } = require('../src/index');
|
const { GasPriceOracle } = require('../src/index');
|
||||||
oracle = new GasPriceOracle({ chainId: ChainId.ARBITRUM, defaultRpc: 'https://arb1.arbitrum.io/rpc' });
|
oracle = new GasPriceOracle({ chainId: 42161, defaultRpc: 'https://arb1.arbitrum.io/rpc' });
|
||||||
|
|
||||||
const { onChainOracles, offChainOracles } = oracle;
|
|
||||||
|
|
||||||
Object.keys(onChainOracles).forEach(chainOracle => oracle.removeOnChainOracle(chainOracle));
|
|
||||||
Object.keys(offChainOracles).forEach(chainOracle => oracle.removeOffChainOracle(chainOracle));
|
|
||||||
|
|
||||||
const gas = await oracle.gasPrices();
|
const gas = await oracle.gasPrices();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user