Skip to content

Commit

Permalink
add linea network
Browse files Browse the repository at this point in the history
  • Loading branch information
Raz0r committed Jun 11, 2024
1 parent 7f64475 commit c1a8bec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/evm/onchain/endpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pub enum Chain {
ZKEVM,
ZkevmTestnet,
BLAST,
LINEA,
LOCAL,
}

Expand Down Expand Up @@ -79,6 +80,7 @@ impl FromStr for Chain {
"zkevm" => Ok(Self::ZKEVM),
"zkevm_testnet" => Ok(Self::ZkevmTestnet),
"blast" => Ok(Self::BLAST),
"linea" => Ok(Self::LINEA),
"local" => Ok(Self::LOCAL),
_ => Err(()),
}
Expand Down Expand Up @@ -123,6 +125,7 @@ impl Chain {
1101 => Self::ZKEVM,
1442 => Self::ZkevmTestnet,
81457 => Self::BLAST,
59144 => Self::LINEA,
31337 => Self::LOCAL,
_ => return Err(anyhow!("Unknown chain id: {}", chain_id)),
})
Expand All @@ -147,6 +150,7 @@ impl Chain {
Chain::ZKEVM => 1101,
Chain::ZkevmTestnet => 1442,
Chain::BLAST => 81457,
Chain::LINEA => 59144,
Chain::LOCAL => 31337,
}
}
Expand All @@ -170,6 +174,7 @@ impl Chain {
Chain::ZKEVM => "zkevm",
Chain::ZkevmTestnet => "zkevm_testnet",
Chain::BLAST => "blast",
Chain::LINEA => "linea",
Chain::LOCAL => "local",
}
.to_string()
Expand Down Expand Up @@ -197,6 +202,7 @@ impl Chain {
Chain::ZKEVM => "https://rpc.ankr.com/polygon_zkevm",
Chain::ZkevmTestnet => "https://rpc.ankr.com/polygon_zkevm_testnet",
Chain::BLAST => "https://rpc.ankr.com/blast",
Chain::LINEA => "https://rpc.ankr.com/linea",
Chain::LOCAL => "http://localhost:8545",
}
.to_string()
Expand All @@ -221,6 +227,7 @@ impl Chain {
Chain::ZKEVM => "https://api-zkevm.polygonscan.com/api",
Chain::ZkevmTestnet => "https://api-testnet-zkevm.polygonscan.com/api",
Chain::BLAST => "https://api.routescan.io/v2/network/mainnet/evm/81457/etherscan",
Chain::LINEA => "https://api.lineascan.build/api",
Chain::LOCAL => "http://localhost:8080/abi/",
}
.to_string()
Expand Down

0 comments on commit c1a8bec

Please sign in to comment.