Trait pallet_xyk::pallet::Config
source · pub trait Config: Config {
Show 15 associated items
type Event: From<Event<Self>> + IsType<<Self as Config>::Event>;
type AssetRegistry: ShareTokenRegistry<AssetId, Vec<u8>, Balance, DispatchError>;
type AssetPairAccountId: AssetPairAccountIdFor<AssetId, Self::AccountId>;
type Currency: MultiCurrencyExtended<Self::AccountId, CurrencyId = AssetId, Balance = Balance, Amount = Amount>;
type NativeAssetId: Get<AssetId>;
type WeightInfo: WeightInfo;
type GetExchangeFee: Get<(u32, u32)>;
type MinTradingLimit: Get<Balance>;
type MinPoolLiquidity: Get<Balance>;
type MaxInRatio: Get<u128>;
type MaxOutRatio: Get<u128>;
type CanCreatePool: CanCreatePool<AssetId>;
type AMMHandler: OnCreatePoolHandler<AssetId> + OnTradeHandler<AssetId, Balance> + OnLiquidityChangedHandler<AssetId, Balance>;
type DiscountedFee: Get<(u32, u32)>;
type NonDustableWhitelistHandler: DustRemovalAccountWhitelist<Self::AccountId, Error = DispatchError>;
}
Expand description
Configuration trait of this pallet.
Implement this type for a runtime in order to customize this pallet.
Required Associated Types§
type Event: From<Event<Self>> + IsType<<Self as Config>::Event>
sourcetype AssetRegistry: ShareTokenRegistry<AssetId, Vec<u8>, Balance, DispatchError>
type AssetRegistry: ShareTokenRegistry<AssetId, Vec<u8>, Balance, DispatchError>
Registry support
sourcetype AssetPairAccountId: AssetPairAccountIdFor<AssetId, Self::AccountId>
type AssetPairAccountId: AssetPairAccountIdFor<AssetId, Self::AccountId>
Share token support
sourcetype Currency: MultiCurrencyExtended<Self::AccountId, CurrencyId = AssetId, Balance = Balance, Amount = Amount>
type Currency: MultiCurrencyExtended<Self::AccountId, CurrencyId = AssetId, Balance = Balance, Amount = Amount>
Multi currency for transfer of currencies
sourcetype NativeAssetId: Get<AssetId>
type NativeAssetId: Get<AssetId>
Native Asset Id
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for the extrinsics.
sourcetype GetExchangeFee: Get<(u32, u32)>
type GetExchangeFee: Get<(u32, u32)>
Trading fee rate
sourcetype MinTradingLimit: Get<Balance>
type MinTradingLimit: Get<Balance>
Minimum trading limit
sourcetype MinPoolLiquidity: Get<Balance>
type MinPoolLiquidity: Get<Balance>
Minimum pool liquidity
sourcetype MaxInRatio: Get<u128>
type MaxInRatio: Get<u128>
Max fraction of pool to sell in single transaction
sourcetype MaxOutRatio: Get<u128>
type MaxOutRatio: Get<u128>
Max fraction of pool to buy in single transaction
sourcetype CanCreatePool: CanCreatePool<AssetId>
type CanCreatePool: CanCreatePool<AssetId>
Called to ensure that pool can be created
sourcetype AMMHandler: OnCreatePoolHandler<AssetId> + OnTradeHandler<AssetId, Balance> + OnLiquidityChangedHandler<AssetId, Balance>
type AMMHandler: OnCreatePoolHandler<AssetId> + OnTradeHandler<AssetId, Balance> + OnLiquidityChangedHandler<AssetId, Balance>
AMM handlers
sourcetype DiscountedFee: Get<(u32, u32)>
type DiscountedFee: Get<(u32, u32)>
Discounted fee
sourcetype NonDustableWhitelistHandler: DustRemovalAccountWhitelist<Self::AccountId, Error = DispatchError>
type NonDustableWhitelistHandler: DustRemovalAccountWhitelist<Self::AccountId, Error = DispatchError>
Account whitelist manager to exclude pool accounts from dusting mechanism.