代币分发 ICO 的安全审计

Security audit for Token Distribution ICO

这是我们的 MEG-Token-Distribution 1.0。我们需要某人的帮助。 Link for full code.

我们如何访问 mint 函数(令牌所有者是 EggithCrowdsale)?

我们如何更改汇率取决于 msg.value(如果 > 20 ETH 价格另一个)?

contract EggithToken is MintableToken {
    string public constant name = "EggithToken";
    string public constant symbol = "MEG";
    uint8 public constant decimals = 18;
}

contract EggithCrowdsale is Crowdsale {
    function EggithCrowdsale(uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet)
         Crowdsale(_startTime, _endTime, _rate, _wallet)
    {
    }

    // creates the token to be sold. 
    // override this method to have crowdsale of a specific mintable token.
    function createTokenContract() internal returns (MintableToken) {
        return new EggithToken();
    }
}

"How we can change rate depend on msg.value (if > 20 ETH price another)?"

   uint public constant regularPrice = 100;
   uint public constant moreThan20EthContributionPrice = 75;

   function () payable { 
   //fallback function that is called when ETH is sent to contract

   ... some code ...

   uint price = calculatePrice();

   ... some code ...

    }

    function calculatePrice() internal constant returns (uint) {
        if (msg.value > 20 ether) return moreThan20EthContributionPrice;
        return regularPrice;
   }