mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
Bounties (#5715)
* add some compact annotation * implement bounties for treasury * fix test build * remove some duplicated code * fix build * add tests * fix build * fix tests * rename * merge deposit byte fee * add comments * refactor storage * support sub bounty * emit BountyBecameActive when sub bounty is created * able to contribute bounty * allow curator to cancel bounty * remove bounty contribution * implement bounty expiry * Able to extend bounty * fix build and update tests * create sub bounty test * add more tests * add benchmarks for bounties * fix build * line width * fix benchmarking test * update trait * fix typo * Update lib.rs Missing documentation on Bounties added on this change. Please check the definitions of `propose_bounty` and `create_bounty`. * update docs * add MaximumSubBountyDepth * put BountyValueMinimum into storage * rework bount depth * split on_initialize benchmarks * remove components from constant functions * Update weight integration into treasury * Update reject proposal read/writes * fix weight calculation * Ignore weights with 0 factor * Remove 0 multipliers * add some docs * allow unused for generated code * line width * allow RejectOrigin to cancel a pending payout bounty * require BountyValueMinimum > ED * make BountyValueMinimum configurable by chain spec * remove sub-bounty features * update curator * accept curator * unassign and cancel * fix tests * new tests * Update lib.rs - Include on `Assign_curator`, `accept_curator` and `unassign_curator` on Bounties Protocol Section - Include curator fee and curator deposit definitions on Terminology - Update intro. * fix test * update extend_bounty_expiry * fix benchmarking * add new benchmarking code * add docs * fix tests * Update benchmarking.rs * Make BountyValueMinimum a trait config instead of stroage value * fix runtime build * Update weights * Update default_weights.rs * update weights * update * update comments * unreserve curator fee * update tests * update benchmarks * fix curator deposit handling * trigger CI * fix benchmarking * use append instead of mutate push * additional noop tests * improve fee hanlding. update event docs * RejectOrigin to unassign * update bounty cancel logic * use Zero::zero() over 0.into() * fix tests * fix benchmarks * proposed fixes to bounties * fix tests * fix benchmarks * update weightinfo * use closure * fix compile * update weights Co-authored-by: RRTTI <raul@ost.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -602,8 +602,14 @@ parameter_types! {
|
||||
pub const TipCountdown: BlockNumber = 1 * DAYS;
|
||||
pub const TipFindersFee: Percent = Percent::from_percent(20);
|
||||
pub const TipReportDepositBase: Balance = 1 * DOLLARS;
|
||||
pub const TipReportDepositPerByte: Balance = 1 * CENTS;
|
||||
pub const DataDepositPerByte: Balance = 1 * CENTS;
|
||||
pub const BountyDepositBase: Balance = 1 * DOLLARS;
|
||||
pub const BountyDepositPayoutDelay: BlockNumber = 1 * DAYS;
|
||||
pub const TreasuryModuleId: ModuleId = ModuleId(*b"py/trsry");
|
||||
pub const BountyUpdatePeriod: BlockNumber = 14 * DAYS;
|
||||
pub const MaximumReasonLength: u32 = 16384;
|
||||
pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);
|
||||
pub const BountyValueMinimum: Balance = 5 * DOLLARS;
|
||||
}
|
||||
|
||||
impl pallet_treasury::Trait for Runtime {
|
||||
@@ -623,15 +629,21 @@ impl pallet_treasury::Trait for Runtime {
|
||||
type TipCountdown = TipCountdown;
|
||||
type TipFindersFee = TipFindersFee;
|
||||
type TipReportDepositBase = TipReportDepositBase;
|
||||
type TipReportDepositPerByte = TipReportDepositPerByte;
|
||||
type DataDepositPerByte = DataDepositPerByte;
|
||||
type Event = Event;
|
||||
type ProposalRejection = ();
|
||||
type OnSlash = ();
|
||||
type ProposalBond = ProposalBond;
|
||||
type ProposalBondMinimum = ProposalBondMinimum;
|
||||
type SpendPeriod = SpendPeriod;
|
||||
type Burn = Burn;
|
||||
type BountyDepositBase = BountyDepositBase;
|
||||
type BountyDepositPayoutDelay = BountyDepositPayoutDelay;
|
||||
type BountyUpdatePeriod = BountyUpdatePeriod;
|
||||
type BountyCuratorDeposit = BountyCuratorDeposit;
|
||||
type BountyValueMinimum = BountyValueMinimum;
|
||||
type MaximumReasonLength = MaximumReasonLength;
|
||||
type BurnDestination = ();
|
||||
type WeightInfo = ();
|
||||
type WeightInfo = weights::pallet_treasury::WeightInfo;
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
|
||||
Reference in New Issue
Block a user