Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Oct 24, 2023
1 parent 4bf2806 commit 8e5da66
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions yarn-project/aztec.js/src/contract_deployer/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './contract_deployer.js';
export * from './deploy_sent_tx.js';
13 changes: 8 additions & 5 deletions yarn-project/end-to-end/src/e2e_p2p_network.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
import { ContractDeployer, SentTx, isContractDeployed } from '@aztec/aztec.js';
import { ContractDeployer, DeploySentTx, Wallet, isContractDeployed } from '@aztec/aztec.js';
import { AztecAddress, CompleteAddress, Fr, PublicKey, getContractDeploymentInfo } from '@aztec/circuits.js';
import { Grumpkin } from '@aztec/circuits.js/barretenberg';
import { DebugLogger } from '@aztec/foundation/log';
Expand All @@ -18,16 +18,18 @@ const BOOT_NODE_TCP_PORT = 40400;
interface NodeContext {
node: AztecNodeService;
pxeService: PXEService;
txs: SentTx[];
txs: DeploySentTx[];
account: AztecAddress;
}

describe('e2e_p2p_network', () => {
let config: AztecNodeConfig;
let logger: DebugLogger;
let teardown: () => Promise<void>;
let wallet: Wallet;

beforeEach(async () => {
({ teardown, config, logger } = await setup(0));
({ wallet, teardown, config, logger } = await setup(1));
}, 100_000);

afterEach(() => teardown());
Expand All @@ -52,7 +54,8 @@ describe('e2e_p2p_network', () => {
// now ensure that all txs were successfully mined
for (const context of contexts) {
for (const tx of context.txs) {
const receipt = await tx.wait();
// we pass in wallet to wait(...) because wallet is necessary to create a TS contract instance
const receipt = await tx.wait({ wallet });

expect(receipt.status).toBe(TxStatus.MINED);
const contractAddress = receipt.contractAddress!;
Expand Down Expand Up @@ -112,7 +115,7 @@ describe('e2e_p2p_network', () => {

// submits a set of transactions to the provided Private eXecution Environment (PXE)
const submitTxsTo = async (pxe: PXEService, account: AztecAddress, numTxs: number, publicKey: PublicKey) => {
const txs: SentTx[] = [];
const txs: DeploySentTx[] = [];
for (let i = 0; i < numTxs; i++) {
const salt = Fr.random();
const origin = (await getContractDeploymentInfo(TestContractArtifact, [], salt, publicKey)).completeAddress
Expand Down

0 comments on commit 8e5da66

Please sign in to comment.