Skip to content

Commit

Permalink
execution-core: change events relates to stake-contract
Browse files Browse the repository at this point in the history
See also #2265
  • Loading branch information
herr-seppia committed Sep 6, 2024
1 parent 7e52446 commit 1aa10c1
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions execution-core/src/stake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down Expand Up @@ -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<WithdrawReceiver>,
/// New eligibility for the slashed account
pub next_eligibility: u64,
}

/// The minimum amount of Dusk one can stake.
Expand Down

0 comments on commit 1aa10c1

Please sign in to comment.