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§
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: FunInspect<Self::AccountId, Balance = Self::CurrencyBalance> + FunMutate<Self::AccountId> + FunBalanced<Self::AccountId> + FunHoldMutate<Self::AccountId, Reason = Self::RuntimeHoldReason>
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.
sourcetype RuntimeHoldReason: From<HoldReason>
type RuntimeHoldReason: From<HoldReason>
Overarching hold reason.
sourcetype CurrencyBalance: Balance + From<u64>
type CurrencyBalance: Balance + From<u64>
Just the [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 FunInspect<<Self as Config>::AccountId>>::Balance>
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.
sourcetype Counterpart: FunMutate<Self::AccountId>
type Counterpart: FunMutate<Self::AccountId>
The accounting system for the fungible counterpart tokens.
sourcetype CounterpartAmount: ConvertBack<Perquintill, <Self::Counterpart as FunInspect<Self::AccountId>>::Balance>
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
.
sourcetype Deficit: OnUnbalanced<Debt<<Self as Config>::AccountId, <Self as Config>::Currency>>
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).
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<BlockNumberFor<Self>>
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.
sourcetype MinBid: Get<<<Self as Config>::Currency as FunInspect<<Self as Config>::AccountId>>::Balance>
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.
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<BlockNumberFor<Self>>
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.
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, BlockNumberFor<Self>)>
type ThawThrottle: Get<(Perquintill, BlockNumberFor<Self>)>
The maximum proportion which may be thawed and the period over which it is reset.
sourcetype BenchmarkSetup: BenchmarkSetup
type BenchmarkSetup: BenchmarkSetup
Setup the state for benchmarking.