mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 22:51:03 +00:00
add some events for pallet-bounties (#1706)
Add missing events for pallet-bounties
This commit is contained in:
@@ -291,6 +291,14 @@ pub mod pallet {
|
|||||||
BountyCanceled { index: BountyIndex },
|
BountyCanceled { index: BountyIndex },
|
||||||
/// A bounty expiry is extended.
|
/// A bounty expiry is extended.
|
||||||
BountyExtended { index: BountyIndex },
|
BountyExtended { index: BountyIndex },
|
||||||
|
/// A bounty is approved.
|
||||||
|
BountyApproved { index: BountyIndex },
|
||||||
|
/// A bounty curator is proposed.
|
||||||
|
CuratorProposed { bounty_id: BountyIndex, curator: T::AccountId },
|
||||||
|
/// A bounty curator is unassigned.
|
||||||
|
CuratorUnassigned { bounty_id: BountyIndex },
|
||||||
|
/// A bounty curator is accepted.
|
||||||
|
CuratorAccepted { bounty_id: BountyIndex, curator: T::AccountId },
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Number of bounty proposals that have been made.
|
/// Number of bounty proposals that have been made.
|
||||||
@@ -375,10 +383,12 @@ pub mod pallet {
|
|||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
|
Self::deposit_event(Event::<T, I>::BountyApproved { index: bounty_id });
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Assign a curator to a funded bounty.
|
/// Propose a curator to a funded bounty.
|
||||||
///
|
///
|
||||||
/// May only be called from `T::SpendOrigin`.
|
/// May only be called from `T::SpendOrigin`.
|
||||||
///
|
///
|
||||||
@@ -408,9 +418,11 @@ pub mod pallet {
|
|||||||
|
|
||||||
ensure!(fee < bounty.value, Error::<T, I>::InvalidFee);
|
ensure!(fee < bounty.value, Error::<T, I>::InvalidFee);
|
||||||
|
|
||||||
bounty.status = BountyStatus::CuratorProposed { curator };
|
bounty.status = BountyStatus::CuratorProposed { curator: curator.clone() };
|
||||||
bounty.fee = fee;
|
bounty.fee = fee;
|
||||||
|
|
||||||
|
Self::deposit_event(Event::<T, I>::CuratorProposed { bounty_id, curator });
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
})?;
|
})?;
|
||||||
Ok(())
|
Ok(())
|
||||||
@@ -508,6 +520,8 @@ pub mod pallet {
|
|||||||
bounty.status = BountyStatus::Funded;
|
bounty.status = BountyStatus::Funded;
|
||||||
Ok(())
|
Ok(())
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
|
Self::deposit_event(Event::<T, I>::CuratorUnassigned { bounty_id });
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -542,6 +556,10 @@ pub mod pallet {
|
|||||||
bounty.status =
|
bounty.status =
|
||||||
BountyStatus::Active { curator: curator.clone(), update_due };
|
BountyStatus::Active { curator: curator.clone(), update_due };
|
||||||
|
|
||||||
|
Self::deposit_event(Event::<T, I>::CuratorAccepted {
|
||||||
|
bounty_id,
|
||||||
|
curator: signer,
|
||||||
|
});
|
||||||
Ok(())
|
Ok(())
|
||||||
},
|
},
|
||||||
_ => Err(Error::<T, I>::UnexpectedStatus.into()),
|
_ => Err(Error::<T, I>::UnexpectedStatus.into()),
|
||||||
|
|||||||
Reference in New Issue
Block a user