feat: emit escrow_created event on store_escrow (#39)#41
Open
Chucks1093 wants to merge 1 commit intoMarketXpress:mainfrom
Open
feat: emit escrow_created event on store_escrow (#39)#41Chucks1093 wants to merge 1 commit intoMarketXpress:mainfrom
Chucks1093 wants to merge 1 commit intoMarketXpress:mainfrom
Conversation
- Publish (escrow_cr, escrow_id) → Escrow event via env.events().publish() - Suppressed deprecation warning at the call site with #[allow(deprecated)] - Added test_store_escrow_emits_created_event verifying storage and event path - Regenerated all test snapshots to capture new event in existing test runs
Author
|
@Cybermaxi7 can you review and merge the pr |
Contributor
|
Please resolve conflicts |
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.
Closes #39
Changes
lib.rs:store_escrownow callsenv.events().publish()after writingto persistent storage. Topics are
(symbol_short!("escrow_cr"), escrow_id)and data is the full
Escrowstruct.#[allow(deprecated)]applied at thecall site — the method still works correctly in soroban-sdk v25.1.1.
test.rs: Addedtest_store_escrow_emits_created_eventwhich callsstore_escrowand asserts all five escrow fields are correctly persistedalongside the event emission. Full event structure (topics + data) is locked
in via the generated snapshot file.
test_snapshots/: Regenerated all snapshots viaSOROBAN_TEST_SNAPSHOT_UPDATE=1to capture the new event output across all 15 existing tests.
Test results
15 passed; 0 failed