Add integration tests for sell event KeySold fields (#667) - #695
Merged
Chucks1093 merged 2 commits intoJul 29, 2026
Merged
Conversation
- new_supply: verify sell_key return value matches on-chain supply - no event on failed sell: filter for SELL_EVENT_NAME events only - payout cross-check: event proceeds match sell_quote.total_amount
|
@shogun444 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
- Add missing 7th argument (whitelist: Option<WhitelistConfig>) - Move &Some(config) from curve_preset (arg 5) to co_creator (arg 6)
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.
Summary
Added integration test coverage for the
KeySoldevent to strengthen sell-side event verification and ensure emitted data remains consistent with on-chain state.What changed?
sell_key()return value matches the post-transaction on-chain key supply across successive sells.KeySoldevent is emitted when a sell transaction fails due to insufficient balance.proceedsvalue matches the corresponding sell quote payout.Why was it changed?
While the existing test suite already validated the
KeySoldevent payload, it did not verify that:KeySoldevents, orThese additional integration tests improve confidence in event correctness for indexers and downstream consumers while protecting against future regressions.
Closes #667
Testing
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --test sell_event_fieldsChecklist
creator-keysintegration tests covering successful and failure pathscargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warnings