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

Commit

Permalink
update: add Scroll Sepolia and update Scroll and Scroll Alpha Testnets (
Browse files Browse the repository at this point in the history
#2692)

* update: add Scroll Sepolia and update Scroll and Scroll Alpha Testnet URLs

* chore: fmt

---------

Co-authored-by: Matthias Seitz <[email protected]>
  • Loading branch information
dghelm and mattsse authored Nov 30, 2023
1 parent 2e93fa7 commit 59f0df0
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions ethers-core/src/types/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ pub enum Chain {
Poa = 99,
Sokol = 77,

#[serde(alias = "scroll_sepolia", alias = "scroll_sepolia_testnet")]
ScrollSepolia = 534351,
Scroll = 534352,
ScrollAlphaTestnet = 534353,

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

// Known EIP-1559 chains
Mainnet |
Expand Down Expand Up @@ -504,9 +507,12 @@ impl Chain {

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

Scroll => ("https://api.scrollscan.com", "https://scrollscan.com"),
Scroll => ("https://api.scrollscan.com/api", "https://scrollscan.com"),
ScrollSepolia => {
("https://api-sepolia.scrollscan.com/api", "https://sepolia.scrollscan.com")
}
ScrollAlphaTestnet => {
("https://blockscout.scroll.io/api", "https://blockscout.scroll.io/")
("https://alpha-blockscout.scroll.io/api", "https://alpha-blockscout.scroll.io/")
}

Metis => {
Expand Down Expand Up @@ -645,7 +651,8 @@ impl Chain {
MantleTestnet |
BaseGoerli |
Gnosis |
Scroll => "ETHERSCAN_API_KEY",
Scroll |
ScrollSepolia => "ETHERSCAN_API_KEY",

Avalanche | AvalancheFuji => "SNOWTRACE_API_KEY",

Expand Down

0 comments on commit 59f0df0

Please sign in to comment.