-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Procedurally generate Arrays.sol #4859
Conversation
|
Hey, Are you interested in adding a function for bytes32 memory array? There are lots of simplifications that can be done if there are the same functions for both array and storage |
Hello @RenanSouza2 We have multiple PR targetting Array.sol. #4846, #4842. I'm not sure we need to generate this file procedurally. I'd delay that decision until after the above PR are processed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a few adjustments after the other Arrays PRs got merged.
Right now it looks good to me but we might want to discuss how the generation script is ordered.
WDYT @Amxx ?
When doing this kind of changes, I think we should aim at minimizing the review work on the solidity side by keeping the function ordering. This greatly reduces the diff size. Once that is merged, we can always discuss another PR that reorder the template (that at this point we know is correct). Basically, its easy to:
But its hard to
I did some changes to minimize the changes to |
I agree with minimizing the diff. So LGTM as well. |
This PR creates scripts to generate the Arrays.sol file,
It also includes tests for unsafeMemoryAccess functions
PR Checklist
npx changeset add
)