Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Add Linea Support #2533

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ethers-core/src/types/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ pub enum Chain {
Base = 8453,
BaseGoerli = 84531,

Linea = 59144,
LineaTestnet = 59140,

#[strum(to_string = "zksync")]
Expand Down Expand Up @@ -299,6 +300,7 @@ impl Chain {
Morden | Ropsten | Rinkeby | Goerli | Kovan | XDai | Chiado | Sepolia | Moonbase |
MoonbeamDev | OptimismKovan | Poa | Sokol | Rsk | EmeraldTestnet | Boba | Base |
BaseGoerli | ZkSync | ZkSyncTestnet | PolygonZkEvm | PolygonZkEvmTestnet | Metis |
Linea => return None,
LineaTestnet => return None,
};

Expand Down Expand Up @@ -355,6 +357,7 @@ impl Chain {
ArbitrumGoerli |
ArbitrumNova |
FilecoinMainnet |
Linea |
LineaTestnet |
FilecoinHyperspaceTestnet => false,

Expand Down Expand Up @@ -533,6 +536,7 @@ impl Chain {
"https://zksync2-testnet-explorer.zksync.dev/",
"https://goerli.explorer.zksync.io/",
),
Linea => ("https://api.lineascan.build/api", "https://lineascan.build/"),
LineaTestnet => {
("https://explorer.goerli.linea.build/api", "https://explorer.goerli.linea.build/")
}
Expand Down Expand Up @@ -584,6 +588,7 @@ impl Chain {
CeloAlfajores |
CeloBaklava |
Base |
Linea |
BaseGoerli => "ETHERSCAN_API_KEY",

Avalanche | AvalancheFuji => "SNOWTRACE_API_KEY",
Expand Down
Loading