| 468 | } |
| 469 | |
| 470 | fn build_executor<'a>( |
| 471 | db: &'a mut revm::database::State<InMemoryDB>, |
| 472 | receipt_builder: &'a AlloyReceiptBuilder, |
| 473 | base_chain_upgrades: &'a ChainUpgrades, |
| 474 | gas_limit: u64, |
| 475 | jovian_timestamp: u64, |
| 476 | ) -> BaseBlockExecutor< |
| 477 | BaseEvm<&'a mut revm::database::State<InMemoryDB>, NoOpInspector, PrecompilesMap>, |
| 478 | &'a AlloyReceiptBuilder, |
| 479 | &'a ChainUpgrades, |
| 480 | > { |
| 481 | let ctx = Context::base() |
| 482 | .with_db(db) |
| 483 | .with_chain(L1BlockInfo { |
| 484 | operator_fee_scalar: Some(U256::from(2)), |
| 485 | operator_fee_constant: Some(U256::from(50)), |
| 486 | ..Default::default() |
| 487 | }) |
| 488 | .with_block(BlockEnv { |
| 489 | timestamp: U256::from(jovian_timestamp), |
| 490 | gas_limit, |
| 491 | ..Default::default() |
| 492 | }) |
| 493 | .modify_cfg_chained(|cfg| cfg.spec = BaseSpecId::new(BaseUpgrade::Jovian)); |
| 494 | |
| 495 | let evm = ctx.build_with_inspector(NoOpInspector {}); |
| 496 | |
| 497 | BaseBlockExecutor::new( |
| 498 | evm, |
| 499 | BaseBlockExecutionCtx::default(), |
| 500 | base_chain_upgrades, |
| 501 | receipt_builder, |
| 502 | ) |
| 503 | } |
| 504 | |
| 505 | #[test] |
| 506 | fn test_jovian_da_footprint_estimation() { |