Trait pallet_balances::pallet::Config
source · pub trait Config<I: 'static = ()>: Config {
Show 13 associated items
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>;
type WeightInfo: WeightInfo;
type Balance: Parameter + Member + AtLeast32BitUnsigned + Codec + Default + Copy + MaybeSerializeDeserialize + Debug + MaxEncodedLen + TypeInfo + FixedPointOperand;
type DustRemoval: OnUnbalanced<CreditOf<Self, I>>;
type ExistentialDeposit: Get<Self::Balance>;
type AccountStore: StoredMap<Self::AccountId, AccountData<Self::Balance>>;
type ReserveIdentifier: Parameter + Member + MaxEncodedLen + Ord + Copy;
type RuntimeHoldReason: Parameter + Member + MaxEncodedLen + Ord + Copy;
type FreezeIdentifier: Parameter + Member + MaxEncodedLen + Ord + Copy;
type MaxLocks: Get<u32>;
type MaxReserves: Get<u32>;
type MaxHolds: Get<u32>;
type MaxFreezes: Get<u32>;
}
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 RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
sourcetype Balance: Parameter + Member + AtLeast32BitUnsigned + Codec + Default + Copy + MaybeSerializeDeserialize + Debug + MaxEncodedLen + TypeInfo + FixedPointOperand
type Balance: Parameter + Member + AtLeast32BitUnsigned + Codec + Default + Copy + MaybeSerializeDeserialize + Debug + MaxEncodedLen + TypeInfo + FixedPointOperand
The balance of an account.
sourcetype DustRemoval: OnUnbalanced<CreditOf<Self, I>>
type DustRemoval: OnUnbalanced<CreditOf<Self, I>>
Handler for the unbalanced reduction when removing a dust account.
sourcetype ExistentialDeposit: Get<Self::Balance>
type ExistentialDeposit: Get<Self::Balance>
The minimum amount required to keep an account open. MUST BE GREATER THAN ZERO!
If you really need it to be zero, you can enable the feature insecure_zero_ed
for
this pallet. However, you do so at your own risk: this will open up a major DoS vector.
In case you have multiple sources of provider references, you may also get unexpected
behaviour if you set this to zero.
Bottom line: Do yourself a favour and make it at least one!
sourcetype AccountStore: StoredMap<Self::AccountId, AccountData<Self::Balance>>
type AccountStore: StoredMap<Self::AccountId, AccountData<Self::Balance>>
The means of storing the balances of an account.
sourcetype ReserveIdentifier: Parameter + Member + MaxEncodedLen + Ord + Copy
type ReserveIdentifier: Parameter + Member + MaxEncodedLen + Ord + Copy
The ID type for reserves.
Use of reserves is deprecated in favour of holds. See https://github.com/paritytech/substrate/pull/12951/
sourcetype RuntimeHoldReason: Parameter + Member + MaxEncodedLen + Ord + Copy
type RuntimeHoldReason: Parameter + Member + MaxEncodedLen + Ord + Copy
The overarching hold reason.
sourcetype FreezeIdentifier: Parameter + Member + MaxEncodedLen + Ord + Copy
type FreezeIdentifier: Parameter + Member + MaxEncodedLen + Ord + Copy
The ID type for freezes.
sourcetype MaxLocks: Get<u32>
type MaxLocks: Get<u32>
The maximum number of locks that should exist on an account. Not strictly enforced, but used for weight estimation.
sourcetype MaxReserves: Get<u32>
type MaxReserves: Get<u32>
The maximum number of named reserves that can exist on an account.
sourcetype MaxFreezes: Get<u32>
type MaxFreezes: Get<u32>
The maximum number of individual freeze locks that can exist on an account at any time.