From 9a7b8fcd614a0076f4da5091f31b453ae3ca3ebc Mon Sep 17 00:00:00 2001 From: Sergey Potekhin Date: Thu, 26 Sep 2024 12:32:34 +0400 Subject: [PATCH] Remove hardcode in favor of `max-gas-per-bundle` (#265) * Remove hardcoded value * Add changeset --- .changeset/gorgeous-carpets-fold.md | 5 +++++ src/executor/executorManager.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/gorgeous-carpets-fold.md diff --git a/.changeset/gorgeous-carpets-fold.md b/.changeset/gorgeous-carpets-fold.md new file mode 100644 index 00000000..efb12b75 --- /dev/null +++ b/.changeset/gorgeous-carpets-fold.md @@ -0,0 +1,5 @@ +--- +"@pimlico/alto": patch +--- + +Fixed bug where fixed 5m gas limit was used for bundle transaction instead of `max-gas-limit-per-bundle` diff --git a/src/executor/executorManager.ts b/src/executor/executorManager.ts index c8d91ab2..ff61df89 100644 --- a/src/executor/executorManager.ts +++ b/src/executor/executorManager.ts @@ -297,7 +297,7 @@ export class ExecutorManager { const opsToBundle: UserOperationInfo[][] = [] while (true) { - const ops = await this.mempool.process(5_000_000n, 1) + const ops = await this.mempool.process(this.maxGasLimitPerBundle, 1) if (ops?.length > 0) { opsToBundle.push(ops) } else {