diff --git a/substrate/frame/election-provider-multi-phase/src/lib.rs b/substrate/frame/election-provider-multi-phase/src/lib.rs index 7aab93fb65..6c92f2b157 100644 --- a/substrate/frame/election-provider-multi-phase/src/lib.rs +++ b/substrate/frame/election-provider-multi-phase/src/lib.rs @@ -982,7 +982,10 @@ pub mod pallet { } #[pallet::event] - #[pallet::metadata(::AccountId = "AccountId")] + #[pallet::metadata( + ::AccountId = "AccountId", + BalanceOf = "Balance" + )] #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { /// A solution was stored with the given compute. @@ -996,9 +999,9 @@ pub mod pallet { /// election failed, `None`. ElectionFinalized(Option), /// An account has been rewarded for their signed submission being finalized. - Rewarded(::AccountId), + Rewarded(::AccountId, BalanceOf), /// An account has been slashed for submitting an invalid signed submission. - Slashed(::AccountId), + Slashed(::AccountId, BalanceOf), /// The signed phase of the given round has started. SignedPhaseStarted(u32), /// The unsigned phase of the given round has started. diff --git a/substrate/frame/election-provider-multi-phase/src/signed.rs b/substrate/frame/election-provider-multi-phase/src/signed.rs index ba1123c133..1aaf96b8ad 100644 --- a/substrate/frame/election-provider-multi-phase/src/signed.rs +++ b/substrate/frame/election-provider-multi-phase/src/signed.rs @@ -417,7 +417,7 @@ impl Pallet { >::put(ready_solution); // emit reward event - Self::deposit_event(crate::Event::Rewarded(who.clone())); + Self::deposit_event(crate::Event::Rewarded(who.clone(), reward)); // unreserve deposit. let _remaining = T::Currency::unreserve(who, deposit); @@ -434,7 +434,7 @@ impl Pallet { /// /// Infallible pub fn finalize_signed_phase_reject_solution(who: &T::AccountId, deposit: BalanceOf) { - Self::deposit_event(crate::Event::Slashed(who.clone())); + Self::deposit_event(crate::Event::Slashed(who.clone(), deposit)); let (negative_imbalance, _remaining) = T::Currency::slash_reserved(who, deposit); debug_assert!(_remaining.is_zero()); T::SlashHandler::on_unbalanced(negative_imbalance);