Trait pallet_domains::Config

source ·
pub trait Config: Config<Hash: Into<H256>> {
Show 39 associated items type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>; type DomainHash: Parameter + Member + MaybeSerializeDeserialize + Debug + MaybeDisplay + SimpleBitOps + Ord + Default + Copy + CheckEqual + Hash + AsRef<[u8]> + AsMut<[u8]> + MaxEncodedLen + Into<H256> + From<H256>; type Balance: Parameter + Member + MaybeSerializeDeserialize + AtLeast32BitUnsigned + FullCodec + Debug + MaybeDisplay + Default + Copy + MaxEncodedLen + From<u64>; type DomainHeader: HeaderT<Hash = Self::DomainHash>; type ConfirmationDepthK: Get<BlockNumberFor<Self>>; type DomainRuntimeUpgradeDelay: Get<BlockNumberFor<Self>>; type Currency: Inspect<Self::AccountId, Balance = Self::Balance> + Mutate<Self::AccountId> + InspectHold<Self::AccountId> + MutateHold<Self::AccountId>; type Share: Parameter + Member + MaybeSerializeDeserialize + Debug + AtLeast32BitUnsigned + FullCodec + Copy + Default + TypeInfo + MaxEncodedLen + IsType<<Self as Config>::Balance>; type HoldIdentifier: HoldIdentifier<Self>; type BlockTreePruningDepth: Get<DomainBlockNumberFor<Self>>; type ConsensusSlotProbability: Get<(u64, u64)>; type MaxDomainBlockSize: Get<u32>; type MaxDomainBlockWeight: Get<Weight>; type MaxBundlesPerBlock: Get<u32>; type MaxDomainNameLength: Get<u32>; type DomainInstantiationDeposit: Get<<Self as Config>::Balance>; type WeightInfo: WeightInfo; type InitialDomainTxRange: Get<u64>; type DomainTxRangeAdjustmentInterval: Get<u64>; type MinOperatorStake: Get<<Self as Config>::Balance>; type MinNominatorStake: Get<<Self as Config>::Balance>; type StakeWithdrawalLockingPeriod: Get<DomainBlockNumberFor<Self>>; type StakeEpochDuration: Get<DomainBlockNumberFor<Self>>; type TreasuryAccount: Get<Self::AccountId>; type MaxPendingStakingOperation: Get<u32>; type Randomness: RandomnessT<Self::Hash, BlockNumberFor<Self>>; type PalletId: Get<PalletId>; type StorageFee: StorageFee<<Self as Config>::Balance>; type BlockSlot: BlockSlot<Self>; type DomainsTransfersTracker: DomainsTransfersTracker<<Self as Config>::Balance>; type MaxInitialDomainAccounts: Get<u32>; type MinInitialDomainAccountBalance: Get<<Self as Config>::Balance>; type BundleLongevity: Get<u32>; type DomainBundleSubmitted: DomainBundleSubmitted; type OnDomainInstantiated: OnDomainInstantiated; type MmrHash: Parameter + Member + Default + Clone; type MmrProofVerifier: MmrProofVerifier<Self::MmrHash, BlockNumberFor<Self>, <<Self as Config>::Hashing as Hash>::Output>; type FraudProofStorageKeyProvider: FraudProofStorageKeyProvider<BlockNumberFor<Self>>; type OnChainRewards: OnChainRewards<<Self as Config>::Balance>;
}
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§

source

type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>

source

type DomainHash: Parameter + Member + MaybeSerializeDeserialize + Debug + MaybeDisplay + SimpleBitOps + Ord + Default + Copy + CheckEqual + Hash + AsRef<[u8]> + AsMut<[u8]> + MaxEncodedLen + Into<H256> + From<H256>

Domain block hash type.

source

type Balance: Parameter + Member + MaybeSerializeDeserialize + AtLeast32BitUnsigned + FullCodec + Debug + MaybeDisplay + Default + Copy + MaxEncodedLen + From<u64>

source

type DomainHeader: HeaderT<Hash = Self::DomainHash>

The domain header type.

source

type ConfirmationDepthK: Get<BlockNumberFor<Self>>

Same with pallet_subspace::Config::ConfirmationDepthK.

source

type DomainRuntimeUpgradeDelay: Get<BlockNumberFor<Self>>

Delay before a domain runtime is upgraded.

source

type Currency: Inspect<Self::AccountId, Balance = Self::Balance> + Mutate<Self::AccountId> + InspectHold<Self::AccountId> + MutateHold<Self::AccountId>

Currency type used by the domains for staking and other currency related stuff.

source

type Share: Parameter + Member + MaybeSerializeDeserialize + Debug + AtLeast32BitUnsigned + FullCodec + Copy + Default + TypeInfo + MaxEncodedLen + IsType<<Self as Config>::Balance>

Type representing the shares in the staking protocol.

source

type HoldIdentifier: HoldIdentifier<Self>

A variation of the Identifier used for holding the funds used for staking and domains.

source

type BlockTreePruningDepth: Get<DomainBlockNumberFor<Self>>

The block tree pruning depth.

source

type ConsensusSlotProbability: Get<(u64, u64)>

Consensus chain slot probability.

source

type MaxDomainBlockSize: Get<u32>

The maximum block size limit for all domain.

source

type MaxDomainBlockWeight: Get<Weight>

The maximum block weight limit for all domain.

source

type MaxBundlesPerBlock: Get<u32>

The maximum bundle per block limit for all domain.

source

type MaxDomainNameLength: Get<u32>

The maximum domain name length limit for all domain.

source

type DomainInstantiationDeposit: Get<<Self as Config>::Balance>

The amount of fund to be locked up for the domain instance creator.

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

source

type InitialDomainTxRange: Get<u64>

Initial domain tx range value.

source

type DomainTxRangeAdjustmentInterval: Get<u64>

Domain tx range is adjusted after every DomainTxRangeAdjustmentInterval blocks.

source

type MinOperatorStake: Get<<Self as Config>::Balance>

Minimum operator stake required to become operator of a domain.

source

type MinNominatorStake: Get<<Self as Config>::Balance>

Minimum nominator stake required to nominate and operator.

source

type StakeWithdrawalLockingPeriod: Get<DomainBlockNumberFor<Self>>

Minimum number of blocks after which any finalized withdrawals are released to nominators.

source

type StakeEpochDuration: Get<DomainBlockNumberFor<Self>>

Domain epoch transition interval

source

type TreasuryAccount: Get<Self::AccountId>

Treasury account.

source

type MaxPendingStakingOperation: Get<u32>

The maximum number of pending staking operation that can perform upon epoch transition.

source

type Randomness: RandomnessT<Self::Hash, BlockNumberFor<Self>>

Randomness source.

source

type PalletId: Get<PalletId>

The pallet-domains’s pallet id.

source

type StorageFee: StorageFee<<Self as Config>::Balance>

Storage fee interface used to deal with bundle storage fee

source

type BlockSlot: BlockSlot<Self>

The block slot

source

type DomainsTransfersTracker: DomainsTransfersTracker<<Self as Config>::Balance>

Transfers tracker.

source

type MaxInitialDomainAccounts: Get<u32>

Upper limit for total initial accounts domains

source

type MinInitialDomainAccountBalance: Get<<Self as Config>::Balance>

Minimum balance for each initial domain account

source

type BundleLongevity: Get<u32>

How many block a bundle should still consider as valid after produced

source

type DomainBundleSubmitted: DomainBundleSubmitted

Post hook to notify accepted domain bundles in previous block.

source

type OnDomainInstantiated: OnDomainInstantiated

A hook to call after a domain is instantiated

source

type MmrHash: Parameter + Member + Default + Clone

Hash type of MMR

source

type MmrProofVerifier: MmrProofVerifier<Self::MmrHash, BlockNumberFor<Self>, <<Self as Config>::Hashing as Hash>::Output>

MMR proof verifier

source

type FraudProofStorageKeyProvider: FraudProofStorageKeyProvider<BlockNumberFor<Self>>

Fraud proof storage key provider

source

type OnChainRewards: OnChainRewards<<Self as Config>::Balance>

Hook to handle chain rewards.

Object Safety§

This trait is not object safe.

Implementors§