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

Parsing Anchor IDL instead of creating our own #196

Merged
merged 1 commit into from
Sep 12, 2024
Merged

Conversation

lukacan
Copy link
Collaborator

@lukacan lukacan commented Aug 29, 2024

This PR updates how the Trident parses the Anchor project.
Currently the Trident was expanding the Anchor project and parsing the expanded Source code into its own light IDL definition.

This PR updates the parsing logic in a way that instead of creating our own light IDL, Trident utilizes the IDL generated by Anchor. Even though the IDL generated by Anchor does not include all of the important parts in order to generate the template completely, if makes the initialization process faster and easier as the IDL json file can be simply deserialized into structs defined within the anchor-syn.

Apart from updating this Core logic , some additional updates were made, for example:

  • More template code generated is generated automatically
  • In case of only one program in the workspace, the test_fuzz.rs is automatically filled
  • In case of multiple programs, the FuzzInstructions have to be filled
  • This can be also improved in the future as user can input the main program on trident init
  • get_data function contains almost all of the instruction inputs automatically set to the self.data.<FIELD_NAME>

@lukacan lukacan force-pushed the impr/parsing-idl branch 10 times, most recently from 28225c3 to 1c9c9d1 Compare September 5, 2024 08:54
@lukacan lukacan marked this pull request as ready for review September 9, 2024 05:53
@lukacan lukacan merged commit 52a49c8 into develop Sep 12, 2024
8 checks passed
@lukacan lukacan deleted the impr/parsing-idl branch September 12, 2024 18:53
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