poanetwork / posdao-contracts

Smart contracts for POSDAO (Proof of Stake Decentralized Autonomous Organization consensus), a DPOS consensus implemented in Solidity and running within EVM with swappable BFT consensus
Other
105 stars 49 forks source link

Eternal storage refactoring #17

Closed DemiMarie closed 5 years ago

DemiMarie commented 5 years ago

_owner is used in many places, and is also used by EternalStorageProxy, so it should be an internal field, rather than being stored in a mapping. Also, delete mappings that are not used from the EternalStorage contract.

DemiMarie commented 5 years ago

@varasev would you mind letting me know if I need to make any more changes?

varasev commented 5 years ago

@DemiMarie

Please remove the modifier onlyOwner from EternalStorage because it is already declared in OwnedEternalStorage. The EternalStorage contract must only contain state fields/ mappings (without modifiers, functions, and events).

Also, please remove address internal _owner from OwnedEternalStorage (it is already declared in EternalStorage). Let the OwnedEternalStorage contain only the modifier onlyOwner.