Open mikemaccana opened 5 months ago
Hey Mike,
Yes that's the plan.
We're already doing this for the following programs:
And planning to add many more to the list.
Is there a way to avoid copy pasting the scripts
contents? Such as an API like this:
create-solana-program generate:clients ./idl.json --js --output ./codegen"
Hi @ronanyeah, sorry I'm not sure I understand the question. Are you saying you do not want the scripts
folder to be present in the generated repository? If so, I'm not sure how the provided snippet of code helps with that.
Thanks for answering @loris but I realise I should have been clearer:
can we use create-solana-program to generate clients for existing on-chain apps as the announcement states?
I meant to say: how can we we use create-solana-program to generate clients for existing on-chain apps? Eg what docs or examples exist for using create-solana-program in this way?
Oh I see. No docs right now and it's on a case-by-case basis but we're using the following process:
pnpm create solana-program my-existing-program --address MyExistingProgramAddress
program
folder with the existing program — or empty it and add idl.json
inside for non-yet-migrated BPF programs.pnpm generate
Thanks! I'm in the middle of trying to get instructor notes together for something but will try on one of our demo apps as soon as I can.
The web3.js TP2 announment points to this repo with a 'here' link and the following text:
The README seems to imply generating clients for brand new projects, but can we use
create-solana-program
to generate clients for existing on-chain apps as the announcement states?