pub struct PriorityFeeDistributionAccount {
pub validator_vote_account: Pubkey,
pub merkle_root_upload_authority: Pubkey,
pub merkle_root: Option<MerkleRoot>,
pub epoch_created_at: u64,
pub validator_commission_bps: u16,
pub expires_at: u64,
pub total_lamports_transferred: u64,
pub bump: u8,
}Expand description
The account that validators send priority fees to
Fields§
§validator_vote_account: PubkeyThe validator’s vote account, also the recipient of remaining lamports after upon closing this account.
The only account authorized to upload a merkle-root for this account.
merkle_root: Option<MerkleRoot>The merkle root used to verify user claims from this account.
epoch_created_at: u64Epoch for which this account was created.
validator_commission_bps: u16The commission basis points this validator charges.
expires_at: u64The epoch (upto and including) that tip funds can be claimed.
total_lamports_transferred: u64The total lamports transferred to this account.
bump: u8The bump used to generate this account
Implementations§
Source§impl PriorityFeeDistributionAccount
impl PriorityFeeDistributionAccount
pub const SEED: &'static [u8] = b"PF_DISTRIBUTION_ACCOUNT"
pub const SIZE: usize = 176usize
pub fn validate(&self) -> Result<()>
pub fn claim_expired(from: AccountInfo<'_>, to: AccountInfo<'_>) -> Result<u64>
pub fn claim( from: AccountInfo<'_>, to: AccountInfo<'_>, amount: u64, ) -> Result<()>
pub fn increment_total_lamports_transferred( &mut self, amount: u64, ) -> Result<()>
Trait Implementations§
Source§impl AccountDeserialize for PriorityFeeDistributionAccount
impl AccountDeserialize for PriorityFeeDistributionAccount
Source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
Deserializes previously initialized account data. Should fail for all
uninitialized accounts, where the bytes are zeroed. Implementations
should be unique to a particular account type so that one can never
successfully deserialize the data of one account type into another.
For example, if the SPL token program were to implement this trait,
it should be impossible to deserialize a
Mint account into a token
Account.Source§fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
Deserializes account data without checking the account discriminator.
This should only be used on account initialization, when the bytes of
the account are zeroed.
Source§impl BorshDeserialize for PriorityFeeDistributionAccount
impl BorshDeserialize for PriorityFeeDistributionAccount
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for PriorityFeeDistributionAccountwhere
Pubkey: BorshSerialize,
Option<MerkleRoot>: BorshSerialize,
u64: BorshSerialize,
u16: BorshSerialize,
u8: BorshSerialize,
impl BorshSerialize for PriorityFeeDistributionAccountwhere
Pubkey: BorshSerialize,
Option<MerkleRoot>: BorshSerialize,
u64: BorshSerialize,
u16: BorshSerialize,
u8: BorshSerialize,
Source§impl Clone for PriorityFeeDistributionAccount
impl Clone for PriorityFeeDistributionAccount
Source§fn clone(&self) -> PriorityFeeDistributionAccount
fn clone(&self) -> PriorityFeeDistributionAccount
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for PriorityFeeDistributionAccount
impl Default for PriorityFeeDistributionAccount
Source§fn default() -> PriorityFeeDistributionAccount
fn default() -> PriorityFeeDistributionAccount
Returns the “default value” for a type. Read more
Source§impl Discriminator for PriorityFeeDistributionAccount
impl Discriminator for PriorityFeeDistributionAccount
Source§const DISCRIMINATOR: &'static [u8]
const DISCRIMINATOR: &'static [u8]
Discriminator slice. Read more
Auto Trait Implementations§
impl Freeze for PriorityFeeDistributionAccount
impl RefUnwindSafe for PriorityFeeDistributionAccount
impl Send for PriorityFeeDistributionAccount
impl Sync for PriorityFeeDistributionAccount
impl Unpin for PriorityFeeDistributionAccount
impl UnwindSafe for PriorityFeeDistributionAccount
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