-
Notifications
You must be signed in to change notification settings - Fork 1.8k
ts: Remove programId parameter of the Program constructor
#2864
New issue
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
ts: Remove programId parameter of the Program constructor
#2864
Conversation
|
@acheroncrypto is attempting to deploy a commit to the coral-xyz Team on Vercel. A member of the Team first needs to authorize it. |
…ntProgram` function
|
While working on Anchor v0.30.0 I realized this is no longer needed. One use case I had for passing the In the new setup, this means we would need to generate a new IDL with that different From looking at the PR, I see I'm not the only one with this use case. It might be good to give an option to still override it, as this feels like a step back in usability. |
I think you can just
There is also a new |
Got it, thanks. Honestly still feels kinda hacky compared to having a proper (optional) parameter where you just control it. The |


Problem
addressfield is now a required field for the IDL, making theprogramIdparameter ofProgramconstructor redundant.Solution
Remove the
programIdparameter of theProgramconstructor and use the program id from the IDL.