Skip to content

Commit

Permalink
Add Mode and Mantle chains
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoalencar committed Nov 14, 2024
1 parent c541a45 commit f72a8be
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
2 changes: 2 additions & 0 deletions env.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ RPC_URL_SCROLL=
RPC_URL_BASE=
RPC_URL_BLAST=
RPC_URL_LINEA=
RPC_URL_MODE=
RPC_URL_MANTLE=
24 changes: 13 additions & 11 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ const supportedChains: Map = {
59144: { name: 'Linea' },
81457: { name: 'Blast' },
534352: { name: 'Scroll' },
34443: { name: 'Mode' },
5000: { name: 'Mantle' },
};

interface BridgeContract {
Expand Down Expand Up @@ -142,10 +144,10 @@ export const SCRAPER_MODE: ScraperMode =
process.env.SCRAPER_MODE === undefined
? DEFAULT_SCRAPER_MODE
: process.env.SCRAPER_MODE === 'BLOCKS'
? 'BLOCKS'
: process.env.SCRAPER_MODE === 'EVENTS'
? 'EVENTS'
: throwError('Wrong SCRAPER_MODE');
? 'BLOCKS'
: process.env.SCRAPER_MODE === 'EVENTS'
? 'EVENTS'
: throwError('Wrong SCRAPER_MODE');
export const METRICS_PATH = process.env.METRICS_PATH || DEFAULT_METRICS_PATH;

export const PROMETHEUS_PORT = getIntConfig('PROMETHEUS_PORT', DEFAULT_PROMETHEUS_PORT);
Expand Down Expand Up @@ -386,13 +388,13 @@ export const FEAT_UNISWAP_V2_PAIR_CREATED_EVENT = getBoolConfig(
export const UNISWAP_V2_PAIR_CREATED_PROTOCOL_CONTRACT_ADDRESSES_AND_START_BLOCKS = process.env
.UNISWAP_V2_PAIR_CREATED_PROTOCOL_CONTRACT_ADDRESSES_AND_START_BLOCKS
? process.env.UNISWAP_V2_PAIR_CREATED_PROTOCOL_CONTRACT_ADDRESSES_AND_START_BLOCKS.split(',').map((contract) => {
const [name, factoryAddress, startBlock] = contract.split(':');
return {
name,
factoryAddress,
startBlock: parseInt(startBlock),
};
})
const [name, factoryAddress, startBlock] = contract.split(':');
return {
name,
factoryAddress,
startBlock: parseInt(startBlock),
};
})
: [];

if (
Expand Down

0 comments on commit f72a8be

Please sign in to comment.