mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: base sepolia support (#5697)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -10,14 +10,14 @@ use std::{
|
||||
};
|
||||
|
||||
#[cfg(feature = "optimism")]
|
||||
use reth_primitives::{BASE_GOERLI, BASE_MAINNET};
|
||||
use reth_primitives::{BASE_GOERLI, BASE_MAINNET, BASE_SEPOLIA};
|
||||
|
||||
#[cfg(not(feature = "optimism"))]
|
||||
use reth_primitives::{DEV, GOERLI, HOLESKY, MAINNET, SEPOLIA};
|
||||
|
||||
#[cfg(feature = "optimism")]
|
||||
/// Chains supported by op-reth. First value should be used as the default.
|
||||
pub const SUPPORTED_CHAINS: &[&str] = &["base", "base_goerli"];
|
||||
pub const SUPPORTED_CHAINS: &[&str] = &["base", "base_goerli", "base_sepolia"];
|
||||
#[cfg(not(feature = "optimism"))]
|
||||
/// Chains supported by reth. First value should be used as the default.
|
||||
pub const SUPPORTED_CHAINS: &[&str] = &["mainnet", "sepolia", "goerli", "holesky", "dev"];
|
||||
@ -45,6 +45,8 @@ pub fn chain_spec_value_parser(s: &str) -> eyre::Result<Arc<ChainSpec>, eyre::Er
|
||||
#[cfg(feature = "optimism")]
|
||||
"base_goerli" | "base-goerli" => BASE_GOERLI.clone(),
|
||||
#[cfg(feature = "optimism")]
|
||||
"base_sepolia" | "base-sepolia" => BASE_SEPOLIA.clone(),
|
||||
#[cfg(feature = "optimism")]
|
||||
"base" => BASE_MAINNET.clone(),
|
||||
_ => {
|
||||
let raw = fs::read_to_string(PathBuf::from(shellexpand::full(s)?.into_owned()))?;
|
||||
@ -78,6 +80,8 @@ pub fn genesis_value_parser(s: &str) -> eyre::Result<Arc<ChainSpec>, eyre::Error
|
||||
#[cfg(feature = "optimism")]
|
||||
"base_goerli" | "base-goerli" => BASE_GOERLI.clone(),
|
||||
#[cfg(feature = "optimism")]
|
||||
"base_sepolia" | "base-sepolia" => BASE_SEPOLIA.clone(),
|
||||
#[cfg(feature = "optimism")]
|
||||
"base" => BASE_MAINNET.clone(),
|
||||
_ => {
|
||||
// try to read json from path first
|
||||
|
||||
Reference in New Issue
Block a user