Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/interpreter/src/gas/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ pub const MID: u64 = 8;
pub const HIGH: u64 = 10;
/// Gas cost for JUMPDEST instruction.
pub const JUMPDEST: u64 = 1;
/// Gas cost for SELFDESTRUCT instruction.
pub const SELFDESTRUCT: i64 = 24000;
/// Gas cost for REFUND SELFDESTRUCT instruction.
pub const SELFDESTRUCT_REFUND: i64 = 24000;
/// Gas cost for CREATE instruction.
pub const CREATE: u64 = 32000;
/// Additional gas cost when a call transfers value.
Expand Down
5 changes: 4 additions & 1 deletion crates/interpreter/src/instructions/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,10 @@ pub fn selfdestruct<WIRE: InterpreterTypes, H: Host + ?Sized>(
.is_enabled_in(LONDON)
&& !res.previously_destroyed
{
context.interpreter.gas.record_refund(gas::SELFDESTRUCT)
context
.interpreter
.gas
.record_refund(gas::SELFDESTRUCT_REFUND);
}

context.interpreter.halt(InstructionResult::SelfDestruct);
Expand Down
Loading