Skip to content

Commit

Permalink
skip code overrides on v06
Browse files Browse the repository at this point in the history
  • Loading branch information
mouseless0x committed Oct 15, 2024
1 parent 4cb6282 commit fcfcf07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rpc/estimation/gasEstimationsV06.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,15 @@ export class GasEstimatorV06 {
targetAddress,
targetCallData,
entryPoint,
useCodeOverride = true,
stateOverrides = undefined
}: {
userOperation: UserOperationV06
targetAddress: Address
targetCallData: Hex
entryPoint: Address
useCodeOverride?: boolean
enableCodeOverride?: boolean
stateOverrides?: StateOverrides | undefined
}): Promise<SimulateHandleOpResult> {
const publicClient = this.config.publicClient
Expand All @@ -113,7 +116,7 @@ export class GasEstimatorV06 {
const fixedGasLimitForEstimation =
this.config.fixedGasLimitForEstimation

if (this.config.codeOverrideSupport) {
if (this.config.codeOverrideSupport && useCodeOverride) {
if (stateOverrides === undefined) {
stateOverrides = {}
}
Expand Down
1 change: 1 addition & 0 deletions src/rpc/validation/UnsafeValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ export class UnsafeValidator implements InterfaceValidator {
this.gasEstimationHandler.gasEstimatorV06.simulateHandleOpV06({
entryPoint,
userOperation,
useCodeOverride: false,
targetAddress: zeroAddress,
targetCallData: "0x"
})
Expand Down

0 comments on commit fcfcf07

Please sign in to comment.