Skip to content

fix: declare_program with optional accounts#4180

Merged
acheroncrypto merged 4 commits into
otter-sec:masterfrom
exo-tech-xyz:tj/issues-4179
Jan 16, 2026
Merged

fix: declare_program with optional accounts#4180
acheroncrypto merged 4 commits into
otter-sec:masterfrom
exo-tech-xyz:tj/issues-4179

Conversation

@tomjohn1028

Copy link
Copy Markdown
Contributor

Closes #4179

@vercel

vercel Bot commented Jan 12, 2026

Copy link
Copy Markdown

@tomjohn1028 is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@tomjohn1028 tomjohn1028 marked this pull request as ready for review January 12, 2026 22:30
@acheroncrypto acheroncrypto added lang fix Bug fix PR labels Jan 13, 2026

@acheroncrypto acheroncrypto left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix looks great, but see the comment about tests.

Btw, this is not about the fix, but I'm curious what you think of this: should the instruction parser check the signer and writable attributes?

Comment thread tests/declare-program/programs/declare-program/src/lib.rs Outdated

@jamie-osec jamie-osec left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, other than the mentioned redundant optional IDL

@acheroncrypto acheroncrypto left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@acheroncrypto acheroncrypto merged commit 4447bef into otter-sec:master Jan 16, 2026
58 of 59 checks passed
@tomjohn1028 tomjohn1028 deleted the tj/issues-4179 branch January 16, 2026 17:23
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix PR lang

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1.0.0-rc.2 declare_program! broken with optional accounts

3 participants