From 3a0b404af7762a3657e28930644f14ae76195861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pedro=20Sousa?= Date: Tue, 20 Feb 2024 12:01:40 +0000 Subject: [PATCH] applying suggestions, thanks Palla --- boxes/blank-react/src/hooks/useContract.tsx | 2 +- .../blank-react/tests/blank.contract.test.ts | 2 +- boxes/npx.js | 10 ++- boxes/package.json | 5 +- boxes/yarn.lock | 68 +++++++++---------- 5 files changed, 48 insertions(+), 39 deletions(-) diff --git a/boxes/blank-react/src/hooks/useContract.tsx b/boxes/blank-react/src/hooks/useContract.tsx index e8b0b01b88f..13f3aac6e09 100644 --- a/boxes/blank-react/src/hooks/useContract.tsx +++ b/boxes/blank-react/src/hooks/useContract.tsx @@ -24,7 +24,7 @@ export function useContract() { const { contractAddress } = await toast.promise(tx.wait(), { pending: "Deploying contract...", success: { - render: ({ data }) => `Number: ${data.contractAddress}`, + render: ({ data }) => `Address: ${data.contractAddress}`, }, error: "Error deploying contract", }); diff --git a/boxes/blank-react/tests/blank.contract.test.ts b/boxes/blank-react/tests/blank.contract.test.ts index beff51419af..02341bcbbb5 100644 --- a/boxes/blank-react/tests/blank.contract.test.ts +++ b/boxes/blank-react/tests/blank.contract.test.ts @@ -4,7 +4,7 @@ import { deployerEnv } from '../src/config.js'; const logger = createDebugLogger('aztec:http-pxe-client'); -describe('ZK Contract Tests', () => { +describe('Blank Contract Tests', () => { let wallet: AccountWallet; let contract: Contract; const { artifact } = BlankContract; diff --git a/boxes/npx.js b/boxes/npx.js index 0c3b8c1dfed..477b800fa3c 100755 --- a/boxes/npx.js +++ b/boxes/npx.js @@ -120,7 +120,15 @@ program.action(async () => { ptyProcess.on("exit", function (exitCode, signal) { updatePathEnvVar(); resolve(); - log(chalk.bgGreen("The Sandbox is installed!")); + if (exitCode === 0) { + log(chalk.bgGreen("The Sandbox is installed!")); + } else { + reject( + chalk.bgRed( + "Failed to install the Sandbox. Please visit the docs at https://docs.aztec.network", + ), + ); + } }); }); diff --git a/boxes/package.json b/boxes/package.json index fa56eeaccdf..b1d1e32c0ca 100644 --- a/boxes/package.json +++ b/boxes/package.json @@ -1,7 +1,8 @@ { "name": "@aztec/boxes", "packageManager": "yarn@4.1.0", - "private": true, + "version": "0.24.0", + "type": "module", "scripts": { "compile": "yarn workspaces foreach -A -v run compile", "build": "yarn workspaces foreach -A -v run build" @@ -11,7 +12,7 @@ "blank" ], "bin": { - "create-aztec": "npx.js" + "create-aztec-app": "npx.js" }, "resolutions": { "@aztec/accounts": "portal:../yarn-project/accounts", diff --git a/boxes/yarn.lock b/boxes/yarn.lock index 5ffe859d0a2..93b41dbe50b 100644 --- a/boxes/yarn.lock +++ b/boxes/yarn.lock @@ -29,9 +29,9 @@ __metadata: languageName: node linkType: hard -"@aztec/accounts@portal:../yarn-project/accounts::locator=%40aztec%2Fboxes%40workspace%3A.": +"@aztec/accounts@portal:../yarn-project/accounts::locator=%40signorecello%2Faztec-boxes%40workspace%3A.": version: 0.0.0-use.local - resolution: "@aztec/accounts@portal:../yarn-project/accounts::locator=%40aztec%2Fboxes%40workspace%3A." + resolution: "@aztec/accounts@portal:../yarn-project/accounts::locator=%40signorecello%2Faztec-boxes%40workspace%3A." dependencies: "@aztec/aztec.js": "workspace:^" "@aztec/circuit-types": "workspace:^" @@ -43,9 +43,9 @@ __metadata: languageName: node linkType: soft -"@aztec/aztec.js@portal:../yarn-project/aztec.js::locator=%40aztec%2Fboxes%40workspace%3A.": +"@aztec/aztec.js@portal:../yarn-project/aztec.js::locator=%40signorecello%2Faztec-boxes%40workspace%3A.": version: 0.0.0-use.local - resolution: "@aztec/aztec.js@portal:../yarn-project/aztec.js::locator=%40aztec%2Fboxes%40workspace%3A." + resolution: "@aztec/aztec.js@portal:../yarn-project/aztec.js::locator=%40signorecello%2Faztec-boxes%40workspace%3A." dependencies: "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" @@ -57,9 +57,9 @@ __metadata: languageName: node linkType: soft -"@aztec/bb.js@portal:../barretenberg/ts::locator=%40aztec%2Fboxes%40workspace%3A.": +"@aztec/bb.js@portal:../barretenberg/ts::locator=%40signorecello%2Faztec-boxes%40workspace%3A.": version: 0.0.0-use.local - resolution: "@aztec/bb.js@portal:../barretenberg/ts::locator=%40aztec%2Fboxes%40workspace%3A." + resolution: "@aztec/bb.js@portal:../barretenberg/ts::locator=%40signorecello%2Faztec-boxes%40workspace%3A." dependencies: comlink: "npm:^4.4.1" commander: "npm:^10.0.1" @@ -140,25 +140,9 @@ __metadata: languageName: unknown linkType: soft -"@aztec/boxes@workspace:.": +"@aztec/circuit-types@portal:../yarn-project/circuit-types::locator=%40signorecello%2Faztec-boxes%40workspace%3A.": version: 0.0.0-use.local - resolution: "@aztec/boxes@workspace:." - dependencies: - "@inquirer/confirm": "npm:^3.0.0" - "@inquirer/input": "npm:^2.0.0" - "@inquirer/select": "npm:^2.0.0" - chalk: "npm:^5.3.0" - commander: "npm:^12.0.0" - node-pty: "npm:^1.0.0" - tiged: "npm:^2.12.6" - bin: - create-aztec: npx.js - languageName: unknown - linkType: soft - -"@aztec/circuit-types@portal:../yarn-project/circuit-types::locator=%40aztec%2Fboxes%40workspace%3A.": - version: 0.0.0-use.local - resolution: "@aztec/circuit-types@portal:../yarn-project/circuit-types::locator=%40aztec%2Fboxes%40workspace%3A." + resolution: "@aztec/circuit-types@portal:../yarn-project/circuit-types::locator=%40signorecello%2Faztec-boxes%40workspace%3A." dependencies: "@aztec/circuits.js": "workspace:^" "@aztec/ethereum": "workspace:^" @@ -172,9 +156,9 @@ __metadata: languageName: node linkType: soft -"@aztec/circuits.js@portal:../yarn-project/circuits.js::locator=%40aztec%2Fboxes%40workspace%3A.": +"@aztec/circuits.js@portal:../yarn-project/circuits.js::locator=%40signorecello%2Faztec-boxes%40workspace%3A.": version: 0.0.0-use.local - resolution: "@aztec/circuits.js@portal:../yarn-project/circuits.js::locator=%40aztec%2Fboxes%40workspace%3A." + resolution: "@aztec/circuits.js@portal:../yarn-project/circuits.js::locator=%40signorecello%2Faztec-boxes%40workspace%3A." dependencies: "@aztec/bb.js": "portal:../../barretenberg/ts" "@aztec/foundation": "workspace:^" @@ -185,9 +169,9 @@ __metadata: languageName: node linkType: soft -"@aztec/ethereum@portal:../yarn-project/ethereum::locator=%40aztec%2Fboxes%40workspace%3A.": +"@aztec/ethereum@portal:../yarn-project/ethereum::locator=%40signorecello%2Faztec-boxes%40workspace%3A.": version: 0.0.0-use.local - resolution: "@aztec/ethereum@portal:../yarn-project/ethereum::locator=%40aztec%2Fboxes%40workspace%3A." + resolution: "@aztec/ethereum@portal:../yarn-project/ethereum::locator=%40signorecello%2Faztec-boxes%40workspace%3A." dependencies: "@aztec/foundation": "workspace:^" dotenv: "npm:^16.0.3" @@ -196,9 +180,9 @@ __metadata: languageName: node linkType: soft -"@aztec/foundation@portal:../yarn-project/foundation::locator=%40aztec%2Fboxes%40workspace%3A.": +"@aztec/foundation@portal:../yarn-project/foundation::locator=%40signorecello%2Faztec-boxes%40workspace%3A.": version: 0.0.0-use.local - resolution: "@aztec/foundation@portal:../yarn-project/foundation::locator=%40aztec%2Fboxes%40workspace%3A." + resolution: "@aztec/foundation@portal:../yarn-project/foundation::locator=%40signorecello%2Faztec-boxes%40workspace%3A." dependencies: "@aztec/bb.js": "portal:../../barretenberg/ts" "@koa/cors": "npm:^4.0.0" @@ -223,9 +207,9 @@ __metadata: languageName: node linkType: soft -"@aztec/protocol-contracts@portal:../yarn-project/protocol-contracts::locator=%40aztec%2Fboxes%40workspace%3A.": +"@aztec/protocol-contracts@portal:../yarn-project/protocol-contracts::locator=%40signorecello%2Faztec-boxes%40workspace%3A.": version: 0.0.0-use.local - resolution: "@aztec/protocol-contracts@portal:../yarn-project/protocol-contracts::locator=%40aztec%2Fboxes%40workspace%3A." + resolution: "@aztec/protocol-contracts@portal:../yarn-project/protocol-contracts::locator=%40signorecello%2Faztec-boxes%40workspace%3A." dependencies: "@aztec/circuits.js": "workspace:^" "@aztec/foundation": "workspace:^" @@ -235,9 +219,9 @@ __metadata: languageName: node linkType: soft -"@aztec/types@portal:../yarn-project/types::locator=%40aztec%2Fboxes%40workspace%3A.": +"@aztec/types@portal:../yarn-project/types::locator=%40signorecello%2Faztec-boxes%40workspace%3A.": version: 0.0.0-use.local - resolution: "@aztec/types@portal:../yarn-project/types::locator=%40aztec%2Fboxes%40workspace%3A." + resolution: "@aztec/types@portal:../yarn-project/types::locator=%40signorecello%2Faztec-boxes%40workspace%3A." dependencies: "@aztec/ethereum": "workspace:^" "@aztec/foundation": "workspace:^" @@ -1294,6 +1278,22 @@ __metadata: languageName: node linkType: hard +"@signorecello/aztec-boxes@workspace:.": + version: 0.0.0-use.local + resolution: "@signorecello/aztec-boxes@workspace:." + dependencies: + "@inquirer/confirm": "npm:^3.0.0" + "@inquirer/input": "npm:^2.0.0" + "@inquirer/select": "npm:^2.0.0" + chalk: "npm:^5.3.0" + commander: "npm:^12.0.0" + node-pty: "npm:^1.0.0" + tiged: "npm:^2.12.6" + bin: + create-aztec: npx.js + languageName: unknown + linkType: soft + "@sinclair/typebox@npm:^0.27.8": version: 0.27.8 resolution: "@sinclair/typebox@npm:0.27.8"