mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-02-13 18:33:27 +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",
|
0x3e => todo!(), // "RETURNDATACOPY",
|
||||||
0x3f => todo!(), // "EXTCODEHASH",
|
0x3f => todo!(), // "EXTCODEHASH",
|
||||||
0x40 => todo!(), // "BLOCKHASH",
|
0x40 => todo!(), // "BLOCKHASH",
|
||||||
0x41 => todo!(), // "COINBASE",
|
0x41 => self.run_coinbase(), // "COINBASE",
|
||||||
0x42 => self.run_timestamp(), // "TIMESTAMP",
|
0x42 => self.run_timestamp(), // "TIMESTAMP",
|
||||||
0x43 => self.run_number(), // "NUMBER",
|
0x43 => self.run_number(), // "NUMBER",
|
||||||
0x44 => self.run_difficulty(), // "DIFFICULTY",
|
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) {
|
fn run_timestamp(&mut self) {
|
||||||
self.push(self.get_global_metadata_field(GlobalMetadata::BlockTimestamp))
|
self.push(self.get_global_metadata_field(GlobalMetadata::BlockTimestamp))
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user