@aztec/protocol-contracts 0.0.0-test.1 → 0.0.1-fake-ceab37513c
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 +1906 -1093
- package/artifacts/ContractClassRegistry.json +8355 -0
- package/artifacts/ContractInstanceRegistry.json +3616 -0
- package/artifacts/FeeJuice.json +1540 -2785
- package/artifacts/MultiCallEntrypoint.json +1469 -758
- package/artifacts/Router.json +2250 -1419
- package/dest/auth-registry/index.d.ts +2 -1
- package/dest/auth-registry/index.d.ts.map +1 -1
- package/dest/auth-registry/index.js +1 -1
- package/dest/{class-registerer/contract_class_registered_event.d.ts → class-registry/contract_class_published_event.d.ts} +5 -7
- 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} +11 -20
- package/dest/class-registry/index.d.ts +8 -0
- package/dest/class-registry/index.d.ts.map +1 -0
- package/dest/class-registry/index.js +17 -0
- package/dest/class-registry/lazy.d.ts +9 -0
- package/dest/class-registry/lazy.d.ts.map +1 -0
- package/dest/{class-registerer → class-registry}/lazy.js +8 -8
- package/dest/{class-registerer → class-registry}/private_function_broadcasted_event.d.ts +3 -5
- package/dest/class-registry/private_function_broadcasted_event.d.ts.map +1 -0
- package/dest/{class-registerer → class-registry}/private_function_broadcasted_event.js +11 -11
- package/dest/{class-registerer/unconstrained_function_broadcasted_event.d.ts → class-registry/utility_function_broadcasted_event.d.ts} +12 -14
- package/dest/class-registry/utility_function_broadcasted_event.d.ts.map +1 -0
- package/dest/{class-registerer/unconstrained_function_broadcasted_event.js → class-registry/utility_function_broadcasted_event.js} +19 -19
- package/dest/fee-juice/index.js +1 -1
- 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 +4 -3
- package/dest/instance-registry/contract_instance_updated_event.d.ts.map +1 -0
- package/dest/{instance-deployer → instance-registry}/contract_instance_updated_event.js +10 -9
- 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/multi-call-entrypoint/index.js +1 -1
- package/dest/protocol_contract_data.d.ts +4 -8
- package/dest/protocol_contract_data.d.ts.map +1 -1
- package/dest/protocol_contract_data.js +14 -18
- package/dest/provider/bundle.js +4 -4
- package/dest/provider/lazy.js +6 -6
- package/dest/router/index.js +1 -1
- package/dest/scripts/cleanup_artifacts.js +2 -2
- package/dest/scripts/generate_data.js +9 -22
- package/dest/tests/fixtures.d.ts +3 -5
- package/dest/tests/fixtures.d.ts.map +1 -1
- package/dest/tests/fixtures.js +6 -6
- package/package.json +18 -16
- package/src/auth-registry/index.ts +3 -3
- package/src/build_protocol_contract_tree.ts +2 -2
- 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} +15 -22
- package/src/{class-registerer → class-registry}/index.ts +7 -9
- package/src/{class-registerer → class-registry}/lazy.ts +8 -8
- package/src/{class-registerer → class-registry}/private_function_broadcasted_event.ts +12 -8
- package/src/{class-registerer/unconstrained_function_broadcasted_event.ts → class-registry/utility_function_broadcasted_event.ts} +25 -21
- package/src/fee-juice/index.ts +1 -1
- 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 +10 -8
- 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/multi-call-entrypoint/index.ts +1 -1
- package/src/protocol_contract_data.ts +14 -18
- package/src/provider/bundle.ts +4 -4
- package/src/provider/lazy.ts +6 -6
- package/src/router/index.ts +1 -1
- package/src/tests/fixtures.ts +6 -6
- package/artifacts/ContractClassRegisterer.json +0 -7219
- package/artifacts/ContractInstanceDeployer.json +0 -2984
- 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/index.js +0 -17
- package/dest/class-registerer/lazy.d.ts +0 -9
- 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/unconstrained_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/contract_instance_updated_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,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,5 +1,5 @@
|
|
|
1
1
|
import { loadContractArtifact } from '@aztec/stdlib/abi';
|
|
2
|
-
import MultiCallEntrypointJson from '../../artifacts/MultiCallEntrypoint.json'
|
|
2
|
+
import MultiCallEntrypointJson from '../../artifacts/MultiCallEntrypoint.json' with {
|
|
3
3
|
type: 'json'
|
|
4
4
|
};
|
|
5
5
|
import { makeProtocolContract } from '../make_protocol_contract.js';
|
|
@@ -1,21 +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
|
|
17
|
-
export declare const REGISTERER_PRIVATE_FUNCTION_BROADCASTED_TAG: Fr;
|
|
18
|
-
export declare const REGISTERER_UNCONSTRAINED_FUNCTION_BROADCASTED_TAG: Fr;
|
|
19
|
-
export declare const DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_TAG: Fr;
|
|
20
|
-
export declare const DEPLOYER_CONTRACT_INSTANCE_UPDATED_TAG: Fr;
|
|
16
|
+
export declare const CONTRACT_INSTANCE_PUBLISHED_EVENT_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
|
|
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,39 +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('0x1c2474a77af3c756895867fa7622e5e9295121b35849e965f4614d51f00c62e2'),
|
|
30
|
+
ContractInstanceRegistry: Fr.fromHexString('0x001e627e78063a4944f1331b4c59544f8ad6d6d478f2fc79b025e8240b94b816'),
|
|
31
|
+
ContractClassRegistry: Fr.fromHexString('0x1bd2e13b35e2745e638132262e6642a86ac4219f1b7a95086bebe250f5d557ea'),
|
|
32
|
+
MultiCallEntrypoint: Fr.fromHexString('0x27b35c8e0851d28c56846ce8977155ffbb5725c4e6b47a67f5d5c6639d1c1a1c'),
|
|
33
|
+
FeeJuice: Fr.fromHexString('0x2ee34a2d304636f81114dffc8a2357e03e08345a008262eb36112f95aaa58eb1'),
|
|
34
|
+
Router: Fr.fromHexString('0x180b58198cce7c0866a828841df6eca6369a71a6e884ca5cf08938301d7ad0ca')
|
|
35
35
|
};
|
|
36
|
-
export const protocolContractTreeRoot = Fr.fromHexString('
|
|
37
|
-
export const
|
|
38
|
-
export const REGISTERER_PRIVATE_FUNCTION_BROADCASTED_TAG = Fr.fromHexString('0x0abf338154e355442d9916d630da0491036d5a7b23c42b477c1395ba3bf9b42d');
|
|
39
|
-
export const REGISTERER_UNCONSTRAINED_FUNCTION_BROADCASTED_TAG = Fr.fromHexString('0x27774539896271d6dbe0c1de45ddc44709d1e8d9a9fb686ca3c105d87c417bb8');
|
|
40
|
-
export const DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_TAG = Fr.fromHexString('0x2ec28b91a5f838506d6042915005ff55cf7a0a5f889a83b11faed33a31b486f2');
|
|
41
|
-
export const DEPLOYER_CONTRACT_INSTANCE_UPDATED_TAG = new Fr(1534834688047131268740281708431107902615560100979874281215533519862n);
|
|
36
|
+
export const protocolContractTreeRoot = Fr.fromHexString('0x227802391f582e49922178a4d4de61384eda4ee4ba69708f0349b76dd04db461');
|
|
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':
|
package/dest/router/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { loadContractArtifact } from '@aztec/stdlib/abi';
|
|
2
|
-
import RouterJson from '../../artifacts/Router.json'
|
|
2
|
+
import RouterJson from '../../artifacts/Router.json' with {
|
|
3
3
|
type: 'json'
|
|
4
4
|
};
|
|
5
5
|
import { makeProtocolContract } from '../make_protocol_contract.js';
|
|
@@ -8,9 +8,9 @@ async function cleanupArtifacts(target) {
|
|
|
8
8
|
continue;
|
|
9
9
|
}
|
|
10
10
|
const fileData = JSON.parse((await readFile(join(target, file), 'utf8')).toString());
|
|
11
|
-
fileData.file_map = {};
|
|
11
|
+
/* eslint-disable camelcase */ fileData.file_map = {};
|
|
12
12
|
fileData.debug_symbols = {};
|
|
13
|
-
await writeFile(join(target, file), JSON.stringify(fileData));
|
|
13
|
+
/* eslint-enable camelcase */ await writeFile(join(target, file), JSON.stringify(fileData));
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
await cleanupArtifacts(fileURLToPath(new URL('../../artifacts', import.meta.url).href));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CANONICAL_AUTH_REGISTRY_ADDRESS,
|
|
1
|
+
import { CANONICAL_AUTH_REGISTRY_ADDRESS, CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS, CONTRACT_INSTANCE_PUBLISHED_MAGIC_VALUE, CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS, FEE_JUICE_ADDRESS, MULTI_CALL_ENTRYPOINT_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';
|
|
5
5
|
import { loadContractArtifact } from '@aztec/stdlib/abi';
|
|
6
6
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
|
-
import {
|
|
7
|
+
import { getContractInstanceFromInstantiationParams } from '@aztec/stdlib/contract';
|
|
8
8
|
import { promises as fs } from 'fs';
|
|
9
9
|
import path from 'path';
|
|
10
10
|
import { buildProtocolContractTree } from '../build_protocol_contract_tree.js';
|
|
@@ -16,8 +16,8 @@ const outputFilePath = './src/protocol_contract_data.ts';
|
|
|
16
16
|
const salt = new Fr(1);
|
|
17
17
|
const contractAddressMapping = {
|
|
18
18
|
AuthRegistry: CANONICAL_AUTH_REGISTRY_ADDRESS,
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
ContractInstanceRegistry: CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS,
|
|
20
|
+
ContractClassRegistry: CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS,
|
|
21
21
|
MultiCallEntrypoint: MULTI_CALL_ENTRYPOINT_ADDRESS,
|
|
22
22
|
FeeJuice: FEE_JUICE_ADDRESS,
|
|
23
23
|
Router: ROUTER_ADDRESS
|
|
@@ -50,7 +50,7 @@ async function copyArtifact(srcName, destName) {
|
|
|
50
50
|
return artifact;
|
|
51
51
|
}
|
|
52
52
|
async function computeContractLeaf(artifact) {
|
|
53
|
-
const instance = await
|
|
53
|
+
const instance = await getContractInstanceFromInstantiationParams(loadContractArtifact(artifact), {
|
|
54
54
|
salt
|
|
55
55
|
});
|
|
56
56
|
return instance.address;
|
|
@@ -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
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('${await poseidon2Hash([
|
|
115
|
+
CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS,
|
|
116
|
+
CONTRACT_INSTANCE_PUBLISHED_MAGIC_VALUE
|
|
117
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_UNCONSTRAINED_FUNCTION_BROADCASTED_TAG = Fr.fromHexString('${await poseidon2Hash([
|
|
123
|
-
REGISTERER_CONTRACT_ADDRESS,
|
|
124
|
-
REGISTERER_UNCONSTRAINED_FUNCTION_BROADCASTED_MAGIC_VALUE
|
|
125
|
-
])}');
|
|
126
|
-
export const DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_TAG = Fr.fromHexString('${await poseidon2Hash([
|
|
127
|
-
DEPLOYER_CONTRACT_ADDRESS,
|
|
128
|
-
DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_MAGIC_VALUE
|
|
129
|
-
])}');
|
|
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/dest/tests/fixtures.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
-
export declare function getSampleContractClassRegisteredEventPayload(): Buffer;
|
|
1
|
+
export declare function getSampleContractClassPublishedEventPayload(): Buffer;
|
|
4
2
|
export declare function getSamplePrivateFunctionBroadcastedEventPayload(): Buffer;
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
3
|
+
export declare function getSampleUtilityFunctionBroadcastedEventPayload(): Buffer;
|
|
4
|
+
export declare function getSampleContractInstancePublishedEventPayload(): Buffer;
|
|
7
5
|
export declare function getPathToFixture(name: string): string;
|
|
8
6
|
//# sourceMappingURL=fixtures.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../src/tests/fixtures.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../src/tests/fixtures.ts"],"names":[],"mappings":"AAKA,wBAAgB,2CAA2C,IAAI,MAAM,CAGpE;AAGD,wBAAgB,+CAA+C,IAAI,MAAM,CAGxE;AAGD,wBAAgB,+CAA+C,IAAI,MAAM,CAGxE;AAGD,wBAAgB,8CAA8C,IAAI,MAAM,CAGvE;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,UAE5C"}
|
package/dest/tests/fixtures.js
CHANGED
|
@@ -2,8 +2,8 @@ import { readFileSync } from 'fs';
|
|
|
2
2
|
import { dirname, resolve } from 'path';
|
|
3
3
|
import { fileURLToPath } from 'url';
|
|
4
4
|
// Generated from end-to-end/src/e2e_deploy_contract/contract_class_registration.test.ts with AZTEC_GENERATE_TEST_DATA=1
|
|
5
|
-
export function
|
|
6
|
-
const path = getPathToFixture('
|
|
5
|
+
export function getSampleContractClassPublishedEventPayload() {
|
|
6
|
+
const path = getPathToFixture('ContractClassPublishedEventData.hex');
|
|
7
7
|
return Buffer.from(readFileSync(path).toString(), 'hex');
|
|
8
8
|
}
|
|
9
9
|
// Generated from end-to-end/src/e2e_deploy_contract/contract_class_registration.test.ts with AZTEC_GENERATE_TEST_DATA=1
|
|
@@ -12,13 +12,13 @@ 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
|
|
16
|
-
const path = getPathToFixture('
|
|
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
|
|
20
|
-
export function
|
|
21
|
-
const path = getPathToFixture('
|
|
20
|
+
export function getSampleContractInstancePublishedEventPayload() {
|
|
21
|
+
const path = getPathToFixture('ContractInstancePublishedEventData.hex');
|
|
22
22
|
return Buffer.from(readFileSync(path).toString(), 'hex');
|
|
23
23
|
}
|
|
24
24
|
export function getPathToFixture(name) {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@aztec/protocol-contracts",
|
|
3
3
|
"homepage": "https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/protocol-contracts",
|
|
4
4
|
"description": "Canonical Noir contracts for the Aztec Network",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.1-fake-ceab37513c",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./dest/index.js",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"typedocOptions": {
|
|
15
15
|
"entryPoints": [
|
|
16
16
|
"./src/index.ts",
|
|
17
|
-
"./src/class-
|
|
18
|
-
"./src/instance-
|
|
17
|
+
"./src/class-registry/index.ts",
|
|
18
|
+
"./src/instance-registry/index.ts"
|
|
19
19
|
],
|
|
20
20
|
"name": "Protocol Contracts",
|
|
21
21
|
"tsconfig": "./tsconfig.json"
|
|
@@ -29,8 +29,6 @@
|
|
|
29
29
|
"build:dev": "tsc -b --watch",
|
|
30
30
|
"build:ts": "tsc -b",
|
|
31
31
|
"clean": "rm -rf ./dest .tsbuildinfo ./artifacts",
|
|
32
|
-
"formatting": "run -T prettier --check ./src && run -T eslint ./src",
|
|
33
|
-
"formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src",
|
|
34
32
|
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
|
|
35
33
|
},
|
|
36
34
|
"inherits": [
|
|
@@ -68,27 +66,31 @@
|
|
|
68
66
|
"testTimeout": 120000,
|
|
69
67
|
"setupFiles": [
|
|
70
68
|
"../../foundation/src/jest/setup.mjs"
|
|
69
|
+
],
|
|
70
|
+
"testEnvironment": "../../foundation/src/jest/env.mjs",
|
|
71
|
+
"setupFilesAfterEnv": [
|
|
72
|
+
"../../foundation/src/jest/setupAfterEnv.mjs"
|
|
71
73
|
]
|
|
72
74
|
},
|
|
73
75
|
"dependencies": {
|
|
74
|
-
"@aztec/constants": "0.0.
|
|
75
|
-
"@aztec/foundation": "0.0.
|
|
76
|
-
"@aztec/stdlib": "0.0.
|
|
76
|
+
"@aztec/constants": "0.0.1-fake-ceab37513c",
|
|
77
|
+
"@aztec/foundation": "0.0.1-fake-ceab37513c",
|
|
78
|
+
"@aztec/stdlib": "0.0.1-fake-ceab37513c",
|
|
77
79
|
"lodash.chunk": "^4.2.0",
|
|
78
80
|
"lodash.omit": "^4.5.0",
|
|
79
81
|
"tslib": "^2.4.0"
|
|
80
82
|
},
|
|
81
83
|
"devDependencies": {
|
|
82
|
-
"@jest/globals": "^
|
|
83
|
-
"@types/jest": "^
|
|
84
|
+
"@jest/globals": "^30.0.0",
|
|
85
|
+
"@types/jest": "^30.0.0",
|
|
84
86
|
"@types/lodash.chunk": "^4.2.9",
|
|
85
87
|
"@types/lodash.omit": "^4.5.9",
|
|
86
|
-
"@types/node": "^
|
|
87
|
-
"jest": "^
|
|
88
|
-
"jest-mock-extended": "^
|
|
89
|
-
"ts-loader": "^9.
|
|
88
|
+
"@types/node": "^22.15.17",
|
|
89
|
+
"jest": "^30.0.0",
|
|
90
|
+
"jest-mock-extended": "^4.0.0",
|
|
91
|
+
"ts-loader": "^9.5.4",
|
|
90
92
|
"ts-node": "^10.9.1",
|
|
91
|
-
"typescript": "^5.
|
|
93
|
+
"typescript": "^5.3.3"
|
|
92
94
|
},
|
|
93
95
|
"files": [
|
|
94
96
|
"dest",
|
|
@@ -98,6 +100,6 @@
|
|
|
98
100
|
"!src/scripts/*"
|
|
99
101
|
],
|
|
100
102
|
"engines": {
|
|
101
|
-
"node": ">=
|
|
103
|
+
"node": ">=20.10"
|
|
102
104
|
}
|
|
103
105
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { loadContractArtifact } from '@aztec/stdlib/abi';
|
|
1
|
+
import { type ContractArtifact, loadContractArtifact } from '@aztec/stdlib/abi';
|
|
2
2
|
import type { NoirCompiledContract } from '@aztec/stdlib/noir';
|
|
3
3
|
|
|
4
|
-
import AuthRegistryJson from '../../artifacts/AuthRegistry.json'
|
|
4
|
+
import AuthRegistryJson from '../../artifacts/AuthRegistry.json' with { type: 'json' };
|
|
5
5
|
import { makeProtocolContract } from '../make_protocol_contract.js';
|
|
6
6
|
import type { ProtocolContract } from '../protocol_contract.js';
|
|
7
7
|
|
|
8
8
|
let protocolContract: ProtocolContract;
|
|
9
9
|
|
|
10
|
-
export const AuthRegistryArtifact = loadContractArtifact(AuthRegistryJson as NoirCompiledContract);
|
|
10
|
+
export const AuthRegistryArtifact: ContractArtifact = loadContractArtifact(AuthRegistryJson as NoirCompiledContract);
|
|
11
11
|
|
|
12
12
|
/** Returns the canonical deployment of the auth registry. */
|
|
13
13
|
export async function getCanonicalAuthRegistry(): Promise<ProtocolContract> {
|
|
@@ -9,8 +9,8 @@ export async function buildProtocolContractTree(
|
|
|
9
9
|
contracts: { address: AztecAddress; leaf: Fr }[],
|
|
10
10
|
): Promise<IndexedMerkleTree<ProtocolContractLeafPreimage, typeof PROTOCOL_CONTRACT_TREE_HEIGHT>> {
|
|
11
11
|
const hasher = {
|
|
12
|
-
hash: async (l: Buffer, r: Buffer) => (await poseidon2Hash([l, r])).toBuffer()
|
|
13
|
-
hashInputs: async (i: Buffer[]) => (await poseidon2Hash(i)).toBuffer()
|
|
12
|
+
hash: async (l: Buffer, r: Buffer) => (await poseidon2Hash([l, r])).toBuffer() as Buffer<ArrayBuffer>,
|
|
13
|
+
hashInputs: async (i: Buffer[]) => (await poseidon2Hash(i)).toBuffer() as Buffer<ArrayBuffer>,
|
|
14
14
|
};
|
|
15
15
|
const calculator = await IndexedMerkleTreeCalculator.create(
|
|
16
16
|
PROTOCOL_CONTRACT_TREE_HEIGHT,
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CONTRACT_CLASS_PUBLISHED_MAGIC_VALUE } from '@aztec/constants';
|
|
2
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
3
|
import { FieldReader } from '@aztec/foundation/serialize';
|
|
4
|
-
import {
|
|
4
|
+
import { bufferFromFields } from '@aztec/stdlib/abi';
|
|
5
5
|
import {
|
|
6
6
|
type ContractClassPublic,
|
|
7
|
-
type PublicFunction,
|
|
8
7
|
computeContractClassId,
|
|
9
8
|
computePublicBytecodeCommitment,
|
|
10
9
|
} from '@aztec/stdlib/contract';
|
|
11
10
|
import type { ContractClassLog } from '@aztec/stdlib/logs';
|
|
12
11
|
|
|
13
|
-
import {
|
|
12
|
+
import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
14
13
|
|
|
15
|
-
/** Event emitted from the
|
|
16
|
-
export class
|
|
14
|
+
/** Event emitted from the ContractClassRegistry. */
|
|
15
|
+
export class ContractClassPublishedEvent {
|
|
17
16
|
constructor(
|
|
18
17
|
public readonly contractClassId: Fr,
|
|
19
18
|
public readonly version: number,
|
|
@@ -22,19 +21,23 @@ export class ContractClassRegisteredEvent {
|
|
|
22
21
|
public readonly packedPublicBytecode: Buffer,
|
|
23
22
|
) {}
|
|
24
23
|
|
|
25
|
-
static
|
|
26
|
-
return
|
|
24
|
+
static isContractClassPublishedEvent(log: ContractClassLog) {
|
|
25
|
+
return (
|
|
26
|
+
log.contractAddress.equals(ProtocolContractAddress.ContractClassRegistry) &&
|
|
27
|
+
log.fields.fields[0].toBigInt() === CONTRACT_CLASS_PUBLISHED_MAGIC_VALUE
|
|
28
|
+
);
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
static fromLog(log: ContractClassLog) {
|
|
30
|
-
const
|
|
32
|
+
const fieldsWithoutTag = log.fields.fields.slice(1);
|
|
33
|
+
const reader = new FieldReader(fieldsWithoutTag);
|
|
31
34
|
const contractClassId = reader.readField();
|
|
32
35
|
const version = reader.readField().toNumber();
|
|
33
36
|
const artifactHash = reader.readField();
|
|
34
37
|
const privateFunctionsRoot = reader.readField();
|
|
35
|
-
const packedPublicBytecode = bufferFromFields(reader.readFieldArray(
|
|
38
|
+
const packedPublicBytecode = bufferFromFields(reader.readFieldArray(fieldsWithoutTag.length - reader.cursor));
|
|
36
39
|
|
|
37
|
-
return new
|
|
40
|
+
return new ContractClassPublishedEvent(
|
|
38
41
|
contractClassId,
|
|
39
42
|
version,
|
|
40
43
|
artifactHash,
|
|
@@ -60,24 +63,14 @@ export class ContractClassRegisteredEvent {
|
|
|
60
63
|
throw new Error(`Unexpected contract class version ${this.version}`);
|
|
61
64
|
}
|
|
62
65
|
|
|
63
|
-
// TODO(https://github.com/AztecProtocol/aztec-packages/issues/8985): Remove public functions.
|
|
64
|
-
const publicFunctions: PublicFunction[] = [];
|
|
65
|
-
if (this.packedPublicBytecode.length > 0) {
|
|
66
|
-
publicFunctions.push({
|
|
67
|
-
selector: FunctionSelector.fromField(new Fr(PUBLIC_DISPATCH_SELECTOR)),
|
|
68
|
-
bytecode: this.packedPublicBytecode,
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
66
|
return {
|
|
73
67
|
id: this.contractClassId,
|
|
74
68
|
artifactHash: this.artifactHash,
|
|
75
69
|
packedBytecode: this.packedPublicBytecode,
|
|
76
70
|
privateFunctionsRoot: this.privateFunctionsRoot,
|
|
77
|
-
publicFunctions: publicFunctions,
|
|
78
71
|
version: this.version,
|
|
79
72
|
privateFunctions: [],
|
|
80
|
-
|
|
73
|
+
utilityFunctions: [],
|
|
81
74
|
};
|
|
82
75
|
}
|
|
83
76
|
}
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
import { loadContractArtifact } from '@aztec/stdlib/abi';
|
|
2
2
|
import type { NoirCompiledContract } from '@aztec/stdlib/noir';
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import ContractClassRegistryJson from '../../artifacts/ContractClassRegistry.json' with { type: 'json' };
|
|
5
5
|
import { makeProtocolContract } from '../make_protocol_contract.js';
|
|
6
6
|
import type { ProtocolContract } from '../protocol_contract.js';
|
|
7
7
|
|
|
8
|
-
export * from './
|
|
8
|
+
export * from './contract_class_published_event.js';
|
|
9
9
|
export * from './private_function_broadcasted_event.js';
|
|
10
|
-
export * from './
|
|
10
|
+
export * from './utility_function_broadcasted_event.js';
|
|
11
11
|
|
|
12
|
-
export const
|
|
13
|
-
ContractClassRegistererJson as NoirCompiledContract,
|
|
14
|
-
);
|
|
12
|
+
export const ContractClassRegistryArtifact = loadContractArtifact(ContractClassRegistryJson as NoirCompiledContract);
|
|
15
13
|
|
|
16
14
|
let protocolContract: ProtocolContract;
|
|
17
15
|
|
|
18
16
|
/** Returns the canonical deployment of the contract. */
|
|
19
|
-
export async function
|
|
17
|
+
export async function getCanonicalClassRegistry(): Promise<ProtocolContract> {
|
|
20
18
|
if (!protocolContract) {
|
|
21
|
-
const artifact =
|
|
22
|
-
protocolContract = await makeProtocolContract('
|
|
19
|
+
const artifact = ContractClassRegistryArtifact;
|
|
20
|
+
protocolContract = await makeProtocolContract('ContractClassRegistry', artifact);
|
|
23
21
|
}
|
|
24
22
|
return protocolContract;
|
|
25
23
|
}
|