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

Implement error types and error handling #26

Merged
merged 7 commits into from
Aug 13, 2024
Merged

Implement error types and error handling #26

merged 7 commits into from
Aug 13, 2024

Conversation

bbyalcinkaya
Copy link
Member

@bbyalcinkaya bbyalcinkaya commented Aug 12, 2024

This PR introduces error handling and state rollback functionality, along with relevant tests

  • Added the Error case to the ScVal type, which includes an error type and an integer error code.
  • Introduced error handling in the #endWasm command. When an Error is returned from a contract, it triggers the VM to rollback to the state before the contract was called, ensuring that no changes are committed.
  • Implemented the fail_with_error function

@bbyalcinkaya bbyalcinkaya marked this pull request as ready for review August 12, 2024 18:13
@bbyalcinkaya bbyalcinkaya requested a review from gtrepta August 12, 2024 18:13
@rv-jenkins rv-jenkins merged commit 96a1afa into master Aug 13, 2024
3 checks passed
@rv-jenkins rv-jenkins deleted the errors branch August 13, 2024 06:43
@bbyalcinkaya bbyalcinkaya mentioned this pull request Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants