diff --git a/evm/src/cpu/kernel/interpreter.rs b/evm/src/cpu/kernel/interpreter.rs index 469c290a..987141ef 100644 --- a/evm/src/cpu/kernel/interpreter.rs +++ b/evm/src/cpu/kernel/interpreter.rs @@ -342,7 +342,7 @@ impl<'a> Interpreter<'a> { 0x37 => self.run_calldatacopy(), // "CALLDATACOPY", 0x38 => todo!(), // "CODESIZE", 0x39 => todo!(), // "CODECOPY", - 0x3a => todo!(), // "GASPRICE", + 0x3a => self.run_gasprice(), // "GASPRICE", 0x3b => todo!(), // "EXTCODESIZE", 0x3c => todo!(), // "EXTCODECOPY", 0x3d => todo!(), // "RETURNDATASIZE", @@ -804,6 +804,10 @@ impl<'a> Interpreter<'a> { } } + fn run_gasprice(&mut self) { + self.push(self.get_txn_field(NormalizedTxnField::ComputedFeePerGas)) + } + fn run_coinbase(&mut self) { self.push(self.get_global_metadata_field(GlobalMetadata::BlockBeneficiary)) }