pub trait Config<I: 'static = ()>: Config + Config<RuntimeEvent: From<Event<Self, I>>> {
Show 18 associated items
type Balance: Balance;
type RejectOrigin: EnsureOrigin<Self::RuntimeOrigin>;
type SpendOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = Self::Balance>;
type AssetKind: Parameter + MaxEncodedLen;
type Beneficiary: Parameter + MaxEncodedLen;
type BeneficiaryLookup: StaticLookup<Target = Self::Beneficiary>;
type BountyValueMinimum: Get<Self::Balance>;
type ChildBountyValueMinimum: Get<Self::Balance>;
type MaxActiveChildBountyCount: Get<u32>;
type WeightInfo: WeightInfo;
type FundingSource: TryConvert<Self::AssetKind, <<Self as Config<I>>::Paymaster as PayWithSource>::Source>;
type BountySource: TryConvert<(BountyIndex, Self::AssetKind), <<Self as Config<I>>::Paymaster as PayWithSource>::Source>;
type ChildBountySource: TryConvert<(BountyIndex, BountyIndex, Self::AssetKind), <<Self as Config<I>>::Paymaster as PayWithSource>::Source>;
type Paymaster: PayWithSource<Balance = Self::Balance, Source = Self::Beneficiary, Beneficiary = Self::Beneficiary, AssetKind = Self::AssetKind>;
type BalanceConverter: ConversionFromAssetBalance<Self::Balance, Self::AssetKind, Self::Balance> + ConversionToAssetBalance<Self::Balance, Self::AssetKind, Self::Balance>;
type Preimages: QueryPreimage<H = Self::Hashing> + StorePreimage;
type Consideration: Consideration<Self::AccountId, Self::Balance>;
type BenchmarkHelper: ArgumentsFactory<Self::AssetKind, Self::Beneficiary, Self::Balance>;
}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 RejectOrigin: EnsureOrigin<Self::RuntimeOrigin>
type RejectOrigin: EnsureOrigin<Self::RuntimeOrigin>
Origin from which bounties rejections must come.
Sourcetype SpendOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = Self::Balance>
type SpendOrigin: EnsureOrigin<Self::RuntimeOrigin, Success = Self::Balance>
The origin required for funding the bounty. The Success value is the maximum amount in
a native asset that this origin is allowed to spend at a time.
Sourcetype AssetKind: Parameter + MaxEncodedLen
type AssetKind: Parameter + MaxEncodedLen
Type parameter representing the asset kinds used to fund, refund and spend from bounties.
Sourcetype Beneficiary: Parameter + MaxEncodedLen
type Beneficiary: Parameter + MaxEncodedLen
Type parameter used to identify the beneficiaries eligible to receive payments.
Sourcetype BeneficiaryLookup: StaticLookup<Target = Self::Beneficiary>
type BeneficiaryLookup: StaticLookup<Target = Self::Beneficiary>
Converting trait to take a source type and convert to Self::Beneficiary.
Sourcetype BountyValueMinimum: Get<Self::Balance>
type BountyValueMinimum: Get<Self::Balance>
Minimum value for a bounty.
Sourcetype ChildBountyValueMinimum: Get<Self::Balance>
type ChildBountyValueMinimum: Get<Self::Balance>
Minimum value for a child-bounty.
Sourcetype MaxActiveChildBountyCount: Get<u32>
type MaxActiveChildBountyCount: Get<u32>
Maximum number of child bounties that can be added to a parent bounty.
Sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
Sourcetype FundingSource: TryConvert<Self::AssetKind, <<Self as Config<I>>::Paymaster as PayWithSource>::Source>
type FundingSource: TryConvert<Self::AssetKind, <<Self as Config<I>>::Paymaster as PayWithSource>::Source>
Converts an AssetKind into the funding source account/location.
Used when initiating funding and refund payments to and from a bounty.
Sourcetype BountySource: TryConvert<(BountyIndex, Self::AssetKind), <<Self as Config<I>>::Paymaster as PayWithSource>::Source>
type BountySource: TryConvert<(BountyIndex, Self::AssetKind), <<Self as Config<I>>::Paymaster as PayWithSource>::Source>
Converts a bounty index and AssetKind into its funding source account/location.
Used when initiating the funding, refund, and payout payments to and from a bounty.
Sourcetype ChildBountySource: TryConvert<(BountyIndex, BountyIndex, Self::AssetKind), <<Self as Config<I>>::Paymaster as PayWithSource>::Source>
type ChildBountySource: TryConvert<(BountyIndex, BountyIndex, Self::AssetKind), <<Self as Config<I>>::Paymaster as PayWithSource>::Source>
Converts a parent bounty index, child bounty index, and AssetKind into the
child-bounty account/location.
Used when initiating the funding, refund, and payout payments to and from a child-bounty.
Sourcetype Paymaster: PayWithSource<Balance = Self::Balance, Source = Self::Beneficiary, Beneficiary = Self::Beneficiary, AssetKind = Self::AssetKind>
type Paymaster: PayWithSource<Balance = Self::Balance, Source = Self::Beneficiary, Beneficiary = Self::Beneficiary, AssetKind = Self::AssetKind>
Type for processing payments of Self::AssetKind from a Source in favor of
Self::Beneficiary.
Sourcetype BalanceConverter: ConversionFromAssetBalance<Self::Balance, Self::AssetKind, Self::Balance> + ConversionToAssetBalance<Self::Balance, Self::AssetKind, Self::Balance>
type BalanceConverter: ConversionFromAssetBalance<Self::Balance, Self::AssetKind, Self::Balance> + ConversionToAssetBalance<Self::Balance, Self::AssetKind, Self::Balance>
Type for converting the balance of an Self::AssetKind to the balance of the native
asset, solely for the purpose of asserting the result against the maximum allowed spend
amount of the Self::SpendOrigin.
The conversion from the native asset balance to the balance of an Self::AssetKind is
used in benchmarks to convert Self::BountyValueMinimum to the asset kind amount.
Sourcetype Preimages: QueryPreimage<H = Self::Hashing> + StorePreimage
type Preimages: QueryPreimage<H = Self::Hashing> + StorePreimage
The preimage provider used for child-/bounty metadata.
Sourcetype Consideration: Consideration<Self::AccountId, Self::Balance>
type Consideration: Consideration<Self::AccountId, Self::Balance>
Means of associating a cost with committing to the curator role, which is incurred by the child-/bounty curator.
The footprint accounts for the child-/bounty value converted to the native balance
type (using Self::BalanceConverter). The native balance type corresponds to the
Success type returned by Self::SpendOrigin, which represents the maximum
spendable amount. The bounty amount must be converted with Self::BalanceConverter
before comparison against this maximum. The cost taken from the curator AccountId
may vary based on this converted balance.
Sourcetype BenchmarkHelper: ArgumentsFactory<Self::AssetKind, Self::Beneficiary, Self::Balance>
type BenchmarkHelper: ArgumentsFactory<Self::AssetKind, Self::Beneficiary, Self::Balance>
Helper type for benchmarks.
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.