i'm trying to change the authority of token mint to a pda so only the program can mint
pub fn into_set_authority_context(&self) -> CpiContext<'_, '_, '_, 'info, SetAuthority<'info>> {
let cpi_accounts = SetAuthority {
account_or_mint: self.token_mint.to_account_info().clone(),
current_authority: self.current_owner.to_account_info().clone(),
};
CpiContext::new(self.token_program.to_account_info().clone(), cpi_accounts)
}
anchor_spl::token::set_authority(
ctx.accounts.into_set_authority_context(),
AuthorityType::AccountOwner,
Some(authority),
).expect("set_authority failed");
But I get an error:
Error: failed to send transaction: Transaction simulation failed: Error processing Instruction 0: custom program error: 0xf