@aztec/protocol-contracts 0.83.1 → 0.84.0

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 (32) hide show
  1. package/artifacts/AuthRegistry.json +410 -406
  2. package/artifacts/ContractClassRegisterer.json +229 -227
  3. package/artifacts/ContractInstanceDeployer.json +286 -284
  4. package/artifacts/FeeJuice.json +266 -264
  5. package/artifacts/MultiCallEntrypoint.json +29 -27
  6. package/artifacts/Router.json +282 -280
  7. package/dest/class-registerer/contract_class_registered_event.js +1 -1
  8. package/dest/class-registerer/index.d.ts +1 -1
  9. package/dest/class-registerer/index.d.ts.map +1 -1
  10. package/dest/class-registerer/index.js +1 -1
  11. package/dest/class-registerer/lazy.d.ts +1 -1
  12. package/dest/class-registerer/lazy.d.ts.map +1 -1
  13. package/dest/class-registerer/lazy.js +1 -1
  14. package/dest/class-registerer/private_function_broadcasted_event.d.ts +2 -2
  15. package/dest/class-registerer/private_function_broadcasted_event.d.ts.map +1 -1
  16. package/dest/class-registerer/private_function_broadcasted_event.js +6 -6
  17. package/dest/class-registerer/{unconstrained_function_broadcasted_event.d.ts → utility_function_broadcasted_event.d.ts} +11 -11
  18. package/dest/class-registerer/utility_function_broadcasted_event.d.ts.map +1 -0
  19. package/dest/class-registerer/{unconstrained_function_broadcasted_event.js → utility_function_broadcasted_event.js} +14 -14
  20. package/dest/protocol_contract_data.js +7 -7
  21. package/dest/tests/fixtures.d.ts +1 -1
  22. package/dest/tests/fixtures.d.ts.map +1 -1
  23. package/dest/tests/fixtures.js +2 -2
  24. package/package.json +4 -4
  25. package/src/class-registerer/contract_class_registered_event.ts +1 -1
  26. package/src/class-registerer/index.ts +1 -1
  27. package/src/class-registerer/lazy.ts +1 -1
  28. package/src/class-registerer/private_function_broadcasted_event.ts +4 -4
  29. package/src/class-registerer/{unconstrained_function_broadcasted_event.ts → utility_function_broadcasted_event.ts} +15 -15
  30. package/src/protocol_contract_data.ts +7 -7
  31. package/src/tests/fixtures.ts +2 -2
  32. package/dest/class-registerer/unconstrained_function_broadcasted_event.d.ts.map +0 -1
@@ -46,7 +46,7 @@ import { REGISTERER_CONTRACT_CLASS_REGISTERED_TAG } from '../protocol_contract_d
46
46
  privateFunctionsRoot: this.privateFunctionsRoot,
47
47
  version: this.version,
48
48
  privateFunctions: [],
49
- unconstrainedFunctions: []
49
+ utilityFunctions: []
50
50
  };
51
51
  }
52
52
  }
@@ -1,7 +1,7 @@
1
1
  import type { ProtocolContract } from '../protocol_contract.js';
2
2
  export * from './contract_class_registered_event.js';
3
3
  export * from './private_function_broadcasted_event.js';
4
- export * from './unconstrained_function_broadcasted_event.js';
4
+ export * from './utility_function_broadcasted_event.js';
5
5
  export declare const ContractClassRegistererArtifact: import("@aztec/stdlib/abi").ContractArtifact;
6
6
  /** Returns the canonical deployment of the contract. */
7
7
  export declare function getCanonicalClassRegisterer(): Promise<ProtocolContract>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/class-registerer/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAE9D,eAAO,MAAM,+BAA+B,8CAE3C,CAAC;AAIF,wDAAwD;AACxD,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAM7E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/class-registerer/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AAExD,eAAO,MAAM,+BAA+B,8CAE3C,CAAC;AAIF,wDAAwD;AACxD,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAM7E"}
@@ -5,7 +5,7 @@ import ContractClassRegistererJson from '../../artifacts/ContractClassRegisterer
5
5
  import { makeProtocolContract } from '../make_protocol_contract.js';
6
6
  export * from './contract_class_registered_event.js';
7
7
  export * from './private_function_broadcasted_event.js';
8
- export * from './unconstrained_function_broadcasted_event.js';
8
+ export * from './utility_function_broadcasted_event.js';
9
9
  export const ContractClassRegistererArtifact = loadContractArtifact(ContractClassRegistererJson);
10
10
  let protocolContract;
11
11
  /** Returns the canonical deployment of the contract. */ export async function getCanonicalClassRegisterer() {
@@ -2,7 +2,7 @@ import { type ContractArtifact } from '@aztec/stdlib/abi';
2
2
  import type { ProtocolContract } from '../protocol_contract.js';
3
3
  export * from './contract_class_registered_event.js';
4
4
  export * from './private_function_broadcasted_event.js';
5
- export * from './unconstrained_function_broadcasted_event.js';
5
+ export * from './utility_function_broadcasted_event.js';
6
6
  export declare function getContractClassRegistererArtifact(): Promise<ContractArtifact>;
7
7
  /** Returns the canonical deployment of the auth registry. */
8
8
  export declare function getCanonicalClassRegisterer(): Promise<ProtocolContract>;
@@ -1 +1 @@
1
- {"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../src/class-registerer/lazy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAwB,MAAM,mBAAmB,CAAC;AAGhF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAK9D,wBAAsB,kCAAkC,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAWpF;AAED,6DAA6D;AAC7D,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAM7E"}
1
+ {"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../src/class-registerer/lazy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAwB,MAAM,mBAAmB,CAAC;AAGhF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AAKxD,wBAAsB,kCAAkC,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAWpF;AAED,6DAA6D;AAC7D,wBAAsB,2BAA2B,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAM7E"}
@@ -2,7 +2,7 @@ import { loadContractArtifact } from '@aztec/stdlib/abi';
2
2
  import { makeProtocolContract } from '../make_protocol_contract.js';
3
3
  export * from './contract_class_registered_event.js';
4
4
  export * from './private_function_broadcasted_event.js';
5
- export * from './unconstrained_function_broadcasted_event.js';
5
+ export * from './utility_function_broadcasted_event.js';
6
6
  let protocolContract;
7
7
  let protocolContractArtifact;
8
8
  export async function getContractClassRegistererArtifact() {
@@ -11,13 +11,13 @@ import type { ContractClassLog } from '@aztec/stdlib/logs';
11
11
  export declare class PrivateFunctionBroadcastedEvent {
12
12
  readonly contractClassId: Fr;
13
13
  readonly artifactMetadataHash: Fr;
14
- readonly unconstrainedFunctionsArtifactTreeRoot: Fr;
14
+ readonly utilityFunctionsTreeRoot: Fr;
15
15
  readonly privateFunctionTreeSiblingPath: Tuple<Fr, typeof FUNCTION_TREE_HEIGHT>;
16
16
  readonly privateFunctionTreeLeafIndex: number;
17
17
  readonly artifactFunctionTreeSiblingPath: Tuple<Fr, typeof ARTIFACT_FUNCTION_TREE_MAX_HEIGHT>;
18
18
  readonly artifactFunctionTreeLeafIndex: number;
19
19
  readonly privateFunction: BroadcastedPrivateFunction;
20
- constructor(contractClassId: Fr, artifactMetadataHash: Fr, unconstrainedFunctionsArtifactTreeRoot: Fr, privateFunctionTreeSiblingPath: Tuple<Fr, typeof FUNCTION_TREE_HEIGHT>, privateFunctionTreeLeafIndex: number, artifactFunctionTreeSiblingPath: Tuple<Fr, typeof ARTIFACT_FUNCTION_TREE_MAX_HEIGHT>, artifactFunctionTreeLeafIndex: number, privateFunction: BroadcastedPrivateFunction);
20
+ constructor(contractClassId: Fr, artifactMetadataHash: Fr, utilityFunctionsTreeRoot: Fr, privateFunctionTreeSiblingPath: Tuple<Fr, typeof FUNCTION_TREE_HEIGHT>, privateFunctionTreeLeafIndex: number, artifactFunctionTreeSiblingPath: Tuple<Fr, typeof ARTIFACT_FUNCTION_TREE_MAX_HEIGHT>, artifactFunctionTreeLeafIndex: number, privateFunction: BroadcastedPrivateFunction);
21
21
  static isPrivateFunctionBroadcastedEvent(log: ContractClassLog): boolean;
22
22
  static fromLog(log: ContractClassLog): PrivateFunctionBroadcastedEvent;
23
23
  static fromFields(fields: Fr[] | FieldReader): PrivateFunctionBroadcastedEvent;
@@ -1 +1 @@
1
- {"version":3,"file":"private_function_broadcasted_event.d.ts","sourceRoot":"","sources":["../../src/class-registerer/private_function_broadcasted_event.ts"],"names":[],"mappings":";;AAAA,OAAO,EACL,iCAAiC,EACjC,oBAAoB,EAErB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAoB,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAE,4CAA4C,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC5G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI3D,sDAAsD;AACtD,qBAAa,+BAA+B;aAExB,eAAe,EAAE,EAAE;aACnB,oBAAoB,EAAE,EAAE;aACxB,sCAAsC,EAAE,EAAE;aAC1C,8BAA8B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,oBAAoB,CAAC;aACtE,4BAA4B,EAAE,MAAM;aACpC,+BAA+B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,iCAAiC,CAAC;aACpF,6BAA6B,EAAE,MAAM;aACrC,eAAe,EAAE,0BAA0B;gBAP3C,eAAe,EAAE,EAAE,EACnB,oBAAoB,EAAE,EAAE,EACxB,sCAAsC,EAAE,EAAE,EAC1C,8BAA8B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,oBAAoB,CAAC,EACtE,4BAA4B,EAAE,MAAM,EACpC,+BAA+B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,iCAAiC,CAAC,EACpF,6BAA6B,EAAE,MAAM,EACrC,eAAe,EAAE,0BAA0B;IAG7D,MAAM,CAAC,iCAAiC,CAAC,GAAG,EAAE,gBAAgB;IAI9D,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,gBAAgB;IAapC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW;IAuB5C,6BAA6B,IAAI,4CAA4C;CAa9E;AAED,qBAAa,0BAA2B,YAAW,eAAe;IAE9D,qJAAqJ;aACrI,QAAQ,EAAE,gBAAgB;IAC1C,6BAA6B;aACb,YAAY,EAAE,EAAE;IAChC,wEAAwE;aACxD,MAAM,EAAE,EAAE;IAC1B,gCAAgC;aAChB,QAAQ,EAAE,MAAM;;IAPhC,qJAAqJ;IACrI,QAAQ,EAAE,gBAAgB;IAC1C,6BAA6B;IACb,YAAY,EAAE,EAAE;IAChC,wEAAwE;IACxD,MAAM,EAAE,EAAE;IAC1B,gCAAgC;IAChB,QAAQ,EAAE,MAAM;IAGlC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW;CAU7C"}
1
+ {"version":3,"file":"private_function_broadcasted_event.d.ts","sourceRoot":"","sources":["../../src/class-registerer/private_function_broadcasted_event.ts"],"names":[],"mappings":";;AAAA,OAAO,EACL,iCAAiC,EACjC,oBAAoB,EAErB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAoB,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAE,4CAA4C,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC5G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI3D,sDAAsD;AACtD,qBAAa,+BAA+B;aAExB,eAAe,EAAE,EAAE;aACnB,oBAAoB,EAAE,EAAE;aACxB,wBAAwB,EAAE,EAAE;aAC5B,8BAA8B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,oBAAoB,CAAC;aACtE,4BAA4B,EAAE,MAAM;aACpC,+BAA+B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,iCAAiC,CAAC;aACpF,6BAA6B,EAAE,MAAM;aACrC,eAAe,EAAE,0BAA0B;gBAP3C,eAAe,EAAE,EAAE,EACnB,oBAAoB,EAAE,EAAE,EACxB,wBAAwB,EAAE,EAAE,EAC5B,8BAA8B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,oBAAoB,CAAC,EACtE,4BAA4B,EAAE,MAAM,EACpC,+BAA+B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,iCAAiC,CAAC,EACpF,6BAA6B,EAAE,MAAM,EACrC,eAAe,EAAE,0BAA0B;IAG7D,MAAM,CAAC,iCAAiC,CAAC,GAAG,EAAE,gBAAgB;IAI9D,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,gBAAgB;IAapC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW;IAuB5C,6BAA6B,IAAI,4CAA4C;CAa9E;AAED,qBAAa,0BAA2B,YAAW,eAAe;IAE9D,qJAAqJ;aACrI,QAAQ,EAAE,gBAAgB;IAC1C,6BAA6B;aACb,YAAY,EAAE,EAAE;IAChC,wEAAwE;aACxD,MAAM,EAAE,EAAE;IAC1B,gCAAgC;aAChB,QAAQ,EAAE,MAAM;;IAPhC,qJAAqJ;IACrI,QAAQ,EAAE,gBAAgB;IAC1C,6BAA6B;IACb,YAAY,EAAE,EAAE;IAChC,wEAAwE;IACxD,MAAM,EAAE,EAAE;IAC1B,gCAAgC;IAChB,QAAQ,EAAE,MAAM;IAGlC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW;CAU7C"}
@@ -5,16 +5,16 @@ import { REGISTERER_PRIVATE_FUNCTION_BROADCASTED_TAG } from '../protocol_contrac
5
5
  /** Event emitted from the ContractClassRegisterer. */ export class PrivateFunctionBroadcastedEvent {
6
6
  contractClassId;
7
7
  artifactMetadataHash;
8
- unconstrainedFunctionsArtifactTreeRoot;
8
+ utilityFunctionsTreeRoot;
9
9
  privateFunctionTreeSiblingPath;
10
10
  privateFunctionTreeLeafIndex;
11
11
  artifactFunctionTreeSiblingPath;
12
12
  artifactFunctionTreeLeafIndex;
13
13
  privateFunction;
14
- constructor(contractClassId, artifactMetadataHash, unconstrainedFunctionsArtifactTreeRoot, privateFunctionTreeSiblingPath, privateFunctionTreeLeafIndex, artifactFunctionTreeSiblingPath, artifactFunctionTreeLeafIndex, privateFunction){
14
+ constructor(contractClassId, artifactMetadataHash, utilityFunctionsTreeRoot, privateFunctionTreeSiblingPath, privateFunctionTreeLeafIndex, artifactFunctionTreeSiblingPath, artifactFunctionTreeLeafIndex, privateFunction){
15
15
  this.contractClassId = contractClassId;
16
16
  this.artifactMetadataHash = artifactMetadataHash;
17
- this.unconstrainedFunctionsArtifactTreeRoot = unconstrainedFunctionsArtifactTreeRoot;
17
+ this.utilityFunctionsTreeRoot = utilityFunctionsTreeRoot;
18
18
  this.privateFunctionTreeSiblingPath = privateFunctionTreeSiblingPath;
19
19
  this.privateFunctionTreeLeafIndex = privateFunctionTreeLeafIndex;
20
20
  this.artifactFunctionTreeSiblingPath = artifactFunctionTreeSiblingPath;
@@ -39,13 +39,13 @@ import { REGISTERER_PRIVATE_FUNCTION_BROADCASTED_TAG } from '../protocol_contrac
39
39
  const reader = FieldReader.asReader(fields);
40
40
  const contractClassId = reader.readField();
41
41
  const artifactMetadataHash = reader.readField();
42
- const unconstrainedFunctionsArtifactTreeRoot = reader.readField();
42
+ const utilityFunctionsTreeRoot = reader.readField();
43
43
  const privateFunctionTreeSiblingPath = reader.readFieldArray(FUNCTION_TREE_HEIGHT);
44
44
  const privateFunctionTreeLeafIndex = reader.readField().toNumber();
45
45
  const artifactFunctionTreeSiblingPath = reader.readFieldArray(ARTIFACT_FUNCTION_TREE_MAX_HEIGHT);
46
46
  const artifactFunctionTreeLeafIndex = reader.readField().toNumber();
47
47
  const privateFunction = BroadcastedPrivateFunction.fromFields(reader);
48
- return new PrivateFunctionBroadcastedEvent(contractClassId, artifactMetadataHash, unconstrainedFunctionsArtifactTreeRoot, privateFunctionTreeSiblingPath, privateFunctionTreeLeafIndex, artifactFunctionTreeSiblingPath, artifactFunctionTreeLeafIndex, privateFunction);
48
+ return new PrivateFunctionBroadcastedEvent(contractClassId, artifactMetadataHash, utilityFunctionsTreeRoot, privateFunctionTreeSiblingPath, privateFunctionTreeLeafIndex, artifactFunctionTreeSiblingPath, artifactFunctionTreeLeafIndex, privateFunction);
49
49
  }
50
50
  toFunctionWithMembershipProof() {
51
51
  return {
@@ -53,7 +53,7 @@ import { REGISTERER_PRIVATE_FUNCTION_BROADCASTED_TAG } from '../protocol_contrac
53
53
  bytecode: this.privateFunction.bytecode,
54
54
  functionMetadataHash: this.privateFunction.metadataHash,
55
55
  artifactMetadataHash: this.artifactMetadataHash,
56
- unconstrainedFunctionsArtifactTreeRoot: this.unconstrainedFunctionsArtifactTreeRoot,
56
+ utilityFunctionsTreeRoot: this.utilityFunctionsTreeRoot,
57
57
  privateFunctionTreeSiblingPath: this.privateFunctionTreeSiblingPath,
58
58
  privateFunctionTreeLeafIndex: this.privateFunctionTreeLeafIndex,
59
59
  artifactTreeSiblingPath: this.artifactFunctionTreeSiblingPath.filter((fr)=>!fr.isZero()),
@@ -5,23 +5,23 @@ import { Fr } from '@aztec/foundation/fields';
5
5
  import type { Tuple } from '@aztec/foundation/serialize';
6
6
  import { FieldReader } from '@aztec/foundation/serialize';
7
7
  import { FunctionSelector } from '@aztec/stdlib/abi';
8
- import type { UnconstrainedFunction, UnconstrainedFunctionWithMembershipProof } from '@aztec/stdlib/contract';
8
+ import type { UtilityFunction, UtilityFunctionWithMembershipProof } from '@aztec/stdlib/contract';
9
9
  import type { ContractClassLog } from '@aztec/stdlib/logs';
10
10
  /** Event emitted from the ContractClassRegisterer. */
11
- export declare class UnconstrainedFunctionBroadcastedEvent {
11
+ export declare class UtilityFunctionBroadcastedEvent {
12
12
  readonly contractClassId: Fr;
13
13
  readonly artifactMetadataHash: Fr;
14
14
  readonly privateFunctionsArtifactTreeRoot: Fr;
15
15
  readonly artifactFunctionTreeSiblingPath: Tuple<Fr, typeof ARTIFACT_FUNCTION_TREE_MAX_HEIGHT>;
16
16
  readonly artifactFunctionTreeLeafIndex: number;
17
- readonly unconstrainedFunction: BroadcastedUnconstrainedFunction;
18
- constructor(contractClassId: Fr, artifactMetadataHash: Fr, privateFunctionsArtifactTreeRoot: Fr, artifactFunctionTreeSiblingPath: Tuple<Fr, typeof ARTIFACT_FUNCTION_TREE_MAX_HEIGHT>, artifactFunctionTreeLeafIndex: number, unconstrainedFunction: BroadcastedUnconstrainedFunction);
19
- static isUnconstrainedFunctionBroadcastedEvent(log: ContractClassLog): boolean;
20
- static fromLog(log: ContractClassLog): UnconstrainedFunctionBroadcastedEvent;
21
- static fromFields(fields: Fr[] | FieldReader): UnconstrainedFunctionBroadcastedEvent;
22
- toFunctionWithMembershipProof(): UnconstrainedFunctionWithMembershipProof;
17
+ readonly utilityFunction: BroadcastedUtilityFunction;
18
+ constructor(contractClassId: Fr, artifactMetadataHash: Fr, privateFunctionsArtifactTreeRoot: Fr, artifactFunctionTreeSiblingPath: Tuple<Fr, typeof ARTIFACT_FUNCTION_TREE_MAX_HEIGHT>, artifactFunctionTreeLeafIndex: number, utilityFunction: BroadcastedUtilityFunction);
19
+ static isUtilityFunctionBroadcastedEvent(log: ContractClassLog): boolean;
20
+ static fromLog(log: ContractClassLog): UtilityFunctionBroadcastedEvent;
21
+ static fromFields(fields: Fr[] | FieldReader): UtilityFunctionBroadcastedEvent;
22
+ toFunctionWithMembershipProof(): UtilityFunctionWithMembershipProof;
23
23
  }
24
- export declare class BroadcastedUnconstrainedFunction implements UnconstrainedFunction {
24
+ export declare class BroadcastedUtilityFunction implements UtilityFunction {
25
25
  /** Selector of the function. Calculated as the hash of the method name and parameters. The specification of this is not enforced by the protocol. */
26
26
  readonly selector: FunctionSelector;
27
27
  /** Artifact metadata hash */
@@ -35,6 +35,6 @@ export declare class BroadcastedUnconstrainedFunction implements UnconstrainedFu
35
35
  metadataHash: Fr,
36
36
  /** Brillig bytecode */
37
37
  bytecode: Buffer);
38
- static fromFields(fields: Fr[] | FieldReader): BroadcastedUnconstrainedFunction;
38
+ static fromFields(fields: Fr[] | FieldReader): BroadcastedUtilityFunction;
39
39
  }
40
- //# sourceMappingURL=unconstrained_function_broadcasted_event.d.ts.map
40
+ //# sourceMappingURL=utility_function_broadcasted_event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utility_function_broadcasted_event.d.ts","sourceRoot":"","sources":["../../src/class-registerer/utility_function_broadcasted_event.ts"],"names":[],"mappings":";;AAAA,OAAO,EACL,iCAAiC,EAElC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAoB,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,kCAAkC,EAAE,MAAM,wBAAwB,CAAC;AAClG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI3D,sDAAsD;AACtD,qBAAa,+BAA+B;aAExB,eAAe,EAAE,EAAE;aACnB,oBAAoB,EAAE,EAAE;aACxB,gCAAgC,EAAE,EAAE;aACpC,+BAA+B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,iCAAiC,CAAC;aACpF,6BAA6B,EAAE,MAAM;aACrC,eAAe,EAAE,0BAA0B;gBAL3C,eAAe,EAAE,EAAE,EACnB,oBAAoB,EAAE,EAAE,EACxB,gCAAgC,EAAE,EAAE,EACpC,+BAA+B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,iCAAiC,CAAC,EACpF,6BAA6B,EAAE,MAAM,EACrC,eAAe,EAAE,0BAA0B;IAG7D,MAAM,CAAC,iCAAiC,CAAC,GAAG,EAAE,gBAAgB;IAI9D,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,gBAAgB;IAapC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW;IAmB5C,6BAA6B,IAAI,kCAAkC;CAgBpE;AAED,qBAAa,0BAA2B,YAAW,eAAe;IAE9D,qJAAqJ;aACrI,QAAQ,EAAE,gBAAgB;IAC1C,6BAA6B;aACb,YAAY,EAAE,EAAE;IAChC,uBAAuB;aACP,QAAQ,EAAE,MAAM;;IALhC,qJAAqJ;IACrI,QAAQ,EAAE,gBAAgB;IAC1C,6BAA6B;IACb,YAAY,EAAE,EAAE;IAChC,uBAAuB;IACP,QAAQ,EAAE,MAAM;IAGlC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW;CAS7C"}
@@ -4,31 +4,31 @@ import { Fr } from '@aztec/foundation/fields';
4
4
  import { FieldReader } from '@aztec/foundation/serialize';
5
5
  import { FunctionSelector, bufferFromFields } from '@aztec/stdlib/abi';
6
6
  import { REGISTERER_UNCONSTRAINED_FUNCTION_BROADCASTED_TAG } from '../protocol_contract_data.js';
7
- /** Event emitted from the ContractClassRegisterer. */ export class UnconstrainedFunctionBroadcastedEvent {
7
+ /** Event emitted from the ContractClassRegisterer. */ export class UtilityFunctionBroadcastedEvent {
8
8
  contractClassId;
9
9
  artifactMetadataHash;
10
10
  privateFunctionsArtifactTreeRoot;
11
11
  artifactFunctionTreeSiblingPath;
12
12
  artifactFunctionTreeLeafIndex;
13
- unconstrainedFunction;
14
- constructor(contractClassId, artifactMetadataHash, privateFunctionsArtifactTreeRoot, artifactFunctionTreeSiblingPath, artifactFunctionTreeLeafIndex, unconstrainedFunction){
13
+ utilityFunction;
14
+ constructor(contractClassId, artifactMetadataHash, privateFunctionsArtifactTreeRoot, artifactFunctionTreeSiblingPath, artifactFunctionTreeLeafIndex, utilityFunction){
15
15
  this.contractClassId = contractClassId;
16
16
  this.artifactMetadataHash = artifactMetadataHash;
17
17
  this.privateFunctionsArtifactTreeRoot = privateFunctionsArtifactTreeRoot;
18
18
  this.artifactFunctionTreeSiblingPath = artifactFunctionTreeSiblingPath;
19
19
  this.artifactFunctionTreeLeafIndex = artifactFunctionTreeLeafIndex;
20
- this.unconstrainedFunction = unconstrainedFunction;
20
+ this.utilityFunction = utilityFunction;
21
21
  }
22
- static isUnconstrainedFunctionBroadcastedEvent(log) {
22
+ static isUtilityFunctionBroadcastedEvent(log) {
23
23
  return log.fields[0].equals(REGISTERER_UNCONSTRAINED_FUNCTION_BROADCASTED_TAG);
24
24
  }
25
25
  static fromLog(log) {
26
26
  const reader = new FieldReader(log.fields.slice(1));
27
- const event = UnconstrainedFunctionBroadcastedEvent.fromFields(reader);
27
+ const event = UtilityFunctionBroadcastedEvent.fromFields(reader);
28
28
  while(!reader.isFinished()){
29
29
  const field = reader.readField();
30
30
  if (!field.isZero()) {
31
- throw new Error(`Unexpected data after parsing UnconstrainedFunctionBroadcastedEvent: ${field.toString()}`);
31
+ throw new Error(`Unexpected data after parsing UtilityFunctionBroadcastedEvent: ${field.toString()}`);
32
32
  }
33
33
  }
34
34
  return event;
@@ -40,8 +40,8 @@ import { REGISTERER_UNCONSTRAINED_FUNCTION_BROADCASTED_TAG } from '../protocol_c
40
40
  const privateFunctionsArtifactTreeRoot = reader.readField();
41
41
  const artifactFunctionTreeSiblingPath = reader.readFieldArray(ARTIFACT_FUNCTION_TREE_MAX_HEIGHT);
42
42
  const artifactFunctionTreeLeafIndex = reader.readField().toNumber();
43
- const unconstrainedFunction = BroadcastedUnconstrainedFunction.fromFields(reader);
44
- return new UnconstrainedFunctionBroadcastedEvent(contractClassId, artifactMetadataHash, privateFunctionsArtifactTreeRoot, artifactFunctionTreeSiblingPath, artifactFunctionTreeLeafIndex, unconstrainedFunction);
43
+ const utilityFunction = BroadcastedUtilityFunction.fromFields(reader);
44
+ return new UtilityFunctionBroadcastedEvent(contractClassId, artifactMetadataHash, privateFunctionsArtifactTreeRoot, artifactFunctionTreeSiblingPath, artifactFunctionTreeLeafIndex, utilityFunction);
45
45
  }
46
46
  toFunctionWithMembershipProof() {
47
47
  // We should be able to safely remove the zero elements that pad the variable-length sibling path,
@@ -50,9 +50,9 @@ import { REGISTERER_UNCONSTRAINED_FUNCTION_BROADCASTED_TAG } from '../protocol_c
50
50
  // be a single zero element, but in that case the artifact tree should be just the single leaf.
51
51
  const artifactTreeSiblingPath = removeArrayPaddingEnd(this.artifactFunctionTreeSiblingPath, Fr.isZero);
52
52
  return {
53
- ...this.unconstrainedFunction,
54
- bytecode: this.unconstrainedFunction.bytecode,
55
- functionMetadataHash: this.unconstrainedFunction.metadataHash,
53
+ ...this.utilityFunction,
54
+ bytecode: this.utilityFunction.bytecode,
55
+ functionMetadataHash: this.utilityFunction.metadataHash,
56
56
  artifactMetadataHash: this.artifactMetadataHash,
57
57
  privateFunctionsArtifactTreeRoot: this.privateFunctionsArtifactTreeRoot,
58
58
  artifactTreeSiblingPath,
@@ -60,7 +60,7 @@ import { REGISTERER_UNCONSTRAINED_FUNCTION_BROADCASTED_TAG } from '../protocol_c
60
60
  };
61
61
  }
62
62
  }
63
- export class BroadcastedUnconstrainedFunction {
63
+ export class BroadcastedUtilityFunction {
64
64
  selector;
65
65
  metadataHash;
66
66
  bytecode;
@@ -76,6 +76,6 @@ export class BroadcastedUnconstrainedFunction {
76
76
  // The '* 1' removes the 'Type instantiation is excessively deep and possibly infinite. ts(2589)' err
77
77
  const encodedBytecode = reader.readFieldArray(MAX_PACKED_BYTECODE_SIZE_PER_UNCONSTRAINED_FUNCTION_IN_FIELDS * 1);
78
78
  const bytecode = bufferFromFields(encodedBytecode);
79
- return new BroadcastedUnconstrainedFunction(selector, metadataHash, bytecode);
79
+ return new BroadcastedUtilityFunction(selector, metadataHash, bytecode);
80
80
  }
81
81
  }
@@ -26,14 +26,14 @@ export const ProtocolContractAddress = {
26
26
  Router: AztecAddress.fromBigInt(6n)
27
27
  };
28
28
  export const ProtocolContractLeaves = {
29
- AuthRegistry: Fr.fromHexString('0x28504545f4346234de159b2246a4833d5fb50821737a8524f7ce0229c9352dbb'),
30
- ContractInstanceDeployer: Fr.fromHexString('0x21625b95ee7c943c775dc44c79bb2876842d1def2a37fda704def99ea78e337d'),
31
- ContractClassRegisterer: Fr.fromHexString('0x045c147750f5e6216ac16f87de3d52210e5365f8545a3eb07d42f747f824f5bc'),
32
- MultiCallEntrypoint: Fr.fromHexString('0x0a5468fb8f125e4db43cdbe59c0b81c4069fc6f472b6a9fb94371618436211fe'),
33
- FeeJuice: Fr.fromHexString('0x3060933548870aa3d672caceaf80c736b0d7853857ad22c76c0bd86aa58d8e26'),
34
- Router: Fr.fromHexString('0x1ff7fe9adc7a8c573b92a7cda0d060801ae92ee532c1d286df52495fd93b0b37')
29
+ AuthRegistry: Fr.fromHexString('0x0beca5ed6586f8b687c905663b17d315df05123fb7274ed26350db393d6f630a'),
30
+ ContractInstanceDeployer: Fr.fromHexString('0x180a49e656fe88966e3951bda3b00f9dec72d6059e4776907f5a1a132d802d0d'),
31
+ ContractClassRegisterer: Fr.fromHexString('0x04f20412b650b1f452c33f9a66b734bbbf715d0eebe1ae1d206e476b67f258c8'),
32
+ MultiCallEntrypoint: Fr.fromHexString('0x0d337c1f03d1fbf286b139fb3982dcf8d6ef2b0b4bf6cc618e48d8117a9c8e28'),
33
+ FeeJuice: Fr.fromHexString('0x278942aa357975cbad0ea797c2818676f6c8ffa2825f229b5bc0e5e36f7e3968'),
34
+ Router: Fr.fromHexString('0x29f39a7560a7cd71be918e823ddf7241c5d83a3d382d0cadda1a8a4b1e9edde0')
35
35
  };
36
- export const protocolContractTreeRoot = Fr.fromHexString('0x1ed65f78577cfb6dc569b90dbe8319937c0a6739cc1d22286cc09ac4811974de');
36
+ export const protocolContractTreeRoot = Fr.fromHexString('0x12edf3adf4adf6fc2f245d482883923bf92dce7a1b0c65b2b7b68a77fca9b2e6');
37
37
  export const REGISTERER_CONTRACT_CLASS_REGISTERED_TAG = Fr.fromHexString('0x20cd27645f65c15a38720ca984aef936592f3938a705db706d068ad13fc58ae9');
38
38
  export const REGISTERER_PRIVATE_FUNCTION_BROADCASTED_TAG = Fr.fromHexString('0x0abf338154e355442d9916d630da0491036d5a7b23c42b477c1395ba3bf9b42d');
39
39
  export const REGISTERER_UNCONSTRAINED_FUNCTION_BROADCASTED_TAG = Fr.fromHexString('0x27774539896271d6dbe0c1de45ddc44709d1e8d9a9fb686ca3c105d87c417bb8');
@@ -2,7 +2,7 @@
2
2
  /// <reference types="node" resolution-mode="require"/>
3
3
  export declare function getSampleContractClassRegisteredEventPayload(): Buffer;
4
4
  export declare function getSamplePrivateFunctionBroadcastedEventPayload(): Buffer;
5
- export declare function getSampleUnconstrainedFunctionBroadcastedEventPayload(): Buffer;
5
+ export declare function getSampleUtilityFunctionBroadcastedEventPayload(): Buffer;
6
6
  export declare function getSampleContractInstanceDeployedEventPayload(): Buffer;
7
7
  export declare function getPathToFixture(name: string): string;
8
8
  //# sourceMappingURL=fixtures.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../src/tests/fixtures.ts"],"names":[],"mappings":";;AAKA,wBAAgB,4CAA4C,IAAI,MAAM,CAGrE;AAGD,wBAAgB,+CAA+C,IAAI,MAAM,CAGxE;AAGD,wBAAgB,qDAAqD,IAAI,MAAM,CAG9E;AAGD,wBAAgB,6CAA6C,IAAI,MAAM,CAGtE;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,UAE5C"}
1
+ {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../src/tests/fixtures.ts"],"names":[],"mappings":";;AAKA,wBAAgB,4CAA4C,IAAI,MAAM,CAGrE;AAGD,wBAAgB,+CAA+C,IAAI,MAAM,CAGxE;AAGD,wBAAgB,+CAA+C,IAAI,MAAM,CAGxE;AAGD,wBAAgB,6CAA6C,IAAI,MAAM,CAGtE;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,UAE5C"}
@@ -12,8 +12,8 @@ export function getSamplePrivateFunctionBroadcastedEventPayload() {
12
12
  return Buffer.from(readFileSync(path).toString(), 'hex');
13
13
  }
14
14
  // Generated from end-to-end/src/e2e_deploy_contract/contract_class_registration.test.ts with AZTEC_GENERATE_TEST_DATA=1
15
- export function getSampleUnconstrainedFunctionBroadcastedEventPayload() {
16
- const path = getPathToFixture('UnconstrainedFunctionBroadcastedEventData.hex');
15
+ export function getSampleUtilityFunctionBroadcastedEventPayload() {
16
+ const path = getPathToFixture('UtilityFunctionBroadcastedEventData.hex');
17
17
  return Buffer.from(readFileSync(path).toString(), 'hex');
18
18
  }
19
19
  // Generated from end-to-end/src/e2e_deploy_contract/contract_class_registration.test.ts with AZTEC_GENERATE_TEST_DATA=1
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.83.1",
5
+ "version": "0.84.0",
6
6
  "type": "module",
7
7
  "exports": {
8
8
  ".": "./dest/index.js",
@@ -71,9 +71,9 @@
71
71
  ]
72
72
  },
73
73
  "dependencies": {
74
- "@aztec/constants": "0.83.1",
75
- "@aztec/foundation": "0.83.1",
76
- "@aztec/stdlib": "0.83.1",
74
+ "@aztec/constants": "0.84.0",
75
+ "@aztec/foundation": "0.84.0",
76
+ "@aztec/stdlib": "0.84.0",
77
77
  "lodash.chunk": "^4.2.0",
78
78
  "lodash.omit": "^4.5.0",
79
79
  "tslib": "^2.4.0"
@@ -65,7 +65,7 @@ export class ContractClassRegisteredEvent {
65
65
  privateFunctionsRoot: this.privateFunctionsRoot,
66
66
  version: this.version,
67
67
  privateFunctions: [],
68
- unconstrainedFunctions: [],
68
+ utilityFunctions: [],
69
69
  };
70
70
  }
71
71
  }
@@ -7,7 +7,7 @@ import type { ProtocolContract } from '../protocol_contract.js';
7
7
 
8
8
  export * from './contract_class_registered_event.js';
9
9
  export * from './private_function_broadcasted_event.js';
10
- export * from './unconstrained_function_broadcasted_event.js';
10
+ export * from './utility_function_broadcasted_event.js';
11
11
 
12
12
  export const ContractClassRegistererArtifact = loadContractArtifact(
13
13
  ContractClassRegistererJson as NoirCompiledContract,
@@ -5,7 +5,7 @@ import type { ProtocolContract } from '../protocol_contract.js';
5
5
 
6
6
  export * from './contract_class_registered_event.js';
7
7
  export * from './private_function_broadcasted_event.js';
8
- export * from './unconstrained_function_broadcasted_event.js';
8
+ export * from './utility_function_broadcasted_event.js';
9
9
 
10
10
  let protocolContract: ProtocolContract;
11
11
  let protocolContractArtifact: ContractArtifact;
@@ -17,7 +17,7 @@ export class PrivateFunctionBroadcastedEvent {
17
17
  constructor(
18
18
  public readonly contractClassId: Fr,
19
19
  public readonly artifactMetadataHash: Fr,
20
- public readonly unconstrainedFunctionsArtifactTreeRoot: Fr,
20
+ public readonly utilityFunctionsTreeRoot: Fr,
21
21
  public readonly privateFunctionTreeSiblingPath: Tuple<Fr, typeof FUNCTION_TREE_HEIGHT>,
22
22
  public readonly privateFunctionTreeLeafIndex: number,
23
23
  public readonly artifactFunctionTreeSiblingPath: Tuple<Fr, typeof ARTIFACT_FUNCTION_TREE_MAX_HEIGHT>,
@@ -46,7 +46,7 @@ export class PrivateFunctionBroadcastedEvent {
46
46
  const reader = FieldReader.asReader(fields);
47
47
  const contractClassId = reader.readField();
48
48
  const artifactMetadataHash = reader.readField();
49
- const unconstrainedFunctionsArtifactTreeRoot = reader.readField();
49
+ const utilityFunctionsTreeRoot = reader.readField();
50
50
  const privateFunctionTreeSiblingPath = reader.readFieldArray(FUNCTION_TREE_HEIGHT);
51
51
  const privateFunctionTreeLeafIndex = reader.readField().toNumber();
52
52
  const artifactFunctionTreeSiblingPath = reader.readFieldArray(ARTIFACT_FUNCTION_TREE_MAX_HEIGHT);
@@ -56,7 +56,7 @@ export class PrivateFunctionBroadcastedEvent {
56
56
  return new PrivateFunctionBroadcastedEvent(
57
57
  contractClassId,
58
58
  artifactMetadataHash,
59
- unconstrainedFunctionsArtifactTreeRoot,
59
+ utilityFunctionsTreeRoot,
60
60
  privateFunctionTreeSiblingPath,
61
61
  privateFunctionTreeLeafIndex,
62
62
  artifactFunctionTreeSiblingPath,
@@ -71,7 +71,7 @@ export class PrivateFunctionBroadcastedEvent {
71
71
  bytecode: this.privateFunction.bytecode,
72
72
  functionMetadataHash: this.privateFunction.metadataHash,
73
73
  artifactMetadataHash: this.artifactMetadataHash,
74
- unconstrainedFunctionsArtifactTreeRoot: this.unconstrainedFunctionsArtifactTreeRoot,
74
+ utilityFunctionsTreeRoot: this.utilityFunctionsTreeRoot,
75
75
  privateFunctionTreeSiblingPath: this.privateFunctionTreeSiblingPath,
76
76
  privateFunctionTreeLeafIndex: this.privateFunctionTreeLeafIndex,
77
77
  artifactTreeSiblingPath: this.artifactFunctionTreeSiblingPath.filter(fr => !fr.isZero()),
@@ -7,33 +7,33 @@ import { Fr } from '@aztec/foundation/fields';
7
7
  import type { Tuple } from '@aztec/foundation/serialize';
8
8
  import { FieldReader } from '@aztec/foundation/serialize';
9
9
  import { FunctionSelector, bufferFromFields } from '@aztec/stdlib/abi';
10
- import type { UnconstrainedFunction, UnconstrainedFunctionWithMembershipProof } from '@aztec/stdlib/contract';
10
+ import type { UtilityFunction, UtilityFunctionWithMembershipProof } from '@aztec/stdlib/contract';
11
11
  import type { ContractClassLog } from '@aztec/stdlib/logs';
12
12
 
13
13
  import { REGISTERER_UNCONSTRAINED_FUNCTION_BROADCASTED_TAG } from '../protocol_contract_data.js';
14
14
 
15
15
  /** Event emitted from the ContractClassRegisterer. */
16
- export class UnconstrainedFunctionBroadcastedEvent {
16
+ export class UtilityFunctionBroadcastedEvent {
17
17
  constructor(
18
18
  public readonly contractClassId: Fr,
19
19
  public readonly artifactMetadataHash: Fr,
20
20
  public readonly privateFunctionsArtifactTreeRoot: Fr,
21
21
  public readonly artifactFunctionTreeSiblingPath: Tuple<Fr, typeof ARTIFACT_FUNCTION_TREE_MAX_HEIGHT>,
22
22
  public readonly artifactFunctionTreeLeafIndex: number,
23
- public readonly unconstrainedFunction: BroadcastedUnconstrainedFunction,
23
+ public readonly utilityFunction: BroadcastedUtilityFunction,
24
24
  ) {}
25
25
 
26
- static isUnconstrainedFunctionBroadcastedEvent(log: ContractClassLog) {
26
+ static isUtilityFunctionBroadcastedEvent(log: ContractClassLog) {
27
27
  return log.fields[0].equals(REGISTERER_UNCONSTRAINED_FUNCTION_BROADCASTED_TAG);
28
28
  }
29
29
 
30
30
  static fromLog(log: ContractClassLog) {
31
31
  const reader = new FieldReader(log.fields.slice(1));
32
- const event = UnconstrainedFunctionBroadcastedEvent.fromFields(reader);
32
+ const event = UtilityFunctionBroadcastedEvent.fromFields(reader);
33
33
  while (!reader.isFinished()) {
34
34
  const field = reader.readField();
35
35
  if (!field.isZero()) {
36
- throw new Error(`Unexpected data after parsing UnconstrainedFunctionBroadcastedEvent: ${field.toString()}`);
36
+ throw new Error(`Unexpected data after parsing UtilityFunctionBroadcastedEvent: ${field.toString()}`);
37
37
  }
38
38
  }
39
39
 
@@ -47,28 +47,28 @@ export class UnconstrainedFunctionBroadcastedEvent {
47
47
  const privateFunctionsArtifactTreeRoot = reader.readField();
48
48
  const artifactFunctionTreeSiblingPath = reader.readFieldArray(ARTIFACT_FUNCTION_TREE_MAX_HEIGHT);
49
49
  const artifactFunctionTreeLeafIndex = reader.readField().toNumber();
50
- const unconstrainedFunction = BroadcastedUnconstrainedFunction.fromFields(reader);
50
+ const utilityFunction = BroadcastedUtilityFunction.fromFields(reader);
51
51
 
52
- return new UnconstrainedFunctionBroadcastedEvent(
52
+ return new UtilityFunctionBroadcastedEvent(
53
53
  contractClassId,
54
54
  artifactMetadataHash,
55
55
  privateFunctionsArtifactTreeRoot,
56
56
  artifactFunctionTreeSiblingPath,
57
57
  artifactFunctionTreeLeafIndex,
58
- unconstrainedFunction,
58
+ utilityFunction,
59
59
  );
60
60
  }
61
61
 
62
- toFunctionWithMembershipProof(): UnconstrainedFunctionWithMembershipProof {
62
+ toFunctionWithMembershipProof(): UtilityFunctionWithMembershipProof {
63
63
  // We should be able to safely remove the zero elements that pad the variable-length sibling path,
64
64
  // since a sibling with value zero can only occur on the tree leaves, so the sibling path will never end
65
65
  // in a zero. The only exception is a tree with depth 2 with one non-zero leaf, where the sibling path would
66
66
  // be a single zero element, but in that case the artifact tree should be just the single leaf.
67
67
  const artifactTreeSiblingPath = removeArrayPaddingEnd(this.artifactFunctionTreeSiblingPath, Fr.isZero);
68
68
  return {
69
- ...this.unconstrainedFunction,
70
- bytecode: this.unconstrainedFunction.bytecode,
71
- functionMetadataHash: this.unconstrainedFunction.metadataHash,
69
+ ...this.utilityFunction,
70
+ bytecode: this.utilityFunction.bytecode,
71
+ functionMetadataHash: this.utilityFunction.metadataHash,
72
72
  artifactMetadataHash: this.artifactMetadataHash,
73
73
  privateFunctionsArtifactTreeRoot: this.privateFunctionsArtifactTreeRoot,
74
74
  artifactTreeSiblingPath,
@@ -77,7 +77,7 @@ export class UnconstrainedFunctionBroadcastedEvent {
77
77
  }
78
78
  }
79
79
 
80
- export class BroadcastedUnconstrainedFunction implements UnconstrainedFunction {
80
+ export class BroadcastedUtilityFunction implements UtilityFunction {
81
81
  constructor(
82
82
  /** Selector of the function. Calculated as the hash of the method name and parameters. The specification of this is not enforced by the protocol. */
83
83
  public readonly selector: FunctionSelector,
@@ -94,6 +94,6 @@ export class BroadcastedUnconstrainedFunction implements UnconstrainedFunction {
94
94
  // The '* 1' removes the 'Type instantiation is excessively deep and possibly infinite. ts(2589)' err
95
95
  const encodedBytecode = reader.readFieldArray(MAX_PACKED_BYTECODE_SIZE_PER_UNCONSTRAINED_FUNCTION_IN_FIELDS * 1);
96
96
  const bytecode = bufferFromFields(encodedBytecode);
97
- return new BroadcastedUnconstrainedFunction(selector, metadataHash, bytecode);
97
+ return new BroadcastedUtilityFunction(selector, metadataHash, bytecode);
98
98
  }
99
99
  }
@@ -40,17 +40,17 @@ Router: AztecAddress.fromBigInt(6n)
40
40
 
41
41
 
42
42
  export const ProtocolContractLeaves = {
43
- AuthRegistry: Fr.fromHexString('0x28504545f4346234de159b2246a4833d5fb50821737a8524f7ce0229c9352dbb'),
44
- ContractInstanceDeployer: Fr.fromHexString('0x21625b95ee7c943c775dc44c79bb2876842d1def2a37fda704def99ea78e337d'),
45
- ContractClassRegisterer: Fr.fromHexString('0x045c147750f5e6216ac16f87de3d52210e5365f8545a3eb07d42f747f824f5bc'),
46
- MultiCallEntrypoint: Fr.fromHexString('0x0a5468fb8f125e4db43cdbe59c0b81c4069fc6f472b6a9fb94371618436211fe'),
47
- FeeJuice: Fr.fromHexString('0x3060933548870aa3d672caceaf80c736b0d7853857ad22c76c0bd86aa58d8e26'),
48
- Router: Fr.fromHexString('0x1ff7fe9adc7a8c573b92a7cda0d060801ae92ee532c1d286df52495fd93b0b37')
43
+ AuthRegistry: Fr.fromHexString('0x0beca5ed6586f8b687c905663b17d315df05123fb7274ed26350db393d6f630a'),
44
+ ContractInstanceDeployer: Fr.fromHexString('0x180a49e656fe88966e3951bda3b00f9dec72d6059e4776907f5a1a132d802d0d'),
45
+ ContractClassRegisterer: Fr.fromHexString('0x04f20412b650b1f452c33f9a66b734bbbf715d0eebe1ae1d206e476b67f258c8'),
46
+ MultiCallEntrypoint: Fr.fromHexString('0x0d337c1f03d1fbf286b139fb3982dcf8d6ef2b0b4bf6cc618e48d8117a9c8e28'),
47
+ FeeJuice: Fr.fromHexString('0x278942aa357975cbad0ea797c2818676f6c8ffa2825f229b5bc0e5e36f7e3968'),
48
+ Router: Fr.fromHexString('0x29f39a7560a7cd71be918e823ddf7241c5d83a3d382d0cadda1a8a4b1e9edde0')
49
49
  };
50
50
 
51
51
 
52
52
 
53
- export const protocolContractTreeRoot = Fr.fromHexString('0x1ed65f78577cfb6dc569b90dbe8319937c0a6739cc1d22286cc09ac4811974de');
53
+ export const protocolContractTreeRoot = Fr.fromHexString('0x12edf3adf4adf6fc2f245d482883923bf92dce7a1b0c65b2b7b68a77fca9b2e6');
54
54
 
55
55
 
56
56
 
@@ -15,8 +15,8 @@ export function getSamplePrivateFunctionBroadcastedEventPayload(): Buffer {
15
15
  }
16
16
 
17
17
  // Generated from end-to-end/src/e2e_deploy_contract/contract_class_registration.test.ts with AZTEC_GENERATE_TEST_DATA=1
18
- export function getSampleUnconstrainedFunctionBroadcastedEventPayload(): Buffer {
19
- const path = getPathToFixture('UnconstrainedFunctionBroadcastedEventData.hex');
18
+ export function getSampleUtilityFunctionBroadcastedEventPayload(): Buffer {
19
+ const path = getPathToFixture('UtilityFunctionBroadcastedEventData.hex');
20
20
  return Buffer.from(readFileSync(path).toString(), 'hex');
21
21
  }
22
22
 
@@ -1 +0,0 @@
1
- {"version":3,"file":"unconstrained_function_broadcasted_event.d.ts","sourceRoot":"","sources":["../../src/class-registerer/unconstrained_function_broadcasted_event.ts"],"names":[],"mappings":";;AAAA,OAAO,EACL,iCAAiC,EAElC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAoB,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,wCAAwC,EAAE,MAAM,wBAAwB,CAAC;AAC9G,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI3D,sDAAsD;AACtD,qBAAa,qCAAqC;aAE9B,eAAe,EAAE,EAAE;aACnB,oBAAoB,EAAE,EAAE;aACxB,gCAAgC,EAAE,EAAE;aACpC,+BAA+B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,iCAAiC,CAAC;aACpF,6BAA6B,EAAE,MAAM;aACrC,qBAAqB,EAAE,gCAAgC;gBALvD,eAAe,EAAE,EAAE,EACnB,oBAAoB,EAAE,EAAE,EACxB,gCAAgC,EAAE,EAAE,EACpC,+BAA+B,EAAE,KAAK,CAAC,EAAE,EAAE,OAAO,iCAAiC,CAAC,EACpF,6BAA6B,EAAE,MAAM,EACrC,qBAAqB,EAAE,gCAAgC;IAGzE,MAAM,CAAC,uCAAuC,CAAC,GAAG,EAAE,gBAAgB;IAIpE,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,gBAAgB;IAapC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW;IAmB5C,6BAA6B,IAAI,wCAAwC;CAgB1E;AAED,qBAAa,gCAAiC,YAAW,qBAAqB;IAE1E,qJAAqJ;aACrI,QAAQ,EAAE,gBAAgB;IAC1C,6BAA6B;aACb,YAAY,EAAE,EAAE;IAChC,uBAAuB;aACP,QAAQ,EAAE,MAAM;;IALhC,qJAAqJ;IACrI,QAAQ,EAAE,gBAAgB;IAC1C,6BAA6B;IACb,YAAY,EAAE,EAAE;IAChC,uBAAuB;IACP,QAAQ,EAAE,MAAM;IAGlC,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,EAAE,EAAE,GAAG,WAAW;CAS7C"}