@aztec/protocol-contracts 0.0.0-test.1 → 0.0.1-commit.017a351
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/ContractClassRegistry.json +3950 -0
- package/artifacts/ContractInstanceRegistry.json +5132 -0
- package/artifacts/FeeJuice.json +5171 -2507
- package/dest/class-registry/contract_class_published_event.d.ts +20 -0
- package/dest/class-registry/contract_class_published_event.d.ts.map +1 -0
- package/dest/class-registry/contract_class_published_event.js +52 -0
- package/dest/class-registry/index.d.ts +6 -0
- package/dest/class-registry/index.d.ts.map +1 -0
- package/dest/class-registry/index.js +15 -0
- package/dest/class-registry/lazy.d.ts +7 -0
- package/dest/class-registry/lazy.d.ts.map +1 -0
- package/dest/class-registry/lazy.js +24 -0
- package/dest/fee-juice/index.d.ts +2 -2
- package/dest/fee-juice/index.d.ts.map +1 -1
- package/dest/fee-juice/index.js +4 -4
- package/dest/fee-juice/lazy.d.ts +1 -1
- package/dest/fee-juice/lazy.js +5 -5
- package/dest/index.d.ts +1 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +0 -1
- package/dest/instance-registry/contract_instance_published_event.d.ts +22 -0
- 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} +15 -8
- package/dest/instance-registry/contract_instance_updated_event.d.ts +17 -0
- package/dest/instance-registry/contract_instance_updated_event.d.ts.map +1 -0
- package/dest/instance-registry/contract_instance_updated_event.js +35 -0
- package/dest/instance-registry/index.d.ts +7 -0
- package/dest/instance-registry/index.d.ts.map +1 -0
- package/dest/instance-registry/index.js +15 -0
- package/dest/instance-registry/lazy.d.ts +8 -0
- package/dest/{instance-deployer → instance-registry}/lazy.d.ts.map +1 -1
- package/dest/instance-registry/lazy.js +25 -0
- package/dest/make_protocol_contract.d.ts +4 -4
- package/dest/make_protocol_contract.d.ts.map +1 -1
- package/dest/make_protocol_contract.js +30 -14
- package/dest/protocol_contract.d.ts +1 -1
- package/dest/protocol_contract_data.d.ts +23 -16
- package/dest/protocol_contract_data.d.ts.map +1 -1
- package/dest/protocol_contract_data.js +82 -32
- package/dest/provider/bundle.d.ts +1 -1
- package/dest/provider/bundle.d.ts.map +1 -1
- package/dest/provider/bundle.js +6 -12
- package/dest/provider/lazy.d.ts +1 -1
- package/dest/provider/lazy.d.ts.map +1 -1
- package/dest/provider/lazy.js +6 -15
- package/dest/provider/protocol_contracts_provider.d.ts +1 -1
- package/dest/scripts/cleanup_artifacts.js +2 -2
- package/dest/scripts/generate_data.js +96 -56
- package/dest/tests/fixtures.d.ts +3 -7
- package/dest/tests/fixtures.d.ts.map +1 -1
- package/dest/tests/fixtures.js +4 -14
- package/package.json +23 -20
- package/src/class-registry/__snapshots__/README.md +9 -0
- package/src/class-registry/contract_class_published_event.ts +72 -0
- package/src/class-registry/index.ts +21 -0
- package/src/class-registry/lazy.ts +31 -0
- package/src/fee-juice/index.ts +5 -5
- package/src/fee-juice/lazy.ts +5 -5
- package/src/index.ts +0 -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} +18 -8
- package/src/{instance-deployer → instance-registry}/contract_instance_updated_event.ts +15 -15
- package/src/instance-registry/index.ts +23 -0
- package/src/instance-registry/lazy.ts +32 -0
- package/src/make_protocol_contract.ts +39 -15
- package/src/protocol_contract_data.ts +70 -32
- package/src/provider/bundle.ts +5 -11
- package/src/provider/lazy.ts +6 -15
- package/src/tests/fixtures.ts +4 -16
- package/artifacts/AuthRegistry.json +0 -2725
- package/artifacts/ContractClassRegisterer.json +0 -7219
- package/artifacts/ContractInstanceDeployer.d.json.ts +0 -5
- package/artifacts/ContractInstanceDeployer.json +0 -2984
- package/artifacts/MultiCallEntrypoint.d.json.ts +0 -5
- package/artifacts/MultiCallEntrypoint.json +0 -2005
- package/artifacts/Router.d.json.ts +0 -5
- package/artifacts/Router.json +0 -3798
- package/dest/auth-registry/index.d.ts +0 -5
- package/dest/auth-registry/index.d.ts.map +0 -1
- package/dest/auth-registry/index.js +0 -13
- package/dest/auth-registry/lazy.d.ts +0 -6
- package/dest/auth-registry/lazy.d.ts.map +0 -1
- package/dest/auth-registry/lazy.js +0 -23
- package/dest/build_protocol_contract_tree.d.ts +0 -10
- package/dest/build_protocol_contract_tree.d.ts.map +0 -1
- package/dest/build_protocol_contract_tree.js +0 -20
- package/dest/class-registerer/contract_class_registered_event.d.ts +0 -18
- package/dest/class-registerer/contract_class_registered_event.d.ts.map +0 -1
- package/dest/class-registerer/contract_class_registered_event.js +0 -63
- 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/lazy.js +0 -26
- package/dest/class-registerer/private_function_broadcasted_event.d.ts +0 -46
- package/dest/class-registerer/private_function_broadcasted_event.d.ts.map +0 -1
- package/dest/class-registerer/private_function_broadcasted_event.js +0 -85
- package/dest/class-registerer/unconstrained_function_broadcasted_event.d.ts +0 -40
- package/dest/class-registerer/unconstrained_function_broadcasted_event.d.ts.map +0 -1
- package/dest/class-registerer/unconstrained_function_broadcasted_event.js +0 -81
- package/dest/instance-deployer/contract_instance_deployed_event.d.ts +0 -20
- package/dest/instance-deployer/contract_instance_deployed_event.d.ts.map +0 -1
- package/dest/instance-deployer/contract_instance_updated_event.d.ts +0 -16
- package/dest/instance-deployer/contract_instance_updated_event.d.ts.map +0 -1
- package/dest/instance-deployer/contract_instance_updated_event.js +0 -36
- package/dest/instance-deployer/index.d.ts +0 -7
- package/dest/instance-deployer/index.d.ts.map +0 -1
- package/dest/instance-deployer/index.js +0 -15
- package/dest/instance-deployer/lazy.d.ts +0 -8
- package/dest/instance-deployer/lazy.js +0 -25
- package/dest/multi-call-entrypoint/index.d.ts +0 -5
- package/dest/multi-call-entrypoint/index.d.ts.map +0 -1
- package/dest/multi-call-entrypoint/index.js +0 -13
- package/dest/multi-call-entrypoint/lazy.d.ts +0 -6
- package/dest/multi-call-entrypoint/lazy.d.ts.map +0 -1
- package/dest/multi-call-entrypoint/lazy.js +0 -23
- package/dest/protocol_contract_tree.d.ts +0 -7
- package/dest/protocol_contract_tree.d.ts.map +0 -1
- package/dest/protocol_contract_tree.js +0 -34
- package/dest/router/index.d.ts +0 -5
- package/dest/router/index.d.ts.map +0 -1
- package/dest/router/index.js +0 -13
- package/dest/router/lazy.d.ts +0 -6
- package/dest/router/lazy.d.ts.map +0 -1
- package/dest/router/lazy.js +0 -23
- package/src/auth-registry/index.ts +0 -18
- package/src/auth-registry/lazy.ts +0 -29
- package/src/build_protocol_contract_tree.ts +0 -29
- package/src/class-registerer/contract_class_registered_event.ts +0 -83
- package/src/class-registerer/index.ts +0 -25
- package/src/class-registerer/lazy.ts +0 -33
- package/src/class-registerer/private_function_broadcasted_event.ts +0 -105
- package/src/class-registerer/unconstrained_function_broadcasted_event.ts +0 -99
- package/src/instance-deployer/index.ts +0 -23
- package/src/instance-deployer/lazy.ts +0 -32
- package/src/multi-call-entrypoint/index.ts +0 -18
- package/src/multi-call-entrypoint/lazy.ts +0 -29
- package/src/protocol_contract_tree.ts +0 -44
- package/src/router/index.ts +0 -18
- package/src/router/lazy.ts +0 -29
- /package/artifacts/{AuthRegistry.d.json.ts → ContractClassRegistry.d.json.ts} +0 -0
- /package/artifacts/{ContractClassRegisterer.d.json.ts → ContractInstanceRegistry.d.json.ts} +0 -0
package/src/provider/lazy.ts
CHANGED
|
@@ -1,28 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getCanonicalClassRegisterer } from '../class-registerer/lazy.js';
|
|
1
|
+
import { getCanonicalClassRegistry } from '../class-registry/lazy.js';
|
|
3
2
|
import { getCanonicalFeeJuice } from '../fee-juice/lazy.js';
|
|
4
|
-
import {
|
|
5
|
-
import { getCanonicalMultiCallEntrypoint } from '../multi-call-entrypoint/lazy.js';
|
|
3
|
+
import { getCanonicalInstanceRegistry } from '../instance-registry/lazy.js';
|
|
6
4
|
import type { ProtocolContract } from '../protocol_contract.js';
|
|
7
5
|
import type { ProtocolContractName } from '../protocol_contract_data.js';
|
|
8
|
-
import { getCanonicalRouter } from '../router/lazy.js';
|
|
9
6
|
import type { ProtocolContractsProvider } from './protocol_contracts_provider.js';
|
|
10
7
|
|
|
11
8
|
export class LazyProtocolContractsProvider implements ProtocolContractsProvider {
|
|
12
9
|
getProtocolContractArtifact(name: ProtocolContractName): Promise<ProtocolContract> {
|
|
13
10
|
switch (name) {
|
|
14
|
-
case '
|
|
15
|
-
return
|
|
16
|
-
case '
|
|
17
|
-
return
|
|
18
|
-
case 'ContractClassRegisterer':
|
|
19
|
-
return getCanonicalClassRegisterer();
|
|
20
|
-
case 'MultiCallEntrypoint':
|
|
21
|
-
return getCanonicalMultiCallEntrypoint();
|
|
11
|
+
case 'ContractInstanceRegistry':
|
|
12
|
+
return getCanonicalInstanceRegistry();
|
|
13
|
+
case 'ContractClassRegistry':
|
|
14
|
+
return getCanonicalClassRegistry();
|
|
22
15
|
case 'FeeJuice':
|
|
23
16
|
return getCanonicalFeeJuice();
|
|
24
|
-
case 'Router':
|
|
25
|
-
return getCanonicalRouter();
|
|
26
17
|
default:
|
|
27
18
|
throw new Error(`Unknown protocol contract name: ${name}`);
|
|
28
19
|
}
|
package/src/tests/fixtures.ts
CHANGED
|
@@ -3,26 +3,14 @@ import { dirname, resolve } from 'path';
|
|
|
3
3
|
import { fileURLToPath } from 'url';
|
|
4
4
|
|
|
5
5
|
// Generated from end-to-end/src/e2e_deploy_contract/contract_class_registration.test.ts with AZTEC_GENERATE_TEST_DATA=1
|
|
6
|
-
export function
|
|
7
|
-
const path = getPathToFixture('
|
|
6
|
+
export function getSampleContractClassPublishedEventPayload(): Buffer {
|
|
7
|
+
const path = getPathToFixture('ContractClassPublishedEventData.hex');
|
|
8
8
|
return Buffer.from(readFileSync(path).toString(), 'hex');
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
// Generated from end-to-end/src/e2e_deploy_contract/contract_class_registration.test.ts with AZTEC_GENERATE_TEST_DATA=1
|
|
12
|
-
export function
|
|
13
|
-
const path = getPathToFixture('
|
|
14
|
-
return Buffer.from(readFileSync(path).toString(), 'hex');
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// Generated from end-to-end/src/e2e_deploy_contract/contract_class_registration.test.ts with AZTEC_GENERATE_TEST_DATA=1
|
|
18
|
-
export function getSampleUnconstrainedFunctionBroadcastedEventPayload(): Buffer {
|
|
19
|
-
const path = getPathToFixture('UnconstrainedFunctionBroadcastedEventData.hex');
|
|
20
|
-
return Buffer.from(readFileSync(path).toString(), 'hex');
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
// Generated from end-to-end/src/e2e_deploy_contract/contract_class_registration.test.ts with AZTEC_GENERATE_TEST_DATA=1
|
|
24
|
-
export function getSampleContractInstanceDeployedEventPayload(): Buffer {
|
|
25
|
-
const path = getPathToFixture('ContractInstanceDeployedEventData.hex');
|
|
12
|
+
export function getSampleContractInstancePublishedEventPayload(): Buffer {
|
|
13
|
+
const path = getPathToFixture('ContractInstancePublishedEventData.hex');
|
|
26
14
|
return Buffer.from(readFileSync(path).toString(), 'hex');
|
|
27
15
|
}
|
|
28
16
|
|