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

Add stake_cw721 and cw721-controllers #309

Merged
merged 22 commits into from
Jul 17, 2022
Merged

Add stake_cw721 and cw721-controllers #309

merged 22 commits into from
Jul 17, 2022

Conversation

cypherape
Copy link
Contributor

@cypherape cypherape commented May 28, 2022

Adds the ability to stake Cw721 Tokens. Allows for staked Nft use cases.

Closes #131

@cypherape cypherape requested review from 0xekez and JakeHartnell May 28, 2022 09:12
@codecov-commenter
Copy link

codecov-commenter commented May 28, 2022

Codecov Report

Merging #309 (2038656) into main (5798da4) will decrease coverage by 0.60%.
The diff coverage is 91.32%.

@@            Coverage Diff             @@
##             main     #309      +/-   ##
==========================================
- Coverage   96.37%   95.76%   -0.61%     
==========================================
  Files          29       32       +3     
  Lines        4797     5290     +493     
==========================================
+ Hits         4623     5066     +443     
- Misses        174      224      +50     
Impacted Files Coverage Δ
contracts/cw-core/src/contract.rs 95.65% <80.95%> (-1.16%) ⬇️
packages/cw-paginate/src/lib.rs 88.13% <81.81%> (-11.87%) ⬇️
contracts/cw721-stake/src/contract.rs 84.05% <84.05%> (ø)
packages/cw721-controllers/src/nft_claim.rs 98.91% <98.91%> (ø)
contracts/cw20-stake/src/contract.rs 93.34% <100.00%> (+0.01%) ⬆️
contracts/cw721-stake/src/hooks.rs 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5798da4...2038656. Read the comment docs.

@cypherape cypherape requested a review from blue-note May 28, 2022 09:13
@JakeHartnell JakeHartnell mentioned this pull request May 28, 2022
Copy link
Contributor

@0xekez 0xekez left a comment

Choose a reason for hiding this comment

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

This is looking really great. Thanks for putting this up! Made a pass and added some comments. Will make another one once those are discussed.

Copy link
Contributor

@0xekez 0xekez left a comment

Choose a reason for hiding this comment

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

Rewards are hard and I think this has a bug where one can drain rewards from the contract. I missed this in the first review and an older version of the staking contract actually had the same problem. Many have struggled with this one. :)

My recommendation would be that we just rip rewards out of this contract for now. The nice thing about these contracts is that they can always be upgraded later so we can start simple. :)

Copy link
Collaborator

@Callum-A Callum-A left a comment

Choose a reason for hiding this comment

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

LGTM, some small nits

@0xekez 0xekez force-pushed the stake_cw721 branch 2 times, most recently from 61fc084 to 2dd493b Compare July 6, 2022 19:51
@JakeHartnell JakeHartnell merged commit 5b96182 into main Jul 17, 2022
@JakeHartnell JakeHartnell deleted the stake_cw721 branch July 17, 2022 19:36
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.

NFT DAO
6 participants