vechain-sdk-js
vechain-sdk-js copied to clipboard
Docs Example & Testing :: Revert reason of a confirmed tx that reverted
We need to test retrieving the revert reason of a transaction that has been broadcasted to the network and has reverted.
To do this, the flow should be get the tx -> perform the the estimateGas on the values of the tx (clauses, caller..etc) -> Check the EstimateGasResult
for vmErrors
& revertReasons
This requires integration tests and must tackle edge cases (e.g, with testing contract a tx reverts for a specific value of a method, then the contract is updated and that value doesn't revert anymore. We need to test that the flow still shows revertion for the specified revision of the tx that reverted)
Then proceed to offer doc examples