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

feat: add Base Sepolia as a chain #2708

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions ethers-contract/src/multicall/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ pub const MULTICALL_SUPPORTED_CHAIN_IDS: &[u64] = {
Optimism as u64, // Optimism
OptimismKovan as u64, // Optimism Kovan
OptimismGoerli as u64, // Optimism Görli
OptimismSepolia as u64, // Optimism Sepolia
Base as u64, // Base
BaseGoerli as u64, // Base Görli
BaseSepolia as u64, // Base Sepolia
Arbitrum as u64, // Arbitrum
ArbitrumNova as u64, // Arbitrum Nova
ArbitrumGoerli as u64, // Arbitrum Görli
Expand Down
11 changes: 7 additions & 4 deletions ethers-core/src/types/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ pub enum Chain {

Base = 8453,
BaseGoerli = 84531,
BaseSepolia = 84532,

Linea = 59144,
LineaTestnet = 59140,
Expand Down Expand Up @@ -317,10 +318,9 @@ impl Chain {
// Explicitly exhaustive. See NB above.
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 | Zora | ZoraGoerli | ZoraSepolia => {
return None
}
BaseGoerli | BaseSepolia | ZkSync | ZkSyncTestnet | PolygonZkEvm |
PolygonZkEvmTestnet | Metis | Linea | LineaTestnet | Mantle | MantleTestnet |
Zora | ZoraGoerli | ZoraSepolia => return None,
};

Some(Duration::from_millis(ms))
Expand Down Expand Up @@ -372,6 +372,7 @@ impl Chain {
Holesky |
Base |
BaseGoerli |
BaseSepolia |
Optimism |
OptimismGoerli |
OptimismSepolia |
Expand Down Expand Up @@ -572,6 +573,7 @@ impl Chain {
Base => ("https://api.basescan.org/api", "https://basescan.org"),

BaseGoerli => ("https://api-goerli.basescan.org/api", "https://goerli.basescan.org"),
BaseSepolia => ("https://api-sepolia.basescan.org/api", "https://sepolia.basescan.org"),

ZkSync => {
("https://zksync2-mainnet-explorer.zksync.io/", "https://explorer.zksync.io/")
Expand Down Expand Up @@ -651,6 +653,7 @@ impl Chain {
Mantle |
MantleTestnet |
BaseGoerli |
BaseSepolia |
Gnosis |
Scroll |
ScrollSepolia => "ETHERSCAN_API_KEY",
Expand Down
Loading