Added the required CHECK docs from Anchor
This commit is contained in:
parent
55b5ea2390
commit
3ef766d249
|
@ -27,6 +27,7 @@ pub struct CloseVoter<'info> {
|
|||
pub voter_authority: Signer<'info>,
|
||||
|
||||
#[account(mut)]
|
||||
/// CHECK: Destination may be any address.
|
||||
pub sol_destination: UncheckedAccount<'info>,
|
||||
|
||||
pub token_program: Program<'info, Token>,
|
||||
|
|
|
@ -20,12 +20,13 @@ pub struct CreateRegistrar<'info> {
|
|||
|
||||
/// An spl-governance realm
|
||||
///
|
||||
/// realm is validated in the instruction:
|
||||
/// CHECK: realm is validated in the instruction:
|
||||
/// - realm is owned by the governance_program_id
|
||||
/// - realm_governing_token_mint must be the community or council mint
|
||||
/// - realm_authority is realm.authority
|
||||
pub realm: UncheckedAccount<'info>,
|
||||
|
||||
/// CHECK: May be any instance of spl-governance
|
||||
/// The program id of the spl-governance program the realm belongs to.
|
||||
pub governance_program_id: UncheckedAccount<'info>,
|
||||
/// Either the realm community mint or the council mint.
|
||||
|
|
|
@ -39,6 +39,7 @@ pub struct CreateVoter<'info> {
|
|||
pub system_program: Program<'info, System>,
|
||||
pub rent: Sysvar<'info, Rent>,
|
||||
|
||||
/// CHECK: Address constraint is set
|
||||
#[account(address = tx_instructions::ID)]
|
||||
pub instructions: UncheckedAccount<'info>,
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ pub struct Grant<'info> {
|
|||
|
||||
/// The account of the grantee / the address controlling the voter
|
||||
/// that the grant is going to.
|
||||
/// CHECK: May be any address
|
||||
pub voter_authority: UncheckedAccount<'info>,
|
||||
|
||||
/// The voter weight record is the account that will be shown to spl-governance
|
||||
|
|
|
@ -7,6 +7,7 @@ use anchor_lang::prelude::*;
|
|||
pub struct UpdateMaxVoteWeight<'info> {
|
||||
pub registrar: AccountLoader<'info, Registrar>,
|
||||
// TODO: SPL governance has not yet implemented this.
|
||||
/// CHECK: TODO. Will be implemented when max_vote_weight_record is rolled out.
|
||||
pub max_vote_weight_record: UncheckedAccount<'info>,
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ pub struct Withdraw<'info> {
|
|||
/// to be able to forbid withdraws while the voter is engaged with
|
||||
/// a vote or has an open proposal.
|
||||
///
|
||||
/// token_owner_record is validated in the instruction:
|
||||
/// CHECK: token_owner_record is validated in the instruction:
|
||||
/// - owned by registrar.governance_program_id
|
||||
/// - for the registrar.realm
|
||||
/// - for the registrar.realm_governing_token_mint
|
||||
|
|
Loading…
Reference in New Issue