@@ -283,9 +283,22 @@ def foundry_view(foundry: Foundry, options: ViewKcfgOptions) -> None:
283283 def _custom_view (elem : KCFGElem ) -> Iterable [str ]:
284284 return custom_view (contract_name , elem , compilation_unit )
285285
286+ omit_cells = []
287+ if options .omit_code_cells :
288+ omit_cells .extend (['<program>' , '<code>' , '<jumpDests>' ])
289+ if options .omit_interim_cells :
290+ omit_cells .extend (['<callStack>' , '<interimStates>' ])
291+ if options .omit_cost_cells :
292+ omit_cells .extend (['<gas>' , '<memoryUsed>' , '<callGas>' , '<refund>' ])
286293 printer = PrettyPrinter (foundry .kevm .definition , patch_symbol_table = KEVM ._kevm_patch_symbol_table )
287- cterm_show = CTermShow (printer .print )
294+ cterm_show = CTermShow (printer .print , omit_labels = omit_cells )
288295 node_printer = foundry_node_printer (foundry , cterm_show , contract_name , proof )
289296
290- viewer = APRProofViewer (proof , foundry .kevm , node_printer = node_printer , custom_view = _custom_view )
297+ viewer = APRProofViewer (
298+ proof ,
299+ foundry .kevm ,
300+ node_printer = node_printer ,
301+ custom_view = _custom_view ,
302+ cterm_show = cterm_show ,
303+ )
291304 viewer .run ()
0 commit comments