-
Notifications
You must be signed in to change notification settings - Fork 79
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
publish: Add warning if aragon app solidity code initializes any global variable #26
Labels
Comments
This should also make it in the documentation too |
Should be fairly simple to do with solidity-parser. Obviously constants are excluded as they're not written to storage. For the docs I think an illustration would be helpful. Storage is initialized, but just not for the proxy, which is the storage we care about. |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Because of our use of Proxies, child contracts won't initialize global variables when created. In case an app being published does this, we should at least warn the developer.
In the above example, when used behind a proxy,
initialState
will be 0, even though the expectation reading the code is that it will be 1.We should encourage the developer to make it something like:
Edit: this should apply to logic in constructors too
The text was updated successfully, but these errors were encountered: