-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
from this SE issue: https://solana.stackexchange.com/questions/22459/how-to-get-codama-with-the-create-solana-program-tool-to-generate-find-pda-funct
When using create-solana-program with an anchor IDL, I do not get the PDA helper function for finding PDAs e.g, a pdas directory isn't created that I can easily use for my PDAs as observed here https://github.com/solana-program/token-2022/tree/main/clients/js/src/generated/pdas
reproducibility
create a new solana project with anchor using the default counter template
pnpm create solana-programUpdate the counter to be a PDA instead of an on-curve account in anchor
#[derive(Accounts)]
pub struct Create<'info> {
#[account(init, payer = payer, seeds = [b"counter"], bump, space = 8 + 40)]
pub counter: Account<'info, Counter>,
#[account(mut)]
pub payer: Signer<'info>,
pub system_program: Program<'info, System>,
}Build the program
pnpm programs:buildGenerate the clients
pnpm generateScreenshot below shows the generated folders
env
anchor 0.31.1
Metadata
Metadata
Assignees
Labels
No labels
