Skip to content

Commit

Permalink
treat any rpc response with code=3 as a revert
Browse files Browse the repository at this point in the history
  • Loading branch information
mouseless0x committed Oct 1, 2024
1 parent cb9ddff commit 23e916b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rpc/gasEstimation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ export async function simulateHandleOpV06(
.union([
z.object({
code: z.literal(3),
message: z.string().regex(/execution reverted.*/),
message: z.string(),
data: hexDataSchema
}),
/* fuse rpcs return weird values, this accounts for that. */
/* Fuse RPCs return in this format. */
z.object({
code: z.number(),
message: z.string().regex(/VM execution error.*/),
Expand Down

0 comments on commit 23e916b

Please sign in to comment.