Skip to content

Commit

Permalink
Merge pull request #197 from eosnetworkfoundation/elmato/merge-fix-et…
Browse files Browse the repository at this point in the history
…h-call-to-master

[1.0 -> master] Fix eth_call when evm_version>0
  • Loading branch information
elmato committed Aug 21, 2024
2 parents 99edb9b + 86e3ef0 commit 8d92a56
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions silkworm/silkrpc/commands/eth_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,11 @@ awaitable<void> EthereumRpcApi::handle_eth_call(const nlohmann::json& request, s
silkworm::Transaction txn{call.to_transaction()};
if(!txn.from.has_value()) txn.from = evmc::address{0};

auto base_fee_per_gas = block_with_hash->block.header.base_fee_per_gas.value_or(0);
if(txn.max_fee_per_gas == 0 && base_fee_per_gas > 0) {
txn.max_fee_per_gas = base_fee_per_gas;
}

const auto [eos_evm_version, gas_params] = co_await load_gas_parameters(tx_database, chain_config_ptr, block_with_hash->block);

const core::rawdb::DatabaseReader& db_reader =
Expand Down

0 comments on commit 8d92a56

Please sign in to comment.