@aztec/protocol-contracts 4.0.0-rc.1 → 4.0.0-rc.10
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 +23 -23
- package/artifacts/ContractClassRegistry.json +13 -13
- package/artifacts/ContractInstanceRegistry.json +26 -26
- package/artifacts/FeeJuice.json +25 -25
- package/artifacts/MultiCallEntrypoint.json +53 -53
- package/artifacts/PublicChecks.json +53 -53
- package/dest/auth-registry/index.d.ts +1 -1
- package/dest/auth-registry/index.d.ts.map +1 -1
- package/dest/auth-registry/index.js +3 -3
- package/dest/auth-registry/lazy.js +1 -1
- package/dest/class-registry/index.d.ts +1 -1
- package/dest/class-registry/index.d.ts.map +1 -1
- package/dest/class-registry/index.js +3 -3
- package/dest/class-registry/lazy.js +1 -1
- package/dest/fee-juice/index.d.ts +1 -1
- package/dest/fee-juice/index.d.ts.map +1 -1
- package/dest/fee-juice/index.js +3 -3
- package/dest/fee-juice/lazy.js +1 -1
- package/dest/instance-registry/index.d.ts +1 -1
- package/dest/instance-registry/index.d.ts.map +1 -1
- package/dest/instance-registry/index.js +3 -3
- package/dest/instance-registry/lazy.js +1 -1
- package/dest/make_protocol_contract.d.ts +4 -4
- package/dest/make_protocol_contract.d.ts.map +1 -1
- package/dest/make_protocol_contract.js +27 -14
- package/dest/multi-call-entrypoint/index.d.ts +1 -1
- package/dest/multi-call-entrypoint/index.d.ts.map +1 -1
- package/dest/multi-call-entrypoint/index.js +3 -3
- package/dest/multi-call-entrypoint/lazy.js +1 -1
- package/dest/protocol_contract_data.d.ts +13 -1
- package/dest/protocol_contract_data.d.ts.map +1 -1
- package/dest/protocol_contract_data.js +86 -0
- package/dest/provider/bundle.js +1 -1
- package/dest/public-checks/index.d.ts +1 -1
- package/dest/public-checks/index.d.ts.map +1 -1
- package/dest/public-checks/index.js +3 -3
- package/dest/public-checks/lazy.js +1 -1
- package/dest/scripts/generate_data.js +66 -15
- package/package.json +4 -4
- package/src/auth-registry/index.ts +3 -3
- package/src/auth-registry/lazy.ts +1 -1
- package/src/class-registry/index.ts +3 -3
- package/src/class-registry/lazy.ts +1 -1
- package/src/fee-juice/index.ts +3 -3
- package/src/fee-juice/lazy.ts +1 -1
- package/src/instance-registry/index.ts +3 -3
- package/src/instance-registry/lazy.ts +1 -1
- package/src/make_protocol_contract.ts +37 -15
- package/src/multi-call-entrypoint/index.ts +3 -3
- package/src/multi-call-entrypoint/lazy.ts +1 -1
- package/src/protocol_contract_data.ts +63 -0
- package/src/provider/bundle.ts +1 -1
- package/src/public-checks/index.ts +3 -3
- package/src/public-checks/lazy.ts +1 -1
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": "4.0.0-rc.
|
|
5
|
+
"version": "4.0.0-rc.10",
|
|
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": "4.0.0-rc.
|
|
77
|
-
"@aztec/foundation": "4.0.0-rc.
|
|
78
|
-
"@aztec/stdlib": "4.0.0-rc.
|
|
76
|
+
"@aztec/constants": "4.0.0-rc.10",
|
|
77
|
+
"@aztec/foundation": "4.0.0-rc.10",
|
|
78
|
+
"@aztec/stdlib": "4.0.0-rc.10",
|
|
79
79
|
"lodash.chunk": "^4.2.0",
|
|
80
80
|
"lodash.omit": "^4.5.0",
|
|
81
81
|
"tslib": "^2.4.0"
|
|
@@ -10,9 +10,9 @@ let protocolContract: ProtocolContract;
|
|
|
10
10
|
export const AuthRegistryArtifact: ContractArtifact = loadContractArtifact(AuthRegistryJson as NoirCompiledContract);
|
|
11
11
|
|
|
12
12
|
/** Returns the canonical deployment of the auth registry. */
|
|
13
|
-
export
|
|
13
|
+
export function getCanonicalAuthRegistry(): Promise<ProtocolContract> {
|
|
14
14
|
if (!protocolContract) {
|
|
15
|
-
protocolContract =
|
|
15
|
+
protocolContract = makeProtocolContract('AuthRegistry', AuthRegistryArtifact);
|
|
16
16
|
}
|
|
17
|
-
return protocolContract;
|
|
17
|
+
return Promise.resolve(protocolContract);
|
|
18
18
|
}
|
|
@@ -23,7 +23,7 @@ export async function getAuthRegistryArtifact(): Promise<ContractArtifact> {
|
|
|
23
23
|
export async function getCanonicalAuthRegistry(): Promise<ProtocolContract> {
|
|
24
24
|
if (!protocolContract) {
|
|
25
25
|
const authRegistryArtifact = await getAuthRegistryArtifact();
|
|
26
|
-
protocolContract =
|
|
26
|
+
protocolContract = makeProtocolContract('AuthRegistry', authRegistryArtifact);
|
|
27
27
|
}
|
|
28
28
|
return protocolContract;
|
|
29
29
|
}
|
|
@@ -14,10 +14,10 @@ export const ContractClassRegistryArtifact = loadContractArtifact(ContractClassR
|
|
|
14
14
|
let protocolContract: ProtocolContract;
|
|
15
15
|
|
|
16
16
|
/** Returns the canonical deployment of the contract. */
|
|
17
|
-
export
|
|
17
|
+
export function getCanonicalClassRegistry(): Promise<ProtocolContract> {
|
|
18
18
|
if (!protocolContract) {
|
|
19
19
|
const artifact = ContractClassRegistryArtifact;
|
|
20
|
-
protocolContract =
|
|
20
|
+
protocolContract = makeProtocolContract('ContractClassRegistry', artifact);
|
|
21
21
|
}
|
|
22
|
-
return protocolContract;
|
|
22
|
+
return Promise.resolve(protocolContract);
|
|
23
23
|
}
|
|
@@ -27,7 +27,7 @@ export async function getContractClassRegistryArtifact(): Promise<ContractArtifa
|
|
|
27
27
|
export async function getCanonicalClassRegistry(): Promise<ProtocolContract> {
|
|
28
28
|
if (!protocolContract) {
|
|
29
29
|
const contractClassRegistryArtifact = await getContractClassRegistryArtifact();
|
|
30
|
-
protocolContract =
|
|
30
|
+
protocolContract = makeProtocolContract('ContractClassRegistry', contractClassRegistryArtifact);
|
|
31
31
|
}
|
|
32
32
|
return protocolContract;
|
|
33
33
|
}
|
package/src/fee-juice/index.ts
CHANGED
|
@@ -14,11 +14,11 @@ export const FeeJuiceArtifact = loadContractArtifact(FeeJuiceJson as NoirCompile
|
|
|
14
14
|
let protocolContract: ProtocolContract;
|
|
15
15
|
|
|
16
16
|
/** Returns the canonical deployment of the contract. */
|
|
17
|
-
export
|
|
17
|
+
export function getCanonicalFeeJuice(): Promise<ProtocolContract> {
|
|
18
18
|
if (!protocolContract) {
|
|
19
|
-
protocolContract =
|
|
19
|
+
protocolContract = makeProtocolContract('FeeJuice', FeeJuiceArtifact);
|
|
20
20
|
}
|
|
21
|
-
return protocolContract;
|
|
21
|
+
return Promise.resolve(protocolContract);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
/**
|
package/src/fee-juice/lazy.ts
CHANGED
|
@@ -23,7 +23,7 @@ export async function getFeeJuiceArtifact(): Promise<ContractArtifact> {
|
|
|
23
23
|
export async function getCanonicalFeeJuice(): Promise<ProtocolContract> {
|
|
24
24
|
if (!protocolContract) {
|
|
25
25
|
const feeJuiceArtifact = await getFeeJuiceArtifact();
|
|
26
|
-
protocolContract =
|
|
26
|
+
protocolContract = makeProtocolContract('FeeJuice', feeJuiceArtifact);
|
|
27
27
|
}
|
|
28
28
|
return protocolContract;
|
|
29
29
|
}
|
|
@@ -15,9 +15,9 @@ export const ContractInstanceRegistryArtifact = loadContractArtifact(
|
|
|
15
15
|
let protocolContract: ProtocolContract;
|
|
16
16
|
|
|
17
17
|
/** Returns the canonical deployment of the contract. */
|
|
18
|
-
export
|
|
18
|
+
export function getCanonicalInstanceRegistry(): Promise<ProtocolContract> {
|
|
19
19
|
if (!protocolContract) {
|
|
20
|
-
protocolContract =
|
|
20
|
+
protocolContract = makeProtocolContract('ContractInstanceRegistry', ContractInstanceRegistryArtifact);
|
|
21
21
|
}
|
|
22
|
-
return protocolContract;
|
|
22
|
+
return Promise.resolve(protocolContract);
|
|
23
23
|
}
|
|
@@ -26,7 +26,7 @@ export async function getContractInstanceRegistryArtifact(): Promise<ContractArt
|
|
|
26
26
|
export async function getCanonicalInstanceRegistry(): Promise<ProtocolContract> {
|
|
27
27
|
if (!protocolContract) {
|
|
28
28
|
const contractInstanceRegistryArtifact = await getContractInstanceRegistryArtifact();
|
|
29
|
-
protocolContract =
|
|
29
|
+
protocolContract = makeProtocolContract('ContractInstanceRegistry', contractInstanceRegistryArtifact);
|
|
30
30
|
}
|
|
31
31
|
return protocolContract;
|
|
32
32
|
}
|
|
@@ -1,26 +1,48 @@
|
|
|
1
1
|
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
2
|
-
import {
|
|
2
|
+
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
3
3
|
|
|
4
4
|
import type { ProtocolContract } from './protocol_contract.js';
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
ProtocolContractAddress,
|
|
7
|
+
ProtocolContractClassId,
|
|
8
|
+
ProtocolContractClassIdPreimage,
|
|
9
|
+
ProtocolContractInitializationHash,
|
|
10
|
+
type ProtocolContractName,
|
|
11
|
+
ProtocolContractPrivateFunctions,
|
|
12
|
+
ProtocolContractSalt,
|
|
13
|
+
} from './protocol_contract_data.js';
|
|
6
14
|
|
|
7
15
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
16
|
+
* Reconstructs a ProtocolContract from precomputed data without performing any hash computations.
|
|
17
|
+
* Internal to the protocol-contracts package — not part of the public API.
|
|
10
18
|
*/
|
|
11
|
-
export
|
|
12
|
-
name: ProtocolContractName,
|
|
13
|
-
artifact: ContractArtifact,
|
|
14
|
-
): Promise<ProtocolContract> {
|
|
19
|
+
export function makeProtocolContract(name: ProtocolContractName, artifact: ContractArtifact): ProtocolContract {
|
|
15
20
|
const address = ProtocolContractAddress[name];
|
|
16
21
|
const salt = ProtocolContractSalt[name];
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const classId = ProtocolContractClassId[name];
|
|
23
|
+
const { artifactHash, privateFunctionsRoot, publicBytecodeCommitment } = ProtocolContractClassIdPreimage[name];
|
|
24
|
+
const initializationHash = ProtocolContractInitializationHash[name];
|
|
25
|
+
|
|
26
|
+
const contractClass = {
|
|
27
|
+
id: classId,
|
|
28
|
+
version: 1 as const,
|
|
29
|
+
artifactHash,
|
|
30
|
+
privateFunctionsRoot,
|
|
31
|
+
publicBytecodeCommitment,
|
|
32
|
+
packedBytecode: artifact.functions.find(f => f.name === 'public_dispatch')?.bytecode ?? Buffer.alloc(0),
|
|
33
|
+
privateFunctions: ProtocolContractPrivateFunctions[name],
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const instance = {
|
|
37
|
+
version: 1 as const,
|
|
38
|
+
currentContractClassId: classId,
|
|
39
|
+
originalContractClassId: classId,
|
|
40
|
+
initializationHash,
|
|
41
|
+
publicKeys: PublicKeys.default(),
|
|
42
|
+
salt,
|
|
43
|
+
deployer: address,
|
|
24
44
|
address,
|
|
25
45
|
};
|
|
46
|
+
|
|
47
|
+
return { instance, contractClass, artifact, address };
|
|
26
48
|
}
|
|
@@ -10,9 +10,9 @@ export const MultiCallEntrypointArtifact = loadContractArtifact(MultiCallEntrypo
|
|
|
10
10
|
let protocolContract: ProtocolContract;
|
|
11
11
|
|
|
12
12
|
/** Returns the canonical deployment of the contract. */
|
|
13
|
-
export
|
|
13
|
+
export function getCanonicalMultiCallEntrypoint(): Promise<ProtocolContract> {
|
|
14
14
|
if (!protocolContract) {
|
|
15
|
-
protocolContract =
|
|
15
|
+
protocolContract = makeProtocolContract('MultiCallEntrypoint', MultiCallEntrypointArtifact);
|
|
16
16
|
}
|
|
17
|
-
return protocolContract;
|
|
17
|
+
return Promise.resolve(protocolContract);
|
|
18
18
|
}
|
|
@@ -23,7 +23,7 @@ export async function getMultiCallEntrypointArtifact(): Promise<ContractArtifact
|
|
|
23
23
|
export async function getCanonicalMultiCallEntrypoint(): Promise<ProtocolContract> {
|
|
24
24
|
if (!protocolContract) {
|
|
25
25
|
const multiCallEntrypointArtifact = await getMultiCallEntrypointArtifact();
|
|
26
|
-
protocolContract =
|
|
26
|
+
protocolContract = makeProtocolContract('MultiCallEntrypoint', multiCallEntrypointArtifact);
|
|
27
27
|
}
|
|
28
28
|
return protocolContract;
|
|
29
29
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
// GENERATED FILE - DO NOT EDIT. RUN `yarn generate` or `yarn generate:data`
|
|
3
3
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
|
+
import { FunctionSelector } from '@aztec/stdlib/abi';
|
|
4
5
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
6
|
import { ProtocolContracts } from '@aztec/stdlib/tx';
|
|
6
7
|
|
|
@@ -51,6 +52,68 @@ PublicChecks: AztecAddress.fromString('0x1198142fd84a58c0ab22d5fde371ce527042db4
|
|
|
51
52
|
|
|
52
53
|
|
|
53
54
|
|
|
55
|
+
export const ProtocolContractClassId: Record<ProtocolContractName, Fr> = {
|
|
56
|
+
AuthRegistry: Fr.fromString('0x17ad10e1b5dba2877b9a973449c03d5227f2c719c0eb1989427c10c1d83867a5'),
|
|
57
|
+
ContractInstanceRegistry: Fr.fromString('0x187c710b0d69b2da7a6f0663c15093a5d595c04e77762c249aa9b654bc12158c'),
|
|
58
|
+
ContractClassRegistry: Fr.fromString('0x013466b8a65dea98ad80c119cf236a0acf53acfede687769410cfd57876b8242'),
|
|
59
|
+
MultiCallEntrypoint: Fr.fromString('0x1acd7ab8bf186c16eafc9c4fe9049f35df27e172bb2d8319a2a22ddd0006966d'),
|
|
60
|
+
FeeJuice: Fr.fromString('0x16b2d5ef5044c11126a16ccdb3778082eb423375977da9458d493fdf84505e81'),
|
|
61
|
+
PublicChecks: Fr.fromString('0x03f2ebaef8d692422185e35d8fe35d0bb7289702cf023b525c022d77fc6b5ed5')
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const ProtocolContractClassIdPreimage: Record<ProtocolContractName, { artifactHash: Fr; privateFunctionsRoot: Fr; publicBytecodeCommitment: Fr }> = {
|
|
65
|
+
AuthRegistry: {
|
|
66
|
+
artifactHash: Fr.fromString('0x029f3b5582e9e2f9cddb4f887fa67c06d8dbe9aef604aa7de91a6f5328bf477c'),
|
|
67
|
+
privateFunctionsRoot: Fr.fromString('0x0826df9bf86cf460935b2bd024edcb5a58532fcf0392abbdb33f5f2150753756'),
|
|
68
|
+
publicBytecodeCommitment: Fr.fromString('0x22db1f0a70bfefaf90371c7728e558cf60507b718e99ed276ed3143bec615f6f'),
|
|
69
|
+
},
|
|
70
|
+
ContractInstanceRegistry: {
|
|
71
|
+
artifactHash: Fr.fromString('0x18601566bacdca7a5a40528f221b04ee7b74f382e6cd34fbdf69d31c50d5ee88'),
|
|
72
|
+
privateFunctionsRoot: Fr.fromString('0x136a6705c7ad1d47f65cb881a56909d4c78d3fa8944f5b103734cd91e654ed63'),
|
|
73
|
+
publicBytecodeCommitment: Fr.fromString('0x01c573f470ba9a17d362c7dd5a28931c39432f9ce527555049c71432f895ad6c'),
|
|
74
|
+
},
|
|
75
|
+
ContractClassRegistry: {
|
|
76
|
+
artifactHash: Fr.fromString('0x232d868db8a4d1e0f013efa4bfe5c39d96e11f16a62e3e73abbbafc3028fc410'),
|
|
77
|
+
privateFunctionsRoot: Fr.fromString('0x2ac3bf890a7d534a768079aa86889caa1a86373c8e6fc2db48215b11bbb79106'),
|
|
78
|
+
publicBytecodeCommitment: Fr.fromString('0x0ce4c618c3ed7f3a20410e618c06bb701e150af7fe28a3e92f68e7733809f33e'),
|
|
79
|
+
},
|
|
80
|
+
MultiCallEntrypoint: {
|
|
81
|
+
artifactHash: Fr.fromString('0x0d30526b6b786cf887d7e44ba59d2e9561d5791b0e3c78c681d0499ae45b225a'),
|
|
82
|
+
privateFunctionsRoot: Fr.fromString('0x266505ecb7c02ce6e227227c0b6bdb44713c8ecd43164ee7bb00b8fb340e8b03'),
|
|
83
|
+
publicBytecodeCommitment: Fr.fromString('0x0ce4c618c3ed7f3a20410e618c06bb701e150af7fe28a3e92f68e7733809f33e'),
|
|
84
|
+
},
|
|
85
|
+
FeeJuice: {
|
|
86
|
+
artifactHash: Fr.fromString('0x2eb476f12cce5207be118047fb7f603378b78aa619d6539a4d9eec4700ea2507'),
|
|
87
|
+
privateFunctionsRoot: Fr.fromString('0x0abef3cfc6ae314886c841b42dc33d3eed255ad3dee7773daabf05b229573759'),
|
|
88
|
+
publicBytecodeCommitment: Fr.fromString('0x2a144b28b36efa21b7488467aba7e06b33e016d00bfe083a7bfa06ad6ff5aa2f'),
|
|
89
|
+
},
|
|
90
|
+
PublicChecks: {
|
|
91
|
+
artifactHash: Fr.fromString('0x228ea8af66ff150f40a4b01b64115d12777b2f7fd3a4bfc0d97d38a91f139ef6'),
|
|
92
|
+
privateFunctionsRoot: Fr.fromString('0x067243231eddf4222f3911defbba7705aff06ed45960b27f6f91319196ef97e1'),
|
|
93
|
+
publicBytecodeCommitment: Fr.fromString('0x2d0834fc9468fd2092091852543a2fbd7b6b313c7e5e4defe8730c8065366a03'),
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export const ProtocolContractInitializationHash: Record<ProtocolContractName, Fr> = {
|
|
98
|
+
AuthRegistry: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
99
|
+
ContractInstanceRegistry: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
100
|
+
ContractClassRegistry: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
101
|
+
MultiCallEntrypoint: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
102
|
+
FeeJuice: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
103
|
+
PublicChecks: Fr.fromString('0x0000000000000000000000000000000000000000000000000000000000000000')
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export const ProtocolContractPrivateFunctions: Record<ProtocolContractName, { selector: FunctionSelector; vkHash: Fr }[]> = {
|
|
107
|
+
AuthRegistry: [{ selector: FunctionSelector.fromField(Fr.fromString('0x0000000000000000000000000000000000000000000000000000000079a3d418')), vkHash: Fr.fromString('0x019c553854290b9b547841e45bf45e344d4a2d4f6702fee430ec5897ce7d3b78') }],
|
|
108
|
+
ContractInstanceRegistry: [{ selector: FunctionSelector.fromField(Fr.fromString('0x0000000000000000000000000000000000000000000000000000000016ec12aa')), vkHash: Fr.fromString('0x262f7a90ecf055779001b67dad01a3add1e549f6c27931f0e71e463ce2142b57') }],
|
|
109
|
+
ContractClassRegistry: [{ selector: FunctionSelector.fromField(Fr.fromString('0x000000000000000000000000000000000000000000000000000000006934ed0d')), vkHash: Fr.fromString('0x1163f31e191528254c877fce0c7f62dd738f5552bbd2dda97512fe4777377f5b') }],
|
|
110
|
+
MultiCallEntrypoint: [{ selector: FunctionSelector.fromField(Fr.fromString('0x00000000000000000000000000000000000000000000000000000000f04908a9')), vkHash: Fr.fromString('0x21732ab3cecf633e4c31a030df62c93e35a005b89941fdab568d2818c1355192') }],
|
|
111
|
+
FeeJuice: [{ selector: FunctionSelector.fromField(Fr.fromString('0x00000000000000000000000000000000000000000000000000000000cbe67243')), vkHash: Fr.fromString('0x2ad6083b4595f8076c014e5152191013167ab1b5a31ad0cbb06490054c7c59ae') }, { selector: FunctionSelector.fromField(Fr.fromString('0x00000000000000000000000000000000000000000000000000000000e8d374b6')), vkHash: Fr.fromString('0x05aaffffdf797625ff24575d939339303775c5db77fb6bdcecbf955f726fd071') }],
|
|
112
|
+
PublicChecks: []
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
54
117
|
export const ProtocolContractsList = new ProtocolContracts([
|
|
55
118
|
AztecAddress.fromString('0x139f8eb6d6e7e7a7c0322c3b7558687a7e24201f11bf2c4cb2fe56c18d363695'),
|
|
56
119
|
AztecAddress.fromString('0x1254246c88aca5a66fa66f3aa78c408a698ebca3b713120497c7555dfc718592'),
|
package/src/provider/bundle.ts
CHANGED
|
@@ -22,6 +22,6 @@ export const ProtocolContractArtifact: Record<ProtocolContractName, ContractArti
|
|
|
22
22
|
|
|
23
23
|
export class BundledProtocolContractsProvider implements ProtocolContractsProvider {
|
|
24
24
|
getProtocolContractArtifact(name: ProtocolContractName): Promise<ProtocolContract> {
|
|
25
|
-
return makeProtocolContract(name, ProtocolContractArtifact[name]);
|
|
25
|
+
return Promise.resolve(makeProtocolContract(name, ProtocolContractArtifact[name]));
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -10,9 +10,9 @@ export const PublicChecksArtifact = loadContractArtifact(PublicChecksJson as Noi
|
|
|
10
10
|
let protocolContract: ProtocolContract;
|
|
11
11
|
|
|
12
12
|
/** Returns the canonical deployment of the contract. */
|
|
13
|
-
export
|
|
13
|
+
export function getCanonicalPublicChecks(): Promise<ProtocolContract> {
|
|
14
14
|
if (!protocolContract) {
|
|
15
|
-
protocolContract =
|
|
15
|
+
protocolContract = makeProtocolContract('PublicChecks', PublicChecksArtifact);
|
|
16
16
|
}
|
|
17
|
-
return protocolContract;
|
|
17
|
+
return Promise.resolve(protocolContract);
|
|
18
18
|
}
|
|
@@ -23,7 +23,7 @@ export async function getPublicChecksArtifact(): Promise<ContractArtifact> {
|
|
|
23
23
|
export async function getCanonicalPublicChecks(): Promise<ProtocolContract> {
|
|
24
24
|
if (!protocolContract) {
|
|
25
25
|
const publicChecksArtifact = await getPublicChecksArtifact();
|
|
26
|
-
protocolContract =
|
|
26
|
+
protocolContract = makeProtocolContract('PublicChecks', publicChecksArtifact);
|
|
27
27
|
}
|
|
28
28
|
return protocolContract;
|
|
29
29
|
}
|