KyberNetwork / smart-contracts

Main smart contracts for Kyber Network, including the main platform contract, reserve contracts etc.
https://kyber.network
MIT License
378 stars 341 forks source link

Add abstraction layer for network, feeHandler, DAO and matchingEngine history #940

Closed Anyhowclick closed 4 years ago

ducquangkstn commented 4 years ago

I think we could create history as mapping (bytes32 => []address) like https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/AccessControl.sol So we don't have to deploy networkHistory feeHandlerHistory kyberDAOHistory and matchingEngineHistory

Anyhowclick commented 4 years ago

We can, but we want this additional abstraction layer as it will help with upgradeability.

In the case where we want to upgrade the storage contract to store more contract types (like the staking contracts for example), then we don't have to re-initialise and do migration.

Anyhowclick commented 4 years ago

Shifting to ctor arguments should solve all the issues u mentioned