Skip to content

Commit

Permalink
clean up StateInterface
Browse files Browse the repository at this point in the history
  • Loading branch information
joonazan committed Aug 28, 2024
1 parent 47cf096 commit 1855293
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions eravm-stable-interface/src/state_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ pub trait StateInterface {
fn read_register(&self, register: u8) -> (U256, bool);
fn set_register(&mut self, register: u8, value: U256, is_pointer: bool);

fn current_frame(&mut self) -> impl CallframeInterface + '_;
fn number_of_callframes(&self) -> usize;
/// zero is the current frame, one is the frame before that etc.
fn current_frame(&mut self) -> impl CallframeInterface + '_;
fn callframe(&mut self, n: usize) -> impl CallframeInterface + '_;

fn read_heap_byte(&self, heap: HeapId, index: u32) -> u8;
Expand Down Expand Up @@ -135,6 +135,10 @@ impl StateInterface for DummyState {
unimplemented!()
}

fn current_frame(&mut self) -> impl CallframeInterface + '_ {
DummyState
}

fn number_of_callframes(&self) -> usize {
unimplemented!()
}
Expand Down Expand Up @@ -346,6 +350,6 @@ impl CallframeInterface for DummyState {
}

fn last_precompile_cycles(&self) -> usize {
todo!()
unimplemented!()
}
}

0 comments on commit 1855293

Please sign in to comment.