pub trait Config: Config + Config + Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type TechAssetId: Copy + Ord + Member + Parameter + Into<<Self as Config>::AssetId> + From<<Self as Config>::AssetId>;
type TechAccountId: Ord + Member + Parameter + Default + FromGenericPair + MaybeSerializeDeserialize + ToFeeAccount + ToXykTechUnitFromDEXAndTradingPair<<Self as Config>::DEXId, TradingPair<Self::TechAssetId>> + ToOrderTechUnitFromDEXAndTradingPair<<Self as Config>::DEXId, TradingPair<Self::TechAssetId>> + Into<TechAccountId<Self::AccountId, Self::TechAssetId, Self::DEXId>>;
type Trigger: Default + Copy + Member + Parameter;
type Condition: Default + Copy + Member + Parameter;
type SwapAction: SwapRulesValidation<Self::AccountId, Self::TechAccountId, Self::AssetId, Self> + Parameter;
}
Expand description
Configuration trait of this pallet.
Implement this type for a runtime in order to customize this pallet.
Required Associated Types§
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
Because this pallet emits events, it depends on the runtime’s definition of an event.
sourcetype TechAssetId: Copy + Ord + Member + Parameter + Into<<Self as Config>::AssetId> + From<<Self as Config>::AssetId>
type TechAssetId: Copy + Ord + Member + Parameter + Into<<Self as Config>::AssetId> + From<<Self as Config>::AssetId>
Like Asset but deterministically maked from purpose.
sourcetype TechAccountId: Ord + Member + Parameter + Default + FromGenericPair + MaybeSerializeDeserialize + ToFeeAccount + ToXykTechUnitFromDEXAndTradingPair<<Self as Config>::DEXId, TradingPair<Self::TechAssetId>> + ToOrderTechUnitFromDEXAndTradingPair<<Self as Config>::DEXId, TradingPair<Self::TechAssetId>> + Into<TechAccountId<Self::AccountId, Self::TechAssetId, Self::DEXId>>
type TechAccountId: Ord + Member + Parameter + Default + FromGenericPair + MaybeSerializeDeserialize + ToFeeAccount + ToXykTechUnitFromDEXAndTradingPair<<Self as Config>::DEXId, TradingPair<Self::TechAssetId>> + ToOrderTechUnitFromDEXAndTradingPair<<Self as Config>::DEXId, TradingPair<Self::TechAssetId>> + Into<TechAccountId<Self::AccountId, Self::TechAssetId, Self::DEXId>>
Like AccountId but controlled by consensus, not signing by user. This extra traits exist here bacause no way to do it by constraints, problem exist with constraints and substrate macroses, and place this traits here is solution.
sourcetype SwapAction: SwapRulesValidation<Self::AccountId, Self::TechAccountId, Self::AssetId, Self> + Parameter
type SwapAction: SwapRulesValidation<Self::AccountId, Self::TechAccountId, Self::AssetId, Self> + Parameter
Swap action.