1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::ChainSpec;
use alloy_chains::Chain;
use core::fmt::Debug;

/// Trait representing type configuring a chain spec.
pub trait EthChainSpec: Send + Sync + Unpin + Debug + 'static {
    // todo: make chain spec type generic over hardfork
    //type Hardfork: Clone + Copy + 'static;

    /// Chain id.
    fn chain(&self) -> Chain;
}

impl EthChainSpec for ChainSpec {
    fn chain(&self) -> Chain {
        self.chain
    }
}