referrerpolicy=no-referrer-when-downgrade

Trait Config

Source
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§

Source

type Balance: Balance

The type in which the assets are measured.

Source

type RejectOrigin: EnsureOrigin<Self::RuntimeOrigin>

Origin from which bounties rejections must come.

Source

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.

Source

type AssetKind: Parameter + MaxEncodedLen

Type parameter representing the asset kinds used to fund, refund and spend from bounties.

Source

type Beneficiary: Parameter + MaxEncodedLen

Type parameter used to identify the beneficiaries eligible to receive payments.

Source

type BeneficiaryLookup: StaticLookup<Target = Self::Beneficiary>

Converting trait to take a source type and convert to Self::Beneficiary.

Source

type BountyValueMinimum: Get<Self::Balance>

Minimum value for a bounty.

Source

type ChildBountyValueMinimum: Get<Self::Balance>

Minimum value for a child-bounty.

Source

type MaxActiveChildBountyCount: Get<u32>

Maximum number of child bounties that can be added to a parent bounty.

Source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

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.

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.

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.

Source

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.

Source

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.

Source

type Preimages: QueryPreimage<H = Self::Hashing> + StorePreimage

The preimage provider used for child-/bounty metadata.

Source

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.

Source

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.

Implementors§