Implement the ABI lookup support by enhancing the MoveStructType inte…#631
Open
VolodymyrBg wants to merge 13 commits intoaptos-labs:mainfrom
Open
Implement the ABI lookup support by enhancing the MoveStructType inte…#631VolodymyrBg wants to merge 13 commits intoaptos-labs:mainfrom
VolodymyrBg wants to merge 13 commits intoaptos-labs:mainfrom
Conversation
gregnazario
previously approved these changes
Feb 10, 2025
Collaborator
gregnazario
left a comment
There was a problem hiding this comment.
Would be good to add a test for it
- Add proper typing for Move struct fields and their types - Support generic type parameters and abilities - Add comprehensive test suite for struct type validation - Improve type safety for Move struct handling
Author
|
@gregnazario Added test |
Collaborator
|
Looks like there's some typing issues. Can you run the lints |
Author
working on it |
Author
|
@gregnazario Done. |
Author
|
@gregnazario |
Author
|
Last attempt)) |
Author
|
Never give up |
Author
|
@gregnazario I hope it works properly now |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…rface
I've implemented the ABI lookup support by enhancing the MoveStructType interface. Here's what I added:
type: The fully qualified name of the struct in the Move format (address::module::name)
fields: A map of field names to their Move types, allowing for dynamic lookup of struct fields
genericTypeParams: Optional array of generic type parameters if the struct is generic
abilities: Optional array of Move abilities that the struct has
This implementation allows for proper typing of Move structs and enables:
Type checking of struct fields
Support for generic structs
Ability to verify struct capabilities
Dynamic field lookup from ABI