referrerpolicy=no-referrer-when-downgrade

Function fund_bounty

Source
pub fn fund_bounty<T: Config<I>, I: 'static>(
    asset_kind: Box<T::AssetKind>,
    value: T::Balance,
    curator: AccountIdLookupOf<T>,
    metadata: T::Hash,
)
Expand description

Fund a new bounty with a proposed curator, initiating the payment from the funding source to the bounty account/location.

§Dispatch Origin

Must be Config::SpendOrigin with the Success value being at least the bounty value converted to native balance using Config::BalanceConverter. The converted native amount is validated against the maximum spendable amount returned by Config::SpendOrigin.

§Details

  • The SpendOrigin must have sufficient permissions to fund the bounty.
  • The bounty value (in asset balance) is converted to native balance for validation.
  • In case of a funding failure, the bounty status must be updated with the check_status call before retrying with retry_payment call.

§Parameters

  • asset_kind: An indicator of the specific asset class to be funded.
  • value: The total payment amount of this bounty.
  • curator: Address of bounty curator.
  • metadata: The hash of an on-chain stored preimage with bounty metadata.

§Events

Emits Event::BountyCreated and Event::Paid if successful.

§Warning: Doc-Only

This function is an automatically generated, and is doc-only, uncallable stub. See the real version in Pallet::fund_bounty.