@@ -129,16 +129,8 @@ def cut_point_rules(
129
129
break_on_storage : bool ,
130
130
break_on_basic_blocks : bool ,
131
131
break_on_load_program : bool ,
132
- break_on_access_opcode : bool | None = None ,
133
132
) -> list [str ]:
134
- cut_point_rules = ['FOUNDRY-CHEAT-CODES.rename' , 'FOUNDRY-ACCOUNTS.forget' ]
135
- if break_on_access_opcode :
136
- cut_point_rules .extend (
137
- [
138
- 'EVM.call.false' ,
139
- ]
140
- )
141
- return cut_point_rules + KEVMSemantics .cut_point_rules (
133
+ return ['FOUNDRY-CHEAT-CODES.rename' , 'FOUNDRY-ACCOUNTS.forget' ] + KEVMSemantics .cut_point_rules (
142
134
break_on_jumpi ,
143
135
break_on_jump ,
144
136
break_on_calls ,
@@ -397,6 +389,20 @@ def _exec_fetch_account_custom_step(self, subst: Subst, cterm: CTerm, _c: CTermS
397
389
new_cterm = self ._commit_changes_to_cterm (cterm , new_accounts_cell , continuation , target_address )
398
390
return Step (CTerm (new_cterm .config , cterm .constraints ), 1 , (), ['FETCH_ACCOUNT' ], cut = True )
399
391
392
+ def _update_forked_accounts_cell (self , cterm : CTerm , target_address : KToken ) -> KInner :
393
+ """Update the FORKEDACCOUNTS_CELL by adding target_address if it is not already present."""
394
+
395
+ forked_accounts_cell = cterm .cell ('FORKEDACCOUNTS_CELL' )
396
+ account_set_item = KApply ('SetItem' , target_address )
397
+ if forked_accounts_cell == set_empty ():
398
+ forked_accounts : list [KInner ] = [account_set_item ]
399
+ else :
400
+ forked_accounts = flatten_label ('_Set_' , forked_accounts_cell )
401
+ if account_set_item in forked_accounts :
402
+ return forked_accounts_cell
403
+ forked_accounts .append (account_set_item )
404
+ return build_assoc (KApply ('.Set' ), '_Set_' , forked_accounts )
405
+
400
406
def _commit_changes_to_cterm (
401
407
self , cterm : CTerm , new_accounts_cell : KInner , continuation : KSequence , target_address : KToken
402
408
) -> CTerm :
@@ -411,6 +417,7 @@ def _commit_changes_to_cterm(
411
417
412
418
return updated_cterm
413
419
420
+
414
421
def account_already_forked (target_address : KToken , cterm : CTerm ) -> bool :
415
422
"""Check if target_address is part of the FORKEDACCOUNTS_CELL of a CTerm."""
416
423
@@ -423,6 +430,7 @@ def account_already_forked(target_address: KToken, cterm: CTerm) -> bool:
423
430
return True
424
431
return False
425
432
433
+
426
434
def add_to_account_storage (account : KApply , slot : KToken , value : KToken ) -> KApply :
427
435
new_map_item = KApply ('_|->_' , [slot , value ])
428
436
acct_id_cell = account .args [0 ]
0 commit comments