Skip to content

feat: add compatibility for 0.29 and 0.30 versions#31

Open
dimatima13 wants to merge 7 commits intogagliardetto:mainfrom
dimatima13:feat/add-30v-support
Open

feat: add compatibility for 0.29 and 0.30 versions#31
dimatima13 wants to merge 7 commits intogagliardetto:mainfrom
dimatima13:feat/add-30v-support

Conversation

@dimatima13
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