buidler-labs / hashgraph-venin-js

The, service over-arching, Hedera Stratospheric SDK for JS developers
https://venin.buidlerlabs.com
MIT License
19 stars 1 forks source link

Improve error-response handling/reporting #90

Open 3Nigma opened 2 years ago

3Nigma commented 2 years ago

hedera-services's v0.26 has brought the capacity to throw require messages out of smart contract executions. Here is a transaction that has such an error thrown inside its error_message property.

We need to support this!

Ether's interface.decodeErrorResult should be used to parse the error message.

We need to discuss further mechanics:

3Nigma commented 2 years ago

When a CONTRACT_REVERT_EXECUTED happens on a ContractExecuteTransaction call, the execution does not fail at this point. The subsequent getReceipt call throws this revert error. We need version 2.16 for the @hashgraph/sdk dependency to properly get a hold on the TransactionId of a Receipt when this happens. Lower sdk versions have not been tested to know if they work or not.