@aztec/ethereum 4.0.0-nightly.20260128 → 4.0.0-nightly.20260129
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,3 +1,4 @@
|
|
|
1
|
+
import { type LoggerBindings } from '@aztec/foundation/log';
|
|
1
2
|
import { L1TxUtils } from './l1_tx_utils/index.js';
|
|
2
3
|
export type PublisherFilter<UtilsType extends L1TxUtils> = (utils: UtilsType) => boolean;
|
|
3
4
|
export declare class PublisherManager<UtilsType extends L1TxUtils = L1TxUtils> {
|
|
@@ -6,10 +7,10 @@ export declare class PublisherManager<UtilsType extends L1TxUtils = L1TxUtils> {
|
|
|
6
7
|
private config;
|
|
7
8
|
constructor(publishers: UtilsType[], config: {
|
|
8
9
|
publisherAllowInvalidStates?: boolean;
|
|
9
|
-
});
|
|
10
|
+
}, bindings?: LoggerBindings);
|
|
10
11
|
/** Loads the state of all publishers and resumes monitoring any pending txs */
|
|
11
12
|
loadState(): Promise<void>;
|
|
12
13
|
getAvailablePublisher(filter?: PublisherFilter<UtilsType>): Promise<UtilsType>;
|
|
13
14
|
interrupt(): void;
|
|
14
15
|
}
|
|
15
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGlzaGVyX21hbmFnZXIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9wdWJsaXNoZXJfbWFuYWdlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQWUsS0FBSyxjQUFjLEVBQWdCLE1BQU0sdUJBQXVCLENBQUM7QUFFdkYsT0FBTyxFQUFFLFNBQVMsRUFBZ0IsTUFBTSx3QkFBd0IsQ0FBQztBQXdCakUsTUFBTSxNQUFNLGVBQWUsQ0FBQyxTQUFTLFNBQVMsU0FBUyxJQUFJLENBQUMsS0FBSyxFQUFFLFNBQVMsS0FBSyxPQUFPLENBQUM7QUFFekYscUJBQWEsZ0JBQWdCLENBQUMsU0FBUyxTQUFTLFNBQVMsR0FBRyxTQUFTO0lBS2pFLE9BQU8sQ0FBQyxVQUFVO0lBSnBCLE9BQU8sQ0FBQyxHQUFHLENBQVM7SUFDcEIsT0FBTyxDQUFDLE1BQU0sQ0FBNEM7SUFFMUQsWUFDVSxVQUFVLEVBQUUsU0FBUyxFQUFFLEVBQy9CLE1BQU0sRUFBRTtRQUFFLDJCQUEyQixDQUFDLEVBQUUsT0FBTyxDQUFBO0tBQUUsRUFDakQsUUFBUSxDQUFDLEVBQUUsY0FBYyxFQU0xQjtJQUVELCtFQUErRTtJQUNsRSxTQUFTLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUV0QztJQVFZLHFCQUFxQixDQUFDLE1BQU0sR0FBRSxlQUFlLENBQUMsU0FBUyxDQUFjLEdBQUcsT0FBTyxDQUFDLFNBQVMsQ0FBQyxDQStDdEc7SUFFTSxTQUFTLFNBRWY7Q0FDRiJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publisher_manager.d.ts","sourceRoot":"","sources":["../src/publisher_manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"publisher_manager.d.ts","sourceRoot":"","sources":["../src/publisher_manager.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,KAAK,cAAc,EAAgB,MAAM,uBAAuB,CAAC;AAEvF,OAAO,EAAE,SAAS,EAAgB,MAAM,wBAAwB,CAAC;AAwBjE,MAAM,MAAM,eAAe,CAAC,SAAS,SAAS,SAAS,IAAI,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,CAAC;AAEzF,qBAAa,gBAAgB,CAAC,SAAS,SAAS,SAAS,GAAG,SAAS;IAKjE,OAAO,CAAC,UAAU;IAJpB,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,MAAM,CAA4C;IAE1D,YACU,UAAU,EAAE,SAAS,EAAE,EAC/B,MAAM,EAAE;QAAE,2BAA2B,CAAC,EAAE,OAAO,CAAA;KAAE,EACjD,QAAQ,CAAC,EAAE,cAAc,EAM1B;IAED,+EAA+E;IAClE,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAEtC;IAQY,qBAAqB,CAAC,MAAM,GAAE,eAAe,CAAC,SAAS,CAAc,GAAG,OAAO,CAAC,SAAS,CAAC,CA+CtG;IAEM,SAAS,SAEf;CACF"}
|
|
@@ -25,9 +25,9 @@ export class PublisherManager {
|
|
|
25
25
|
publishers;
|
|
26
26
|
log;
|
|
27
27
|
config;
|
|
28
|
-
constructor(publishers, config){
|
|
28
|
+
constructor(publishers, config, bindings){
|
|
29
29
|
this.publishers = publishers;
|
|
30
|
-
this.log = createLogger('publisher:manager');
|
|
30
|
+
this.log = createLogger('publisher:manager', bindings);
|
|
31
31
|
this.log.info(`PublisherManager initialized with ${publishers.length} publishers.`);
|
|
32
32
|
this.publishers = publishers;
|
|
33
33
|
this.config = pick(config, 'publisherAllowInvalidStates');
|
package/dest/test/start_anvil.js
CHANGED
|
@@ -16,7 +16,7 @@ import { dirname, resolve } from 'path';
|
|
|
16
16
|
const anvil = createAnvil({
|
|
17
17
|
anvilBinary,
|
|
18
18
|
host: '127.0.0.1',
|
|
19
|
-
port: opts.port ?? 8545,
|
|
19
|
+
port: opts.port ?? (process.env.ANVIL_PORT ? parseInt(process.env.ANVIL_PORT) : 8545),
|
|
20
20
|
blockTime: opts.l1BlockTime,
|
|
21
21
|
stopTimeout: 1000,
|
|
22
22
|
accounts: opts.accounts ?? 20,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/ethereum",
|
|
3
|
-
"version": "4.0.0-nightly.
|
|
3
|
+
"version": "4.0.0-nightly.20260129",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./account": "./dest/account.js",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"../package.common.json"
|
|
51
51
|
],
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@aztec/blob-lib": "4.0.0-nightly.
|
|
54
|
-
"@aztec/constants": "4.0.0-nightly.
|
|
55
|
-
"@aztec/foundation": "4.0.0-nightly.
|
|
56
|
-
"@aztec/l1-artifacts": "4.0.0-nightly.
|
|
53
|
+
"@aztec/blob-lib": "4.0.0-nightly.20260129",
|
|
54
|
+
"@aztec/constants": "4.0.0-nightly.20260129",
|
|
55
|
+
"@aztec/foundation": "4.0.0-nightly.20260129",
|
|
56
|
+
"@aztec/l1-artifacts": "4.0.0-nightly.20260129",
|
|
57
57
|
"@viem/anvil": "^0.0.10",
|
|
58
58
|
"dotenv": "^16.0.3",
|
|
59
59
|
"lodash.chunk": "^4.2.0",
|
package/src/publisher_manager.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { pick } from '@aztec/foundation/collection';
|
|
2
|
-
import { createLogger } from '@aztec/foundation/log';
|
|
2
|
+
import { type Logger, type LoggerBindings, createLogger } from '@aztec/foundation/log';
|
|
3
3
|
|
|
4
4
|
import { L1TxUtils, TxUtilsState } from './l1_tx_utils/index.js';
|
|
5
5
|
|
|
@@ -28,13 +28,15 @@ const busyStates: TxUtilsState[] = [
|
|
|
28
28
|
export type PublisherFilter<UtilsType extends L1TxUtils> = (utils: UtilsType) => boolean;
|
|
29
29
|
|
|
30
30
|
export class PublisherManager<UtilsType extends L1TxUtils = L1TxUtils> {
|
|
31
|
-
private log
|
|
31
|
+
private log: Logger;
|
|
32
32
|
private config: { publisherAllowInvalidStates?: boolean };
|
|
33
33
|
|
|
34
34
|
constructor(
|
|
35
35
|
private publishers: UtilsType[],
|
|
36
36
|
config: { publisherAllowInvalidStates?: boolean },
|
|
37
|
+
bindings?: LoggerBindings,
|
|
37
38
|
) {
|
|
39
|
+
this.log = createLogger('publisher:manager', bindings);
|
|
38
40
|
this.log.info(`PublisherManager initialized with ${publishers.length} publishers.`);
|
|
39
41
|
this.publishers = publishers;
|
|
40
42
|
this.config = pick(config, 'publisherAllowInvalidStates');
|
package/src/test/start_anvil.ts
CHANGED
|
@@ -33,7 +33,7 @@ export async function startAnvil(
|
|
|
33
33
|
const anvil = createAnvil({
|
|
34
34
|
anvilBinary,
|
|
35
35
|
host: '127.0.0.1',
|
|
36
|
-
port: opts.port ?? 8545,
|
|
36
|
+
port: opts.port ?? (process.env.ANVIL_PORT ? parseInt(process.env.ANVIL_PORT) : 8545),
|
|
37
37
|
blockTime: opts.l1BlockTime,
|
|
38
38
|
stopTimeout: 1000,
|
|
39
39
|
accounts: opts.accounts ?? 20,
|