Skip to content

Commit

Permalink
create flag to split simulation calls (#436)
Browse files Browse the repository at this point in the history
Co-authored-by: mouseless <97399882+mouseless-eth@users.noreply.github.com>
  • Loading branch information
mouseless0x and mouseless0x authored Feb 12, 2025
1 parent 9aabf57 commit 03c643c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/cli/config/bundler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ export const gasEstimationArgsSchema = z.object({
"paymaster-gas-limit-multiplier": z
.string()
.transform((val) => BigInt(val)),
"eth-call-sender-address": addressSchema.optional()
"eth-call-sender-address": addressSchema.optional(),
"split-simulation-calls": z.boolean()
})

export type IBundlerArgs = z.infer<typeof bundlerArgsSchema>
Expand Down
6 changes: 6 additions & 0 deletions src/cli/config/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@ export const gasEstimationOptions: CliCommandOptions<IGasEstimationArgsInput> =
description:
"For permissioned chains, eth_call simulations require a whitelisted address as the sender",
type: "string"
},
"split-simulation-calls": {
description:
"Should the bundler split estimation simulations into smaller calls.",
type: "boolean",
default: false
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/rpc/estimation/gasEstimationsV07.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ export class GasEstimatorV07 {

let cause: readonly [Hex, Hex, Hex | null, Hex]

if (this.config.chainType === "hedera") {
if (this.config.splitSimulationCalls) {
// due to Hedera specific restrictions, we can't combine these two calls.
const [
simulateHandleOpLastCause,
Expand Down

0 comments on commit 03c643c

Please sign in to comment.