-
Notifications
You must be signed in to change notification settings - Fork 270
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: Unhardcode canonical addresses of deployer and registerer contracts #4467
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,9 @@ | |
{ | ||
"path": "../l1-artifacts" | ||
}, | ||
{ | ||
"path": "../protocol-contracts" | ||
}, | ||
{ | ||
"path": "../types" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('@aztec/foundation/eslint'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/src/artifacts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Protocol Contracts | ||
|
||
Canonical Noir contracts used to power the Aztec Network protocol. | ||
|
||
Includes: | ||
- Contract class registerer | ||
- Contract instance deployer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"name": "@aztec/protocol-contracts", | ||
"homepage": "https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/protocol-contracts", | ||
"description": "Canonical Noir contracts for the Aztec Network", | ||
"version": "0.1.0", | ||
"type": "module", | ||
"exports": { | ||
".": "./dest/index.js", | ||
"./*": "./dest/*/index.js" | ||
}, | ||
"typedocOptions": { | ||
"entryPoints": [ | ||
"./src/index.ts", | ||
"./src/class-registerer/index.ts", | ||
"./src/instance-deployer/index.ts" | ||
], | ||
"name": "Protocol Contracts", | ||
"tsconfig": "./tsconfig.json" | ||
}, | ||
"scripts": { | ||
"build": "yarn clean && yarn build:copy-contracts && tsc -b", | ||
"build:copy-contracts": "./scripts/copy-contracts.sh", | ||
"build:dev": "tsc -b --watch", | ||
"build:ts": "tsc -b", | ||
"clean": "rm -rf ./dest .tsbuildinfo ./src/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 $(yarn bin jest) --passWithNoTests" | ||
}, | ||
"inherits": [ | ||
"../package.common.json", | ||
"./package.local.json" | ||
], | ||
"jest": { | ||
"preset": "ts-jest/presets/default-esm", | ||
"moduleNameMapper": { | ||
"^(\\.{1,2}/.*)\\.[cm]?js$": "$1" | ||
}, | ||
"testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", | ||
"rootDir": "./src" | ||
}, | ||
"dependencies": { | ||
"@aztec/circuits.js": "workspace:^", | ||
"@aztec/foundation": "workspace:^", | ||
"@aztec/types": "workspace:^", | ||
"lodash.omit": "^4.5.0", | ||
"tslib": "^2.4.0" | ||
}, | ||
"devDependencies": { | ||
"@jest/globals": "^29.5.0", | ||
"@types/jest": "^29.5.0", | ||
"@types/lodash.omit": "^4.5.9", | ||
"@types/node": "^18.7.23", | ||
"jest": "^29.5.0", | ||
"jest-mock-extended": "^3.0.3", | ||
"ts-jest": "^29.1.0", | ||
"ts-loader": "^9.4.4", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^5.0.4" | ||
}, | ||
"files": [ | ||
"dest", | ||
"src", | ||
"!*.test.*" | ||
], | ||
"engines": { | ||
"node": ">=18" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"scripts": { | ||
"build": "yarn clean && yarn build:copy-contracts && tsc -b", | ||
"build:copy-contracts": "./scripts/copy-contracts.sh", | ||
"build:dev": "tsc -b --watch", | ||
"build:ts": "tsc -b", | ||
"clean": "rm -rf ./dest .tsbuildinfo ./src/artifacts" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#! /bin/bash | ||
set -euo pipefail | ||
mkdir -p ./src/artifacts | ||
|
||
contracts=(contract_class_registerer_contract-ContractClassRegisterer contract_instance_deployer_contract-ContractInstanceDeployer) | ||
|
||
for contract in "${contracts[@]}"; do | ||
cp "../noir-contracts/target/$contract.json" ./src/artifacts/${contract#*-}.json | ||
done | ||
|
||
yarn run -T prettier -w ./src/artifacts |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better to say "Canonical Noir contract artifacts"?