Trait pallet_recovery::pallet::Config
source · pub trait Config: Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type WeightInfo: WeightInfo;
type RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = Self::RuntimeOrigin, PostInfo = PostDispatchInfo> + GetDispatchInfo + From<Call<Self>>;
type Currency: ReservableCurrency<Self::AccountId>;
type ConfigDepositBase: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
type FriendDepositFactor: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
type MaxFriends: Get<u32>;
type RecoveryDeposit: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
}
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. Configuration trait.
Required Associated Types§
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
sourcetype RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = Self::RuntimeOrigin, PostInfo = PostDispatchInfo> + GetDispatchInfo + From<Call<Self>>
type RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = Self::RuntimeOrigin, PostInfo = PostDispatchInfo> + GetDispatchInfo + From<Call<Self>>
The overarching call type.
sourcetype ConfigDepositBase: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type ConfigDepositBase: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
The base amount of currency needed to reserve for creating a recovery configuration.
This is held for an additional storage item whose value size is
2 + sizeof(BlockNumber, Balance)
bytes.
sourcetype FriendDepositFactor: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type FriendDepositFactor: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
The amount of currency needed per additional user when creating a recovery configuration.
This is held for adding sizeof(AccountId)
bytes more into a pre-existing storage
value.
sourcetype MaxFriends: Get<u32>
type MaxFriends: Get<u32>
The maximum amount of friends allowed in a recovery configuration.
NOTE: The threshold programmed in this Pallet uses u16, so it does not really make sense to have a limit here greater than u16::MAX. But also, that is a lot more than you should probably set this value to anyway…
sourcetype RecoveryDeposit: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type RecoveryDeposit: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
The base amount of currency needed to reserve for starting a recovery.
This is primarily held for deterring malicious recovery attempts, and should
have a value large enough that a bad actor would choose not to place this
deposit. It also acts to fund additional storage item whose value size is
sizeof(BlockNumber, Balance + T * AccountId)
bytes. Where T is a configurable
threshold.