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

Add ability to determine the inner type of an array ABIType [APE-678] #63

Open
fubuloubu opened this issue Feb 27, 2023 · 0 comments
Open

Comments

@fubuloubu
Copy link
Member

Overview

It's often a little difficult working with ABIType instances of arrays. It would be nice to have some better tools.

Specification

class ABIType(...):
    ...

    def is_array(self) -> bool:
        # check if `self.type` is something like `...[]` or `...[...]`

    def array_type(self) -> Optional["ABIType"]:
        if self.is_array():
            # fetch the "inner type" of the array, if it is an array type

Dependencies

Would be helpful for ApeWorX/ape#1319

@NotPeopling2day NotPeopling2day changed the title Add ability to determine the inner type of an array ABIType Add ability to determine the inner type of an array ABIType [APE-678] Feb 27, 2023
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

No branches or pull requests

1 participant