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

Update Struct public getter to return whole Struct #2064

Merged
merged 4 commits into from
Jun 28, 2020

Conversation

fubuloubu
Copy link
Member

Closes: #1702

What I did

We had some funky handling prior for struct members because of a bug in web3py. This PR makes the correct change to support returning structs from public getters directly, making it compatible with how Solidity handles it.

How I did it

Just returning the struct name as a type directly instead of iterating over it's members

How to verify it

I updated the tests to use the tuple sequence returned from the public getter. Also note the xfail on the one test case that couldn't be handled by web3py's current configuration. We can remove this once web3py releases a fix, or we change to using Brownie

Description for the changelog

Public getters for structs now return the whole struct

Cute Animal Picture

exhausted

Copy link
Contributor

@iamdefinitelyahuman iamdefinitelyahuman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm amazed at how easy this was. I expected a lot more changes!

@fubuloubu fubuloubu merged commit 22bef3a into vyperlang:master Jun 28, 2020
@fubuloubu
Copy link
Member Author

@iamdefinitelyahuman don't jynx me broh

@fubuloubu fubuloubu deleted the bug/struct-getter branch June 28, 2020 18:33
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.

Struct getter collisions
2 participants