Trait pallet_ocif_staking::pallet::Config
source · pub trait Config: Config + Config + Config {
Show 20 associated items
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type Currency: LockableCurrency<Self::AccountId, Moment = BlockNumberFor<Self>> + ReservableCurrency<Self::AccountId>;
type BlocksPerEra: Get<BlockNumberFor<Self>>;
type RegisterDeposit: Get<BalanceOf<Self>>;
type MaxStakersPerCore: Get<u32>;
type MinimumStakingAmount: Get<BalanceOf<Self>>;
type PotId: Get<PalletId>;
type ExistentialDeposit: Get<BalanceOf<Self>>;
type MaxUnlocking: Get<u32>;
type UnbondingPeriod: Get<u32>;
type MaxEraStakeValues: Get<u32>;
type RewardRatio: Get<(u32, u32)>;
type StakeThresholdForActiveCore: Get<BalanceOf<Self>>;
type MaxNameLength: Get<u32>;
type MaxDescriptionLength: Get<u32>;
type MaxImageUrlLength: Get<u32>;
type WeightInfo: WeightInfo;
type StakingMessage: HandleMessage;
type WeightToFee: WeightToFee<Balance = BalanceOf<Self>>;
type OnUnbalanced: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>;
}
Expand description
Configuration trait of this pallet.
The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.
Consequently, a runtime that wants to include this pallet must implement this trait.
Required Associated Types§
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype Currency: LockableCurrency<Self::AccountId, Moment = BlockNumberFor<Self>> + ReservableCurrency<Self::AccountId>
type Currency: LockableCurrency<Self::AccountId, Moment = BlockNumberFor<Self>> + ReservableCurrency<Self::AccountId>
The currency used in staking.
sourcetype BlocksPerEra: Get<BlockNumberFor<Self>>
type BlocksPerEra: Get<BlockNumberFor<Self>>
Number of blocks per era.
sourcetype RegisterDeposit: Get<BalanceOf<Self>>
type RegisterDeposit: Get<BalanceOf<Self>>
Deposit amount that will be reserved as part of new core registration.
sourcetype MaxStakersPerCore: Get<u32>
type MaxStakersPerCore: Get<u32>
Maximum number of unique stakers per core.
sourcetype MinimumStakingAmount: Get<BalanceOf<Self>>
type MinimumStakingAmount: Get<BalanceOf<Self>>
Minimum amount user must have staked on a core. User can stake less if they already have the minimum staking amount staked.
sourcetype ExistentialDeposit: Get<BalanceOf<Self>>
type ExistentialDeposit: Get<BalanceOf<Self>>
The minimum amount required to keep an account open.
sourcetype MaxUnlocking: Get<u32>
type MaxUnlocking: Get<u32>
Max number of unlocking chunks per account Id <-> core Id pairing. If value is zero, unlocking becomes impossible.
sourcetype UnbondingPeriod: Get<u32>
type UnbondingPeriod: Get<u32>
Number of eras that need to pass until unstaked value can be withdrawn.
When set to 0
, it’s equal to having no unbonding period.
sourcetype MaxEraStakeValues: Get<u32>
type MaxEraStakeValues: Get<u32>
Max number of unique EraStake
values that can exist for a (staker, core)
pairing.
When stakers claims rewards, they will either keep the number of EraStake
values the same or they will reduce them by one.
Stakers cannot add an additional EraStake
value by calling bond&stake
or unbond&unstake
if they’ve reached the max number of values.
This ensures that history doesn’t grow indefinitely - if there are too many chunks, stakers should first claim their former rewards
before adding additional EraStake
values.
sourcetype RewardRatio: Get<(u32, u32)>
type RewardRatio: Get<(u32, u32)>
Reward ratio of the pot to be distributed between the core and stakers, respectively.
sourcetype StakeThresholdForActiveCore: Get<BalanceOf<Self>>
type StakeThresholdForActiveCore: Get<BalanceOf<Self>>
Threshold of staked tokens necessary for a core to become active.
sourcetype MaxNameLength: Get<u32>
type MaxNameLength: Get<u32>
Maximum length of a core’s name.
sourcetype MaxDescriptionLength: Get<u32>
type MaxDescriptionLength: Get<u32>
Maximum length of a core’s description.
sourcetype MaxImageUrlLength: Get<u32>
type MaxImageUrlLength: Get<u32>
Maximum length of a core’s image URL.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
sourcetype StakingMessage: HandleMessage
type StakingMessage: HandleMessage
Message queue interface.
sourcetype WeightToFee: WeightToFee<Balance = BalanceOf<Self>>
type WeightToFee: WeightToFee<Balance = BalanceOf<Self>>
Weight to fee conversion provider, from pallet_transaction_payment.
sourcetype OnUnbalanced: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>
type OnUnbalanced: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>
Fee charghing interface.