Skip to content
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

Fix: IDL gen byte string lit parsing #2125

Merged

Conversation

stegaBOB
Copy link
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
Copy link

vercel bot commented Aug 14, 2022

@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
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 coral-xyz: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
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.

None yet

2 participants