-
Notifications
You must be signed in to change notification settings - Fork 142
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
Bounties Contract #715
base: development
Are you sure you want to change the base?
Bounties Contract #715
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## development #715 +/- ##
==============================================
Coverage ? 93.90%
==============================================
Files ? 63
Lines ? 5709
Branches ? 0
==============================================
Hits ? 5361
Misses ? 348
Partials ? 0
☔ View full report in Codecov by Sentry. |
Cosm-Orc Gas Usage
Raw Report for 1933279
|
@JakeHartnell, regarding /// Claims a bounty (only owner)
PayOut {
/// Bounty id to claim
id: u64,
/// Recipient address where funds from bounty are claimed
recipient: String,
}, We could add
|
For |
Ofc, this is not needed, since owner can create multiple bounties for achieving same goal. But this way, owner can decide which way is appropiate for bounty ((one bounty with partial payout or multiple bounties with each single payout). This change shouldn't be a big deal and keeps contract still simple. |
Nevermind. Figured out partial payment is way too complicated. Like when updating on partial payouts, it will affect BountyStatus when updated amount is equal to partial payout -> Bounty is closed otherwise it keeps open, Bounty need another prop |
@JakeHartnell, found another bug when updating bounty with lower amount. Like bounty is 100 Juno, update to 50 Juno, then owner gets 50 Juno back. This works. But if owner accidentally sends 50 Juno, 100 Juno should be send back - not just 50. Fix it in PR 730. Also added more tests extensively and checking |
Check here: #730 |
51befb9
to
7e6de8b
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## development #715 +/- ##
===============================================
- Coverage 96.25% 96.21% -0.04%
===============================================
Files 203 208 +5
Lines 50082 50913 +831
===============================================
+ Hits 48207 48988 +781
- Misses 1875 1925 +50
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool little contract! LGTM, left some small questions and suggestions
id: u64, | ||
) -> Result<Response, ContractError> { | ||
// Check bounty exists | ||
let mut bounty = BOUNTIES.load(deps.storage, id)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what the expected outcome here is if bounty id doesn't exist? perhaps may_load
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected outcome is that it fails.
Will merge and ship this after we're done with the veto stuff. ❤️ |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development #715 +/- ##
===============================================
- Coverage 96.30% 96.27% -0.04%
===============================================
Files 207 212 +5
Lines 53490 54327 +837
===============================================
+ Hits 51513 52302 +789
- Misses 1977 2025 +48 ☔ View full report in Codecov by Sentry. |
121dd70
to
d3ec906
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
How about a claim by the user? (for V2)
The user will start a claim on the bounty, and than the owner will be able to pay it, if no claims, the owner can do whatever he wish with the bounty, but if there is a claim, the owner will have to deny those claims before canceling the bounty.
The main purpose of this is to put denied claims publicly, so owners will have to provide a reason to why this claim was denied.
c60d0e3
to
7b90923
Compare
…ate, test all of this (#720) Co-authored-by: Tai 'Mr. T' Truong <[email protected]>
Co-authored-by: Tai 'Mr. T' Truong <[email protected]>
* check Bounty is correct in all tests * fix update bounty with lower amount and owner accidentally send funds * cleanup and test update with sending wrong denom
Co-authored-by: bekauz <[email protected]>
Closes #714