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

Commit

Permalink
feat: Add Mode & Mode Sepolia (#2720)
Browse files Browse the repository at this point in the history
  • Loading branch information
zilayo authored Jan 31, 2024
1 parent e7c3320 commit 584d0ff
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions ethers-contract/src/multicall/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,6 @@ pub const MULTICALL_SUPPORTED_CHAIN_IDS: &[u64] = {
321, // KCC
106, // Velas
40, // Telos
Mode as u64, // Mode Mainnet
]
};
16 changes: 15 additions & 1 deletion ethers-core/src/types/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ pub enum Chain {
Zora = 7777777,
ZoraGoerli = 999,
ZoraSepolia = 999999999,

Mode = 34443,
ModeSepolia = 919,
}

// === impl Chain ===
Expand Down Expand Up @@ -318,6 +321,7 @@ impl Chain {
Scroll | ScrollSepolia | ScrollAlphaTestnet => 3_000,
Gnosis | Chiado => 5_000,
Viction => 2_000,
Mode | ModeSepolia => 2_000,
// Explicitly exhaustive. See NB above.
Morden | Ropsten | Rinkeby | Goerli | Kovan | Sepolia | Holesky | Moonbase |
MoonbeamDev | OptimismKovan | Poa | Sokol | Rsk | EmeraldTestnet | Boba | Base |
Expand Down Expand Up @@ -394,6 +398,8 @@ impl Chain {
FilecoinCalibrationTestnet |
Gnosis |
Chiado |
Mode |
ModeSepolia |
Zora |
ZoraGoerli |
ZoraSepolia => false,
Expand Down Expand Up @@ -609,6 +615,12 @@ impl Chain {
return None
}
Viction => ("https://www.vicscan.xyz/api", "https://www.vicscan.xyz"),

Mode => ("https://explorer.mode.network/api", "https://explorer.mode.network"),
ModeSepolia => (
"https://sepolia.explorer.mode.network/api",
"https://sepolia.explorer.mode.network",
),
};

Some(urls)
Expand Down Expand Up @@ -671,7 +683,9 @@ impl Chain {

Moonbeam | Moonbase | MoonbeamDev | Moonriver => "MOONSCAN_API_KEY",

Canto | CantoTestnet | Zora | ZoraGoerli | ZoraSepolia => "BLOCKSCOUT_API_KEY",
Canto | CantoTestnet | Zora | ZoraGoerli | ZoraSepolia | Mode | ModeSepolia => {
"BLOCKSCOUT_API_KEY"
}

Boba => "BOBASCAN_API_KEY",

Expand Down

0 comments on commit 584d0ff

Please sign in to comment.