Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
What's your issue about?
I'm not sure whether this is designed or a bug but Vyper doesn't support custom constants of lists.
Cute Animal Picture
Well it's not the only use case, I can easily imagine something like a making sure you have set of values like:
VALID_STATES: constant(int128) = [1, 33, 44, 55 .. ]
Or another form of storing owners?
OWNERS: constant(address) = [....]
Just thinking out loud - on what it could be used for.
Case 1 would actually be better served by enums (which we don't have... yet). Basically something like:
enum(int128) State: A = 1 B = 33 C = 44 D = 55
Case 2 is typically done dynamically through a constructor. Probably not the best idea to hardcode a collection of addresses, since they might change on every deployment and you would have to update the code, but I can see a limited rationale of how that could be useful for something like templated programs (but basically, just use constructor args)
Yep. I found this issue when I wanted to return a list full of
I'm also not confident about the use case of this feature...