Skip to content

Commit

Permalink
Implement EIP-2929 for CALL* instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
yperbasis authored and chfast committed Apr 7, 2021
1 parent 2d331ab commit 23468f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/evmone/instructions_calls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ evmc_status_code call(ExecutionState& state) noexcept

state.stack.push(0); // Assume failure.

if (state.rev >= EVMC_BERLIN && state.host.access_account(dst) == EVMC_ACCESS_COLD)
{
if ((state.gas_left -= instr::additional_cold_account_access_cost) < 0)
return EVMC_OUT_OF_GAS;
}

if (!check_memory(state, input_offset, input_size))
return EVMC_OUT_OF_GAS;

Expand Down

0 comments on commit 23468f8

Please sign in to comment.