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

Commit

Permalink
feat: add Base Sepolia as a chain
Browse files Browse the repository at this point in the history
  • Loading branch information
sevazhidkov committed Jan 7, 2024
1 parent 8421cfd commit 3fefe49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
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

0 comments on commit 3fefe49

Please sign in to comment.