Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error-response handling/reporting #90

Open
3Nigma opened this issue Jun 24, 2022 · 1 comment
Open

Improve error-response handling/reporting #90

3Nigma opened this issue Jun 24, 2022 · 1 comment
Labels
contracts LiveContract/Smart contract related enhancement New feature or request question Further information is requested
Milestone

Comments

@3Nigma
Copy link
Contributor

3Nigma commented Jun 24, 2022

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:

  • should we wrap the error-message into a custom-error built class before throwing?
  • is the try/catch mechanism sufficient to get this error across to dev-land?
@3Nigma 3Nigma added enhancement New feature or request question Further information is requested contracts LiveContract/Smart contract related labels Jun 24, 2022
@3Nigma 3Nigma added this to the Back-burner milestone Jun 24, 2022
@3Nigma
Copy link
Contributor Author

3Nigma commented Jul 1, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contracts LiveContract/Smart contract related enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant