Skip to content

Commit

Permalink
Merge pull request pimlicolabs#306 from pimlicolabs/fix/skale-revert-msg
Browse files Browse the repository at this point in the history
treat any rpc response with code=3 as a revert
  • Loading branch information
mouseless0x authored Oct 1, 2024
2 parents cb9ddff + 23e916b commit 0bde900
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 0bde900

Please sign in to comment.