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

feat: add compatibility for 0.29 and 0.30 versions #31

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

DirKraft91
Copy link

For now we can use 0.29 IDL and 0.30 IDL with the feature flag

This commit introduces several improvements:
- Added support for IDL version 0.30 with a new flag `-idl-version`
- Implemented `getPkgName()` function to handle package naming more robustly
- Updated generator to work with different IDL versions
- Added support for new IDL type `pubkey`
- Improved handling of program addresses and discriminators
- Updated dependencies in go.mod and go.sum
This commit enhances the type generation process for IDL types and accounts by:
- Creating a map to track defined types
- Generating suffixed type names for types and accounts
- Adding a preliminary check for IDL version compatibility
- Modifying the type definition generation to support more complex type scenarios
This commit makes two minor changes:
- Adds `.vscode` and `anchor-go` to `.gitignore`
- Removes panic for non-Anchor IDLs and adds type definition generation for such cases
Streamlines the generation of instruction discriminators by:
- Switching from `Const()` to `Var()` declaration
- Removing redundant comment
- Simplifying byte array generation for instruction discriminators
- Maintaining fallback to iota for instructions without discriminators
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.

1 participant