@aztec/protocol-contracts 0.87.7 → 1.0.0-nightly.20250604
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.
- package/artifacts/AuthRegistry.json +422 -44
- package/artifacts/ContractClassRegisterer.json +266 -27
- package/artifacts/ContractInstanceDeployer.json +286 -51
- package/artifacts/FeeJuice.json +288 -37
- package/artifacts/MultiCallEntrypoint.json +277 -14
- package/artifacts/Router.json +271 -20
- package/dest/class-registerer/contract_class_registered_event.d.ts.map +1 -1
- package/dest/class-registerer/contract_class_registered_event.js +3 -2
- package/dest/class-registerer/private_function_broadcasted_event.d.ts.map +1 -1
- package/dest/class-registerer/private_function_broadcasted_event.js +3 -3
- package/dest/class-registerer/utility_function_broadcasted_event.d.ts.map +1 -1
- package/dest/class-registerer/utility_function_broadcasted_event.js +3 -3
- package/dest/instance-deployer/contract_instance_updated_event.d.ts.map +1 -1
- package/dest/instance-deployer/contract_instance_updated_event.js +3 -2
- package/dest/protocol_contract_data.d.ts +0 -4
- package/dest/protocol_contract_data.d.ts.map +1 -1
- package/dest/protocol_contract_data.js +7 -11
- package/dest/scripts/generate_data.js +2 -15
- package/package.json +4 -4
- package/src/class-registerer/contract_class_registered_event.ts +6 -2
- package/src/class-registerer/private_function_broadcasted_event.ts +6 -2
- package/src/class-registerer/utility_function_broadcasted_event.ts +6 -2
- package/src/instance-deployer/contract_instance_updated_event.ts +3 -2
- package/src/protocol_contract_data.ts +7 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract_class_registered_event.d.ts","sourceRoot":"","sources":["../../src/class-registerer/contract_class_registered_event.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contract_class_registered_event.d.ts","sourceRoot":"","sources":["../../src/class-registerer/contract_class_registered_event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,EACL,KAAK,mBAAmB,EAGzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI3D,sDAAsD;AACtD,qBAAa,4BAA4B;aAErB,eAAe,EAAE,EAAE;aACnB,OAAO,EAAE,MAAM;aACf,YAAY,EAAE,EAAE;aAChB,oBAAoB,EAAE,EAAE;aACxB,oBAAoB,EAAE,MAAM;gBAJ5B,eAAe,EAAE,EAAE,EACnB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,EAAE,EAChB,oBAAoB,EAAE,EAAE,EACxB,oBAAoB,EAAE,MAAM;IAG9C,MAAM,CAAC,8BAA8B,CAAC,GAAG,EAAE,gBAAgB;IAO3D,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,gBAAgB;IAkB9B,qBAAqB,IAAI,OAAO,CAAC,mBAAmB,CAAC;CA2B5D"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { REGISTERER_CONTRACT_CLASS_REGISTERED_MAGIC_VALUE } from '@aztec/constants';
|
|
1
2
|
import { FieldReader } from '@aztec/foundation/serialize';
|
|
2
3
|
import { bufferFromFields } from '@aztec/stdlib/abi';
|
|
3
4
|
import { computeContractClassId, computePublicBytecodeCommitment } from '@aztec/stdlib/contract';
|
|
4
|
-
import {
|
|
5
|
+
import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
5
6
|
/** Event emitted from the ContractClassRegisterer. */ export class ContractClassRegisteredEvent {
|
|
6
7
|
contractClassId;
|
|
7
8
|
version;
|
|
@@ -16,7 +17,7 @@ import { REGISTERER_CONTRACT_CLASS_REGISTERED_TAG } from '../protocol_contract_d
|
|
|
16
17
|
this.packedPublicBytecode = packedPublicBytecode;
|
|
17
18
|
}
|
|
18
19
|
static isContractClassRegisteredEvent(log) {
|
|
19
|
-
return log.fields.fields[0].
|
|
20
|
+
return log.contractAddress.equals(ProtocolContractAddress.ContractClassRegisterer) && log.fields.fields[0].toBigInt() === REGISTERER_CONTRACT_CLASS_REGISTERED_MAGIC_VALUE;
|
|
20
21
|
}
|
|
21
22
|
static fromLog(log) {
|
|
22
23
|
const fieldsWithoutTag = log.fields.fields.slice(1);
|
|
@@ -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,
|
|
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,EAGrB,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;IAO9D,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,7 +1,7 @@
|
|
|
1
|
-
import { ARTIFACT_FUNCTION_TREE_MAX_HEIGHT, FUNCTION_TREE_HEIGHT, MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS } from '@aztec/constants';
|
|
1
|
+
import { ARTIFACT_FUNCTION_TREE_MAX_HEIGHT, FUNCTION_TREE_HEIGHT, MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS, REGISTERER_PRIVATE_FUNCTION_BROADCASTED_MAGIC_VALUE } from '@aztec/constants';
|
|
2
2
|
import { FieldReader } from '@aztec/foundation/serialize';
|
|
3
3
|
import { FunctionSelector, bufferFromFields } from '@aztec/stdlib/abi';
|
|
4
|
-
import {
|
|
4
|
+
import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
5
5
|
/** Event emitted from the ContractClassRegisterer. */ export class PrivateFunctionBroadcastedEvent {
|
|
6
6
|
contractClassId;
|
|
7
7
|
artifactMetadataHash;
|
|
@@ -22,7 +22,7 @@ import { REGISTERER_PRIVATE_FUNCTION_BROADCASTED_TAG } from '../protocol_contrac
|
|
|
22
22
|
this.privateFunction = privateFunction;
|
|
23
23
|
}
|
|
24
24
|
static isPrivateFunctionBroadcastedEvent(log) {
|
|
25
|
-
return log.fields.fields[0].
|
|
25
|
+
return log.contractAddress.equals(ProtocolContractAddress.ContractClassRegisterer) && log.fields.fields[0].toBigInt() === REGISTERER_PRIVATE_FUNCTION_BROADCASTED_MAGIC_VALUE;
|
|
26
26
|
}
|
|
27
27
|
static fromLog(log) {
|
|
28
28
|
const reader = new FieldReader(log.fields.fields.slice(1));
|
|
@@ -1 +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,
|
|
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,EAGlC,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;IAO9D,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"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ARTIFACT_FUNCTION_TREE_MAX_HEIGHT, MAX_PACKED_BYTECODE_SIZE_PER_UTILITY_FUNCTION_IN_FIELDS } from '@aztec/constants';
|
|
1
|
+
import { ARTIFACT_FUNCTION_TREE_MAX_HEIGHT, MAX_PACKED_BYTECODE_SIZE_PER_UTILITY_FUNCTION_IN_FIELDS, REGISTERER_UTILITY_FUNCTION_BROADCASTED_MAGIC_VALUE } from '@aztec/constants';
|
|
2
2
|
import { removeArrayPaddingEnd } from '@aztec/foundation/collection';
|
|
3
3
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
4
|
import { FieldReader } from '@aztec/foundation/serialize';
|
|
5
5
|
import { FunctionSelector, bufferFromFields } from '@aztec/stdlib/abi';
|
|
6
|
-
import {
|
|
6
|
+
import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
7
7
|
/** Event emitted from the ContractClassRegisterer. */ export class UtilityFunctionBroadcastedEvent {
|
|
8
8
|
contractClassId;
|
|
9
9
|
artifactMetadataHash;
|
|
@@ -20,7 +20,7 @@ import { REGISTERER_UTILITY_FUNCTION_BROADCASTED_TAG } from '../protocol_contrac
|
|
|
20
20
|
this.utilityFunction = utilityFunction;
|
|
21
21
|
}
|
|
22
22
|
static isUtilityFunctionBroadcastedEvent(log) {
|
|
23
|
-
return log.fields.fields[0].
|
|
23
|
+
return log.contractAddress.equals(ProtocolContractAddress.ContractClassRegisterer) && log.fields.fields[0].toBigInt() === REGISTERER_UTILITY_FUNCTION_BROADCASTED_MAGIC_VALUE;
|
|
24
24
|
}
|
|
25
25
|
static fromLog(log) {
|
|
26
26
|
const reader = new FieldReader(log.fields.fields.slice(1));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract_instance_updated_event.d.ts","sourceRoot":"","sources":["../../src/instance-deployer/contract_instance_updated_event.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contract_instance_updated_event.d.ts","sourceRoot":"","sources":["../../src/instance-deployer/contract_instance_updated_event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAIpD,uDAAuD;AACvD,qBAAa,4BAA4B;aAErB,OAAO,EAAE,YAAY;aACrB,mBAAmB,EAAE,EAAE;aACvB,kBAAkB,EAAE,EAAE;aACtB,aAAa,EAAE,MAAM;gBAHrB,OAAO,EAAE,YAAY,EACrB,mBAAmB,EAAE,EAAE,EACvB,kBAAkB,EAAE,EAAE,EACtB,aAAa,EAAE,MAAM;IAGvC,MAAM,CAAC,8BAA8B,CAAC,GAAG,EAAE,SAAS;IAOpD,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS;IAW7B,wBAAwB,IAAI,iCAAiC;CAQ9D"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { DEPLOYER_CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE } from '@aztec/constants';
|
|
1
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
2
3
|
import { BufferReader } from '@aztec/foundation/serialize';
|
|
3
4
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
|
-
import {
|
|
5
|
+
import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
5
6
|
/** Event emitted from the ContractInstanceDeployer. */ export class ContractInstanceUpdatedEvent {
|
|
6
7
|
address;
|
|
7
8
|
prevContractClassId;
|
|
@@ -14,7 +15,7 @@ import { DEPLOYER_CONTRACT_INSTANCE_UPDATED_TAG, ProtocolContractAddress } from
|
|
|
14
15
|
this.blockOfChange = blockOfChange;
|
|
15
16
|
}
|
|
16
17
|
static isContractInstanceUpdatedEvent(log) {
|
|
17
|
-
return log.contractAddress.equals(ProtocolContractAddress.ContractInstanceDeployer) && log.fields[0].
|
|
18
|
+
return log.contractAddress.equals(ProtocolContractAddress.ContractInstanceDeployer) && log.fields[0].toBigInt() === DEPLOYER_CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE;
|
|
18
19
|
}
|
|
19
20
|
static fromLog(log) {
|
|
20
21
|
const bufferWithoutAddressAndTag = log.toBuffer().subarray(64);
|
|
@@ -13,9 +13,5 @@ export declare const ProtocolContractLeaves: {
|
|
|
13
13
|
Router: Fr;
|
|
14
14
|
};
|
|
15
15
|
export declare const protocolContractTreeRoot: Fr;
|
|
16
|
-
export declare const REGISTERER_CONTRACT_CLASS_REGISTERED_TAG: Fr;
|
|
17
|
-
export declare const REGISTERER_PRIVATE_FUNCTION_BROADCASTED_TAG: Fr;
|
|
18
|
-
export declare const REGISTERER_UTILITY_FUNCTION_BROADCASTED_TAG: Fr;
|
|
19
16
|
export declare const DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_TAG: Fr;
|
|
20
|
-
export declare const DEPLOYER_CONTRACT_INSTANCE_UPDATED_TAG: Fr;
|
|
21
17
|
//# sourceMappingURL=protocol_contract_data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol_contract_data.d.ts","sourceRoot":"","sources":["../src/protocol_contract_data.ts"],"names":[],"mappings":"AAEI,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG3D,eAAO,MAAM,qBAAqB,+HAOxB,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAIxE,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,oBAAoB,EAAE,EAAE,CAOjE,CAAC;AAIF,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,oBAAoB,EAAE,YAAY,CAO9E,CAAC;AAIF,eAAO,MAAM,sBAAsB;;;;;;;CAOlC,CAAC;AAIF,eAAO,MAAM,wBAAwB,IAAyF,CAAC;AAIjI,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"protocol_contract_data.d.ts","sourceRoot":"","sources":["../src/protocol_contract_data.ts"],"names":[],"mappings":"AAEI,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAG3D,eAAO,MAAM,qBAAqB,+HAOxB,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAIxE,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,oBAAoB,EAAE,EAAE,CAOjE,CAAC;AAIF,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,oBAAoB,EAAE,YAAY,CAO9E,CAAC;AAIF,eAAO,MAAM,sBAAsB;;;;;;;CAOlC,CAAC;AAIF,eAAO,MAAM,wBAAwB,IAAyF,CAAC;AAIjI,eAAO,MAAM,uCAAuC,IAAyF,CAAC"}
|
|
@@ -26,16 +26,12 @@ export const ProtocolContractAddress = {
|
|
|
26
26
|
Router: AztecAddress.fromBigInt(6n)
|
|
27
27
|
};
|
|
28
28
|
export const ProtocolContractLeaves = {
|
|
29
|
-
AuthRegistry: Fr.fromHexString('
|
|
30
|
-
ContractInstanceDeployer: Fr.fromHexString('
|
|
31
|
-
ContractClassRegisterer: Fr.fromHexString('
|
|
32
|
-
MultiCallEntrypoint: Fr.fromHexString('
|
|
33
|
-
FeeJuice: Fr.fromHexString('
|
|
34
|
-
Router: Fr.fromHexString('
|
|
29
|
+
AuthRegistry: Fr.fromHexString('0x01f04e0c7b30694dd18f063c10941b6f018521b2860b39fe6ea35a677c3e1084'),
|
|
30
|
+
ContractInstanceDeployer: Fr.fromHexString('0x121a18a234b5ce5e3245e13d0dd67955d32ffa1f2b80fae699158cf0450d88b1'),
|
|
31
|
+
ContractClassRegisterer: Fr.fromHexString('0x268060d5f30a511229d545a4086e398c3c11d9ed05ada8b5ce39ecda322e7972'),
|
|
32
|
+
MultiCallEntrypoint: Fr.fromHexString('0x0c8ffda17274db47c8c93064f9c8fa078cb31d81951ab2935ff126645d3406e8'),
|
|
33
|
+
FeeJuice: Fr.fromHexString('0x0347096721ebc0033b73f27a00d36d1334fc1bde1ca50bb74361239fc8d28c0e'),
|
|
34
|
+
Router: Fr.fromHexString('0x1e2f1d6a895fc60ceb38fc03f477095f72c17ed168f73861704903463a74401a')
|
|
35
35
|
};
|
|
36
|
-
export const protocolContractTreeRoot = Fr.fromHexString('
|
|
37
|
-
export const REGISTERER_CONTRACT_CLASS_REGISTERED_TAG = Fr.fromHexString('0x20cd27645f65c15a38720ca984aef936592f3938a705db706d068ad13fc58ae9');
|
|
38
|
-
export const REGISTERER_PRIVATE_FUNCTION_BROADCASTED_TAG = Fr.fromHexString('0x0abf338154e355442d9916d630da0491036d5a7b23c42b477c1395ba3bf9b42d');
|
|
39
|
-
export const REGISTERER_UTILITY_FUNCTION_BROADCASTED_TAG = Fr.fromHexString('0x27774539896271d6dbe0c1de45ddc44709d1e8d9a9fb686ca3c105d87c417bb8');
|
|
36
|
+
export const protocolContractTreeRoot = Fr.fromHexString('0x1b797c2c105c8bc69dc0610954d5807ba7f90e22db3a3a469f44ee47b0c0b2ea');
|
|
40
37
|
export const DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_TAG = Fr.fromHexString('0x2ec28b91a5f838506d6042915005ff55cf7a0a5f889a83b11faed33a31b486f2');
|
|
41
|
-
export const DEPLOYER_CONTRACT_INSTANCE_UPDATED_TAG = new Fr(1534834688047131268740281708431107902615560100979874281215533519862n);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CANONICAL_AUTH_REGISTRY_ADDRESS, DEPLOYER_CONTRACT_ADDRESS, DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_MAGIC_VALUE,
|
|
1
|
+
import { CANONICAL_AUTH_REGISTRY_ADDRESS, DEPLOYER_CONTRACT_ADDRESS, DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_MAGIC_VALUE, FEE_JUICE_ADDRESS, MULTI_CALL_ENTRYPOINT_ADDRESS, REGISTERER_CONTRACT_ADDRESS, ROUTER_ADDRESS } from '@aztec/constants';
|
|
2
2
|
import { poseidon2Hash } from '@aztec/foundation/crypto';
|
|
3
3
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
4
|
import { createConsoleLogger } from '@aztec/foundation/log';
|
|
@@ -108,26 +108,13 @@ async function generateRoot(names, leaves) {
|
|
|
108
108
|
export const protocolContractTreeRoot = Fr.fromHexString('${root.toString()}');
|
|
109
109
|
`;
|
|
110
110
|
}
|
|
111
|
+
// Generate the siloed log tags for events emitted via private logs.
|
|
111
112
|
async function generateLogTags() {
|
|
112
|
-
// See silo_contract_class_log for all registerer tags
|
|
113
113
|
return `
|
|
114
|
-
export const REGISTERER_CONTRACT_CLASS_REGISTERED_TAG = Fr.fromHexString('${await poseidon2Hash([
|
|
115
|
-
REGISTERER_CONTRACT_ADDRESS,
|
|
116
|
-
REGISTERER_CONTRACT_CLASS_REGISTERED_MAGIC_VALUE
|
|
117
|
-
])}');
|
|
118
|
-
export const REGISTERER_PRIVATE_FUNCTION_BROADCASTED_TAG = Fr.fromHexString('${await poseidon2Hash([
|
|
119
|
-
REGISTERER_CONTRACT_ADDRESS,
|
|
120
|
-
REGISTERER_PRIVATE_FUNCTION_BROADCASTED_MAGIC_VALUE
|
|
121
|
-
])}');
|
|
122
|
-
export const REGISTERER_UTILITY_FUNCTION_BROADCASTED_TAG = Fr.fromHexString('${await poseidon2Hash([
|
|
123
|
-
REGISTERER_CONTRACT_ADDRESS,
|
|
124
|
-
REGISTERER_UTILITY_FUNCTION_BROADCASTED_MAGIC_VALUE
|
|
125
|
-
])}');
|
|
126
114
|
export const DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_TAG = Fr.fromHexString('${await poseidon2Hash([
|
|
127
115
|
DEPLOYER_CONTRACT_ADDRESS,
|
|
128
116
|
DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_MAGIC_VALUE
|
|
129
117
|
])}');
|
|
130
|
-
export const DEPLOYER_CONTRACT_INSTANCE_UPDATED_TAG = new Fr(${DEPLOYER_CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE}n);
|
|
131
118
|
`;
|
|
132
119
|
}
|
|
133
120
|
async function generateOutputFile(names, leaves) {
|
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.
|
|
5
|
+
"version": "1.0.0-nightly.20250604",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./dest/index.js",
|
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@aztec/constants": "0.
|
|
73
|
-
"@aztec/foundation": "0.
|
|
74
|
-
"@aztec/stdlib": "0.
|
|
72
|
+
"@aztec/constants": "1.0.0-nightly.20250604",
|
|
73
|
+
"@aztec/foundation": "1.0.0-nightly.20250604",
|
|
74
|
+
"@aztec/stdlib": "1.0.0-nightly.20250604",
|
|
75
75
|
"lodash.chunk": "^4.2.0",
|
|
76
76
|
"lodash.omit": "^4.5.0",
|
|
77
77
|
"tslib": "^2.4.0"
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { REGISTERER_CONTRACT_CLASS_REGISTERED_MAGIC_VALUE } from '@aztec/constants';
|
|
1
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
2
3
|
import { FieldReader } from '@aztec/foundation/serialize';
|
|
3
4
|
import { bufferFromFields } from '@aztec/stdlib/abi';
|
|
@@ -8,7 +9,7 @@ import {
|
|
|
8
9
|
} from '@aztec/stdlib/contract';
|
|
9
10
|
import type { ContractClassLog } from '@aztec/stdlib/logs';
|
|
10
11
|
|
|
11
|
-
import {
|
|
12
|
+
import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
12
13
|
|
|
13
14
|
/** Event emitted from the ContractClassRegisterer. */
|
|
14
15
|
export class ContractClassRegisteredEvent {
|
|
@@ -21,7 +22,10 @@ export class ContractClassRegisteredEvent {
|
|
|
21
22
|
) {}
|
|
22
23
|
|
|
23
24
|
static isContractClassRegisteredEvent(log: ContractClassLog) {
|
|
24
|
-
return
|
|
25
|
+
return (
|
|
26
|
+
log.contractAddress.equals(ProtocolContractAddress.ContractClassRegisterer) &&
|
|
27
|
+
log.fields.fields[0].toBigInt() === REGISTERER_CONTRACT_CLASS_REGISTERED_MAGIC_VALUE
|
|
28
|
+
);
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
static fromLog(log: ContractClassLog) {
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
ARTIFACT_FUNCTION_TREE_MAX_HEIGHT,
|
|
3
3
|
FUNCTION_TREE_HEIGHT,
|
|
4
4
|
MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS,
|
|
5
|
+
REGISTERER_PRIVATE_FUNCTION_BROADCASTED_MAGIC_VALUE,
|
|
5
6
|
} from '@aztec/constants';
|
|
6
7
|
import { Fr } from '@aztec/foundation/fields';
|
|
7
8
|
import type { Tuple } from '@aztec/foundation/serialize';
|
|
@@ -10,7 +11,7 @@ import { FunctionSelector, bufferFromFields } from '@aztec/stdlib/abi';
|
|
|
10
11
|
import type { ExecutablePrivateFunctionWithMembershipProof, PrivateFunction } from '@aztec/stdlib/contract';
|
|
11
12
|
import type { ContractClassLog } from '@aztec/stdlib/logs';
|
|
12
13
|
|
|
13
|
-
import {
|
|
14
|
+
import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
14
15
|
|
|
15
16
|
/** Event emitted from the ContractClassRegisterer. */
|
|
16
17
|
export class PrivateFunctionBroadcastedEvent {
|
|
@@ -26,7 +27,10 @@ export class PrivateFunctionBroadcastedEvent {
|
|
|
26
27
|
) {}
|
|
27
28
|
|
|
28
29
|
static isPrivateFunctionBroadcastedEvent(log: ContractClassLog) {
|
|
29
|
-
return
|
|
30
|
+
return (
|
|
31
|
+
log.contractAddress.equals(ProtocolContractAddress.ContractClassRegisterer) &&
|
|
32
|
+
log.fields.fields[0].toBigInt() === REGISTERER_PRIVATE_FUNCTION_BROADCASTED_MAGIC_VALUE
|
|
33
|
+
);
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
static fromLog(log: ContractClassLog) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ARTIFACT_FUNCTION_TREE_MAX_HEIGHT,
|
|
3
3
|
MAX_PACKED_BYTECODE_SIZE_PER_UTILITY_FUNCTION_IN_FIELDS,
|
|
4
|
+
REGISTERER_UTILITY_FUNCTION_BROADCASTED_MAGIC_VALUE,
|
|
4
5
|
} from '@aztec/constants';
|
|
5
6
|
import { removeArrayPaddingEnd } from '@aztec/foundation/collection';
|
|
6
7
|
import { Fr } from '@aztec/foundation/fields';
|
|
@@ -10,7 +11,7 @@ import { FunctionSelector, bufferFromFields } from '@aztec/stdlib/abi';
|
|
|
10
11
|
import type { UtilityFunction, UtilityFunctionWithMembershipProof } from '@aztec/stdlib/contract';
|
|
11
12
|
import type { ContractClassLog } from '@aztec/stdlib/logs';
|
|
12
13
|
|
|
13
|
-
import {
|
|
14
|
+
import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
14
15
|
|
|
15
16
|
/** Event emitted from the ContractClassRegisterer. */
|
|
16
17
|
export class UtilityFunctionBroadcastedEvent {
|
|
@@ -24,7 +25,10 @@ export class UtilityFunctionBroadcastedEvent {
|
|
|
24
25
|
) {}
|
|
25
26
|
|
|
26
27
|
static isUtilityFunctionBroadcastedEvent(log: ContractClassLog) {
|
|
27
|
-
return
|
|
28
|
+
return (
|
|
29
|
+
log.contractAddress.equals(ProtocolContractAddress.ContractClassRegisterer) &&
|
|
30
|
+
log.fields.fields[0].toBigInt() === REGISTERER_UTILITY_FUNCTION_BROADCASTED_MAGIC_VALUE
|
|
31
|
+
);
|
|
28
32
|
}
|
|
29
33
|
|
|
30
34
|
static fromLog(log: ContractClassLog) {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { DEPLOYER_CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE } from '@aztec/constants';
|
|
1
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
2
3
|
import { BufferReader } from '@aztec/foundation/serialize';
|
|
3
4
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
5
|
import type { ContractInstanceUpdateWithAddress } from '@aztec/stdlib/contract';
|
|
5
6
|
import type { PublicLog } from '@aztec/stdlib/logs';
|
|
6
7
|
|
|
7
|
-
import {
|
|
8
|
+
import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
8
9
|
|
|
9
10
|
/** Event emitted from the ContractInstanceDeployer. */
|
|
10
11
|
export class ContractInstanceUpdatedEvent {
|
|
@@ -18,7 +19,7 @@ export class ContractInstanceUpdatedEvent {
|
|
|
18
19
|
static isContractInstanceUpdatedEvent(log: PublicLog) {
|
|
19
20
|
return (
|
|
20
21
|
log.contractAddress.equals(ProtocolContractAddress.ContractInstanceDeployer) &&
|
|
21
|
-
log.fields[0].
|
|
22
|
+
log.fields[0].toBigInt() === DEPLOYER_CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE
|
|
22
23
|
);
|
|
23
24
|
}
|
|
24
25
|
|
|
@@ -40,24 +40,20 @@ Router: AztecAddress.fromBigInt(6n)
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
export const ProtocolContractLeaves = {
|
|
43
|
-
AuthRegistry: Fr.fromHexString('
|
|
44
|
-
ContractInstanceDeployer: Fr.fromHexString('
|
|
45
|
-
ContractClassRegisterer: Fr.fromHexString('
|
|
46
|
-
MultiCallEntrypoint: Fr.fromHexString('
|
|
47
|
-
FeeJuice: Fr.fromHexString('
|
|
48
|
-
Router: Fr.fromHexString('
|
|
43
|
+
AuthRegistry: Fr.fromHexString('0x01f04e0c7b30694dd18f063c10941b6f018521b2860b39fe6ea35a677c3e1084'),
|
|
44
|
+
ContractInstanceDeployer: Fr.fromHexString('0x121a18a234b5ce5e3245e13d0dd67955d32ffa1f2b80fae699158cf0450d88b1'),
|
|
45
|
+
ContractClassRegisterer: Fr.fromHexString('0x268060d5f30a511229d545a4086e398c3c11d9ed05ada8b5ce39ecda322e7972'),
|
|
46
|
+
MultiCallEntrypoint: Fr.fromHexString('0x0c8ffda17274db47c8c93064f9c8fa078cb31d81951ab2935ff126645d3406e8'),
|
|
47
|
+
FeeJuice: Fr.fromHexString('0x0347096721ebc0033b73f27a00d36d1334fc1bde1ca50bb74361239fc8d28c0e'),
|
|
48
|
+
Router: Fr.fromHexString('0x1e2f1d6a895fc60ceb38fc03f477095f72c17ed168f73861704903463a74401a')
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
export const protocolContractTreeRoot = Fr.fromHexString('
|
|
53
|
+
export const protocolContractTreeRoot = Fr.fromHexString('0x1b797c2c105c8bc69dc0610954d5807ba7f90e22db3a3a469f44ee47b0c0b2ea');
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
export const REGISTERER_CONTRACT_CLASS_REGISTERED_TAG = Fr.fromHexString('0x20cd27645f65c15a38720ca984aef936592f3938a705db706d068ad13fc58ae9');
|
|
58
|
-
export const REGISTERER_PRIVATE_FUNCTION_BROADCASTED_TAG = Fr.fromHexString('0x0abf338154e355442d9916d630da0491036d5a7b23c42b477c1395ba3bf9b42d');
|
|
59
|
-
export const REGISTERER_UTILITY_FUNCTION_BROADCASTED_TAG = Fr.fromHexString('0x27774539896271d6dbe0c1de45ddc44709d1e8d9a9fb686ca3c105d87c417bb8');
|
|
60
57
|
export const DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_TAG = Fr.fromHexString('0x2ec28b91a5f838506d6042915005ff55cf7a0a5f889a83b11faed33a31b486f2');
|
|
61
|
-
export const DEPLOYER_CONTRACT_INSTANCE_UPDATED_TAG = new Fr(1534834688047131268740281708431107902615560100979874281215533519862n);
|
|
62
58
|
|
|
63
59
|
|