@aztec/standard-contracts 0.0.1-commit.993d240 → 0.0.1-commit.a5db02d
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 +2253 -1314
- package/artifacts/HandshakeRegistry.d.json.ts +5 -0
- package/artifacts/HandshakeRegistry.json +13242 -0
- package/artifacts/MultiCallEntrypoint.json +1762 -1033
- package/artifacts/PublicChecks.json +1726 -927
- package/dest/auth-registry/constants.d.ts +3 -2
- package/dest/auth-registry/constants.d.ts.map +1 -1
- package/dest/contract_data.d.ts +1 -1
- package/dest/contract_data.d.ts.map +1 -1
- package/dest/contract_data.js +9 -5
- package/dest/drift.js +1 -1
- package/dest/handshake-registry/constants.d.ts +11 -0
- package/dest/handshake-registry/constants.d.ts.map +1 -0
- package/dest/handshake-registry/constants.js +17 -0
- package/dest/handshake-registry/index.d.ts +6 -0
- package/dest/handshake-registry/index.d.ts.map +1 -0
- package/dest/handshake-registry/index.js +14 -0
- package/dest/handshake-registry/lazy.d.ts +7 -0
- package/dest/handshake-registry/lazy.d.ts.map +1 -0
- package/dest/handshake-registry/lazy.js +24 -0
- package/dest/index.d.ts +3 -1
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +2 -0
- package/dest/multi-call-entrypoint/constants.d.ts +3 -2
- package/dest/multi-call-entrypoint/constants.d.ts.map +1 -1
- package/dest/public-checks/constants.d.ts +3 -2
- package/dest/public-checks/constants.d.ts.map +1 -1
- package/dest/publishable_standard_contracts.d.ts +17 -0
- package/dest/publishable_standard_contracts.d.ts.map +1 -0
- package/dest/publishable_standard_contracts.js +23 -0
- package/dest/standard_contract_data.d.ts +2 -2
- package/dest/standard_contract_data.d.ts.map +1 -1
- package/dest/standard_contract_data.js +42 -18
- package/package.json +5 -4
- package/src/auth-registry/constants.ts +3 -1
- package/src/contract_data.ts +9 -7
- package/src/drift.ts +1 -1
- package/src/handshake-registry/constants.ts +23 -0
- package/src/handshake-registry/index.ts +25 -0
- package/src/handshake-registry/lazy.ts +35 -0
- package/src/index.ts +2 -0
- package/src/multi-call-entrypoint/constants.ts +3 -1
- package/src/public-checks/constants.ts +3 -1
- package/src/publishable_standard_contracts.ts +22 -0
- package/src/standard_contract_data.ts +53 -15
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// Lightweight metadata leaf export for browser bundles: importing from
|
|
2
2
|
// `@aztec/standard-contracts/multi-call-entrypoint/constants` avoids dragging in the
|
|
3
3
|
// `MultiCallEntrypoint.json` static import.
|
|
4
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
+
|
|
4
6
|
import { StandardContractAddress, StandardContractClassId, StandardContractSalt } from '../standard_contract_data.js';
|
|
5
7
|
|
|
6
|
-
export const STANDARD_MULTI_CALL_ENTRYPOINT_ADDRESS = StandardContractAddress.MultiCallEntrypoint;
|
|
8
|
+
export const STANDARD_MULTI_CALL_ENTRYPOINT_ADDRESS: AztecAddress = StandardContractAddress.MultiCallEntrypoint;
|
|
7
9
|
export const STANDARD_MULTI_CALL_ENTRYPOINT_CLASS_ID = StandardContractClassId.MultiCallEntrypoint;
|
|
8
10
|
export const STANDARD_MULTI_CALL_ENTRYPOINT_SALT = StandardContractSalt.MultiCallEntrypoint;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// Lightweight metadata leaf export for browser bundles: importing from
|
|
2
2
|
// `@aztec/standard-contracts/public-checks/constants` avoids dragging in the
|
|
3
3
|
// `PublicChecks.json` static import.
|
|
4
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
+
|
|
4
6
|
import { StandardContractAddress, StandardContractClassId, StandardContractSalt } from '../standard_contract_data.js';
|
|
5
7
|
|
|
6
|
-
export const STANDARD_PUBLIC_CHECKS_ADDRESS = StandardContractAddress.PublicChecks;
|
|
8
|
+
export const STANDARD_PUBLIC_CHECKS_ADDRESS: AztecAddress = StandardContractAddress.PublicChecks;
|
|
7
9
|
export const STANDARD_PUBLIC_CHECKS_CLASS_ID = StandardContractClassId.PublicChecks;
|
|
8
10
|
export const STANDARD_PUBLIC_CHECKS_SALT = StandardContractSalt.PublicChecks;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getStandardAuthRegistry } from './auth-registry/index.js';
|
|
2
|
+
import { getStandardHandshakeRegistry } from './handshake-registry/index.js';
|
|
3
|
+
import { getStandardPublicChecks } from './public-checks/index.js';
|
|
4
|
+
import type { StandardContract } from './standard_contract.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Returns the standard contracts that are published on-chain (class registration + instance
|
|
8
|
+
* publication) before their public functions can be called: AuthRegistry, PublicChecks, and
|
|
9
|
+
* HandshakeRegistry. These are exactly the contracts guarded by the `ensure*Published` e2e setup
|
|
10
|
+
* helpers.
|
|
11
|
+
*
|
|
12
|
+
* MultiCallEntrypoint is deliberately excluded: it is a client-side entrypoint used to encode
|
|
13
|
+
* batched private calls and is never published for public execution.
|
|
14
|
+
*
|
|
15
|
+
* This is the single source of truth for the set of standard contracts that test environments seed
|
|
16
|
+
* at genesis (registration/deployment nullifiers) and preload into the archiver contract store, so
|
|
17
|
+
* the two stay consistent — preloading a class whose nullifier is not seeded would recreate the
|
|
18
|
+
* publish-collision bug that genesis seeding avoids.
|
|
19
|
+
*/
|
|
20
|
+
export function getPublishableStandardContracts(): Promise<StandardContract[]> {
|
|
21
|
+
return Promise.all([getStandardAuthRegistry(), getStandardPublicChecks(), getStandardHandshakeRegistry()]);
|
|
22
|
+
}
|
|
@@ -3,7 +3,12 @@ import { Fr } from '@aztec/foundation/curves/bn254';
|
|
|
3
3
|
import { FunctionSelector } from '@aztec/stdlib/abi';
|
|
4
4
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
5
|
|
|
6
|
-
export const standardContractNames = [
|
|
6
|
+
export const standardContractNames = [
|
|
7
|
+
'AuthRegistry',
|
|
8
|
+
'MultiCallEntrypoint',
|
|
9
|
+
'PublicChecks',
|
|
10
|
+
'HandshakeRegistry',
|
|
11
|
+
] as const;
|
|
7
12
|
|
|
8
13
|
export type StandardContractName = (typeof standardContractNames)[number];
|
|
9
14
|
|
|
@@ -11,18 +16,25 @@ export const StandardContractSalt: Record<StandardContractName, Fr> = {
|
|
|
11
16
|
AuthRegistry: new Fr(1),
|
|
12
17
|
MultiCallEntrypoint: new Fr(1),
|
|
13
18
|
PublicChecks: new Fr(1),
|
|
19
|
+
HandshakeRegistry: new Fr(1),
|
|
14
20
|
};
|
|
15
21
|
|
|
16
22
|
export const StandardContractAddress: Record<StandardContractName, AztecAddress> = {
|
|
17
|
-
AuthRegistry: AztecAddress.
|
|
18
|
-
MultiCallEntrypoint: AztecAddress.
|
|
19
|
-
|
|
23
|
+
AuthRegistry: AztecAddress.fromStringUnsafe('0x1e8e7e73c592a1b1c9199b4b655ddc7a16fa8a8488df595610b71d3dc1cc666c'),
|
|
24
|
+
MultiCallEntrypoint: AztecAddress.fromStringUnsafe(
|
|
25
|
+
'0x246d60af8b79a5dceece7d2388921203401c0df02ce674c5781c6c2162922986',
|
|
26
|
+
),
|
|
27
|
+
PublicChecks: AztecAddress.fromStringUnsafe('0x031b75e2c220f6a6f27da5d61f7b2a12756a127fd25b95fad5da1c5520994b18'),
|
|
28
|
+
HandshakeRegistry: AztecAddress.fromStringUnsafe(
|
|
29
|
+
'0x086c3c67589e1141c70ed0ed8ae324c51d3bf7c5637043fd84c424ffb625831d',
|
|
30
|
+
),
|
|
20
31
|
};
|
|
21
32
|
|
|
22
33
|
export const StandardContractClassId: Record<StandardContractName, Fr> = {
|
|
23
|
-
AuthRegistry: Fr.fromString('
|
|
24
|
-
MultiCallEntrypoint: Fr.fromString('
|
|
25
|
-
PublicChecks: Fr.fromString('
|
|
34
|
+
AuthRegistry: Fr.fromString('0x04182c4b482c8e60c386e473f6dbb6bb3e2ef18e5156f7c9db5ac46af81abdcf'),
|
|
35
|
+
MultiCallEntrypoint: Fr.fromString('0x2f20566eaff9091697f8f5c43a19041267c7591d54074b57043eae90fca8ea64'),
|
|
36
|
+
PublicChecks: Fr.fromString('0x04bc93d415c4d48acab6063b6410f74e1cc257ba8e519020f8773b4ce8ccd31e'),
|
|
37
|
+
HandshakeRegistry: Fr.fromString('0x020ec1998d06036ddab4ba170e9b0d9b96e52beb58aa5ea83d72b22f589cbe6c'),
|
|
26
38
|
};
|
|
27
39
|
|
|
28
40
|
export const StandardContractClassIdPreimage: Record<
|
|
@@ -30,26 +42,32 @@ export const StandardContractClassIdPreimage: Record<
|
|
|
30
42
|
{ artifactHash: Fr; privateFunctionsRoot: Fr; publicBytecodeCommitment: Fr }
|
|
31
43
|
> = {
|
|
32
44
|
AuthRegistry: {
|
|
33
|
-
artifactHash: Fr.fromString('
|
|
34
|
-
privateFunctionsRoot: Fr.fromString('
|
|
35
|
-
publicBytecodeCommitment: Fr.fromString('
|
|
45
|
+
artifactHash: Fr.fromString('0x0f050d2517afac6974e02937314e095569f4c7bb70d98cea097c562313872c8c'),
|
|
46
|
+
privateFunctionsRoot: Fr.fromString('0x1b16157ab0b322bcaf3de5cb197b276c5e29ca3668a0c440668ca56aa7dfff77'),
|
|
47
|
+
publicBytecodeCommitment: Fr.fromString('0x0c7984b020afc901da3b5898b8f94d1d9a09ea2b37d6e0043409abc0b0332906'),
|
|
36
48
|
},
|
|
37
49
|
MultiCallEntrypoint: {
|
|
38
|
-
artifactHash: Fr.fromString('
|
|
39
|
-
privateFunctionsRoot: Fr.fromString('
|
|
50
|
+
artifactHash: Fr.fromString('0x2c0df1970a0307e54c4445670a7f915a77ed57650ffd37a76c47e512c88e0302'),
|
|
51
|
+
privateFunctionsRoot: Fr.fromString('0x10228bc99b6715f15c866a1df0d9cb63c31920cb8e61a6b79058bf98658d7f39'),
|
|
40
52
|
publicBytecodeCommitment: Fr.fromString('0x0ce4c618c3ed7f3a20410e618c06bb701e150af7fe28a3e92f68e7733809f33e'),
|
|
41
53
|
},
|
|
42
54
|
PublicChecks: {
|
|
43
|
-
artifactHash: Fr.fromString('
|
|
55
|
+
artifactHash: Fr.fromString('0x0e6f595db5f0830c2f52f1a5aec5cc85193b89a47408cfbbb2d6ad8f3a7c8a52'),
|
|
44
56
|
privateFunctionsRoot: Fr.fromString('0x202860adb1b8975971eeaf571aaaa88a27f4035290d58532ae7d60b0dfaad54c'),
|
|
45
57
|
publicBytecodeCommitment: Fr.fromString('0x013c4f854a5c87c9daf86c5f9bc07a42c2a061f1d924a5b3564ec7edc8e18cb7'),
|
|
46
58
|
},
|
|
59
|
+
HandshakeRegistry: {
|
|
60
|
+
artifactHash: Fr.fromString('0x2dd01b80cabc352f7d01799a6e5dd6255cc0d7f01fe42d270760d0bf0a0b5daf'),
|
|
61
|
+
privateFunctionsRoot: Fr.fromString('0x0c80100ee31d91778c8f3d4453d056a58467b50f86d446f3209b96d87acb354e'),
|
|
62
|
+
publicBytecodeCommitment: Fr.fromString('0x0ce4c618c3ed7f3a20410e618c06bb701e150af7fe28a3e92f68e7733809f33e'),
|
|
63
|
+
},
|
|
47
64
|
};
|
|
48
65
|
|
|
49
66
|
export const StandardContractInitializationHash: Record<StandardContractName, Fr> = {
|
|
50
67
|
AuthRegistry: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
51
68
|
MultiCallEntrypoint: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
52
69
|
PublicChecks: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
70
|
+
HandshakeRegistry: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
53
71
|
};
|
|
54
72
|
|
|
55
73
|
export const StandardContractPrivateFunctions: Record<
|
|
@@ -61,7 +79,7 @@ export const StandardContractPrivateFunctions: Record<
|
|
|
61
79
|
selector: FunctionSelector.fromField(
|
|
62
80
|
Fr.fromString('0x0000000000000000000000000000000000000000000000000000000079a3d418'),
|
|
63
81
|
),
|
|
64
|
-
vkHash: Fr.fromString('
|
|
82
|
+
vkHash: Fr.fromString('0x2d46cdec4cc2afd813ba2b50106dba455821e4c7b3c10f1c7293bbc759dccf64'),
|
|
65
83
|
},
|
|
66
84
|
],
|
|
67
85
|
MultiCallEntrypoint: [
|
|
@@ -69,8 +87,28 @@ export const StandardContractPrivateFunctions: Record<
|
|
|
69
87
|
selector: FunctionSelector.fromField(
|
|
70
88
|
Fr.fromString('0x00000000000000000000000000000000000000000000000000000000f04908a9'),
|
|
71
89
|
),
|
|
72
|
-
vkHash: Fr.fromString('
|
|
90
|
+
vkHash: Fr.fromString('0x0699bae67183ce084da1cd76ce05d18f45f796237f2baafaf7d4bfbf9663c433'),
|
|
73
91
|
},
|
|
74
92
|
],
|
|
75
93
|
PublicChecks: [],
|
|
94
|
+
HandshakeRegistry: [
|
|
95
|
+
{
|
|
96
|
+
selector: FunctionSelector.fromField(
|
|
97
|
+
Fr.fromString('0x0000000000000000000000000000000000000000000000000000000019f8b409'),
|
|
98
|
+
),
|
|
99
|
+
vkHash: Fr.fromString('0x033a99c31fd390e320398efa03eb1a34d0db2f2e0201fbb0062aa915f406f3d7'),
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
selector: FunctionSelector.fromField(
|
|
103
|
+
Fr.fromString('0x00000000000000000000000000000000000000000000000000000000db548fcf'),
|
|
104
|
+
),
|
|
105
|
+
vkHash: Fr.fromString('0x12964f25be85fded4079591a3871e85d15967c75fd70f3d0edf10d72abfea59c'),
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
selector: FunctionSelector.fromField(
|
|
109
|
+
Fr.fromString('0x00000000000000000000000000000000000000000000000000000000f1ff839b'),
|
|
110
|
+
),
|
|
111
|
+
vkHash: Fr.fromString('0x049120d4c9a12a2286c83df31064637b53746ea13868b0756174dcb3e036bb9d'),
|
|
112
|
+
},
|
|
113
|
+
],
|
|
76
114
|
};
|