pragma solidity ^0.4.11; interface ExeyERC20ICO { function transfer(address _receiver, uint256 _amount); } contract ExeySafeICO { uint256 public buyPrice; ExeyERC20ICO public token; function ExeySafeICO(ExeyERC20ICO _token){ token = _token; buyPrice = 10000; } function () payable { _buy(msg.sender, msg.value); } function buy() payable returns (uint256){ uint tokens = _buy(msg.sender, msg.value); return tokens; } function _buy(address _sender, uint256 _amount) internal returns (uint){ uint tokens = _amount / buyPrice; token.transfer(_sender, tokens); return tokens; } }
0.4.11