@aztec/protocol-contracts 0.0.1-commit.9ef841308 → 0.0.1-commit.a89ec08

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.
Files changed (33) hide show
  1. package/artifacts/AuthRegistry.json +394 -5373
  2. package/artifacts/ContractClassRegistry.json +57 -2033
  3. package/artifacts/ContractInstanceRegistry.json +142 -2906
  4. package/artifacts/FeeJuice.json +139 -2993
  5. package/artifacts/MultiCallEntrypoint.json +573 -3657
  6. package/artifacts/PublicChecks.json +544 -3664
  7. package/dest/class-registry/contract_class_published_event.d.ts +1 -1
  8. package/dest/class-registry/contract_class_published_event.d.ts.map +1 -1
  9. package/dest/class-registry/contract_class_published_event.js +3 -1
  10. package/dest/class-registry/index.d.ts +3 -1
  11. package/dest/class-registry/index.d.ts.map +1 -1
  12. package/dest/class-registry/index.js +2 -0
  13. package/dest/class-registry/lazy.d.ts +3 -1
  14. package/dest/class-registry/lazy.d.ts.map +1 -1
  15. package/dest/class-registry/lazy.js +2 -0
  16. package/dest/class-registry/private_function_broadcasted_event.d.ts +44 -0
  17. package/dest/class-registry/private_function_broadcasted_event.d.ts.map +1 -0
  18. package/dest/class-registry/private_function_broadcasted_event.js +85 -0
  19. package/dest/class-registry/utility_function_broadcasted_event.d.ts +38 -0
  20. package/dest/class-registry/utility_function_broadcasted_event.d.ts.map +1 -0
  21. package/dest/class-registry/utility_function_broadcasted_event.js +81 -0
  22. package/dest/protocol_contract_data.js +37 -37
  23. package/dest/tests/fixtures.d.ts +3 -1
  24. package/dest/tests/fixtures.d.ts.map +1 -1
  25. package/dest/tests/fixtures.js +10 -0
  26. package/package.json +4 -4
  27. package/src/class-registry/contract_class_published_event.ts +2 -0
  28. package/src/class-registry/index.ts +2 -0
  29. package/src/class-registry/lazy.ts +2 -0
  30. package/src/class-registry/private_function_broadcasted_event.ts +109 -0
  31. package/src/class-registry/utility_function_broadcasted_event.ts +103 -0
  32. package/src/protocol_contract_data.ts +37 -37
  33. package/src/tests/fixtures.ts +12 -0
@@ -0,0 +1,109 @@
1
+ import {
2
+ ARTIFACT_FUNCTION_TREE_MAX_HEIGHT,
3
+ CONTRACT_CLASS_REGISTRY_PRIVATE_FUNCTION_BROADCASTED_MAGIC_VALUE,
4
+ FUNCTION_TREE_HEIGHT,
5
+ MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS,
6
+ } from '@aztec/constants';
7
+ import { Fr } from '@aztec/foundation/curves/bn254';
8
+ import type { Tuple } from '@aztec/foundation/serialize';
9
+ import { FieldReader } from '@aztec/foundation/serialize';
10
+ import { FunctionSelector, bufferFromFields } from '@aztec/stdlib/abi';
11
+ import type { ExecutablePrivateFunctionWithMembershipProof, PrivateFunction } from '@aztec/stdlib/contract';
12
+ import type { ContractClassLog } from '@aztec/stdlib/logs';
13
+
14
+ import { ProtocolContractAddress } from '../protocol_contract_data.js';
15
+
16
+ /** Event emitted from the ContractClassRegistry. */
17
+ export class PrivateFunctionBroadcastedEvent {
18
+ constructor(
19
+ public readonly contractClassId: Fr,
20
+ public readonly artifactMetadataHash: Fr,
21
+ public readonly utilityFunctionsTreeRoot: Fr,
22
+ public readonly privateFunctionTreeSiblingPath: Tuple<Fr, typeof FUNCTION_TREE_HEIGHT>,
23
+ public readonly privateFunctionTreeLeafIndex: number,
24
+ public readonly artifactFunctionTreeSiblingPath: Tuple<Fr, typeof ARTIFACT_FUNCTION_TREE_MAX_HEIGHT>,
25
+ public readonly artifactFunctionTreeLeafIndex: number,
26
+ public readonly privateFunction: BroadcastedPrivateFunction,
27
+ ) {}
28
+
29
+ static isPrivateFunctionBroadcastedEvent(log: ContractClassLog) {
30
+ return (
31
+ log.contractAddress.equals(ProtocolContractAddress.ContractClassRegistry) &&
32
+ log.fields.fields[0].toBigInt() === CONTRACT_CLASS_REGISTRY_PRIVATE_FUNCTION_BROADCASTED_MAGIC_VALUE
33
+ );
34
+ }
35
+
36
+ static fromLog(log: ContractClassLog) {
37
+ const reader = new FieldReader(log.fields.fields.slice(1));
38
+ const event = PrivateFunctionBroadcastedEvent.fromFields(reader);
39
+ while (!reader.isFinished()) {
40
+ const field = reader.readField();
41
+ if (!field.isZero()) {
42
+ throw new Error(`Unexpected data after parsing PrivateFunctionBroadcastedEvent: ${field.toString()}`);
43
+ }
44
+ }
45
+
46
+ return event;
47
+ }
48
+
49
+ static fromFields(fields: Fr[] | FieldReader) {
50
+ const reader = FieldReader.asReader(fields);
51
+ const contractClassId = reader.readField();
52
+ const artifactMetadataHash = reader.readField();
53
+ const utilityFunctionsTreeRoot = reader.readField();
54
+ const privateFunctionTreeSiblingPath = reader.readFieldArray(FUNCTION_TREE_HEIGHT);
55
+ const privateFunctionTreeLeafIndex = reader.readField().toNumber();
56
+ const artifactFunctionTreeSiblingPath = reader.readFieldArray(ARTIFACT_FUNCTION_TREE_MAX_HEIGHT);
57
+ const artifactFunctionTreeLeafIndex = reader.readField().toNumber();
58
+ const privateFunction = BroadcastedPrivateFunction.fromFields(reader);
59
+
60
+ return new PrivateFunctionBroadcastedEvent(
61
+ contractClassId,
62
+ artifactMetadataHash,
63
+ utilityFunctionsTreeRoot,
64
+ privateFunctionTreeSiblingPath,
65
+ privateFunctionTreeLeafIndex,
66
+ artifactFunctionTreeSiblingPath,
67
+ artifactFunctionTreeLeafIndex,
68
+ privateFunction,
69
+ );
70
+ }
71
+
72
+ toFunctionWithMembershipProof(): ExecutablePrivateFunctionWithMembershipProof {
73
+ return {
74
+ ...this.privateFunction,
75
+ bytecode: this.privateFunction.bytecode,
76
+ functionMetadataHash: this.privateFunction.metadataHash,
77
+ artifactMetadataHash: this.artifactMetadataHash,
78
+ utilityFunctionsTreeRoot: this.utilityFunctionsTreeRoot,
79
+ privateFunctionTreeSiblingPath: this.privateFunctionTreeSiblingPath,
80
+ privateFunctionTreeLeafIndex: this.privateFunctionTreeLeafIndex,
81
+ artifactTreeSiblingPath: this.artifactFunctionTreeSiblingPath.filter(fr => !fr.isZero()),
82
+ artifactTreeLeafIndex: this.artifactFunctionTreeLeafIndex,
83
+ };
84
+ }
85
+ }
86
+
87
+ export class BroadcastedPrivateFunction implements PrivateFunction {
88
+ constructor(
89
+ /** Selector of the function. Calculated as the hash of the method name and parameters. The specification of this is not enforced by the protocol. */
90
+ public readonly selector: FunctionSelector,
91
+ /** Artifact metadata hash */
92
+ public readonly metadataHash: Fr,
93
+ /** Hash of the verification key associated to this private function. */
94
+ public readonly vkHash: Fr,
95
+ /** ACIR and Brillig bytecode */
96
+ public readonly bytecode: Buffer,
97
+ ) {}
98
+
99
+ static fromFields(fields: Fr[] | FieldReader) {
100
+ const reader = FieldReader.asReader(fields);
101
+ const selector = FunctionSelector.fromField(reader.readField());
102
+ const metadataHash = reader.readField();
103
+ const vkHash = reader.readField();
104
+ // The '* 1' removes the 'Type instantiation is excessively deep and possibly infinite. ts(2589)' err
105
+ const encodedBytecode = reader.readFieldArray(MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS * 1);
106
+ const bytecode = bufferFromFields(encodedBytecode);
107
+ return new BroadcastedPrivateFunction(selector, metadataHash, vkHash, bytecode);
108
+ }
109
+ }
@@ -0,0 +1,103 @@
1
+ import {
2
+ ARTIFACT_FUNCTION_TREE_MAX_HEIGHT,
3
+ CONTRACT_CLASS_REGISTRY_UTILITY_FUNCTION_BROADCASTED_MAGIC_VALUE,
4
+ MAX_PACKED_BYTECODE_SIZE_PER_UTILITY_FUNCTION_IN_FIELDS,
5
+ } from '@aztec/constants';
6
+ import { removeArrayPaddingEnd } from '@aztec/foundation/collection';
7
+ import { Fr } from '@aztec/foundation/curves/bn254';
8
+ import type { Tuple } from '@aztec/foundation/serialize';
9
+ import { FieldReader } from '@aztec/foundation/serialize';
10
+ import { FunctionSelector, bufferFromFields } from '@aztec/stdlib/abi';
11
+ import type { UtilityFunction, UtilityFunctionWithMembershipProof } from '@aztec/stdlib/contract';
12
+ import type { ContractClassLog } from '@aztec/stdlib/logs';
13
+
14
+ import { ProtocolContractAddress } from '../protocol_contract_data.js';
15
+
16
+ /** Event emitted from the ContractClassRegistry. */
17
+ export class UtilityFunctionBroadcastedEvent {
18
+ constructor(
19
+ public readonly contractClassId: Fr,
20
+ public readonly artifactMetadataHash: Fr,
21
+ public readonly privateFunctionsArtifactTreeRoot: Fr,
22
+ public readonly artifactFunctionTreeSiblingPath: Tuple<Fr, typeof ARTIFACT_FUNCTION_TREE_MAX_HEIGHT>,
23
+ public readonly artifactFunctionTreeLeafIndex: number,
24
+ public readonly utilityFunction: BroadcastedUtilityFunction,
25
+ ) {}
26
+
27
+ static isUtilityFunctionBroadcastedEvent(log: ContractClassLog) {
28
+ return (
29
+ log.contractAddress.equals(ProtocolContractAddress.ContractClassRegistry) &&
30
+ log.fields.fields[0].toBigInt() === CONTRACT_CLASS_REGISTRY_UTILITY_FUNCTION_BROADCASTED_MAGIC_VALUE
31
+ );
32
+ }
33
+
34
+ static fromLog(log: ContractClassLog) {
35
+ const reader = new FieldReader(log.fields.fields.slice(1));
36
+ const event = UtilityFunctionBroadcastedEvent.fromFields(reader);
37
+ while (!reader.isFinished()) {
38
+ const field = reader.readField();
39
+ if (!field.isZero()) {
40
+ throw new Error(`Unexpected data after parsing UtilityFunctionBroadcastedEvent: ${field.toString()}`);
41
+ }
42
+ }
43
+
44
+ return event;
45
+ }
46
+
47
+ static fromFields(fields: Fr[] | FieldReader) {
48
+ const reader = FieldReader.asReader(fields);
49
+ const contractClassId = reader.readField();
50
+ const artifactMetadataHash = reader.readField();
51
+ const privateFunctionsArtifactTreeRoot = reader.readField();
52
+ const artifactFunctionTreeSiblingPath = reader.readFieldArray(ARTIFACT_FUNCTION_TREE_MAX_HEIGHT);
53
+ const artifactFunctionTreeLeafIndex = reader.readField().toNumber();
54
+ const utilityFunction = BroadcastedUtilityFunction.fromFields(reader);
55
+
56
+ return new UtilityFunctionBroadcastedEvent(
57
+ contractClassId,
58
+ artifactMetadataHash,
59
+ privateFunctionsArtifactTreeRoot,
60
+ artifactFunctionTreeSiblingPath,
61
+ artifactFunctionTreeLeafIndex,
62
+ utilityFunction,
63
+ );
64
+ }
65
+
66
+ toFunctionWithMembershipProof(): UtilityFunctionWithMembershipProof {
67
+ // We should be able to safely remove the zero elements that pad the variable-length sibling path,
68
+ // since a sibling with value zero can only occur on the tree leaves, so the sibling path will never end
69
+ // in a zero. The only exception is a tree with depth 2 with one non-zero leaf, where the sibling path would
70
+ // be a single zero element, but in that case the artifact tree should be just the single leaf.
71
+ const artifactTreeSiblingPath = removeArrayPaddingEnd(this.artifactFunctionTreeSiblingPath, Fr.isZero);
72
+ return {
73
+ ...this.utilityFunction,
74
+ bytecode: this.utilityFunction.bytecode,
75
+ functionMetadataHash: this.utilityFunction.metadataHash,
76
+ artifactMetadataHash: this.artifactMetadataHash,
77
+ privateFunctionsArtifactTreeRoot: this.privateFunctionsArtifactTreeRoot,
78
+ artifactTreeSiblingPath,
79
+ artifactTreeLeafIndex: this.artifactFunctionTreeLeafIndex,
80
+ };
81
+ }
82
+ }
83
+
84
+ export class BroadcastedUtilityFunction implements UtilityFunction {
85
+ constructor(
86
+ /** Selector of the function. Calculated as the hash of the method name and parameters. The specification of this is not enforced by the protocol. */
87
+ public readonly selector: FunctionSelector,
88
+ /** Artifact metadata hash */
89
+ public readonly metadataHash: Fr,
90
+ /** Brillig bytecode */
91
+ public readonly bytecode: Buffer,
92
+ ) {}
93
+
94
+ static fromFields(fields: Fr[] | FieldReader) {
95
+ const reader = FieldReader.asReader(fields);
96
+ const selector = FunctionSelector.fromField(reader.readField());
97
+ const metadataHash = reader.readField();
98
+ // The '* 1' removes the 'Type instantiation is excessively deep and possibly infinite. ts(2589)' err
99
+ const encodedBytecode = reader.readFieldArray(MAX_PACKED_BYTECODE_SIZE_PER_UTILITY_FUNCTION_IN_FIELDS * 1);
100
+ const bytecode = bufferFromFields(encodedBytecode);
101
+ return new BroadcastedUtilityFunction(selector, metadataHash, bytecode);
102
+ }
103
+ }
@@ -42,55 +42,55 @@ PublicChecks: AztecAddress.fromBigInt(6n)
42
42
 
43
43
 
44
44
  export const ProtocolContractDerivedAddress = {
45
- AuthRegistry: AztecAddress.fromString('0x0955edec896e15f6f405bb704d349a3e50fd301afbe293f1c8ad347efe8a3acb'),
46
- ContractInstanceRegistry: AztecAddress.fromString('0x1248ac9927762017c75d333f8eb19177025c7a942981a99e92490f5133ae716a'),
47
- ContractClassRegistry: AztecAddress.fromString('0x1378f6d83443d61cebbc432712ee49da558c557c40c391750fefce04826a9ce6'),
48
- MultiCallEntrypoint: AztecAddress.fromString('0x0203a0b1b93eb66818fbead8bb5b7a464204ed851a95b2ee8789306f1af7f796'),
49
- FeeJuice: AztecAddress.fromString('0x0d20a03336d11485e1c0a7578782fda5dd50492f453650d821c2d91deae48649'),
50
- PublicChecks: AztecAddress.fromString('0x1d4eabb2acd49c85ee81d0e064777d86b0d47d629858f989bba6fa30df74f098')
45
+ AuthRegistry: AztecAddress.fromString('0x139f8eb6d6e7e7a7c0322c3b7558687a7e24201f11bf2c4cb2fe56c18d363695'),
46
+ ContractInstanceRegistry: AztecAddress.fromString('0x1254246c88aca5a66fa66f3aa78c408a698ebca3b713120497c7555dfc718592'),
47
+ ContractClassRegistry: AztecAddress.fromString('0x14d670efa326a07b99777b01fb706427ca776095246569150f2a3f17a7d4dc66'),
48
+ MultiCallEntrypoint: AztecAddress.fromString('0x230d0b47ba6d5ed99afb89d584f32ff33438b64f51000f252a140cf995781628'),
49
+ FeeJuice: AztecAddress.fromString('0x204913186c0dd70015d05bf9100a12e31ccb7cc2527aacdfae0c19ad6439fcf4'),
50
+ PublicChecks: AztecAddress.fromString('0x1198142fd84a58c0ab22d5fde371ce527042db49487e05206a326ad154952ac8')
51
51
  };
52
52
 
53
53
 
54
54
 
55
55
  export const ProtocolContractClassId: Record<ProtocolContractName, Fr> = {
56
- AuthRegistry: Fr.fromString('0x28cf2182e8c746f00af13457f90b9182d5a2ab092b853e258c0ef2ed5b59ecf3'),
57
- ContractInstanceRegistry: Fr.fromString('0x101ab410f4b81317be705851b1375232d8b3e5779978372d04df77c8beb93086'),
58
- ContractClassRegistry: Fr.fromString('0x15490ac1701acd7366ada630e082a248e414894928dec70d072126b0c93debd5'),
59
- MultiCallEntrypoint: Fr.fromString('0x125a9d4e995ea0fc1030fe56cf05a25a7bc79b09f4cc89a02ad0df1e061b2783'),
60
- FeeJuice: Fr.fromString('0x162dd5be99ce8fbd38f8a3434836de1021249562a7f9f38493078325360c8d14'),
61
- PublicChecks: Fr.fromString('0x2fb2e10806b694290c2a6d968865052004e89fd1cf0212b3c791c4e82ff36f8e')
56
+ AuthRegistry: Fr.fromString('0x17ad10e1b5dba2877b9a973449c03d5227f2c719c0eb1989427c10c1d83867a5'),
57
+ ContractInstanceRegistry: Fr.fromString('0x187c710b0d69b2da7a6f0663c15093a5d595c04e77762c249aa9b654bc12158c'),
58
+ ContractClassRegistry: Fr.fromString('0x013466b8a65dea98ad80c119cf236a0acf53acfede687769410cfd57876b8242'),
59
+ MultiCallEntrypoint: Fr.fromString('0x1acd7ab8bf186c16eafc9c4fe9049f35df27e172bb2d8319a2a22ddd0006966d'),
60
+ FeeJuice: Fr.fromString('0x16b2d5ef5044c11126a16ccdb3778082eb423375977da9458d493fdf84505e81'),
61
+ PublicChecks: Fr.fromString('0x03f2ebaef8d692422185e35d8fe35d0bb7289702cf023b525c022d77fc6b5ed5')
62
62
  };
63
63
 
64
64
  export const ProtocolContractClassIdPreimage: Record<ProtocolContractName, { artifactHash: Fr; privateFunctionsRoot: Fr; publicBytecodeCommitment: Fr }> = {
65
65
  AuthRegistry: {
66
- artifactHash: Fr.fromString('0x05f09c97f68d05af6e2704c3b74b870b5d94865e8832ec0ac4fbeacc6e8a2e90'),
67
- privateFunctionsRoot: Fr.fromString('0x27784529e3cec8776bdc7a624084353cf1372b247279344625458dbd14b6f1f6'),
68
- publicBytecodeCommitment: Fr.fromString('0x28cfc03b3eb55cff2f03bb573fb5a9a014e83fbcb37ec2f0ee72866c35d6f95f'),
66
+ artifactHash: Fr.fromString('0x029f3b5582e9e2f9cddb4f887fa67c06d8dbe9aef604aa7de91a6f5328bf477c'),
67
+ privateFunctionsRoot: Fr.fromString('0x0826df9bf86cf460935b2bd024edcb5a58532fcf0392abbdb33f5f2150753756'),
68
+ publicBytecodeCommitment: Fr.fromString('0x22db1f0a70bfefaf90371c7728e558cf60507b718e99ed276ed3143bec615f6f'),
69
69
  },
70
70
  ContractInstanceRegistry: {
71
- artifactHash: Fr.fromString('0x24bb640b5b8c5d553f6b00ecd0f1fbbc43334109219728a915f0311cbcadca8b'),
72
- privateFunctionsRoot: Fr.fromString('0x1a5ad2d8a129666ca3d7eb7e801e1239517fbccc10be0334b39100b17fbc96d2'),
73
- publicBytecodeCommitment: Fr.fromString('0x14512a81eae728ff93f7d6ed568b231c33364a4dba36bfe0f239761065df2a67'),
71
+ artifactHash: Fr.fromString('0x18601566bacdca7a5a40528f221b04ee7b74f382e6cd34fbdf69d31c50d5ee88'),
72
+ privateFunctionsRoot: Fr.fromString('0x136a6705c7ad1d47f65cb881a56909d4c78d3fa8944f5b103734cd91e654ed63'),
73
+ publicBytecodeCommitment: Fr.fromString('0x01c573f470ba9a17d362c7dd5a28931c39432f9ce527555049c71432f895ad6c'),
74
74
  },
75
75
  ContractClassRegistry: {
76
- artifactHash: Fr.fromString('0x2c50755a4c70f9cea6e1c9e07189554cd62bafb22107720c9cea29392d179fee'),
77
- privateFunctionsRoot: Fr.fromString('0x2bbf7adfd5b94bfd32760346d955342e967aab205e1ddafe71755223a1ea56b3'),
76
+ artifactHash: Fr.fromString('0x232d868db8a4d1e0f013efa4bfe5c39d96e11f16a62e3e73abbbafc3028fc410'),
77
+ privateFunctionsRoot: Fr.fromString('0x2ac3bf890a7d534a768079aa86889caa1a86373c8e6fc2db48215b11bbb79106'),
78
78
  publicBytecodeCommitment: Fr.fromString('0x0ce4c618c3ed7f3a20410e618c06bb701e150af7fe28a3e92f68e7733809f33e'),
79
79
  },
80
80
  MultiCallEntrypoint: {
81
- artifactHash: Fr.fromString('0x03c5518b55f8d560e4797cb0d3252410ee378953275077542c2a30387423e0b4'),
82
- privateFunctionsRoot: Fr.fromString('0x274e418b4b3723ace4b55099f926e76d883a8c057a34296f15a52e04ea4ec593'),
81
+ artifactHash: Fr.fromString('0x0d30526b6b786cf887d7e44ba59d2e9561d5791b0e3c78c681d0499ae45b225a'),
82
+ privateFunctionsRoot: Fr.fromString('0x266505ecb7c02ce6e227227c0b6bdb44713c8ecd43164ee7bb00b8fb340e8b03'),
83
83
  publicBytecodeCommitment: Fr.fromString('0x0ce4c618c3ed7f3a20410e618c06bb701e150af7fe28a3e92f68e7733809f33e'),
84
84
  },
85
85
  FeeJuice: {
86
- artifactHash: Fr.fromString('0x0750f796b97b8bf554313bb98f6a2bfc9cf8fd49adccad7ff3b993cb7db00d79'),
86
+ artifactHash: Fr.fromString('0x2eb476f12cce5207be118047fb7f603378b78aa619d6539a4d9eec4700ea2507'),
87
87
  privateFunctionsRoot: Fr.fromString('0x0abef3cfc6ae314886c841b42dc33d3eed255ad3dee7773daabf05b229573759'),
88
- publicBytecodeCommitment: Fr.fromString('0x2f2fd4c1d886faa614efbc750c5e49ad0fa83fc5a411f42ea0a70cab49f6251e'),
88
+ publicBytecodeCommitment: Fr.fromString('0x2a144b28b36efa21b7488467aba7e06b33e016d00bfe083a7bfa06ad6ff5aa2f'),
89
89
  },
90
90
  PublicChecks: {
91
- artifactHash: Fr.fromString('0x051b62a68013202078e5a06a8783772166181df544f25bea84a84a184854f83d'),
91
+ artifactHash: Fr.fromString('0x228ea8af66ff150f40a4b01b64115d12777b2f7fd3a4bfc0d97d38a91f139ef6'),
92
92
  privateFunctionsRoot: Fr.fromString('0x067243231eddf4222f3911defbba7705aff06ed45960b27f6f91319196ef97e1'),
93
- publicBytecodeCommitment: Fr.fromString('0x23a718888ee4815f0145eebf241e5a7071e6791ea2fa9b635c48b94d68b97c58'),
93
+ publicBytecodeCommitment: Fr.fromString('0x2d0834fc9468fd2092091852543a2fbd7b6b313c7e5e4defe8730c8065366a03'),
94
94
  }
95
95
  };
96
96
 
@@ -104,10 +104,10 @@ PublicChecks: Fr.fromString('0x0000000000000000000000000000000000000000000000000
104
104
  };
105
105
 
106
106
  export const ProtocolContractPrivateFunctions: Record<ProtocolContractName, { selector: FunctionSelector; vkHash: Fr }[]> = {
107
- AuthRegistry: [{ selector: FunctionSelector.fromField(Fr.fromString('0x0000000000000000000000000000000000000000000000000000000079a3d418')), vkHash: Fr.fromString('0x08f3d088b55a22ddda33df11198647b5d3fa0e0da47b79d88744f26b00fab824') }],
108
- ContractInstanceRegistry: [{ selector: FunctionSelector.fromField(Fr.fromString('0x0000000000000000000000000000000000000000000000000000000016ec12aa')), vkHash: Fr.fromString('0x174db1fba7dfefa38f56ba0e54abb8c01eb2a1f437bb346a97949667e3b7f399') }],
109
- ContractClassRegistry: [{ selector: FunctionSelector.fromField(Fr.fromString('0x000000000000000000000000000000000000000000000000000000006934ed0d')), vkHash: Fr.fromString('0x03df8d6492115c243c78effa13dc3c86a7babd3898cce52083d0d603e51acdfa') }],
110
- MultiCallEntrypoint: [{ selector: FunctionSelector.fromField(Fr.fromString('0x00000000000000000000000000000000000000000000000000000000f04908a9')), vkHash: Fr.fromString('0x01a9fe65b628a72771fe90e3b3cf4d16fa87069b788359624e1820980c0a0dd3') }],
107
+ AuthRegistry: [{ selector: FunctionSelector.fromField(Fr.fromString('0x0000000000000000000000000000000000000000000000000000000079a3d418')), vkHash: Fr.fromString('0x019c553854290b9b547841e45bf45e344d4a2d4f6702fee430ec5897ce7d3b78') }],
108
+ ContractInstanceRegistry: [{ selector: FunctionSelector.fromField(Fr.fromString('0x0000000000000000000000000000000000000000000000000000000016ec12aa')), vkHash: Fr.fromString('0x262f7a90ecf055779001b67dad01a3add1e549f6c27931f0e71e463ce2142b57') }],
109
+ ContractClassRegistry: [{ selector: FunctionSelector.fromField(Fr.fromString('0x000000000000000000000000000000000000000000000000000000006934ed0d')), vkHash: Fr.fromString('0x1163f31e191528254c877fce0c7f62dd738f5552bbd2dda97512fe4777377f5b') }],
110
+ MultiCallEntrypoint: [{ selector: FunctionSelector.fromField(Fr.fromString('0x00000000000000000000000000000000000000000000000000000000f04908a9')), vkHash: Fr.fromString('0x21732ab3cecf633e4c31a030df62c93e35a005b89941fdab568d2818c1355192') }],
111
111
  FeeJuice: [{ selector: FunctionSelector.fromField(Fr.fromString('0x00000000000000000000000000000000000000000000000000000000cbe67243')), vkHash: Fr.fromString('0x2ad6083b4595f8076c014e5152191013167ab1b5a31ad0cbb06490054c7c59ae') }, { selector: FunctionSelector.fromField(Fr.fromString('0x00000000000000000000000000000000000000000000000000000000e8d374b6')), vkHash: Fr.fromString('0x05aaffffdf797625ff24575d939339303775c5db77fb6bdcecbf955f726fd071') }],
112
112
  PublicChecks: []
113
113
  };
@@ -115,12 +115,12 @@ PublicChecks: []
115
115
 
116
116
 
117
117
  export const ProtocolContractsList = new ProtocolContracts([
118
- AztecAddress.fromString('0x0955edec896e15f6f405bb704d349a3e50fd301afbe293f1c8ad347efe8a3acb'),
119
- AztecAddress.fromString('0x1248ac9927762017c75d333f8eb19177025c7a942981a99e92490f5133ae716a'),
120
- AztecAddress.fromString('0x1378f6d83443d61cebbc432712ee49da558c557c40c391750fefce04826a9ce6'),
121
- AztecAddress.fromString('0x0203a0b1b93eb66818fbead8bb5b7a464204ed851a95b2ee8789306f1af7f796'),
122
- AztecAddress.fromString('0x0d20a03336d11485e1c0a7578782fda5dd50492f453650d821c2d91deae48649'),
123
- AztecAddress.fromString('0x1d4eabb2acd49c85ee81d0e064777d86b0d47d629858f989bba6fa30df74f098'),
118
+ AztecAddress.fromString('0x139f8eb6d6e7e7a7c0322c3b7558687a7e24201f11bf2c4cb2fe56c18d363695'),
119
+ AztecAddress.fromString('0x1254246c88aca5a66fa66f3aa78c408a698ebca3b713120497c7555dfc718592'),
120
+ AztecAddress.fromString('0x14d670efa326a07b99777b01fb706427ca776095246569150f2a3f17a7d4dc66'),
121
+ AztecAddress.fromString('0x230d0b47ba6d5ed99afb89d584f32ff33438b64f51000f252a140cf995781628'),
122
+ AztecAddress.fromString('0x204913186c0dd70015d05bf9100a12e31ccb7cc2527aacdfae0c19ad6439fcf4'),
123
+ AztecAddress.fromString('0x1198142fd84a58c0ab22d5fde371ce527042db49487e05206a326ad154952ac8'),
124
124
  AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
125
125
  AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
126
126
  AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
@@ -128,7 +128,7 @@ AztecAddress.fromString('0x00000000000000000000000000000000000000000000000000000
128
128
  AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000')
129
129
  ]);
130
130
 
131
- export const protocolContractsHash = Fr.fromString('0x1b7c3ddb8164493fbe45bec0110c7308069669ed5d0913764e7fd73cec199f55');
131
+ export const protocolContractsHash = Fr.fromString('0x2672340d9a0107a7b81e6d10d25b854debe613f3272e8738e8df0ca2ff297141');
132
132
 
133
133
 
134
134
 
@@ -8,6 +8,18 @@ export function getSampleContractClassPublishedEventPayload(): Buffer {
8
8
  return Buffer.from(readFileSync(path).toString(), 'hex');
9
9
  }
10
10
 
11
+ // Generated from end-to-end/src/e2e_deploy_contract/contract_class_registration.test.ts with AZTEC_GENERATE_TEST_DATA=1
12
+ export function getSamplePrivateFunctionBroadcastedEventPayload(): Buffer {
13
+ const path = getPathToFixture('PrivateFunctionBroadcastedEventData.hex');
14
+ return Buffer.from(readFileSync(path).toString(), 'hex');
15
+ }
16
+
17
+ // Generated from end-to-end/src/e2e_deploy_contract/contract_class_registration.test.ts with AZTEC_GENERATE_TEST_DATA=1
18
+ export function getSampleUtilityFunctionBroadcastedEventPayload(): Buffer {
19
+ const path = getPathToFixture('UtilityFunctionBroadcastedEventData.hex');
20
+ return Buffer.from(readFileSync(path).toString(), 'hex');
21
+ }
22
+
11
23
  // Generated from end-to-end/src/e2e_deploy_contract/contract_class_registration.test.ts with AZTEC_GENERATE_TEST_DATA=1
12
24
  export function getSampleContractInstancePublishedEventPayload(): Buffer {
13
25
  const path = getPathToFixture('ContractInstancePublishedEventData.hex');