Trait pallet_nis::pallet::Config
source · pub trait Config: Config {
Show 20 associated items
type WeightInfo: WeightInfo;
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type PalletId: Get<PalletId>;
type Currency: ReservableCurrency<Self::AccountId, Balance = Self::CurrencyBalance>;
type CurrencyBalance: AtLeast32BitUnsigned + FullCodec + Copy + MaybeSerializeDeserialize + Debug + Default + From<u64> + TypeInfo + MaxEncodedLen;
type FundOrigin: EnsureOrigin<Self::RuntimeOrigin>;
type IgnoredIssuance: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
type Counterpart: FungibleMutate<Self::AccountId>;
type CounterpartAmount: ConvertBack<Perquintill, <Self::Counterpart as FungibleInspect<Self::AccountId>>::Balance>;
type Deficit: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::PositiveImbalance>;
type Target: Get<Perquintill>;
type QueueCount: Get<u32>;
type MaxQueueLen: Get<u32>;
type FifoQueueLen: Get<u32>;
type BasePeriod: Get<Self::BlockNumber>;
type MinBid: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
type MinReceipt: Get<Perquintill>;
type IntakePeriod: Get<Self::BlockNumber>;
type MaxIntakeWeight: Get<Weight>;
type ThawThrottle: Get<(Perquintill, Self::BlockNumber)>;
}
Expand description
Configuration trait of this pallet.
Implement this type for a runtime in order to customize this pallet.
Required Associated Types§
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Information on runtime weights.
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
Overarching event type.
sourcetype PalletId: Get<PalletId>
type PalletId: Get<PalletId>
The treasury’s pallet id, used for deriving its sovereign account ID.
sourcetype Currency: ReservableCurrency<Self::AccountId, Balance = Self::CurrencyBalance>
type Currency: ReservableCurrency<Self::AccountId, Balance = Self::CurrencyBalance>
Currency type that this works on.
sourcetype CurrencyBalance: AtLeast32BitUnsigned + FullCodec + Copy + MaybeSerializeDeserialize + Debug + Default + From<u64> + TypeInfo + MaxEncodedLen
type CurrencyBalance: AtLeast32BitUnsigned + FullCodec + Copy + MaybeSerializeDeserialize + Debug + Default + From<u64> + TypeInfo + MaxEncodedLen
Just the Currency::Balance
type; we have this item to allow us to constrain it to
From<u64>
.
sourcetype FundOrigin: EnsureOrigin<Self::RuntimeOrigin>
type FundOrigin: EnsureOrigin<Self::RuntimeOrigin>
Origin required for auto-funding the deficit.
sourcetype IgnoredIssuance: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type IgnoredIssuance: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
The issuance to ignore. This is subtracted from the Currency
’s total_issuance
to get
the issuance with which we determine the thawed value of a given proportion.
sourcetype Counterpart: FungibleMutate<Self::AccountId>
type Counterpart: FungibleMutate<Self::AccountId>
The accounting system for the fungible counterpart tokens.
sourcetype CounterpartAmount: ConvertBack<Perquintill, <Self::Counterpart as FungibleInspect<Self::AccountId>>::Balance>
type CounterpartAmount: ConvertBack<Perquintill, <Self::Counterpart as FungibleInspect<Self::AccountId>>::Balance>
The system to convert an overall proportion of issuance into a number of fungible counterpart tokens.
In general it’s best to use WithMaximumOf
.
sourcetype Deficit: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::PositiveImbalance>
type Deficit: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::PositiveImbalance>
Unbalanced handler to account for funds created (in case of a higher total issuance over freezing period).
sourcetype Target: Get<Perquintill>
type Target: Get<Perquintill>
The target sum of all receipts’ proportions.
sourcetype QueueCount: Get<u32>
type QueueCount: Get<u32>
Number of duration queues in total. This sets the maximum duration supported, which is
this value multiplied by Period
.
sourcetype MaxQueueLen: Get<u32>
type MaxQueueLen: Get<u32>
Maximum number of items that may be in each duration queue.
Must be larger than zero.
sourcetype FifoQueueLen: Get<u32>
type FifoQueueLen: Get<u32>
Portion of the queue which is free from ordering and just a FIFO.
Must be no greater than MaxQueueLen
.
sourcetype BasePeriod: Get<Self::BlockNumber>
type BasePeriod: Get<Self::BlockNumber>
The base period for the duration queues. This is the common multiple across all supported freezing durations that can be bid upon.
sourcetype MinBid: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type MinBid: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
The minimum amount of funds that may be placed in a bid. Note that this does not actually limit the amount which may be represented in a receipt since bids may be split up by the system.
It should be at least big enough to ensure that there is no possible storage spam attack or queue-filling attack.
sourcetype MinReceipt: Get<Perquintill>
type MinReceipt: Get<Perquintill>
The minimum amount of funds which may intentionally be left remaining under a single receipt.
sourcetype IntakePeriod: Get<Self::BlockNumber>
type IntakePeriod: Get<Self::BlockNumber>
The number of blocks between consecutive attempts to dequeue bids and create receipts.
A larger value results in fewer storage hits each block, but a slower period to get to the target.
sourcetype MaxIntakeWeight: Get<Weight>
type MaxIntakeWeight: Get<Weight>
The maximum amount of bids that can consolidated into receipts in a single intake. A larger value here means less of the block available for transactions should there be a glut of bids.
sourcetype ThawThrottle: Get<(Perquintill, Self::BlockNumber)>
type ThawThrottle: Get<(Perquintill, Self::BlockNumber)>
The maximum proportion which may be thawed and the period over which it is reset.