@aztec/protocol-contracts 0.0.1-commit.7ac86ea28 → 0.0.1-commit.7b86788
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 +109 -109
- package/artifacts/ContractClassRegistry.json +31 -31
- package/artifacts/ContractInstanceRegistry.json +49 -49
- package/artifacts/FeeJuice.json +41 -41
- package/artifacts/MultiCallEntrypoint.json +83 -83
- package/artifacts/PublicChecks.json +84 -84
- package/dest/protocol_contract_data.js +27 -27
- package/dest/scripts/generate_data.js +4 -0
- package/package.json +4 -4
- package/src/protocol_contract_data.ts +27 -27
|
@@ -28,51 +28,51 @@ export const ProtocolContractAddress = {
|
|
|
28
28
|
PublicChecks: AztecAddress.fromBigInt(6n)
|
|
29
29
|
};
|
|
30
30
|
export const ProtocolContractDerivedAddress = {
|
|
31
|
-
AuthRegistry: AztecAddress.fromString('
|
|
32
|
-
ContractInstanceRegistry: AztecAddress.fromString('
|
|
33
|
-
ContractClassRegistry: AztecAddress.fromString('
|
|
34
|
-
MultiCallEntrypoint: AztecAddress.fromString('
|
|
35
|
-
FeeJuice: AztecAddress.fromString('
|
|
36
|
-
PublicChecks: AztecAddress.fromString('
|
|
31
|
+
AuthRegistry: AztecAddress.fromString('0x21e6f25d8903e7f27c1222a3b51ca78865a32913457f10a5d16a797fdf18ab19'),
|
|
32
|
+
ContractInstanceRegistry: AztecAddress.fromString('0x0ddc81eb40bd49f334560d47d61018f18ca02ef6c325699f85484565daf5ebe2'),
|
|
33
|
+
ContractClassRegistry: AztecAddress.fromString('0x220bc0948055804575b52abb1bd7f074925398d480d284c4b9ec138f1b41ebbb'),
|
|
34
|
+
MultiCallEntrypoint: AztecAddress.fromString('0x07e4ad165d7aad74d354039132a8439b78975d87e8966fb19c09a19827e23e03'),
|
|
35
|
+
FeeJuice: AztecAddress.fromString('0x1a504cea9c4b321c1bea20e68bab6f24d85c08246a3fab198a49709bed77e67c'),
|
|
36
|
+
PublicChecks: AztecAddress.fromString('0x2582cd406a326065ab6b9579423d5bcc04d6604bd3a77332cd861775cc4d9b64')
|
|
37
37
|
};
|
|
38
38
|
export const ProtocolContractClassId = {
|
|
39
|
-
AuthRegistry: Fr.fromString('
|
|
40
|
-
ContractInstanceRegistry: Fr.fromString('
|
|
41
|
-
ContractClassRegistry: Fr.fromString('
|
|
42
|
-
MultiCallEntrypoint: Fr.fromString('
|
|
43
|
-
FeeJuice: Fr.fromString('
|
|
44
|
-
PublicChecks: Fr.fromString('
|
|
39
|
+
AuthRegistry: Fr.fromString('0x12905250fc2a462677693a5d03fabeb67b565812e76100d4b19e0d410d1b4631'),
|
|
40
|
+
ContractInstanceRegistry: Fr.fromString('0x109ed8c1cbc9dabcc9377dab903739fc4a3a5dbf088f9dd6f2dbe4039c9f53cd'),
|
|
41
|
+
ContractClassRegistry: Fr.fromString('0x111a72d69fd35849f850a37e45e9c9db502856dff761348cda12aba7e049faec'),
|
|
42
|
+
MultiCallEntrypoint: Fr.fromString('0x10fbf1192bd273a824dcf9a06f2cae9960d649ed1a4f95ec2b1e023eb7c9c735'),
|
|
43
|
+
FeeJuice: Fr.fromString('0x1c46b05a9c7481f937f4eb4653a8333956969a836b5622d304d1ac0cc9851735'),
|
|
44
|
+
PublicChecks: Fr.fromString('0x0545bfd039a2a948a69ede237ec5e6f9e6eb02ca46f8c6293954f52ad4a8c5d0')
|
|
45
45
|
};
|
|
46
46
|
export const ProtocolContractClassIdPreimage = {
|
|
47
47
|
AuthRegistry: {
|
|
48
|
-
artifactHash: Fr.fromString('
|
|
48
|
+
artifactHash: Fr.fromString('0x1e42973f8813e4b9eb23eccd74448fe1ab12703368dfbb28bd4cb755f57b5832'),
|
|
49
49
|
privateFunctionsRoot: Fr.fromString('0x11900a485e3ffa03da98d89abb0c9419200644aaf17f5caa863953fccf1ed88f'),
|
|
50
50
|
publicBytecodeCommitment: Fr.fromString('0x2c9138ec76d2f7db9c313a411adb0855e334ba6bb1bbbe191fff14ee0799deea')
|
|
51
51
|
},
|
|
52
52
|
ContractInstanceRegistry: {
|
|
53
|
-
artifactHash: Fr.fromString('
|
|
53
|
+
artifactHash: Fr.fromString('0x0bd1a9cb8181765932ea869d21e9c404d8f862ea9754a9f8eb9a3f319f1f77b0'),
|
|
54
54
|
privateFunctionsRoot: Fr.fromString('0x136a6705c7ad1d47f65cb881a56909d4c78d3fa8944f5b103734cd91e654ed63'),
|
|
55
|
-
publicBytecodeCommitment: Fr.fromString('
|
|
55
|
+
publicBytecodeCommitment: Fr.fromString('0x158e5a42ceeda4900e5d4675f313799e503e7185eb9dd1d3921a0df97fce8058')
|
|
56
56
|
},
|
|
57
57
|
ContractClassRegistry: {
|
|
58
|
-
artifactHash: Fr.fromString('
|
|
58
|
+
artifactHash: Fr.fromString('0x17ab19a3d8e2aa673d9f9822f00c908ea4a091e32c0770039e3e92bdc2599556'),
|
|
59
59
|
privateFunctionsRoot: Fr.fromString('0x2ac3bf890a7d534a768079aa86889caa1a86373c8e6fc2db48215b11bbb79106'),
|
|
60
60
|
publicBytecodeCommitment: Fr.fromString('0x0ce4c618c3ed7f3a20410e618c06bb701e150af7fe28a3e92f68e7733809f33e')
|
|
61
61
|
},
|
|
62
62
|
MultiCallEntrypoint: {
|
|
63
|
-
artifactHash: Fr.fromString('
|
|
63
|
+
artifactHash: Fr.fromString('0x28bb69f382220e613f94b5c54979f559337a8f7e2ba4c8260cdcedf0c332979d'),
|
|
64
64
|
privateFunctionsRoot: Fr.fromString('0x266505ecb7c02ce6e227227c0b6bdb44713c8ecd43164ee7bb00b8fb340e8b03'),
|
|
65
65
|
publicBytecodeCommitment: Fr.fromString('0x0ce4c618c3ed7f3a20410e618c06bb701e150af7fe28a3e92f68e7733809f33e')
|
|
66
66
|
},
|
|
67
67
|
FeeJuice: {
|
|
68
|
-
artifactHash: Fr.fromString('
|
|
68
|
+
artifactHash: Fr.fromString('0x2cb098b0291cd3244e8e98b4e471e243074543bafdc85e06ae6854b979712a27'),
|
|
69
69
|
privateFunctionsRoot: Fr.fromString('0x0abef3cfc6ae314886c841b42dc33d3eed255ad3dee7773daabf05b229573759'),
|
|
70
70
|
publicBytecodeCommitment: Fr.fromString('0x140b663a54207869cc411e3731d38cd65ea323ac2fc6004d3d73b7f175bb0f33')
|
|
71
71
|
},
|
|
72
72
|
PublicChecks: {
|
|
73
|
-
artifactHash: Fr.fromString('
|
|
73
|
+
artifactHash: Fr.fromString('0x0cb3ade2495b0e78b8bcade8b2fad9ad013b6eeae9dd1aec169f7b9710abf835'),
|
|
74
74
|
privateFunctionsRoot: Fr.fromString('0x067243231eddf4222f3911defbba7705aff06ed45960b27f6f91319196ef97e1'),
|
|
75
|
-
publicBytecodeCommitment: Fr.fromString('
|
|
75
|
+
publicBytecodeCommitment: Fr.fromString('0x23345dccf35f637c596cb60ca4d341dced078f076de629397ee96de2d5b2f984')
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
78
|
export const ProtocolContractInitializationHash = {
|
|
@@ -121,17 +121,17 @@ export const ProtocolContractPrivateFunctions = {
|
|
|
121
121
|
PublicChecks: []
|
|
122
122
|
};
|
|
123
123
|
export const ProtocolContractsList = new ProtocolContracts([
|
|
124
|
-
AztecAddress.fromString('
|
|
125
|
-
AztecAddress.fromString('
|
|
126
|
-
AztecAddress.fromString('
|
|
127
|
-
AztecAddress.fromString('
|
|
128
|
-
AztecAddress.fromString('
|
|
129
|
-
AztecAddress.fromString('
|
|
124
|
+
AztecAddress.fromString('0x21e6f25d8903e7f27c1222a3b51ca78865a32913457f10a5d16a797fdf18ab19'),
|
|
125
|
+
AztecAddress.fromString('0x0ddc81eb40bd49f334560d47d61018f18ca02ef6c325699f85484565daf5ebe2'),
|
|
126
|
+
AztecAddress.fromString('0x220bc0948055804575b52abb1bd7f074925398d480d284c4b9ec138f1b41ebbb'),
|
|
127
|
+
AztecAddress.fromString('0x07e4ad165d7aad74d354039132a8439b78975d87e8966fb19c09a19827e23e03'),
|
|
128
|
+
AztecAddress.fromString('0x1a504cea9c4b321c1bea20e68bab6f24d85c08246a3fab198a49709bed77e67c'),
|
|
129
|
+
AztecAddress.fromString('0x2582cd406a326065ab6b9579423d5bcc04d6604bd3a77332cd861775cc4d9b64'),
|
|
130
130
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
131
131
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
132
132
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
133
133
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
134
134
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000')
|
|
135
135
|
]);
|
|
136
|
-
export const protocolContractsHash = Fr.fromString('
|
|
136
|
+
export const protocolContractsHash = Fr.fromString('0x066f3df5212a023d12bcf474cf10e93d573393826ccf4c9021e6d0c04ae8ed9f');
|
|
137
137
|
export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('0x1a7e1badb79abdd38c684b3c8306ffe7ecb33c69e3380d9855730aaaa83a21a8');
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
// Reads compiled Noir artifacts for each protocol contract and derives their addresses, class IDs,
|
|
2
|
+
// bytecode commitments, and other deployment data, emitting everything as precomputed constants into
|
|
3
|
+
// `protocol_contract_data.ts`. This avoids clients repeating the expensive hashing at runtime and
|
|
4
|
+
// ensures a single source of truth for the protocol contracts hash enforced by circuits, P2P, and L1.
|
|
1
5
|
import { CANONICAL_AUTH_REGISTRY_ADDRESS, CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS, CONTRACT_INSTANCE_PUBLISHED_MAGIC_VALUE, CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS, FEE_JUICE_ADDRESS, MAX_PROTOCOL_CONTRACTS, MULTI_CALL_ENTRYPOINT_ADDRESS, PUBLIC_CHECKS_ADDRESS } from '@aztec/constants';
|
|
2
6
|
import { makeTuple } from '@aztec/foundation/array';
|
|
3
7
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
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.1-commit.
|
|
5
|
+
"version": "0.0.1-commit.7b86788",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./dest/index.js",
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
]
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@aztec/constants": "0.0.1-commit.
|
|
77
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
78
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
76
|
+
"@aztec/constants": "0.0.1-commit.7b86788",
|
|
77
|
+
"@aztec/foundation": "0.0.1-commit.7b86788",
|
|
78
|
+
"@aztec/stdlib": "0.0.1-commit.7b86788",
|
|
79
79
|
"lodash.chunk": "^4.2.0",
|
|
80
80
|
"lodash.omit": "^4.5.0",
|
|
81
81
|
"tslib": "^2.4.0"
|
|
@@ -42,55 +42,55 @@ PublicChecks: AztecAddress.fromBigInt(6n)
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
export const ProtocolContractDerivedAddress = {
|
|
45
|
-
AuthRegistry: AztecAddress.fromString('
|
|
46
|
-
ContractInstanceRegistry: AztecAddress.fromString('
|
|
47
|
-
ContractClassRegistry: AztecAddress.fromString('
|
|
48
|
-
MultiCallEntrypoint: AztecAddress.fromString('
|
|
49
|
-
FeeJuice: AztecAddress.fromString('
|
|
50
|
-
PublicChecks: AztecAddress.fromString('
|
|
45
|
+
AuthRegistry: AztecAddress.fromString('0x21e6f25d8903e7f27c1222a3b51ca78865a32913457f10a5d16a797fdf18ab19'),
|
|
46
|
+
ContractInstanceRegistry: AztecAddress.fromString('0x0ddc81eb40bd49f334560d47d61018f18ca02ef6c325699f85484565daf5ebe2'),
|
|
47
|
+
ContractClassRegistry: AztecAddress.fromString('0x220bc0948055804575b52abb1bd7f074925398d480d284c4b9ec138f1b41ebbb'),
|
|
48
|
+
MultiCallEntrypoint: AztecAddress.fromString('0x07e4ad165d7aad74d354039132a8439b78975d87e8966fb19c09a19827e23e03'),
|
|
49
|
+
FeeJuice: AztecAddress.fromString('0x1a504cea9c4b321c1bea20e68bab6f24d85c08246a3fab198a49709bed77e67c'),
|
|
50
|
+
PublicChecks: AztecAddress.fromString('0x2582cd406a326065ab6b9579423d5bcc04d6604bd3a77332cd861775cc4d9b64')
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
55
|
export const ProtocolContractClassId: Record<ProtocolContractName, Fr> = {
|
|
56
|
-
AuthRegistry: Fr.fromString('
|
|
57
|
-
ContractInstanceRegistry: Fr.fromString('
|
|
58
|
-
ContractClassRegistry: Fr.fromString('
|
|
59
|
-
MultiCallEntrypoint: Fr.fromString('
|
|
60
|
-
FeeJuice: Fr.fromString('
|
|
61
|
-
PublicChecks: Fr.fromString('
|
|
56
|
+
AuthRegistry: Fr.fromString('0x12905250fc2a462677693a5d03fabeb67b565812e76100d4b19e0d410d1b4631'),
|
|
57
|
+
ContractInstanceRegistry: Fr.fromString('0x109ed8c1cbc9dabcc9377dab903739fc4a3a5dbf088f9dd6f2dbe4039c9f53cd'),
|
|
58
|
+
ContractClassRegistry: Fr.fromString('0x111a72d69fd35849f850a37e45e9c9db502856dff761348cda12aba7e049faec'),
|
|
59
|
+
MultiCallEntrypoint: Fr.fromString('0x10fbf1192bd273a824dcf9a06f2cae9960d649ed1a4f95ec2b1e023eb7c9c735'),
|
|
60
|
+
FeeJuice: Fr.fromString('0x1c46b05a9c7481f937f4eb4653a8333956969a836b5622d304d1ac0cc9851735'),
|
|
61
|
+
PublicChecks: Fr.fromString('0x0545bfd039a2a948a69ede237ec5e6f9e6eb02ca46f8c6293954f52ad4a8c5d0')
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
export const ProtocolContractClassIdPreimage: Record<ProtocolContractName, { artifactHash: Fr; privateFunctionsRoot: Fr; publicBytecodeCommitment: Fr }> = {
|
|
65
65
|
AuthRegistry: {
|
|
66
|
-
artifactHash: Fr.fromString('
|
|
66
|
+
artifactHash: Fr.fromString('0x1e42973f8813e4b9eb23eccd74448fe1ab12703368dfbb28bd4cb755f57b5832'),
|
|
67
67
|
privateFunctionsRoot: Fr.fromString('0x11900a485e3ffa03da98d89abb0c9419200644aaf17f5caa863953fccf1ed88f'),
|
|
68
68
|
publicBytecodeCommitment: Fr.fromString('0x2c9138ec76d2f7db9c313a411adb0855e334ba6bb1bbbe191fff14ee0799deea'),
|
|
69
69
|
},
|
|
70
70
|
ContractInstanceRegistry: {
|
|
71
|
-
artifactHash: Fr.fromString('
|
|
71
|
+
artifactHash: Fr.fromString('0x0bd1a9cb8181765932ea869d21e9c404d8f862ea9754a9f8eb9a3f319f1f77b0'),
|
|
72
72
|
privateFunctionsRoot: Fr.fromString('0x136a6705c7ad1d47f65cb881a56909d4c78d3fa8944f5b103734cd91e654ed63'),
|
|
73
|
-
publicBytecodeCommitment: Fr.fromString('
|
|
73
|
+
publicBytecodeCommitment: Fr.fromString('0x158e5a42ceeda4900e5d4675f313799e503e7185eb9dd1d3921a0df97fce8058'),
|
|
74
74
|
},
|
|
75
75
|
ContractClassRegistry: {
|
|
76
|
-
artifactHash: Fr.fromString('
|
|
76
|
+
artifactHash: Fr.fromString('0x17ab19a3d8e2aa673d9f9822f00c908ea4a091e32c0770039e3e92bdc2599556'),
|
|
77
77
|
privateFunctionsRoot: Fr.fromString('0x2ac3bf890a7d534a768079aa86889caa1a86373c8e6fc2db48215b11bbb79106'),
|
|
78
78
|
publicBytecodeCommitment: Fr.fromString('0x0ce4c618c3ed7f3a20410e618c06bb701e150af7fe28a3e92f68e7733809f33e'),
|
|
79
79
|
},
|
|
80
80
|
MultiCallEntrypoint: {
|
|
81
|
-
artifactHash: Fr.fromString('
|
|
81
|
+
artifactHash: Fr.fromString('0x28bb69f382220e613f94b5c54979f559337a8f7e2ba4c8260cdcedf0c332979d'),
|
|
82
82
|
privateFunctionsRoot: Fr.fromString('0x266505ecb7c02ce6e227227c0b6bdb44713c8ecd43164ee7bb00b8fb340e8b03'),
|
|
83
83
|
publicBytecodeCommitment: Fr.fromString('0x0ce4c618c3ed7f3a20410e618c06bb701e150af7fe28a3e92f68e7733809f33e'),
|
|
84
84
|
},
|
|
85
85
|
FeeJuice: {
|
|
86
|
-
artifactHash: Fr.fromString('
|
|
86
|
+
artifactHash: Fr.fromString('0x2cb098b0291cd3244e8e98b4e471e243074543bafdc85e06ae6854b979712a27'),
|
|
87
87
|
privateFunctionsRoot: Fr.fromString('0x0abef3cfc6ae314886c841b42dc33d3eed255ad3dee7773daabf05b229573759'),
|
|
88
88
|
publicBytecodeCommitment: Fr.fromString('0x140b663a54207869cc411e3731d38cd65ea323ac2fc6004d3d73b7f175bb0f33'),
|
|
89
89
|
},
|
|
90
90
|
PublicChecks: {
|
|
91
|
-
artifactHash: Fr.fromString('
|
|
91
|
+
artifactHash: Fr.fromString('0x0cb3ade2495b0e78b8bcade8b2fad9ad013b6eeae9dd1aec169f7b9710abf835'),
|
|
92
92
|
privateFunctionsRoot: Fr.fromString('0x067243231eddf4222f3911defbba7705aff06ed45960b27f6f91319196ef97e1'),
|
|
93
|
-
publicBytecodeCommitment: Fr.fromString('
|
|
93
|
+
publicBytecodeCommitment: Fr.fromString('0x23345dccf35f637c596cb60ca4d341dced078f076de629397ee96de2d5b2f984'),
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
96
|
|
|
@@ -115,12 +115,12 @@ PublicChecks: []
|
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
export const ProtocolContractsList = new ProtocolContracts([
|
|
118
|
-
AztecAddress.fromString('
|
|
119
|
-
AztecAddress.fromString('
|
|
120
|
-
AztecAddress.fromString('
|
|
121
|
-
AztecAddress.fromString('
|
|
122
|
-
AztecAddress.fromString('
|
|
123
|
-
AztecAddress.fromString('
|
|
118
|
+
AztecAddress.fromString('0x21e6f25d8903e7f27c1222a3b51ca78865a32913457f10a5d16a797fdf18ab19'),
|
|
119
|
+
AztecAddress.fromString('0x0ddc81eb40bd49f334560d47d61018f18ca02ef6c325699f85484565daf5ebe2'),
|
|
120
|
+
AztecAddress.fromString('0x220bc0948055804575b52abb1bd7f074925398d480d284c4b9ec138f1b41ebbb'),
|
|
121
|
+
AztecAddress.fromString('0x07e4ad165d7aad74d354039132a8439b78975d87e8966fb19c09a19827e23e03'),
|
|
122
|
+
AztecAddress.fromString('0x1a504cea9c4b321c1bea20e68bab6f24d85c08246a3fab198a49709bed77e67c'),
|
|
123
|
+
AztecAddress.fromString('0x2582cd406a326065ab6b9579423d5bcc04d6604bd3a77332cd861775cc4d9b64'),
|
|
124
124
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
125
125
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
126
126
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
@@ -128,7 +128,7 @@ AztecAddress.fromString('0x00000000000000000000000000000000000000000000000000000
|
|
|
128
128
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000')
|
|
129
129
|
]);
|
|
130
130
|
|
|
131
|
-
export const protocolContractsHash = Fr.fromString('
|
|
131
|
+
export const protocolContractsHash = Fr.fromString('0x066f3df5212a023d12bcf474cf10e93d573393826ccf4c9021e6d0c04ae8ed9f');
|
|
132
132
|
|
|
133
133
|
|
|
134
134
|
|