Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Commit de66978

Browse files
authored
Return generic error message if reverted without reason (#145)
1 parent 0bb9e26 commit de66978

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/entrypoint/execution/trace.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ func TraceSimulateHandleOp(
6060
return err
6161
}
6262

63+
if len(data) == 0 {
64+
return errors.NewRPCError(errors.EXECUTION_REVERTED, "execution reverted", nil)
65+
}
66+
6367
reason, err := errors.DecodeRevert(data)
6468
if err != nil {
6569
return err

0 commit comments

Comments
 (0)