@pimlico/alto 0.0.0-main.20240611T113559 → 0.0.0-prool.20240609T211112
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/esm/cli/config/bundler.d.ts +37 -43
- package/esm/cli/config/bundler.js +0 -1
- package/esm/cli/config/bundler.js.map +1 -1
- package/esm/cli/config/options.js +0 -6
- package/esm/cli/config/options.js.map +1 -1
- package/esm/cli/handler.js +2 -26
- package/esm/cli/handler.js.map +1 -1
- package/esm/index.d.ts +448 -1
- package/esm/index.js +63 -1
- package/esm/index.js.map +1 -1
- package/esm/mempool/mempool.js +7 -5
- package/esm/mempool/mempool.js.map +1 -1
- package/esm/mempool/reputationManager.js +3 -7
- package/esm/mempool/reputationManager.js.map +1 -1
- package/esm/rpc/EntryPointSimulationsV07.d.ts +1 -5
- package/esm/rpc/EntryPointSimulationsV07.js +2 -2
- package/esm/rpc/EntryPointSimulationsV07.js.map +1 -1
- package/esm/rpc/gasEstimation.js +3 -7
- package/esm/rpc/gasEstimation.js.map +1 -1
- package/esm/rpc/rpcHandler.js +8 -19
- package/esm/rpc/rpcHandler.js.map +1 -1
- package/esm/rpc/server.js +0 -4
- package/esm/rpc/server.js.map +1 -1
- package/esm/rpc/validation/SafeValidator.d.ts +6 -2
- package/esm/rpc/validation/SafeValidator.js +206 -49
- package/esm/rpc/validation/SafeValidator.js.map +1 -1
- package/esm/rpc/validation/TracerResultParserV07.js +2 -6
- package/esm/rpc/validation/TracerResultParserV07.js.map +1 -1
- package/esm/rpc/validation/UnsafeValidator.d.ts +1 -2
- package/esm/rpc/validation/UnsafeValidator.js +45 -45
- package/esm/rpc/validation/UnsafeValidator.js.map +1 -1
- package/esm/rpc/validation/tracer.d.ts +1 -1
- package/esm/types/contracts/EntryPointSimulations.d.ts +1 -0
- package/esm/types/contracts/EntryPointSimulations.js +2 -1941
- package/esm/types/contracts/EntryPointSimulations.js.map +1 -1
- package/esm/types/contracts/PimlicoEntryPointSimulations.d.ts +1 -1
- package/esm/types/contracts/PimlicoEntryPointSimulations.js +1 -1
- package/esm/types/contracts/PimlicoEntryPointSimulations.js.map +1 -1
- package/esm/types/schemas.d.ts +116 -116
- package/esm/types/validation.d.ts +12 -12
- package/esm/utils/index.d.ts +1 -0
- package/esm/utils/index.js +1 -0
- package/esm/utils/index.js.map +1 -1
- package/esm/utils/metrics.d.ts +4 -4
- package/esm/utils/test.d.ts +1 -1
- package/esm/utils/toArgs.d.ts +36 -0
- package/esm/utils/toArgs.js +80 -0
- package/esm/utils/toArgs.js.map +1 -0
- package/esm/utils/userop.d.ts +2 -2
- package/esm/utils/userop.js +2 -2
- package/esm/utils/userop.js.map +1 -1
- package/lib/cli/config/bundler.d.ts +37 -43
- package/lib/cli/config/bundler.js +0 -1
- package/lib/cli/config/bundler.js.map +1 -1
- package/lib/cli/config/options.js +0 -6
- package/lib/cli/config/options.js.map +1 -1
- package/lib/cli/handler.js +1 -25
- package/lib/cli/handler.js.map +1 -1
- package/lib/index.d.ts +448 -1
- package/lib/index.js +64 -1
- package/lib/index.js.map +1 -1
- package/lib/mempool/mempool.js +7 -5
- package/lib/mempool/mempool.js.map +1 -1
- package/lib/mempool/reputationManager.js +3 -7
- package/lib/mempool/reputationManager.js.map +1 -1
- package/lib/rpc/EntryPointSimulationsV07.d.ts +1 -5
- package/lib/rpc/EntryPointSimulationsV07.js +2 -3
- package/lib/rpc/EntryPointSimulationsV07.js.map +1 -1
- package/lib/rpc/gasEstimation.js +3 -7
- package/lib/rpc/gasEstimation.js.map +1 -1
- package/lib/rpc/rpcHandler.js +7 -18
- package/lib/rpc/rpcHandler.js.map +1 -1
- package/lib/rpc/server.js +0 -4
- package/lib/rpc/server.js.map +1 -1
- package/lib/rpc/validation/SafeValidator.d.ts +6 -2
- package/lib/rpc/validation/SafeValidator.js +205 -48
- package/lib/rpc/validation/SafeValidator.js.map +1 -1
- package/lib/rpc/validation/TracerResultParserV07.js +2 -6
- package/lib/rpc/validation/TracerResultParserV07.js.map +1 -1
- package/lib/rpc/validation/UnsafeValidator.d.ts +1 -2
- package/lib/rpc/validation/UnsafeValidator.js +68 -45
- package/lib/rpc/validation/UnsafeValidator.js.map +1 -1
- package/lib/rpc/validation/tracer.d.ts +1 -1
- package/lib/types/contracts/EntryPointSimulations.d.ts +1 -0
- package/lib/types/contracts/EntryPointSimulations.js +3 -1942
- package/lib/types/contracts/EntryPointSimulations.js.map +1 -1
- package/lib/types/contracts/PimlicoEntryPointSimulations.d.ts +1 -1
- package/lib/types/contracts/PimlicoEntryPointSimulations.js +2 -2
- package/lib/types/contracts/PimlicoEntryPointSimulations.js.map +1 -1
- package/lib/types/schemas.d.ts +116 -116
- package/lib/types/validation.d.ts +12 -12
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +1 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/metrics.d.ts +4 -4
- package/lib/utils/test.d.ts +1 -1
- package/lib/utils/toArgs.d.ts +36 -0
- package/lib/utils/toArgs.js +87 -0
- package/lib/utils/toArgs.js.map +1 -0
- package/lib/utils/userop.d.ts +2 -2
- package/lib/utils/userop.js +25 -2
- package/lib/utils/userop.js.map +1 -1
- package/package.json +3 -2
|
@@ -4343,6 +4343,7 @@ export declare const errorCauseSchema: z.ZodObject<{
|
|
|
4343
4343
|
errorName: "ValidationResultWithAggregation";
|
|
4344
4344
|
}>]>;
|
|
4345
4345
|
}, "strip", z.ZodTypeAny, {
|
|
4346
|
+
name: "ContractFunctionRevertedError";
|
|
4346
4347
|
data: {
|
|
4347
4348
|
args: {
|
|
4348
4349
|
aggregator: `0x${string}`;
|
|
@@ -4637,8 +4638,8 @@ export declare const errorCauseSchema: z.ZodObject<{
|
|
|
4637
4638
|
} | undefined);
|
|
4638
4639
|
errorName: "ValidationResultWithAggregation";
|
|
4639
4640
|
};
|
|
4640
|
-
name: "ContractFunctionRevertedError";
|
|
4641
4641
|
}, {
|
|
4642
|
+
name: "ContractFunctionRevertedError";
|
|
4642
4643
|
data: {
|
|
4643
4644
|
args: [string];
|
|
4644
4645
|
errorName: "SignatureValidationFailed";
|
|
@@ -4850,7 +4851,6 @@ export declare const errorCauseSchema: z.ZodObject<{
|
|
|
4850
4851
|
} | undefined] | undefined);
|
|
4851
4852
|
errorName: "ValidationResultWithAggregation";
|
|
4852
4853
|
};
|
|
4853
|
-
name: "ContractFunctionRevertedError";
|
|
4854
4854
|
}>;
|
|
4855
4855
|
export type ErrorCause = z.infer<typeof errorCauseSchema>;
|
|
4856
4856
|
export declare const vmExecutionError: z.ZodObject<{
|
|
@@ -7132,6 +7132,7 @@ export declare const entryPointExecutionErrorSchemaV06: z.ZodEffects<z.ZodObject
|
|
|
7132
7132
|
errorName: "ValidationResultWithAggregation";
|
|
7133
7133
|
}>]>;
|
|
7134
7134
|
}, "strip", z.ZodTypeAny, {
|
|
7135
|
+
name: "ContractFunctionRevertedError";
|
|
7135
7136
|
data: {
|
|
7136
7137
|
args: {
|
|
7137
7138
|
aggregator: `0x${string}`;
|
|
@@ -7426,8 +7427,8 @@ export declare const entryPointExecutionErrorSchemaV06: z.ZodEffects<z.ZodObject
|
|
|
7426
7427
|
} | undefined);
|
|
7427
7428
|
errorName: "ValidationResultWithAggregation";
|
|
7428
7429
|
};
|
|
7429
|
-
name: "ContractFunctionRevertedError";
|
|
7430
7430
|
}, {
|
|
7431
|
+
name: "ContractFunctionRevertedError";
|
|
7431
7432
|
data: {
|
|
7432
7433
|
args: [string];
|
|
7433
7434
|
errorName: "SignatureValidationFailed";
|
|
@@ -7639,7 +7640,6 @@ export declare const entryPointExecutionErrorSchemaV06: z.ZodEffects<z.ZodObject
|
|
|
7639
7640
|
} | undefined] | undefined);
|
|
7640
7641
|
errorName: "ValidationResultWithAggregation";
|
|
7641
7642
|
};
|
|
7642
|
-
name: "ContractFunctionRevertedError";
|
|
7643
7643
|
}>, z.ZodObject<{
|
|
7644
7644
|
name: z.ZodLiteral<"CallExecutionError">;
|
|
7645
7645
|
cause: z.ZodObject<{
|
|
@@ -8854,6 +8854,7 @@ export declare const entryPointExecutionErrorSchemaV06: z.ZodEffects<z.ZodObject
|
|
|
8854
8854
|
}, "strip", z.ZodTypeAny, {
|
|
8855
8855
|
name: "ContractFunctionExecutionError";
|
|
8856
8856
|
cause: {
|
|
8857
|
+
name: "ContractFunctionRevertedError";
|
|
8857
8858
|
data: {
|
|
8858
8859
|
args: {
|
|
8859
8860
|
aggregator: `0x${string}`;
|
|
@@ -9148,7 +9149,6 @@ export declare const entryPointExecutionErrorSchemaV06: z.ZodEffects<z.ZodObject
|
|
|
9148
9149
|
} | undefined);
|
|
9149
9150
|
errorName: "ValidationResultWithAggregation";
|
|
9150
9151
|
};
|
|
9151
|
-
name: "ContractFunctionRevertedError";
|
|
9152
9152
|
} | {
|
|
9153
9153
|
name: "CallExecutionError";
|
|
9154
9154
|
cause: {
|
|
@@ -9454,6 +9454,7 @@ export declare const entryPointExecutionErrorSchemaV06: z.ZodEffects<z.ZodObject
|
|
|
9454
9454
|
}, {
|
|
9455
9455
|
name: "ContractFunctionExecutionError";
|
|
9456
9456
|
cause: {
|
|
9457
|
+
name: "ContractFunctionRevertedError";
|
|
9457
9458
|
data: {
|
|
9458
9459
|
args: [string];
|
|
9459
9460
|
errorName: "SignatureValidationFailed";
|
|
@@ -9665,7 +9666,6 @@ export declare const entryPointExecutionErrorSchemaV06: z.ZodEffects<z.ZodObject
|
|
|
9665
9666
|
} | undefined] | undefined);
|
|
9666
9667
|
errorName: "ValidationResultWithAggregation";
|
|
9667
9668
|
};
|
|
9668
|
-
name: "ContractFunctionRevertedError";
|
|
9669
9669
|
} | {
|
|
9670
9670
|
name: "CallExecutionError";
|
|
9671
9671
|
cause: {
|
|
@@ -9971,6 +9971,7 @@ export declare const entryPointExecutionErrorSchemaV06: z.ZodEffects<z.ZodObject
|
|
|
9971
9971
|
}, {
|
|
9972
9972
|
name: "ContractFunctionExecutionError";
|
|
9973
9973
|
cause: {
|
|
9974
|
+
name: "ContractFunctionRevertedError";
|
|
9974
9975
|
data: {
|
|
9975
9976
|
args: [string];
|
|
9976
9977
|
errorName: "SignatureValidationFailed";
|
|
@@ -10182,7 +10183,6 @@ export declare const entryPointExecutionErrorSchemaV06: z.ZodEffects<z.ZodObject
|
|
|
10182
10183
|
} | undefined] | undefined);
|
|
10183
10184
|
errorName: "ValidationResultWithAggregation";
|
|
10184
10185
|
};
|
|
10185
|
-
name: "ContractFunctionRevertedError";
|
|
10186
10186
|
} | {
|
|
10187
10187
|
name: "CallExecutionError";
|
|
10188
10188
|
cause: {
|
|
@@ -11262,6 +11262,7 @@ export declare const entryPointExecutionErrorSchemaV07: z.ZodEffects<z.ZodObject
|
|
|
11262
11262
|
errorName: "ValidationResultWithAggregation";
|
|
11263
11263
|
}>]>;
|
|
11264
11264
|
}, "strip", z.ZodTypeAny, {
|
|
11265
|
+
name: "ContractFunctionRevertedError";
|
|
11265
11266
|
data: {
|
|
11266
11267
|
args: {
|
|
11267
11268
|
aggregator: `0x${string}`;
|
|
@@ -11556,8 +11557,8 @@ export declare const entryPointExecutionErrorSchemaV07: z.ZodEffects<z.ZodObject
|
|
|
11556
11557
|
} | undefined);
|
|
11557
11558
|
errorName: "ValidationResultWithAggregation";
|
|
11558
11559
|
};
|
|
11559
|
-
name: "ContractFunctionRevertedError";
|
|
11560
11560
|
}, {
|
|
11561
|
+
name: "ContractFunctionRevertedError";
|
|
11561
11562
|
data: {
|
|
11562
11563
|
args: [string];
|
|
11563
11564
|
errorName: "SignatureValidationFailed";
|
|
@@ -11769,7 +11770,6 @@ export declare const entryPointExecutionErrorSchemaV07: z.ZodEffects<z.ZodObject
|
|
|
11769
11770
|
} | undefined] | undefined);
|
|
11770
11771
|
errorName: "ValidationResultWithAggregation";
|
|
11771
11772
|
};
|
|
11772
|
-
name: "ContractFunctionRevertedError";
|
|
11773
11773
|
}>, z.ZodObject<{
|
|
11774
11774
|
name: z.ZodLiteral<"CallExecutionError">;
|
|
11775
11775
|
cause: z.ZodObject<{
|
|
@@ -12984,6 +12984,7 @@ export declare const entryPointExecutionErrorSchemaV07: z.ZodEffects<z.ZodObject
|
|
|
12984
12984
|
}, "strip", z.ZodTypeAny, {
|
|
12985
12985
|
name: "ContractFunctionExecutionError";
|
|
12986
12986
|
cause: {
|
|
12987
|
+
name: "ContractFunctionRevertedError";
|
|
12987
12988
|
data: {
|
|
12988
12989
|
args: {
|
|
12989
12990
|
aggregator: `0x${string}`;
|
|
@@ -13278,7 +13279,6 @@ export declare const entryPointExecutionErrorSchemaV07: z.ZodEffects<z.ZodObject
|
|
|
13278
13279
|
} | undefined);
|
|
13279
13280
|
errorName: "ValidationResultWithAggregation";
|
|
13280
13281
|
};
|
|
13281
|
-
name: "ContractFunctionRevertedError";
|
|
13282
13282
|
} | {
|
|
13283
13283
|
name: "CallExecutionError";
|
|
13284
13284
|
cause: {
|
|
@@ -13584,6 +13584,7 @@ export declare const entryPointExecutionErrorSchemaV07: z.ZodEffects<z.ZodObject
|
|
|
13584
13584
|
}, {
|
|
13585
13585
|
name: "ContractFunctionExecutionError";
|
|
13586
13586
|
cause: {
|
|
13587
|
+
name: "ContractFunctionRevertedError";
|
|
13587
13588
|
data: {
|
|
13588
13589
|
args: [string];
|
|
13589
13590
|
errorName: "SignatureValidationFailed";
|
|
@@ -13795,7 +13796,6 @@ export declare const entryPointExecutionErrorSchemaV07: z.ZodEffects<z.ZodObject
|
|
|
13795
13796
|
} | undefined] | undefined);
|
|
13796
13797
|
errorName: "ValidationResultWithAggregation";
|
|
13797
13798
|
};
|
|
13798
|
-
name: "ContractFunctionRevertedError";
|
|
13799
13799
|
} | {
|
|
13800
13800
|
name: "CallExecutionError";
|
|
13801
13801
|
cause: {
|
|
@@ -14101,6 +14101,7 @@ export declare const entryPointExecutionErrorSchemaV07: z.ZodEffects<z.ZodObject
|
|
|
14101
14101
|
}, {
|
|
14102
14102
|
name: "ContractFunctionExecutionError";
|
|
14103
14103
|
cause: {
|
|
14104
|
+
name: "ContractFunctionRevertedError";
|
|
14104
14105
|
data: {
|
|
14105
14106
|
args: [string];
|
|
14106
14107
|
errorName: "SignatureValidationFailed";
|
|
@@ -14312,7 +14313,6 @@ export declare const entryPointExecutionErrorSchemaV07: z.ZodEffects<z.ZodObject
|
|
|
14312
14313
|
} | undefined] | undefined);
|
|
14313
14314
|
errorName: "ValidationResultWithAggregation";
|
|
14314
14315
|
};
|
|
14315
|
-
name: "ContractFunctionRevertedError";
|
|
14316
14316
|
} | {
|
|
14317
14317
|
name: "CallExecutionError";
|
|
14318
14318
|
cause: {
|
package/esm/utils/index.d.ts
CHANGED
package/esm/utils/index.js
CHANGED
package/esm/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,sBAAsB,CAAA;AACpC,cAAc,WAAW,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,QAAQ,CAAA;AACtB,cAAc,cAAc,CAAA;AAC5B,cAAc,UAAU,CAAA;AACxB,cAAc,sBAAsB,CAAA;AACpC,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA"}
|
package/esm/utils/metrics.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Counter, Gauge, Histogram, type Registry } from "prom-client";
|
|
2
2
|
export type Metrics = ReturnType<typeof createMetrics>;
|
|
3
3
|
export declare function createMetrics(registry: Registry, register?: boolean): {
|
|
4
|
-
httpRequests: Counter<"code" | "
|
|
5
|
-
httpRequestsDuration: Histogram<"code" | "
|
|
4
|
+
httpRequests: Counter<"code" | "route" | "network" | "chainId" | "rpc_method" | "rpc_status" | "method">;
|
|
5
|
+
httpRequestsDuration: Histogram<"code" | "route" | "network" | "chainId" | "rpc_method" | "rpc_status" | "method" | "api_version">;
|
|
6
6
|
userOperationsInMempool: Gauge<"status" | "network" | "chainId">;
|
|
7
7
|
walletsAvailable: Gauge<never>;
|
|
8
8
|
walletsTotal: Gauge<never>;
|
|
@@ -10,13 +10,13 @@ export declare function createMetrics(registry: Registry, register?: boolean): {
|
|
|
10
10
|
userOperationsSubmitted: Counter<"status">;
|
|
11
11
|
bundlesIncluded: Counter<never>;
|
|
12
12
|
bundlesSubmitted: Counter<"status">;
|
|
13
|
-
userOperationsReceived: Counter<"
|
|
13
|
+
userOperationsReceived: Counter<"status" | "type">;
|
|
14
14
|
userOperationsValidationSuccess: Counter<never>;
|
|
15
15
|
userOperationsValidationFailure: Counter<never>;
|
|
16
16
|
userOperationInclusionDuration: Histogram<never>;
|
|
17
17
|
verificationGasLimitEstimationTime: Histogram<never>;
|
|
18
18
|
verificationGasLimitEstimationCount: Histogram<never>;
|
|
19
|
-
replacedTransactions: Counter<"
|
|
19
|
+
replacedTransactions: Counter<"status" | "reason">;
|
|
20
20
|
userOperationsResubmitted: Counter<never>;
|
|
21
21
|
};
|
|
22
22
|
//# sourceMappingURL=metrics.d.ts.map
|
package/esm/utils/test.d.ts
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export type ExtractPathReturnType = {
|
|
2
|
+
id: number | undefined;
|
|
3
|
+
path: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Parse a request url into an object containing the id and path.
|
|
7
|
+
*
|
|
8
|
+
* @param request The request url.
|
|
9
|
+
* @returns The parsed request context or undefined.
|
|
10
|
+
*/
|
|
11
|
+
export declare function extractPath(request: string): ExtractPathReturnType;
|
|
12
|
+
/**
|
|
13
|
+
* Strips ANSI color codes from a string.
|
|
14
|
+
*
|
|
15
|
+
* @param message The string to strip.
|
|
16
|
+
* @returns The stripped string.
|
|
17
|
+
*/
|
|
18
|
+
export declare function stripColors(message: string): string;
|
|
19
|
+
export type ToArgsParameters = {
|
|
20
|
+
[key: string]: Record<string, string> | string | readonly string[] | boolean | number | bigint | undefined;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Converts an object of options to an array of command line arguments.
|
|
24
|
+
*
|
|
25
|
+
* @param options The options object.
|
|
26
|
+
* @returns The command line arguments.
|
|
27
|
+
*/
|
|
28
|
+
export declare function toArgs(parameters: ToArgsParameters): string[];
|
|
29
|
+
/**
|
|
30
|
+
* Converts a camelCase string to a flag case string.
|
|
31
|
+
*
|
|
32
|
+
* @param key The camelCase string.
|
|
33
|
+
* @returns The flag case string.
|
|
34
|
+
*/
|
|
35
|
+
export declare function toFlagCase(key: string): string;
|
|
36
|
+
//# sourceMappingURL=toArgs.d.ts.map
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a request url into an object containing the id and path.
|
|
3
|
+
*
|
|
4
|
+
* @param request The request url.
|
|
5
|
+
* @returns The parsed request context or undefined.
|
|
6
|
+
*/
|
|
7
|
+
export function extractPath(request) {
|
|
8
|
+
const host = "http://localhost"; // Dummy value for URL constructor
|
|
9
|
+
const url = new URL(`${host}${request ?? "/"}`);
|
|
10
|
+
const [idOrPath, ...pathname] = url.pathname
|
|
11
|
+
.split("/")
|
|
12
|
+
.filter((part) => part !== "");
|
|
13
|
+
const id = !Number.isNaN(Number(idOrPath)) && Number(idOrPath) > 0
|
|
14
|
+
? Number(idOrPath)
|
|
15
|
+
: undefined;
|
|
16
|
+
const path = `/${typeof id === "number"
|
|
17
|
+
? pathname.join("/")
|
|
18
|
+
: [idOrPath, ...pathname].join("/")}`;
|
|
19
|
+
return { id, path };
|
|
20
|
+
}
|
|
21
|
+
const ansiColorRegex =
|
|
22
|
+
// biome-ignore lint/suspicious/noControlCharactersInRegex: <explanation>
|
|
23
|
+
/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g;
|
|
24
|
+
/**
|
|
25
|
+
* Strips ANSI color codes from a string.
|
|
26
|
+
*
|
|
27
|
+
* @param message The string to strip.
|
|
28
|
+
* @returns The stripped string.
|
|
29
|
+
*/
|
|
30
|
+
export function stripColors(message) {
|
|
31
|
+
return message.replace(ansiColorRegex, "");
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Converts an object of options to an array of command line arguments.
|
|
35
|
+
*
|
|
36
|
+
* @param options The options object.
|
|
37
|
+
* @returns The command line arguments.
|
|
38
|
+
*/
|
|
39
|
+
export function toArgs(parameters) {
|
|
40
|
+
return Object.entries(parameters).flatMap(([key, value]) => {
|
|
41
|
+
if (value === undefined) {
|
|
42
|
+
return [];
|
|
43
|
+
}
|
|
44
|
+
if (Array.isArray(value)) {
|
|
45
|
+
return [toFlagCase(key), value.join(",")];
|
|
46
|
+
}
|
|
47
|
+
if (typeof value === "object" && value !== null) {
|
|
48
|
+
return Object.entries(value).flatMap(([subKey, subValue]) => {
|
|
49
|
+
if (subValue === undefined) {
|
|
50
|
+
return [];
|
|
51
|
+
}
|
|
52
|
+
const flag = toFlagCase(key);
|
|
53
|
+
const value = `${subKey}: ${subValue}`;
|
|
54
|
+
return [flag, value];
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
const flag = toFlagCase(key);
|
|
58
|
+
if (value === false) {
|
|
59
|
+
return [flag, "false"];
|
|
60
|
+
}
|
|
61
|
+
if (value === true) {
|
|
62
|
+
return [flag];
|
|
63
|
+
}
|
|
64
|
+
const stringified = value.toString();
|
|
65
|
+
if (stringified === "") {
|
|
66
|
+
return [flag];
|
|
67
|
+
}
|
|
68
|
+
return [flag, stringified];
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Converts a camelCase string to a flag case string.
|
|
73
|
+
*
|
|
74
|
+
* @param key The camelCase string.
|
|
75
|
+
* @returns The flag case string.
|
|
76
|
+
*/
|
|
77
|
+
export function toFlagCase(key) {
|
|
78
|
+
return `--${key.replace(/[A-Z]/g, (match) => `-${match.toLowerCase()}`)}`;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=toArgs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toArgs.js","sourceRoot":"","sources":["../../utils/toArgs.ts"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,OAAe;IACvC,MAAM,IAAI,GAAG,kBAAkB,CAAA,CAAC,kCAAkC;IAClE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,IAAI,GAAG,OAAO,IAAI,GAAG,EAAE,CAAC,CAAA;IAC/C,MAAM,CAAC,QAAQ,EAAE,GAAG,QAAQ,CAAC,GAAG,GAAG,CAAC,QAAQ;SACvC,KAAK,CAAC,GAAG,CAAC;SACV,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAA;IAElC,MAAM,EAAE,GACJ,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC;QACnD,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QAClB,CAAC,CAAC,SAAS,CAAA;IACnB,MAAM,IAAI,GAAG,IACT,OAAO,EAAE,KAAK,QAAQ;QAClB,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;QACpB,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAC1C,EAAE,CAAA;IAEF,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAA;AACvB,CAAC;AAED,MAAM,cAAc;AAChB,yEAA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AE,CAAC;YACjB,OAAO,CAAC,IAAI,CAAC,CAAA;QACjB,CAAC;QAED,MAAM,WAAW,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAA;QACpC,IAAI,WAAW,KAAK,EAAE,EAAE,CAAC;YACrB,OAAO,CAAC,IAAI,CAAC,CAAA;QACjB,CAAC;QAED,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAA;IAC9B,CAAC,CAAC,CAAA;AACN,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,GAAW;IAClC,OAAO,KAAK,GAAG,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC,EAAE,CAAA;AAC7E,CAAC"}
|
package/esm/utils/userop.d.ts
CHANGED
|
@@ -36,10 +36,10 @@ export declare function toPackedUserOperation(unpackedUserOperation: UserOperati
|
|
|
36
36
|
export declare function deepHexlify(obj: any): any;
|
|
37
37
|
export declare function getAddressFromInitCodeOrPaymasterAndData(data: Hex): Address | null;
|
|
38
38
|
export declare const transactionIncluded: (isVersion06: boolean, txHash: HexData32, publicClient: PublicClient, entryPoint: Address) => Promise<{
|
|
39
|
-
|
|
39
|
+
status: "included" | "reverted" | "failed" | "not_found";
|
|
40
|
+
[userOperationHash: HexData32]: {
|
|
40
41
|
accountDeployed: boolean;
|
|
41
42
|
};
|
|
42
|
-
status: "included" | "reverted" | "failed" | "not_found";
|
|
43
43
|
}>;
|
|
44
44
|
export declare const getUserOperationHashV06: (userOperation: UserOperationV06, entryPointAddress: Address, chainId: number) => `0x${string}`;
|
|
45
45
|
export declare const getUserOperationHashV07: (userOperation: PackedUserOperation, entryPointAddress: Address, chainId: number) => `0x${string}`;
|
package/esm/utils/userop.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EntryPointV06Abi, EntryPointV07Abi } from "../types/index.js";
|
|
2
|
-
import
|
|
2
|
+
import * as sentry from "@sentry/node";
|
|
3
3
|
import { decodeEventLog, encodeAbiParameters, getAddress, keccak256, toHex, concat, slice, pad } from "viem";
|
|
4
4
|
import { areAddressesEqual } from "./helpers.js";
|
|
5
5
|
// Type predicate check if the UserOperation is V06.
|
|
@@ -167,7 +167,7 @@ export const transactionIncluded = async (isVersion06, txHash, publicClient, ent
|
|
|
167
167
|
return undefined;
|
|
168
168
|
}
|
|
169
169
|
catch (_e) {
|
|
170
|
-
captureException(_e);
|
|
170
|
+
sentry.captureException(_e);
|
|
171
171
|
return undefined;
|
|
172
172
|
}
|
|
173
173
|
}
|
package/esm/utils/userop.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userop.js","sourceRoot":"","sources":["../../utils/userop.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,gBAAgB,
|
|
1
|
+
{"version":3,"file":"userop.js","sourceRoot":"","sources":["../../utils/userop.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,gBAAgB,EAMhB,gBAAgB,EACnB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,MAAM,MAAM,cAAc,CAAA;AACtC,OAAO,EAIH,cAAc,EACd,mBAAmB,EACnB,UAAU,EACV,SAAS,EACT,KAAK,EACL,MAAM,EACN,KAAK,EACL,GAAG,EACN,MAAM,MAAM,CAAA;AACb,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAA;AAE7C,oDAAoD;AACpD,MAAM,UAAU,WAAW,CACvB,SAAwB;IAExB,OAAO,UAAU,IAAI,SAAS,IAAI,kBAAkB,IAAI,SAAS,CAAA;AACrE,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,WAAW,CACvB,SAAwB;IAExB,OAAO,SAAS,IAAI,SAAS,IAAI,WAAW,IAAI,SAAS,CAAA;AAC7D,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,qBAAuC;IAC/D,OAAO,qBAAqB,CAAC,OAAO;QAChC,CAAC,CAAC,MAAM,CAAC;YACH,qB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IAExC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,cAAc,CAC3C,mBAAmB,CAAC,QAAQ,CAC/B,CAAA;IAED,MAAM,EAAE,YAAY,EAAE,oBAAoB,EAAE,GAAG,sBAAsB,CACjE,mBAAmB,CAAC,gBAAgB,CACvC,CAAA;IAED,MAAM,EAAE,YAAY,EAAE,oBAAoB,EAAE,GAAG,eAAe,CAC1D,mBAAmB,CAAC,OAAO,CAC9B,CAAA;IAED,MAAM,EACF,SAAS,EACT,6BAA6B,EAC7B,uBAAuB,EACvB,aAAa,EAChB,GAAG,sBAAsB,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAA;IAEhE,OAAO;QACH,MAAM,EAAE,mBAAmB,CAAC,MAAM;QAClC,KAAK,EAAE,mBAAmB,CAAC,KAAK;QAChC,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,WAAW;QACxB,QAAQ,EAAE,mBAAmB,CAAC,QAAQ;QACtC,YAAY,EAAE,YAAY;QAC1B,oBAAoB,EAAE,oBAAoB;QAC1C,kBAAkB,EAAE,mBAAmB,CAAC,kBAAkB;QAC1D,YAAY,EAAE,YAAY;QAC1B,oBAAoB,EAAE,oBAAoB;QAC1C,SAAS,EAAE,SAAS;QACpB,6BAA6B,EAAE,6BAA6B;QAC5D,uBAAuB,EAAE,uBAAuB;QAChD,aAAa,EAAE,aAAa;QAC5B,SAAS,EAAE,mBAAmB,CAAC,SAAS;KAC3C,CAAA;AACL,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCE"}
|
|
@@ -162,46 +162,43 @@ export declare const logArgsSchema: z.ZodObject<{
|
|
|
162
162
|
}, "strip", z.ZodTypeAny, {
|
|
163
163
|
json: boolean;
|
|
164
164
|
"network-name": string;
|
|
165
|
-
"log-level": "error" | "
|
|
166
|
-
"public-client-log-level"?: "error" | "
|
|
167
|
-
"wallet-client-log-level"?: "error" | "
|
|
168
|
-
"rpc-log-level"?: "error" | "
|
|
169
|
-
"mempool-log-level"?: "error" | "
|
|
170
|
-
"executor-log-level"?: "error" | "
|
|
171
|
-
"reputation-manager-log-level"?: "error" | "
|
|
172
|
-
"nonce-queuer-log-level"?: "error" | "
|
|
165
|
+
"log-level": "error" | "debug" | "fatal" | "warn" | "info" | "trace";
|
|
166
|
+
"public-client-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
167
|
+
"wallet-client-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
168
|
+
"rpc-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
169
|
+
"mempool-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
170
|
+
"executor-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
171
|
+
"reputation-manager-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
172
|
+
"nonce-queuer-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
173
173
|
}, {
|
|
174
174
|
json: boolean;
|
|
175
175
|
"network-name": string;
|
|
176
|
-
"log-level": "error" | "
|
|
177
|
-
"public-client-log-level"?: "error" | "
|
|
178
|
-
"wallet-client-log-level"?: "error" | "
|
|
179
|
-
"rpc-log-level"?: "error" | "
|
|
180
|
-
"mempool-log-level"?: "error" | "
|
|
181
|
-
"executor-log-level"?: "error" | "
|
|
182
|
-
"reputation-manager-log-level"?: "error" | "
|
|
183
|
-
"nonce-queuer-log-level"?: "error" | "
|
|
176
|
+
"log-level": "error" | "debug" | "fatal" | "warn" | "info" | "trace";
|
|
177
|
+
"public-client-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
178
|
+
"wallet-client-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
179
|
+
"rpc-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
180
|
+
"mempool-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
181
|
+
"executor-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
182
|
+
"reputation-manager-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
183
|
+
"nonce-queuer-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
184
184
|
}>;
|
|
185
185
|
export declare const debugArgsSchema: z.ZodObject<{
|
|
186
186
|
"bundle-mode": z.ZodEnum<["auto", "manual"]>;
|
|
187
187
|
"enable-debug-endpoints": z.ZodBoolean;
|
|
188
188
|
"expiration-check": z.ZodBoolean;
|
|
189
189
|
"dangerous-skip-user-operation-validation": z.ZodBoolean;
|
|
190
|
-
"deploy-simulations-contract": z.ZodBoolean;
|
|
191
190
|
tenderly: z.ZodBoolean;
|
|
192
191
|
}, "strip", z.ZodTypeAny, {
|
|
193
192
|
"bundle-mode": "manual" | "auto";
|
|
194
193
|
"enable-debug-endpoints": boolean;
|
|
195
194
|
"expiration-check": boolean;
|
|
196
195
|
"dangerous-skip-user-operation-validation": boolean;
|
|
197
|
-
"deploy-simulations-contract": boolean;
|
|
198
196
|
tenderly: boolean;
|
|
199
197
|
}, {
|
|
200
198
|
"bundle-mode": "manual" | "auto";
|
|
201
199
|
"enable-debug-endpoints": boolean;
|
|
202
200
|
"expiration-check": boolean;
|
|
203
201
|
"dangerous-skip-user-operation-validation": boolean;
|
|
204
|
-
"deploy-simulations-contract": boolean;
|
|
205
202
|
tenderly: boolean;
|
|
206
203
|
}>;
|
|
207
204
|
export type IBundlerArgs = z.infer<typeof bundlerArgsSchema>;
|
|
@@ -223,7 +220,6 @@ export declare const optionArgsSchema: z.ZodObject<{
|
|
|
223
220
|
"enable-debug-endpoints": z.ZodBoolean;
|
|
224
221
|
"expiration-check": z.ZodBoolean;
|
|
225
222
|
"dangerous-skip-user-operation-validation": z.ZodBoolean;
|
|
226
|
-
"deploy-simulations-contract": z.ZodBoolean;
|
|
227
223
|
tenderly: z.ZodBoolean;
|
|
228
224
|
"bundle-bulker-address": z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
|
|
229
225
|
"per-op-inflator-address": z.ZodOptional<z.ZodEffects<z.ZodString, `0x${string}`, string>>;
|
|
@@ -280,7 +276,10 @@ export declare const optionArgsSchema: z.ZodObject<{
|
|
|
280
276
|
"enforce-unique-senders-per-bundle": z.ZodDefault<z.ZodBoolean>;
|
|
281
277
|
"max-gas-per-bundle": z.ZodDefault<z.ZodEffects<z.ZodString, bigint, string>>;
|
|
282
278
|
}, "strip", z.ZodTypeAny, {
|
|
279
|
+
port: number;
|
|
280
|
+
json: boolean;
|
|
283
281
|
entrypoints: `0x${string}`[];
|
|
282
|
+
websocket: boolean;
|
|
284
283
|
"safe-mode": boolean;
|
|
285
284
|
"executor-private-keys": import("viem").PrivateKeyAccount[];
|
|
286
285
|
"executor-refill-interval": number;
|
|
@@ -308,39 +307,37 @@ export declare const optionArgsSchema: z.ZodObject<{
|
|
|
308
307
|
"local-gas-limit-calculation": boolean;
|
|
309
308
|
"flush-stuck-transactions-during-startup": boolean;
|
|
310
309
|
"paymaster-gas-limit-multiplier": bigint;
|
|
311
|
-
port: number;
|
|
312
|
-
websocket: boolean;
|
|
313
310
|
"websocket-max-payload-size": number;
|
|
314
311
|
"rpc-url": string;
|
|
315
312
|
"polling-interval": number;
|
|
316
313
|
"block-tag-support-disabled": boolean;
|
|
317
|
-
json: boolean;
|
|
318
314
|
"network-name": string;
|
|
319
|
-
"log-level": "error" | "
|
|
315
|
+
"log-level": "error" | "debug" | "fatal" | "warn" | "info" | "trace";
|
|
320
316
|
"bundle-mode": "manual" | "auto";
|
|
321
317
|
"enable-debug-endpoints": boolean;
|
|
322
318
|
"expiration-check": boolean;
|
|
323
319
|
"dangerous-skip-user-operation-validation": boolean;
|
|
324
|
-
"deploy-simulations-contract": boolean;
|
|
325
320
|
tenderly: boolean;
|
|
326
321
|
"bundle-bulker-address"?: `0x${string}` | undefined;
|
|
327
322
|
"per-op-inflator-address"?: `0x${string}` | undefined;
|
|
328
323
|
"send-transaction-rpc-url"?: string | undefined;
|
|
329
324
|
"max-block-range"?: number | undefined;
|
|
330
325
|
timeout?: number | undefined;
|
|
331
|
-
"public-client-log-level"?: "error" | "
|
|
332
|
-
"wallet-client-log-level"?: "error" | "
|
|
333
|
-
"rpc-log-level"?: "error" | "
|
|
334
|
-
"mempool-log-level"?: "error" | "
|
|
335
|
-
"executor-log-level"?: "error" | "
|
|
336
|
-
"reputation-manager-log-level"?: "error" | "
|
|
337
|
-
"nonce-queuer-log-level"?: "error" | "
|
|
326
|
+
"public-client-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
327
|
+
"wallet-client-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
328
|
+
"rpc-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
329
|
+
"mempool-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
330
|
+
"executor-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
331
|
+
"reputation-manager-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
332
|
+
"nonce-queuer-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
338
333
|
"fixed-gas-limit-for-estimation"?: bigint | undefined;
|
|
339
334
|
"entrypoint-simulation-contract"?: `0x${string}` | undefined;
|
|
340
335
|
"utility-private-key"?: import("viem").PrivateKeyAccount | undefined;
|
|
341
336
|
"max-executors"?: number | undefined;
|
|
342
337
|
"min-executor-balance"?: bigint | undefined;
|
|
343
338
|
}, {
|
|
339
|
+
port: number;
|
|
340
|
+
json: boolean;
|
|
344
341
|
entrypoints: string;
|
|
345
342
|
"safe-mode": boolean;
|
|
346
343
|
"executor-private-keys": (string | string[]) & (string | string[] | undefined);
|
|
@@ -358,17 +355,14 @@ export declare const optionArgsSchema: z.ZodObject<{
|
|
|
358
355
|
"local-gas-limit-calculation": boolean;
|
|
359
356
|
"flush-stuck-transactions-during-startup": boolean;
|
|
360
357
|
"paymaster-gas-limit-multiplier": string;
|
|
361
|
-
port: number;
|
|
362
358
|
"rpc-url": string;
|
|
363
359
|
"polling-interval": number;
|
|
364
|
-
json: boolean;
|
|
365
360
|
"network-name": string;
|
|
366
|
-
"log-level": "error" | "
|
|
361
|
+
"log-level": "error" | "debug" | "fatal" | "warn" | "info" | "trace";
|
|
367
362
|
"bundle-mode": "manual" | "auto";
|
|
368
363
|
"enable-debug-endpoints": boolean;
|
|
369
364
|
"expiration-check": boolean;
|
|
370
365
|
"dangerous-skip-user-operation-validation": boolean;
|
|
371
|
-
"deploy-simulations-contract": boolean;
|
|
372
366
|
tenderly: boolean;
|
|
373
367
|
"bundle-bulker-address"?: string | undefined;
|
|
374
368
|
"per-op-inflator-address"?: string | undefined;
|
|
@@ -378,13 +372,13 @@ export declare const optionArgsSchema: z.ZodObject<{
|
|
|
378
372
|
timeout?: number | undefined;
|
|
379
373
|
websocket?: boolean | undefined;
|
|
380
374
|
"websocket-max-payload-size"?: number | undefined;
|
|
381
|
-
"public-client-log-level"?: "error" | "
|
|
382
|
-
"wallet-client-log-level"?: "error" | "
|
|
383
|
-
"rpc-log-level"?: "error" | "
|
|
384
|
-
"mempool-log-level"?: "error" | "
|
|
385
|
-
"executor-log-level"?: "error" | "
|
|
386
|
-
"reputation-manager-log-level"?: "error" | "
|
|
387
|
-
"nonce-queuer-log-level"?: "error" | "
|
|
375
|
+
"public-client-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
376
|
+
"wallet-client-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
377
|
+
"rpc-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
378
|
+
"mempool-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
379
|
+
"executor-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
380
|
+
"reputation-manager-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
381
|
+
"nonce-queuer-log-level"?: "error" | "debug" | "fatal" | "warn" | "info" | "trace" | undefined;
|
|
388
382
|
"api-version"?: string | undefined;
|
|
389
383
|
"default-api-version"?: "v1" | "v2" | undefined;
|
|
390
384
|
"fixed-gas-limit-for-estimation"?: string | undefined;
|
|
@@ -122,7 +122,6 @@ exports.debugArgsSchema = zod_1.z.object({
|
|
|
122
122
|
"enable-debug-endpoints": zod_1.z.boolean(),
|
|
123
123
|
"expiration-check": zod_1.z.boolean(),
|
|
124
124
|
"dangerous-skip-user-operation-validation": zod_1.z.boolean(),
|
|
125
|
-
"deploy-simulations-contract": zod_1.z.boolean(),
|
|
126
125
|
tenderly: zod_1.z.boolean()
|
|
127
126
|
});
|
|
128
127
|
exports.optionArgsSchema = zod_1.z.object({
|