From 5538a510c8e85e3c7856c41bdb786e9bb90f1e53 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Sat, 17 Feb 2024 10:19:48 -0300 Subject: [PATCH] Fix CLI tests --- yarn-project/end-to-end/src/guides/up_quick_start.sh | 2 +- yarn-project/end-to-end/src/shared/cli.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/yarn-project/end-to-end/src/guides/up_quick_start.sh b/yarn-project/end-to-end/src/guides/up_quick_start.sh index cf87493a1b21..c1776e355d9b 100755 --- a/yarn-project/end-to-end/src/guides/up_quick_start.sh +++ b/yarn-project/end-to-end/src/guides/up_quick_start.sh @@ -11,7 +11,7 @@ ALICE_PRIVATE_KEY="0x2153536ff6628eee01cf4024889ff977a18d9fa61d0e414422f7681cf08 # docs:end:declare-accounts # docs:start:deploy -CONTRACT=$(aztec-cli deploy TokenContractArtifact --salt 0 --args $ALICE "TokenName" "TKN" 18 --json | jq -r '.address') +CONTRACT=$(aztec-cli deploy TokenContractArtifact --private-key $ALICE_PRIVATE_KEY --salt 0 --args $ALICE "TokenName" "TKN" 18 --json | jq -r '.address') echo "Deployed contract at $CONTRACT" aztec-cli check-deploy --contract-address $CONTRACT # docs:end:deploy diff --git a/yarn-project/end-to-end/src/shared/cli.ts b/yarn-project/end-to-end/src/shared/cli.ts index 64aaf20b98e2..234c3e21e962 100644 --- a/yarn-project/end-to-end/src/shared/cli.ts +++ b/yarn-project/end-to-end/src/shared/cli.ts @@ -60,6 +60,7 @@ export const cliTestSuite = ( if (addRpcUrl) { args.push('--rpc-url', rpcURL); } + debug(`Running command ${args.join(' ')}`); const res = cli.parseAsync(args); resetCli(); return res; @@ -135,7 +136,9 @@ export const cliTestSuite = ( const ownerAddress = AztecAddress.fromString(foundAddress!); debug('Deploy Token Contract using created account.'); - await run(`deploy ${artifact} --salt ${salt} --args ${ownerAddress} 'TokenName' 'TKN' 18`); + await run( + `deploy ${artifact} --private-key ${privKey} --salt ${salt} --args ${ownerAddress} 'TokenName' 'TKN' 18`, + ); const loggedAddress = findInLogs(/Contract\sdeployed\sat\s+(?
0x[a-fA-F0-9]+)/)?.groups?.address; expect(loggedAddress).toBeDefined(); contractAddress = AztecAddress.fromString(loggedAddress!);