@aztec/txe 0.0.1-commit.684755437 → 0.0.1-commit.6b113946b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,7 @@ import {
9
9
  AnchorBlockStore,
10
10
  CapsuleStore,
11
11
  ContractStore,
12
+ ContractSyncService,
12
13
  JobCoordinator,
13
14
  NoteService,
14
15
  NoteStore,
@@ -150,6 +151,7 @@ export class TXESession implements TXESessionStateHandler {
150
151
  private chainId: Fr,
151
152
  private version: Fr,
152
153
  private nextBlockTimestamp: bigint,
154
+ private contractSyncService: ContractSyncService,
153
155
  ) {}
154
156
 
155
157
  static async init(contractStore: ContractStore) {
@@ -185,6 +187,9 @@ export class TXESession implements TXESessionStateHandler {
185
187
 
186
188
  const initialJobId = jobCoordinator.beginJob();
187
189
 
190
+ const logger = createLogger('txe:session');
191
+ const contractSyncService = new ContractSyncService(stateMachine.node, contractStore, noteStore, logger);
192
+
188
193
  const topLevelOracleHandler = new TXEOracleTopLevelContext(
189
194
  stateMachine,
190
195
  contractStore,
@@ -201,11 +206,12 @@ export class TXESession implements TXESessionStateHandler {
201
206
  version,
202
207
  chainId,
203
208
  new Map(),
209
+ contractSyncService,
204
210
  );
205
211
  await topLevelOracleHandler.advanceBlocksBy(1);
206
212
 
207
213
  return new TXESession(
208
- createLogger('txe:session'),
214
+ logger,
209
215
  stateMachine,
210
216
  topLevelOracleHandler,
211
217
  contractStore,
@@ -223,6 +229,7 @@ export class TXESession implements TXESessionStateHandler {
223
229
  version,
224
230
  chainId,
225
231
  nextBlockTimestamp,
232
+ contractSyncService,
226
233
  );
227
234
  }
228
235
 
@@ -309,6 +316,7 @@ export class TXESession implements TXESessionStateHandler {
309
316
  this.version,
310
317
  this.chainId,
311
318
  this.authwits,
319
+ this.contractSyncService,
312
320
  );
313
321
 
314
322
  this.state = { name: 'TOP_LEVEL' };
@@ -369,6 +377,7 @@ export class TXESession implements TXESessionStateHandler {
369
377
  contractSyncService: this.stateMachine.contractSyncService,
370
378
  jobId: this.currentJobId,
371
379
  scopes: 'ALL_SCOPES',
380
+ messageContextService: this.stateMachine.messageContextService,
372
381
  });
373
382
 
374
383
  // We store the note and tagging index caches fed into the PrivateExecutionOracle (along with some other auxiliary
@@ -437,6 +446,8 @@ export class TXESession implements TXESessionStateHandler {
437
446
  senderAddressBookStore: this.senderAddressBookStore,
438
447
  capsuleStore: this.capsuleStore,
439
448
  privateEventStore: this.privateEventStore,
449
+ messageContextService: this.stateMachine.messageContextService,
450
+ contractSyncService: this.contractSyncService,
440
451
  jobId: this.currentJobId,
441
452
  scopes: 'ALL_SCOPES',
442
453
  });
@@ -528,6 +539,8 @@ export class TXESession implements TXESessionStateHandler {
528
539
  senderAddressBookStore: this.senderAddressBookStore,
529
540
  capsuleStore: this.capsuleStore,
530
541
  privateEventStore: this.privateEventStore,
542
+ messageContextService: this.stateMachine.messageContextService,
543
+ contractSyncService: this.contractSyncService,
531
544
  jobId: this.currentJobId,
532
545
  scopes,
533
546
  });