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

feat(sol-macro): expand getter functions' return types #262

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

DaniPopes
Copy link
Member

@DaniPopes DaniPopes commented Sep 4, 2023

Motivation

Follow up to (and based on) #260.

Expand stuff like:

struct Data {
  uint a;
  uint[] b;
  // this doesn't currently work when generating the struct, but it should be skipped
  // in `getData` below regardless
  mapping(uint => bool) map;
}
mapping(uint => Data) public getData;

to

// skipped Data.b, Data.map from return value
function getData(uint) public view returns (uint);

Solution

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@DaniPopes DaniPopes force-pushed the dani/expand-getters branch 2 times, most recently from 999a5c4 to 0ddf7be Compare September 4, 2023 06:15
@DaniPopes DaniPopes marked this pull request as ready for review September 7, 2023 21:42
@DaniPopes DaniPopes merged commit 52ce7e4 into main Sep 12, 2023
18 checks passed
@DaniPopes DaniPopes deleted the dani/expand-getters branch September 12, 2023 05:16
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.

2 participants