Skip to content

Commit

Permalink
Schema for archiver
Browse files Browse the repository at this point in the history
  • Loading branch information
spalladino committed Nov 5, 2024
1 parent 7c88435 commit 7260917
Show file tree
Hide file tree
Showing 29 changed files with 798 additions and 358 deletions.
1 change: 1 addition & 0 deletions yarn-project/.earthlyignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ aztec-faucet/data*
aztec-node/data*
aztec/log
circuits.js/fixtures/*.json
circuit-types/src/test/artifacts
docs/dist
end-to-end/addresses.json
end-to-end/log
Expand Down
1 change: 1 addition & 0 deletions yarn-project/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ aztec-faucet/data*
aztec-node/data*
aztec/log
circuits.js/fixtures/*.json
circuit-types/src/test/artifacts
docs/dist
end-to-end/addresses.json
end-to-end/flame_graph
Expand Down
12 changes: 8 additions & 4 deletions yarn-project/circuit-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@
"tsconfig": "./tsconfig.json"
},
"scripts": {
"build": "yarn clean && tsc -b",
"build": "yarn clean && yarn generate && tsc -b",
"build:dev": "tsc -b --watch",
"clean": "rm -rf ./dest .tsbuildinfo",
"clean": "rm -rf ./dest .tsbuildinfo ./test/artifacts",
"formatting": "run -T prettier --check ./src && run -T eslint ./src",
"formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src",
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests"
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests",
"generate": "./scripts/copy-test-artifacts.sh"
},
"inherits": [
"../package.common.json"
"../package.common.json",
"./package.local.json"
],
"jest": {
"moduleNameMapper": {
Expand Down Expand Up @@ -80,10 +82,12 @@
"@types/jest": "^29.5.0",
"@types/lodash.clonedeep": "^4.5.7",
"@types/lodash.isequal": "^4.5.6",
"@types/lodash.omit": "^4.5.9",
"@types/lodash.times": "^4.3.7",
"@types/node": "^18.7.23",
"jest": "^29.5.0",
"jest-mock-extended": "^3.0.3",
"lodash.omit": "^4.5.0",
"ts-node": "^10.9.1",
"typescript": "^5.0.4",
"viem": "^2.7.15"
Expand Down
12 changes: 12 additions & 0 deletions yarn-project/circuit-types/package.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"scripts": {
"build": "yarn clean && yarn generate && tsc -b",
"generate": "./scripts/copy-test-artifacts.sh",
"clean": "rm -rf ./dest .tsbuildinfo ./test/artifacts"
},
"files": [
"dest",
"src",
"!*.test.*"
]
}
16 changes: 16 additions & 0 deletions yarn-project/circuit-types/scripts/copy-test-artifacts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -euo pipefail

# Check for .json files existence
if ! ls ../../noir-projects/noir-contracts/target/*.json >/dev/null 2>&1; then
echo "Error: No .json files found in noir-contracts/target folder."
echo "Make sure noir-contracts is built before running this script."
exit 1
fi

# Ensure outdir exists
mkdir -p ./src/test/artifacts

# Copy the token contract for testing
cp ../../noir-projects/noir-contracts/target/token_contract-Token.json ./src/test/artifacts/
echo "Copied token_contract-Token.json to ./src/test/artifacts/"
Loading

0 comments on commit 7260917

Please sign in to comment.