Skip to content

Commit

Permalink
feat: avalanche network (#796)
Browse files Browse the repository at this point in the history
  • Loading branch information
leoslr authored Mar 7, 2022
1 parent 80b4a7c commit 04d99ff
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default class Erc20FeeProxyPaymentNetwork<
'fantom',
'arbitrum-rinkeby',
'arbitrum-one',
'avalanche',
],
public supportedCurrencyType: RequestLogicTypes.CURRENCY = RequestLogicTypes.CURRENCY.ERC20,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const supportedNetworks = [
'bsc',
'arbitrum-rinkeby',
'arbitrum-one',
'avalanche',
];

/**
Expand Down
1 change: 1 addition & 0 deletions packages/currency/src/chainlink-path-aggregators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const chainlinkCurrencyPairs: Record<string, CurrencyPairs> = {
'arbitrum-rinkeby': {},
'arbitrum-one': {},
xdai: {},
avalanche: {},
};

export const chainlinkSupportedNetworks = Object.keys(chainlinkCurrencyPairs);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const networks: Record<string, ethers.providers.Network> = {
fantom: { chainId: 250, name: 'fantom' },
'arbitrum-rinkeby': { chainId: 421611, name: 'arbitrum-rinkeby' },
'arbitrum-one': { chainId: 42161, name: 'arbitrum-one' },
avalanche: { chainId: 43114, name: 'avalanche' },
};

/**
Expand Down Expand Up @@ -49,6 +50,8 @@ export class MultichainExplorerApiProvider extends ethers.providers.EtherscanPro
return 'https://testnet.arbiscan.io/';
case 'arbitrum-one':
return 'https://api.arbiscan.io';
case 'avalanche':
return 'https://api.snowtrace.io';
default:
return super.getBaseUrl();
}
Expand Down
1 change: 1 addition & 0 deletions packages/payment-detection/src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const networkRpcs: Record<string, string> = {
xdai: 'https://rpc.xdaichain.com/',
'arbitrum-rinkeby': 'https://rinkeby.arbitrum.io/rpc',
'arbitrum-one': 'https://arb1.arbitrum.io/rpc',
avalanche: 'https://api.avax.network/ext/bc/C/rpc',
};

/**
Expand Down

0 comments on commit 04d99ff

Please sign in to comment.