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

Refactor: Process potential events from transaction output #12

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

iljabvh
Copy link
Collaborator

@iljabvh iljabvh commented Apr 9, 2024

This PR improves event handling after reading out the transaction output in the client package.
This improves security and handles edge cases in which some contract functions are called multiple times.

Contract calls to not trigger events if the call has been made before. For instance, when a close has been made, a subsequent close call will result in an error and will not emit a contract event. This PR handles such cases gracefully.

…terface, add EventType field. Add GetType() method to show event type. Add Assert...Event functions to test for events related to contract calls.

* refactor(client): Add checks for events after contract calls. Also add error handling for cases in which events are not triggered during the present call.

* refactor(channel): Adapt to changes in event package.
… error in this place.

* refactor(client): Add ErrCouldNotDecodeTxMeta to use it in InvokeAndProcessHostFunction.
@iljabvh iljabvh merged commit 1266747 into dev Apr 9, 2024
1 check passed
@iljabvh iljabvh deleted the add-processing-stellar-events branch April 9, 2024 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant