forked from visoftsolutions/noir_rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Unhardcode canonical addresses of deployer and registerer cont…
…racts (AztecProtocol#4467) Creates a new package `protocol-contracts` to store the artifacts and canonical deployment addresses for well-known protocol contracts. Contains deployer and registerer for now, should include address registry and encryption precompiles in the future as well. Builds on AztecProtocol#4436.
- Loading branch information
1 parent
4113cfd
commit 2c82b62
Showing
26 changed files
with
1,284 additions
and
15 deletions.
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.