Module spl_governance::state::governance
source · Expand description
Governance Account
Structs§
- Governance config
- Governance Account
Constants§
- The default number of active proposals exempt from security deposit
- Security deposit is paid when a Proposal is created and can be refunded after voting ends or the Proposals is cancelled
Functions§
- Checks the given account is a governance account and belongs to the given realm
- Checks whether the Governance account exists, is initialized and owned by the Governance program
- Validates governance config parameters
- Asserts the provided vote_threshold is valid
- Validates args supplied to create governance account
- Returns Governance PDA address
- Returns Governance PDA seeds
- Deserializes Governance account and checks owner program
- Deserializes Governance account, checks owner program and asserts governance belongs to the given ream
- Returns MintGovernance PDA address
- Returns MintGovernance PDA seeds
- Returns ProgramGovernance PDA address
- Returns ProgramGovernance PDA seeds
- Returns TokenGovernance PDA address
- Returns TokenGovernance PDA seeds
- Checks if the given account type is on of the Governance account types of any version
- Checks if the given account type is one of the Governance V2 account types
- Returns GovernanceV2 type for given GovernanceV1 type or None if the given account type is not GovernanceV1