diff --git a/assets/chains.json b/assets/chains.json index 940df53..e96d290 100644 --- a/assets/chains.json +++ b/assets/chains.json @@ -1044,6 +1044,18 @@ "etherscanBaseUrl": "https://explorer.goerli.linea.build", "etherscanApiKeyName": null }, + "59141": { + "internalId": "LineaSepolia", + "name": "linea-sepolia", + "averageBlocktimeHint": null, + "isLegacy": false, + "supportsShanghai": false, + "isTestnet": true, + "nativeCurrencySymbol": null, + "etherscanApiUrl": "https://api-sepolia.lineascan.build/api", + "etherscanBaseUrl": "https://sepolia.lineascan.build", + "etherscanApiKeyName": "ETHERSCAN_API_KEY" + }, "59144": { "internalId": "Linea", "name": "linea", diff --git a/src/chain.rs b/src/chain.rs index 2edfa33..031f5a6 100644 --- a/src/chain.rs +++ b/src/chain.rs @@ -354,6 +354,12 @@ impl Chain { Self::from_named(NamedChain::LineaGoerli) } + /// Returns the linea sepolia chain. + #[inline] + pub const fn linea_sepolia() -> Self { + Self::from_named(NamedChain::LineaSepolia) + } + /// Returns the mode mainnet chain. #[inline] pub const fn mode() -> Self { diff --git a/src/named.rs b/src/named.rs index 605bb11..aac5d66 100644 --- a/src/named.rs +++ b/src/named.rs @@ -239,6 +239,8 @@ pub enum NamedChain { Linea = 59144, #[cfg_attr(feature = "serde", serde(alias = "linea-goerli"))] LineaGoerli = 59140, + #[cfg_attr(feature = "serde", serde(alias = "linea-sepolia"))] + LineaSepolia = 59141, #[strum(to_string = "zksync")] #[cfg_attr(feature = "serde", serde(alias = "zksync"))] @@ -612,7 +614,7 @@ impl NamedChain { Morden | Ropsten | Rinkeby | Goerli | Kovan | Sepolia | Holesky | MantleTestnet | Moonbase | MoonbeamDev | OptimismKovan | Poa | Sokol | Rsk | EmeraldTestnet | Boba | ZkSync | ZkSyncTestnet | PolygonZkEvm | PolygonZkEvmTestnet | Metis - | Linea | LineaGoerli | KakarotSepolia => return None, + | Linea | LineaGoerli | LineaSepolia | KakarotSepolia => return None, })) } @@ -695,6 +697,7 @@ impl NamedChain { | FilecoinMainnet | Linea | LineaGoerli + | LineaSepolia | FilecoinCalibrationTestnet | Gnosis | Chiado @@ -847,6 +850,7 @@ impl NamedChain { | FilecoinCalibrationTestnet | FraxtalTestnet | LineaGoerli + | LineaSepolia | MantleTestnet | MantleSepolia | MoonbeamDev @@ -1141,6 +1145,9 @@ impl NamedChain { LineaGoerli => { ("https://explorer.goerli.linea.build/api", "https://explorer.goerli.linea.build") } + LineaSepolia => { + ("https://api-sepolia.lineascan.build/api", "https://sepolia.lineascan.build") + } Mantle => ("https://explorer.mantle.xyz/api", "https://explorer.mantle.xyz"), MantleTestnet => { @@ -1292,6 +1299,7 @@ impl NamedChain { | CeloBaklava | Base | Linea + | LineaSepolia | Mantle | MantleTestnet | MantleSepolia @@ -1523,6 +1531,7 @@ mod tests { (Syndr, &["syndr"]), (SyndrSepolia, &["syndr-sepolia"]), (LineaGoerli, &["linea-goerli"]), + (LineaSepolia, &["linea-sepolia"]), (AutonomysNovaTestnet, &["autonomys-nova-testnet"]), (Immutable, &["immutable"]), (ImmutableTestnet, &["immutable-testnet"]),