-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Eth API: On revert, return data in the error #10311
Comments
@virajbhartiya This will be a fun one and has been a long pending ask from users. Want to pick this up ? |
@Stebalien Which ETH APIs should be returning reverted reason in the data field ? Is it the |
@virajbhartiya is picking this up. |
As far as I know, yes. |
Checklist
Ideas
.Lotus component
Improvement Suggestion
JSON-RPC supports an optional
data
field in errors to return additional information. Furthermore, it looks like Ethereum clients use this field to return "revert reasons".Specifically, we have an error type defined here:
https://github.com/filecoin-project/go-jsonrpc/blob/787a96afc5da60084c97b597b61f0fad18c65a3d/handler.go#L68-L72
We should extend this to:
And provide a way to return said data from a JSON-RPC method. Likely the best way is to define
interface { ErrorData() interface{} }
.The text was updated successfully, but these errors were encountered: