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>,
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,
Solution:-
#[account(
init,
token::mint=mint,
token::authority=vesting_account,
payer=signer,
seeds=[b"vesting_treasury",company_name.as_bytes()],
bump,