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

Review immutable vs constant vars + ordering in vault #321

Open
hieronx opened this issue Jun 14, 2024 · 0 comments
Open

Review immutable vs constant vars + ordering in vault #321

hieronx opened this issue Jun 14, 2024 · 0 comments

Comments

@hieronx
Copy link
Contributor

hieronx commented Jun 14, 2024

          1. I think there should be consistency. One is initialized  in the variable declaration an some in the constructor. I think it should be in one place.
  1. Naming should be also unified and I see some parts of the solidity style guide were followed and some not. We can agree of course on this :)
  2. I was curious why you would choose constructor initialization over in declaration so I deployed 2 version of the same contract ( on Remix ) .
  • Version 1: All variables marked as constants and initialized during declaration
  • Version 2: All variables immutable and initialized in the constructor
    Version 2 deployment cost was less than the Version deployment cost.

I don't know why it's that. it's just an observation.

Originally posted by @peculiarity in #308 (comment)

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

No branches or pull requests

1 participant