@aztec/archiver 0.83.0 → 0.83.1-nightly.20250404
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.
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
2
|
+
import type { Fr } from '@aztec/foundation/fields';
|
|
3
|
+
import type { FunctionSelector } from '@aztec/stdlib/abi';
|
|
4
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
2
5
|
import { L2Block, type L2BlockSource, type L2Tips } from '@aztec/stdlib/block';
|
|
6
|
+
import type { ContractClassPublic, ContractDataSource, ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
3
7
|
import { type L1RollupConstants } from '@aztec/stdlib/epoch-helpers';
|
|
4
8
|
import { type BlockHeader, TxHash, TxReceipt } from '@aztec/stdlib/tx';
|
|
5
9
|
/**
|
|
6
10
|
* A mocked implementation of L2BlockSource to be used in tests.
|
|
7
11
|
*/
|
|
8
|
-
export declare class MockL2BlockSource implements L2BlockSource {
|
|
12
|
+
export declare class MockL2BlockSource implements L2BlockSource, ContractDataSource {
|
|
9
13
|
protected l2Blocks: L2Block[];
|
|
10
14
|
private provenBlockNumber;
|
|
11
15
|
private log;
|
|
@@ -85,5 +89,11 @@ export declare class MockL2BlockSource implements L2BlockSource {
|
|
|
85
89
|
* @returns A promise that signals the l2 block source is now stopped.
|
|
86
90
|
*/
|
|
87
91
|
stop(): Promise<void>;
|
|
92
|
+
getContractClass(_id: Fr): Promise<ContractClassPublic | undefined>;
|
|
93
|
+
getBytecodeCommitment(_id: Fr): Promise<Fr | undefined>;
|
|
94
|
+
getContract(_address: AztecAddress, _blockNumber?: number): Promise<ContractInstanceWithAddress | undefined>;
|
|
95
|
+
getContractClassIds(): Promise<Fr[]>;
|
|
96
|
+
getDebugFunctionName(_address: AztecAddress, _selector: FunctionSelector): Promise<string | undefined>;
|
|
97
|
+
registerContractFunctionSignatures(_address: AztecAddress, _signatures: string[]): Promise<void>;
|
|
88
98
|
}
|
|
89
99
|
//# sourceMappingURL=mock_l2_block_source.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock_l2_block_source.d.ts","sourceRoot":"","sources":["../../src/test/mock_l2_block_source.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"mock_l2_block_source.d.ts","sourceRoot":"","sources":["../../src/test/mock_l2_block_source.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAe,KAAK,aAAa,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC5F,OAAO,KAAK,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACnH,OAAO,EAAE,KAAK,iBAAiB,EAAwB,MAAM,6BAA6B,CAAC;AAC3F,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,EAAE,SAAS,EAAY,MAAM,kBAAkB,CAAC;AAEjF;;GAEG;AACH,qBAAa,iBAAkB,YAAW,aAAa,EAAE,kBAAkB;IACzE,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAM;IAEnC,OAAO,CAAC,iBAAiB,CAAa;IAEtC,OAAO,CAAC,GAAG,CAAiD;IAE/C,YAAY,CAAC,SAAS,EAAE,MAAM;IAUpC,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE;IAK3B,YAAY,CAAC,SAAS,EAAE,MAAM;IAK9B,oBAAoB,CAAC,iBAAiB,EAAE,MAAM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AAG,EAAE,EAAE,GAAG,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC;IAInE,qBAAqB,CAAC,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,GAAG,SAAS,CAAC;IAIvD,WAAW,CAAC,QAAQ,EAAE,YAAY,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,GAAG,SAAS,CAAC;IAI5G,mBAAmB,IAAI,OAAO,CAAC,EAAE,EAAE,CAAC;IAIpC,oBAAoB,CAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAItG,kCAAkC,CAAC,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAGjG"}
|
|
@@ -178,4 +178,22 @@ import { TxReceipt, TxStatus } from '@aztec/stdlib/tx';
|
|
|
178
178
|
this.log.verbose('Stopping mock L2 block source');
|
|
179
179
|
return Promise.resolve();
|
|
180
180
|
}
|
|
181
|
+
getContractClass(_id) {
|
|
182
|
+
return Promise.resolve(undefined);
|
|
183
|
+
}
|
|
184
|
+
getBytecodeCommitment(_id) {
|
|
185
|
+
return Promise.resolve(undefined);
|
|
186
|
+
}
|
|
187
|
+
getContract(_address, _blockNumber) {
|
|
188
|
+
return Promise.resolve(undefined);
|
|
189
|
+
}
|
|
190
|
+
getContractClassIds() {
|
|
191
|
+
return Promise.resolve([]);
|
|
192
|
+
}
|
|
193
|
+
getDebugFunctionName(_address, _selector) {
|
|
194
|
+
return Promise.resolve(undefined);
|
|
195
|
+
}
|
|
196
|
+
registerContractFunctionSignatures(_address, _signatures) {
|
|
197
|
+
return Promise.resolve();
|
|
198
|
+
}
|
|
181
199
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/archiver",
|
|
3
|
-
"version": "0.83.
|
|
3
|
+
"version": "0.83.1-nightly.20250404",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -64,17 +64,17 @@
|
|
|
64
64
|
]
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@aztec/blob-lib": "0.83.
|
|
68
|
-
"@aztec/blob-sink": "0.83.
|
|
69
|
-
"@aztec/constants": "0.83.
|
|
70
|
-
"@aztec/ethereum": "0.83.
|
|
71
|
-
"@aztec/foundation": "0.83.
|
|
72
|
-
"@aztec/kv-store": "0.83.
|
|
73
|
-
"@aztec/l1-artifacts": "0.83.
|
|
74
|
-
"@aztec/noir-protocol-circuits-types": "0.83.
|
|
75
|
-
"@aztec/protocol-contracts": "0.83.
|
|
76
|
-
"@aztec/stdlib": "0.83.
|
|
77
|
-
"@aztec/telemetry-client": "0.83.
|
|
67
|
+
"@aztec/blob-lib": "0.83.1-nightly.20250404",
|
|
68
|
+
"@aztec/blob-sink": "0.83.1-nightly.20250404",
|
|
69
|
+
"@aztec/constants": "0.83.1-nightly.20250404",
|
|
70
|
+
"@aztec/ethereum": "0.83.1-nightly.20250404",
|
|
71
|
+
"@aztec/foundation": "0.83.1-nightly.20250404",
|
|
72
|
+
"@aztec/kv-store": "0.83.1-nightly.20250404",
|
|
73
|
+
"@aztec/l1-artifacts": "0.83.1-nightly.20250404",
|
|
74
|
+
"@aztec/noir-protocol-circuits-types": "0.83.1-nightly.20250404",
|
|
75
|
+
"@aztec/protocol-contracts": "0.83.1-nightly.20250404",
|
|
76
|
+
"@aztec/stdlib": "0.83.1-nightly.20250404",
|
|
77
|
+
"@aztec/telemetry-client": "0.83.1-nightly.20250404",
|
|
78
78
|
"debug": "^4.3.4",
|
|
79
79
|
"lodash.groupby": "^4.6.0",
|
|
80
80
|
"lodash.omit": "^4.5.0",
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { DefaultL1ContractsConfig } from '@aztec/ethereum';
|
|
2
2
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
3
3
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
|
+
import type { Fr } from '@aztec/foundation/fields';
|
|
4
5
|
import { createLogger } from '@aztec/foundation/log';
|
|
6
|
+
import type { FunctionSelector } from '@aztec/stdlib/abi';
|
|
7
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
8
|
import { L2Block, L2BlockHash, type L2BlockSource, type L2Tips } from '@aztec/stdlib/block';
|
|
9
|
+
import type { ContractClassPublic, ContractDataSource, ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
6
10
|
import { type L1RollupConstants, getSlotRangeForEpoch } from '@aztec/stdlib/epoch-helpers';
|
|
7
11
|
import { type BlockHeader, TxHash, TxReceipt, TxStatus } from '@aztec/stdlib/tx';
|
|
8
12
|
|
|
9
13
|
/**
|
|
10
14
|
* A mocked implementation of L2BlockSource to be used in tests.
|
|
11
15
|
*/
|
|
12
|
-
export class MockL2BlockSource implements L2BlockSource {
|
|
16
|
+
export class MockL2BlockSource implements L2BlockSource, ContractDataSource {
|
|
13
17
|
protected l2Blocks: L2Block[] = [];
|
|
14
18
|
|
|
15
19
|
private provenBlockNumber: number = 0;
|
|
@@ -221,4 +225,28 @@ export class MockL2BlockSource implements L2BlockSource {
|
|
|
221
225
|
this.log.verbose('Stopping mock L2 block source');
|
|
222
226
|
return Promise.resolve();
|
|
223
227
|
}
|
|
228
|
+
|
|
229
|
+
getContractClass(_id: Fr): Promise<ContractClassPublic | undefined> {
|
|
230
|
+
return Promise.resolve(undefined);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
getBytecodeCommitment(_id: Fr): Promise<Fr | undefined> {
|
|
234
|
+
return Promise.resolve(undefined);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
getContract(_address: AztecAddress, _blockNumber?: number): Promise<ContractInstanceWithAddress | undefined> {
|
|
238
|
+
return Promise.resolve(undefined);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
getContractClassIds(): Promise<Fr[]> {
|
|
242
|
+
return Promise.resolve([]);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
getDebugFunctionName(_address: AztecAddress, _selector: FunctionSelector): Promise<string | undefined> {
|
|
246
|
+
return Promise.resolve(undefined);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
registerContractFunctionSignatures(_address: AztecAddress, _signatures: string[]): Promise<void> {
|
|
250
|
+
return Promise.resolve();
|
|
251
|
+
}
|
|
224
252
|
}
|