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

Add Scroll mainnet to chain.rs #2648

Merged
merged 1 commit into from
Oct 24, 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
10 changes: 7 additions & 3 deletions ethers-core/src/types/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ pub enum Chain {
Poa = 99,
Sokol = 77,

Scroll = 534352,
ScrollAlphaTestnet = 534353,

Metis = 1088,
Expand Down Expand Up @@ -303,7 +304,7 @@ impl Chain {
Dev | AnvilHardhat => 200,
Celo | CeloAlfajores | CeloBaklava => 5_000,
FilecoinCalibrationTestnet | FilecoinMainnet => 30_000,
ScrollAlphaTestnet => 3_000,
Scroll | ScrollAlphaTestnet => 3_000,
Gnosis | Chiado => 5_000,
// Explicitly exhaustive. See NB above.
Morden | Ropsten | Rinkeby | Goerli | Kovan | Sepolia | Holesky | Moonbase |
Expand Down Expand Up @@ -349,7 +350,8 @@ impl Chain {
Mantle |
MantleTestnet |
PolygonZkEvm |
PolygonZkEvmTestnet => true,
PolygonZkEvmTestnet |
Scroll => true,

// Known EIP-1559 chains
Mainnet |
Expand Down Expand Up @@ -480,6 +482,7 @@ impl Chain {

Gnosis => ("https://api.gnosisscan.io/api", "https://gnosisscan.io"),

Scroll => ("https://scrollscan.com/api", "https://scrollscan.com"),
ScrollAlphaTestnet => {
("https://blockscout.scroll.io/api", "https://blockscout.scroll.io/")
}
Expand Down Expand Up @@ -609,7 +612,8 @@ impl Chain {
Mantle |
MantleTestnet |
BaseGoerli |
Gnosis => "ETHERSCAN_API_KEY",
Gnosis |
Scroll => "ETHERSCAN_API_KEY",

Avalanche | AvalancheFuji => "SNOWTRACE_API_KEY",

Expand Down
Loading