Feat/swap enhancements 359 362 - #396
Merged
fejilaup-cloud merged 5 commits intoApr 27, 2026
Merged
Conversation
- Add DataKey::UserReputation(Address) to store (completed_swaps, rating) tuples - Implement get_user_reputation(env, user) -> (u32, u32) - Implement update_reputation_on_completion() to increment completed_swaps - Update reputation on swap completion in reveal_key() - Add UserReputation type for reputation tracking
- Add contingency_condition: Option<Vec<u8>> field to SwapRecord - Implement complete_swap_contingent(env, swap_id, condition_proof) - Verify condition proof matches stored contingency before completion - Only seller can complete contingent swaps - Emit SwapContingentCompletedEvent on successful completion - Add error codes for contingency validation
- Add DataKey::SwapDisputeEvidence(u64) to store evidence hashes - Implement raise_swap_dispute(env, swap_id, evidence_hash) - Implement get_dispute_evidence_list(env, swap_id) -> Vec<BytesN<32>> - Support evidence submission by buyer or seller - Emit DisputeEvidenceStoredEvent on evidence submission - Add error codes for evidence validation
- Add payment_token: Address field to SwapRecord (already present) - Support token parameter in initiate_swap() - Update accept_swap to transfer specified token - Add tests for multi-currency swaps - Support USDC, EURC, and other token transfers
|
@goldemaverick-ui 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! 🚀 |
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
I've successfully implemented all 4 swap enhancement features with 4 separate commits:
✅ Commits Created
feat(Implement Swap Reputation Scoring #359): Implement swap reputation scoring
feat(Add Swap Multi-Currency Support #360): Implement swap contingent completion
feat(Implement Swap Contingent Completion #361): Add swap dispute evidence storage
feat(Add Swap Multi-Currency Support #360): Add multi-currency support to swaps
Closes #359
Closes #360
Closes #361
Closes #362