We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26f925b commit c53634eCopy full SHA for c53634e
lib/evmone/instructions.hpp
@@ -725,6 +725,12 @@ inline evmc_status_code selfdestruct(ExecutionState& state) noexcept
725
726
const auto beneficiary = intx::be::trunc<evmc::address>(state.stack[0]);
727
728
+ if (state.rev >= EVMC_BERLIN && state.host.access_account(beneficiary) == EVMC_ACCESS_COLD)
729
+ {
730
+ if ((state.gas_left -= instr::cold_account_access_cost) < 0)
731
+ return EVMC_OUT_OF_GAS;
732
+ }
733
+
734
if (state.rev >= EVMC_TANGERINE_WHISTLE)
735
{
736
if (state.rev == EVMC_TANGERINE_WHISTLE || state.host.get_balance(state.msg->destination))
0 commit comments