/home/runner/work/torus-substrate/torus-substrate/pallets/governance/src/config.rs
Line | Count | Source |
1 | | use codec::{Decode, Encode, MaxEncodedLen}; |
2 | | use polkadot_sdk::{ |
3 | | frame_election_provider_support::Get, frame_support::DebugNoBound, |
4 | | polkadot_sdk_frame::prelude::BlockNumberFor, sp_runtime::Percent, |
5 | | }; |
6 | | use scale_info::TypeInfo; |
7 | | |
8 | | use crate::BalanceOf; |
9 | | |
10 | | #[derive(Clone, TypeInfo, Decode, Encode, PartialEq, Eq, DebugNoBound, MaxEncodedLen)] |
11 | | #[scale_info(skip_type_params(T))] |
12 | | pub struct GovernanceConfiguration<T: crate::Config> { |
13 | | pub proposal_cost: BalanceOf<T>, |
14 | | pub proposal_expiration: BlockNumberFor<T>, |
15 | | pub agent_application_cost: BalanceOf<T>, |
16 | | pub agent_application_expiration: BlockNumberFor<T>, |
17 | | pub proposal_reward_treasury_allocation: Percent, |
18 | | pub max_proposal_reward_treasury_allocation: BalanceOf<T>, |
19 | | pub proposal_reward_interval: BlockNumberFor<T>, |
20 | | } |
21 | | |
22 | | impl<T: crate::Config> Default for GovernanceConfiguration<T> { |
23 | 86.8k | fn default() -> Self { |
24 | 86.8k | Self { |
25 | 86.8k | proposal_cost: T::DefaultProposalCost::get(), |
26 | 86.8k | proposal_expiration: T::DefaultProposalExpiration::get(), //130_000, |
27 | 86.8k | agent_application_cost: T::DefaultAgentApplicationCost::get(), /* 100_000_000_000_000_000_000, */ |
28 | 86.8k | agent_application_expiration: T::DefaultAgentApplicationExpiration::get(), //2_000, |
29 | 86.8k | proposal_reward_treasury_allocation: T::DefaultProposalRewardTreasuryAllocation::get(), /* Percent::from_percent(2), */ |
30 | 86.8k | max_proposal_reward_treasury_allocation: |
31 | 86.8k | T::DefaultMaxProposalRewardTreasuryAllocation::get(), /* 10_000_000_000_000_000_000_000, */ |
32 | 86.8k | proposal_reward_interval: T::DefaultProposalRewardInterval::get(), //75_600, |
33 | 86.8k | } |
34 | 86.8k | } |
35 | | } |