Entropy-Foundation / aptos-core

Aptos is a layer 1 blockchain built to support the widespread use of blockchain through better technology and user experience.
https://aptoslabs.com
Other
0 stars 2 forks source link

Make `api/types/src/convert.rs:explain_vm_status` public #47

Closed isaacdoidge closed 3 months ago

isaacdoidge commented 3 months ago

Our RPC REST APIs currently return a transaction's TransactionStatus to provide additional information about the result of its execution. However, this type is not particularly useful to clients as it lacks the context required for easy interpretation. TransactionStatus is primarily meant for internal representation. To make our API results more intuitive, we should follow Aptos and present a message that fully explains the status code. Translation can be achieved via api/types/src/convert.rs:explain_vm_status, but it is currently private. We should make it public.

Related to https://github.com/Entropy-Foundation/smr-moonshot/issues/781.