pub trait Config: Config {
Show 13 associated items
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = Self::RuntimeOrigin> + GetDispatchInfo + From<Call<Self>> + IsSubType<Call<Self>> + IsType<<Self as Config>::RuntimeCall>;
type Currency: ReservableCurrency<Self::AccountId>;
type ProxyType: Parameter + Member + Ord + PartialOrd + InstanceFilter<<Self as Config>::RuntimeCall> + Default + MaxEncodedLen;
type ProxyDepositBase: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
type ProxyDepositFactor: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
type MaxProxies: Get<u32>;
type WeightInfo: WeightInfo;
type MaxPending: Get<u32>;
type CallHasher: Hash;
type AnnouncementDepositBase: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
type AnnouncementDepositFactor: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
type BlockNumberProvider: BlockNumberProvider;
}
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 RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = Self::RuntimeOrigin> + GetDispatchInfo + From<Call<Self>> + IsSubType<Call<Self>> + IsType<<Self as Config>::RuntimeCall>
type RuntimeCall: Parameter + Dispatchable<RuntimeOrigin = Self::RuntimeOrigin> + GetDispatchInfo + From<Call<Self>> + IsSubType<Call<Self>> + IsType<<Self as Config>::RuntimeCall>
The overarching call type.
Sourcetype ProxyType: Parameter + Member + Ord + PartialOrd + InstanceFilter<<Self as Config>::RuntimeCall> + Default + MaxEncodedLen
type ProxyType: Parameter + Member + Ord + PartialOrd + InstanceFilter<<Self as Config>::RuntimeCall> + Default + MaxEncodedLen
A kind of proxy; specified with the proxy and passed in to the IsProxyable
filter.
The instance filter determines whether a given call may be proxied under this type.
IMPORTANT: Default
must be provided and MUST BE the the most permissive value.
Sourcetype ProxyDepositBase: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type ProxyDepositBase: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
The base amount of currency needed to reserve for creating a proxy.
This is held for an additional storage item whose value size is
sizeof(Balance)
bytes and whose key size is sizeof(AccountId)
bytes.
Sourcetype ProxyDepositFactor: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type ProxyDepositFactor: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
The amount of currency needed per proxy added.
This is held for adding 32 bytes plus an instance of ProxyType
more into a
pre-existing storage value. Thus, when configuring ProxyDepositFactor
one should take
into account 32 + proxy_type.encode().len()
bytes of data.
Sourcetype MaxProxies: Get<u32>
type MaxProxies: Get<u32>
The maximum amount of proxies allowed for a single account.
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
Sourcetype MaxPending: Get<u32>
type MaxPending: Get<u32>
The maximum amount of time-delayed announcements that are allowed to be pending.
Sourcetype CallHasher: Hash
type CallHasher: Hash
The type of hash used for hashing the call.
Sourcetype AnnouncementDepositBase: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type AnnouncementDepositBase: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
The base amount of currency needed to reserve for creating an announcement.
This is held when a new storage item holding a Balance
is created (typically 16
bytes).
Sourcetype AnnouncementDepositFactor: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type AnnouncementDepositFactor: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
The amount of currency needed per announcement made.
This is held for adding an AccountId
, Hash
and BlockNumber
(typically 68 bytes)
into a pre-existing storage value.
Sourcetype BlockNumberProvider: BlockNumberProvider
type BlockNumberProvider: BlockNumberProvider
Query the current block number.
Must return monotonically increasing values when called from consecutive blocks. Can be configured to return either:
- the local block number of the runtime via
frame_system::Pallet
- a remote block number, eg from the relay chain through
RelaychainDataProvider
- an arbitrary value through a custom implementation of the trait
There is currently no migration provided to “hot-swap” block number providers and it may result in undefined behavior when doing so. Parachains are therefore best off setting this to their local block number provider if they have the pallet already deployed.
Suggested values:
- Solo- and Relay-chains:
frame_system::Pallet
- Parachains that may produce blocks sparingly or only when needed (on-demand):
- already have the pallet deployed:
frame_system::Pallet
- are freshly deploying this pallet:
RelaychainDataProvider
- already have the pallet deployed:
- Parachains with a reliably block production rate (PLO or bulk-coretime):
- already have the pallet deployed:
frame_system::Pallet
- are freshly deploying this pallet: no strong recommendation. Both local and remote providers can be used. Relay provider can be a bit better in cases where the parachain is lagging its block production to avoid clock skew.
- already have the pallet deployed:
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.