Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distribution #792

Closed
wants to merge 15 commits into from
Closed

Distribution #792

wants to merge 15 commits into from

Conversation

JakeHartnell
Copy link
Member

@JakeHartnell JakeHartnell commented Jan 4, 2024

Closes #667 🎉

User Story: As a DAO, I want to distribute rewards over time to members based on their voting power or stake.

This PR refactors the old cw20-stake-external-rewards into something that can be used by all types of DAOs. I've tried my best to add more code comments and documentation into this contract as well, hoping to make it a bit more readable as we move forward.

Additionally, I created a new folder distribution as there was starting to be too much in the external contracts folder. I moved cw-fund-distributor there for now.

As for cw20-stake-external-rewards, I have left it where it is for now, but thinking about deleting it...

Copy link

codecov bot commented Jan 4, 2024

Codecov Report

Attention: Patch coverage is 99.79373% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 96.41%. Comparing base (3ab7017) to head (52caad6).

Files Patch % Lines
...stribution/dao-rewards-distributor/src/contract.rs 99.19% 3 Missing ⚠️
.../distribution/dao-rewards-distributor/src/error.rs 0.00% 1 Missing ⚠️
...ts/distribution/dao-rewards-distributor/src/msg.rs 85.71% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development     #792      +/-   ##
===============================================
+ Coverage        96.26%   96.41%   +0.15%     
===============================================
  Files              209      214       +5     
  Lines            53514    55938    +2424     
===============================================
+ Hits             51513    53933    +2420     
- Misses            2001     2005       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@bekauz bekauz left a comment

Choose a reason for hiding this comment

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

overall this looks great.
a little hard to review the new code you added as everything appears new because of the directory change, but both MemberChangedHook and NftStakeChangedHook logic makes sense to me!

Cargo.toml Outdated Show resolved Hide resolved
@JakeHartnell
Copy link
Member Author

Note sure why CodeCov is failing, but everything else passes. 🤷‍♂️

@bekauz
Copy link
Collaborator

bekauz commented Apr 13, 2024

Note sure why CodeCov is failing, but everything else passes. 🤷‍♂️

passes now!

@NoahSaso
Copy link
Member

NoahSaso commented Jun 1, 2024

closing in favor of #835

@NoahSaso NoahSaso closed this Jun 1, 2024
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.

Rename cw20-stake-external-rewards and refactor to support other voting modules
3 participants