referrerpolicy=no-referrer-when-downgrade

Function close_bounty

Source
pub fn close_bounty<T: Config<I>, I: 'static>(
    parent_bounty_id: BountyIndex,
    child_bounty_id: Option<BountyIndex>,
)
Expand description

Cancel an active child-/bounty. A payment to send all the funds to the funding source is initialized.

§Dispatch Origin

This function can only be called by the RejectOrigin or the parent bounty curator.

§Details

  • If the child-/bounty is in the Funded state, a refund payment is initiated.
  • If the child-/bounty is in the Active state, a refund payment is initiated and the child-/bounty status is updated with the curator account/location.
  • If the child-/bounty is in the funding or payout phase, it cannot be canceled.
  • In case of a refund failure, the child-/bounty status must be updated with the check_status call before retrying with retry_payment call.

§Parameters

  • parent_bounty_id: Index of parent bounty.
  • child_bounty_id: Index of child-bounty.

§Events

Emits Event::BountyCanceled 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::close_bounty.