Skip to content

feat: rage quit - #219

Open
addyxvii wants to merge 25 commits into
PartyDAO:old-mainfrom
addyxvii:feat/rage-quit
Open

feat: rage quit#219
addyxvii wants to merge 25 commits into
PartyDAO:old-mainfrom
addyxvii:feat/rage-quit

Conversation

@addyxvii

@addyxvii addyxvii commented Feb 13, 2023

Copy link
Copy Markdown

Motivation

This feature gives a contributor to a party the ability to rage quit(withdraw 100% of their contribution) before a crowdfund is finalized.

Solution

A rageQuit function has been created that increases a new variable totalContributionsWithdrawn, and removes the _contributionsByContributor mapping for the user who quit. The function also returns the quitting user's total contribution from the crowdfund.

previousTotalContributionsWithdrawn has been added to the Contribution struct for proper accounting in the _getFinalContribution function

@height

height Bot commented Feb 13, 2023

Copy link
Copy Markdown

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@addyxvii addyxvii changed the title Feat/rage quit feat: rage quit Feb 13, 2023
@0xble 0xble added feature Add functionality crowdfund Related to crowdfund labels Feb 13, 2023
@0xble

0xble commented Feb 13, 2023

Copy link
Copy Markdown
Contributor

Thanks for this! I'll review this tomorrow

Comment thread contracts/crowdfund/Crowdfund.sol Outdated
Comment thread contracts/crowdfund/Crowdfund.sol Outdated
Comment thread contracts/crowdfund/Crowdfund.sol Outdated
Comment thread contracts/crowdfund/Crowdfund.sol Outdated
Comment thread contracts/crowdfund/Crowdfund.sol Outdated
Comment thread contracts/crowdfund/Crowdfund.sol Outdated
Comment thread sol-tests/crowdfund/Crowdfund.t.sol Outdated
Comment thread sol-tests/crowdfund/Crowdfund.t.sol Outdated
Comment thread contracts/crowdfund/Crowdfund.sol Outdated
Comment thread contracts/crowdfund/Crowdfund.sol Outdated
@addyxvii
addyxvii requested a review from 0xble March 15, 2023 22:58
Comment thread sol-tests/crowdfund/Crowdfund.t.sol

@0xble 0xble left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Just run yarn lint and commit changes to fix formatting. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crowdfund Related to crowdfund feature Add functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants