Skip to content

Commit

Permalink
watcher: update supported chains for testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
panoel committed Jan 11, 2024
1 parent 3767816 commit 14752a8
Showing 1 changed file with 63 additions and 28 deletions.
91 changes: 63 additions & 28 deletions watcher/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,74 @@ import { ChainName } from '@certusone/wormhole-sdk/lib/cjs/utils/consts';
import { initDb } from './databases/utils';
import { makeFinalizedWatcher } from './watchers/utils';
import { getNetworkFromEnv } from './utils/environment';
import { NETWORK } from '@wormhole-foundation/wormhole-monitor-common';

initDb();

const supportedChains: ChainName[] = [
'solana',
'ethereum',
'bsc',
'polygon',
'avalanche',
'oasis',
'algorand',
'fantom',
'karura',
'acala',
'klaytn',
'celo',
'moonbeam',
'arbitrum',
'optimism',
'aptos',
'near',
'terra2',
'terra',
'xpla',
'injective',
'sui',
'base',
'sei',
'wormchain',
];

const network = getNetworkFromEnv();

// NOTE: supportedChains is in chainId order

const supportedChains: ChainName[] =
network === NETWORK.TESTNET
? [
// NOTE: The commented out chains are left in there to easily
// identify which chains are not supported on testnet.
'solana',
'ethereum',
// 'terra',
'bsc',
'polygon',
'avalanche',
'oasis',
'algorand',
'fantom',
'karura',
'acala',
'klaytn',
'celo',
// 'near',
'moonbeam',
// 'terra2',
// 'injective',
'sui',
'aptos',
'arbitrum',
'optimism',
'xpla',
'base',
'sei',
// 'wormchain',
]
: [
// This is the list of chains supported in MAINNET.
'solana',
'ethereum',
'terra',
'bsc',
'polygon',
'avalanche',
'oasis',
'algorand',
'fantom',
'karura',
'acala',
'klaytn',
'celo',
'near',
'moonbeam',
'terra2',
'injective',
'sui',
'aptos',
'arbitrum',
'optimism',
'xpla',
'base',
'sei',
'wormchain',
];

for (const chain of supportedChains) {
makeFinalizedWatcher(network, chain).watch();
}

0 comments on commit 14752a8

Please sign in to comment.