protofire/kyber-pool-master-proxy-contract

Consider to simplify constructor parameters

Closed this issue · 0 comments

Right now the contract constructor accepts the following parameters:

constructor(
address _kncToken,
address _kyberDAO,
address _kyberStaking,
address _kyberFeeHandler,
uint256 _epochNotice,
uint256 _delegationFee
) public {

This method can be simplified by only using _kyberDAO for the needed addresses and calculate _kncToken, _kyberStaking, _kyberFeeHandler by calling the proper methods from KyberDAO to get the addresses information.

Here is how they are stored in KyberDAO
https://github.com/KyberNetwork/smart-contracts/blob/Katalyst/contracts/sol6/Dao/KyberDAO.sol#L59-L61

This change will reduce the number of addresses that the pool master needs to provide to deploy the contract and also avoid errors in setting incorrect addresses for all the contracts.