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§

source

type WeightInfo: WeightInfo

Information on runtime weights.

source

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

Overarching event type.

source

type PalletId: Get<PalletId>

The treasury’s pallet id, used for deriving its sovereign account ID.

source

type Currency: ReservableCurrency<Self::AccountId, Balance = Self::CurrencyBalance>

Currency type that this works on.

source

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>.

source

type FundOrigin: EnsureOrigin<Self::RuntimeOrigin>

Origin required for auto-funding the deficit.

source

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.

source

type Counterpart: FungibleMutate<Self::AccountId>

The accounting system for the fungible counterpart tokens.

source

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.

source

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).

source

type Target: Get<Perquintill>

The target sum of all receipts’ proportions.

source

type QueueCount: Get<u32>

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

source

type MaxQueueLen: Get<u32>

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

Must be larger than zero.

source

type FifoQueueLen: Get<u32>

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

Must be no greater than MaxQueueLen.

source

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.

source

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.

source

type MinReceipt: Get<Perquintill>

The minimum amount of funds which may intentionally be left remaining under a single receipt.

source

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.

source

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.

source

type ThawThrottle: Get<(Perquintill, Self::BlockNumber)>

The maximum proportion which may be thawed and the period over which it is reset.

Implementors§