pub struct Proposal {
Show 15 fields pub governor: Pubkey, pub index: u64, pub bump: u8, pub proposer: Pubkey, pub quorum_votes: u64, pub for_votes: u64, pub against_votes: u64, pub abstain_votes: u64, pub canceled_at: i64, pub created_at: i64, pub activated_at: i64, pub voting_ends_at: i64, pub queued_at: i64, pub queued_transaction: Pubkey, pub instructions: Vec<ProposalInstruction>,
}
Expand description

A Proposal is a pending transaction that may or may not be executed by the DAO.

Fields

governor: Pubkey

The public key of the governor.

index: u64

The unique ID of the proposal, auto-incremented.

bump: u8

Bump seed

proposer: Pubkey

The public key of the proposer.

quorum_votes: u64

The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed

for_votes: u64

Current number of votes in favor of this proposal

against_votes: u64

Current number of votes in opposition to this proposal

abstain_votes: u64

Current number of votes for abstaining for this proposal

canceled_at: i64

The timestamp when the proposal was canceled.

created_at: i64

The timestamp when the proposal was created.

activated_at: i64

The timestamp in which the proposal was activated. This is when voting begins.

voting_ends_at: i64

The timestamp when voting ends. This only applies to active proposals.

queued_at: i64

The timestamp in which the proposal was queued, i.e. approved for execution on the Smart Wallet.

queued_transaction: Pubkey

If the transaction was queued, this is the associated Goki Smart Wallet transaction.

instructions: Vec<ProposalInstruction>

The instructions associated with the proposal.

Implementations

Gets the state.

Checks if the proposal meets quorum; that is, enough votes were made on the proposal.

Converts this proposal to Smart Wallet smart_wallet::TXInstructions.

Space that the Proposal takes up.

Trait Implementations

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. Read more

Deserializes account data without checking the account discriminator. This should only be used on account initialization, when the bytes of the account are zeroed. Read more

Serializes the account data into writer.

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes. Read more

Deserialize this instance from a slice of bytes.

Serialize this instance into a vector of bytes.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.