We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I ran this code in test, it gave an error like this
const tx = await program.methods .createStudent(student.name, student.age) .accountsPartial({ student: studentPDA, tokenAccount: tokenAccount, mint: mintPDA, }) .rpc();
this is mint token code
` let seeds = &["mint".as_bytes(), &[ctx.bumps.mint]]; let signer = [&seeds[..]];
let cpi_ctx = CpiContext::new_with_signer( ctx.accounts.token_program.to_account_info(), token::MintTo { mint: ctx.accounts.mint.to_account_info(), to: ctx.accounts.token_account.to_account_info(), authority: ctx.accounts.mint.to_account_info(), }, &signer, ); token::mint_to(cpi_ctx, 1000)?; msg!("Minted Tokens");
`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I ran this code in test, it gave an error like this
const tx = await program.methods .createStudent(student.name, student.age) .accountsPartial({ student: studentPDA, tokenAccount: tokenAccount, mint: mintPDA, }) .rpc();
this is mint token code
`
let seeds = &["mint".as_bytes(), &[ctx.bumps.mint]];
let signer = [&seeds[..]];
`
The text was updated successfully, but these errors were encountered: