1Hive / time-lock-app

The Time Lock app enables Aragon organizations to require users transfer or temporarily lock tokens before forwarding an intent.
GNU General Public License v3.0
16 stars 11 forks source link

WHOLE_GRIEFING is not initialized #44

Closed yeqbfgxjiq closed 5 years ago

yeqbfgxjiq commented 5 years ago

Reading through the Aragon docs and came across the initialization section. It seems to say that global variables in apps must be initialized within the initialize() function, but if they are simply initialized globally they will be discarded.

On line 32 of Lock.sol we set WHOLE_GRIEFING to 100, but do not initialize it in the initialize() function.

Do we need to initialize WHOLE_GRIEFING in the initialize() function along with the other global variables? Or is this irrelevant because WHOLE_GRIEFING is a private constant?

fabriziovigevani commented 5 years ago

It's the later, but the only relevant thing is the value being a constant. If you see in the contract every constant value is set right away.

You can see an example in Aragon voting app here also

yeqbfgxjiq commented 5 years ago

Awesome. Thanks for explaining that