Skip to content

Commit 277fa10

Browse files
committed
chore: add watcher for remote pxe
1 parent 70642dd commit 277fa10

File tree

1 file changed

+17
-1
lines changed
  • yarn-project/end-to-end/src/fixtures

1 file changed

+17
-1
lines changed

yarn-project/end-to-end/src/fixtures/utils.ts

+17-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,23 @@ export async function setup(
389389

390390
if (PXE_URL) {
391391
// we are setting up against a remote environment, l1 contracts are assumed to already be deployed
392-
return await setupWithRemoteEnvironment(publisherHdAccount!, config, logger, numberOfAccounts, enableGas);
392+
const remote = await setupWithRemoteEnvironment(publisherHdAccount!, config, logger, numberOfAccounts, enableGas);
393+
394+
const watcher = new Watcher(
395+
new EthCheatCodes(config.l1RpcUrl),
396+
remote.deployL1ContractsValues.l1ContractAddresses.rollupAddress,
397+
remote.deployL1ContractsValues.publicClient,
398+
);
399+
400+
if (!opts.l1BlockTime) {
401+
watcher.start();
402+
}
403+
404+
remote.teardown = async () => {
405+
await watcher.stop();
406+
};
407+
408+
return remote;
393409
}
394410

395411
const deployL1ContractsValues =

0 commit comments

Comments
 (0)