pub trait Config: Config {
type MaxChanges: Get<u32>;
type MaxKeyLength: Get<u32>;
type MaxValueLength: Get<u32>;
type OnGovernedMappingChange: OnGovernedMappingChange<Self::MaxKeyLength, Self::MaxValueLength>;
type MainChainScriptsOrigin: EnsureOrigin<Self::RuntimeOrigin>;
type WeightInfo: WeightInfo;
}
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 MaxChanges: Get<u32>
type MaxChanges: Get<u32>
Maximum number of changes that can be registered in a single inherent.
This value must be high enough for all changes to be registered in one block. Setting this to a value higher than the total number of parameters in the Governed Map guarantees that.
Sourcetype MaxKeyLength: Get<u32>
type MaxKeyLength: Get<u32>
Maximum length of the key in the Governed Map in bytes.
This value must be high enough not to be exceeded by any key stored on Cardano.
Sourcetype MaxValueLength: Get<u32>
type MaxValueLength: Get<u32>
Maximum length of data stored under a single key in the Governed Map
This value must be high enough not to be exceeded by any value stored on Cardano.
Sourcetype OnGovernedMappingChange: OnGovernedMappingChange<Self::MaxKeyLength, Self::MaxValueLength>
type OnGovernedMappingChange: OnGovernedMappingChange<Self::MaxKeyLength, Self::MaxValueLength>
Handler called for each change in the governed mappings.
If your runtime does not need to react to any changes, a no-op implementation for [()] can be used. Otherwise, it is advised to benchmark the runtime and use your own weights to include weight consumed by the handler.
Sourcetype MainChainScriptsOrigin: EnsureOrigin<Self::RuntimeOrigin>
type MainChainScriptsOrigin: EnsureOrigin<Self::RuntimeOrigin>
Origin for governance calls
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight functions for the pallet’s extrinsics
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.