From eade352a56b2365b5213962733735e45a6d46fb0 Mon Sep 17 00:00:00 2001 From: Dan Lee <142251406+dan-aztec@users.noreply.github.com> Date: Tue, 5 Dec 2023 13:03:40 -0800 Subject: [PATCH] chore: remove foundation and types deps from boxes (#3389) note: removing the dependency on `circuits.js`, which previously provided the circuits wasm, was done in https://github.com/AztecProtocol/aztec-packages/pull/3421 --- yarn-project/aztec.js/src/index.ts | 23 ++++++++++--------- yarn-project/boxes/blank-react/package.json | 3 --- .../app/components/contract_function_form.tsx | 3 +-- .../boxes/blank-react/src/app/contract.tsx | 3 +-- yarn-project/boxes/blank-react/src/config.ts | 3 +-- .../src/scripts/call_contract_function.ts | 4 +--- .../src/scripts/deploy_contract.ts | 4 +--- .../boxes/blank-react/src/scripts/util.ts | 12 +++++++--- .../src/scripts/view_contract_function.ts | 3 +-- .../src/tests/blank.contract.test.ts | 2 +- .../boxes/blank-react/tsconfig.dest.json | 2 +- yarn-project/boxes/blank-react/tsconfig.json | 9 -------- yarn-project/boxes/blank/package.json | 2 -- yarn-project/boxes/blank/src/index.ts | 6 +++-- .../blank/src/tests/blank.contract.test.ts | 2 +- yarn-project/boxes/blank/tsconfig.dest.json | 2 +- yarn-project/boxes/blank/tsconfig.json | 6 ----- yarn-project/boxes/token/package.json | 3 --- .../app/components/contract_function_form.tsx | 3 +-- yarn-project/boxes/token/src/app/contract.tsx | 3 +-- yarn-project/boxes/token/src/config.ts | 3 +-- .../src/scripts/call_contract_function.ts | 3 +-- .../token/src/scripts/deploy_contract.ts | 4 +--- yarn-project/boxes/token/src/scripts/util.ts | 12 +++++++--- .../src/scripts/view_contract_function.ts | 3 +-- .../token/src/tests/token.contract.test.ts | 7 +++--- yarn-project/boxes/token/tsconfig.dest.json | 2 +- yarn-project/boxes/token/tsconfig.json | 9 -------- .../foundation/src/abi/function_selector.ts | 2 +- .../foundation/src/aztec-address/index.ts | 2 +- yarn-project/yarn.lock | 8 ------- 31 files changed, 57 insertions(+), 96 deletions(-) diff --git a/yarn-project/aztec.js/src/index.ts b/yarn-project/aztec.js/src/index.ts index c7c1bcc8f4e..38f1bc8970f 100644 --- a/yarn-project/aztec.js/src/index.ts +++ b/yarn-project/aztec.js/src/index.ts @@ -67,12 +67,12 @@ export { AccountWalletWithPrivateKey, AccountWallet, Wallet, SignerlessWallet } export { AztecAddress, EthAddress, - Point, Fr, Fq, FunctionSelector, GlobalVariables, GrumpkinScalar, + Point, getContractDeploymentInfo, } from '@aztec/circuits.js'; @@ -86,8 +86,8 @@ export { ExtendedContractData, ExtendedNote, FunctionCall, - INITIAL_L2_BLOCK_NUM, GrumpkinPrivateKey, + INITIAL_L2_BLOCK_NUM, L2Actor, L2Block, L2BlockL2Logs, @@ -97,10 +97,10 @@ export { MerkleTreeId, NodeInfo, Note, + PXE, PackedArguments, PartialAddress, PublicKey, - PXE, SyncStatus, Tx, TxExecutionRequest, @@ -108,30 +108,31 @@ export { TxReceipt, TxStatus, UnencryptedL2Log, - emptyFunctionCall, createAztecNodeClient, + emptyFunctionCall, merkleTreeIds, mockTx, } from '@aztec/types'; -export { ContractArtifact, FunctionArtifact } from '@aztec/foundation/abi'; - // TODO: These kinds of things have no place on our public api. // External devs will almost certainly have their own methods of doing these things. // If we want to use them in our own "aztec.js consuming code", import them from foundation as needed. +export { ContractArtifact, FunctionArtifact, encodeArguments } from '@aztec/foundation/abi'; +export { sha256, init } from '@aztec/foundation/crypto'; export { DebugLogger, createDebugLogger, onLog } from '@aztec/foundation/log'; -export { fileURLToPath } from '@aztec/foundation/url'; +export { retry, retryUntil } from '@aztec/foundation/retry'; export { sleep } from '@aztec/foundation/sleep'; export { elapsed } from '@aztec/foundation/timer'; -export { retry, retryUntil } from '@aztec/foundation/retry'; -export { sha256, init } from '@aztec/foundation/crypto'; +export { fileURLToPath } from '@aztec/foundation/url'; export { to2Fields, toBigInt } from '@aztec/foundation/serialize'; export { toBigIntBE } from '@aztec/foundation/bigint-buffer'; export { makeFetch } from '@aztec/foundation/json-rpc/client'; export { - deployL1Contract, - deployL1Contracts, DeployL1Contracts, L1ContractArtifactsForDeployment, + deployL1Contract, + deployL1Contracts, } from '@aztec/ethereum'; + +export { FieldsOf } from '@aztec/foundation/types'; diff --git a/yarn-project/boxes/blank-react/package.json b/yarn-project/boxes/blank-react/package.json index d8d97c6ba6e..3174826d119 100644 --- a/yarn-project/boxes/blank-react/package.json +++ b/yarn-project/boxes/blank-react/package.json @@ -37,9 +37,6 @@ "dependencies": { "@aztec/aztec-ui": "^0.1.14", "@aztec/aztec.js": "workspace:^", - "@aztec/circuits.js": "workspace:^", - "@aztec/foundation": "workspace:^", - "@aztec/types": "workspace:^", "classnames": "^2.3.2", "formik": "^2.4.3", "node-sass": "^9.0.0", diff --git a/yarn-project/boxes/blank-react/src/app/components/contract_function_form.tsx b/yarn-project/boxes/blank-react/src/app/components/contract_function_form.tsx index 484a7b10207..66609bd2ab9 100644 --- a/yarn-project/boxes/blank-react/src/app/components/contract_function_form.tsx +++ b/yarn-project/boxes/blank-react/src/app/components/contract_function_form.tsx @@ -3,8 +3,7 @@ import { callContractFunction, deployContract, viewContractFunction } from '../. import { convertArgs } from '../../scripts/util.js'; import styles from './contract_function_form.module.scss'; import { Button, Loader } from '@aztec/aztec-ui'; -import { AztecAddress, CompleteAddress, Fr } from '@aztec/aztec.js'; -import { ContractArtifact, FunctionArtifact } from '@aztec/foundation/abi'; +import { AztecAddress, CompleteAddress, ContractArtifact, Fr, FunctionArtifact } from '@aztec/aztec.js'; import { useFormik } from 'formik'; import * as Yup from 'yup'; diff --git a/yarn-project/boxes/blank-react/src/app/contract.tsx b/yarn-project/boxes/blank-react/src/app/contract.tsx index 3f1bd526956..6dfbc219589 100644 --- a/yarn-project/boxes/blank-react/src/app/contract.tsx +++ b/yarn-project/boxes/blank-react/src/app/contract.tsx @@ -3,8 +3,7 @@ import { Copy } from './components/copy.js'; import { ContractFunctionForm, Popup } from './components/index.js'; import styles from './contract.module.scss'; import { Button, ButtonSize, ButtonTheme, Card, CardTheme, ImageButton, ImageButtonIcon } from '@aztec/aztec-ui'; -import { AztecAddress, CompleteAddress } from '@aztec/aztec.js'; -import { FunctionArtifact } from '@aztec/foundation/abi'; +import { AztecAddress, CompleteAddress, FunctionArtifact } from '@aztec/aztec.js'; import { ReactNode, useState } from 'react'; const functionTypeSortOrder = { diff --git a/yarn-project/boxes/blank-react/src/config.ts b/yarn-project/boxes/blank-react/src/config.ts index f693a4c7fe9..6521f4df01c 100644 --- a/yarn-project/boxes/blank-react/src/config.ts +++ b/yarn-project/boxes/blank-react/src/config.ts @@ -1,6 +1,5 @@ import { BlankContractArtifact } from './artifacts/Blank.js'; -import { PXE, createPXEClient } from '@aztec/aztec.js'; -import { ContractArtifact } from '@aztec/foundation/abi'; +import { ContractArtifact, PXE, createPXEClient } from '@aztec/aztec.js'; // update this if using a different contract diff --git a/yarn-project/boxes/blank-react/src/scripts/call_contract_function.ts b/yarn-project/boxes/blank-react/src/scripts/call_contract_function.ts index 54e971ff68d..d80037eed84 100644 --- a/yarn-project/boxes/blank-react/src/scripts/call_contract_function.ts +++ b/yarn-project/boxes/blank-react/src/scripts/call_contract_function.ts @@ -1,7 +1,5 @@ import { getWallet } from './util.js'; -import { AztecAddress, PXE, CompleteAddress, Contract, TxReceipt } from '@aztec/aztec.js'; -import { ContractArtifact } from '@aztec/foundation/abi'; -import { FieldsOf } from '@aztec/foundation/types'; +import { AztecAddress, CompleteAddress, Contract, ContractArtifact, FieldsOf, PXE, TxReceipt } from '@aztec/aztec.js'; export async function callContractFunction( address: AztecAddress, diff --git a/yarn-project/boxes/blank-react/src/scripts/deploy_contract.ts b/yarn-project/boxes/blank-react/src/scripts/deploy_contract.ts index 08725e90dd6..8cde9eb5b9d 100644 --- a/yarn-project/boxes/blank-react/src/scripts/deploy_contract.ts +++ b/yarn-project/boxes/blank-react/src/scripts/deploy_contract.ts @@ -1,6 +1,4 @@ -import { AztecAddress, CompleteAddress, DeployMethod, Fr } from '@aztec/aztec.js'; -import { ContractArtifact } from '@aztec/foundation/abi'; -import { PXE } from '@aztec/types'; +import { AztecAddress, CompleteAddress, ContractArtifact, DeployMethod, Fr, PXE } from '@aztec/aztec.js'; export async function deployContract( activeWallet: CompleteAddress, diff --git a/yarn-project/boxes/blank-react/src/scripts/util.ts b/yarn-project/boxes/blank-react/src/scripts/util.ts index bea2bcba47f..cde41403d55 100644 --- a/yarn-project/boxes/blank-react/src/scripts/util.ts +++ b/yarn-project/boxes/blank-react/src/scripts/util.ts @@ -1,6 +1,12 @@ -import { AccountWallet, Fr, getSandboxAccountsWallets } from '@aztec/aztec.js'; -import { FunctionArtifact, encodeArguments } from '@aztec/foundation/abi'; -import { PXE, CompleteAddress } from '@aztec/types'; +import { + AccountWallet, + CompleteAddress, + Fr, + FunctionArtifact, + PXE, + encodeArguments, + getSandboxAccountsWallets, +} from '@aztec/aztec.js'; export function convertArgs(functionAbi: FunctionArtifact, args: any): Fr[] { const untypedArgs = functionAbi.parameters.map(param => { diff --git a/yarn-project/boxes/blank-react/src/scripts/view_contract_function.ts b/yarn-project/boxes/blank-react/src/scripts/view_contract_function.ts index 8b3bfd8e901..beff0032c77 100644 --- a/yarn-project/boxes/blank-react/src/scripts/view_contract_function.ts +++ b/yarn-project/boxes/blank-react/src/scripts/view_contract_function.ts @@ -1,6 +1,5 @@ import { getWallet } from './util.js'; -import { AztecAddress, PXE, CompleteAddress, Contract } from '@aztec/aztec.js'; -import { ContractArtifact } from '@aztec/foundation/abi'; +import { AztecAddress, CompleteAddress, Contract, ContractArtifact, PXE } from '@aztec/aztec.js'; export async function viewContractFunction( address: AztecAddress, diff --git a/yarn-project/boxes/blank-react/src/tests/blank.contract.test.ts b/yarn-project/boxes/blank-react/src/tests/blank.contract.test.ts index 6f906bfe35c..62fc7b7d1da 100644 --- a/yarn-project/boxes/blank-react/src/tests/blank.contract.test.ts +++ b/yarn-project/boxes/blank-react/src/tests/blank.contract.test.ts @@ -9,10 +9,10 @@ import { PXE, TxStatus, Wallet, + createDebugLogger, createPXEClient, waitForSandbox, } from '@aztec/aztec.js'; -import { createDebugLogger } from '@aztec/foundation/log'; const logger = createDebugLogger('aztec:http-pxe-client'); diff --git a/yarn-project/boxes/blank-react/tsconfig.dest.json b/yarn-project/boxes/blank-react/tsconfig.dest.json index 1b9c3a4a72e..97c9e8ef0da 100644 --- a/yarn-project/boxes/blank-react/tsconfig.dest.json +++ b/yarn-project/boxes/blank-react/tsconfig.dest.json @@ -1,5 +1,5 @@ { "extends": ".", - "references": [{ "path": "../../aztec.js" }, { "path": "../../foundation" }, { "path": "../../types" }], + "references": [{ "path": "../../aztec.js" }], "exclude": ["src/**/*.test.ts"] } diff --git a/yarn-project/boxes/blank-react/tsconfig.json b/yarn-project/boxes/blank-react/tsconfig.json index 755ee612d17..831cd23a900 100644 --- a/yarn-project/boxes/blank-react/tsconfig.json +++ b/yarn-project/boxes/blank-react/tsconfig.json @@ -26,14 +26,5 @@ { "path": "../../aztec.js" }, - { - "path": "../../circuits.js" - }, - { - "path": "../../foundation" - }, - { - "path": "../../types" - } ] } diff --git a/yarn-project/boxes/blank/package.json b/yarn-project/boxes/blank/package.json index dd7928c6d36..12d5c45576d 100644 --- a/yarn-project/boxes/blank/package.json +++ b/yarn-project/boxes/blank/package.json @@ -37,8 +37,6 @@ "dependencies": { "@aztec/aztec-ui": "^0.1.14", "@aztec/aztec.js": "workspace:^", - "@aztec/circuits.js": "workspace:^", - "@aztec/foundation": "workspace:^", "serve": "^14.2.1" }, "devDependencies": { diff --git a/yarn-project/boxes/blank/src/index.ts b/yarn-project/boxes/blank/src/index.ts index 518e2cfc75b..000a7322f22 100644 --- a/yarn-project/boxes/blank/src/index.ts +++ b/yarn-project/boxes/blank/src/index.ts @@ -5,15 +5,17 @@ import { AztecAddress, CompleteAddress, Contract, + ContractArtifact, DeployMethod, + FieldsOf, Fr, + FunctionArtifact, PXE, TxReceipt, createPXEClient, + encodeArguments, getSandboxAccountsWallets, } from '@aztec/aztec.js'; -import { ContractArtifact, FunctionArtifact, encodeArguments } from '@aztec/foundation/abi'; -import { FieldsOf } from '@aztec/foundation/types'; // docs:end:imports diff --git a/yarn-project/boxes/blank/src/tests/blank.contract.test.ts b/yarn-project/boxes/blank/src/tests/blank.contract.test.ts index 7e076b22bda..6fb153315f0 100644 --- a/yarn-project/boxes/blank/src/tests/blank.contract.test.ts +++ b/yarn-project/boxes/blank/src/tests/blank.contract.test.ts @@ -9,10 +9,10 @@ import { PXE, TxStatus, Wallet, + createDebugLogger, createPXEClient, waitForSandbox, } from '@aztec/aztec.js'; -import { createDebugLogger } from '@aztec/foundation/log'; const logger = createDebugLogger('aztec:blank-box-test'); diff --git a/yarn-project/boxes/blank/tsconfig.dest.json b/yarn-project/boxes/blank/tsconfig.dest.json index 1b9c3a4a72e..97c9e8ef0da 100644 --- a/yarn-project/boxes/blank/tsconfig.dest.json +++ b/yarn-project/boxes/blank/tsconfig.dest.json @@ -1,5 +1,5 @@ { "extends": ".", - "references": [{ "path": "../../aztec.js" }, { "path": "../../foundation" }, { "path": "../../types" }], + "references": [{ "path": "../../aztec.js" }], "exclude": ["src/**/*.test.ts"] } diff --git a/yarn-project/boxes/blank/tsconfig.json b/yarn-project/boxes/blank/tsconfig.json index 4973d658b21..831cd23a900 100644 --- a/yarn-project/boxes/blank/tsconfig.json +++ b/yarn-project/boxes/blank/tsconfig.json @@ -26,11 +26,5 @@ { "path": "../../aztec.js" }, - { - "path": "../../circuits.js" - }, - { - "path": "../../foundation" - } ] } diff --git a/yarn-project/boxes/token/package.json b/yarn-project/boxes/token/package.json index d80c4536a6e..81ee3dce74a 100644 --- a/yarn-project/boxes/token/package.json +++ b/yarn-project/boxes/token/package.json @@ -37,9 +37,6 @@ "dependencies": { "@aztec/aztec-ui": "^0.1.14", "@aztec/aztec.js": "workspace:^", - "@aztec/circuits.js": "workspace:^", - "@aztec/foundation": "workspace:^", - "@aztec/types": "workspace:^", "classnames": "^2.3.2", "formik": "^2.4.3", "node-sass": "^9.0.0", diff --git a/yarn-project/boxes/token/src/app/components/contract_function_form.tsx b/yarn-project/boxes/token/src/app/components/contract_function_form.tsx index 01abc409157..3f736a4e667 100644 --- a/yarn-project/boxes/token/src/app/components/contract_function_form.tsx +++ b/yarn-project/boxes/token/src/app/components/contract_function_form.tsx @@ -3,8 +3,7 @@ import { callContractFunction, deployContract, viewContractFunction } from '../. import { convertArgs } from '../../scripts/util.js'; import styles from './contract_function_form.module.scss'; import { Button, Loader } from '@aztec/aztec-ui'; -import { AztecAddress, CompleteAddress, Fr } from '@aztec/aztec.js'; -import { ContractArtifact, FunctionArtifact } from '@aztec/foundation/abi'; +import { AztecAddress, CompleteAddress, ContractArtifact, Fr, FunctionArtifact } from '@aztec/aztec.js'; import { useFormik } from 'formik'; import * as Yup from 'yup'; diff --git a/yarn-project/boxes/token/src/app/contract.tsx b/yarn-project/boxes/token/src/app/contract.tsx index 3bf292a5b4b..f4a76c2bfbe 100644 --- a/yarn-project/boxes/token/src/app/contract.tsx +++ b/yarn-project/boxes/token/src/app/contract.tsx @@ -3,8 +3,7 @@ import { Copy } from './components/copy.js'; import { ContractFunctionForm, Popup } from './components/index.js'; import styles from './contract.module.scss'; import { Button, ButtonSize, ButtonTheme, Card, CardTheme, ImageButton, ImageButtonIcon } from '@aztec/aztec-ui'; -import { AztecAddress, CompleteAddress } from '@aztec/aztec.js'; -import { FunctionArtifact } from '@aztec/foundation/abi'; +import { AztecAddress, CompleteAddress, FunctionArtifact } from '@aztec/aztec.js'; import { ReactNode, useState } from 'react'; const functionTypeSortOrder = { diff --git a/yarn-project/boxes/token/src/config.ts b/yarn-project/boxes/token/src/config.ts index 94a28ae43bd..86d549894a3 100644 --- a/yarn-project/boxes/token/src/config.ts +++ b/yarn-project/boxes/token/src/config.ts @@ -1,6 +1,5 @@ import { TokenContractArtifact } from './artifacts/Token.js'; -import { PXE, createPXEClient } from '@aztec/aztec.js'; -import { ContractArtifact } from '@aztec/foundation/abi'; +import { ContractArtifact, PXE, createPXEClient } from '@aztec/aztec.js'; // update this if using a different contract diff --git a/yarn-project/boxes/token/src/scripts/call_contract_function.ts b/yarn-project/boxes/token/src/scripts/call_contract_function.ts index 854803eaa42..b05492f065f 100644 --- a/yarn-project/boxes/token/src/scripts/call_contract_function.ts +++ b/yarn-project/boxes/token/src/scripts/call_contract_function.ts @@ -1,6 +1,5 @@ import { getWallet } from './util.js'; -import { AztecAddress, PXE, CompleteAddress, Contract } from '@aztec/aztec.js'; -import { ContractArtifact } from '@aztec/foundation/abi'; +import { AztecAddress, CompleteAddress, Contract, ContractArtifact, PXE } from '@aztec/aztec.js'; export async function callContractFunction( address: AztecAddress, diff --git a/yarn-project/boxes/token/src/scripts/deploy_contract.ts b/yarn-project/boxes/token/src/scripts/deploy_contract.ts index 84c28cf6318..272ebc637ed 100644 --- a/yarn-project/boxes/token/src/scripts/deploy_contract.ts +++ b/yarn-project/boxes/token/src/scripts/deploy_contract.ts @@ -1,6 +1,4 @@ -import { AztecAddress, CompleteAddress, DeployMethod, Fr } from '@aztec/aztec.js'; -import { ContractArtifact } from '@aztec/foundation/abi'; -import { PXE } from '@aztec/types'; +import { AztecAddress, CompleteAddress, ContractArtifact, DeployMethod, Fr, PXE } from '@aztec/aztec.js'; export async function deployContract( activeWallet: CompleteAddress, diff --git a/yarn-project/boxes/token/src/scripts/util.ts b/yarn-project/boxes/token/src/scripts/util.ts index 6b6b8884ca8..f2aa3609e15 100644 --- a/yarn-project/boxes/token/src/scripts/util.ts +++ b/yarn-project/boxes/token/src/scripts/util.ts @@ -1,6 +1,12 @@ -import { AccountWallet, Fr, getSandboxAccountsWallets } from '@aztec/aztec.js'; -import { FunctionArtifact, encodeArguments } from '@aztec/foundation/abi'; -import { CompleteAddress, PXE } from '@aztec/types'; +import { + AccountWallet, + CompleteAddress, + Fr, + FunctionArtifact, + PXE, + encodeArguments, + getSandboxAccountsWallets, +} from '@aztec/aztec.js'; function convertBasicArg(paramType: string, value: any) { switch (paramType) { diff --git a/yarn-project/boxes/token/src/scripts/view_contract_function.ts b/yarn-project/boxes/token/src/scripts/view_contract_function.ts index 8b3bfd8e901..beff0032c77 100644 --- a/yarn-project/boxes/token/src/scripts/view_contract_function.ts +++ b/yarn-project/boxes/token/src/scripts/view_contract_function.ts @@ -1,6 +1,5 @@ import { getWallet } from './util.js'; -import { AztecAddress, PXE, CompleteAddress, Contract } from '@aztec/aztec.js'; -import { ContractArtifact } from '@aztec/foundation/abi'; +import { AztecAddress, CompleteAddress, Contract, ContractArtifact, PXE } from '@aztec/aztec.js'; export async function viewContractFunction( address: AztecAddress, diff --git a/yarn-project/boxes/token/src/tests/token.contract.test.ts b/yarn-project/boxes/token/src/tests/token.contract.test.ts index 0ec4dee07cc..2ff90186f74 100644 --- a/yarn-project/boxes/token/src/tests/token.contract.test.ts +++ b/yarn-project/boxes/token/src/tests/token.contract.test.ts @@ -2,6 +2,9 @@ import { TokenContract } from '../artifacts/Token.js'; import { TokenSimulator } from './token_simulator.js'; import { AccountWallet, + CompleteAddress, + DebugLogger, + ExtendedNote, Fr, Note, PXE, @@ -9,13 +12,11 @@ import { TxStatus, computeAuthWitMessageHash, computeMessageSecretHash, + createDebugLogger, createPXEClient, getSandboxAccountsWallets, waitForSandbox, } from '@aztec/aztec.js'; -import { CompleteAddress } from '@aztec/circuits.js'; -import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; -import { ExtendedNote } from '@aztec/types'; import { afterEach, beforeAll, expect, jest } from '@jest/globals'; // assumes sandbox is running locally, which this script does not trigger diff --git a/yarn-project/boxes/token/tsconfig.dest.json b/yarn-project/boxes/token/tsconfig.dest.json index 1b9c3a4a72e..97c9e8ef0da 100644 --- a/yarn-project/boxes/token/tsconfig.dest.json +++ b/yarn-project/boxes/token/tsconfig.dest.json @@ -1,5 +1,5 @@ { "extends": ".", - "references": [{ "path": "../../aztec.js" }, { "path": "../../foundation" }, { "path": "../../types" }], + "references": [{ "path": "../../aztec.js" }], "exclude": ["src/**/*.test.ts"] } diff --git a/yarn-project/boxes/token/tsconfig.json b/yarn-project/boxes/token/tsconfig.json index 755ee612d17..831cd23a900 100644 --- a/yarn-project/boxes/token/tsconfig.json +++ b/yarn-project/boxes/token/tsconfig.json @@ -26,14 +26,5 @@ { "path": "../../aztec.js" }, - { - "path": "../../circuits.js" - }, - { - "path": "../../foundation" - }, - { - "path": "../../types" - } ] } diff --git a/yarn-project/foundation/src/abi/function_selector.ts b/yarn-project/foundation/src/abi/function_selector.ts index b898519d53e..df53ef9a1fb 100644 --- a/yarn-project/foundation/src/abi/function_selector.ts +++ b/yarn-project/foundation/src/abi/function_selector.ts @@ -120,7 +120,7 @@ export class FunctionSelector { static fromString(selector: string) { const buf = Buffer.from(selector.replace(/^0x/i, ''), 'hex'); if (buf.length !== FunctionSelector.SIZE) { - throw new Error(`Invalid length ${buf.length}.`); + throw new Error(`Invalid FunctionSelector length ${buf.length}.`); } return FunctionSelector.fromBuffer(buf); } diff --git a/yarn-project/foundation/src/aztec-address/index.ts b/yarn-project/foundation/src/aztec-address/index.ts index 4c042ad96c6..a03257f36de 100644 --- a/yarn-project/foundation/src/aztec-address/index.ts +++ b/yarn-project/foundation/src/aztec-address/index.ts @@ -10,7 +10,7 @@ import { Fr } from '../fields/index.js'; export class AztecAddress extends Fr { constructor(buffer: Buffer) { if (buffer.length !== 32) { - throw new Error(`Invalid length ${buffer.length}.`); + throw new Error(`Invalid AztecAddress length ${buffer.length}.`); } super(buffer); } diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index 9ccbcf8dea0..935cf87829a 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -7335,9 +7335,6 @@ __metadata: dependencies: "@aztec/aztec-ui": ^0.1.14 "@aztec/aztec.js": "workspace:^" - "@aztec/circuits.js": "workspace:^" - "@aztec/foundation": "workspace:^" - "@aztec/types": "workspace:^" "@types/jest": ^29.5.0 "@types/mocha": ^10.0.3 "@types/node": ^20.5.9 @@ -7386,8 +7383,6 @@ __metadata: dependencies: "@aztec/aztec-ui": ^0.1.14 "@aztec/aztec.js": "workspace:^" - "@aztec/circuits.js": "workspace:^" - "@aztec/foundation": "workspace:^" "@types/jest": ^29.5.0 "@types/mocha": ^10.0.3 "@typescript-eslint/eslint-plugin": ^6.0.0 @@ -19102,9 +19097,6 @@ __metadata: dependencies: "@aztec/aztec-ui": ^0.1.14 "@aztec/aztec.js": "workspace:^" - "@aztec/circuits.js": "workspace:^" - "@aztec/foundation": "workspace:^" - "@aztec/types": "workspace:^" "@jest/globals": ^29.6.4 "@types/jest": ^29.5.0 "@types/mocha": ^10.0.3