1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
use frame_support::PalletId;
use sp_runtime::Permill;
use crate::{
weights::{
pallet_treasury_kton_treasury::WeightInfo as KtonTreasuryWeightInfo,
pallet_treasury_treasury::WeightInfo,
},
*,
};
use pallet_treasury::{Config, Instance2 as KtonTreasuryInstance};
frame_support::parameter_types! {
pub const TreasuryPalletId: PalletId = PalletId(*b"da/trsry");
pub const ProposalBond: Permill = Permill::from_percent(5);
pub const RingProposalBondMinimum: Balance = 10_000 * COIN;
pub const KtonProposalBondMinimum: Balance = 10 * COIN;
pub const SpendPeriod: BlockNumber = 6 * DAYS;
pub const Burn: Permill = Permill::from_percent(0);
pub const MaxApprovals: u32 = 100;
}
impl Config for Runtime {
type ApproveOrigin = RootOrAtLeastThreeFifth<CouncilCollective>;
type Burn = Burn;
type BurnDestination = Society;
type Currency = Ring;
type Event = Event;
type MaxApprovals = MaxApprovals;
type OnSlash = Treasury;
type PalletId = TreasuryPalletId;
type ProposalBond = ProposalBond;
type ProposalBondMaximum = ();
type ProposalBondMinimum = RingProposalBondMinimum;
type RejectOrigin = RootOrMoreThanHalf<CouncilCollective>;
type SpendFunds = Bounties;
type SpendPeriod = SpendPeriod;
type WeightInfo = WeightInfo<Self>;
}
impl Config<KtonTreasuryInstance> for Runtime {
type ApproveOrigin = RootOrAtLeastThreeFifth<CouncilCollective>;
type Burn = Burn;
type BurnDestination = ();
type Currency = Kton;
type Event = Event;
type MaxApprovals = MaxApprovals;
type OnSlash = KtonTreasury;
type PalletId = TreasuryPalletId;
type ProposalBond = ProposalBond;
type ProposalBondMaximum = ();
type ProposalBondMinimum = KtonProposalBondMinimum;
type RejectOrigin = RootOrMoreThanHalf<CouncilCollective>;
type SpendFunds = ();
type SpendPeriod = SpendPeriod;
type WeightInfo = KtonTreasuryWeightInfo<Self>;
}