referrerpolicy=no-referrer-when-downgrade

Trait pallet_nis::pallet::Config

source ·
pub trait Config: Config {
Show 22 associated items type WeightInfo: WeightInfo; type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>; type PalletId: Get<PalletId>; type Currency: FunInspect<Self::AccountId, Balance = Self::CurrencyBalance> + FunMutate<Self::AccountId> + FunBalanced<Self::AccountId> + FunHoldMutate<Self::AccountId, Reason = Self::RuntimeHoldReason>; type RuntimeHoldReason: From<HoldReason>; type CurrencyBalance: Balance + From<u64>; type FundOrigin: EnsureOrigin<Self::RuntimeOrigin>; type IgnoredIssuance: Get<<<Self as Config>::Currency as FunInspect<<Self as Config>::AccountId>>::Balance>; type Counterpart: FunMutate<Self::AccountId>; type CounterpartAmount: ConvertBack<Perquintill, <Self::Counterpart as FunInspect<Self::AccountId>>::Balance>; type Deficit: OnUnbalanced<Debt<<Self as Config>::AccountId, <Self as Config>::Currency>>; type Target: Get<Perquintill>; type QueueCount: Get<u32>; type MaxQueueLen: Get<u32>; type FifoQueueLen: Get<u32>; type BasePeriod: Get<BlockNumberFor<Self>>; type MinBid: Get<<<Self as Config>::Currency as FunInspect<<Self as Config>::AccountId>>::Balance>; type MinReceipt: Get<Perquintill>; type IntakePeriod: Get<BlockNumberFor<Self>>; type MaxIntakeWeight: Get<Weight>; type ThawThrottle: Get<(Perquintill, BlockNumberFor<Self>)>; type BenchmarkSetup: BenchmarkSetup;
}
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 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: FunInspect<Self::AccountId, Balance = Self::CurrencyBalance> + FunMutate<Self::AccountId> + FunBalanced<Self::AccountId> + FunHoldMutate<Self::AccountId, Reason = Self::RuntimeHoldReason>

Currency type that this works on.

source

type RuntimeHoldReason: From<HoldReason>

Overarching hold reason.

source

type CurrencyBalance: Balance + From<u64>

Just the [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 FunInspect<<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: FunMutate<Self::AccountId>

The accounting system for the fungible counterpart tokens.

source

type CounterpartAmount: ConvertBack<Perquintill, <Self::Counterpart as FunInspect<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<Debt<<Self as Config>::AccountId, <Self as Config>::Currency>>

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<BlockNumberFor<Self>>

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 FunInspect<<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<BlockNumberFor<Self>>

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, BlockNumberFor<Self>)>

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

source

type BenchmarkSetup: BenchmarkSetup

Setup the state for benchmarking.

Object Safety§

This trait is not object safe.

Implementors§