Repository navigation
fix(contract): allow approved milestones to advance before payout - #10
Merged
Merged
Conversation
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.
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.
Contract
releaseMilestoneremoves approved funds from escrow, creditsclaimablePayouts, and emitsMilestoneReleased.claimPayoutlets only the project creator choose a nonzero recipient. A failed transfer leaves the credit available for retry. The event records the recipient and amount.withdrawMilestonestill 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.