Trait pallet_gilt::pallet::Config[][src]

pub trait Config: Config {
Show 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>; 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.

Associated Types

Overarching event type.

Currency type that this works on.

Just the Currency::Balance type; we have this item to allow us to constrain it to From<u64>.

Origin required for setting the target proportion to be under gilt.

Unbalanced handler to account for funds created (in case of a higher total issuance over freezing period).

Unbalanced handler to account for funds destroyed (in case of a lower total issuance over freezing period).

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.

Number of duration queues in total. This sets the maximum duration supported, which is this value multiplied by Period.

Maximum number of items that may be in each duration queue.

Portion of the queue which is free from ordering and just a FIFO.

Must be no greater than MaxQueueLen.

The base period for the duration queues. This is the common multiple across all supported freezing durations that can be bid upon.

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.

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.

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.

Information on runtime weights.

Implementors