Skip to content

feat: implement escrow partial release, portfolio analytics, team collaboration, review moderation & appeal - #696

Open
A6dulmalik wants to merge 2 commits into
Dfunder:mainfrom
A6dulmalik:feature/issues-601-602-603-604
Open

feat: implement escrow partial release, portfolio analytics, team collaboration, review moderation & appeal#696
A6dulmalik wants to merge 2 commits into
Dfunder:mainfrom
A6dulmalik:feature/issues-601-602-603-604

Conversation

@A6dulmalik

@A6dulmalik A6dulmalik commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR implements all four issues assigned to a-malik-gh.


Escrow Partial Release for Milestone-Based Work

  • Added EscrowMilestone type with amount, status, and auto_release_ledger fields
  • New entry points: add_milestone, approve_milestone_release, release_milestone, auto_release_milestone, get_milestones
  • PartiallyReleased commission status + released_amount tracking on EscrowRecord
  • Full test suite in contracts/escrow/src/partial_release_tests.rs

Portfolio Analytics Contract

  • New contract at contracts/analytics/
  • Tracks earnings by category/client, project completion rate, response time, client satisfaction trends, and earnings predictions
  • Admin-gated recording functions with query entry points
  • Full test suite in contracts/analytics/src/test.rs

Team Collaboration Features

  • add_team_member, remove_team_member, update_team_member_role on CommissionAgreementContract
  • Role-based access: Lead / Contributor / Viewer
  • set_payment_split / get_payment_split — configurable BPS-based payout splits
  • Full test suite in contracts/commission_agreement/src/team_tests.rs

Review Moderation & Appeal System

  • report_review with automatic admin moderation queue population
  • submit_appeal, resolve_appeal, escalate_appeal for artist/client appeals
  • Persistent moderation decision history per review
  • Full test suite in contracts/reputation/src/moderation_appeal_tests.rs

Build

cargo build passes cleanly across all workspace members.


Closes #597
Closes #598
Closes #599
Closes #600

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@A6dulmalik 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! 🚀

Learn more about application limits

…#604

- Dfunder#601: Escrow partial release for milestone-based work
  - Add EscrowMilestone type with percentage/fixed amount support
  - add_milestone, approve_milestone_release, release_milestone,
    auto_release_milestone, get_milestones entry points
  - PartiallyReleased status + released_amount tracking on EscrowRecord
  - Partial release tests in escrow/src/partial_release_tests.rs

- Dfunder#602: Portfolio analytics contract (contracts/analytics/)
  - Track earnings by category/client
  - Project completion rate tracking
  - Response time analytics
  - Client satisfaction trends
  - Earnings predictions

- Dfunder#603: Team collaboration features on CommissionAgreement
  - add_team_member, remove_team_member, update_team_member_role
  - Role-based access: Lead / Contributor / Viewer
  - Payment split configuration (set_payment_split / get_payment_split)
  - Team collaboration tests in commission_agreement/src/team_tests.rs

- Dfunder#604: Review moderation & appeal system on Reputation contract
  - report_review with admin moderation queue
  - submit_appeal / resolve_appeal / escalate_appeal
  - Moderation decision history per review
  - Full test suite in reputation/src/moderation_appeal_tests.rs

Also registers analytics, reputation, search, verification contracts in
workspace Cargo.toml and fixes Copy derives required by soroban-sdk
contracttype macro across shared, verification, reputation, commission_agreement,
and search contracts.
- Cargo.toml: keep only contracts that exist in this repo
- escrow/errors.rs: merge upstream ContractPaused=13, InvalidSplit=14
  with our milestone errors (15-18); all discriminants unique
- escrow/storage.rs: keep PartiallyReleased=6 alongside upstream
  Cancelled=5; keep released_amount field and Milestones DataKey
- escrow/lib.rs: add upstream initialize/pause/unpause/cancel_escrow
  while keeping all milestone partial-release functions (Dfunder#601)
- commission_agreement/types.rs: add upstream MilestoneLock,
  CancellationPolicy, Cancellation, Agency, Roster, RosterEntry,
  ArtistAgency, AgencyAnalytics DataKey variants alongside our
  Revision and Team keys
- commission_agreement/errors.rs: unique discriminants 1-30, merging
  upstream (MilestoneLocked=10, InputTooLong=11, DeadlineTooFar=12,
  cancellation 22-24, agency 25-30) with ours (revision 13-16,
  team 17-21)
- commission_agreement/lib.rs: full merge — upstream create_agreement
  validation (Dfunder#589, Dfunder#591, Dfunder#592), cancellation (Dfunder#605), agency (Dfunder#609)
  plus our revision system (Dfunder#600) and team collaboration (Dfunder#603)
- Add agency.rs and cancellation.rs from upstream
- commission_agreement/Cargo.toml: add legacy_tests feature flag
@A6dulmalik
A6dulmalik force-pushed the feature/issues-601-602-603-604 branch from c57fcdb to 5a48645 Compare August 26, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant