From 45067e111448a36c14c2ae7459d661d444bc7b84 Mon Sep 17 00:00:00 2001 From: Mitch Date: Thu, 27 Mar 2025 19:44:34 -0400 Subject: [PATCH] fix: boolean config helper for cli args works now chore: test accounts are on by default in sandbox, off by default otherwise --- yarn-project/aztec/src/cli/aztec_start_options.ts | 10 +++++----- yarn-project/aztec/src/sandbox/sandbox.ts | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/yarn-project/aztec/src/cli/aztec_start_options.ts b/yarn-project/aztec/src/cli/aztec_start_options.ts index e648d8f83a54..d186761d5f06 100644 --- a/yarn-project/aztec/src/cli/aztec_start_options.ts +++ b/yarn-project/aztec/src/cli/aztec_start_options.ts @@ -83,13 +83,13 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = { envVar: undefined, }, { - flag: '--sandbox.testAccounts', + flag: '--sandbox.testAccounts [value]', description: 'Deploy test accounts on sandbox start', envVar: 'TEST_ACCOUNTS', - ...booleanConfigHelper(true), + ...booleanConfigHelper(), }, { - flag: '--sandbox.noPXE', + flag: '--sandbox.noPXE [value]', description: 'Do not expose PXE service on sandbox start', envVar: 'NO_PXE', ...booleanConfigHelper(), @@ -268,7 +268,7 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = { parseVal: val => parseInt(val, 10), }, { - flag: '--node.testAccounts', + flag: '--node.testAccounts [value]', description: 'Populate genesis state with initial fee juice for test accounts', envVar: 'TEST_ACCOUNTS', ...booleanConfigHelper(), @@ -289,7 +289,7 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = { ], 'P2P SUBSYSTEM': [ { - flag: '--p2p-enabled', + flag: '--p2p-enabled [value]', description: 'Enable P2P subsystem', envVar: 'P2P_ENABLED', ...booleanConfigHelper(), diff --git a/yarn-project/aztec/src/sandbox/sandbox.ts b/yarn-project/aztec/src/sandbox/sandbox.ts index df8fdbe6c6c4..f1b33a60c718 100644 --- a/yarn-project/aztec/src/sandbox/sandbox.ts +++ b/yarn-project/aztec/src/sandbox/sandbox.ts @@ -118,10 +118,11 @@ export async function createSandbox(config: Partial = {}, userLog } const initialAccounts = await (async () => { - if (config.testAccounts) { + if (config.testAccounts === true || config.testAccounts === undefined) { if (aztecNodeConfig.p2pEnabled) { userLog(`Not setting up test accounts as we are connecting to a network`); } else { + userLog(`Setting up test accounts`); return await getInitialTestAccounts(); } }