Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
282 views

Getting build error: the `#[global_allocator]` in spl_token conflicts with global allocator in: spl_associated_token_account

Earlier I was able to build my solana programs using anchor build but suddenly getting strange error error: the #[global_allocator] in spl_token conflicts with global allocator in: ...
blackhorse's user avatar
1 vote
2 answers
425 views

Getting error while minting token to an account "Transaction simulation failed: Error processing Instruction 0: invalid account data for instruction"

My mint test cases are failing and I am clueless where it is going wrong pub fn mint(ctx: Context<MintToken>, params: MintTokenParams) -> Result<()> { // Check user balance ...
blackhorse's user avatar
0 votes
1 answer
109 views

How to create the seeds for invoking spl cpi instruction?

I need a program owned token account to hold WSOL. I am creating it like thus #[derive(Accounts)] pub struct InitializeProgramTokenAccount<'...
guccimane's user avatar
1 vote
1 answer
370 views

How to create Associated token Account onchain

Please help i'm trying to create an Associated token account for a PDA onchain using let create_accounts = Create { payer: ctx.accounts.signer.to_account_info().clone(), ...
iMEF's user avatar
  • 346
6 votes
2 answers
604 views

Looking for implementation example of anchor_spl::token::initialize_account

I want to use the initialize_account function from anchor_spl::token. The function is given below: pub fn initialize_account<'a, 'b, 'c, 'info>( ctx: CpiContext<'a, 'b, 'c, 'info, ...
fahad's user avatar
  • 399