Struct spl_governance::state::legacy::TokenOwnerRecordV1
source · pub struct TokenOwnerRecordV1 {
pub account_type: GovernanceAccountType,
pub realm: Pubkey,
pub governing_token_mint: Pubkey,
pub governing_token_owner: Pubkey,
pub governing_token_deposit_amount: u64,
pub unrelinquished_votes_count: u64,
pub outstanding_proposal_count: u8,
pub version: u8,
pub reserved: [u8; 6],
pub governance_delegate: Option<Pubkey>,
}
Expand description
Governance Token Owner Record Account PDA seeds: [‘governance’, realm, token_mint, token_owner ]
Fields§
§account_type: GovernanceAccountType
Governance account type
realm: Pubkey
The Realm the TokenOwnerRecord belongs to
governing_token_mint: Pubkey
Governing Token Mint the TokenOwnerRecord holds deposit for
governing_token_owner: Pubkey
The owner (either single or multisig) of the deposited governing SPL Tokens This is who can authorize a withdrawal of the tokens
governing_token_deposit_amount: u64
The amount of governing tokens deposited into the Realm This amount is the voter weight used when voting on proposals
unrelinquished_votes_count: u64
The number of votes cast by TokenOwner but not relinquished yet Every time a vote is cast this number is increased and it’s always decreased when relinquishing a vote regardless of the vote state
outstanding_proposal_count: u8
The number of outstanding proposals the TokenOwner currently owns The count is increased when TokenOwner creates a proposal and decreased once it’s either voted on (Succeeded or Defeated) or Cancelled By default it’s restricted to 10 outstanding Proposal per token owner
version: u8
Version introduced in program V3
reserved: [u8; 6]
Reserved space for future versions
governance_delegate: Option<Pubkey>
A single account that is allowed to operate governance with the deposited governing tokens It can be delegated to by the governing_token_owner or current governance_delegate
Trait Implementations§
source§impl BorshDeserialize for TokenOwnerRecordV1
impl BorshDeserialize for TokenOwnerRecordV1
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>
source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSchema for TokenOwnerRecordV1where
GovernanceAccountType: BorshSchema,
Pubkey: BorshSchema,
u64: BorshSchema,
u8: BorshSchema,
[u8; 6]: BorshSchema,
Option<Pubkey>: BorshSchema,
impl BorshSchema for TokenOwnerRecordV1where
GovernanceAccountType: BorshSchema,
Pubkey: BorshSchema,
u64: BorshSchema,
u8: BorshSchema,
[u8; 6]: BorshSchema,
Option<Pubkey>: BorshSchema,
source§fn declaration() -> Declaration
fn declaration() -> Declaration
source§fn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>
)
fn add_definitions_recursively( definitions: &mut HashMap<Declaration, Definition> )
source§fn add_definition(
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition>
)
fn add_definition( declaration: String, definition: Definition, definitions: &mut HashMap<String, Definition> )
fn schema_container() -> BorshSchemaContainer
source§impl BorshSerialize for TokenOwnerRecordV1where
GovernanceAccountType: BorshSerialize,
Pubkey: BorshSerialize,
u64: BorshSerialize,
u8: BorshSerialize,
[u8; 6]: BorshSerialize,
Option<Pubkey>: BorshSerialize,
impl BorshSerialize for TokenOwnerRecordV1where
GovernanceAccountType: BorshSerialize,
Pubkey: BorshSerialize,
u64: BorshSerialize,
u8: BorshSerialize,
[u8; 6]: BorshSerialize,
Option<Pubkey>: BorshSerialize,
source§impl Clone for TokenOwnerRecordV1
impl Clone for TokenOwnerRecordV1
source§fn clone(&self) -> TokenOwnerRecordV1
fn clone(&self) -> TokenOwnerRecordV1
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TokenOwnerRecordV1
impl Debug for TokenOwnerRecordV1
source§impl IsInitialized for TokenOwnerRecordV1
impl IsInitialized for TokenOwnerRecordV1
source§fn is_initialized(&self) -> bool
fn is_initialized(&self) -> bool
source§impl PartialEq for TokenOwnerRecordV1
impl PartialEq for TokenOwnerRecordV1
source§fn eq(&self, other: &TokenOwnerRecordV1) -> bool
fn eq(&self, other: &TokenOwnerRecordV1) -> bool
self
and other
values to be equal, and is used
by ==
.