Trait pallet_gilt::pallet::Config
source · pub trait Config: Config {
Show 15 associated items
type Event: From<Event<Self>> + IsType<<Self as Config>::Event>;
type Currency: ReservableCurrency<Self::AccountId, Balance = Self::CurrencyBalance>;
type CurrencyBalance: AtLeast32BitUnsigned + FullCodec + Copy + MaybeSerializeDeserialize + Debug + Default + From<u64> + TypeInfo + MaxEncodedLen;
type AdminOrigin: EnsureOrigin<Self::Origin>;
type Deficit: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::PositiveImbalance>;
type Surplus: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>;
type IgnoredIssuance: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
type QueueCount: Get<u32>;
type MaxQueueLen: Get<u32>;
type FifoQueueLen: Get<u32>;
type Period: Get<Self::BlockNumber>;
type MinFreeze: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
type IntakePeriod: Get<Self::BlockNumber>;
type MaxIntakeBids: Get<u32>;
type WeightInfo: WeightInfo;
}
Expand description
Configuration trait of this pallet.
Implement this type for a runtime in order to customize this pallet.
Required Associated Types§
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 AdminOrigin: EnsureOrigin<Self::Origin>
type AdminOrigin: EnsureOrigin<Self::Origin>
Origin required for setting the target proportion to be under gilt.
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 Surplus: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>
type Surplus: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>
Unbalanced handler to account for funds destroyed (in case of a lower total issuance over freezing period).
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 by which we inflate or deflate the gilt.
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.
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 Period: Get<Self::BlockNumber>
type Period: 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 MinFreeze: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type MinFreeze: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
The minimum amount of funds that may be offered to freeze for a gilt. Note that this does not actually limit the amount which may be frozen in a gilt since gilts may be split up in order to satisfy the desired amount of funds under gilts.
It should be at least big enough to ensure that there is no possible storage spam attack or queue-filling attack.
sourcetype IntakePeriod: Get<Self::BlockNumber>
type IntakePeriod: Get<Self::BlockNumber>
The number of blocks between consecutive attempts to issue more gilts in an effort to get to the target amount to be frozen.
A larger value results in fewer storage hits each block, but a slower period to get to the target.
sourcetype MaxIntakeBids: Get<u32>
type MaxIntakeBids: Get<u32>
The maximum amount of bids that can be turned into issued gilts each block. A larger value here means less of the block available for transactions should there be a glut of bids to make into gilts to reach the target.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Information on runtime weights.