@aztec/protocol-contracts 0.0.1-commit.b2a5d0dd1 → 0.0.1-commit.b3d3157a
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/ContractClassRegistry.json +68 -84
- package/artifacts/ContractInstanceRegistry.json +539 -1026
- package/artifacts/FeeJuice.json +102 -131
- package/dest/instance-registry/contract_instance_published_event.d.ts +3 -2
- package/dest/instance-registry/contract_instance_published_event.d.ts.map +1 -1
- package/dest/instance-registry/contract_instance_published_event.js +7 -3
- package/dest/make_protocol_contract.d.ts +1 -1
- package/dest/make_protocol_contract.d.ts.map +1 -1
- package/dest/make_protocol_contract.js +3 -1
- package/dest/protocol_contract_data.d.ts +2 -5
- package/dest/protocol_contract_data.d.ts.map +1 -1
- package/dest/protocol_contract_data.js +31 -77
- package/dest/provider/bundle.d.ts +1 -1
- package/dest/provider/bundle.d.ts.map +1 -1
- package/dest/provider/bundle.js +1 -7
- package/dest/provider/lazy.d.ts +1 -1
- package/dest/provider/lazy.d.ts.map +1 -1
- package/dest/provider/lazy.js +0 -9
- package/dest/scripts/generate_data.js +4 -6
- package/package.json +4 -4
- package/src/instance-registry/contract_instance_published_event.ts +5 -1
- package/src/make_protocol_contract.ts +3 -1
- package/src/protocol_contract_data.ts +33 -69
- package/src/provider/bundle.ts +0 -6
- package/src/provider/lazy.ts +0 -9
- package/artifacts/AuthRegistry.d.json.ts +0 -5
- package/artifacts/AuthRegistry.json +0 -7739
- package/artifacts/MultiCallEntrypoint.d.json.ts +0 -5
- package/artifacts/MultiCallEntrypoint.json +0 -5955
- package/artifacts/PublicChecks.d.json.ts +0 -5
- package/artifacts/PublicChecks.json +0 -4194
- package/dest/auth-registry/index.d.ts +0 -6
- 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/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/public-checks/index.d.ts +0 -5
- package/dest/public-checks/index.d.ts.map +0 -1
- package/dest/public-checks/index.js +0 -13
- package/dest/public-checks/lazy.d.ts +0 -6
- package/dest/public-checks/lazy.d.ts.map +0 -1
- package/dest/public-checks/lazy.js +0 -23
- package/src/auth-registry/index.ts +0 -18
- package/src/auth-registry/lazy.ts +0 -29
- package/src/multi-call-entrypoint/index.ts +0 -18
- package/src/multi-call-entrypoint/lazy.ts +0 -29
- package/src/public-checks/index.ts +0 -18
- package/src/public-checks/lazy.ts +0 -29
|
@@ -7,12 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
export const protocolContractNames = [
|
|
10
|
-
'
|
|
11
|
-
'ContractInstanceRegistry',
|
|
10
|
+
'ContractInstanceRegistry',
|
|
12
11
|
'ContractClassRegistry',
|
|
13
|
-
'
|
|
14
|
-
'FeeJuice',
|
|
15
|
-
'PublicChecks'
|
|
12
|
+
'FeeJuice'
|
|
16
13
|
] as const;
|
|
17
14
|
|
|
18
15
|
export type ProtocolContractName = typeof protocolContractNames[number];
|
|
@@ -20,107 +17,74 @@
|
|
|
20
17
|
|
|
21
18
|
|
|
22
19
|
export const ProtocolContractSalt: Record<ProtocolContractName, Fr> = {
|
|
23
|
-
|
|
24
|
-
ContractInstanceRegistry: new Fr(1),
|
|
20
|
+
ContractInstanceRegistry: new Fr(1),
|
|
25
21
|
ContractClassRegistry: new Fr(1),
|
|
26
|
-
|
|
27
|
-
FeeJuice: new Fr(1),
|
|
28
|
-
PublicChecks: new Fr(1)
|
|
22
|
+
FeeJuice: new Fr(1)
|
|
29
23
|
};
|
|
30
24
|
|
|
31
25
|
|
|
32
26
|
|
|
33
27
|
export const ProtocolContractAddress: Record<ProtocolContractName, AztecAddress> = {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
MultiCallEntrypoint: AztecAddress.fromBigInt(4n),
|
|
38
|
-
FeeJuice: AztecAddress.fromBigInt(5n),
|
|
39
|
-
PublicChecks: AztecAddress.fromBigInt(6n)
|
|
28
|
+
ContractInstanceRegistry: AztecAddress.fromBigInt(2n),
|
|
29
|
+
ContractClassRegistry: AztecAddress.fromBigInt(1n),
|
|
30
|
+
FeeJuice: AztecAddress.fromBigInt(3n)
|
|
40
31
|
};
|
|
41
32
|
|
|
42
33
|
|
|
43
34
|
|
|
44
35
|
export const ProtocolContractDerivedAddress = {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
MultiCallEntrypoint: AztecAddress.fromString('0x04a1a43f7274a0e327302ff3dc705c56b74fbdb6ffbc21ab5becd82fbbf76619'),
|
|
49
|
-
FeeJuice: AztecAddress.fromString('0x09d5f4197339c7cddd46db7504ca12d19e28538c41c8ddc8cbdc60001b68239d'),
|
|
50
|
-
PublicChecks: AztecAddress.fromString('0x0099c33c58d6a4c9c8c10b2565ea2977629120b09d233f4cdc825ae72018c46a')
|
|
36
|
+
ContractInstanceRegistry: AztecAddress.fromString('0x290f7bf7cea0eb4c440a06dc8bcf825865479348c9ebf8f540b10ad10fd32c44'),
|
|
37
|
+
ContractClassRegistry: AztecAddress.fromString('0x20b16259faa0a096d687572fc76221263f1cad4a4b726ef49e2cd7b7ce7c7465'),
|
|
38
|
+
FeeJuice: AztecAddress.fromString('0x0fa3ba3e01e6646cd2adade41018dbfff04e59c444760e33bf773ec43d683019')
|
|
51
39
|
};
|
|
52
40
|
|
|
53
41
|
|
|
54
42
|
|
|
55
43
|
export const ProtocolContractClassId: Record<ProtocolContractName, Fr> = {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
MultiCallEntrypoint: Fr.fromString('0x10f2da4ee14ad0bf0cb4bb7e49c2740a11276ecf13e2d14453dabff3b1a2859f'),
|
|
60
|
-
FeeJuice: Fr.fromString('0x2b2a76f2beb08683f1acab5d9487c4c108aea9a2231ce29e63b965fe7fca4514'),
|
|
61
|
-
PublicChecks: Fr.fromString('0x17eb2d9a9e75e8e7c183e3e598a7acf13c6f5b7e02213f87fbb923850a1f5013')
|
|
44
|
+
ContractInstanceRegistry: Fr.fromString('0x123597d7f3c460a3e91bfb92e729fcd048d4f50a88b7c25e694cf75827062e3f'),
|
|
45
|
+
ContractClassRegistry: Fr.fromString('0x243b6ce1af8f520d531b26ce5081fa29c0870ce8d5949c5304a6705b07947a2e'),
|
|
46
|
+
FeeJuice: Fr.fromString('0x1f65e3db036c48ac8f8635b156880ed17e9437ed8904a0c0554f0d6251bf0997')
|
|
62
47
|
};
|
|
63
48
|
|
|
64
49
|
export const ProtocolContractClassIdPreimage: Record<ProtocolContractName, { artifactHash: Fr; privateFunctionsRoot: Fr; publicBytecodeCommitment: Fr }> = {
|
|
65
|
-
|
|
66
|
-
artifactHash: Fr.fromString('
|
|
67
|
-
privateFunctionsRoot: Fr.fromString('
|
|
68
|
-
publicBytecodeCommitment: Fr.fromString('
|
|
69
|
-
},
|
|
70
|
-
ContractInstanceRegistry: {
|
|
71
|
-
artifactHash: Fr.fromString('0x283e94b2b29f2d1635d6f24284d03d2cea147a84477bbd66dc577f665e6fde48'),
|
|
72
|
-
privateFunctionsRoot: Fr.fromString('0x02386055a7eabcf2b643bbacbccd8ae696ea3ec75f3d35cfd6bd16e79652b573'),
|
|
73
|
-
publicBytecodeCommitment: Fr.fromString('0x260735cf6645c6f07d2f0ebe2bfbd3062e95ddc820661329a5422bc239261bba'),
|
|
50
|
+
ContractInstanceRegistry: {
|
|
51
|
+
artifactHash: Fr.fromString('0x0cb37c0b0ec8670b88b472fca5858f8cb112a41ba2aad664903ac1a3bed468b3'),
|
|
52
|
+
privateFunctionsRoot: Fr.fromString('0x0239b0f293384aad456e2e27901eb97cd9073322a28d14b0ac7816a5297b2812'),
|
|
53
|
+
publicBytecodeCommitment: Fr.fromString('0x2c79b6699098244e947caca071a31799c20aa20e7124910a2b7c918fe817d65e'),
|
|
74
54
|
},
|
|
75
55
|
ContractClassRegistry: {
|
|
76
|
-
artifactHash: Fr.fromString('
|
|
77
|
-
privateFunctionsRoot: Fr.fromString('
|
|
78
|
-
publicBytecodeCommitment: Fr.fromString('0x0ce4c618c3ed7f3a20410e618c06bb701e150af7fe28a3e92f68e7733809f33e'),
|
|
79
|
-
},
|
|
80
|
-
MultiCallEntrypoint: {
|
|
81
|
-
artifactHash: Fr.fromString('0x0779e69d2819cb643d38c8c0e37c74a0aebed19e2206112feec51c75d3f44f33'),
|
|
82
|
-
privateFunctionsRoot: Fr.fromString('0x1d06c894b60ec0e02d21e31c0ada8829880e714a64f1c302ed94cd1ec451811e'),
|
|
56
|
+
artifactHash: Fr.fromString('0x1e252471ee2b770fba961d03289344f1798336d9a94e1d8f137397754708de0e'),
|
|
57
|
+
privateFunctionsRoot: Fr.fromString('0x0672f623ec0753ab9fbb02a9a241df81b9bcc0dbed8628d8cab8790e0cb0c03d'),
|
|
83
58
|
publicBytecodeCommitment: Fr.fromString('0x0ce4c618c3ed7f3a20410e618c06bb701e150af7fe28a3e92f68e7733809f33e'),
|
|
84
59
|
},
|
|
85
60
|
FeeJuice: {
|
|
86
|
-
artifactHash: Fr.fromString('
|
|
87
|
-
privateFunctionsRoot: Fr.fromString('
|
|
61
|
+
artifactHash: Fr.fromString('0x1243f24c1d3e8b42c900aa95d3a12448d84f8b5da3fe047f8ac8a46e67bb10b7'),
|
|
62
|
+
privateFunctionsRoot: Fr.fromString('0x247aaafc67f6bf5b06736649181a477dac9f18d3468969b14669708c3dabb275'),
|
|
88
63
|
publicBytecodeCommitment: Fr.fromString('0x1d4b1a8f71b8250d4fb65f8e16a4604e9165648279f47d80e024ce2684c4bdfb'),
|
|
89
|
-
},
|
|
90
|
-
PublicChecks: {
|
|
91
|
-
artifactHash: Fr.fromString('0x11734576d298a80ddc390a256624b56819de5d68deae991c70557bb0ba4f964b'),
|
|
92
|
-
privateFunctionsRoot: Fr.fromString('0x202860adb1b8975971eeaf571aaaa88a27f4035290d58532ae7d60b0dfaad54c'),
|
|
93
|
-
publicBytecodeCommitment: Fr.fromString('0x013c4f854a5c87c9daf86c5f9bc07a42c2a061f1d924a5b3564ec7edc8e18cb7'),
|
|
94
64
|
}
|
|
95
65
|
};
|
|
96
66
|
|
|
97
67
|
export const ProtocolContractInitializationHash: Record<ProtocolContractName, Fr> = {
|
|
98
|
-
|
|
99
|
-
ContractInstanceRegistry: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
68
|
+
ContractInstanceRegistry: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
100
69
|
ContractClassRegistry: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
101
|
-
|
|
102
|
-
FeeJuice: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
103
|
-
PublicChecks: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000')
|
|
70
|
+
FeeJuice: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000')
|
|
104
71
|
};
|
|
105
72
|
|
|
106
73
|
export const ProtocolContractPrivateFunctions: Record<ProtocolContractName, { selector: FunctionSelector; vkHash: Fr }[]> = {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
MultiCallEntrypoint: [{ selector: FunctionSelector.fromField(Fr.fromString('0x00000000000000000000000000000000000000000000000000000000f04908a9')), vkHash: Fr.fromString('0x1398215a358d1eec24a10077e4d2e475c8365caa0a8387047a2b4b016f722ce5') }],
|
|
111
|
-
FeeJuice: [{ selector: FunctionSelector.fromField(Fr.fromString('0x00000000000000000000000000000000000000000000000000000000cbe67243')), vkHash: Fr.fromString('0x17e91baeafb796e89f0b7b1b2720ebe843b724eae97c9ad3f90b5000216add6b') }, { selector: FunctionSelector.fromField(Fr.fromString('0x00000000000000000000000000000000000000000000000000000000e8d374b6')), vkHash: Fr.fromString('0x2ff2e18b1b07059559d416226309f1bc1dc8fb2745d8a7d46c4ebc3c8b91d13e') }],
|
|
112
|
-
PublicChecks: []
|
|
74
|
+
ContractInstanceRegistry: [{ selector: FunctionSelector.fromField(Fr.fromString('0x0000000000000000000000000000000000000000000000000000000077cff62f')), vkHash: Fr.fromString('0x08a57d0b4d164c6c8d92da9c3bfe57a4ac1a639ab0a2a0ccb60bbb6bcd37f245') }],
|
|
75
|
+
ContractClassRegistry: [{ selector: FunctionSelector.fromField(Fr.fromString('0x000000000000000000000000000000000000000000000000000000006934ed0d')), vkHash: Fr.fromString('0x1531ed0e20d6d05f1aeb06f746c8c4b8f467174836d6edf915b0c45099b393ed') }],
|
|
76
|
+
FeeJuice: [{ selector: FunctionSelector.fromField(Fr.fromString('0x00000000000000000000000000000000000000000000000000000000cbe67243')), vkHash: Fr.fromString('0x2dbad42bf59fe7ea908485dea59573b4d7fb8ddefb6a0f73bbcce79aa27d545c') }, { selector: FunctionSelector.fromField(Fr.fromString('0x00000000000000000000000000000000000000000000000000000000e8d374b6')), vkHash: Fr.fromString('0x2e9880e15fb0c9a5494faef915861144769e94aded54c737819ee75918fbda51') }]
|
|
113
77
|
};
|
|
114
78
|
|
|
115
79
|
|
|
116
80
|
|
|
117
81
|
export const ProtocolContractsList = new ProtocolContracts([
|
|
118
|
-
AztecAddress.fromString('
|
|
119
|
-
AztecAddress.fromString('
|
|
120
|
-
AztecAddress.fromString('
|
|
121
|
-
AztecAddress.fromString('
|
|
122
|
-
AztecAddress.fromString('
|
|
123
|
-
AztecAddress.fromString('
|
|
82
|
+
AztecAddress.fromString('0x20b16259faa0a096d687572fc76221263f1cad4a4b726ef49e2cd7b7ce7c7465'),
|
|
83
|
+
AztecAddress.fromString('0x290f7bf7cea0eb4c440a06dc8bcf825865479348c9ebf8f540b10ad10fd32c44'),
|
|
84
|
+
AztecAddress.fromString('0x0fa3ba3e01e6646cd2adade41018dbfff04e59c444760e33bf773ec43d683019'),
|
|
85
|
+
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
86
|
+
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
87
|
+
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
124
88
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
125
89
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
126
90
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
@@ -128,7 +92,7 @@ AztecAddress.fromString('0x00000000000000000000000000000000000000000000000000000
|
|
|
128
92
|
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000')
|
|
129
93
|
]);
|
|
130
94
|
|
|
131
|
-
export const protocolContractsHash = Fr.fromString('
|
|
95
|
+
export const protocolContractsHash = Fr.fromString('0x04194c6dd98d175d07d300b253a9967f5c46782d0e9c3c88473f79ca8b8b16d6');
|
|
132
96
|
|
|
133
97
|
|
|
134
98
|
|
package/src/provider/bundle.ts
CHANGED
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
2
2
|
|
|
3
|
-
import { AuthRegistryArtifact } from '../auth-registry/index.js';
|
|
4
3
|
import { ContractClassRegistryArtifact } from '../class-registry/index.js';
|
|
5
4
|
import { FeeJuiceArtifact } from '../fee-juice/index.js';
|
|
6
5
|
import { ContractInstanceRegistryArtifact } from '../instance-registry/index.js';
|
|
7
6
|
import { makeProtocolContract } from '../make_protocol_contract.js';
|
|
8
|
-
import { MultiCallEntrypointArtifact } from '../multi-call-entrypoint/index.js';
|
|
9
7
|
import type { ProtocolContract } from '../protocol_contract.js';
|
|
10
8
|
import type { ProtocolContractName } from '../protocol_contract_data.js';
|
|
11
|
-
import { PublicChecksArtifact } from '../public-checks/index.js';
|
|
12
9
|
import type { ProtocolContractsProvider } from './protocol_contracts_provider.js';
|
|
13
10
|
|
|
14
11
|
export const ProtocolContractArtifact: Record<ProtocolContractName, ContractArtifact> = {
|
|
15
|
-
AuthRegistry: AuthRegistryArtifact,
|
|
16
12
|
ContractInstanceRegistry: ContractInstanceRegistryArtifact,
|
|
17
13
|
ContractClassRegistry: ContractClassRegistryArtifact,
|
|
18
|
-
MultiCallEntrypoint: MultiCallEntrypointArtifact,
|
|
19
14
|
FeeJuice: FeeJuiceArtifact,
|
|
20
|
-
PublicChecks: PublicChecksArtifact,
|
|
21
15
|
};
|
|
22
16
|
|
|
23
17
|
export class BundledProtocolContractsProvider implements ProtocolContractsProvider {
|
package/src/provider/lazy.ts
CHANGED
|
@@ -1,28 +1,19 @@
|
|
|
1
|
-
import { getCanonicalAuthRegistry } from '../auth-registry/lazy.js';
|
|
2
1
|
import { getCanonicalClassRegistry } from '../class-registry/lazy.js';
|
|
3
2
|
import { getCanonicalFeeJuice } from '../fee-juice/lazy.js';
|
|
4
3
|
import { getCanonicalInstanceRegistry } from '../instance-registry/lazy.js';
|
|
5
|
-
import { getCanonicalMultiCallEntrypoint } from '../multi-call-entrypoint/lazy.js';
|
|
6
4
|
import type { ProtocolContract } from '../protocol_contract.js';
|
|
7
5
|
import type { ProtocolContractName } from '../protocol_contract_data.js';
|
|
8
|
-
import { getCanonicalPublicChecks } from '../public-checks/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 'AuthRegistry':
|
|
15
|
-
return getCanonicalAuthRegistry();
|
|
16
11
|
case 'ContractInstanceRegistry':
|
|
17
12
|
return getCanonicalInstanceRegistry();
|
|
18
13
|
case 'ContractClassRegistry':
|
|
19
14
|
return getCanonicalClassRegistry();
|
|
20
|
-
case 'MultiCallEntrypoint':
|
|
21
|
-
return getCanonicalMultiCallEntrypoint();
|
|
22
15
|
case 'FeeJuice':
|
|
23
16
|
return getCanonicalFeeJuice();
|
|
24
|
-
case 'PublicChecks':
|
|
25
|
-
return getCanonicalPublicChecks();
|
|
26
17
|
default:
|
|
27
18
|
throw new Error(`Unknown protocol contract name: ${name}`);
|
|
28
19
|
}
|