Refactor code structure and optimize performance across multiple modules#1836
Open
GiftedGiftB wants to merge 2 commits into
Open
Refactor code structure and optimize performance across multiple modules#1836GiftedGiftB wants to merge 2 commits into
GiftedGiftB wants to merge 2 commits into
Conversation
|
@GiftedGiftB 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.
Closes #1712
Description
What changed?
Why was it changed?
How was it implemented?
RewardAllocationandEscrowTokenBalancein types.rs.Questnow includesreward_allocations: Vec<RewardAllocation>while keeping single-token fields for backward compatibility.escrowmodule (escrow.rs) extended to:token_balancesper escrow,payoutandsubmissionflows updated to validate and record per-token escrow usage;claim_rewarddistributes configured percentages across assets.Type of Change
Contract Changelog Discipline
## [Unreleased]### Breaking Changesentry with impact, affected files, and migration stepstype(scope)!:) in the PR title or commit historyBREAKING CHANGE:explanation belowBREAKING CHANGE details (required for breaking contract changes):
Test Evidence
Unit Tests
cargo testrun for earn-quest)Test output / screenshot:
Notes:
cd contracts/earn-quest && cargo testE2E / Integration Tests
npm run test:e2e)Endpoints tested: N/A (contract-only change)
Swagger / API Documentation
Error Handling Checklist
HTTP Exceptions
Input Validation (DTOs)
Guards & Authorization
Logging
Stellar / Soroban Contract Interactions
token::Client::try_transferwith CEI ordering to guard reentrancy.Database / Migration
Breaking Type / Model Changes (Frontend — FE-068)
If the frontend will support multi-token quest creation/display, follow-up tasks:
reward_allocations(select up to 3 assets + percentages).get_escrow_infoper-token balances.Final Pre-Merge Checklist
main/master(please rebase if needed)npm run lint) — run CI linters in your environmentnpm run format/cargo fmt)console.log/ debug statements left in production code.env.examplenot applicable for contract-only changesScreenshots / Recordings (if applicable)
N/A for contract-only changes.
Additional Notes for Reviewer
token_balancesupdates, refunds loop correctness.reward_allocationsvalidation (max 3, percentages sum to 100).## [Unreleased]. Consider adding a short migration note to your deployment docs if you plan to upgrade an on-chain instance.If you want, I can now:
ghand create it programmatically).Which should I do next?