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
Make UnstructuredStorage a library #380
Conversation
0831b9d
to
fd60543
Compare
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.
This looks good to me, just two comments:
- What's the advantage of using a Library versus inheriting a contract? Is it to save gas? How are we currently deploying our contracts regarding libs (like
SafeMath
)? Are we reusing them? Shouldn't we document library addresses we are using here Move AragonApp to unstructured storage #376 (comment)? What about upgradeability? In case we need it, are we supposed to deploy a new library version and link new contracts using the new address? - See my comment here: Move AragonApp to unstructured storage #376 (comment)
So actually this is buried in the solidity docs, but
|
What about the bytecode size? Did you check it? Is it happening the same as in #382 ? In that case, would we wait to 0.4.24 too? (#382 (comment)) |
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.
LGTM. Loving how it simplifies the inheritance graph and being able to move pinnedCode
out of AppStorage
💥
Admittedly this was before #382 so I hadn't thought of checking the bytecode size... can do some tests soon. |
I'm fine with the changes, but I guess not that excited, haha. |
For the library change (f322c87) against branch target:
Awkwardly, this seems to be a gas cost decrease for some reason that #382 was not. Against current
Which is much better than #376 initially. The pinnedCode change has no length diff. |
Given that the bytecode increment seems to be halved by making I also don't see this as "hiding" any complexity, since we're still declaring that I've also opted to keep 91b4431 (removing |
Wow! |
Also moves the
pinnedCode
implementation details toAppProxyPinned
as it's only relevant there, and unstructured storage is meant to hide these types of abstractions :).