@aztec/protocol-contracts 0.0.1-commit.321f6a9 → 0.0.1-commit.330febf

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,7 @@ import { ProtocolContractAddress } from '../protocol_contract_data.js';
21
21
  return log.contractAddress.equals(ProtocolContractAddress.ContractClassRegistry) && log.fields.fields[0].toBigInt() === CONTRACT_CLASS_PUBLISHED_MAGIC_VALUE;
22
22
  }
23
23
  static fromLog(log) {
24
- // See how the log is serialized in `noir-projects/noir-contracts/contracts/protocol/contract_class_registry_contract/src/events/class_published.nr`.
24
+ // See how the log is serialized in `noir-projects/fnd/noir-contracts/contracts/protocol/contract_class_registry_contract/src/events/class_published.nr`.
25
25
  const fieldsWithoutTag = log.fields.fields.slice(1);
26
26
  const reader = new FieldReader(fieldsWithoutTag);
27
27
  const contractClassId = reader.readField();
@@ -6,6 +6,7 @@ import { CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS, CONTRACT_INSTANCE_PUBLISHED_M
6
6
  import { makeTuple } from '@aztec/foundation/array';
7
7
  import { Fr } from '@aztec/foundation/curves/bn254';
8
8
  import { createConsoleLogger } from '@aztec/foundation/log';
9
+ import { fileURLToPath } from '@aztec/foundation/url';
9
10
  import { loadContractArtifact } from '@aztec/stdlib/abi';
10
11
  import { AztecAddress } from '@aztec/stdlib/aztec-address';
11
12
  import { computeContractAddressFromInstance, computeInitializationHash, getContractClassFromArtifact } from '@aztec/stdlib/contract';
@@ -15,8 +16,8 @@ import { ProtocolContracts } from '@aztec/stdlib/tx';
15
16
  import { promises as fs } from 'fs';
16
17
  import path from 'path';
17
18
  const log = createConsoleLogger('autogenerate');
18
- const noirContractsRoot = '../../noir-projects/noir-contracts';
19
- const srcPath = path.join(noirContractsRoot, './target');
19
+ const artifactsPkgRoot = path.dirname(fileURLToPath(import.meta.resolve('@aztec/protocol-contracts-artifacts/package.json')));
20
+ const srcPath = path.join(artifactsPkgRoot, 'artifacts');
20
21
  const destArtifactsDir = './artifacts';
21
22
  const outputFilePath = './src/protocol_contract_data.ts';
22
23
  const salt = new Fr(1);
@@ -193,7 +194,7 @@ async function generateOutputFile(names, contractData) {
193
194
  }
194
195
  async function main() {
195
196
  await clearDestDir();
196
- const srcNames = JSON.parse(await fs.readFile(path.join(noirContractsRoot, 'protocol_contracts.json'), 'utf8'));
197
+ const srcNames = JSON.parse(await fs.readFile(path.join(artifactsPkgRoot, 'protocol_contracts.json'), 'utf8'));
197
198
  const contractDataList = [];
198
199
  const destNames = srcNames.map((n)=>n.split('-')[1]);
199
200
  for(let i = 0; i < srcNames.length; i++){
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@aztec/protocol-contracts",
3
3
  "homepage": "https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/protocol-contracts",
4
4
  "description": "Canonical Noir contracts for the Aztec Network",
5
- "version": "0.0.1-commit.321f6a9",
5
+ "version": "0.0.1-commit.330febf",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": "./dest/index.js",
@@ -73,14 +73,15 @@
73
73
  ]
74
74
  },
75
75
  "dependencies": {
76
- "@aztec/constants": "0.0.1-commit.321f6a9",
77
- "@aztec/foundation": "0.0.1-commit.321f6a9",
78
- "@aztec/stdlib": "0.0.1-commit.321f6a9",
76
+ "@aztec/constants": "0.0.1-commit.330febf",
77
+ "@aztec/foundation": "0.0.1-commit.330febf",
78
+ "@aztec/stdlib": "0.0.1-commit.330febf",
79
79
  "lodash.chunk": "^4.2.0",
80
80
  "lodash.omit": "^4.5.0",
81
81
  "tslib": "^2.4.0"
82
82
  },
83
83
  "devDependencies": {
84
+ "@aztec/protocol-contracts-artifacts": "6.0.0-nightly.20260807",
84
85
  "@jest/globals": "^30.0.0",
85
86
  "@types/jest": "^30.0.0",
86
87
  "@types/lodash.chunk": "^4.2.9",
@@ -29,7 +29,7 @@ export class ContractClassPublishedEvent {
29
29
  }
30
30
 
31
31
  static fromLog(log: ContractClassLog) {
32
- // See how the log is serialized in `noir-projects/noir-contracts/contracts/protocol/contract_class_registry_contract/src/events/class_published.nr`.
32
+ // See how the log is serialized in `noir-projects/fnd/noir-contracts/contracts/protocol/contract_class_registry_contract/src/events/class_published.nr`.
33
33
  const fieldsWithoutTag = log.fields.fields.slice(1);
34
34
  const reader = new FieldReader(fieldsWithoutTag);
35
35
  const contractClassId = reader.readField();