Bounty module CLI commands #3102
Open
zeeshanakram3 wants to merge 16 commits intoJoystream:rhodesfrom
Open
Conversation
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/joystream/pioneer-testnet/63VKGSBizLCT4N3K6x59HFyjM4jZ [Deployment for 0a0fd8c canceled] |
…as for JSON input
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This draft PR contains my initial work related to Bounty module CLI commands.
Related issue:
The purpose of this PR is to add the following Bounty management commands and describe their usage in cli package README.md;
bounty:bountybounty:bountiesbounty:createBountybounty:cancelBountybounty:vetoBountybounty:fundBountybounty:withdrawFundingbounty:withdrawWorkEntrantFundsbounty:announceWorkEntrybounty:withdrawWorkEntrybounty:entrybounty:entriesbounty:submitWorkbounty:submitOracleJudgmentThe code that needs double-check/review or has not been implemented is marked with
TODOcomments.The implementation details of the initial work are as follows:
JSBounty&BountyMilestonetypes in thetypes/src/bounty.ts, these two types were missing in olympia base branch. I named bounty asJSBonutybecauseaugment/augment-api-query.tsalready hadBountyimported from Polkadot js treasury.BountyCommandBaseextendsRolesCommandBase, defines the helpers function used in the bounties related commandsbounty:createBountycommand ensures that all bounty creation parameters are valid.bounty:cancelBounty&bounty:vetoBountycommand ensures that bounty can only be canceled/vetoed if it's in theCreatedStage and has zero contributions. Also, bounty can only be canceled by member who created it.announceWorkEntry,withdrawWorkEntry,submitWork,submitOracleJudgmentetcsubmitOracleJudgmentextrinsic, previously on TS sideoracleJudgmentwas defined asHowever the correct type that runtime extrinsic accepts is
where
OracleWorkEntryJudgmentcorresponds to