Skip to content

Commit 4dbc169

Browse files
authored
feat: compress LegacyProgram.debug_info as None (#599)
chore: remove pathfinder bug induced workaround
1 parent bdb2663 commit 4dbc169

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

starknet-core/src/types/contract/legacy.rs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -502,34 +502,20 @@ impl LegacyProgram {
502502
compiler_version: &'a Option<String>,
503503
#[serde_as(as = "Vec<UfeHex>")]
504504
data: &'a Vec<Felt>,
505-
// Needed due to pathfinder bug:
506-
// https://github.com/eqlabs/pathfinder/issues/1371
507-
debug_info: EmptyDebugInfo,
505+
debug_info: Option<()>,
508506
hints: &'a BTreeMap<u64, Vec<LegacyHint>>,
509507
identifiers: &'a BTreeMap<String, LegacyIdentifier>,
510508
main_scope: &'a String,
511509
prime: &'a String,
512510
reference_manager: &'a LegacyReferenceManager,
513511
}
514512

515-
#[derive(Serialize)]
516-
pub struct EmptyDebugInfo {
517-
file_contents: Unit,
518-
instruction_locations: Unit,
519-
}
520-
521-
#[derive(Serialize)]
522-
pub struct Unit {}
523-
524513
let program_json = serde_json::to_string(&ProgramWithoutDebugInfo {
525514
attributes: &self.attributes,
526515
builtins: &self.builtins,
527516
compiler_version: &self.compiler_version,
528517
data: &self.data,
529-
debug_info: EmptyDebugInfo {
530-
file_contents: Unit {},
531-
instruction_locations: Unit {},
532-
},
518+
debug_info: None,
533519
hints: &self.hints,
534520
identifiers: &self.identifiers,
535521
main_scope: &self.main_scope,

0 commit comments

Comments
 (0)