Skip to content

Commit

Permalink
Add logs to check if the second simulation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
plusminushalf committed Oct 18, 2024
1 parent e312a2d commit bc59d22
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/rpc/rpcHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,8 @@ export class RpcHandler implements IRpcEndpoint {
callGasLimit = 0n
}

// If a balance override is provided for the sender, perform an additional simulation
// to verify the userOperation succeeds with the specified balance.
if (stateOverrides?.[userOperation.sender]?.balance) {
// Run second time without state overrides
try {
await this.validator.getExecutionResult(
{
...userOperation,
Expand All @@ -544,6 +543,8 @@ export class RpcHandler implements IRpcEndpoint {
false,
deepHexlify(stateOverrides)
)
} catch (err) {
this.logger.error({ error: err }, "Second simulations fail")
}

if (isVersion07(userOperation)) {
Expand Down

0 comments on commit bc59d22

Please sign in to comment.