From 1aa10c11815118896f7f7d37ed4f33985cc152dc Mon Sep 17 00:00:00 2001 From: Herr Seppia Date: Fri, 6 Sep 2024 18:03:50 +0200 Subject: [PATCH] execution-core: change events relates to stake-contract See also #2265 --- execution-core/src/stake.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/execution-core/src/stake.rs b/execution-core/src/stake.rs index adbd3f93ba..710fef84c3 100644 --- a/execution-core/src/stake.rs +++ b/execution-core/src/stake.rs @@ -17,7 +17,7 @@ use crate::{ PublicKey as BlsPublicKey, SecretKey as BlsSecretKey, Signature as BlsSignature, }, - transfer::withdraw::{Withdraw as TransferWithdraw, WithdrawReceiver}, + transfer::withdraw::Withdraw as TransferWithdraw, ContractId, }; @@ -196,22 +196,20 @@ impl Withdraw { pub struct StakeEvent { /// Account associated to the event. pub account: BlsPublicKey, - /// Value of the relevant operation, be it `stake`, `reward` or `slash`. - /// - /// In case of `suspended` the amount refers to the next eligibility + /// Value of the relevant operation, be it `stake`, `unstake`,`withdraw` pub value: u64, } -/// Event emitted after a stake contract operation is performed. +/// Event emitted after a slash operation is performed. #[derive(Debug, Clone, Archive, Deserialize, Serialize)] #[archive_attr(derive(CheckBytes))] -pub struct StakeWithReceiverEvent { - /// Account associated to the event. +pub struct SlashEvent { + /// Account slashed. pub account: BlsPublicKey, - /// Value of the relevant operation, be it `unstake` or `withdraw`. + /// Slashed amount pub value: u64, - /// The receiver of the action - pub receiver: Option, + /// New eligibility for the slashed account + pub next_eligibility: u64, } /// The minimum amount of Dusk one can stake.