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

Limitations on dynamically-sized structs #2190

Closed
Tracked by #2471
iamdefinitelyahuman opened this issue Oct 10, 2020 · 3 comments
Closed
Tracked by #2471

Limitations on dynamically-sized structs #2190

iamdefinitelyahuman opened this issue Oct 10, 2020 · 3 comments

Comments

@iamdefinitelyahuman
Copy link
Contributor

Structs containing dynamically sized types (string, bytes) are not fully supported in vyper.

The following actions fail to compile and produce exceptions that are not immediately obvious:

  • An argument in an external function call
  • An argument in an internal function call
  • An input argument for function - but only if you attempt to access the dynamically sized data

The following actions are supported:

  • returning from an internal function
  • returning from an external function

As a temporary measure I've added a better exception during type checking (#2189). It covers all of the not-possible cases given above. Going forward though, I think we should add support for these structs in the places where they aren't working.

@vasa-develop
Copy link
Contributor

How difficult is it to add support for these cases? (In case I would take a stab at this)

@fubuloubu
Copy link
Member

fubuloubu commented Oct 12, 2020

@vasa-develop we have some of the building blocks in place (abi encoder), but it would be difficult to do this quickly without spending a lot of time in the codebase. Worth a shot if you have the time though, I know this is blocking you. We can help in TG if you need answers

@charles-cooper
Copy link
Member

fixed in #2447

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

4 participants