Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Add logs to check if the second simulation fails" #332

Merged
merged 1 commit into from
Oct 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/rpc/rpcHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ export class RpcHandler implements IRpcEndpoint {
entryPoint,
queuedUserOperations,
true,
deepHexlify({ ...stateOverrides })
stateOverrides
)

let { verificationGasLimit, callGasLimit } =
Expand Down Expand Up @@ -527,8 +527,9 @@ export class RpcHandler implements IRpcEndpoint {
callGasLimit = 0n
}

// Run second time without state overrides
try {
// 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) {
await this.validator.getExecutionResult(
{
...userOperation,
Expand All @@ -541,10 +542,8 @@ export class RpcHandler implements IRpcEndpoint {
entryPoint,
queuedUserOperations,
false,
deepHexlify({ ...stateOverrides })
deepHexlify(stateOverrides)
)
} catch (err) {
this.logger.error(err, "Second simulations fail")
}

if (isVersion07(userOperation)) {
Expand Down
Loading