Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Companion for Update Bounty Deposit (#11014) #5183

Merged
merged 6 commits into from
Mar 25, 2022
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -746,12 +746,6 @@ parameter_types! {
pub const TipFindersFee: Percent = Percent::from_percent(20);
pub const TipReportDepositBase: Balance = 100 * CENTS;
pub const DataDepositPerByte: Balance = 1 * CENTS;
pub const BountyDepositBase: Balance = 100 * CENTS;
pub const BountyDepositPayoutDelay: BlockNumber = 4 * DAYS;
pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS;
pub const MaximumReasonLength: u32 = 16384;
pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);
pub const BountyValueMinimum: Balance = 200 * CENTS;
pub const MaxApprovals: u32 = 100;
pub const MaxAuthorities: u32 = 100_000;
pub const MaxKeys: u32 = 10_000;
Expand Down Expand Up @@ -782,11 +776,24 @@ impl pallet_treasury::Config for Runtime {
type SpendFunds = Bounties;
}

parameter_types! {
pub const BountyDepositBase: Balance = 100 * CENTS;
pub const BountyDepositPayoutDelay: BlockNumber = 4 * DAYS;
pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS;
pub const MaximumReasonLength: u32 = 16384;
pub const CuratorDepositMultiplier: Permill = Permill::from_percent(50);
pub const CuratorDepositMin: Balance = 10 * CENTS;
pub const CuratorDepositMax: Balance = 500 * CENTS;
pub const BountyValueMinimum: Balance = 200 * CENTS;
}

impl pallet_bounties::Config for Runtime {
type BountyDepositBase = BountyDepositBase;
type BountyDepositPayoutDelay = BountyDepositPayoutDelay;
type BountyUpdatePeriod = BountyUpdatePeriod;
type BountyCuratorDeposit = BountyCuratorDeposit;
type CuratorDepositMultiplier = CuratorDepositMultiplier;
type CuratorDepositMin = CuratorDepositMin;
type CuratorDepositMax = CuratorDepositMax;
type BountyValueMinimum = BountyValueMinimum;
type ChildBountyManager = ChildBounties;
type DataDepositPerByte = DataDepositPerByte;
Expand All @@ -798,15 +805,12 @@ impl pallet_bounties::Config for Runtime {
parameter_types! {
pub const MaxActiveChildBountyCount: u32 = 100;
pub const ChildBountyValueMinimum: Balance = BountyValueMinimum::get() / 10;
// This will be 1% of the bounty value.
pub const ChildBountyCuratorDepositBase: Permill = Permill::from_percent(1);
}

impl pallet_child_bounties::Config for Runtime {
type Event = Event;
type MaxActiveChildBountyCount = MaxActiveChildBountyCount;
type ChildBountyValueMinimum = ChildBountyValueMinimum;
type ChildBountyCuratorDepositBase = ChildBountyCuratorDepositBase;
type WeightInfo = weights::pallet_child_bounties::WeightInfo<Runtime>;
}

Expand Down
24 changes: 14 additions & 10 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -778,12 +778,6 @@ parameter_types! {
pub const TipFindersFee: Percent = Percent::from_percent(20);
pub const TipReportDepositBase: Balance = 1 * DOLLARS;
pub const DataDepositPerByte: Balance = 1 * CENTS;
pub const BountyDepositBase: Balance = 1 * DOLLARS;
pub const BountyDepositPayoutDelay: BlockNumber = 8 * DAYS;
pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS;
pub const MaximumReasonLength: u32 = 16384;
pub const BountyCuratorDeposit: Permill = Permill::from_percent(50);
pub const BountyValueMinimum: Balance = 10 * DOLLARS;
pub const MaxApprovals: u32 = 100;
pub const MaxAuthorities: u32 = 100_000;
pub const MaxKeys: u32 = 10_000;
Expand Down Expand Up @@ -814,12 +808,25 @@ impl pallet_treasury::Config for Runtime {
type WeightInfo = weights::pallet_treasury::WeightInfo<Runtime>;
}

parameter_types! {
pub const BountyDepositBase: Balance = 1 * DOLLARS;
pub const BountyDepositPayoutDelay: BlockNumber = 8 * DAYS;
pub const BountyUpdatePeriod: BlockNumber = 90 * DAYS;
pub const MaximumReasonLength: u32 = 16384;
pub const CuratorDepositMultiplier: Permill = Permill::from_percent(50);
pub const CuratorDepositMin: Balance = 10 * DOLLARS;
pub const CuratorDepositMax: Balance = 200 * DOLLARS;
pub const BountyValueMinimum: Balance = 10 * DOLLARS;
}

impl pallet_bounties::Config for Runtime {
type Event = Event;
type BountyDepositBase = BountyDepositBase;
type BountyDepositPayoutDelay = BountyDepositPayoutDelay;
type BountyUpdatePeriod = BountyUpdatePeriod;
type BountyCuratorDeposit = BountyCuratorDeposit;
type CuratorDepositMultiplier = CuratorDepositMultiplier;
type CuratorDepositMin = CuratorDepositMin;
type CuratorDepositMax = CuratorDepositMax;
type BountyValueMinimum = BountyValueMinimum;
type ChildBountyManager = ChildBounties;
type DataDepositPerByte = DataDepositPerByte;
Expand All @@ -830,15 +837,12 @@ impl pallet_bounties::Config for Runtime {
parameter_types! {
pub const MaxActiveChildBountyCount: u32 = 100;
pub const ChildBountyValueMinimum: Balance = BountyValueMinimum::get() / 10;
// This will be 1% of the bounty value.
pub const ChildBountyCuratorDepositBase: Permill = Permill::from_percent(1);
}

impl pallet_child_bounties::Config for Runtime {
type Event = Event;
type MaxActiveChildBountyCount = MaxActiveChildBountyCount;
type ChildBountyValueMinimum = ChildBountyValueMinimum;
type ChildBountyCuratorDepositBase = ChildBountyCuratorDepositBase;
type WeightInfo = weights::pallet_child_bounties::WeightInfo<Runtime>;
}

Expand Down