Closed kasteph closed 1 year ago
Can you give an example of an issue that this PR resolves?
@FabijanC sure! There could be a case where a contract/account has a status of Reverted. However, because this doesn't exist in that dictionary, it raises a KeyError and thus the server ultimately returns an HTTP 500 to the client.
I thought that perhaps you would have a ready example, but I see your point
In any case, this Devnet supports only JSON-RPC specification 0.3.0 (the latest stable version is 0.4.0 and there is 0.5.0 incoming; link to spec versions). In that sense, 0.3.0 does not yet mention tx reversion, so this status was not added to Devnet.
If your PR does not in any way break the existing functionality, it could be merged, but I'd wait until Monday since it's the end of the work day (and week) in my time zone.
Devnet has mostly been rewritten in Rust, with some features still pending. You can check out the devnet-rs repo. It currently supports JSON-RPC v0.4.0, with the trace API (e.g. simulateTransactions) being added at the time of writing this.
Let me know if this is a high priority for you.
@kasteph Then I guess it's not a high priority.
Hi @FabijanC, yes, it's not a priority. I was able to find a workaround. I'll close this issue and start looking at the Rust implementation.
Usage related changes
TransactionStatus.REVERTED
to statusDevelopment related changes
Checklist:
./scripts/format.sh
./scripts/lint.sh
./scripts/test.sh