lang: add AnchorProgram trait to make declare_id! optional#4293
Open
AvhiMaz wants to merge 10 commits intosolana-foundation:masterfrom
Open
lang: add AnchorProgram trait to make declare_id! optional#4293AvhiMaz wants to merge 10 commits intosolana-foundation:masterfrom
AnchorProgram trait to make declare_id! optional#4293AvhiMaz wants to merge 10 commits intosolana-foundation:masterfrom
Conversation
|
@AvhiMaz is attempting to deploy a commit to the Solana Foundation Team on Vercel. A member of the Team first needs to authorize it. |
5e5fabe to
84f267a
Compare
Signed-off-by: AvhiMaz <avhimazumder5@outlook.com>
AvhiMaz
commented
Mar 7, 2026
Signed-off-by: AvhiMaz <avhimazumder5@outlook.com>
Signed-off-by: AvhiMaz <avhimazumder5@outlook.com>
d6b9fc0 to
9eaea21
Compare
Signed-off-by: AvhiMaz <avhimazumder5@outlook.com>
Signed-off-by: AvhiMaz <avhimazumder5@outlook.com>
Signed-off-by: AvhiMaz <avhimazumder5@outlook.com>
Signed-off-by: AvhiMaz <avhimazumder5@outlook.com>
Author
|
gm @nutafrost, MR is ready for review, happy to make further changes. thanks :) |
Collaborator
|
Please address the CI failures |
Signed-off-by: AvhiMaz <avhimazumder5@outlook.com>
Author
@jamie-osec pushed some changes, hope ci passes now. i’m still concerned about the bench. it increased some cus in the tests/bench, but ig that’s because i’m using the latest version of solana cli. let’s see if the ci gets green 🤞🏻 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
makes
declare_id!optional by introducing theAnchorProgramtrait withconst IDas an associated constant, replacing the hardcoded global static in the entrypoint.
programs can now declare their ID inline inside the
#[program]module instead ofrelying on
declare_id!, enabling flexible multi-instance deployments and easier testing.Closes