Skip to content

Commit

Permalink
Minimal refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianGCalderon committed Dec 18, 2024
1 parent 0e8ca6a commit 8e39701
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions rpc-state-reader/src/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use starknet_api::{

pub fn fetch_block_context(reader: &RpcStateReader) -> anyhow::Result<BlockContext> {
let block_info = reader.get_block_info()?;

let mut versioned_constants =
VersionedConstants::get_versioned_constants(VersionedConstantsOverrides {
validate_max_n_steps: u32::MAX,
Expand All @@ -37,13 +38,14 @@ pub fn fetch_block_context(reader: &RpcStateReader) -> anyhow::Result<BlockConte
"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"
)),
};
let chain_info = ChainInfo {
chain_id: reader.get_chain_id(),
fee_token_addresses,
};

Ok(BlockContext::new(
block_info,
ChainInfo {
chain_id: reader.get_chain_id(),
fee_token_addresses,
},
chain_info,
versioned_constants,
BouncerConfig::max(),
))
Expand Down

0 comments on commit 8e39701

Please sign in to comment.