Skip to content

Commit

Permalink
feat(network-utils): add check if ChainId is Linea (#580)
Browse files Browse the repository at this point in the history
  • Loading branch information
james-a-morris authored Mar 7, 2024
1 parent 6a2e783 commit 031e514
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@across-protocol/sdk-v2",
"author": "UMA Team",
"version": "0.22.8",
"version": "0.22.9",
"license": "AGPL-3.0",
"homepage": "https://docs.across.to/v/developer-docs/developers/across-sdk",
"files": [
Expand Down
9 changes: 9 additions & 0 deletions src/utils/NetworkUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,12 @@ export function chainIsOPStack(chainId: number): boolean {
export function chainIsArbitrum(chainId: number): boolean {
return [CHAIN_IDs.ARBITRUM, CHAIN_IDs.ARBITRUM_GOERLI, CHAIN_IDs.ARBITRUM_SEPOLIA].includes(chainId);
}

/**
* Determines whether a chain ID is a Linea implementation.
* @param chainId Chain ID to evaluate.
* @returns True if chainId is a Linea chain, otherwise false.
*/
export function chainIsLinea(chainId: number): boolean {
return [CHAIN_IDs.LINEA, CHAIN_IDs.LINEA_GOERLI].includes(chainId);
}

0 comments on commit 031e514

Please sign in to comment.