implement block.number and block.timestamp

Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
xermicus
2024-05-07 18:03:17 +02:00
parent a7318f2ef6
commit 95ff85c6d1
20 changed files with 295 additions and 83 deletions
+1 -1
View File
@@ -7,4 +7,4 @@ edition = "2021"
[dependencies]
evm-interpreter = { workspace = true }
primitive-types = { workspace = true }
primitive-types = { workspace = true }
+2 -2
View File
@@ -16,13 +16,13 @@ impl RuntimeEnvironment for UnimplementedHandler {
unimplemented!()
}
fn block_number(&self) -> U256 {
unimplemented!()
U256::from(123)
}
fn block_coinbase(&self) -> H160 {
unimplemented!()
}
fn block_timestamp(&self) -> U256 {
unimplemented!()
U256::from(456)
}
fn block_difficulty(&self) -> U256 {
unimplemented!()