pub trait Config: Config + Config {
type Event: From<Event<Self>> + IsType<<Self as Config>::Event>;
type AcceptedCurrencyOrigin: EnsureOrigin<Self::Origin>;
type Currencies: MultiCurrencyExtended<Self::AccountId>;
type SpotPriceProvider: SpotPriceProvider<<<Self as Config>::Currencies as MultiCurrency<<Self as Config>::AccountId>>::CurrencyId, Price = Price>;
type WeightInfo: WeightInfo;
type WithdrawFeeForSetCurrency: Get<Pays>;
type WeightToFee: WeightToFee<Balance = <<Self as Config>::Currencies as MultiCurrency<<Self as Config>::AccountId>>::Balance>;
type NativeAssetId: Get<<<Self as Config>::Currencies as MultiCurrency<<Self as Config>::AccountId>>::CurrencyId>;
type FeeReceiver: Get<Self::AccountId>;
}
Expand description
Configuration trait of this pallet.
Implement this type for a runtime in order to customize this pallet.
Required Associated Types§
sourcetype Event: From<Event<Self>> + IsType<<Self as Config>::Event>
type Event: From<Event<Self>> + IsType<<Self as Config>::Event>
Because this pallet emits events, it depends on the runtime’s definition of an event.
sourcetype AcceptedCurrencyOrigin: EnsureOrigin<Self::Origin>
type AcceptedCurrencyOrigin: EnsureOrigin<Self::Origin>
The origin which can add/remove accepted currencies
sourcetype Currencies: MultiCurrencyExtended<Self::AccountId>
type Currencies: MultiCurrencyExtended<Self::AccountId>
Multi Currency
sourcetype SpotPriceProvider: SpotPriceProvider<<<Self as Config>::Currencies as MultiCurrency<<Self as Config>::AccountId>>::CurrencyId, Price = Price>
type SpotPriceProvider: SpotPriceProvider<<<Self as Config>::Currencies as MultiCurrency<<Self as Config>::AccountId>>::CurrencyId, Price = Price>
Spot price provider
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for the extrinsics.
sourcetype WithdrawFeeForSetCurrency: Get<Pays>
type WithdrawFeeForSetCurrency: Get<Pays>
Should fee be paid for setting a currency
sourcetype WeightToFee: WeightToFee<Balance = <<Self as Config>::Currencies as MultiCurrency<<Self as Config>::AccountId>>::Balance>
type WeightToFee: WeightToFee<Balance = <<Self as Config>::Currencies as MultiCurrency<<Self as Config>::AccountId>>::Balance>
Convert a weight value into a deductible fee based on the currency type.
sourcetype NativeAssetId: Get<<<Self as Config>::Currencies as MultiCurrency<<Self as Config>::AccountId>>::CurrencyId>
type NativeAssetId: Get<<<Self as Config>::Currencies as MultiCurrency<<Self as Config>::AccountId>>::CurrencyId>
Native Asset
sourcetype FeeReceiver: Get<Self::AccountId>
type FeeReceiver: Get<Self::AccountId>
Account where fees are deposited