Skip to content

Commit

Permalink
Merge branch 'master' into request-node-dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-abrioux committed Feb 10, 2022
2 parents 307496f + c2fe1f9 commit 64bab90
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/currency/src/chainlink-path-aggregators.ts
Expand Up @@ -21,6 +21,7 @@ export const chainlinkCurrencyPairs: Record<string, CurrencyPairs> = {
// Could be improved by removing the supported network check from the protocol
'arbitrum-rinkeby': {},
'arbitrum-one': {},
xdai: {},
};

export const chainlinkSupportedNetworks = Object.keys(chainlinkCurrencyPairs);
Expand Down
Expand Up @@ -5,6 +5,8 @@ const networks: Record<string, ethers.providers.Network> = {
fuse: { chainId: 122, name: 'fuse' },
celo: { chainId: 42220, name: 'celo' },
fantom: { chainId: 250, name: 'fantom' },
'arbitrum-rinkeby': { chainId: 421611, name: 'arbitrum-rinkeby' },
'arbitrum-one': { chainId: 42161, name: 'arbitrum-one' },
};

/**
Expand Down Expand Up @@ -43,6 +45,10 @@ export class MultichainExplorerApiProvider extends ethers.providers.EtherscanPro
return 'https://explorer.mainnet.near.org';
case 'aurora-testnet':
return 'https://explorer.testnet.near.org';
case 'arbitrum-rinkeby':
return 'https://testnet.arbiscan.io/';
case 'arbitrum-one':
return 'https://arbiscan.io/';
default:
return super.getBaseUrl();
}
Expand Down
7 changes: 4 additions & 3 deletions packages/toolbox/src/commands/chainlink/aggregatorsUtils.ts
Expand Up @@ -31,6 +31,7 @@ const feedMap: Record<string, [chainKey: string, networkName: string]> = {
rinkeby: ['ethereum-addresses', 'Rinkeby Testnet'],
fantom: ['fantom-price-feeds', 'Fantom Mainnet'],
matic: ['matic-addresses', 'Polygon Mainnet'],
xdai: ['data-feeds-gnosis-chain', 'Gnosis Chain Mainnet'],
};

export const getAvailableAggregators = async (
Expand All @@ -46,12 +47,12 @@ export const getAvailableAggregators = async (
'https://cl-docs-addresses.web.app/addresses.json',
);

const mainnetProxies = data[feedName].networks.find((x) => x.name === networkName)?.proxies;
if (!mainnetProxies) {
const proxies = data[feedName].networks.find((x) => x.name === networkName)?.proxies;
if (!proxies) {
throw new Error(`not proxies for feed ${feedName} > ${networkName}`);
}
const missingAggregators: Aggregator[] = [];
for (const proxy of mainnetProxies) {
for (const proxy of proxies) {
const [from, to] = proxy.pair.split(' / ');
const fromCurrency = cm.from(from);
const toCurrency = cm.from(to);
Expand Down

0 comments on commit 64bab90

Please sign in to comment.