Skip to content

Commit

Permalink
Fix/skip-call-validation-during-eth-send (#330)
Browse files Browse the repository at this point in the history
* skip code overrides on v06

* remove unused var

* add comment
  • Loading branch information
mouseless0x authored Oct 15, 2024
1 parent 4cb6282 commit e312a2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rpc/estimation/gasEstimationsV06.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,14 @@ export class GasEstimatorV06 {
targetAddress,
targetCallData,
entryPoint,
useCodeOverride = true,
stateOverrides = undefined
}: {
userOperation: UserOperationV06
targetAddress: Address
targetCallData: Hex
entryPoint: Address
useCodeOverride?: boolean
stateOverrides?: StateOverrides | undefined
}): Promise<SimulateHandleOpResult> {
const publicClient = this.config.publicClient
Expand All @@ -113,7 +115,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, // disable code override so that call phase reverts aren't caught
targetAddress: zeroAddress,
targetCallData: "0x"
})
Expand Down

0 comments on commit e312a2d

Please sign in to comment.