-
Notifications
You must be signed in to change notification settings - Fork 0
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
36 bounty done multiple claims #3
base: 36-bounty-done
Are you sure you want to change the base?
36 bounty done multiple claims #3
Conversation
…r successful BountyDone proposal
* add nft test file * make folder for test-nft * Added test-nft to build * Use prerelease near-sdk that supports NFTs and paste in example contract * begin upgrading code to v4 * Use AccountId instead of VerifiedAccountId, and use new str logs * Upgrade gas to use gas struct * Convert token id to str for comparison * Using safe versions of blockchain api * finished types.rs * change dereference to clone * everything is building * start updating tests and update test-token * Update all dependencies to near-sdk v4 * All packages upgraded to near-sdk 4.0.0-pre.2 * Tests are building, but failing * All build errors including building tests resolved. Now to fix logic bugs from tests * fixed some small issues * Use Gas() syntax instead of Gas{} * removed fromstr, changed token_id to accept a string * removed unneeded line * remove unnecessary mocked_blockchain * update unsafe code * All tests passing! * delete test-nft * remove to_va() * PR changes * remove unncessary testing macro
Format all files in the repo
Fix compilation error that occurs with the latest version of near-sdk
…-test-test_create_dao_and_use_token Fix sputnikdao2 test
…orkflows-pr add pull_request to GitHub workflows
…rnings Remove unused imports that generate compilation warnings
* Related to near-daos#29 * Allows user to call bounty_done on multiple claims on the same bounty. * Removes the bounty on it's last payout. * I believe this fixes near-daos#19 * Add tests on various bounty errors.
@@ -82,7 +85,7 @@ impl Contract { | |||
format!("Bounty {} payout", id), | |||
None, | |||
); | |||
if bounty.times == 0 { | |||
if bounty.times <= 1 { |
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.
I believe this change allows the bounty "done" proposal to be cleared up, and thus that proposal's bond to be returned
…-bounty-done-multiple-claims * merged near-daos#28. * kept the fix on claim clearing. * claims checks added on tests. * but also kept the possibility of multiple claims by the same user.
} | ||
|
||
#[test] | ||
fn test_bounty_general2() { |
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.
This is the testing on multiple claims on the same bounty by the same user
} | ||
|
||
#[test] | ||
fn test_bounty_general() { |
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.
This tests various errors and also normal functioning on a bounty.
In case that multiple claims are to be allowed, by the same user on the same bounty, this shows a possibility on how to allow a user to set the a bounty's claim to "done".