Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions src/modules/executor/executor.processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,8 @@ export class ExecutorProcessor implements Processor<ExecutorJob> {
chainSettings: { executionOverrides, isLowBlockTimeChain },
} = this.chainsService;

const fullChainSettings = this.chainsService.getChainSettings(chainId);

const entryPointV7Abi =
this.contractsService.getContractAbi("entryPointV7");

Expand All @@ -691,17 +693,27 @@ export class ExecutorProcessor implements Processor<ExecutorJob> {
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) {
Expand Down
Loading