edr icon indicating copy to clipboard operation
edr copied to clipboard

Define a JSON format to represent Solditiy stack traces, decoded `returndata` and inferred errors.

Open alcuadrado opened this issue 1 year ago • 0 comments

We need to expose a second method in the provider that doesn't just run a request, but also tries to decode any error. It should look something like this:

pub async fn handle_request_with_metadata(&self, json_request: String) -> napi::Result<String>

But instead of the Result<string> being a plain JSON-RPC response, it should be something like:

{
  "response": <response>,
  "metadata": {
      "version": "edr-1",
      //... <error data>
  }
}

where <error data> has the information about:

  • solidity stack trace
  • decoded returndata
  • inferred error

alcuadrado avatar Dec 23 '23 21:12 alcuadrado