Skip to content

Commit 217c708

Browse files
committed
disable eip1559 for bsc & add logs
1 parent 243d5bd commit 217c708

4 files changed

Lines changed: 27 additions & 5 deletions

File tree

packages/executor/src/executor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ export class Executor {
6767
this.provider,
6868
this.reputationService,
6969
this.network,
70-
this.config
70+
this.config,
71+
this.logger
7172
);
7273
this.mempoolService = new MempoolService(
7374
this.db,

packages/executor/src/modules/eth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ export class Eth {
8080
}
8181
const userOpComplemented: UserOperationStruct = {
8282
paymasterAndData: userOp.paymasterAndData ?? "0x",
83+
verificationGasLimit: 10e6,
8384
maxFeePerGas: 0,
8485
maxPriorityFeePerGas: 0,
8586
preVerificationGas: 0,
86-
verificationGasLimit: 10e6,
8787
...userOp,
8888
};
8989
const preVerificationGas = this.calcPreVerificationGas(userOp);

packages/executor/src/services/UserOpValidation.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
import { BannedContracts } from "params/lib";
1717
import { NetworkName } from "types/lib";
1818
import { getAddr } from "../utils";
19-
import { TracerCall, TracerResult } from "../interfaces";
19+
import { Logger, TracerCall, TracerResult } from "../interfaces";
2020
import { Config } from "../config";
2121
import { ReputationService } from "./ReputationService";
2222
import { GethTracer } from "./GethTracer";
@@ -56,7 +56,8 @@ export class UserOpValidationService {
5656
private provider: providers.Provider,
5757
private reputationService: ReputationService,
5858
private network: NetworkName,
59-
private config: Config
59+
private config: Config,
60+
private logger: Logger
6061
) {
6162
this.gethTracer = new GethTracer(
6263
this.provider as providers.JsonRpcProvider
@@ -76,12 +77,27 @@ export class UserOpValidationService {
7677
.catch((e: any) => this.nethermindErrorHandler(entryPointContract, e));
7778

7879
if (errorResult.errorName === "FailedOp") {
80+
this.logger.debug({
81+
to: entryPoint,
82+
data: entryPointContract.interface.encodeFunctionData(
83+
"simulateValidation",
84+
[userOp]
85+
),
86+
});
7987
throw new RpcError(
8088
errorResult.errorArgs.at(-1),
8189
RpcErrorCodes.VALIDATION_FAILED
8290
);
8391
}
92+
8493
if (errorResult.errorName !== "ValidationResult") {
94+
this.logger.debug({
95+
to: entryPoint,
96+
data: entryPointContract.interface.encodeFunctionData(
97+
"simulateValidation",
98+
[userOp]
99+
),
100+
});
85101
throw errorResult;
86102
}
87103

packages/params/src/eip1559.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
import { NetworkName } from "types/lib";
22

3-
export const chainsWithoutEIP1559: NetworkName[] = ["fuse", "fuseSparknet"];
3+
export const chainsWithoutEIP1559: NetworkName[] = [
4+
"fuse",
5+
"fuseSparknet",
6+
"bsc",
7+
"bscTest",
8+
];

0 commit comments

Comments
 (0)