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