pallet_governance/
config.rs1use codec::{Decode, Encode, MaxEncodedLen};
2use polkadot_sdk::{
3 frame_election_provider_support::Get, frame_support::DebugNoBound,
4 polkadot_sdk_frame::prelude::BlockNumberFor, sp_runtime::Percent,
5};
6use scale_info::TypeInfo;
7
8use crate::BalanceOf;
9
10#[derive(Clone, TypeInfo, Decode, Encode, PartialEq, Eq, DebugNoBound, MaxEncodedLen)]
11#[scale_info(skip_type_params(T))]
12pub 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
22impl<T: crate::Config> Default for GovernanceConfiguration<T> {
23 fn default() -> Self {
24 Self {
25 proposal_cost: T::DefaultProposalCost::get(),
26 proposal_expiration: T::DefaultProposalExpiration::get(), agent_application_cost: T::DefaultAgentApplicationCost::get(), agent_application_expiration: T::DefaultAgentApplicationExpiration::get(), proposal_reward_treasury_allocation: T::DefaultProposalRewardTreasuryAllocation::get(), max_proposal_reward_treasury_allocation:
31 T::DefaultMaxProposalRewardTreasuryAllocation::get(), proposal_reward_interval: T::DefaultProposalRewardInterval::get(), }
34 }
35}