Skip to content

Vesting-program...TokenLockIssue #67

@riteshvatss

Description

@riteshvatss

Hi here in the Vesting program inside createVestingAccount struct you make the authority of treasury_token_account to the treasury_token_account itslef that will lock the token inside the treasury_token_account.

Problem
#[account(
init,
token::mint=mint,
token::authority=treasury_token_account
payer=signer,
seeds=[b"vesting_treasury",company_name.as_bytes()],
bump,

    )]
    pub treasury_token_account:InterfaceAccount<'info,TokenAccount>,

Solution:-
#[account(
init,
token::mint=mint,
token::authority=vesting_account,
payer=signer,
seeds=[b"vesting_treasury",company_name.as_bytes()],
bump,

    )]
    pub treasury_token_account:InterfaceAccount<'info,TokenAccount>,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions