Skip to content

Commit

Permalink
Fix trace dump type conv
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianGCalderon committed Oct 14, 2024
1 parent 730809f commit 78ae9c5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,7 @@ pub mod trace_dump {
program_registry::ProgramRegistry,
};
use cairo_lang_utils::ordered_hash_map::OrderedHashMap;
use itertools::Itertools;
use num_bigint::BigInt;
use num_traits::One;
use sierra_emu::{ProgramTrace, StateDump, Value};
Expand Down Expand Up @@ -1015,8 +1016,9 @@ pub mod trace_dump {
todo!("StarkNetTypeConcrete::Secp256Point")
}
StarkNetTypeConcrete::Sha256StateHandle(_) => {
let inner_ptr = value_ptr.cast::<NonNull<()>>().read();
Value::U64(inner_ptr.cast().read())
let raw_data = value_ptr.cast::<NonNull<[u32; 8]>>().read().read();
let data = raw_data.into_iter().map(Value::U32).collect_vec();
Value::Struct(data)
}
_ => unreachable!(),
},
Expand Down

0 comments on commit 78ae9c5

Please sign in to comment.