Skip to content

Commit a0753c3

Browse files
committed
refactor(auth_registry): move contract to contracts/canonical/
Now that auth_registry is no longer a magic-address protocol contract, `contracts/protocol/` was misleading. Establishes a `canonical/` sibling directory for non-protocol contracts deployed at well-known artifact-derived addresses (deployed in early blocks, not at genesis, not part of protocolContractsHash). Paths updated in noir-contracts' top-level Nargo.toml, avm_test_contract's dep, the cycle guard script, and derive_auth_registry's AUTH_REGISTRY_SRC_DIR.
1 parent 5899936 commit a0753c3

6 files changed

Lines changed: 4 additions & 5 deletions

File tree

noir-projects/noir-contracts/Nargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ members = [
2727
"contracts/fees/fpc_contract",
2828
"contracts/fees/sponsored_fpc_contract",
2929
"contracts/message_discovery/handshake_registry_contract",
30-
"contracts/protocol/auth_registry_contract",
30+
"contracts/canonical/auth_registry_contract",
3131
"contracts/protocol/contract_class_registry_contract",
3232
"contracts/protocol/contract_instance_registry_contract",
3333
"contracts/protocol/fee_juice_contract",

noir-projects/noir-contracts/contracts/protocol/auth_registry_contract/Nargo.toml renamed to noir-projects/noir-contracts/contracts/canonical/auth_registry_contract/Nargo.toml

File renamed without changes.

noir-projects/noir-contracts/contracts/protocol/auth_registry_contract/src/main.nr renamed to noir-projects/noir-contracts/contracts/canonical/auth_registry_contract/src/main.nr

File renamed without changes.

noir-projects/noir-contracts/contracts/test/avm_test_contract/Nargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ sha256 = { tag = "v0.3.0", git = "https://github.com/noir-lang/sha256" }
1212
keccak256 = { tag = "v0.1.3", git = "https://github.com/noir-lang/keccak256" }
1313
poseidon = { tag= "v0.3.0", git = "https://github.com/noir-lang/poseidon" }
1414
fee_juice = { path = "../../protocol_interface/fee_juice_interface" }
15-
auth_contract = { path = "../../protocol/auth_registry_contract" }
15+
auth_contract = { path = "../../canonical/auth_registry_contract" }
1616
instance_contract = { path = "../../protocol_interface/contract_instance_registry_interface" }

noir-projects/scripts/auth_registry_cycle_guard.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
set -euo pipefail
1414

1515
ROOT="$(git rev-parse --show-toplevel)"
16-
NARGO_TOML="$ROOT/noir-projects/noir-contracts/contracts/protocol/auth_registry_contract/Nargo.toml"
16+
NARGO_TOML="$ROOT/noir-projects/noir-contracts/contracts/canonical/auth_registry_contract/Nargo.toml"
1717
ARTIFACT="$ROOT/noir-projects/noir-contracts/target/auth_registry_contract-AuthRegistry.json"
1818
LOCK="$ROOT/noir-projects/aztec-nr/canonical_addresses/lib.lock.json"
1919

yarn-project/protocol-contracts/src/auth-registry/derive_auth_registry.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
// - `../scripts/derive_auth_registry.ts` — the CLI that writes the three committed files.
55
// - `./derive_auth_registry.test.ts` — the CI freshness gate that re-derives from the
66
// freshly-built artifact and asserts byte-equality against the on-disk values.
7-
87
import { Fr } from '@aztec/foundation/curves/bn254';
98
import { loadContractArtifact } from '@aztec/stdlib/abi';
109
import { AztecAddress } from '@aztec/stdlib/aztec-address';
@@ -36,7 +35,7 @@ export const NR_LOCK_PATH = path.join(NR_CRATE_DIR, 'lib.lock.json');
3635
export const TS_TWIN_PATH = path.join(REPO_ROOT, 'yarn-project/protocol-contracts/src/auth-registry/address.gen.ts');
3736
export const AUTH_REGISTRY_SRC_DIR = path.join(
3837
REPO_ROOT,
39-
'noir-projects/noir-contracts/contracts/protocol/auth_registry_contract/src',
38+
'noir-projects/noir-contracts/contracts/canonical/auth_registry_contract/src',
4039
);
4140

4241
export type AuthRegistryStamp = {

0 commit comments

Comments
 (0)