From 1b6994c2871005461a4872eacd39c59460a7318c Mon Sep 17 00:00:00 2001 From: CruzMolina <7537712+CruzMolina@users.noreply.github.com> Date: Thu, 25 Jan 2024 08:42:17 -0800 Subject: [PATCH] feat: add blast sepolia --- assets/chains.json | 12 ++++++++++++ src/chain.rs | 6 ++++++ src/named.rs | 12 ++++++++++++ 3 files changed, 30 insertions(+) diff --git a/assets/chains.json b/assets/chains.json index bcf9fb0..415e98c 100644 --- a/assets/chains.json +++ b/assets/chains.json @@ -852,6 +852,18 @@ "etherscanBaseUrl": "https://sepolia-optimism.etherscan.io", "etherscanApiKeyName": "ETHERSCAN_API_KEY" }, + "168587773": { + "internalId": "BlastSepolia", + "name": "blast-sepolia", + "averageBlocktimeHint": 2000, + "isLegacy": false, + "supportsShanghai": true, + "isTestnet": true, + "nativeCurrencySymbol": null, + "etherscanApiUrl": "https://api.routescan.io/v2/network/testnet/evm/168587773/etherscan", + "etherscanBaseUrl": "https://testnet.blastscan.io", + "etherscanApiKeyName": "ETHERSCAN_API_KEY" + }, "999999999": { "internalId": "ZoraSepolia", "name": "zora-sepolia", diff --git a/src/chain.rs b/src/chain.rs index 1406d22..3d43548 100644 --- a/src/chain.rs +++ b/src/chain.rs @@ -298,6 +298,12 @@ impl Chain { Self::from_named(NamedChain::Base) } + /// Returns the blast sepolia chain. + #[inline] + pub const fn blast_sepolia() -> Self { + Self::from_named(NamedChain::BlastSepolia) + } + /// Returns the dev chain. #[inline] pub const fn dev() -> Self { diff --git a/src/named.rs b/src/named.rs index 0b81777..e2dbf36 100644 --- a/src/named.rs +++ b/src/named.rs @@ -148,6 +148,8 @@ pub enum NamedChain { BaseGoerli = 84531, BaseSepolia = 84532, + BlastSepolia = 168587773, + Linea = 59144, LineaTestnet = 59140, @@ -321,6 +323,7 @@ impl NamedChain { | C::Base | C::BaseGoerli | C::BaseSepolia + | C::BlastSepolia | C::Zora | C::ZoraGoerli | C::ZoraSepolia @@ -434,6 +437,7 @@ impl NamedChain { | C::Base | C::BaseGoerli | C::BaseSepolia + | C::BlastSepolia | C::Optimism | C::OptimismGoerli | C::OptimismSepolia @@ -499,6 +503,7 @@ impl NamedChain { | C::Base | C::BaseGoerli | C::BaseSepolia + | C::BlastSepolia | C::Gnosis | C::Chiado | C::ZoraSepolia @@ -536,6 +541,7 @@ impl NamedChain { | C::AvalancheFuji | C::BaseGoerli | C::BaseSepolia + | C::BlastSepolia | C::BinanceSmartChainTestnet | C::CantoTestnet | C::CronosTestnet @@ -797,6 +803,11 @@ impl NamedChain { ("https://api-sepolia.basescan.org/api", "https://sepolia.basescan.org") } + C::BlastSepolia => ( + "https://api.routescan.io/v2/network/testnet/evm/168587773/etherscan", + "https://testnet.blastscan.io", + ), + C::ZkSync => { ("https://zksync2-mainnet-explorer.zksync.io", "https://explorer.zksync.io") } @@ -884,6 +895,7 @@ impl NamedChain { | C::MantleTestnet | C::BaseGoerli | C::BaseSepolia + | C::BlastSepolia | C::Gnosis | C::Scroll | C::ScrollSepolia => "ETHERSCAN_API_KEY",