diff --git a/src/modules/executor/executor.processor.ts b/src/modules/executor/executor.processor.ts index 4e545322..db91efe0 100644 --- a/src/modules/executor/executor.processor.ts +++ b/src/modules/executor/executor.processor.ts @@ -683,6 +683,8 @@ export class ExecutorProcessor implements Processor { chainSettings: { executionOverrides, isLowBlockTimeChain }, } = this.chainsService; + const fullChainSettings = this.chainsService.getChainSettings(chainId); + const entryPointV7Abi = this.contractsService.getContractAbi("entryPointV7"); @@ -691,17 +693,27 @@ export class ExecutorProcessor implements Processor { chainId, ); + let maxFeePerGas = options.maxFeePerGas; + let maxPriorityFeePerGas = options.maxPriorityFeePerGas; + + // Enforce chain minimum gas (e.g. BSC) at execution time so RPC does not reject the tx + const minGas = fullChainSettings.minMaxFeePerGas + ? BigInt(fullChainSettings.minMaxFeePerGas) + : 0n; + if (minGas > 0n) { + if (maxFeePerGas < minGas) maxFeePerGas = minGas; + if (maxPriorityFeePerGas < minGas) maxPriorityFeePerGas = minGas; + } + const feeData: GasConditions = { - maxFeePerGas: options.maxFeePerGas, - maxPriorityFeePerGas: options.maxPriorityFeePerGas, + maxFeePerGas, + maxPriorityFeePerGas, l1GasPrice: 0n, baseFee: 0n, }; const nonce: number = options.nonce; - const { maxFeePerGas, maxPriorityFeePerGas } = feeData; - let txRequest: ExecutorTxRequest; if (authorizationList.length === 0) {