@aztec/protocol-contracts 1.2.0 → 2.0.0-nightly.20250813
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/README.md +2 -2
- package/artifacts/AuthRegistry.json +778 -680
- package/artifacts/ContractClassRegistry.json +8374 -0
- package/artifacts/ContractInstanceRegistry.json +3636 -0
- package/artifacts/FeeJuice.json +729 -647
- package/artifacts/MultiCallEntrypoint.json +670 -544
- package/artifacts/Router.json +1204 -932
- package/dest/{class-registerer/contract_class_registered_event.d.ts → class-registry/contract_class_published_event.d.ts} +5 -5
- package/dest/class-registry/contract_class_published_event.d.ts.map +1 -0
- package/dest/{class-registerer/contract_class_registered_event.js → class-registry/contract_class_published_event.js} +5 -5
- package/dest/class-registry/index.d.ts +8 -0
- package/dest/class-registry/index.d.ts.map +1 -0
- package/dest/{class-registerer → class-registry}/index.js +6 -6
- package/dest/{class-registerer → class-registry}/lazy.d.ts +3 -3
- package/dest/class-registry/lazy.d.ts.map +1 -0
- package/dest/{class-registerer → class-registry}/lazy.js +7 -7
- package/dest/{class-registerer → class-registry}/private_function_broadcasted_event.d.ts +1 -1
- package/dest/class-registry/private_function_broadcasted_event.d.ts.map +1 -0
- package/dest/{class-registerer → class-registry}/private_function_broadcasted_event.js +3 -3
- package/dest/{class-registerer → class-registry}/utility_function_broadcasted_event.d.ts +1 -1
- package/dest/class-registry/utility_function_broadcasted_event.d.ts.map +1 -0
- package/dest/{class-registerer → class-registry}/utility_function_broadcasted_event.js +3 -3
- package/dest/{instance-deployer/contract_instance_deployed_event.d.ts → instance-registry/contract_instance_published_event.d.ts} +5 -5
- package/dest/instance-registry/contract_instance_published_event.d.ts.map +1 -0
- package/dest/{instance-deployer/contract_instance_deployed_event.js → instance-registry/contract_instance_published_event.js} +5 -5
- package/dest/{instance-deployer → instance-registry}/contract_instance_updated_event.d.ts +1 -1
- package/dest/{instance-deployer → instance-registry}/contract_instance_updated_event.d.ts.map +1 -1
- package/dest/{instance-deployer → instance-registry}/contract_instance_updated_event.js +3 -3
- package/dest/{instance-deployer → instance-registry}/index.d.ts +3 -3
- package/dest/instance-registry/index.d.ts.map +1 -0
- package/dest/{instance-deployer → instance-registry}/index.js +5 -5
- package/dest/{instance-deployer → instance-registry}/lazy.d.ts +3 -3
- package/dest/{instance-deployer → instance-registry}/lazy.d.ts.map +1 -1
- package/dest/{instance-deployer → instance-registry}/lazy.js +7 -7
- package/dest/make_protocol_contract.js +2 -2
- package/dest/protocol_contract_data.d.ts +4 -4
- package/dest/protocol_contract_data.d.ts.map +1 -1
- package/dest/protocol_contract_data.js +14 -14
- package/dest/provider/bundle.js +4 -4
- package/dest/provider/lazy.js +6 -6
- package/dest/scripts/generate_data.js +8 -8
- package/dest/tests/fixtures.d.ts +2 -2
- package/dest/tests/fixtures.d.ts.map +1 -1
- package/dest/tests/fixtures.js +4 -4
- package/package.json +6 -6
- package/src/class-registry/__snapshots__/README.md +9 -0
- package/src/{class-registerer/contract_class_registered_event.ts → class-registry/contract_class_published_event.ts} +7 -7
- package/src/{class-registerer → class-registry}/index.ts +6 -8
- package/src/{class-registerer → class-registry}/lazy.ts +7 -7
- package/src/{class-registerer → class-registry}/private_function_broadcasted_event.ts +4 -4
- package/src/{class-registerer → class-registry}/utility_function_broadcasted_event.ts +4 -4
- package/src/instance-registry/__snapshots__/README.md +9 -0
- package/src/{instance-deployer/contract_instance_deployed_event.ts → instance-registry/contract_instance_published_event.ts} +6 -6
- package/src/{instance-deployer → instance-registry}/contract_instance_updated_event.ts +4 -4
- package/src/{instance-deployer → instance-registry}/index.ts +6 -6
- package/src/{instance-deployer → instance-registry}/lazy.ts +7 -7
- package/src/make_protocol_contract.ts +2 -2
- package/src/protocol_contract_data.ts +14 -14
- package/src/provider/bundle.ts +4 -4
- package/src/provider/lazy.ts +6 -6
- package/src/tests/fixtures.ts +4 -4
- package/artifacts/ContractClassRegisterer.json +0 -7806
- package/artifacts/ContractInstanceDeployer.json +0 -3525
- package/dest/class-registerer/contract_class_registered_event.d.ts.map +0 -1
- package/dest/class-registerer/index.d.ts +0 -8
- package/dest/class-registerer/index.d.ts.map +0 -1
- package/dest/class-registerer/lazy.d.ts.map +0 -1
- package/dest/class-registerer/private_function_broadcasted_event.d.ts.map +0 -1
- package/dest/class-registerer/utility_function_broadcasted_event.d.ts.map +0 -1
- package/dest/instance-deployer/contract_instance_deployed_event.d.ts.map +0 -1
- package/dest/instance-deployer/index.d.ts.map +0 -1
- /package/artifacts/{ContractClassRegisterer.d.json.ts → ContractClassRegistry.d.json.ts} +0 -0
- /package/artifacts/{ContractInstanceDeployer.d.json.ts → ContractInstanceRegistry.d.json.ts} +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/fields';
|
|
2
2
|
import { type ContractClassPublic } from '@aztec/stdlib/contract';
|
|
3
3
|
import type { ContractClassLog } from '@aztec/stdlib/logs';
|
|
4
|
-
/** Event emitted from the
|
|
5
|
-
export declare class
|
|
4
|
+
/** Event emitted from the ContractClassRegistry. */
|
|
5
|
+
export declare class ContractClassPublishedEvent {
|
|
6
6
|
readonly contractClassId: Fr;
|
|
7
7
|
readonly version: number;
|
|
8
8
|
readonly artifactHash: Fr;
|
|
9
9
|
readonly privateFunctionsRoot: Fr;
|
|
10
10
|
readonly packedPublicBytecode: Buffer;
|
|
11
11
|
constructor(contractClassId: Fr, version: number, artifactHash: Fr, privateFunctionsRoot: Fr, packedPublicBytecode: Buffer);
|
|
12
|
-
static
|
|
13
|
-
static fromLog(log: ContractClassLog):
|
|
12
|
+
static isContractClassPublishedEvent(log: ContractClassLog): boolean;
|
|
13
|
+
static fromLog(log: ContractClassLog): ContractClassPublishedEvent;
|
|
14
14
|
toContractClassPublic(): Promise<ContractClassPublic>;
|
|
15
15
|
}
|
|
16
|
-
//# sourceMappingURL=
|
|
16
|
+
//# sourceMappingURL=contract_class_published_event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract_class_published_event.d.ts","sourceRoot":"","sources":["../../src/class-registry/contract_class_published_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,oDAAoD;AACpD,qBAAa,2BAA2B;aAEpB,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,6BAA6B,CAAC,GAAG,EAAE,gBAAgB;IAO1D,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,gBAAgB;IAkB9B,qBAAqB,IAAI,OAAO,CAAC,mBAAmB,CAAC;CA2B5D"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CONTRACT_CLASS_PUBLISHED_MAGIC_VALUE } from '@aztec/constants';
|
|
2
2
|
import { FieldReader } from '@aztec/foundation/serialize';
|
|
3
3
|
import { bufferFromFields } from '@aztec/stdlib/abi';
|
|
4
4
|
import { computeContractClassId, computePublicBytecodeCommitment } from '@aztec/stdlib/contract';
|
|
5
5
|
import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
6
|
-
/** Event emitted from the
|
|
6
|
+
/** Event emitted from the ContractClassRegistry. */ export class ContractClassPublishedEvent {
|
|
7
7
|
contractClassId;
|
|
8
8
|
version;
|
|
9
9
|
artifactHash;
|
|
@@ -16,8 +16,8 @@ import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
|
16
16
|
this.privateFunctionsRoot = privateFunctionsRoot;
|
|
17
17
|
this.packedPublicBytecode = packedPublicBytecode;
|
|
18
18
|
}
|
|
19
|
-
static
|
|
20
|
-
return log.contractAddress.equals(ProtocolContractAddress.
|
|
19
|
+
static isContractClassPublishedEvent(log) {
|
|
20
|
+
return log.contractAddress.equals(ProtocolContractAddress.ContractClassRegistry) && log.fields.fields[0].toBigInt() === CONTRACT_CLASS_PUBLISHED_MAGIC_VALUE;
|
|
21
21
|
}
|
|
22
22
|
static fromLog(log) {
|
|
23
23
|
const fieldsWithoutTag = log.fields.fields.slice(1);
|
|
@@ -27,7 +27,7 @@ import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
|
27
27
|
const artifactHash = reader.readField();
|
|
28
28
|
const privateFunctionsRoot = reader.readField();
|
|
29
29
|
const packedPublicBytecode = bufferFromFields(reader.readFieldArray(fieldsWithoutTag.length - reader.cursor));
|
|
30
|
-
return new
|
|
30
|
+
return new ContractClassPublishedEvent(contractClassId, version, artifactHash, privateFunctionsRoot, packedPublicBytecode);
|
|
31
31
|
}
|
|
32
32
|
async toContractClassPublic() {
|
|
33
33
|
const computedClassId = await computeContractClassId({
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ProtocolContract } from '../protocol_contract.js';
|
|
2
|
+
export * from './contract_class_published_event.js';
|
|
3
|
+
export * from './private_function_broadcasted_event.js';
|
|
4
|
+
export * from './utility_function_broadcasted_event.js';
|
|
5
|
+
export declare const ContractClassRegistryArtifact: import("@aztec/stdlib/abi").ContractArtifact;
|
|
6
|
+
/** Returns the canonical deployment of the contract. */
|
|
7
|
+
export declare function getCanonicalClassRegistry(): Promise<ProtocolContract>;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/class-registry/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AAExD,eAAO,MAAM,6BAA6B,8CAA0E,CAAC;AAIrH,wDAAwD;AACxD,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAM3E"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { loadContractArtifact } from '@aztec/stdlib/abi';
|
|
2
|
-
import
|
|
2
|
+
import ContractClassRegistryJson from '../../artifacts/ContractClassRegistry.json' with {
|
|
3
3
|
type: 'json'
|
|
4
4
|
};
|
|
5
5
|
import { makeProtocolContract } from '../make_protocol_contract.js';
|
|
6
|
-
export * from './
|
|
6
|
+
export * from './contract_class_published_event.js';
|
|
7
7
|
export * from './private_function_broadcasted_event.js';
|
|
8
8
|
export * from './utility_function_broadcasted_event.js';
|
|
9
|
-
export const
|
|
9
|
+
export const ContractClassRegistryArtifact = loadContractArtifact(ContractClassRegistryJson);
|
|
10
10
|
let protocolContract;
|
|
11
|
-
/** Returns the canonical deployment of the contract. */ export async function
|
|
11
|
+
/** Returns the canonical deployment of the contract. */ export async function getCanonicalClassRegistry() {
|
|
12
12
|
if (!protocolContract) {
|
|
13
|
-
const artifact =
|
|
14
|
-
protocolContract = await makeProtocolContract('
|
|
13
|
+
const artifact = ContractClassRegistryArtifact;
|
|
14
|
+
protocolContract = await makeProtocolContract('ContractClassRegistry', artifact);
|
|
15
15
|
}
|
|
16
16
|
return protocolContract;
|
|
17
17
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ContractArtifact } from '@aztec/stdlib/abi';
|
|
2
2
|
import type { ProtocolContract } from '../protocol_contract.js';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './contract_class_published_event.js';
|
|
4
4
|
export * from './private_function_broadcasted_event.js';
|
|
5
5
|
export * from './utility_function_broadcasted_event.js';
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function getContractClassRegistryArtifact(): Promise<ContractArtifact>;
|
|
7
7
|
/** Returns the canonical deployment of the auth registry. */
|
|
8
|
-
export declare function
|
|
8
|
+
export declare function getCanonicalClassRegistry(): Promise<ProtocolContract>;
|
|
9
9
|
//# sourceMappingURL=lazy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../src/class-registry/lazy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAwB,MAAM,mBAAmB,CAAC;AAGhF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AAKxD,wBAAsB,gCAAgC,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAWlF;AAED,6DAA6D;AAC7D,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAM3E"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { loadContractArtifact } from '@aztec/stdlib/abi';
|
|
2
2
|
import { makeProtocolContract } from '../make_protocol_contract.js';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './contract_class_published_event.js';
|
|
4
4
|
export * from './private_function_broadcasted_event.js';
|
|
5
5
|
export * from './utility_function_broadcasted_event.js';
|
|
6
6
|
let protocolContract;
|
|
7
7
|
let protocolContractArtifact;
|
|
8
|
-
export async function
|
|
8
|
+
export async function getContractClassRegistryArtifact() {
|
|
9
9
|
if (!protocolContractArtifact) {
|
|
10
10
|
// Cannot assert this import as it's incompatible with browsers
|
|
11
11
|
// https://caniuse.com/mdn-javascript_statements_import_import_assertions_type_json
|
|
12
12
|
// Use the new "with" syntax once supported by firefox
|
|
13
13
|
// https://caniuse.com/mdn-javascript_statements_import_import_attributes_type_json
|
|
14
14
|
// In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
|
|
15
|
-
const { default:
|
|
16
|
-
protocolContractArtifact = loadContractArtifact(
|
|
15
|
+
const { default: contractClassRegistryJson } = await import('../../artifacts/ContractClassRegistry.json');
|
|
16
|
+
protocolContractArtifact = loadContractArtifact(contractClassRegistryJson);
|
|
17
17
|
}
|
|
18
18
|
return protocolContractArtifact;
|
|
19
19
|
}
|
|
20
|
-
/** Returns the canonical deployment of the auth registry. */ export async function
|
|
20
|
+
/** Returns the canonical deployment of the auth registry. */ export async function getCanonicalClassRegistry() {
|
|
21
21
|
if (!protocolContract) {
|
|
22
|
-
const
|
|
23
|
-
protocolContract = await makeProtocolContract('
|
|
22
|
+
const contractClassRegistryArtifact = await getContractClassRegistryArtifact();
|
|
23
|
+
protocolContract = await makeProtocolContract('ContractClassRegistry', contractClassRegistryArtifact);
|
|
24
24
|
}
|
|
25
25
|
return protocolContract;
|
|
26
26
|
}
|
|
@@ -5,7 +5,7 @@ import { FieldReader } from '@aztec/foundation/serialize';
|
|
|
5
5
|
import { FunctionSelector } from '@aztec/stdlib/abi';
|
|
6
6
|
import type { ExecutablePrivateFunctionWithMembershipProof, PrivateFunction } from '@aztec/stdlib/contract';
|
|
7
7
|
import type { ContractClassLog } from '@aztec/stdlib/logs';
|
|
8
|
-
/** Event emitted from the
|
|
8
|
+
/** Event emitted from the ContractClassRegistry. */
|
|
9
9
|
export declare class PrivateFunctionBroadcastedEvent {
|
|
10
10
|
readonly contractClassId: Fr;
|
|
11
11
|
readonly artifactMetadataHash: Fr;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"private_function_broadcasted_event.d.ts","sourceRoot":"","sources":["../../src/class-registry/private_function_broadcasted_event.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EAEjC,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,oDAAoD;AACpD,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,8 +1,8 @@
|
|
|
1
|
-
import { ARTIFACT_FUNCTION_TREE_MAX_HEIGHT, FUNCTION_TREE_HEIGHT, MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS
|
|
1
|
+
import { ARTIFACT_FUNCTION_TREE_MAX_HEIGHT, CONTRACT_CLASS_REGISTRY_PRIVATE_FUNCTION_BROADCASTED_MAGIC_VALUE, FUNCTION_TREE_HEIGHT, MAX_PACKED_BYTECODE_SIZE_PER_PRIVATE_FUNCTION_IN_FIELDS } from '@aztec/constants';
|
|
2
2
|
import { FieldReader } from '@aztec/foundation/serialize';
|
|
3
3
|
import { FunctionSelector, bufferFromFields } from '@aztec/stdlib/abi';
|
|
4
4
|
import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
5
|
-
/** Event emitted from the
|
|
5
|
+
/** Event emitted from the ContractClassRegistry. */ export class PrivateFunctionBroadcastedEvent {
|
|
6
6
|
contractClassId;
|
|
7
7
|
artifactMetadataHash;
|
|
8
8
|
utilityFunctionsTreeRoot;
|
|
@@ -22,7 +22,7 @@ import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
|
22
22
|
this.privateFunction = privateFunction;
|
|
23
23
|
}
|
|
24
24
|
static isPrivateFunctionBroadcastedEvent(log) {
|
|
25
|
-
return log.contractAddress.equals(ProtocolContractAddress.
|
|
25
|
+
return log.contractAddress.equals(ProtocolContractAddress.ContractClassRegistry) && log.fields.fields[0].toBigInt() === CONTRACT_CLASS_REGISTRY_PRIVATE_FUNCTION_BROADCASTED_MAGIC_VALUE;
|
|
26
26
|
}
|
|
27
27
|
static fromLog(log) {
|
|
28
28
|
const reader = new FieldReader(log.fields.fields.slice(1));
|
|
@@ -5,7 +5,7 @@ import { FieldReader } from '@aztec/foundation/serialize';
|
|
|
5
5
|
import { FunctionSelector } from '@aztec/stdlib/abi';
|
|
6
6
|
import type { UtilityFunction, UtilityFunctionWithMembershipProof } from '@aztec/stdlib/contract';
|
|
7
7
|
import type { ContractClassLog } from '@aztec/stdlib/logs';
|
|
8
|
-
/** Event emitted from the
|
|
8
|
+
/** Event emitted from the ContractClassRegistry. */
|
|
9
9
|
export declare class UtilityFunctionBroadcastedEvent {
|
|
10
10
|
readonly contractClassId: Fr;
|
|
11
11
|
readonly artifactMetadataHash: Fr;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility_function_broadcasted_event.d.ts","sourceRoot":"","sources":["../../src/class-registry/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,oDAAoD;AACpD,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,10 +1,10 @@
|
|
|
1
|
-
import { ARTIFACT_FUNCTION_TREE_MAX_HEIGHT,
|
|
1
|
+
import { ARTIFACT_FUNCTION_TREE_MAX_HEIGHT, CONTRACT_CLASS_REGISTRY_UTILITY_FUNCTION_BROADCASTED_MAGIC_VALUE, MAX_PACKED_BYTECODE_SIZE_PER_UTILITY_FUNCTION_IN_FIELDS } 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
6
|
import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
7
|
-
/** Event emitted from the
|
|
7
|
+
/** Event emitted from the ContractClassRegistry. */ export class UtilityFunctionBroadcastedEvent {
|
|
8
8
|
contractClassId;
|
|
9
9
|
artifactMetadataHash;
|
|
10
10
|
privateFunctionsArtifactTreeRoot;
|
|
@@ -20,7 +20,7 @@ import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
|
20
20
|
this.utilityFunction = utilityFunction;
|
|
21
21
|
}
|
|
22
22
|
static isUtilityFunctionBroadcastedEvent(log) {
|
|
23
|
-
return log.contractAddress.equals(ProtocolContractAddress.
|
|
23
|
+
return log.contractAddress.equals(ProtocolContractAddress.ContractClassRegistry) && log.fields.fields[0].toBigInt() === CONTRACT_CLASS_REGISTRY_UTILITY_FUNCTION_BROADCASTED_MAGIC_VALUE;
|
|
24
24
|
}
|
|
25
25
|
static fromLog(log) {
|
|
26
26
|
const reader = new FieldReader(log.fields.fields.slice(1));
|
|
@@ -3,8 +3,8 @@ import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
|
3
3
|
import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
4
4
|
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
5
5
|
import type { PrivateLog } from '@aztec/stdlib/logs';
|
|
6
|
-
/** Event emitted from the
|
|
7
|
-
export declare class
|
|
6
|
+
/** Event emitted from the ContractInstanceRegistry. */
|
|
7
|
+
export declare class ContractInstancePublishedEvent {
|
|
8
8
|
readonly address: AztecAddress;
|
|
9
9
|
readonly version: number;
|
|
10
10
|
readonly salt: Fr;
|
|
@@ -13,8 +13,8 @@ export declare class ContractInstanceDeployedEvent {
|
|
|
13
13
|
readonly publicKeys: PublicKeys;
|
|
14
14
|
readonly deployer: AztecAddress;
|
|
15
15
|
constructor(address: AztecAddress, version: number, salt: Fr, contractClassId: Fr, initializationHash: Fr, publicKeys: PublicKeys, deployer: AztecAddress);
|
|
16
|
-
static
|
|
17
|
-
static fromLog(log: PrivateLog):
|
|
16
|
+
static isContractInstancePublishedEvent(log: PrivateLog): boolean;
|
|
17
|
+
static fromLog(log: PrivateLog): ContractInstancePublishedEvent;
|
|
18
18
|
toContractInstance(): ContractInstanceWithAddress;
|
|
19
19
|
}
|
|
20
|
-
//# sourceMappingURL=
|
|
20
|
+
//# sourceMappingURL=contract_instance_published_event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract_instance_published_event.d.ts","sourceRoot":"","sources":["../../src/instance-registry/contract_instance_published_event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD,uDAAuD;AACvD,qBAAa,8BAA8B;aAEvB,OAAO,EAAE,YAAY;aACrB,OAAO,EAAE,MAAM;aACf,IAAI,EAAE,EAAE;aACR,eAAe,EAAE,EAAE;aACnB,kBAAkB,EAAE,EAAE;aACtB,UAAU,EAAE,UAAU;aACtB,QAAQ,EAAE,YAAY;gBANtB,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,EAAE,EACR,eAAe,EAAE,EAAE,EACnB,kBAAkB,EAAE,EAAE,EACtB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,YAAY;IAGxC,MAAM,CAAC,gCAAgC,CAAC,GAAG,EAAE,UAAU;IAIvD,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,UAAU;IAsB9B,kBAAkB,IAAI,2BAA2B;CAgBlD"}
|
|
@@ -2,8 +2,8 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
2
2
|
import { BufferReader } from '@aztec/foundation/serialize';
|
|
3
3
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
4
|
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
5
|
-
import {
|
|
6
|
-
/** Event emitted from the
|
|
5
|
+
import { CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG } from '../protocol_contract_data.js';
|
|
6
|
+
/** Event emitted from the ContractInstanceRegistry. */ export class ContractInstancePublishedEvent {
|
|
7
7
|
address;
|
|
8
8
|
version;
|
|
9
9
|
salt;
|
|
@@ -20,8 +20,8 @@ import { DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_TAG } from '../protocol_contract_da
|
|
|
20
20
|
this.publicKeys = publicKeys;
|
|
21
21
|
this.deployer = deployer;
|
|
22
22
|
}
|
|
23
|
-
static
|
|
24
|
-
return log.fields[0].equals(
|
|
23
|
+
static isContractInstancePublishedEvent(log) {
|
|
24
|
+
return log.fields[0].equals(CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG);
|
|
25
25
|
}
|
|
26
26
|
static fromLog(log) {
|
|
27
27
|
const bufferWithoutTag = log.toBuffer().subarray(32);
|
|
@@ -33,7 +33,7 @@ import { DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_TAG } from '../protocol_contract_da
|
|
|
33
33
|
const initializationHash = reader.readObject(Fr);
|
|
34
34
|
const publicKeys = reader.readObject(PublicKeys);
|
|
35
35
|
const deployer = reader.readObject(AztecAddress);
|
|
36
|
-
return new
|
|
36
|
+
return new ContractInstancePublishedEvent(address, version, salt, contractClassId, initializationHash, publicKeys, deployer);
|
|
37
37
|
}
|
|
38
38
|
toContractInstance() {
|
|
39
39
|
if (this.version !== 1) {
|
|
@@ -3,7 +3,7 @@ import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
|
3
3
|
import type { ContractInstanceUpdateWithAddress } from '@aztec/stdlib/contract';
|
|
4
4
|
import type { PublicLog } from '@aztec/stdlib/logs';
|
|
5
5
|
import type { UInt64 } from '@aztec/stdlib/types';
|
|
6
|
-
/** Event emitted from the
|
|
6
|
+
/** Event emitted from the ContractInstanceRegistry. */
|
|
7
7
|
export declare class ContractInstanceUpdatedEvent {
|
|
8
8
|
readonly address: AztecAddress;
|
|
9
9
|
readonly prevContractClassId: Fr;
|
package/dest/{instance-deployer → instance-registry}/contract_instance_updated_event.d.ts.map
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract_instance_updated_event.d.ts","sourceRoot":"","sources":["../../src/instance-
|
|
1
|
+
{"version":3,"file":"contract_instance_updated_event.d.ts","sourceRoot":"","sources":["../../src/instance-registry/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;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAIlD,uDAAuD;AACvD,qBAAa,4BAA4B;aAErB,OAAO,EAAE,YAAY;aACrB,mBAAmB,EAAE,EAAE;aACvB,kBAAkB,EAAE,EAAE;aACtB,iBAAiB,EAAE,MAAM;gBAHzB,OAAO,EAAE,YAAY,EACrB,mBAAmB,EAAE,EAAE,EACvB,kBAAkB,EAAE,EAAE,EACtB,iBAAiB,EAAE,MAAM;IAG3C,MAAM,CAAC,8BAA8B,CAAC,GAAG,EAAE,SAAS;IAOpD,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS;IAW7B,wBAAwB,IAAI,iCAAiC;CAQ9D"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE } from '@aztec/constants';
|
|
2
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
3
|
import { BufferReader } from '@aztec/foundation/serialize';
|
|
4
4
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
5
|
import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
6
|
-
/** Event emitted from the
|
|
6
|
+
/** Event emitted from the ContractInstanceRegistry. */ export class ContractInstanceUpdatedEvent {
|
|
7
7
|
address;
|
|
8
8
|
prevContractClassId;
|
|
9
9
|
newContractClassId;
|
|
@@ -15,7 +15,7 @@ import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
|
15
15
|
this.timestampOfChange = timestampOfChange;
|
|
16
16
|
}
|
|
17
17
|
static isContractInstanceUpdatedEvent(log) {
|
|
18
|
-
return log.contractAddress.equals(ProtocolContractAddress.
|
|
18
|
+
return log.contractAddress.equals(ProtocolContractAddress.ContractInstanceRegistry) && log.fields[0].toBigInt() === CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE;
|
|
19
19
|
}
|
|
20
20
|
static fromLog(log) {
|
|
21
21
|
const bufferWithoutAddressAndTag = log.toBuffer().subarray(64);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ProtocolContract } from '../protocol_contract.js';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './contract_instance_published_event.js';
|
|
3
3
|
export * from './contract_instance_updated_event.js';
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const ContractInstanceRegistryArtifact: import("@aztec/stdlib/abi").ContractArtifact;
|
|
5
5
|
/** Returns the canonical deployment of the contract. */
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function getCanonicalInstanceRegistry(): Promise<ProtocolContract>;
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/instance-registry/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AAErD,eAAO,MAAM,gCAAgC,8CAE5C,CAAC;AAIF,wDAAwD;AACxD,wBAAsB,4BAA4B,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAK9E"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { loadContractArtifact } from '@aztec/stdlib/abi';
|
|
2
|
-
import
|
|
2
|
+
import ContractInstanceRegistryJson from '../../artifacts/ContractInstanceRegistry.json' with {
|
|
3
3
|
type: 'json'
|
|
4
4
|
};
|
|
5
5
|
import { makeProtocolContract } from '../make_protocol_contract.js';
|
|
6
|
-
export * from './
|
|
6
|
+
export * from './contract_instance_published_event.js';
|
|
7
7
|
export * from './contract_instance_updated_event.js';
|
|
8
|
-
export const
|
|
8
|
+
export const ContractInstanceRegistryArtifact = loadContractArtifact(ContractInstanceRegistryJson);
|
|
9
9
|
let protocolContract;
|
|
10
|
-
/** Returns the canonical deployment of the contract. */ export async function
|
|
10
|
+
/** Returns the canonical deployment of the contract. */ export async function getCanonicalInstanceRegistry() {
|
|
11
11
|
if (!protocolContract) {
|
|
12
|
-
protocolContract = await makeProtocolContract('
|
|
12
|
+
protocolContract = await makeProtocolContract('ContractInstanceRegistry', ContractInstanceRegistryArtifact);
|
|
13
13
|
}
|
|
14
14
|
return protocolContract;
|
|
15
15
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type ContractArtifact } from '@aztec/stdlib/abi';
|
|
2
2
|
import type { ProtocolContract } from '../protocol_contract.js';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './contract_instance_published_event.js';
|
|
4
4
|
export * from './contract_instance_updated_event.js';
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function getContractInstanceRegistryArtifact(): Promise<ContractArtifact>;
|
|
6
6
|
/** Returns the canonical deployment of the auth registry. */
|
|
7
|
-
export declare function
|
|
7
|
+
export declare function getCanonicalInstanceRegistry(): Promise<ProtocolContract>;
|
|
8
8
|
//# sourceMappingURL=lazy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../src/instance-
|
|
1
|
+
{"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../src/instance-registry/lazy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAwB,MAAM,mBAAmB,CAAC;AAGhF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AAKrD,wBAAsB,mCAAmC,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAWrF;AAED,6DAA6D;AAC7D,wBAAsB,4BAA4B,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAM9E"}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { loadContractArtifact } from '@aztec/stdlib/abi';
|
|
2
2
|
import { makeProtocolContract } from '../make_protocol_contract.js';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './contract_instance_published_event.js';
|
|
4
4
|
export * from './contract_instance_updated_event.js';
|
|
5
5
|
let protocolContract;
|
|
6
6
|
let protocolContractArtifact;
|
|
7
|
-
export async function
|
|
7
|
+
export async function getContractInstanceRegistryArtifact() {
|
|
8
8
|
if (!protocolContractArtifact) {
|
|
9
9
|
// Cannot assert this import as it's incompatible with browsers
|
|
10
10
|
// https://caniuse.com/mdn-javascript_statements_import_import_assertions_type_json
|
|
11
11
|
// Use the new "with" syntax once supported by firefox
|
|
12
12
|
// https://caniuse.com/mdn-javascript_statements_import_import_attributes_type_json
|
|
13
13
|
// In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
|
|
14
|
-
const { default:
|
|
15
|
-
protocolContractArtifact = loadContractArtifact(
|
|
14
|
+
const { default: contractInstanceRegistryJson } = await import('../../artifacts/ContractInstanceRegistry.json');
|
|
15
|
+
protocolContractArtifact = loadContractArtifact(contractInstanceRegistryJson);
|
|
16
16
|
}
|
|
17
17
|
return protocolContractArtifact;
|
|
18
18
|
}
|
|
19
|
-
/** Returns the canonical deployment of the auth registry. */ export async function
|
|
19
|
+
/** Returns the canonical deployment of the auth registry. */ export async function getCanonicalInstanceRegistry() {
|
|
20
20
|
if (!protocolContract) {
|
|
21
|
-
const
|
|
22
|
-
protocolContract = await makeProtocolContract('
|
|
21
|
+
const contractInstanceRegistryArtifact = await getContractInstanceRegistryArtifact();
|
|
22
|
+
protocolContract = await makeProtocolContract('ContractInstanceRegistry', contractInstanceRegistryArtifact);
|
|
23
23
|
}
|
|
24
24
|
return protocolContract;
|
|
25
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getContractClassFromArtifact,
|
|
1
|
+
import { getContractClassFromArtifact, getContractInstanceFromInstantiationParams } from '@aztec/stdlib/contract';
|
|
2
2
|
import { ProtocolContractAddress, ProtocolContractSalt } from './protocol_contract_data.js';
|
|
3
3
|
/**
|
|
4
4
|
* Returns the canonical deployment given its name and artifact.
|
|
@@ -8,7 +8,7 @@ import { ProtocolContractAddress, ProtocolContractSalt } from './protocol_contra
|
|
|
8
8
|
const salt = ProtocolContractSalt[name];
|
|
9
9
|
// TODO(@spalladino): This computes the contract class from the artifact twice.
|
|
10
10
|
const contractClass = await getContractClassFromArtifact(artifact);
|
|
11
|
-
const instance = await
|
|
11
|
+
const instance = await getContractInstanceFromInstantiationParams(artifact, {
|
|
12
12
|
salt
|
|
13
13
|
});
|
|
14
14
|
return {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/fields';
|
|
2
2
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
|
-
export declare const protocolContractNames: readonly ["AuthRegistry", "
|
|
3
|
+
export declare const protocolContractNames: readonly ["AuthRegistry", "ContractInstanceRegistry", "ContractClassRegistry", "MultiCallEntrypoint", "FeeJuice", "Router"];
|
|
4
4
|
export type ProtocolContractName = typeof protocolContractNames[number];
|
|
5
5
|
export declare const ProtocolContractSalt: Record<ProtocolContractName, Fr>;
|
|
6
6
|
export declare const ProtocolContractAddress: Record<ProtocolContractName, AztecAddress>;
|
|
7
7
|
export declare const ProtocolContractLeaves: {
|
|
8
8
|
AuthRegistry: Fr;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
ContractInstanceRegistry: Fr;
|
|
10
|
+
ContractClassRegistry: Fr;
|
|
11
11
|
MultiCallEntrypoint: Fr;
|
|
12
12
|
FeeJuice: Fr;
|
|
13
13
|
Router: Fr;
|
|
14
14
|
};
|
|
15
15
|
export declare const protocolContractTreeRoot: Fr;
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG: Fr;
|
|
17
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
|
|
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,6HAOxB,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,qCAAqC,IAAyF,CAAC"}
|
|
@@ -3,35 +3,35 @@ import { Fr } from '@aztec/foundation/fields';
|
|
|
3
3
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
4
|
export const protocolContractNames = [
|
|
5
5
|
'AuthRegistry',
|
|
6
|
-
'
|
|
7
|
-
'
|
|
6
|
+
'ContractInstanceRegistry',
|
|
7
|
+
'ContractClassRegistry',
|
|
8
8
|
'MultiCallEntrypoint',
|
|
9
9
|
'FeeJuice',
|
|
10
10
|
'Router'
|
|
11
11
|
];
|
|
12
12
|
export const ProtocolContractSalt = {
|
|
13
13
|
AuthRegistry: new Fr(1),
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
ContractInstanceRegistry: new Fr(1),
|
|
15
|
+
ContractClassRegistry: new Fr(1),
|
|
16
16
|
MultiCallEntrypoint: new Fr(1),
|
|
17
17
|
FeeJuice: new Fr(1),
|
|
18
18
|
Router: new Fr(1)
|
|
19
19
|
};
|
|
20
20
|
export const ProtocolContractAddress = {
|
|
21
21
|
AuthRegistry: AztecAddress.fromBigInt(1n),
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
ContractInstanceRegistry: AztecAddress.fromBigInt(2n),
|
|
23
|
+
ContractClassRegistry: AztecAddress.fromBigInt(3n),
|
|
24
24
|
MultiCallEntrypoint: AztecAddress.fromBigInt(4n),
|
|
25
25
|
FeeJuice: AztecAddress.fromBigInt(5n),
|
|
26
26
|
Router: AztecAddress.fromBigInt(6n)
|
|
27
27
|
};
|
|
28
28
|
export const ProtocolContractLeaves = {
|
|
29
|
-
AuthRegistry: Fr.fromHexString('
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
MultiCallEntrypoint: Fr.fromHexString('
|
|
33
|
-
FeeJuice: Fr.fromHexString('
|
|
34
|
-
Router: Fr.fromHexString('
|
|
29
|
+
AuthRegistry: Fr.fromHexString('0x0789f6cb8356ce8d99f1173ce12232925aa61eb511e58a9b219b9548221a9147'),
|
|
30
|
+
ContractInstanceRegistry: Fr.fromHexString('0x236bb82e4b4c5ed15d7cf6d7922a865c7a894023b8d6de6c1bd9f3f26ec6a8ec'),
|
|
31
|
+
ContractClassRegistry: Fr.fromHexString('0x015e83a2205aa99d698426c8f788185df5d8a7b44020a43ab1b77f3313cd5fdc'),
|
|
32
|
+
MultiCallEntrypoint: Fr.fromHexString('0x1c6a82b9e3aa1cc8106270090201f47e43273f079271d9122b3b4563d554c40c'),
|
|
33
|
+
FeeJuice: Fr.fromHexString('0x18862ab00fb03f7e566ad42d2d79f4274cf71499a8eca648289320f529fe1293'),
|
|
34
|
+
Router: Fr.fromHexString('0x1a090e8ce78e960012ef09c2bb32d6691540b2cba5b88abfb8bdb19d6d3d894c')
|
|
35
35
|
};
|
|
36
|
-
export const protocolContractTreeRoot = Fr.fromHexString('
|
|
37
|
-
export const
|
|
36
|
+
export const protocolContractTreeRoot = Fr.fromHexString('0x0ce924440a6c63d9f268ac8686b7c75e9cc73cb2b8a57680c9af544cb47d10d6');
|
|
37
|
+
export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('0x28da3fc471387d4e20b646b77abc8cdfc02a339a7507285a73d84f9b97b13486');
|
package/dest/provider/bundle.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { AuthRegistryArtifact } from '../auth-registry/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { ContractClassRegistryArtifact } from '../class-registry/index.js';
|
|
3
3
|
import { FeeJuiceArtifact } from '../fee-juice/index.js';
|
|
4
|
-
import {
|
|
4
|
+
import { ContractInstanceRegistryArtifact } from '../instance-registry/index.js';
|
|
5
5
|
import { makeProtocolContract } from '../make_protocol_contract.js';
|
|
6
6
|
import { MultiCallEntrypointArtifact } from '../multi-call-entrypoint/index.js';
|
|
7
7
|
import { RouterArtifact } from '../router/index.js';
|
|
8
8
|
export const ProtocolContractArtifact = {
|
|
9
9
|
AuthRegistry: AuthRegistryArtifact,
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
ContractInstanceRegistry: ContractInstanceRegistryArtifact,
|
|
11
|
+
ContractClassRegistry: ContractClassRegistryArtifact,
|
|
12
12
|
MultiCallEntrypoint: MultiCallEntrypointArtifact,
|
|
13
13
|
FeeJuice: FeeJuiceArtifact,
|
|
14
14
|
Router: RouterArtifact
|
package/dest/provider/lazy.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getCanonicalAuthRegistry } from '../auth-registry/lazy.js';
|
|
2
|
-
import {
|
|
2
|
+
import { getCanonicalClassRegistry } from '../class-registry/lazy.js';
|
|
3
3
|
import { getCanonicalFeeJuice } from '../fee-juice/lazy.js';
|
|
4
|
-
import {
|
|
4
|
+
import { getCanonicalInstanceRegistry } from '../instance-registry/lazy.js';
|
|
5
5
|
import { getCanonicalMultiCallEntrypoint } from '../multi-call-entrypoint/lazy.js';
|
|
6
6
|
import { getCanonicalRouter } from '../router/lazy.js';
|
|
7
7
|
export class LazyProtocolContractsProvider {
|
|
@@ -9,10 +9,10 @@ export class LazyProtocolContractsProvider {
|
|
|
9
9
|
switch(name){
|
|
10
10
|
case 'AuthRegistry':
|
|
11
11
|
return getCanonicalAuthRegistry();
|
|
12
|
-
case '
|
|
13
|
-
return
|
|
14
|
-
case '
|
|
15
|
-
return
|
|
12
|
+
case 'ContractInstanceRegistry':
|
|
13
|
+
return getCanonicalInstanceRegistry();
|
|
14
|
+
case 'ContractClassRegistry':
|
|
15
|
+
return getCanonicalClassRegistry();
|
|
16
16
|
case 'MultiCallEntrypoint':
|
|
17
17
|
return getCanonicalMultiCallEntrypoint();
|
|
18
18
|
case 'FeeJuice':
|