Skip to content

Commit

Permalink
Save sierra
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianGCalderon committed Jan 20, 2025
1 parent 9e8d846 commit 842b0cf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/blockifier/src/execution/native/executor.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::collections::HashMap;
use std::fs::{self, File};
use std::io::Write;
use std::path::PathBuf;
use std::sync::atomic::AtomicU64;
use std::sync::{Arc, Mutex};
Expand Down Expand Up @@ -74,6 +75,10 @@ impl ContractExecutor {
let trace_file = File::create(&trace_path).unwrap();
serde_json::to_writer_pretty(trace_file, &trace).unwrap();

let sierra_path = PathBuf::from(format!("traces/emu/{counter}.json"));
let mut sierra_file = File::create(&sierra_path).unwrap();
write!(sierra_file, "{}", program).unwrap();

let result = sierra_emu::ContractExecutionResult::from_trace(&trace).unwrap();

Ok(ContractExecutionResult {
Expand Down

0 comments on commit 842b0cf

Please sign in to comment.