@aztec/protocol-contracts 0.0.1-commit.59e663cd → 0.0.1-commit.5cf06de3

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.
@@ -20,7 +20,7 @@ import { ProtocolContractAddress } from '../protocol_contract_data.js';
20
20
  return log.contractAddress.equals(ProtocolContractAddress.ContractClassRegistry) && log.fields.fields[0].toBigInt() === CONTRACT_CLASS_PUBLISHED_MAGIC_VALUE;
21
21
  }
22
22
  static fromLog(log) {
23
- // See how the log is serialized in `noir-projects/noir-contracts/contracts/protocol/contract_class_registry/src/events/class_published.nr`.
23
+ // See how the log is serialized in `noir-projects/noir-contracts/contracts/protocol/contract_class_registry_contract/src/events/class_published.nr`.
24
24
  const fieldsWithoutTag = log.fields.fields.slice(1);
25
25
  const reader = new FieldReader(fieldsWithoutTag);
26
26
  const contractClassId = reader.readField();
@@ -27,25 +27,25 @@ export const ProtocolContractAddress = {
27
27
  PublicChecks: AztecAddress.fromBigInt(6n)
28
28
  };
29
29
  export const ProtocolContractDerivedAddress = {
30
- AuthRegistry: AztecAddress.fromString('0x16c5a89fcf030e4cc8bfaafc3031f47fbd0b7714a279637c95661c2df81a56b9'),
31
- ContractInstanceRegistry: AztecAddress.fromString('0x19b33a79194a04dd6b7277c3128f93f070288070c7d3d061fe960d394b0aea66'),
32
- ContractClassRegistry: AztecAddress.fromString('0x0741d4c81bdd9f73ec58c0443c72998c1ca66f731663bc73c8703df5afe192ce'),
33
- MultiCallEntrypoint: AztecAddress.fromString('0x0c66aea9da793f5948b48efef72076cd814424114277feffd69ec13965b08f30'),
34
- FeeJuice: AztecAddress.fromString('0x291fc82c5b0d819e7c68b99bad0e3f0a496b77820ecb9998e8ef05d79f50f82e'),
35
- PublicChecks: AztecAddress.fromString('0x00690875a3d4e87002d8ce7b051fa0395b5cf3ccb34bbf777de20e32cdafa3ce')
30
+ AuthRegistry: AztecAddress.fromString('0x26bfad9c83bed5d1fd497c3d8cb458ee842e37bb6abe00b9140de5c43cec0b0b'),
31
+ ContractInstanceRegistry: AztecAddress.fromString('0x2c01bc5927318e54794740530f3443b42cd8f4d152eecf3b538e2c3001dc0ec8'),
32
+ ContractClassRegistry: AztecAddress.fromString('0x05dadbc602c4b7e51f9e6f2d05fc2f3ac28ba14d2b76d002e9c8d15fff92d68d'),
33
+ MultiCallEntrypoint: AztecAddress.fromString('0x0722a72067dd7a43db695957e807157bed0711f730122d5d15c6c4d3cae83e83'),
34
+ FeeJuice: AztecAddress.fromString('0x21c9a1a59fa165f5a9741e573e204881fb491e31a41a7bd5c5e5238b4878cce6'),
35
+ PublicChecks: AztecAddress.fromString('0x1cb47e9dd0b77e50c014662bb2680928aa93fdd279bdfbb12017c3685781dcf9')
36
36
  };
37
37
  export const ProtocolContractsList = new ProtocolContracts([
38
- AztecAddress.fromString('0x16c5a89fcf030e4cc8bfaafc3031f47fbd0b7714a279637c95661c2df81a56b9'),
39
- AztecAddress.fromString('0x19b33a79194a04dd6b7277c3128f93f070288070c7d3d061fe960d394b0aea66'),
40
- AztecAddress.fromString('0x0741d4c81bdd9f73ec58c0443c72998c1ca66f731663bc73c8703df5afe192ce'),
41
- AztecAddress.fromString('0x0c66aea9da793f5948b48efef72076cd814424114277feffd69ec13965b08f30'),
42
- AztecAddress.fromString('0x291fc82c5b0d819e7c68b99bad0e3f0a496b77820ecb9998e8ef05d79f50f82e'),
43
- AztecAddress.fromString('0x00690875a3d4e87002d8ce7b051fa0395b5cf3ccb34bbf777de20e32cdafa3ce'),
38
+ AztecAddress.fromString('0x26bfad9c83bed5d1fd497c3d8cb458ee842e37bb6abe00b9140de5c43cec0b0b'),
39
+ AztecAddress.fromString('0x2c01bc5927318e54794740530f3443b42cd8f4d152eecf3b538e2c3001dc0ec8'),
40
+ AztecAddress.fromString('0x05dadbc602c4b7e51f9e6f2d05fc2f3ac28ba14d2b76d002e9c8d15fff92d68d'),
41
+ AztecAddress.fromString('0x0722a72067dd7a43db695957e807157bed0711f730122d5d15c6c4d3cae83e83'),
42
+ AztecAddress.fromString('0x21c9a1a59fa165f5a9741e573e204881fb491e31a41a7bd5c5e5238b4878cce6'),
43
+ AztecAddress.fromString('0x1cb47e9dd0b77e50c014662bb2680928aa93fdd279bdfbb12017c3685781dcf9'),
44
44
  AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
45
45
  AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
46
46
  AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
47
47
  AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
48
48
  AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000')
49
49
  ]);
50
- export const protocolContractsHash = Fr.fromString('0x0fab0e542c2192a8801cb8de87d924305ed3e6c0e055c0c25c549a068aac2ac2');
51
- export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('0x28da3fc471387d4e20b646b77abc8cdfc02a339a7507285a73d84f9b97b13486');
50
+ export const protocolContractsHash = Fr.fromString('0x1588944ebd56c86607cd06fc48d749998e07603b46b4a653da43701448854102');
51
+ export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('0x1fac4c16bff9365b079923d46d85c86b4fcbb5c67c5c65febe8596599412b0ee');
@@ -1,6 +1,6 @@
1
- import { CANONICAL_AUTH_REGISTRY_ADDRESS, CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS, CONTRACT_INSTANCE_PUBLISHED_MAGIC_VALUE, CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS, FEE_JUICE_ADDRESS, MAX_PROTOCOL_CONTRACTS, MULTI_CALL_ENTRYPOINT_ADDRESS, PUBLIC_CHECKS_ADDRESS } from '@aztec/constants';
1
+ import { CANONICAL_AUTH_REGISTRY_ADDRESS, CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS, CONTRACT_INSTANCE_PUBLISHED_MAGIC_VALUE, CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS, FEE_JUICE_ADDRESS, GeneratorIndex, MAX_PROTOCOL_CONTRACTS, MULTI_CALL_ENTRYPOINT_ADDRESS, PUBLIC_CHECKS_ADDRESS } from '@aztec/constants';
2
2
  import { makeTuple } from '@aztec/foundation/array';
3
- import { poseidon2Hash } from '@aztec/foundation/crypto/poseidon';
3
+ import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
4
4
  import { Fr } from '@aztec/foundation/curves/bn254';
5
5
  import { createConsoleLogger } from '@aztec/foundation/log';
6
6
  import { loadContractArtifact } from '@aztec/stdlib/abi';
@@ -117,10 +117,10 @@ async function generateProtocolContractsList(names, derivedAddresses) {
117
117
  // Generate the siloed log tags for events emitted via private logs.
118
118
  async function generateLogTags() {
119
119
  return `
120
- export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('${await poseidon2Hash([
120
+ export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('${await poseidon2HashWithSeparator([
121
121
  CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS,
122
122
  CONTRACT_INSTANCE_PUBLISHED_MAGIC_VALUE
123
- ])}');
123
+ ], GeneratorIndex.PRIVATE_LOG_FIRST_FIELD)}');
124
124
  `;
125
125
  }
126
126
  async function generateOutputFile(names, derivedAddresses) {
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.59e663cd",
5
+ "version": "0.0.1-commit.5cf06de3",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": "./dest/index.js",
@@ -73,9 +73,9 @@
73
73
  ]
74
74
  },
75
75
  "dependencies": {
76
- "@aztec/constants": "0.0.1-commit.59e663cd",
77
- "@aztec/foundation": "0.0.1-commit.59e663cd",
78
- "@aztec/stdlib": "0.0.1-commit.59e663cd",
76
+ "@aztec/constants": "0.0.1-commit.5cf06de3",
77
+ "@aztec/foundation": "0.0.1-commit.5cf06de3",
78
+ "@aztec/stdlib": "0.0.1-commit.5cf06de3",
79
79
  "lodash.chunk": "^4.2.0",
80
80
  "lodash.omit": "^4.5.0",
81
81
  "tslib": "^2.4.0"
@@ -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/src/events/class_published.nr`.
32
+ // See how the log is serialized in `noir-projects/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();
@@ -41,23 +41,23 @@ PublicChecks: AztecAddress.fromBigInt(6n)
41
41
 
42
42
 
43
43
  export const ProtocolContractDerivedAddress = {
44
- AuthRegistry: AztecAddress.fromString('0x16c5a89fcf030e4cc8bfaafc3031f47fbd0b7714a279637c95661c2df81a56b9'),
45
- ContractInstanceRegistry: AztecAddress.fromString('0x19b33a79194a04dd6b7277c3128f93f070288070c7d3d061fe960d394b0aea66'),
46
- ContractClassRegistry: AztecAddress.fromString('0x0741d4c81bdd9f73ec58c0443c72998c1ca66f731663bc73c8703df5afe192ce'),
47
- MultiCallEntrypoint: AztecAddress.fromString('0x0c66aea9da793f5948b48efef72076cd814424114277feffd69ec13965b08f30'),
48
- FeeJuice: AztecAddress.fromString('0x291fc82c5b0d819e7c68b99bad0e3f0a496b77820ecb9998e8ef05d79f50f82e'),
49
- PublicChecks: AztecAddress.fromString('0x00690875a3d4e87002d8ce7b051fa0395b5cf3ccb34bbf777de20e32cdafa3ce')
44
+ AuthRegistry: AztecAddress.fromString('0x26bfad9c83bed5d1fd497c3d8cb458ee842e37bb6abe00b9140de5c43cec0b0b'),
45
+ ContractInstanceRegistry: AztecAddress.fromString('0x2c01bc5927318e54794740530f3443b42cd8f4d152eecf3b538e2c3001dc0ec8'),
46
+ ContractClassRegistry: AztecAddress.fromString('0x05dadbc602c4b7e51f9e6f2d05fc2f3ac28ba14d2b76d002e9c8d15fff92d68d'),
47
+ MultiCallEntrypoint: AztecAddress.fromString('0x0722a72067dd7a43db695957e807157bed0711f730122d5d15c6c4d3cae83e83'),
48
+ FeeJuice: AztecAddress.fromString('0x21c9a1a59fa165f5a9741e573e204881fb491e31a41a7bd5c5e5238b4878cce6'),
49
+ PublicChecks: AztecAddress.fromString('0x1cb47e9dd0b77e50c014662bb2680928aa93fdd279bdfbb12017c3685781dcf9')
50
50
  };
51
51
 
52
52
 
53
53
 
54
54
  export const ProtocolContractsList = new ProtocolContracts([
55
- AztecAddress.fromString('0x16c5a89fcf030e4cc8bfaafc3031f47fbd0b7714a279637c95661c2df81a56b9'),
56
- AztecAddress.fromString('0x19b33a79194a04dd6b7277c3128f93f070288070c7d3d061fe960d394b0aea66'),
57
- AztecAddress.fromString('0x0741d4c81bdd9f73ec58c0443c72998c1ca66f731663bc73c8703df5afe192ce'),
58
- AztecAddress.fromString('0x0c66aea9da793f5948b48efef72076cd814424114277feffd69ec13965b08f30'),
59
- AztecAddress.fromString('0x291fc82c5b0d819e7c68b99bad0e3f0a496b77820ecb9998e8ef05d79f50f82e'),
60
- AztecAddress.fromString('0x00690875a3d4e87002d8ce7b051fa0395b5cf3ccb34bbf777de20e32cdafa3ce'),
55
+ AztecAddress.fromString('0x26bfad9c83bed5d1fd497c3d8cb458ee842e37bb6abe00b9140de5c43cec0b0b'),
56
+ AztecAddress.fromString('0x2c01bc5927318e54794740530f3443b42cd8f4d152eecf3b538e2c3001dc0ec8'),
57
+ AztecAddress.fromString('0x05dadbc602c4b7e51f9e6f2d05fc2f3ac28ba14d2b76d002e9c8d15fff92d68d'),
58
+ AztecAddress.fromString('0x0722a72067dd7a43db695957e807157bed0711f730122d5d15c6c4d3cae83e83'),
59
+ AztecAddress.fromString('0x21c9a1a59fa165f5a9741e573e204881fb491e31a41a7bd5c5e5238b4878cce6'),
60
+ AztecAddress.fromString('0x1cb47e9dd0b77e50c014662bb2680928aa93fdd279bdfbb12017c3685781dcf9'),
61
61
  AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
62
62
  AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
63
63
  AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
@@ -65,10 +65,10 @@ AztecAddress.fromString('0x00000000000000000000000000000000000000000000000000000
65
65
  AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000')
66
66
  ]);
67
67
 
68
- export const protocolContractsHash = Fr.fromString('0x0fab0e542c2192a8801cb8de87d924305ed3e6c0e055c0c25c549a068aac2ac2');
68
+ export const protocolContractsHash = Fr.fromString('0x1588944ebd56c86607cd06fc48d749998e07603b46b4a653da43701448854102');
69
69
 
70
70
 
71
71
 
72
- export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('0x28da3fc471387d4e20b646b77abc8cdfc02a339a7507285a73d84f9b97b13486');
72
+ export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('0x1fac4c16bff9365b079923d46d85c86b4fcbb5c67c5c65febe8596599412b0ee');
73
73
 
74
74