Skip to content

Fix: IDL gen byte string lit parsing - #2125

Merged
armaniferrante merged 2 commits into
otter-sec:masterfrom
stegaBOB:stegaBOB/fix/idl-seed-parsing
Aug 14, 2022
Merged

armaniferrante merged 2 commits into
otter-sec:masterfrom
stegaBOB:stegaBOB/fix/idl-seed-parsing

Conversation

@stegaBOB

Copy link
Copy Markdown
Contributor

Byte strings were not being parsed properly due to the match statement not catching syn Lits. This PR adds a pattern to catch and parse these.

Current build behavior with seeds=true:

WARNING: unexpected seed: Lit(ExprLit { attrs: [], lit: ByteStr(LitByteStr { token: b"some string" }) })

This will turn the entire seed into None if a seeds group contains a byte string literal. In other words, the entire PDA object will be missing in the IDL.

With the fix, the warning is gone and IDLs are generated as they should be.

@vercel

vercel Bot commented Aug 14, 2022

Copy link
Copy Markdown

@stegaBOB is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@stegaBOB

Copy link
Copy Markdown
Contributor Author

The rent exempt test is failing in master too I believe. Current SPL token is using features that weren't available to the 1.8 rbpf tools.

@armaniferrante
armaniferrante merged commit 3a0deba into otter-sec:master Aug 14, 2022
@stegaBOB
stegaBOB deleted the stegaBOB/fix/idl-seed-parsing branch August 14, 2022 03:01
yf-castel pushed a commit to castle-finance/anchor that referenced this pull request Aug 15, 2022
yf-castel pushed a commit to castle-finance/anchor that referenced this pull request Aug 15, 2022
Henry-E pushed a commit to Henry-E/anchor that referenced this pull request Dec 6, 2022
akash-osec pushed a commit to akash-osec/anchor that referenced this pull request Mar 25, 2026
@jamie-osec jamie-osec added this to the Pre-1.0 milestone Jun 24, 2026
akash-osec pushed a commit to akash-osec/anchor that referenced this pull request Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants