Skip to content
Merged
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: 3 additions & 1 deletion crates/interpreter/src/instructions/data.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{
gas::{BASE, DATA_LOAD_GAS, VERYLOW},
gas::{cost_per_word, BASE, DATA_LOAD_GAS, VERYLOW},
instructions::utility::read_u16,
interpreter::Interpreter,
primitives::U256,
Expand Down Expand Up @@ -70,6 +70,8 @@ pub fn data_copy<H: Host + ?Sized>(interpreter: &mut Interpreter, _host: &mut H)
let mem_offset = as_usize_or_fail!(interpreter, mem_offset);
resize_memory!(interpreter, mem_offset, size);

gas_or_fail!(interpreter, cost_per_word(size as u64, VERYLOW));

let offset = as_usize_saturated!(offset);
let data = interpreter.contract.bytecode.eof().expect("EOF").data();

Expand Down