11pub use alloy_eips:: eip1559:: BaseFeeParams ;
22use alloy_evm:: eth:: spec:: EthExecutorSpec ;
33
4+ use crate :: bitfinity_spec:: BitfinitySpec ;
45use crate :: {
56 constants:: { MAINNET_DEPOSIT_CONTRACT , MAINNET_PRUNE_DELETE_LIMIT } ,
67 EthChainSpec ,
@@ -113,7 +114,7 @@ pub static MAINNET: LazyLock<Arc<ChainSpec>> = LazyLock::new(|| {
113114 base_fee_params : BaseFeeParamsKind :: Constant ( BaseFeeParams :: ethereum ( ) ) ,
114115 prune_delete_limit : MAINNET_PRUNE_DELETE_LIMIT ,
115116 blob_params : HardforkBlobParams :: default ( ) ,
116- bitfinity_evm_url : Default :: default ( ) ,
117+ bitfinity_spec : Default :: default ( ) ,
117118 } ;
118119 spec. genesis . config . dao_fork_support = true ;
119120 spec. into ( )
@@ -143,7 +144,7 @@ pub static SEPOLIA: LazyLock<Arc<ChainSpec>> = LazyLock::new(|| {
143144 base_fee_params : BaseFeeParamsKind :: Constant ( BaseFeeParams :: ethereum ( ) ) ,
144145 prune_delete_limit : 10000 ,
145146 blob_params : HardforkBlobParams :: default ( ) ,
146- bitfinity_evm_url : Default :: default ( ) ,
147+ bitfinity_spec : Default :: default ( ) ,
147148 } ;
148149 spec. genesis . config . dao_fork_support = true ;
149150 spec. into ( )
@@ -171,7 +172,7 @@ pub static HOLESKY: LazyLock<Arc<ChainSpec>> = LazyLock::new(|| {
171172 base_fee_params : BaseFeeParamsKind :: Constant ( BaseFeeParams :: ethereum ( ) ) ,
172173 prune_delete_limit : 10000 ,
173174 blob_params : HardforkBlobParams :: default ( ) ,
174- bitfinity_evm_url : Default :: default ( ) ,
175+ bitfinity_spec : Default :: default ( ) ,
175176 } ;
176177 spec. genesis . config . dao_fork_support = true ;
177178 spec. into ( )
@@ -201,7 +202,7 @@ pub static HOODI: LazyLock<Arc<ChainSpec>> = LazyLock::new(|| {
201202 base_fee_params : BaseFeeParamsKind :: Constant ( BaseFeeParams :: ethereum ( ) ) ,
202203 prune_delete_limit : 10000 ,
203204 blob_params : HardforkBlobParams :: default ( ) ,
204- bitfinity_evm_url : Default :: default ( ) ,
205+ bitfinity_spec : Default :: default ( ) ,
205206 } ;
206207 spec. genesis . config . dao_fork_support = true ;
207208 spec. into ( )
@@ -335,9 +336,9 @@ pub struct ChainSpec {
335336
336337 /// The settings passed for blob configurations for specific hardforks.
337338 pub blob_params : HardforkBlobParams ,
338-
339- /// The URL of the Bitfinity EVM RPC endpoint
340- pub bitfinity_evm_url : Option < String > ,
339+
340+ /// Bitfinity Specific Configuration
341+ pub bitfinity_spec : BitfinitySpec ,
341342}
342343
343344impl Default for ChainSpec {
@@ -352,7 +353,7 @@ impl Default for ChainSpec {
352353 base_fee_params : BaseFeeParamsKind :: Constant ( BaseFeeParams :: ethereum ( ) ) ,
353354 prune_delete_limit : MAINNET_PRUNE_DELETE_LIMIT ,
354355 blob_params : Default :: default ( ) ,
355- bitfinity_evm_url : Default :: default ( ) ,
356+ bitfinity_spec : Default :: default ( ) ,
356357 }
357358 }
358359}
@@ -423,7 +424,7 @@ impl ChainSpec {
423424 // given timestamp.
424425 for ( fork, params) in bf_params. iter ( ) . rev ( ) {
425426 if self . hardforks . is_fork_active_at_timestamp ( fork. clone ( ) , timestamp) {
426- return * params
427+ return * params;
427428 }
428429 }
429430
@@ -442,7 +443,7 @@ impl ChainSpec {
442443 // given timestamp.
443444 for ( fork, params) in bf_params. iter ( ) . rev ( ) {
444445 if self . hardforks . is_fork_active_at_block ( fork. clone ( ) , block_number) {
445- return * params
446+ return * params;
446447 }
447448 }
448449
@@ -516,8 +517,8 @@ impl ChainSpec {
516517 // We filter out TTD-based forks w/o a pre-known block since those do not show up in the
517518 // fork filter.
518519 Some ( match condition {
519- ForkCondition :: Block ( block) |
520- ForkCondition :: TTD { fork_block : Some ( block) , .. } => ForkFilterKey :: Block ( block) ,
520+ ForkCondition :: Block ( block)
521+ | ForkCondition :: TTD { fork_block : Some ( block) , .. } => ForkFilterKey :: Block ( block) ,
521522 ForkCondition :: Timestamp ( time) => ForkFilterKey :: Time ( time) ,
522523 _ => return None ,
523524 } )
@@ -544,8 +545,8 @@ impl ChainSpec {
544545 for ( _, cond) in self . hardforks . forks_iter ( ) {
545546 // handle block based forks and the sepolia merge netsplit block edge case (TTD
546547 // ForkCondition with Some(block))
547- if let ForkCondition :: Block ( block) |
548- ForkCondition :: TTD { fork_block : Some ( block) , .. } = cond
548+ if let ForkCondition :: Block ( block)
549+ | ForkCondition :: TTD { fork_block : Some ( block) , .. } = cond
549550 {
550551 if head. number >= block {
551552 // skip duplicated hardforks: hardforks enabled at genesis block
@@ -556,7 +557,7 @@ impl ChainSpec {
556557 } else {
557558 // we can return here because this block fork is not active, so we set the
558559 // `next` value
559- return ForkId { hash : forkhash, next : block }
560+ return ForkId { hash : forkhash, next : block } ;
560561 }
561562 }
562563 }
@@ -578,7 +579,7 @@ impl ChainSpec {
578579 // can safely return here because we have already handled all block forks and
579580 // have handled all active timestamp forks, and set the next value to the
580581 // timestamp that is known but not active yet
581- return ForkId { hash : forkhash, next : timestamp }
582+ return ForkId { hash : forkhash, next : timestamp } ;
582583 }
583584 }
584585
0 commit comments