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

Disallow non-constructor initialization #1391

Closed
nventuro opened this issue Oct 7, 2018 · 0 comments
Closed

Disallow non-constructor initialization #1391

nventuro opened this issue Oct 7, 2018 · 0 comments
Labels
contracts Smart contract code. good first issue Low hanging fruit for new contributors to get involved!
Milestone

Comments

@nventuro
Copy link
Contributor

nventuro commented Oct 7, 2018

Some of our contracts (like ReentrancyGuard) initialize their state variables outside of a constructor (i.e. in their declaration). We should avoid doing this and move all initialization to the constructor, mainly for clarity, but also because this makes it easier to transform said constructors to initialization functions.

@nventuro nventuro added kind:improvement contracts Smart contract code. labels Oct 7, 2018
@nventuro nventuro added the good first issue Low hanging fruit for new contributors to get involved! label Oct 8, 2018
Aniket-Engg added a commit to Aniket-Engg/zeppelin-solidity that referenced this issue Oct 10, 2018
nventuro pushed a commit that referenced this issue Oct 10, 2018
* signing prefix added

* Minor improvement

* Tests changed

* Successfully tested

* Minor improvements

* Minor improvements

* Revert "Dangling commas are now required. (#1359)"

This reverts commit a688977.

* updates

* fixes #1391
come-maiz pushed a commit that referenced this issue Oct 21, 2018
* signing prefix added

* Minor improvement

* Tests changed

* Successfully tested

* Minor improvements

* Minor improvements

* Revert "Dangling commas are now required. (#1359)"

This reverts commit a688977.

* updates

* fixes #1391

(cherry picked from commit da67e43)
@come-maiz come-maiz added this to the v2.0 milestone Oct 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contracts Smart contract code. good first issue Low hanging fruit for new contributors to get involved!
Projects
None yet
Development

No branches or pull requests

2 participants