JincorTech / ico

Jincor ICO smart-contracts
80 stars 30 forks source link

Migrations code duplication #35

Closed hlogeon closed 7 years ago

hlogeon commented 7 years ago

In Migrations contract you can avoid code duplication: import Ownable contract to Migrations contract, add inheritance: contract Migrations is Ownable and then remove:

    address public owner;
    modifier restricted() {
        if (msg.sender == owner) _;
    }
    function Migrations() {
        owner = msg.sender;
    }

then instead of marking function "restricted", you can use "onlyOwner" to avoid code duplication.

@pauliax ETH address: 0xaAbf60384137D460427fD5B849017e59479797A1

artemii235 commented 7 years ago

Hello @pauliax!

Your suggested changes were implemented. We are happy to offer you a 300 JCR bounty total for all created issues.

Thank you very much! We will be glad to consider new suggestions if you have any.