Skip to content

Conversation

@NikolasHaimerl
Copy link
Contributor

@linear
Copy link

linear bot commented Nov 17, 2025

Comment on lines 28 to 42

export const isTestnet = (chainId: number): boolean => {
return (
chainId === CHAIN_IDs.ARBITRUM_SEPOLIA ||
chainId === CHAIN_IDs.HYPEREVM_TESTNET ||
chainId === CHAIN_IDs.BASE_SEPOLIA ||
chainId === CHAIN_IDs.BLAST_SEPOLIA ||
chainId === CHAIN_IDs.LISK_SEPOLIA ||
chainId === CHAIN_IDs.MODE_SEPOLIA ||
chainId === CHAIN_IDs.OPTIMISM_SEPOLIA ||
chainId === CHAIN_IDs.POLYGON_AMOY ||
chainId === CHAIN_IDs.SEPOLIA ||
chainId === CHAIN_IDs.SOLANA_DEVNET
);
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some of these mappings/definitions are already in the constants package and the check can be reduced to smth like

import {
  PRODUCTION_NETWORKS,
  TEST_NETWORKS,
} from "@across-protocol/constants";

const isMainnet = chainId in PRODUCTION_NETWORKS
const isTestnet = chainId in TEST_NETWORKS

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point, thanks.
I'll make that change

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in ae3d08d

@NikolasHaimerl NikolasHaimerl merged commit 3717801 into stage Nov 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants