Skip to content

feat: add get_current_step getter #2031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#### Upcoming Changes

* feat: add get_current_step getter [#2031](https://github.com/lambdaclass/cairo-vm/pull/2031)

* refactor: Clap attribute macros from #[clap(...)] to #[arg(...)] and #[command(...)] in v4.x [#2003] (https://github.com/lambdaclass/cairo-vm/pull/2003)

* fix: Fix `WriteReturnFp` error due to a bad loading of initial gas [#2015](https://github.com/lambdaclass/cairo-vm/pull/2015)
Expand Down
4 changes: 4 additions & 0 deletions vm/src/vm/vm_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,10 @@ impl VirtualMachine {
self.run_context.get_pc()
}

pub fn get_current_step(&self) -> usize {
self.current_step
}

///Gets the integer value corresponding to the Relocatable address
pub fn get_integer(&self, key: Relocatable) -> Result<Cow<Felt252>, MemoryError> {
self.segments.memory.get_integer(key)
Expand Down
Loading