Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/devnet-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
# wait for port-forwards to establish
sleep 5

docker run --rm --network host $AZTEC_DOCKER_IMAGE bootstrap-network \
docker run --rm --network host $AZTEC_DOCKER_IMAGE node ./aztec/dest/bin/index.js bootstrap-network \
--rpc-url http://127.0.0.1:$PXE_PORT \
--l1-rpc-urls http://127.0.0.1:$ETHEREUM_PORT \
--l1-chain-id "$L1_CHAIN_ID" \
Expand Down
1 change: 1 addition & 0 deletions spartan/aztec-network/values/release-devnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ aztec:
realProofs: false
extraAccounts: 9
extraAccountsStartIndex: 69
sponsoredFPC: true

jobs:
deployL1Verifier:
Expand Down
27 changes: 16 additions & 11 deletions yarn-project/accounts/src/testing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @packageDocumentation
*/
import type { PXE } from '@aztec/aztec.js';
import { AccountManager, type PXE } from '@aztec/aztec.js';
import type { AccountWalletWithSecretKey } from '@aztec/aztec.js/wallet';

import {
Expand Down Expand Up @@ -47,22 +47,27 @@ export function getInitialTestAccounts(): Promise<InitialAccountData[]> {
);
}

/**
* Gets a collection of account managers for the Aztec accounts that are initially stored in the test environment.
* @param pxe - PXE instance.
* @returns A set of AccountManager implementations for each of the initial accounts.
*/
export function getInitialTestAccountsManagers(pxe: PXE): Promise<AccountManager[]> {
return Promise.all(
INITIAL_TEST_SECRET_KEYS.map((encryptionKey, i) =>
getSchnorrAccount(pxe, encryptionKey!, INITIAL_TEST_SIGNING_KEYS[i]!, INITIAL_TEST_ACCOUNT_SALTS[i]),
),
);
}

/**
* Gets a collection of wallets for the Aztec accounts that are initially stored in the test environment.
* @param pxe - PXE instance.
* @returns A set of AccountWallet implementations for each of the initial accounts.
*/
export function getInitialTestAccountsWallets(pxe: PXE): Promise<AccountWalletWithSecretKey[]> {
export async function getInitialTestAccountsWallets(pxe: PXE): Promise<AccountWalletWithSecretKey[]> {
return Promise.all(
INITIAL_TEST_SECRET_KEYS.map(async (encryptionKey, i) => {
const account = await getSchnorrAccount(
pxe,
encryptionKey!,
INITIAL_TEST_SIGNING_KEYS[i]!,
INITIAL_TEST_ACCOUNT_SALTS[i],
);
return account.getWallet();
}),
(await Promise.all(await getInitialTestAccountsManagers(pxe))).map(accountManager => accountManager.getWallet()),
);
}

Expand Down
9 changes: 7 additions & 2 deletions yarn-project/cli/src/cmds/devnet/bootstrap_network.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getDeployedTestAccountsWallets } from '@aztec/accounts/testing';
import { getInitialTestAccountsManagers } from '@aztec/accounts/testing';
import {
AztecAddress,
BatchCall,
Expand Down Expand Up @@ -54,7 +54,12 @@ export async function bootstrapNetwork(
) {
const pxe = await createCompatibleClient(pxeUrl, debugLog);

const [wallet] = await getDeployedTestAccountsWallets(pxe);
// We assume here that the initial test accounts were prefunded with deploy-l1-contracts, and deployed with setup-l2-contracts
// so all we need to do is register them to our pxe.
const [accountManager] = await getInitialTestAccountsManagers(pxe);
await accountManager.register();

const wallet = await accountManager.getWallet();

const l1Clients = createL1Clients(
l1Urls,
Expand Down
Loading