diff --git a/.github/workflows/devnet-deploy.yml b/.github/workflows/devnet-deploy.yml index 63bd400da0c0..7735cc29aa75 100644 --- a/.github/workflows/devnet-deploy.yml +++ b/.github/workflows/devnet-deploy.yml @@ -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" \ diff --git a/spartan/aztec-network/values/release-devnet.yaml b/spartan/aztec-network/values/release-devnet.yaml index 994c63bb5174..ff50d06974d0 100644 --- a/spartan/aztec-network/values/release-devnet.yaml +++ b/spartan/aztec-network/values/release-devnet.yaml @@ -32,6 +32,7 @@ aztec: realProofs: false extraAccounts: 9 extraAccountsStartIndex: 69 + sponsoredFPC: true jobs: deployL1Verifier: diff --git a/yarn-project/accounts/src/testing/index.ts b/yarn-project/accounts/src/testing/index.ts index 8eb7c0a3535a..e6800460cac7 100644 --- a/yarn-project/accounts/src/testing/index.ts +++ b/yarn-project/accounts/src/testing/index.ts @@ -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 { @@ -47,22 +47,27 @@ export function getInitialTestAccounts(): Promise { ); } +/** + * 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 { + 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 { +export async function getInitialTestAccountsWallets(pxe: PXE): Promise { 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()), ); } diff --git a/yarn-project/cli/src/cmds/devnet/bootstrap_network.ts b/yarn-project/cli/src/cmds/devnet/bootstrap_network.ts index aff4e47b1b53..8474d6a617ed 100644 --- a/yarn-project/cli/src/cmds/devnet/bootstrap_network.ts +++ b/yarn-project/cli/src/cmds/devnet/bootstrap_network.ts @@ -1,4 +1,4 @@ -import { getDeployedTestAccountsWallets } from '@aztec/accounts/testing'; +import { getInitialTestAccountsManagers } from '@aztec/accounts/testing'; import { AztecAddress, BatchCall, @@ -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,