Skip to content

fix(contract): allow approved milestones to advance before payout - #10

Merged
misaka10111 merged 3 commits into
mainfrom
fix/approved-payout-liveness
Nov 5, 2026
Merged

misaka10111 merged 3 commits into
mainfrom
fix/approved-payout-liveness

Conversation

@misaka10111

Copy link
Copy Markdown
Owner

What

Separate release of an approved milestone from payment to the creator. Any account can advance an approved stage, even if the creator is unavailable or their wallet rejects ETH.

Case Before After
The creator does not withdraw Stage two cannot open Anyone can release stage one and open the next submission window
The creator wallet rejects ETH The stage transition reverts Release credits a project payout without an ETH transfer; the creator can claim to another recipient
The second stage expires before the creator collects stage one Progress depended on the first transfer succeeding Backers refund only unreleased escrow; the credited payout remains claimable

Contract

  • releaseMilestone removes approved funds from escrow, credits claimablePayouts, and emits MilestoneReleased.
  • claimPayout lets only the project creator choose a nonzero recipient. A failed transfer leaves the credit available for retry. The event records the recipient and amount.
  • withdrawMilestone still supports a creator releasing and receiving the current stage in one transaction.

UI

All connected accounts can release an approved milestone to the creator balance. Creators can still release and withdraw in one transaction or claim credited funds to an optional recipient. The project details distinguish escrow from the creator payout.

Tests

Both compiler profiles cover unrelated accounts releasing both stages, creator-only claims, duplicate attempts, a rejecting wallet, redirected claims, and refund isolation. The offline UI check covered the release and claim controls. 111 local tests, format check and production build passed. Vite reported its chunk-size warning.

Deployment

This change adds contract methods and events. Deploy this version and configure its Sepolia address to use the new payout flow.

@misaka10111
misaka10111 merged commit f3b36fd into main Nov 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant