@@ -77,8 +77,10 @@ async fn create_counter_account(
7777 client. rng ( ) . fill_bytes ( & mut init_seed) ;
7878
7979 let key_pair = SecretKey :: with_rng ( client. rng ( ) ) ;
80+
8081 // Sync client state to get latest block info
8182 let _sync_summary = client. sync_state ( ) . await . unwrap ( ) ;
83+
8284 let builder = AccountBuilder :: new ( init_seed)
8385 . account_type ( AccountType :: RegularAccountUpdatableCode )
8486 . storage_mode ( AccountStorageMode :: Public )
@@ -100,29 +102,29 @@ pub fn test_counter_contract_local() {
100102 let mut contract_builder = CompilerTestBuilder :: rust_source_cargo_miden (
101103 "../../examples/counter-contract" ,
102104 config. clone ( ) ,
103- [ "--debug=none" . into ( ) ] , // don't include any debug info in the compiled MAST
105+ // ["--debug=none".into()], // don't include any debug info in the compiled MAST
106+ [ ] ,
104107 ) ;
105108 contract_builder. with_release ( true ) ;
106109 let mut contract_test = contract_builder. build ( ) ;
107110 let contract_package = contract_test. compiled_package ( ) ;
108111
109- let bytes = <miden_mast_package:: Package as Clone >:: clone ( & contract_package)
110- . into_mast_artifact ( )
111- . unwrap_library ( )
112- . to_bytes ( ) ;
112+ // let bytes = <miden_mast_package::Package as Clone>::clone(&contract_package)
113+ // .into_mast_artifact()
114+ // .unwrap_library()
115+ // .to_bytes();
113116 // dbg!(bytes.len());
114- assert ! ( bytes. len( ) < 32767 , "expected to fit in 32 KB account update size limit" ) ;
115117
116118 // Compile the counter note
117119 let mut note_builder = CompilerTestBuilder :: rust_source_cargo_miden (
118120 "../../examples/counter-note" ,
119121 config,
120- [ "--debug=none" . into ( ) ] , // don't include any debug info in the compiled MAST
122+ // ["--debug=none".into()], // don't include any debug info in the compiled MAST
123+ [ ] ,
121124 ) ;
122125 note_builder. with_release ( true ) ;
123126 let mut note_test = note_builder. build ( ) ;
124127 let note_package = note_test. compiled_package ( ) ;
125- // dbg!(note_package.unwrap_program().mast_forest().advice_map());
126128
127129 // Use temp_dir for a fresh client store
128130 let temp_dir = temp_dir:: TempDir :: with_prefix ( "test_counter_contract_local_" ) . unwrap ( ) ;
@@ -132,8 +134,6 @@ pub fn test_counter_contract_local() {
132134 // Get a handle to the shared local node
133135 let node_handle = local_node:: get_shared_node ( ) . await . expect ( "Failed to get shared node" ) ;
134136
135- // thread::sleep(Duration::from_secs(10));
136-
137137 let rpc_url = node_handle. rpc_url ( ) . to_string ( ) ;
138138
139139 // Initialize client & keystore
@@ -223,18 +223,15 @@ pub fn test_counter_contract_local() {
223223 // Consume the note to increment the counter
224224 let consume_request = TransactionRequestBuilder :: new ( )
225225 . unauthenticated_input_notes ( [ ( counter_note, None ) ] )
226- // .authenticated_input_notes([(counter_note.id(), None)])
227226 . build ( )
228227 . unwrap ( ) ;
229228
230229 let tx_result =
231230 client. new_transaction ( counter_account. id ( ) , consume_request) . await . unwrap ( ) ;
232-
233231 eprintln ! (
234232 "Consumed counter note tx: https://testnet.midenscan.com/tx/{:?}" ,
235- tx_result. executed_transaction( ) . id( )
233+ & tx_result. executed_transaction( ) . id( )
236234 ) ;
237-
238235 client
239236 . submit_transaction ( tx_result)
240237 . await
0 commit comments