test: Remittance Events#112
Merged
Baskarayelu merged 3 commits intoRemitwise-Org:mainfrom Feb 21, 2026
Merged
Conversation
Contributor
|
fix the pipeline @anonfedora |
Contributor
Author
|
Fixed @Baskarayelu |
Contributor
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: Add event emission and enhanced type derivations for RemittanceSplit contract
Summary
Closes #66
This PR adds structured event emission throughout the
RemittanceSplitcontract, improves type derivations for contract types, and expands test coverage for event-driven behavior.Changes
Contract (
lib.rs)Debug,Eq, andPartialEqderives toSplitInitializedEvent,SplitCalculatedEvent,SplitConfig, andSplitEventfor better testability and debugging.initialized: boolfield toSplitConfigandSplitCalculatedEventto track initialization state explicitly.timestampfield population ininitialize_splitandcalculate_splitto ensure all emitted events carry ledger time context.lib.rsintotest.rsto keep the contract file clean.Tests (
test.rs)Events,IntoVal,Symbol,TryFromVal, andValto test imports.test_initialize_split_events— verifies topic structure and data payload on split initialization.test_update_split_events— verifies theSplitEvent::Updatedtopic and caller data on split update.test_calculate_split_events— verifies theSplitEvent::Calculatedtopic andtotal_amountdata payload on split calculation.Testing
All existing tests continue to pass. New tests verify event topics and data payloads using
try_from_valdeserialization to ensure type-safe event assertions.