Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move boxes out of yarn-project #3437

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4dc8cbe
remove founation and types deps
dan-aztec Nov 22, 2023
d9e6ae6
yarn.lock update
dan-aztec Nov 22, 2023
8657004
tsconfig.json
dan-aztec Nov 22, 2023
e549db4
double export of CompleteAddress
dan-aztec Nov 22, 2023
bacf06e
missing import
dan-aztec Nov 22, 2023
28d7aaa
format toen
dan-aztec Nov 22, 2023
54f6475
Merge branch 'master' into dan/aztecjs-deps
dan-aztec Nov 22, 2023
a619c3e
lingering import
dan-aztec Nov 27, 2023
f3cd8a9
formatting
dan-aztec Nov 27, 2023
0a206d3
Merge branch 'master' into dan/aztecjs-deps
dan-aztec Nov 27, 2023
f534791
Merge branch 'master' into dan/aztecjs-deps
dan-aztec Nov 27, 2023
0d14ef7
remove wasm and circuits.js dep!
dan-aztec Nov 27, 2023
9114681
move out of yarn-project
dan-aztec Nov 28, 2023
05fb8da
add yarn.lock and instructions to use yarn 2+
dan-aztec Nov 28, 2023
e62f8f0
try updating CI
dan-aztec Nov 28, 2023
24c811c
add prettier dev deps
dan-aztec Nov 28, 2023
965405b
update ci command
dan-aztec Nov 28, 2023
984f89b
one missing dep update
dan-aztec Nov 28, 2023
ca4d5a0
Merge branch 'master' into dan/aztecjs-deps
dan-aztec Nov 28, 2023
5eccfda
merge
dan-aztec Nov 28, 2023
c2efa1e
dev-docs
dan-aztec Nov 28, 2023
1e68fde
Merge branch 'dan/aztecjs-deps' into dan/move-boxes-out
dan-aztec Nov 28, 2023
6b12be0
remove from workspace
dan-aztec Nov 28, 2023
0b841f4
copy boxes to docs docker container?
dan-aztec Nov 28, 2023
702f3b5
try one up path
dan-aztec Nov 28, 2023
7214a89
Merge branch 'master' into dan/aztecjs-deps
dan-aztec Nov 28, 2023
5d32dae
update path in docs
dan-aztec Nov 28, 2023
9fdab5a
update unbox command and see if container is updated on CI
dan-aztec Nov 28, 2023
a847aaa
leftover log
dan-aztec Nov 28, 2023
2e59a09
Merge branch 'dan/aztecjs-deps' into dan/move-boxes-out
dan-aztec Nov 28, 2023
dab5db7
Merge branch 'master' into dan/aztecjs-deps
dan-aztec Nov 29, 2023
3d3b923
Merge branch 'dan/aztecjs-deps' into dan/move-boxes-out
dan-aztec Nov 29, 2023
cebdd45
yarn.lock
dan-aztec Nov 29, 2023
51ffea8
update tsconfig
dan-aztec Nov 29, 2023
cb5025b
explicitly add boxes to docs container
dan-aztec Nov 29, 2023
f64d987
delete .tsbuildinfo files
dan-aztec Nov 29, 2023
a32ca45
tsbuildinfo to .gitignore
dan-aztec Nov 29, 2023
38de951
Merge branch 'master' into dan/aztecjs-deps
dan-aztec Dec 5, 2023
6556ef5
format
dan-aztec Dec 5, 2023
74778c1
Merge branch 'dan/aztecjs-deps' into dan/move-boxes-out
dan-aztec Dec 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ jobs:
- *setup_env
- run:
name: "Test via adhoc script"
command: ./yarn-project/boxes/run_tests blank-react
command: ./boxes/run_tests blank-react
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these be implemented using our standard container runner cond_run_container or cond_spot_run_container, or compose cond_run_compose or cond_spot_run_compose scripts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes i think so! I can do that in a follow up PR to keep this one digestible


boxes-blank:
machine:
Expand All @@ -443,7 +443,7 @@ jobs:
- *setup_env
- run:
name: "Test via adhoc script"
command: ./yarn-project/boxes/run_tests blank
command: ./boxes/run_tests blank

boxes-token:
machine:
Expand All @@ -454,7 +454,7 @@ jobs:
- *setup_env
- run:
name: "Test via adhoc script"
command: ./yarn-project/boxes/run_tests token
command: ./boxes/run_tests token

end-to-end:
machine:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ build/
cmake-build-debug
.terraform*
.bootstrapped
.tsbuildinfo

# Local Netlify folder
.netlify
13 changes: 13 additions & 0 deletions yarn-project/boxes/README.md → boxes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ A minimal framework for building full stack applications for Aztec (using React)

This folder contains the "boxes" that are meant for quickstarts for Aztec smart contract developers, including simple Noir smart contracts and frontends.

Note because this depends on packages in the parallel workspace `yarn-project`, it uses "portal" dependencies which requires yarn version 2+.

This was installed with
```
$yarn set version berry
```

which also required a node version of 18.12 or higher, via

```
nvm use 18.12.0
```

## Debugging

If CI is failing, it may be due to incompatibility with previous build artifacts - running the following command inside this boxes folder should regenerate the artifacts.
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@
},
"dependencies": {
"@aztec/aztec-ui": "^0.1.14",
"@aztec/aztec.js": "workspace:^",
"@aztec/circuits.js": "workspace:^",
"@aztec/foundation": "workspace:^",
"@aztec/types": "workspace:^",
"@aztec/aztec.js": "portal:../../yarn-project/aztec.js",
"classnames": "^2.3.2",
"formik": "^2.4.3",
"node-sass": "^9.0.0",
Expand All @@ -49,6 +46,12 @@
"serve": "^14.2.1",
"yup": "^1.2.0"
},
"resolutions": {
"@aztec/circuits.js": "portal:../../yarn-project/circuits.js",
"@aztec/foundation": "portal:../../yarn-project/foundation",
"@aztec/types": "portal:../../yarn-project/types",
"@aztec/ethereum": "portal:../../yarn-project/ethereum"
},
"devDependencies": {
"@types/jest": "^29.5.0",
"@types/mocha": "^10.0.3",
Expand All @@ -61,8 +64,10 @@
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.8.1",
"eslint": "^8.21.0",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"jest": "^29.6.4",
Expand Down Expand Up @@ -99,5 +104,6 @@
"src",
"!*.test.*"
],
"types": "./dest/index.d.ts"
"types": "./dest/index.d.ts",
"packageManager": "yarn@4.0.2"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ContractArtifact, PXE, createPXEClient } from '@aztec/aztec.js';
import { BlankContractArtifact } from './artifacts/Blank.js';
import { PXE, createPXEClient } from '@aztec/aztec.js';
import { ContractArtifact } from '@aztec/foundation/abi';

// update this if using a different contract

Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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 => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
5 changes: 5 additions & 0 deletions boxes/blank-react/tsconfig.dest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": ".",
"references": [{ "path": "../../aztec.js" }],
"exclude": ["src/**/*.test.ts"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,7 @@
"include": ["src", "src/**/*.json"],
"references": [
{
"path": "../../aztec.js"
"path": "../../yarn-project/aztec.js"
},
{
"path": "../../circuits.js"
},
{
"path": "../../foundation"
}
]
}
Loading