@aztec/standard-contracts 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/artifacts/AuthRegistry.d.json.ts +5 -0
- package/artifacts/AuthRegistry.json +7850 -0
- package/artifacts/HandshakeRegistry.d.json.ts +5 -0
- package/artifacts/HandshakeRegistry.json +10071 -0
- package/artifacts/MultiCallEntrypoint.d.json.ts +5 -0
- package/artifacts/MultiCallEntrypoint.json +6002 -0
- package/artifacts/PublicChecks.d.json.ts +5 -0
- package/artifacts/PublicChecks.json +4302 -0
- package/dest/auth-registry/constants.d.ts +4 -0
- package/dest/auth-registry/constants.d.ts.map +1 -0
- package/dest/auth-registry/constants.js +7 -0
- package/dest/auth-registry/index.d.ts +6 -0
- package/dest/auth-registry/index.d.ts.map +1 -0
- package/dest/auth-registry/index.js +14 -0
- package/dest/auth-registry/lazy.d.ts +7 -0
- package/dest/auth-registry/lazy.d.ts.map +1 -0
- package/dest/auth-registry/lazy.js +24 -0
- package/dest/contract_data.d.ts +63 -0
- package/dest/contract_data.d.ts.map +1 -0
- package/dest/contract_data.js +106 -0
- package/dest/drift.d.ts +54 -0
- package/dest/drift.d.ts.map +1 -0
- package/dest/drift.js +167 -0
- package/dest/handshake-registry/constants.d.ts +4 -0
- package/dest/handshake-registry/constants.d.ts.map +1 -0
- package/dest/handshake-registry/constants.js +7 -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 +5 -0
- package/dest/index.d.ts.map +1 -0
- package/dest/index.js +4 -0
- package/dest/make_standard_contract.d.ts +9 -0
- package/dest/make_standard_contract.d.ts.map +1 -0
- package/dest/make_standard_contract.js +40 -0
- package/dest/multi-call-entrypoint/constants.d.ts +4 -0
- package/dest/multi-call-entrypoint/constants.d.ts.map +1 -0
- package/dest/multi-call-entrypoint/constants.js +7 -0
- package/dest/multi-call-entrypoint/index.d.ts +6 -0
- package/dest/multi-call-entrypoint/index.d.ts.map +1 -0
- package/dest/multi-call-entrypoint/index.js +14 -0
- package/dest/multi-call-entrypoint/lazy.d.ts +7 -0
- package/dest/multi-call-entrypoint/lazy.d.ts.map +1 -0
- package/dest/multi-call-entrypoint/lazy.js +24 -0
- package/dest/public-checks/constants.d.ts +4 -0
- package/dest/public-checks/constants.d.ts.map +1 -0
- package/dest/public-checks/constants.js +7 -0
- package/dest/public-checks/index.d.ts +6 -0
- package/dest/public-checks/index.d.ts.map +1 -0
- package/dest/public-checks/index.js +14 -0
- package/dest/public-checks/lazy.d.ts +7 -0
- package/dest/public-checks/lazy.d.ts.map +1 -0
- package/dest/public-checks/lazy.js +24 -0
- package/dest/scripts/cleanup_artifacts.js +16 -0
- package/dest/scripts/generate_data.js +136 -0
- package/dest/standard_contract.d.ts +15 -0
- package/dest/standard_contract.d.ts.map +1 -0
- package/dest/standard_contract.js +1 -0
- package/dest/standard_contract_data.d.ts +19 -0
- package/dest/standard_contract_data.d.ts.map +1 -0
- package/dest/standard_contract_data.js +81 -0
- package/package.json +103 -0
- package/src/auth-registry/constants.ts +8 -0
- package/src/auth-registry/index.ts +24 -0
- package/src/auth-registry/lazy.ts +35 -0
- package/src/contract_data.ts +129 -0
- package/src/drift.ts +201 -0
- package/src/handshake-registry/constants.ts +8 -0
- package/src/handshake-registry/index.ts +24 -0
- package/src/handshake-registry/lazy.ts +35 -0
- package/src/index.ts +4 -0
- package/src/make_standard_contract.ts +51 -0
- package/src/multi-call-entrypoint/constants.ts +8 -0
- package/src/multi-call-entrypoint/index.ts +24 -0
- package/src/multi-call-entrypoint/lazy.ts +35 -0
- package/src/public-checks/constants.ts +8 -0
- package/src/public-checks/index.ts +24 -0
- package/src/public-checks/lazy.ts +35 -0
- package/src/standard_contract.ts +15 -0
- package/src/standard_contract_data.ts +104 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
2
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
|
+
import type { ContractClassIdPreimage, ContractClassWithId, ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
4
|
+
|
|
5
|
+
/** A non-protocol contract deployed at a canonical artifact-derived address. */
|
|
6
|
+
export interface StandardContract {
|
|
7
|
+
/** Canonical deployed instance. */
|
|
8
|
+
instance: ContractInstanceWithAddress;
|
|
9
|
+
/** Contract class of this contract. */
|
|
10
|
+
contractClass: ContractClassWithId & ContractClassIdPreimage;
|
|
11
|
+
/** Complete contract artifact. */
|
|
12
|
+
artifact: ContractArtifact;
|
|
13
|
+
/** Deployment address for the canonical instance. */
|
|
14
|
+
address: AztecAddress;
|
|
15
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// GENERATED FILE - DO NOT EDIT. RUN `yarn generate` or `yarn generate:data`
|
|
2
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
3
|
+
import { FunctionSelector } from '@aztec/stdlib/abi';
|
|
4
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
+
|
|
6
|
+
export const standardContractNames = [
|
|
7
|
+
'AuthRegistry',
|
|
8
|
+
'MultiCallEntrypoint',
|
|
9
|
+
'PublicChecks',
|
|
10
|
+
'HandshakeRegistry',
|
|
11
|
+
] as const;
|
|
12
|
+
|
|
13
|
+
export type StandardContractName = (typeof standardContractNames)[number];
|
|
14
|
+
|
|
15
|
+
export const StandardContractSalt: Record<StandardContractName, Fr> = {
|
|
16
|
+
AuthRegistry: new Fr(1),
|
|
17
|
+
MultiCallEntrypoint: new Fr(1),
|
|
18
|
+
PublicChecks: new Fr(1),
|
|
19
|
+
HandshakeRegistry: new Fr(1),
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export const StandardContractAddress: Record<StandardContractName, AztecAddress> = {
|
|
23
|
+
AuthRegistry: AztecAddress.fromString('0x2e1c8ae9471649da39ea42c4abb17ecb7028ae1e5e23bd35fd4251a69658a2e1'),
|
|
24
|
+
MultiCallEntrypoint: AztecAddress.fromString('0x0e169f6f6864aadf1eeafdef9af209f951f997f0b5187af191af7b271334aa20'),
|
|
25
|
+
PublicChecks: AztecAddress.fromString('0x106479f2993a73b878821b4cd0098c9bd48164b32e9b567df009732dabaa65e2'),
|
|
26
|
+
HandshakeRegistry: AztecAddress.fromString('0x04ee9dc0b25d393c804ab6a6fc34223f3ca914a9a9043bdc6cd877efc9067383'),
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const StandardContractClassId: Record<StandardContractName, Fr> = {
|
|
30
|
+
AuthRegistry: Fr.fromString('0x09f06345b8e37c037d622f668d380018d2e013d04a31cbebaa9e7c23f7cc7a7d'),
|
|
31
|
+
MultiCallEntrypoint: Fr.fromString('0x239cdcd8464627acdf64f352b0a71b4b3cb2c27e8582ff4f273faff87a33ba65'),
|
|
32
|
+
PublicChecks: Fr.fromString('0x24ce4becc7cb6bf880726dc4358b09ada12fb0f7015c32b971822033fc5844f2'),
|
|
33
|
+
HandshakeRegistry: Fr.fromString('0x2453d20a9e6e312567b7c088c669ae376b13773971dd055af99251c86bcc59f3'),
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const StandardContractClassIdPreimage: Record<
|
|
37
|
+
StandardContractName,
|
|
38
|
+
{ artifactHash: Fr; privateFunctionsRoot: Fr; publicBytecodeCommitment: Fr }
|
|
39
|
+
> = {
|
|
40
|
+
AuthRegistry: {
|
|
41
|
+
artifactHash: Fr.fromString('0x294cf57741ec175652921fd6fbd5ac8bcfe592ad761a5711b66a23b60ba8fbc0'),
|
|
42
|
+
privateFunctionsRoot: Fr.fromString('0x17b584350f4c3ccafd8f688729afb9feab8976114fb40012e9dee65022c072a4'),
|
|
43
|
+
publicBytecodeCommitment: Fr.fromString('0x2545f39893766508ce37bb5cea5e4dcab04c6f7f79f3089b1c076876e9d268b2'),
|
|
44
|
+
},
|
|
45
|
+
MultiCallEntrypoint: {
|
|
46
|
+
artifactHash: Fr.fromString('0x16a1c11f78386c8e1ff3d413e05e068a81f88b2659b66b909f7215226553fa60'),
|
|
47
|
+
privateFunctionsRoot: Fr.fromString('0x0e68dfbb256e80b08b3aef47aca1f2669e97a9c6259787893c1223ac083ad5d5'),
|
|
48
|
+
publicBytecodeCommitment: Fr.fromString('0x0ce4c618c3ed7f3a20410e618c06bb701e150af7fe28a3e92f68e7733809f33e'),
|
|
49
|
+
},
|
|
50
|
+
PublicChecks: {
|
|
51
|
+
artifactHash: Fr.fromString('0x12c44e639e8a6c994c94c913eaf37c7809b1d97ea30d2c527474b09d4367c87d'),
|
|
52
|
+
privateFunctionsRoot: Fr.fromString('0x202860adb1b8975971eeaf571aaaa88a27f4035290d58532ae7d60b0dfaad54c'),
|
|
53
|
+
publicBytecodeCommitment: Fr.fromString('0x013c4f854a5c87c9daf86c5f9bc07a42c2a061f1d924a5b3564ec7edc8e18cb7'),
|
|
54
|
+
},
|
|
55
|
+
HandshakeRegistry: {
|
|
56
|
+
artifactHash: Fr.fromString('0x16dc423d685d565f0713936fa5acec94daefe82d92c4306354c4eec35ae8aca6'),
|
|
57
|
+
privateFunctionsRoot: Fr.fromString('0x22071f2bef1999fe9698359ef95acfeb9cd7c473d04207ed160715c81292c6b3'),
|
|
58
|
+
publicBytecodeCommitment: Fr.fromString('0x0ce4c618c3ed7f3a20410e618c06bb701e150af7fe28a3e92f68e7733809f33e'),
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const StandardContractInitializationHash: Record<StandardContractName, Fr> = {
|
|
63
|
+
AuthRegistry: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
64
|
+
MultiCallEntrypoint: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
65
|
+
PublicChecks: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
66
|
+
HandshakeRegistry: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const StandardContractPrivateFunctions: Record<
|
|
70
|
+
StandardContractName,
|
|
71
|
+
{ selector: FunctionSelector; vkHash: Fr }[]
|
|
72
|
+
> = {
|
|
73
|
+
AuthRegistry: [
|
|
74
|
+
{
|
|
75
|
+
selector: FunctionSelector.fromField(
|
|
76
|
+
Fr.fromString('0x0000000000000000000000000000000000000000000000000000000079a3d418'),
|
|
77
|
+
),
|
|
78
|
+
vkHash: Fr.fromString('0x06a5c1b3a636c954a90be43cb56a4bdd9dc8aec764151a012e0018753694ff54'),
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
MultiCallEntrypoint: [
|
|
82
|
+
{
|
|
83
|
+
selector: FunctionSelector.fromField(
|
|
84
|
+
Fr.fromString('0x00000000000000000000000000000000000000000000000000000000f04908a9'),
|
|
85
|
+
),
|
|
86
|
+
vkHash: Fr.fromString('0x0b19b2f937f2581922c2ead5411ad9ff4ed9710efe9849bde494d9a0f94812ec'),
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
PublicChecks: [],
|
|
90
|
+
HandshakeRegistry: [
|
|
91
|
+
{
|
|
92
|
+
selector: FunctionSelector.fromField(
|
|
93
|
+
Fr.fromString('0x000000000000000000000000000000000000000000000000000000005d4db100'),
|
|
94
|
+
),
|
|
95
|
+
vkHash: Fr.fromString('0x035db3173b6dc6305d989fe910690cc0a556bf30261c6b4235144403e5378635'),
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
selector: FunctionSelector.fromField(
|
|
99
|
+
Fr.fromString('0x000000000000000000000000000000000000000000000000000000005fa93894'),
|
|
100
|
+
),
|
|
101
|
+
vkHash: Fr.fromString('0x0ed3c8564b7f78e1dd558a0e38719c7056b27ae7f48aed795ffa2d6d84bae85d'),
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
};
|