File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1013,9 +1013,20 @@ export class PXE {
10131013 const contractFunctionSimulator = this . #getSimulatorForTx( overrides ) ;
10141014
10151015 if ( hasOverriddenContracts ) {
1016- // Overridden contracts don't have a sync function, so calling sync on them would fail.
1017- // We exclude them so the sync service skips them entirely.
1018- this . contractSyncService . setExcludedFromSync ( jobId , overriddenContracts ) ;
1016+ // Skip sync for overrides whose class isn't published on chain (typically local-only stubs
1017+ // such as account stubs registered via pxe.registerContractClass). Their artifacts may be
1018+ // partial and break sync's nested utility execution. Overrides whose class is published
1019+ // on chain (e.g. fastForwardContractUpdate) have full artifacts and need sync to load
1020+ // pre-existing notes for the contract.
1021+ const stubAddresses = new Set < string > ( ) ;
1022+ for ( const [ addrStr , override ] of Object . entries ( overrides ! . contracts ! ) ) {
1023+ if ( ! ( await this . node . getContractClass ( override . instance . currentContractClassId ) ) ) {
1024+ stubAddresses . add ( addrStr ) ;
1025+ }
1026+ }
1027+ if ( stubAddresses . size > 0 ) {
1028+ this . contractSyncService . setExcludedFromSync ( jobId , stubAddresses ) ;
1029+ }
10191030 }
10201031
10211032 // Execution of private functions only; no proving, and no kernel logic.
You can’t perform that action at this time.
0 commit comments