pub enum VoteInstruction {
Show 14 variants
InitializeAccount(VoteInit),
Authorize(Pubkey, VoteAuthorize),
Vote(Vote),
Withdraw(u64),
UpdateValidatorIdentity,
UpdateCommission(u8),
VoteSwitch(Vote, Hash),
AuthorizeChecked(VoteAuthorize),
UpdateVoteState(VoteStateUpdate),
UpdateVoteStateSwitch(VoteStateUpdate, Hash),
AuthorizeWithSeed(VoteAuthorizeWithSeedArgs),
AuthorizeCheckedWithSeed(VoteAuthorizeCheckedWithSeedArgs),
CompactUpdateVoteState(VoteStateUpdate),
CompactUpdateVoteStateSwitch(VoteStateUpdate, Hash),
}
Variants§
InitializeAccount(VoteInit)
Initialize a vote account
§Account references
[WRITE]
Uninitialized vote account[]
Rent sysvar[]
Clock sysvar[SIGNER]
New validator identity (node_pubkey)
Authorize(Pubkey, VoteAuthorize)
Authorize a key to send votes or issue a withdrawal
§Account references
[WRITE]
Vote account to be updated with the Pubkey for authorization[]
Clock sysvar[SIGNER]
Vote or withdraw authority
Vote(Vote)
A Vote instruction with recent votes
§Account references
[WRITE]
Vote account to vote with[]
Slot hashes sysvar[]
Clock sysvar[SIGNER]
Vote authority
Withdraw(u64)
Withdraw some amount of funds
§Account references
[WRITE]
Vote account to withdraw from[WRITE]
Recipient account[SIGNER]
Withdraw authority
UpdateValidatorIdentity
Update the vote account’s validator identity (node_pubkey)
§Account references
[WRITE]
Vote account to be updated with the given authority public key[SIGNER]
New validator identity (node_pubkey)[SIGNER]
Withdraw authority
UpdateCommission(u8)
Update the commission for the vote account
§Account references
[WRITE]
Vote account to be updated[SIGNER]
Withdraw authority
VoteSwitch(Vote, Hash)
A Vote instruction with recent votes
§Account references
[WRITE]
Vote account to vote with[]
Slot hashes sysvar[]
Clock sysvar[SIGNER]
Vote authority
AuthorizeChecked(VoteAuthorize)
Authorize a key to send votes or issue a withdrawal
This instruction behaves like Authorize
with the additional requirement that the new vote
or withdraw authority must also be a signer.
§Account references
[WRITE]
Vote account to be updated with the Pubkey for authorization[]
Clock sysvar[SIGNER]
Vote or withdraw authority[SIGNER]
New vote or withdraw authority
UpdateVoteState(VoteStateUpdate)
Update the onchain vote state for the signer.
§Account references
[Write]
Vote account to vote with[SIGNER]
Vote authority
UpdateVoteStateSwitch(VoteStateUpdate, Hash)
Update the onchain vote state for the signer along with a switching proof.
§Account references
[Write]
Vote account to vote with[SIGNER]
Vote authority
AuthorizeWithSeed(VoteAuthorizeWithSeedArgs)
Given that the current Voter or Withdrawer authority is a derived key, this instruction allows someone who can sign for that derived key’s base key to authorize a new Voter or Withdrawer for a vote account.
§Account references
[Write]
Vote account to be updated[]
Clock sysvar[SIGNER]
Base key of current Voter or Withdrawer authority’s derived key
AuthorizeCheckedWithSeed(VoteAuthorizeCheckedWithSeedArgs)
Given that the current Voter or Withdrawer authority is a derived key, this instruction allows someone who can sign for that derived key’s base key to authorize a new Voter or Withdrawer for a vote account.
This instruction behaves like AuthorizeWithSeed
with the additional requirement
that the new vote or withdraw authority must also be a signer.
§Account references
[Write]
Vote account to be updated[]
Clock sysvar[SIGNER]
Base key of current Voter or Withdrawer authority’s derived key[SIGNER]
New vote or withdraw authority
CompactUpdateVoteState(VoteStateUpdate)
Update the onchain vote state for the signer.
§Account references
[Write]
Vote account to vote with[SIGNER]
Vote authority
CompactUpdateVoteStateSwitch(VoteStateUpdate, Hash)
Update the onchain vote state for the signer along with a switching proof.
§Account references
[Write]
Vote account to vote with[SIGNER]
Vote authority
Implementations§
source§impl VoteInstruction
impl VoteInstruction
pub fn is_simple_vote(&self) -> bool
pub fn is_single_vote_state_update(&self) -> bool
sourcepub fn last_voted_slot(&self) -> Option<u64>
pub fn last_voted_slot(&self) -> Option<u64>
Only to be used on vote instructions (guard with is_simple_vote), panics otherwise
Trait Implementations§
source§impl Clone for VoteInstruction
impl Clone for VoteInstruction
source§fn clone(&self) -> VoteInstruction
fn clone(&self) -> VoteInstruction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for VoteInstruction
impl Debug for VoteInstruction
source§impl<'de> Deserialize<'de> for VoteInstruction
impl<'de> Deserialize<'de> for VoteInstruction
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<VoteInstruction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<VoteInstruction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for VoteInstruction
impl PartialEq for VoteInstruction
source§impl Serialize for VoteInstruction
impl Serialize for VoteInstruction
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for VoteInstruction
impl StructuralPartialEq for VoteInstruction
Auto Trait Implementations§
impl Freeze for VoteInstruction
impl RefUnwindSafe for VoteInstruction
impl Send for VoteInstruction
impl Sync for VoteInstruction
impl Unpin for VoteInstruction
impl UnwindSafe for VoteInstruction
Blanket Implementations§
source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, _digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
source§impl<T> AbiEnumVisitor for T
impl<T> AbiEnumVisitor for T
default fn visit_for_abi( &self, digester: &mut AbiDigester, ) -> Result<AbiDigester, DigestError>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more