@aztec/protocol-contracts 0.0.1-commit.d431d1c → 0.0.1-commit.d6f2b3f94
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 +250 -990
- package/artifacts/ContractClassRegistry.json +123 -4776
- package/artifacts/ContractInstanceRegistry.json +214 -918
- package/artifacts/FeeJuice.json +88 -777
- package/artifacts/MultiCallEntrypoint.json +125 -116
- package/artifacts/PublicChecks.json +129 -124
- package/dest/class-registry/contract_class_published_event.js +1 -1
- package/dest/protocol_contract_data.js +14 -14
- package/dest/scripts/generate_data.js +4 -4
- package/package.json +4 -4
- package/src/class-registry/contract_class_published_event.ts +1 -1
- package/src/protocol_contract_data.ts +14 -14
|
@@ -20,7 +20,7 @@ import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
|
20
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
|
-
// See how the log is serialized in `noir-projects/noir-contracts/contracts/protocol/
|
|
23
|
+
// See how the log is serialized in `noir-projects/noir-contracts/contracts/protocol/contract_class_registry_contract/src/events/class_published.nr`.
|
|
24
24
|
const fieldsWithoutTag = log.fields.fields.slice(1);
|
|
25
25
|
const reader = new FieldReader(fieldsWithoutTag);
|
|
26
26
|
const contractClassId = reader.readField();
|
|
@@ -27,25 +27,25 @@ export const ProtocolContractAddress = {
|
|
|
27
27
|
PublicChecks: AztecAddress.fromBigInt(6n)
|
|
28
28
|
};
|
|
29
29
|
export const ProtocolContractDerivedAddress = {
|
|
30
|
-
AuthRegistry: AztecAddress.fromString('
|
|
31
|
-
ContractInstanceRegistry: AztecAddress.fromString('
|
|
32
|
-
ContractClassRegistry: AztecAddress.fromString('
|
|
33
|
-
MultiCallEntrypoint: AztecAddress.fromString('
|
|
34
|
-
FeeJuice: AztecAddress.fromString('
|
|
35
|
-
PublicChecks: AztecAddress.fromString('
|
|
30
|
+
AuthRegistry: AztecAddress.fromString('0x00c052aa878325ba78fac127c40ae563511318e9e6948263e379a03d5f1e4a6e'),
|
|
31
|
+
ContractInstanceRegistry: AztecAddress.fromString('0x0a01e1e37be489d537634dad2c3acebe6b0ede4179e6a1a890c67335fdd355d6'),
|
|
32
|
+
ContractClassRegistry: AztecAddress.fromString('0x25c9135da27c45f28e911a6f6840cd13b5cb7e37dac4e0955d16f32cf71b54e4'),
|
|
33
|
+
MultiCallEntrypoint: AztecAddress.fromString('0x25a2606e5b0475329de902e1c02d8cd6b127b075495fa98f4ed2401a18c0e601'),
|
|
34
|
+
FeeJuice: AztecAddress.fromString('0x163da85a17e1762dff0020832656ece3d2f89ac74fcc6572dda8c9492510c0c2'),
|
|
35
|
+
PublicChecks: AztecAddress.fromString('0x2e1a5de981901564e30ec6268592dcf39e0b4c6bea131c079c9ce4fb52e9f181')
|
|
36
36
|
};
|
|
37
37
|
export const ProtocolContractsList = new ProtocolContracts([
|
|
38
|
-
AztecAddress.fromString('
|
|
39
|
-
AztecAddress.fromString('
|
|
40
|
-
AztecAddress.fromString('
|
|
41
|
-
AztecAddress.fromString('
|
|
42
|
-
AztecAddress.fromString('
|
|
43
|
-
AztecAddress.fromString('
|
|
38
|
+
AztecAddress.fromString('0x00c052aa878325ba78fac127c40ae563511318e9e6948263e379a03d5f1e4a6e'),
|
|
39
|
+
AztecAddress.fromString('0x0a01e1e37be489d537634dad2c3acebe6b0ede4179e6a1a890c67335fdd355d6'),
|
|
40
|
+
AztecAddress.fromString('0x25c9135da27c45f28e911a6f6840cd13b5cb7e37dac4e0955d16f32cf71b54e4'),
|
|
41
|
+
AztecAddress.fromString('0x25a2606e5b0475329de902e1c02d8cd6b127b075495fa98f4ed2401a18c0e601'),
|
|
42
|
+
AztecAddress.fromString('0x163da85a17e1762dff0020832656ece3d2f89ac74fcc6572dda8c9492510c0c2'),
|
|
43
|
+
AztecAddress.fromString('0x2e1a5de981901564e30ec6268592dcf39e0b4c6bea131c079c9ce4fb52e9f181'),
|
|
44
44
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
45
45
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
46
46
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
47
47
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
48
48
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000')
|
|
49
49
|
]);
|
|
50
|
-
export const protocolContractsHash = Fr.fromString('
|
|
51
|
-
export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('
|
|
50
|
+
export const protocolContractsHash = Fr.fromString('0x23a47d6104763aa9ddd35ee7a23720b7188749ab61ad5e2d941b11bec4204a2d');
|
|
51
|
+
export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('0x1a7e1badb79abdd38c684b3c8306ffe7ecb33c69e3380d9855730aaaa83a21a8');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
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';
|
|
1
|
+
import { CANONICAL_AUTH_REGISTRY_ADDRESS, CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS, CONTRACT_INSTANCE_PUBLISHED_MAGIC_VALUE, CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS, FEE_JUICE_ADDRESS, GeneratorIndex, MAX_PROTOCOL_CONTRACTS, MULTI_CALL_ENTRYPOINT_ADDRESS, PUBLIC_CHECKS_ADDRESS } from '@aztec/constants';
|
|
2
2
|
import { makeTuple } from '@aztec/foundation/array';
|
|
3
|
-
import {
|
|
3
|
+
import { poseidon2HashWithSeparator } from '@aztec/foundation/crypto/poseidon';
|
|
4
4
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
5
5
|
import { createConsoleLogger } from '@aztec/foundation/log';
|
|
6
6
|
import { loadContractArtifact } from '@aztec/stdlib/abi';
|
|
@@ -117,10 +117,10 @@ async function generateProtocolContractsList(names, derivedAddresses) {
|
|
|
117
117
|
// Generate the siloed log tags for events emitted via private logs.
|
|
118
118
|
async function generateLogTags() {
|
|
119
119
|
return `
|
|
120
|
-
export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('${await
|
|
120
|
+
export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('${await poseidon2HashWithSeparator([
|
|
121
121
|
CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS,
|
|
122
122
|
CONTRACT_INSTANCE_PUBLISHED_MAGIC_VALUE
|
|
123
|
-
])}');
|
|
123
|
+
], GeneratorIndex.PRIVATE_LOG_FIRST_FIELD)}');
|
|
124
124
|
`;
|
|
125
125
|
}
|
|
126
126
|
async function generateOutputFile(names, derivedAddresses) {
|
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.d6f2b3f94",
|
|
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.d6f2b3f94",
|
|
77
|
+
"@aztec/foundation": "0.0.1-commit.d6f2b3f94",
|
|
78
|
+
"@aztec/stdlib": "0.0.1-commit.d6f2b3f94",
|
|
79
79
|
"lodash.chunk": "^4.2.0",
|
|
80
80
|
"lodash.omit": "^4.5.0",
|
|
81
81
|
"tslib": "^2.4.0"
|
|
@@ -29,7 +29,7 @@ export class ContractClassPublishedEvent {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
static fromLog(log: ContractClassLog) {
|
|
32
|
-
// See how the log is serialized in `noir-projects/noir-contracts/contracts/protocol/
|
|
32
|
+
// See how the log is serialized in `noir-projects/noir-contracts/contracts/protocol/contract_class_registry_contract/src/events/class_published.nr`.
|
|
33
33
|
const fieldsWithoutTag = log.fields.fields.slice(1);
|
|
34
34
|
const reader = new FieldReader(fieldsWithoutTag);
|
|
35
35
|
const contractClassId = reader.readField();
|
|
@@ -41,23 +41,23 @@ PublicChecks: AztecAddress.fromBigInt(6n)
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
export const ProtocolContractDerivedAddress = {
|
|
44
|
-
AuthRegistry: AztecAddress.fromString('
|
|
45
|
-
ContractInstanceRegistry: AztecAddress.fromString('
|
|
46
|
-
ContractClassRegistry: AztecAddress.fromString('
|
|
47
|
-
MultiCallEntrypoint: AztecAddress.fromString('
|
|
48
|
-
FeeJuice: AztecAddress.fromString('
|
|
49
|
-
PublicChecks: AztecAddress.fromString('
|
|
44
|
+
AuthRegistry: AztecAddress.fromString('0x00c052aa878325ba78fac127c40ae563511318e9e6948263e379a03d5f1e4a6e'),
|
|
45
|
+
ContractInstanceRegistry: AztecAddress.fromString('0x0a01e1e37be489d537634dad2c3acebe6b0ede4179e6a1a890c67335fdd355d6'),
|
|
46
|
+
ContractClassRegistry: AztecAddress.fromString('0x25c9135da27c45f28e911a6f6840cd13b5cb7e37dac4e0955d16f32cf71b54e4'),
|
|
47
|
+
MultiCallEntrypoint: AztecAddress.fromString('0x25a2606e5b0475329de902e1c02d8cd6b127b075495fa98f4ed2401a18c0e601'),
|
|
48
|
+
FeeJuice: AztecAddress.fromString('0x163da85a17e1762dff0020832656ece3d2f89ac74fcc6572dda8c9492510c0c2'),
|
|
49
|
+
PublicChecks: AztecAddress.fromString('0x2e1a5de981901564e30ec6268592dcf39e0b4c6bea131c079c9ce4fb52e9f181')
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
export const ProtocolContractsList = new ProtocolContracts([
|
|
55
|
-
AztecAddress.fromString('
|
|
56
|
-
AztecAddress.fromString('
|
|
57
|
-
AztecAddress.fromString('
|
|
58
|
-
AztecAddress.fromString('
|
|
59
|
-
AztecAddress.fromString('
|
|
60
|
-
AztecAddress.fromString('
|
|
55
|
+
AztecAddress.fromString('0x00c052aa878325ba78fac127c40ae563511318e9e6948263e379a03d5f1e4a6e'),
|
|
56
|
+
AztecAddress.fromString('0x0a01e1e37be489d537634dad2c3acebe6b0ede4179e6a1a890c67335fdd355d6'),
|
|
57
|
+
AztecAddress.fromString('0x25c9135da27c45f28e911a6f6840cd13b5cb7e37dac4e0955d16f32cf71b54e4'),
|
|
58
|
+
AztecAddress.fromString('0x25a2606e5b0475329de902e1c02d8cd6b127b075495fa98f4ed2401a18c0e601'),
|
|
59
|
+
AztecAddress.fromString('0x163da85a17e1762dff0020832656ece3d2f89ac74fcc6572dda8c9492510c0c2'),
|
|
60
|
+
AztecAddress.fromString('0x2e1a5de981901564e30ec6268592dcf39e0b4c6bea131c079c9ce4fb52e9f181'),
|
|
61
61
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
62
62
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
63
63
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
@@ -65,10 +65,10 @@ AztecAddress.fromString('0x00000000000000000000000000000000000000000000000000000
|
|
|
65
65
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000')
|
|
66
66
|
]);
|
|
67
67
|
|
|
68
|
-
export const protocolContractsHash = Fr.fromString('
|
|
68
|
+
export const protocolContractsHash = Fr.fromString('0x23a47d6104763aa9ddd35ee7a23720b7188749ab61ad5e2d941b11bec4204a2d');
|
|
69
69
|
|
|
70
70
|
|
|
71
71
|
|
|
72
|
-
export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('
|
|
72
|
+
export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('0x1a7e1badb79abdd38c684b3c8306ffe7ecb33c69e3380d9855730aaaa83a21a8');
|
|
73
73
|
|
|
74
74
|
|