#[repr(u8)]pub enum StakingOperation {
CreateValidator = 0,
AddStake = 1,
Unstake = 2,
UpdateValidator = 3,
Unjail = 4,
ClaimRewards = 5,
Delegate = 6,
Undelegate = 7,
ClaimDelegationRewards = 8,
WithdrawUnbonded = 9,
SubmitEvidence = 10,
}Expand description
Staking operation types
Variants§
CreateValidator = 0
Register as a new validator with initial stake
AddStake = 1
Add more stake to an existing validator
Unstake = 2
Begin unbonding stake (start withdrawal process)
UpdateValidator = 3
Update validator commission or metadata
Unjail = 4
Request to unjail after jail period
ClaimRewards = 5
Claim accumulated rewards
Delegate = 6
Delegate tokens to a validator
Undelegate = 7
Begin unbonding delegation from a validator
ClaimDelegationRewards = 8
Claim delegation rewards from a validator
WithdrawUnbonded = 9
Withdraw completed unbonding delegations
SubmitEvidence = 10
Submit evidence of misbehavior (double sign or downtime)
Implementations§
Source§impl StakingOperation
impl StakingOperation
Sourcepub fn requires_validator(&self) -> bool
pub fn requires_validator(&self) -> bool
Check if this operation requires the sender to be a validator
Sourcepub fn is_delegation(&self) -> bool
pub fn is_delegation(&self) -> bool
Check if this operation is a delegation operation
Sourcepub fn is_slashing(&self) -> bool
pub fn is_slashing(&self) -> bool
Check if this operation is a slashing operation
Trait Implementations§
Source§impl Clone for StakingOperation
impl Clone for StakingOperation
Source§fn clone(&self) -> StakingOperation
fn clone(&self) -> StakingOperation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StakingOperation
impl Debug for StakingOperation
Source§impl<'de> Deserialize<'de> for StakingOperation
impl<'de> Deserialize<'de> for StakingOperation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for StakingOperation
impl PartialEq for StakingOperation
Source§fn eq(&self, other: &StakingOperation) -> bool
fn eq(&self, other: &StakingOperation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for StakingOperation
impl Serialize for StakingOperation
impl Copy for StakingOperation
impl Eq for StakingOperation
impl StructuralPartialEq for StakingOperation
Auto Trait Implementations§
impl Freeze for StakingOperation
impl RefUnwindSafe for StakingOperation
impl Send for StakingOperation
impl Sync for StakingOperation
impl Unpin for StakingOperation
impl UnsafeUnpin for StakingOperation
impl UnwindSafe for StakingOperation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more