From 64133eeb2f88732f435b642e6cb367dac75bcbed Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 16 Nov 2023 16:34:19 +0100 Subject: [PATCH] chore: add zora --- src/named.rs | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/named.rs b/src/named.rs index f5cda73..d425573 100644 --- a/src/named.rs +++ b/src/named.rs @@ -155,6 +155,10 @@ pub enum NamedChain { #[strum(to_string = "mantle-testnet")] #[cfg_attr(feature = "serde", serde(alias = "mantle_testnet"))] MantleTestnet = 5001, + + Zora = 7777777, + ZoraGoerli = 999, + ZoraSepolia = 999999999, } // This must be implemented manually so we avoid a conflict with `TryFromPrimitive` where it treats @@ -288,7 +292,9 @@ impl NamedChain { Morden | Ropsten | Rinkeby | Goerli | Kovan | Sepolia | Holesky | Moonbase | MoonbeamDev | OptimismKovan | Poa | Sokol | Rsk | EmeraldTestnet | Boba | Base | BaseGoerli | ZkSync | ZkSyncTestnet | PolygonZkEvm | PolygonZkEvmTestnet | Metis - | Linea | LineaTestnet | Mantle | MantleTestnet => return None, + | Linea | LineaTestnet | Mantle | MantleTestnet | Zora | ZoraGoerli | ZoraSepolia => { + return None + } }; Some(Duration::from_millis(ms)) @@ -354,7 +360,10 @@ impl NamedChain { | LineaTestnet | FilecoinCalibrationTestnet | Gnosis - | Chiado => false, + | Chiado + | Zora + | ZoraGoerli + | ZoraSepolia => false, // Unknown / not applicable, default to false for backwards compatibility Dev | AnvilHardhat | Morden | Ropsten | Rinkeby | Cronos | CronosTestnet | Kovan @@ -551,6 +560,14 @@ impl NamedChain { ("https://explorer.testnet.mantle.xyz/api", "https://explorer.testnet.mantle.xyz") } + Zora => ("https://explorer.zora.energy/api", "https://explorer.zora.energy"), + ZoraGoerli => { + ("https://testnet.explorer.zora.energy/api", "https://testnet.explorer.zora.energy") + } + ZoraSepolia => { + ("https://sepolia.explorer.zora.energy/api", "https://sepolia.explorer.zora.energy") + } + AnvilHardhat | Dev | Morden | MoonbeamDev | FilecoinMainnet => { // this is explicitly exhaustive so we don't forget to add new urls when adding a // new chain @@ -616,7 +633,7 @@ impl NamedChain { Moonbeam | Moonbase | MoonbeamDev | Moonriver => "MOONSCAN_API_KEY", - Canto | CantoTestnet => "BLOCKSCOUT_API_KEY", + Canto | CantoTestnet | Zora | ZoraGoerli | ZoraSepolia => "BLOCKSCOUT_API_KEY", Boba => "BOBASCAN_API_KEY",