Implement gasprice on the interpreter

This commit is contained in:
Robin Salen 2023-04-10 10:46:27 -04:00
parent e9cc5632eb
commit 0f3285c33b
No known key found for this signature in database
GPG Key ID: FB87BACFB3CB2007

View File

@ -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))
}