Skip to content

Commit

Permalink
fix spec chain_id issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Keszey Dániel authored and Keszey Dániel committed Nov 29, 2024
1 parent aa13828 commit 75ff5b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crates/ethereum/evm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl ConfigureEvmEnv for EthEvmConfig {
},
);

//cfg_env.chain_id = chain_spec.chain().id();
cfg_env.chain_id = chain_spec.chain().id();
cfg_env.perf_analyse_created_bytecodes = AnalysisKind::Analyse;

cfg_env.handler_cfg.spec_id = spec_id;
Expand All @@ -74,8 +74,11 @@ impl ConfigureEvmEnv for EthEvmConfig {
contract: Address,
data: Bytes,
) {
print!("fill_tx_env_system_contract_call: 1");
#[allow(clippy::needless_update)] // side-effect of optimism fields
let chain_id = env.cfg.chain_id;

print!("Dani Chain id:{:?}", chain_id);
let tx = TxEnv {
caller: ChainAddress(chain_id, caller),
transact_to: TransactTo::Call(ChainAddress(chain_id, contract)),
Expand All @@ -101,6 +104,8 @@ impl ConfigureEvmEnv for EthEvmConfig {
};
env.tx = tx;

print!("fill_tx_env_system_contract_call: 2");

// ensure the block gas limit is >= the tx
env.block.gas_limit = U256::from(env.tx.gas_limit);

Expand Down

0 comments on commit 75ff5b4

Please sign in to comment.