Skip to content

Commit c20855c

Browse files
author
AztecBot
committed
Merge branch 'next' into merge-train/barretenberg
2 parents 993d369 + d4a2817 commit c20855c

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

yarn-project/end-to-end/src/e2e_p2p/p2p_network.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import type { BootstrapNode } from '@aztec/p2p/bootstrap';
2020
import { createBootstrapNodeFromPrivateKey, getBootstrapNodeEnr } from '@aztec/p2p/test-helpers';
2121
import { tryStop } from '@aztec/stdlib/interfaces/server';
2222
import { TopicType } from '@aztec/stdlib/p2p';
23+
import { TxStatus } from '@aztec/stdlib/tx';
2324
import type { GenesisData } from '@aztec/stdlib/world-state';
2425
import { ZkPassportProofParams } from '@aztec/stdlib/zkpassport';
2526
import { getGenesisValues } from '@aztec/world-state/testing';
@@ -299,10 +300,11 @@ export class P2PNetworkTest {
299300

300301
async setupAccount() {
301302
this.logger.info('Setting up account');
302-
const { deployedAccounts } = await deployAccounts(
303-
1,
304-
this.logger,
305-
)({
303+
const { deployedAccounts } = await deployAccounts(1, this.logger, {
304+
wait: {
305+
waitForStatus: TxStatus.CHECKPOINTED,
306+
},
307+
})({
306308
wallet: this.context.wallet,
307309
initialFundedAccounts: this.context.initialFundedAccounts,
308310
});

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import {
77
BatchCall,
88
type ContractFunctionInteraction,
99
type ContractMethod,
10+
type DeployInteractionWaitOptions,
11+
type DeployOptions,
1012
getContractClassFromArtifact,
1113
waitForProven,
1214
} from '@aztec/aztec.js/contracts';
@@ -834,7 +836,7 @@ export async function ensureAccountContractsPublished(wallet: Wallet, accountsTo
834836
* Returns deployed account data that can be used by tests.
835837
*/
836838
export const deployAccounts =
837-
(numberOfAccounts: number, logger: Logger) =>
839+
(numberOfAccounts: number, logger: Logger, deployOptions?: Partial<DeployOptions<DeployInteractionWaitOptions>>) =>
838840
async ({ wallet, initialFundedAccounts }: { wallet: TestWallet; initialFundedAccounts: InitialAccountData[] }) => {
839841
if (initialFundedAccounts.length < numberOfAccounts) {
840842
throw new Error(`Cannot deploy more than ${initialFundedAccounts.length} initial accounts.`);
@@ -853,6 +855,7 @@ export const deployAccounts =
853855
await deployMethod.send({
854856
from: NO_FROM,
855857
skipClassPublication: i !== 0, // Publish the contract class at most once.
858+
...deployOptions,
856859
});
857860
}
858861

0 commit comments

Comments
 (0)