@@ -9,10 +9,7 @@ use cairo_vm::{
99 hint_processor_utils:: felt_to_usize,
1010 } ,
1111 types:: { exec_scope:: ExecutionScopes , relocatable:: MaybeRelocatable } ,
12- vm:: {
13- errors:: hint_errors:: HintError ,
14- vm_core:: VirtualMachine ,
15- } ,
12+ vm:: { errors:: hint_errors:: HintError , vm_core:: VirtualMachine } ,
1613 Felt252 ,
1714} ;
1815use hints:: vars;
@@ -53,9 +50,9 @@ impl CustomHintProcessor {
5350 let retdata_ptr = get_relocatable_from_var_name ( "retdata" , vm, & hint_data. ids_data , & hint_data. ap_tracking ) ?;
5451 let retdata_size = get_integer_from_var_name ( "retdata_size" , vm, & hint_data. ids_data , & hint_data. ap_tracking ) ?;
5552 let len = felt_to_usize ( & retdata_size) ?;
56-
53+
5754 let cells = vm. get_continuous_range ( retdata_ptr, len) ?;
58-
55+
5956 let mut values: Vec < Felt252 > = Vec :: new ( ) ;
6057 if len > 0 {
6158 // Relocatable pointer at retdata[0]
@@ -79,7 +76,7 @@ impl CustomHintProcessor {
7976 }
8077 }
8178 }
82-
79+
8380 // Write directly to file using the path stored in the hint processor
8481 let json_bytes = serde_json:: to_vec ( & values)
8582 . map_err ( |e| HintError :: CustomHint ( format ! ( "Failed to serialize output preimage: {}" , e) . into_boxed_str ( ) ) ) ?;
@@ -88,7 +85,7 @@ impl CustomHintProcessor {
8885 format ! ( "Failed to write output preimage to {}: {}" , self . output_preimage_path. display( ) , e) . into_boxed_str ( ) ,
8986 )
9087 } ) ?;
91-
88+
9289 Ok ( ( ) )
9390 }
94- }
91+ }
0 commit comments