Crate locked_voter

Source
Expand description

Voter which locks up governance tokens for a user-provided duration in exchange for increased voting power.

Modules§

accounts
An Anchor generated module, providing a set of structs mirroring the structs deriving Accounts, where each field is a Pubkey. This is useful for specifying accounts for a client.
activate_proposal
approve_program_lock_privilege
cast_vote
exit
instruction
An Anchor generated module containing the program’s set of instructions, where each method handler in the #[program] mod is associated with a struct defining the input arguments to the method. These should be used directly, when one wants to serialize Anchor instruction data, for example, when speciying instructions on a client.
lock
lock_permissionless
lock_with_whitelist
lock_with_whitelist_entry
locked_voter
Locked voter program.
locker
Locker math.
macros
Macros
new_escrow
new_locker
program
Module representing the program.
revoke_program_lock_privilege
Handler for locked_voter::revoke_program_lock_privilege.
set_locker_params
Instruction handler for locked_voter::set_locker_params.
set_vote_delegate

Macros§

escrow_seeds
Generates the signer seeds for an crate::Escrow.
locker_seeds
Generates the signer seeds for a crate::Locker.

Structs§

ActivateProposal
Accounts for locked_voter::activate_proposal.
ApproveLockPrivilegeEvent
Event called in locked_voter::approve_program_lock_privilege.
ApproveProgramLockPrivilege
Accounts for locked_voter::approve_program_lock_privilege.
CastVote
Accounts for locked_voter::cast_vote.
Escrow
Locks tokens on behalf of a user.
Exit
Accounts for locked_voter::exit.
ExitEscrowEvent
Event called in locked_voter::exit.
Lock
Accounts for locked_voter::lock.
LockEvent
Event called in locked_voter::lock.
LockWithWhitelist
LockWithWhitelistEntry
Locker
A group of Escrows.
LockerParams
Contains parameters for the Locker.
LockerSetParamsEvent
Event called in locked_voter::set_locker_params.
LockerWhitelistEntry
An entry in the Locker’s whitelist.
NewEscrow
Accounts for locked_voter::new_escrow.
NewEscrowEvent
Event called in locked_voter::new_escrow.
NewLocker
Accounts for locked_voter::new_locker.
NewLockerEvent
Event called in locked_voter::new_locker.
RevokeLockPrivilegeEvent
Event called in locked_voter::revoke_program_lock_privilege.
RevokeProgramLockPrivilege
Accounts for locked_voter::revoke_program_lock_privilege.
SetLockerParams
Accounts for locked_voter::set_locker_params.
SetVoteDelegate
Accounts for set_vote_delegate
SetVoteDelegateEvent
Event called in locked_voter::set_vote_delegate.

Enums§

ErrorCode
locked_voter errors.

Statics§

ID
The static program ID

Functions§

check_id
Confirms that a given pubkey is equivalent to the program ID
entry
The Anchor codegen exposes a programming model where a user defines a set of methods inside of a #[program] module in a way similar to writing RPC request handlers. The macro then generates a bunch of code wrapping these user defined methods into something that can be executed on Solana.
entrypoint
Safety
handler
handler
handler
id
Returns the program ID