@aztec/protocol-contracts 2.1.0-rc.9 → 3.0.0-devnet.2
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 +483 -508
- package/artifacts/ContractClassRegistry.json +591 -741
- package/artifacts/ContractInstanceRegistry.json +394 -427
- package/artifacts/FeeJuice.json +2288 -478
- package/artifacts/MultiCallEntrypoint.json +315 -340
- package/artifacts/Router.json +319 -3976
- package/dest/auth-registry/lazy.js +4 -4
- package/dest/class-registry/contract_class_published_event.d.ts.map +1 -1
- package/dest/class-registry/contract_class_published_event.js +1 -0
- package/dest/class-registry/lazy.js +4 -4
- package/dest/fee-juice/lazy.js +4 -4
- package/dest/index.d.ts +0 -1
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +0 -1
- package/dest/instance-registry/contract_instance_updated_event.d.ts.map +1 -1
- package/dest/instance-registry/contract_instance_updated_event.js +5 -7
- package/dest/instance-registry/lazy.js +4 -4
- package/dest/multi-call-entrypoint/lazy.js +4 -4
- package/dest/protocol_contract_data.d.ts +10 -8
- package/dest/protocol_contract_data.d.ts.map +1 -1
- package/dest/protocol_contract_data.js +22 -8
- package/dest/router/lazy.js +4 -4
- package/dest/scripts/generate_data.js +30 -24
- package/package.json +4 -4
- package/src/auth-registry/lazy.ts +4 -4
- package/src/class-registry/contract_class_published_event.ts +1 -0
- package/src/class-registry/lazy.ts +4 -4
- package/src/fee-juice/lazy.ts +4 -4
- package/src/index.ts +0 -1
- package/src/instance-registry/contract_instance_updated_event.ts +5 -7
- package/src/instance-registry/lazy.ts +4 -4
- package/src/multi-call-entrypoint/lazy.ts +4 -4
- package/src/protocol_contract_data.ts +23 -8
- package/src/router/lazy.ts +4 -4
- package/dest/build_protocol_contract_tree.d.ts +0 -10
- package/dest/build_protocol_contract_tree.d.ts.map +0 -1
- package/dest/build_protocol_contract_tree.js +0 -20
- package/dest/protocol_contract_tree.d.ts +0 -7
- package/dest/protocol_contract_tree.d.ts.map +0 -1
- package/dest/protocol_contract_tree.js +0 -34
- package/src/build_protocol_contract_tree.ts +0 -29
- package/src/protocol_contract_tree.ts +0 -44
|
@@ -4,10 +4,10 @@ let protocolContract;
|
|
|
4
4
|
let protocolContractArtifact;
|
|
5
5
|
export async function getAuthRegistryArtifact() {
|
|
6
6
|
if (!protocolContractArtifact) {
|
|
7
|
-
// Cannot assert this import as it's incompatible with
|
|
8
|
-
// https://
|
|
9
|
-
//
|
|
10
|
-
//
|
|
7
|
+
// Cannot assert this import as it's incompatible with bundlers like vite
|
|
8
|
+
// https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
|
|
9
|
+
// Even if now supported by al major browsers, the MIME type is replaced with
|
|
10
|
+
// "text/javascript"
|
|
11
11
|
// In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
|
|
12
12
|
const { default: authRegistryJson } = await import('../../artifacts/AuthRegistry.json');
|
|
13
13
|
protocolContractArtifact = loadContractArtifact(authRegistryJson);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract_class_published_event.d.ts","sourceRoot":"","sources":["../../src/class-registry/contract_class_published_event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,EACL,KAAK,mBAAmB,EAGzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI3D,oDAAoD;AACpD,qBAAa,2BAA2B;aAEpB,eAAe,EAAE,EAAE;aACnB,OAAO,EAAE,MAAM;aACf,YAAY,EAAE,EAAE;aAChB,oBAAoB,EAAE,EAAE;aACxB,oBAAoB,EAAE,MAAM;gBAJ5B,eAAe,EAAE,EAAE,EACnB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,EAAE,EAChB,oBAAoB,EAAE,EAAE,EACxB,oBAAoB,EAAE,MAAM;IAG9C,MAAM,CAAC,6BAA6B,CAAC,GAAG,EAAE,gBAAgB;IAO1D,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,gBAAgB;
|
|
1
|
+
{"version":3,"file":"contract_class_published_event.d.ts","sourceRoot":"","sources":["../../src/class-registry/contract_class_published_event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,EACL,KAAK,mBAAmB,EAGzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI3D,oDAAoD;AACpD,qBAAa,2BAA2B;aAEpB,eAAe,EAAE,EAAE;aACnB,OAAO,EAAE,MAAM;aACf,YAAY,EAAE,EAAE;aAChB,oBAAoB,EAAE,EAAE;aACxB,oBAAoB,EAAE,MAAM;gBAJ5B,eAAe,EAAE,EAAE,EACnB,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,EAAE,EAChB,oBAAoB,EAAE,EAAE,EACxB,oBAAoB,EAAE,MAAM;IAG9C,MAAM,CAAC,6BAA6B,CAAC,GAAG,EAAE,gBAAgB;IAO1D,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,gBAAgB;IAmB9B,qBAAqB,IAAI,OAAO,CAAC,mBAAmB,CAAC;CA2B5D"}
|
|
@@ -20,6 +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/contract_class_registry/src/events/class_published.nr`.
|
|
23
24
|
const fieldsWithoutTag = log.fields.fields.slice(1);
|
|
24
25
|
const reader = new FieldReader(fieldsWithoutTag);
|
|
25
26
|
const contractClassId = reader.readField();
|
|
@@ -7,10 +7,10 @@ let protocolContract;
|
|
|
7
7
|
let protocolContractArtifact;
|
|
8
8
|
export async function getContractClassRegistryArtifact() {
|
|
9
9
|
if (!protocolContractArtifact) {
|
|
10
|
-
// Cannot assert this import as it's incompatible with
|
|
11
|
-
// https://
|
|
12
|
-
//
|
|
13
|
-
//
|
|
10
|
+
// Cannot assert this import as it's incompatible with bundlers like vite
|
|
11
|
+
// https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
|
|
12
|
+
// Even if now supported by al major browsers, the MIME type is replaced with
|
|
13
|
+
// "text/javascript"
|
|
14
14
|
// In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
|
|
15
15
|
const { default: contractClassRegistryJson } = await import('../../artifacts/ContractClassRegistry.json');
|
|
16
16
|
protocolContractArtifact = loadContractArtifact(contractClassRegistryJson);
|
package/dest/fee-juice/lazy.js
CHANGED
|
@@ -4,10 +4,10 @@ let protocolContract;
|
|
|
4
4
|
let protocolContractArtifact;
|
|
5
5
|
export async function getFeeJuiceArtifact() {
|
|
6
6
|
if (!protocolContractArtifact) {
|
|
7
|
-
// Cannot assert this import as it's incompatible with
|
|
8
|
-
// https://
|
|
9
|
-
//
|
|
10
|
-
//
|
|
7
|
+
// Cannot assert this import as it's incompatible with bundlers like vite
|
|
8
|
+
// https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
|
|
9
|
+
// Even if now supported by al major browsers, the MIME type is replaced with
|
|
10
|
+
// "text/javascript"
|
|
11
11
|
// In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
|
|
12
12
|
const { default: feeJuiceJson } = await import('../../artifacts/FeeJuice.json');
|
|
13
13
|
protocolContractArtifact = loadContractArtifact(feeJuiceJson);
|
package/dest/index.d.ts
CHANGED
package/dest/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC"}
|
package/dest/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract_instance_updated_event.d.ts","sourceRoot":"","sources":["../../src/instance-registry/contract_instance_updated_event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAIlD,uDAAuD;AACvD,qBAAa,4BAA4B;aAErB,OAAO,EAAE,YAAY;aACrB,mBAAmB,EAAE,EAAE;aACvB,kBAAkB,EAAE,EAAE;aACtB,iBAAiB,EAAE,MAAM;gBAHzB,OAAO,EAAE,YAAY,EACrB,mBAAmB,EAAE,EAAE,EACvB,kBAAkB,EAAE,EAAE,EACtB,iBAAiB,EAAE,MAAM;IAG3C,MAAM,CAAC,8BAA8B,CAAC,GAAG,EAAE,SAAS;IAOpD,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"contract_instance_updated_event.d.ts","sourceRoot":"","sources":["../../src/instance-registry/contract_instance_updated_event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAIlD,uDAAuD;AACvD,qBAAa,4BAA4B;aAErB,OAAO,EAAE,YAAY;aACrB,mBAAmB,EAAE,EAAE;aACvB,kBAAkB,EAAE,EAAE;aACtB,iBAAiB,EAAE,MAAM;gBAHzB,OAAO,EAAE,YAAY,EACrB,mBAAmB,EAAE,EAAE,EACvB,kBAAkB,EAAE,EAAE,EACtB,iBAAiB,EAAE,MAAM;IAG3C,MAAM,CAAC,8BAA8B,CAAC,GAAG,EAAE,SAAS;IAOpD,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,SAAS;IAS7B,wBAAwB,IAAI,iCAAiC;CAQ9D"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE } from '@aztec/constants';
|
|
2
|
-
import {
|
|
3
|
-
import { BufferReader } from '@aztec/foundation/serialize';
|
|
2
|
+
import { FieldReader } from '@aztec/foundation/serialize';
|
|
4
3
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
4
|
import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
6
5
|
/** Event emitted from the ContractInstanceRegistry. */ export class ContractInstanceUpdatedEvent {
|
|
@@ -18,12 +17,11 @@ import { ProtocolContractAddress } from '../protocol_contract_data.js';
|
|
|
18
17
|
return log.contractAddress.equals(ProtocolContractAddress.ContractInstanceRegistry) && log.fields[0].toBigInt() === CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE;
|
|
19
18
|
}
|
|
20
19
|
static fromLog(log) {
|
|
21
|
-
const
|
|
22
|
-
const reader = new BufferReader(bufferWithoutAddressAndTag);
|
|
20
|
+
const reader = new FieldReader(log.fields.slice(1));
|
|
23
21
|
const address = reader.readObject(AztecAddress);
|
|
24
|
-
const prevContractClassId = reader.
|
|
25
|
-
const newContractClassId = reader.
|
|
26
|
-
const timestampOfChange = reader.
|
|
22
|
+
const prevContractClassId = reader.readField();
|
|
23
|
+
const newContractClassId = reader.readField();
|
|
24
|
+
const timestampOfChange = reader.readField().toBigInt();
|
|
27
25
|
return new ContractInstanceUpdatedEvent(address, prevContractClassId, newContractClassId, timestampOfChange);
|
|
28
26
|
}
|
|
29
27
|
toContractInstanceUpdate() {
|
|
@@ -6,10 +6,10 @@ let protocolContract;
|
|
|
6
6
|
let protocolContractArtifact;
|
|
7
7
|
export async function getContractInstanceRegistryArtifact() {
|
|
8
8
|
if (!protocolContractArtifact) {
|
|
9
|
-
// Cannot assert this import as it's incompatible with
|
|
10
|
-
// https://
|
|
11
|
-
//
|
|
12
|
-
//
|
|
9
|
+
// Cannot assert this import as it's incompatible with bundlers like vite
|
|
10
|
+
// https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
|
|
11
|
+
// Even if now supported by al major browsers, the MIME type is replaced with
|
|
12
|
+
// "text/javascript"
|
|
13
13
|
// In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
|
|
14
14
|
const { default: contractInstanceRegistryJson } = await import('../../artifacts/ContractInstanceRegistry.json');
|
|
15
15
|
protocolContractArtifact = loadContractArtifact(contractInstanceRegistryJson);
|
|
@@ -4,10 +4,10 @@ let protocolContract;
|
|
|
4
4
|
let protocolContractArtifact;
|
|
5
5
|
export async function getMultiCallEntrypointArtifact() {
|
|
6
6
|
if (!protocolContractArtifact) {
|
|
7
|
-
// Cannot assert this import as it's incompatible with
|
|
8
|
-
// https://
|
|
9
|
-
//
|
|
10
|
-
//
|
|
7
|
+
// Cannot assert this import as it's incompatible with bundlers like vite
|
|
8
|
+
// https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
|
|
9
|
+
// Even if now supported by al major browsers, the MIME type is replaced with
|
|
10
|
+
// "text/javascript"
|
|
11
11
|
// In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
|
|
12
12
|
const { default: multiCallEntrypointJson } = await import('../../artifacts/MultiCallEntrypoint.json');
|
|
13
13
|
protocolContractArtifact = loadContractArtifact(multiCallEntrypointJson);
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { Fr } from '@aztec/foundation/fields';
|
|
2
2
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
|
+
import { ProtocolContracts } from '@aztec/stdlib/tx';
|
|
3
4
|
export declare const protocolContractNames: readonly ["AuthRegistry", "ContractInstanceRegistry", "ContractClassRegistry", "MultiCallEntrypoint", "FeeJuice", "Router"];
|
|
4
5
|
export type ProtocolContractName = typeof protocolContractNames[number];
|
|
5
6
|
export declare const ProtocolContractSalt: Record<ProtocolContractName, Fr>;
|
|
6
7
|
export declare const ProtocolContractAddress: Record<ProtocolContractName, AztecAddress>;
|
|
7
|
-
export declare const
|
|
8
|
-
AuthRegistry:
|
|
9
|
-
ContractInstanceRegistry:
|
|
10
|
-
ContractClassRegistry:
|
|
11
|
-
MultiCallEntrypoint:
|
|
12
|
-
FeeJuice:
|
|
13
|
-
Router:
|
|
8
|
+
export declare const ProtocolContractDerivedAddress: {
|
|
9
|
+
AuthRegistry: AztecAddress;
|
|
10
|
+
ContractInstanceRegistry: AztecAddress;
|
|
11
|
+
ContractClassRegistry: AztecAddress;
|
|
12
|
+
MultiCallEntrypoint: AztecAddress;
|
|
13
|
+
FeeJuice: AztecAddress;
|
|
14
|
+
Router: AztecAddress;
|
|
14
15
|
};
|
|
15
|
-
export declare const
|
|
16
|
+
export declare const ProtocolContractsList: ProtocolContracts;
|
|
17
|
+
export declare const protocolContractsHash: Fr;
|
|
16
18
|
export declare const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG: Fr;
|
|
17
19
|
//# sourceMappingURL=protocol_contract_data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol_contract_data.d.ts","sourceRoot":"","sources":["../src/protocol_contract_data.ts"],"names":[],"mappings":"AAEI,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"protocol_contract_data.d.ts","sourceRoot":"","sources":["../src/protocol_contract_data.ts"],"names":[],"mappings":"AAEI,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,eAAO,MAAM,qBAAqB,6HAOxB,CAAC;AAEX,MAAM,MAAM,oBAAoB,GAAG,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAIxE,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,oBAAoB,EAAE,EAAE,CAOjE,CAAC;AAIF,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,oBAAoB,EAAE,YAAY,CAO9E,CAAC;AAIF,eAAO,MAAM,8BAA8B;;;;;;;CAO1C,CAAC;AAIF,eAAO,MAAM,qBAAqB,mBAYhC,CAAC;AAEH,eAAO,MAAM,qBAAqB,IAAsF,CAAC;AAI3H,eAAO,MAAM,qCAAqC,IAAyF,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// GENERATED FILE - DO NOT EDIT. RUN `yarn generate` or `yarn generate:data`
|
|
2
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
3
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
|
+
import { ProtocolContracts } from '@aztec/stdlib/tx';
|
|
4
5
|
export const protocolContractNames = [
|
|
5
6
|
'AuthRegistry',
|
|
6
7
|
'ContractInstanceRegistry',
|
|
@@ -25,13 +26,26 @@ export const ProtocolContractAddress = {
|
|
|
25
26
|
FeeJuice: AztecAddress.fromBigInt(5n),
|
|
26
27
|
Router: AztecAddress.fromBigInt(6n)
|
|
27
28
|
};
|
|
28
|
-
export const
|
|
29
|
-
AuthRegistry:
|
|
30
|
-
ContractInstanceRegistry:
|
|
31
|
-
ContractClassRegistry:
|
|
32
|
-
MultiCallEntrypoint:
|
|
33
|
-
FeeJuice:
|
|
34
|
-
Router:
|
|
29
|
+
export const ProtocolContractDerivedAddress = {
|
|
30
|
+
AuthRegistry: AztecAddress.fromString('0x211f1e41d3063b70fbd60030ffcee7020a405d4777af3467f20b0d7fe5637a61'),
|
|
31
|
+
ContractInstanceRegistry: AztecAddress.fromString('0x1f33581fd9e68afaa9afb20370a2059911fa816b5d7a348903555c06b31d79a5'),
|
|
32
|
+
ContractClassRegistry: AztecAddress.fromString('0x25b3403229608574dd1397592093c27e7f1b37018c199e4c00608010c404c490'),
|
|
33
|
+
MultiCallEntrypoint: AztecAddress.fromString('0x016c38dc8b63d9589f872fa9ed121c0700e1cc3c695e540349e8e9b727c1233a'),
|
|
34
|
+
FeeJuice: AztecAddress.fromString('0x1363751f5f38916a38a88d8b536c53eaf07058e077b22bef4288b0f9178021dc'),
|
|
35
|
+
Router: AztecAddress.fromString('0x17a6c8d0be66035edb32677e3f121669926df68bef5b009024216b3c22d60183')
|
|
35
36
|
};
|
|
36
|
-
export const
|
|
37
|
+
export const ProtocolContractsList = new ProtocolContracts([
|
|
38
|
+
AztecAddress.fromString('0x211f1e41d3063b70fbd60030ffcee7020a405d4777af3467f20b0d7fe5637a61'),
|
|
39
|
+
AztecAddress.fromString('0x1f33581fd9e68afaa9afb20370a2059911fa816b5d7a348903555c06b31d79a5'),
|
|
40
|
+
AztecAddress.fromString('0x25b3403229608574dd1397592093c27e7f1b37018c199e4c00608010c404c490'),
|
|
41
|
+
AztecAddress.fromString('0x016c38dc8b63d9589f872fa9ed121c0700e1cc3c695e540349e8e9b727c1233a'),
|
|
42
|
+
AztecAddress.fromString('0x1363751f5f38916a38a88d8b536c53eaf07058e077b22bef4288b0f9178021dc'),
|
|
43
|
+
AztecAddress.fromString('0x17a6c8d0be66035edb32677e3f121669926df68bef5b009024216b3c22d60183'),
|
|
44
|
+
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
45
|
+
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
46
|
+
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
47
|
+
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
48
|
+
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000')
|
|
49
|
+
]);
|
|
50
|
+
export const protocolContractsHash = Fr.fromString('0x27638bf36029626c609c64210f0e027e95b2975edc8359afa6f7a77974acf52a');
|
|
37
51
|
export const CONTRACT_INSTANCE_PUBLISHED_EVENT_TAG = Fr.fromHexString('0x28da3fc471387d4e20b646b77abc8cdfc02a339a7507285a73d84f9b97b13486');
|
package/dest/router/lazy.js
CHANGED
|
@@ -4,10 +4,10 @@ let protocolContract;
|
|
|
4
4
|
let protocolContractArtifact;
|
|
5
5
|
export async function getRouterArtifact() {
|
|
6
6
|
if (!protocolContractArtifact) {
|
|
7
|
-
// Cannot assert this import as it's incompatible with
|
|
8
|
-
// https://
|
|
9
|
-
//
|
|
10
|
-
//
|
|
7
|
+
// Cannot assert this import as it's incompatible with bundlers like vite
|
|
8
|
+
// https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
|
|
9
|
+
// Even if now supported by al major browsers, the MIME type is replaced with
|
|
10
|
+
// "text/javascript"
|
|
11
11
|
// In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
|
|
12
12
|
const { default: routerJson } = await import('../../artifacts/Router.json');
|
|
13
13
|
protocolContractArtifact = loadContractArtifact(routerJson);
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { CANONICAL_AUTH_REGISTRY_ADDRESS, CONTRACT_CLASS_REGISTRY_CONTRACT_ADDRESS, CONTRACT_INSTANCE_PUBLISHED_MAGIC_VALUE, CONTRACT_INSTANCE_REGISTRY_CONTRACT_ADDRESS, FEE_JUICE_ADDRESS, MULTI_CALL_ENTRYPOINT_ADDRESS, ROUTER_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, MAX_PROTOCOL_CONTRACTS, MULTI_CALL_ENTRYPOINT_ADDRESS, ROUTER_ADDRESS } from '@aztec/constants';
|
|
2
|
+
import { makeTuple } from '@aztec/foundation/array';
|
|
2
3
|
import { poseidon2Hash } from '@aztec/foundation/crypto';
|
|
3
4
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
5
|
import { createConsoleLogger } from '@aztec/foundation/log';
|
|
5
6
|
import { loadContractArtifact } from '@aztec/stdlib/abi';
|
|
6
7
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
8
|
import { getContractInstanceFromInstantiationParams } from '@aztec/stdlib/contract';
|
|
9
|
+
import { ProtocolContracts } from '@aztec/stdlib/tx';
|
|
8
10
|
import { promises as fs } from 'fs';
|
|
9
11
|
import path from 'path';
|
|
10
|
-
import { buildProtocolContractTree } from '../build_protocol_contract_tree.js';
|
|
11
12
|
const log = createConsoleLogger('autogenerate');
|
|
12
13
|
const noirContractsRoot = '../../noir-projects/noir-contracts';
|
|
13
14
|
const srcPath = path.join(noirContractsRoot, './target');
|
|
@@ -49,20 +50,12 @@ async function copyArtifact(srcName, destName) {
|
|
|
49
50
|
await fs.copyFile(src, dest);
|
|
50
51
|
return artifact;
|
|
51
52
|
}
|
|
52
|
-
async function
|
|
53
|
+
async function computeAddress(artifact) {
|
|
53
54
|
const instance = await getContractInstanceFromInstantiationParams(loadContractArtifact(artifact), {
|
|
54
55
|
salt
|
|
55
56
|
});
|
|
56
57
|
return instance.address;
|
|
57
58
|
}
|
|
58
|
-
async function computeRoot(names, leaves) {
|
|
59
|
-
const data = names.map((name, i)=>({
|
|
60
|
-
address: new AztecAddress(new Fr(contractAddressMapping[name])),
|
|
61
|
-
leaf: leaves[i]
|
|
62
|
-
}));
|
|
63
|
-
const tree = await buildProtocolContractTree(data);
|
|
64
|
-
return Fr.fromBuffer(tree.root);
|
|
65
|
-
}
|
|
66
59
|
async function generateDeclarationFile(destName) {
|
|
67
60
|
const content = `
|
|
68
61
|
import type { NoirCompiledContract } from '@aztec/stdlib/noir';
|
|
@@ -95,17 +88,30 @@ function generateContractAddresses(names) {
|
|
|
95
88
|
};
|
|
96
89
|
`;
|
|
97
90
|
}
|
|
98
|
-
function
|
|
91
|
+
function generateDerivedAddresses(names, derivedAddresses) {
|
|
99
92
|
return `
|
|
100
|
-
export const
|
|
101
|
-
${
|
|
93
|
+
export const ProtocolContractDerivedAddress = {
|
|
94
|
+
${derivedAddresses.map((address, i)=>`${names[i]}: AztecAddress.fromString('${address.toString()}')`).join(',\n')}
|
|
102
95
|
};
|
|
103
96
|
`;
|
|
104
97
|
}
|
|
105
|
-
async function
|
|
106
|
-
const
|
|
98
|
+
async function generateProtocolContractsList(names, derivedAddresses) {
|
|
99
|
+
const list = makeTuple(MAX_PROTOCOL_CONTRACTS, ()=>AztecAddress.zero());
|
|
100
|
+
for(let i = 0; i < names.length; i++){
|
|
101
|
+
const name = names[i];
|
|
102
|
+
const address = contractAddressMapping[name];
|
|
103
|
+
const derivedAddressIndex = address - 1;
|
|
104
|
+
if (!list[derivedAddressIndex].equals(AztecAddress.zero())) {
|
|
105
|
+
throw new Error(`Duplicate protocol contract address: ${address.toString()}`);
|
|
106
|
+
}
|
|
107
|
+
list[derivedAddressIndex] = derivedAddresses[i];
|
|
108
|
+
}
|
|
107
109
|
return `
|
|
108
|
-
export const
|
|
110
|
+
export const ProtocolContractsList = new ProtocolContracts([
|
|
111
|
+
${list.map((address)=>`AztecAddress.fromString('${address.toString()}')`).join(',\n')}
|
|
112
|
+
]);
|
|
113
|
+
|
|
114
|
+
export const protocolContractsHash = Fr.fromString('${(await new ProtocolContracts(list).hash()).toString()}');
|
|
109
115
|
`;
|
|
110
116
|
}
|
|
111
117
|
// Generate the siloed log tags for events emitted via private logs.
|
|
@@ -117,11 +123,12 @@ async function generateLogTags() {
|
|
|
117
123
|
])}');
|
|
118
124
|
`;
|
|
119
125
|
}
|
|
120
|
-
async function generateOutputFile(names,
|
|
126
|
+
async function generateOutputFile(names, derivedAddresses) {
|
|
121
127
|
const content = `
|
|
122
128
|
// GENERATED FILE - DO NOT EDIT. RUN \`yarn generate\` or \`yarn generate:data\`
|
|
123
129
|
import { Fr } from '@aztec/foundation/fields';
|
|
124
130
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
131
|
+
import { ProtocolContracts } from '@aztec/stdlib/tx';
|
|
125
132
|
|
|
126
133
|
${generateNames(names)}
|
|
127
134
|
|
|
@@ -129,9 +136,9 @@ async function generateOutputFile(names, leaves) {
|
|
|
129
136
|
|
|
130
137
|
${generateContractAddresses(names)}
|
|
131
138
|
|
|
132
|
-
${
|
|
139
|
+
${generateDerivedAddresses(names, derivedAddresses)}
|
|
133
140
|
|
|
134
|
-
${await
|
|
141
|
+
${await generateProtocolContractsList(names, derivedAddresses)}
|
|
135
142
|
|
|
136
143
|
${await generateLogTags()}
|
|
137
144
|
`;
|
|
@@ -140,17 +147,16 @@ async function generateOutputFile(names, leaves) {
|
|
|
140
147
|
async function main() {
|
|
141
148
|
await clearDestDir();
|
|
142
149
|
const srcNames = JSON.parse(await fs.readFile(path.join(noirContractsRoot, 'protocol_contracts.json'), 'utf8'));
|
|
143
|
-
const
|
|
150
|
+
const derivedAddresses = [];
|
|
144
151
|
const destNames = srcNames.map((n)=>n.split('-')[1]);
|
|
145
152
|
for(let i = 0; i < srcNames.length; i++){
|
|
146
153
|
const srcName = srcNames[i];
|
|
147
154
|
const destName = destNames[i];
|
|
148
155
|
const artifact = await copyArtifact(srcName, destName);
|
|
149
156
|
await generateDeclarationFile(destName);
|
|
150
|
-
|
|
151
|
-
leaves.push(contractLeaf.toField());
|
|
157
|
+
derivedAddresses.push(await computeAddress(artifact));
|
|
152
158
|
}
|
|
153
|
-
await generateOutputFile(destNames,
|
|
159
|
+
await generateOutputFile(destNames, derivedAddresses);
|
|
154
160
|
}
|
|
155
161
|
try {
|
|
156
162
|
await main();
|
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": "
|
|
5
|
+
"version": "3.0.0-devnet.2",
|
|
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": "
|
|
77
|
-
"@aztec/foundation": "
|
|
78
|
-
"@aztec/stdlib": "
|
|
76
|
+
"@aztec/constants": "3.0.0-devnet.2",
|
|
77
|
+
"@aztec/foundation": "3.0.0-devnet.2",
|
|
78
|
+
"@aztec/stdlib": "3.0.0-devnet.2",
|
|
79
79
|
"lodash.chunk": "^4.2.0",
|
|
80
80
|
"lodash.omit": "^4.5.0",
|
|
81
81
|
"tslib": "^2.4.0"
|
|
@@ -8,10 +8,10 @@ let protocolContractArtifact: ContractArtifact;
|
|
|
8
8
|
|
|
9
9
|
export async function getAuthRegistryArtifact(): Promise<ContractArtifact> {
|
|
10
10
|
if (!protocolContractArtifact) {
|
|
11
|
-
// Cannot assert this import as it's incompatible with
|
|
12
|
-
// https://
|
|
13
|
-
//
|
|
14
|
-
//
|
|
11
|
+
// Cannot assert this import as it's incompatible with bundlers like vite
|
|
12
|
+
// https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
|
|
13
|
+
// Even if now supported by al major browsers, the MIME type is replaced with
|
|
14
|
+
// "text/javascript"
|
|
15
15
|
// In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
|
|
16
16
|
const { default: authRegistryJson } = await import('../../artifacts/AuthRegistry.json');
|
|
17
17
|
protocolContractArtifact = loadContractArtifact(authRegistryJson);
|
|
@@ -29,6 +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/contract_class_registry/src/events/class_published.nr`.
|
|
32
33
|
const fieldsWithoutTag = log.fields.fields.slice(1);
|
|
33
34
|
const reader = new FieldReader(fieldsWithoutTag);
|
|
34
35
|
const contractClassId = reader.readField();
|
|
@@ -12,10 +12,10 @@ let protocolContractArtifact: ContractArtifact;
|
|
|
12
12
|
|
|
13
13
|
export async function getContractClassRegistryArtifact(): Promise<ContractArtifact> {
|
|
14
14
|
if (!protocolContractArtifact) {
|
|
15
|
-
// Cannot assert this import as it's incompatible with
|
|
16
|
-
// https://
|
|
17
|
-
//
|
|
18
|
-
//
|
|
15
|
+
// Cannot assert this import as it's incompatible with bundlers like vite
|
|
16
|
+
// https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
|
|
17
|
+
// Even if now supported by al major browsers, the MIME type is replaced with
|
|
18
|
+
// "text/javascript"
|
|
19
19
|
// In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
|
|
20
20
|
const { default: contractClassRegistryJson } = await import('../../artifacts/ContractClassRegistry.json');
|
|
21
21
|
protocolContractArtifact = loadContractArtifact(contractClassRegistryJson);
|
package/src/fee-juice/lazy.ts
CHANGED
|
@@ -8,10 +8,10 @@ let protocolContractArtifact: ContractArtifact;
|
|
|
8
8
|
|
|
9
9
|
export async function getFeeJuiceArtifact(): Promise<ContractArtifact> {
|
|
10
10
|
if (!protocolContractArtifact) {
|
|
11
|
-
// Cannot assert this import as it's incompatible with
|
|
12
|
-
// https://
|
|
13
|
-
//
|
|
14
|
-
//
|
|
11
|
+
// Cannot assert this import as it's incompatible with bundlers like vite
|
|
12
|
+
// https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
|
|
13
|
+
// Even if now supported by al major browsers, the MIME type is replaced with
|
|
14
|
+
// "text/javascript"
|
|
15
15
|
// In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
|
|
16
16
|
const { default: feeJuiceJson } = await import('../../artifacts/FeeJuice.json');
|
|
17
17
|
protocolContractArtifact = loadContractArtifact(feeJuiceJson);
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CONTRACT_INSTANCE_UPDATED_MAGIC_VALUE } from '@aztec/constants';
|
|
2
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
-
import {
|
|
3
|
+
import { FieldReader } from '@aztec/foundation/serialize';
|
|
4
4
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
5
|
import type { ContractInstanceUpdateWithAddress } from '@aztec/stdlib/contract';
|
|
6
6
|
import type { PublicLog } from '@aztec/stdlib/logs';
|
|
@@ -25,13 +25,11 @@ export class ContractInstanceUpdatedEvent {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
static fromLog(log: PublicLog) {
|
|
28
|
-
const
|
|
29
|
-
const reader = new BufferReader(bufferWithoutAddressAndTag);
|
|
28
|
+
const reader = new FieldReader(log.fields.slice(1) /* remove tag */);
|
|
30
29
|
const address = reader.readObject(AztecAddress);
|
|
31
|
-
const prevContractClassId = reader.
|
|
32
|
-
const newContractClassId = reader.
|
|
33
|
-
const timestampOfChange = reader.
|
|
34
|
-
|
|
30
|
+
const prevContractClassId = reader.readField();
|
|
31
|
+
const newContractClassId = reader.readField();
|
|
32
|
+
const timestampOfChange = reader.readField().toBigInt();
|
|
35
33
|
return new ContractInstanceUpdatedEvent(address, prevContractClassId, newContractClassId, timestampOfChange);
|
|
36
34
|
}
|
|
37
35
|
|
|
@@ -11,10 +11,10 @@ let protocolContractArtifact: ContractArtifact;
|
|
|
11
11
|
|
|
12
12
|
export async function getContractInstanceRegistryArtifact(): Promise<ContractArtifact> {
|
|
13
13
|
if (!protocolContractArtifact) {
|
|
14
|
-
// Cannot assert this import as it's incompatible with
|
|
15
|
-
// https://
|
|
16
|
-
//
|
|
17
|
-
//
|
|
14
|
+
// Cannot assert this import as it's incompatible with bundlers like vite
|
|
15
|
+
// https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
|
|
16
|
+
// Even if now supported by al major browsers, the MIME type is replaced with
|
|
17
|
+
// "text/javascript"
|
|
18
18
|
// In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
|
|
19
19
|
const { default: contractInstanceRegistryJson } = await import('../../artifacts/ContractInstanceRegistry.json');
|
|
20
20
|
protocolContractArtifact = loadContractArtifact(contractInstanceRegistryJson);
|
|
@@ -8,10 +8,10 @@ let protocolContractArtifact: ContractArtifact;
|
|
|
8
8
|
|
|
9
9
|
export async function getMultiCallEntrypointArtifact(): Promise<ContractArtifact> {
|
|
10
10
|
if (!protocolContractArtifact) {
|
|
11
|
-
// Cannot assert this import as it's incompatible with
|
|
12
|
-
// https://
|
|
13
|
-
//
|
|
14
|
-
//
|
|
11
|
+
// Cannot assert this import as it's incompatible with bundlers like vite
|
|
12
|
+
// https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
|
|
13
|
+
// Even if now supported by al major browsers, the MIME type is replaced with
|
|
14
|
+
// "text/javascript"
|
|
15
15
|
// In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
|
|
16
16
|
const { default: multiCallEntrypointJson } = await import('../../artifacts/MultiCallEntrypoint.json');
|
|
17
17
|
protocolContractArtifact = loadContractArtifact(multiCallEntrypointJson);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// GENERATED FILE - DO NOT EDIT. RUN `yarn generate` or `yarn generate:data`
|
|
3
3
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
4
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
+
import { ProtocolContracts } from '@aztec/stdlib/tx';
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
export const protocolContractNames = [
|
|
@@ -39,18 +40,32 @@ Router: AztecAddress.fromBigInt(6n)
|
|
|
39
40
|
|
|
40
41
|
|
|
41
42
|
|
|
42
|
-
export const
|
|
43
|
-
AuthRegistry:
|
|
44
|
-
ContractInstanceRegistry:
|
|
45
|
-
ContractClassRegistry:
|
|
46
|
-
MultiCallEntrypoint:
|
|
47
|
-
FeeJuice:
|
|
48
|
-
Router:
|
|
43
|
+
export const ProtocolContractDerivedAddress = {
|
|
44
|
+
AuthRegistry: AztecAddress.fromString('0x211f1e41d3063b70fbd60030ffcee7020a405d4777af3467f20b0d7fe5637a61'),
|
|
45
|
+
ContractInstanceRegistry: AztecAddress.fromString('0x1f33581fd9e68afaa9afb20370a2059911fa816b5d7a348903555c06b31d79a5'),
|
|
46
|
+
ContractClassRegistry: AztecAddress.fromString('0x25b3403229608574dd1397592093c27e7f1b37018c199e4c00608010c404c490'),
|
|
47
|
+
MultiCallEntrypoint: AztecAddress.fromString('0x016c38dc8b63d9589f872fa9ed121c0700e1cc3c695e540349e8e9b727c1233a'),
|
|
48
|
+
FeeJuice: AztecAddress.fromString('0x1363751f5f38916a38a88d8b536c53eaf07058e077b22bef4288b0f9178021dc'),
|
|
49
|
+
Router: AztecAddress.fromString('0x17a6c8d0be66035edb32677e3f121669926df68bef5b009024216b3c22d60183')
|
|
49
50
|
};
|
|
50
51
|
|
|
51
52
|
|
|
52
53
|
|
|
53
|
-
export const
|
|
54
|
+
export const ProtocolContractsList = new ProtocolContracts([
|
|
55
|
+
AztecAddress.fromString('0x211f1e41d3063b70fbd60030ffcee7020a405d4777af3467f20b0d7fe5637a61'),
|
|
56
|
+
AztecAddress.fromString('0x1f33581fd9e68afaa9afb20370a2059911fa816b5d7a348903555c06b31d79a5'),
|
|
57
|
+
AztecAddress.fromString('0x25b3403229608574dd1397592093c27e7f1b37018c199e4c00608010c404c490'),
|
|
58
|
+
AztecAddress.fromString('0x016c38dc8b63d9589f872fa9ed121c0700e1cc3c695e540349e8e9b727c1233a'),
|
|
59
|
+
AztecAddress.fromString('0x1363751f5f38916a38a88d8b536c53eaf07058e077b22bef4288b0f9178021dc'),
|
|
60
|
+
AztecAddress.fromString('0x17a6c8d0be66035edb32677e3f121669926df68bef5b009024216b3c22d60183'),
|
|
61
|
+
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
62
|
+
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
63
|
+
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
64
|
+
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000'),
|
|
65
|
+
AztecAddress.fromString('0x0000000000000000000000000000000000000000000000000000000000000000')
|
|
66
|
+
]);
|
|
67
|
+
|
|
68
|
+
export const protocolContractsHash = Fr.fromString('0x27638bf36029626c609c64210f0e027e95b2975edc8359afa6f7a77974acf52a');
|
|
54
69
|
|
|
55
70
|
|
|
56
71
|
|
package/src/router/lazy.ts
CHANGED
|
@@ -8,10 +8,10 @@ let protocolContractArtifact: ContractArtifact;
|
|
|
8
8
|
|
|
9
9
|
export async function getRouterArtifact(): Promise<ContractArtifact> {
|
|
10
10
|
if (!protocolContractArtifact) {
|
|
11
|
-
// Cannot assert this import as it's incompatible with
|
|
12
|
-
// https://
|
|
13
|
-
//
|
|
14
|
-
//
|
|
11
|
+
// Cannot assert this import as it's incompatible with bundlers like vite
|
|
12
|
+
// https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
|
|
13
|
+
// Even if now supported by al major browsers, the MIME type is replaced with
|
|
14
|
+
// "text/javascript"
|
|
15
15
|
// In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
|
|
16
16
|
const { default: routerJson } = await import('../../artifacts/Router.json');
|
|
17
17
|
protocolContractArtifact = loadContractArtifact(routerJson);
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PROTOCOL_CONTRACT_TREE_HEIGHT } from '@aztec/constants';
|
|
2
|
-
import type { Fr } from '@aztec/foundation/fields';
|
|
3
|
-
import { type IndexedMerkleTree } from '@aztec/foundation/trees';
|
|
4
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
-
import { ProtocolContractLeafPreimage } from '@aztec/stdlib/trees';
|
|
6
|
-
export declare function buildProtocolContractTree(contracts: {
|
|
7
|
-
address: AztecAddress;
|
|
8
|
-
leaf: Fr;
|
|
9
|
-
}[]): Promise<IndexedMerkleTree<ProtocolContractLeafPreimage, typeof PROTOCOL_CONTRACT_TREE_HEIGHT>>;
|
|
10
|
-
//# sourceMappingURL=build_protocol_contract_tree.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build_protocol_contract_tree.d.ts","sourceRoot":"","sources":["../src/build_protocol_contract_tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AAEzF,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,KAAK,iBAAiB,EAA+B,MAAM,yBAAyB,CAAC;AAC9F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAEnE,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE;IAAE,OAAO,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,EAAE,CAAA;CAAE,EAAE,GAC/C,OAAO,CAAC,iBAAiB,CAAC,4BAA4B,EAAE,OAAO,6BAA6B,CAAC,CAAC,CAmBhG"}
|