mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-02 22:03:07 +00:00
Impl coinbase opcode for interpreter
This commit is contained in:
parent
e3572f1d10
commit
ae8ee27eb8
@ -348,7 +348,7 @@ impl<'a> Interpreter<'a> {
|
||||
0x3e => todo!(), // "RETURNDATACOPY",
|
||||
0x3f => todo!(), // "EXTCODEHASH",
|
||||
0x40 => todo!(), // "BLOCKHASH",
|
||||
0x41 => todo!(), // "COINBASE",
|
||||
0x41 => self.run_coinbase(), // "COINBASE",
|
||||
0x42 => self.run_timestamp(), // "TIMESTAMP",
|
||||
0x43 => self.run_number(), // "NUMBER",
|
||||
0x44 => self.run_difficulty(), // "DIFFICULTY",
|
||||
@ -659,6 +659,10 @@ impl<'a> Interpreter<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
fn run_coinbase(&mut self) {
|
||||
self.push(self.get_global_metadata_field(GlobalMetadata::BlockBeneficiary))
|
||||
}
|
||||
|
||||
fn run_timestamp(&mut self) {
|
||||
self.push(self.get_global_metadata_field(GlobalMetadata::BlockTimestamp))
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user