edr
edr copied to clipboard
Define a JSON format to represent Solditiy stack traces, decoded `returndata` and inferred errors.
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