Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 21 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0x2efde4863c1920d34dc12dbc06b7f6fb8c77d86fat txn 0x4cd1cc4561bc4bafa5ca272146ba2aded2875656bb7fb4a2414daf2b020c6985
 Latest 21 txns

TxHash Age From To Value [TxFee]
0x4ec8d40cc4bc9b63485a701c7313a8cbf7fef5b6d0db1e32f3c431af237d8a69301 days 13 hrs ago0x2efde4863c1920d34dc12dbc06b7f6fb8c77d86f  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10 Ether0.000067011
0xe9822f431d75acdc3396398dbc54db58c6832145e519759f675f23676d1aae8d302 days 13 hrs ago0x2efde4863c1920d34dc12dbc06b7f6fb8c77d86f  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10 Ether0.000207852
0x5c6dbb1117e1afbffae23099680d34db66d8f7b55b3f1c2a28f29a8e043b1b0b302 days 14 hrs ago0x7e1dcf785f0353bf657c38ab7865c1f184efe208  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b132.2 Ether0.000088208
0x119e95b94895f3169ee9efc47f62b728dc19f1fec2ad19c5edc06080227ad555302 days 14 hrs ago0xf3a2727a3447653a58d57e4be63d5d5cdc55421b  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b132.2 Ether0.021099
0x5c2c6c528d84edc3641b6a99a6ddd58c157a807b59c52c864303a123b827c6e7302 days 14 hrs ago0x9a943bb65cfb4c61e54975caccde066841528d6d  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b132.1 Ether0.00042198
0x3bcb36c46e6827f26307ccbe65f985e07d474a8393a4ce03a269f5281c866b73304 days 23 hrs ago0xf3a2727a3447653a58d57e4be63d5d5cdc55421b  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b132 Ether0.00042198
0x0eb3d8a38c925a02ed77241c343db3c5e82a55be26fcbcccaecc16410dbc4c02305 days 1 hr ago0x3ac5900db981d18260092b7c145e48271eb9ebe9  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b11.8 Ether0.000084396
0xdae191b2ff8a082bca47110e26ae4086c4ae54f6d951749fe72ad0e5aef65013305 days 1 hr ago0xaa679e4ee126f49c4c7e06bffae0f64562e74deb  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b11.7 Ether0.000084396
0xe5bf53cfaba5cb6a84f0da2a3fde0c701f88235f9e1c8f8235d5a002c015ea6c305 days 1 hr ago0x3ac5900db981d18260092b7c145e48271eb9ebe9  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b11.6 Ether0.000084396
0xaa2a5dd4b15c59b279b3fa5078862763e20e686d81345f70de6ae701091f76a1306 days 1 hr ago0xaa679e4ee126f49c4c7e06bffae0f64562e74deb  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b11.5 Ether0.000084396
0xa1b03e94fe38ff21fd8aba8fccdc9e025e17534eef76a733d091d18448975afe306 days 1 hr ago0xe6725657db0a26c98f63f9f2fab7065d566bee9b  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b11.4 Ether0.000042198
0xd3c3132931059f035def1d6a0c1ddd4dc349a67e48d60324ae4e1aa52f93c98e306 days 1 hr ago0x594fa8cf6dbe7c59b56fca5bd499124bb347f87d  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b11.3 Ether0.000084396
0x1bbef04a7b0b5251db88f04241c66f8ff441b9cc6f2785233d68d2a04f999254308 days 6 hrs ago0xe6725657db0a26c98f63f9f2fab7065d566bee9b  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b11.2 Ether0.000042198
0x5fb18bd9c259e70ef6f7842f9d248fcd50b5a95d24b056106f9b4757cca3a175308 days 11 hrs ago0x46f9a1dc80df2e5d1cc0efd24f4ec341523753d3  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b11.1 Ether0.00021099
0xd01b26ca313fea59fdace8e1763e7e0c260471a01f958faeaadfd4423c3b5bd2308 days 11 hrs ago0xc8a0191838ee3d1e50c52c6d5af6b3c503b8fecc  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b11 Ether0.000084396
0x12ef959454f29317f9e750a5061eecca69384878cd3d7cdd0743c9cf59f7a75d308 days 13 hrs ago0xc88ddaa37c1fec910670366ae16df2aa5e1124f7  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10.8 Ether0.000590772
0xc425e57db784dad0c4d6dfd621201dc82cc6cf749b93584f2d6aa4b6d710989e308 days 13 hrs ago0x7c377b7bce53a5cef88458b2cbbe11c3babe16da  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10.7 Ether0.00042198
0x157051c44600d764a0ac8fabe8a189f8afa03075dbb6e37799e8172a8164e066308 days 13 hrs ago0x5ea54ab316c8940daf54b553057397cfde2a2fb4  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10.6 Ether0.000084396
0x04b5d4fab0c503dd9a5aab5c8553cdfff0157c9cfb7773ef14eaaf9ecd1c6ac9308 days 13 hrs ago0x9c93c4575402195775d4ab5d83877c079723382a  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10.2 Ether0.00021099
0xd1e0304f16b72a902d1710cd3444a8e6c5f7ed1c7be33e6a00e73f6292aeac8b308 days 14 hrs ago0x183febd8828a9ac6c70c0e27fbf441b93004fc05  IN   0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10.1 Ether0.00038535
0x4cd1cc4561bc4bafa5ca272146ba2aded2875656bb7fb4a2414daf2b020c6985308 days 16 hrs ago0x2efde4863c1920d34dc12dbc06b7f6fb8c77d86f  IN    Contract Creation0 Ether0.001274187
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 17 Internal Transactions

ParentTxHash Block Age From To Value
0xe9822f431d75acdc3396398dbc54db58c6832145e519759f675f23676d1aae8d5325679302 days 13 hrs ago0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10x2efde4863c1920d34dc12dbc06b7f6fb8c77d86f32.2 Ether
0x119e95b94895f3169ee9efc47f62b728dc19f1fec2ad19c5edc06080227ad5555325589302 days 14 hrs ago0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10x9a943bb65cfb4c61e54975caccde066841528d6d32.1 Ether
0x5c2c6c528d84edc3641b6a99a6ddd58c157a807b59c52c864303a123b827c6e75325581302 days 14 hrs ago0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10xf3a2727a3447653a58d57e4be63d5d5cdc55421b32 Ether
0x3bcb36c46e6827f26307ccbe65f985e07d474a8393a4ce03a269f5281c866b735311143304 days 23 hrs ago0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10x3ac5900db981d18260092b7c145e48271eb9ebe91.8 Ether
0x0eb3d8a38c925a02ed77241c343db3c5e82a55be26fcbcccaecc16410dbc4c025310684305 days 1 hr ago0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10xaa679e4ee126f49c4c7e06bffae0f64562e74deb1.7 Ether
0xdae191b2ff8a082bca47110e26ae4086c4ae54f6d951749fe72ad0e5aef650135310650305 days 1 hr ago0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10x3ac5900db981d18260092b7c145e48271eb9ebe91.6 Ether
0xe5bf53cfaba5cb6a84f0da2a3fde0c701f88235f9e1c8f8235d5a002c015ea6c5310544305 days 1 hr ago0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10xaa679e4ee126f49c4c7e06bffae0f64562e74deb1.5 Ether
0xaa2a5dd4b15c59b279b3fa5078862763e20e686d81345f70de6ae701091f76a15304659306 days 1 hr ago0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10xe6725657db0a26c98f63f9f2fab7065d566bee9b1.4 Ether
0xa1b03e94fe38ff21fd8aba8fccdc9e025e17534eef76a733d091d18448975afe5304640306 days 1 hr ago0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10x594fa8cf6dbe7c59b56fca5bd499124bb347f87d1.3 Ether
0xd3c3132931059f035def1d6a0c1ddd4dc349a67e48d60324ae4e1aa52f93c98e5304621306 days 1 hr ago0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10xe6725657db0a26c98f63f9f2fab7065d566bee9b1.2 Ether
0x1bbef04a7b0b5251db88f04241c66f8ff441b9cc6f2785233d68d2a04f9992545291528308 days 6 hrs ago0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10x46f9a1dc80df2e5d1cc0efd24f4ec341523753d31.1 Ether
0x5fb18bd9c259e70ef6f7842f9d248fcd50b5a95d24b056106f9b4757cca3a1755290288308 days 11 hrs ago0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10xc8a0191838ee3d1e50c52c6d5af6b3c503b8fecc1 Ether
0xd01b26ca313fea59fdace8e1763e7e0c260471a01f958faeaadfd4423c3b5bd25290129308 days 11 hrs ago0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10xc88ddaa37c1fec910670366ae16df2aa5e1124f70.8 Ether
0x12ef959454f29317f9e750a5061eecca69384878cd3d7cdd0743c9cf59f7a75d5289701308 days 13 hrs ago0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10x7c377b7bce53a5cef88458b2cbbe11c3babe16da0.7 Ether
0xc425e57db784dad0c4d6dfd621201dc82cc6cf749b93584f2d6aa4b6d710989e5289669308 days 13 hrs ago0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10x5ea54ab316c8940daf54b553057397cfde2a2fb40.6 Ether
0x157051c44600d764a0ac8fabe8a189f8afa03075dbb6e37799e8172a8164e0665289656308 days 13 hrs ago0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10x9c93c4575402195775d4ab5d83877c079723382a0.2 Ether
0x04b5d4fab0c503dd9a5aab5c8553cdfff0157c9cfb7773ef14eaaf9ecd1c6ac95289616308 days 13 hrs ago0xaba9fdf93ae2c5f0a3231da3cc4648073e7b27b10x183febd8828a9ac6c70c0e27fbf441b93004fc050.1 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Similar Match)
Note: Displaying Similar Match Verified Source Code At Contract 0x6ecd58c1fb4af86d347f7bcf6ff713a0a8f99c4c(Excluding Constructor Arguments if any)
Contract Name: ETStarPresale
Compiler Text: v0.4.21+commit.dfe3193c
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.21;

// SafeMath is a part of Zeppelin Solidity library
// licensed under MIT License
// https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/LICENSE

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }
        uint256 c = a * b;
        assert(c / a == b);
        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // assert(b > 0); // Solidity automatically throws when dividing by 0
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold
        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        assert(b <= a);
        return a - b;
    }

    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        assert(c >= a);
        return c;
    }
}

// https://github.com/OpenZeppelin/zeppelin-solidity

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
    function totalSupply() public view returns (uint256);
    function balanceOf(address who) public view returns (uint256);
    function transfer(address to, uint256 value) public returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
}

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
    function allowance(address owner, address spender) public view returns (uint256);
    function transferFrom(address from, address to, uint256 value) public returns (bool);
    function approve(address spender, uint256 value) public returns (bool);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

/**
 * @title Basic token
 * @dev Basic version of StandardToken, with no allowances.
 */
contract BasicToken is ERC20Basic {
    using SafeMath for uint256;

    mapping(address => uint256) balances;

    uint256 totalSupply_;

    /**
    * @dev Protection from short address attack
    */
    modifier onlyPayloadSize(uint size) {
        assert(msg.data.length == size + 4);
        _;
    }

    /**
    * @dev total number of tokens in existence
    */
    function totalSupply() public view returns (uint256) {
        return totalSupply_;
    }

    /**
    * @dev transfer token for a specified address
    * @param _to The address to transfer to.
    * @param _value The amount to be transferred.
    */
    function transfer(address _to, uint256 _value) onlyPayloadSize(2 * 32) public returns (bool) {
        require(_to != address(0));
        require(_value <= balances[msg.sender]);

        // SafeMath.sub will throw if there is not enough balance.
        balances[msg.sender] = balances[msg.sender].sub(_value);
        balances[_to] = balances[_to].add(_value);
        emit Transfer(msg.sender, _to, _value);

        _postTransferHook(msg.sender, _to, _value);

        return true;
    }

    /**
    * @dev Gets the balance of the specified address.
    * @param _owner The address to query the the balance of.
    * @return An uint256 representing the amount owned by the passed address.
    */
    function balanceOf(address _owner) public view returns (uint256 balance) {
        return balances[_owner];
    }

    /**
    * @dev Hook for custom actions to be executed after transfer has completed
    * @param _from Transferred from
    * @param _to Transferred to
    * @param _value Value transferred
    */
    function _postTransferHook(address _from, address _to, uint256 _value) internal;
}

/**
 * @title Standard ERC20 token
 *
 * @dev Implementation of the basic standard token.
 * @dev https://github.com/ethereum/EIPs/issues/20
 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
 */
contract StandardToken is ERC20, BasicToken {

    mapping (address => mapping (address => uint256)) internal allowed;


    /**
     * @dev Transfer tokens from one address to another
     * @param _from address The address which you want to send tokens from
     * @param _to address The address which you want to transfer to
     * @param _value uint256 the amount of tokens to be transferred
     */
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
        require(_to != address(0));
        require(_value <= balances[_from]);
        require(_value <= allowed[_from][msg.sender]);

        balances[_from] = balances[_from].sub(_value);
        balances[_to] = balances[_to].add(_value);
        allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
        emit Transfer(_from, _to, _value);

        _postTransferHook(_from, _to, _value);

        return true;
    }

    /**
     * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
     *
     * Beware that changing an allowance with this method brings the risk that someone may use both the old
     * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
     * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     * @param _spender The address which will spend the funds.
     * @param _value The amount of tokens to be spent.
     */
    function approve(address _spender, uint256 _value) public returns (bool) {
        allowed[msg.sender][_spender] = _value;
        emit Approval(msg.sender, _spender, _value);
        return true;
    }

    /**
     * @dev Function to check the amount of tokens that an owner allowed to a spender.
     * @param _owner address The address which owns the funds.
     * @param _spender address The address which will spend the funds.
     * @return A uint256 specifying the amount of tokens still available for the spender.
     */
    function allowance(address _owner, address _spender) public view returns (uint256) {
        return allowed[_owner][_spender];
    }

    /**
     * @dev Increase the amount of tokens that an owner allowed to a spender.
     *
     * approve should be called when allowed[_spender] == 0. To increment
     * allowed value is better to use this function to avoid 2 calls (and wait until
     * the first transaction is mined)
     * From MonolithDAO Token.sol
     * @param _spender The address which will spend the funds.
     * @param _addedValue The amount of tokens to increase the allowance by.
     */
    function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
        allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
        emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
        return true;
    }

    /**
     * @dev Decrease the amount of tokens that an owner allowed to a spender.
     *
     * approve should be called when allowed[_spender] == 0. To decrement
     * allowed value is better to use this function to avoid 2 calls (and wait until
     * the first transaction is mined)
     * From MonolithDAO Token.sol
     * @param _spender The address which will spend the funds.
     * @param _subtractedValue The amount of tokens to decrease the allowance by.
     */
    function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
        uint oldValue = allowed[msg.sender][_spender];
        if (_subtractedValue > oldValue) {
            allowed[msg.sender][_spender] = 0;
        } else {
            allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
        }
        emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
        return true;
    }

}

contract Owned {
    address owner;

    modifier onlyOwner {
        require(msg.sender == owner);
        _;
    }

    /// @dev Contract constructor
    function Owned() public {
        owner = msg.sender;
    }
}


contract AcceptsTokens {
    ETToken public tokenContract;

    function AcceptsTokens(address _tokenContract) public {
        tokenContract = ETToken(_tokenContract);
    }

    modifier onlyTokenContract {
        require(msg.sender == address(tokenContract));
        _;
    }

    function acceptTokens(address _from, uint256 _value, uint256 param1, uint256 param2, uint256 param3) external;
}

contract ETToken is Owned, StandardToken {
    using SafeMath for uint;

    string public name = "ETH.TOWN Token";
    string public symbol = "ETIT";
    uint8 public decimals = 18;

    address public beneficiary;
    address public oracle;
    address public heroContract;
    modifier onlyOracle {
        require(msg.sender == oracle);
        _;
    }

    mapping (uint32 => address) public floorContracts;
    mapping (address => bool) public canAcceptTokens;

    mapping (address => bool) public isMinter;

    modifier onlyMinters {
        require(msg.sender == owner || isMinter[msg.sender]);
        _;
    }

    event Dividend(uint256 value);
    event Withdrawal(address indexed to, uint256 value);
    event Burn(address indexed from, uint256 value);

    function ETToken() public {
        oracle = owner;
        beneficiary = owner;

        totalSupply_ = 0;
    }

    function setOracle(address _oracle) external onlyOwner {
        oracle = _oracle;
    }
    function setBeneficiary(address _beneficiary) external onlyOwner {
        beneficiary = _beneficiary;
    }
    function setHeroContract(address _heroContract) external onlyOwner {
        heroContract = _heroContract;
    }

    function _mintTokens(address _user, uint256 _amount) private {
        require(_user != 0x0);

        balances[_user] = balances[_user].add(_amount);
        totalSupply_ = totalSupply_.add(_amount);

        emit Transfer(address(this), _user, _amount);
    }

    function authorizeFloor(uint32 _index, address _floorContract) external onlyOwner {
        floorContracts[_index] = _floorContract;
    }

    function _acceptDividends(uint256 _value) internal {
        uint256 beneficiaryShare = _value / 5;
        uint256 poolShare = _value.sub(beneficiaryShare);

        beneficiary.transfer(beneficiaryShare);

        emit Dividend(poolShare);
    }

    function acceptDividends(uint256 _value, uint32 _floorIndex) external {
        require(floorContracts[_floorIndex] == msg.sender);

        _acceptDividends(_value);
    }

    function rewardTokensFloor(address _user, uint256 _tokens, uint32 _floorIndex) external {
        require(floorContracts[_floorIndex] == msg.sender);

        _mintTokens(_user, _tokens);
    }

    function rewardTokens(address _user, uint256 _tokens) external onlyMinters {
        _mintTokens(_user, _tokens);
    }

    function() payable public {
        // Intentionally left empty, for use by floors
    }

    function payoutDividends(address _user, uint256 _value) external onlyOracle {
        _user.transfer(_value);

        emit Withdrawal(_user, _value);
    }

    function accountAuth(uint256 /*_challenge*/) external {
        // Does nothing by design
    }

    function burn(uint256 _amount) external {
        require(balances[msg.sender] >= _amount);

        balances[msg.sender] = balances[msg.sender].sub(_amount);
        totalSupply_ = totalSupply_.sub(_amount);

        emit Burn(msg.sender, _amount);
    }

    function setCanAcceptTokens(address _address, bool _value) external onlyOwner {
        canAcceptTokens[_address] = _value;
    }

    function setIsMinter(address _address, bool _value) external onlyOwner {
        isMinter[_address] = _value;
    }

    function _invokeTokenRecipient(address _from, address _to, uint256 _value, uint256 _param1, uint256 _param2, uint256 _param3) internal {
        if (!canAcceptTokens[_to]) {
            return;
        }

        AcceptsTokens recipient = AcceptsTokens(_to);

        recipient.acceptTokens(_from, _value, _param1, _param2, _param3);
    }

    /**
    * @dev transfer token for a specified address and forward the parameters to token recipient if any
    * @param _to The address to transfer to.
    * @param _value The amount to be transferred.
    * @param _param1 Parameter 1 for the token recipient
    * @param _param2 Parameter 2 for the token recipient
    * @param _param3 Parameter 3 for the token recipient
    */
    function transferWithParams(address _to, uint256 _value, uint256 _param1, uint256 _param2, uint256 _param3) onlyPayloadSize(5 * 32) external returns (bool) {
        require(_to != address(0));
        require(_value <= balances[msg.sender]);

        // SafeMath.sub will throw if there is not enough balance.
        balances[msg.sender] = balances[msg.sender].sub(_value);
        balances[_to] = balances[_to].add(_value);
        emit Transfer(msg.sender, _to, _value);

        _invokeTokenRecipient(msg.sender, _to, _value, _param1, _param2, _param3);

        return true;
    }

    /**
    * @dev Hook for custom actions to be executed after transfer has completed
    * @param _from Transferred from
    * @param _to Transferred to
    * @param _value Value transferred
    */
    function _postTransferHook(address _from, address _to, uint256 _value) internal {
        _invokeTokenRecipient(_from, _to, _value, 0, 0, 0);
    }


}

contract PresaleContract is Owned {
    ETToken public tokenContract;

    /// @dev Contract constructor
    function PresaleContract(address _tokenContract) public {
        tokenContract = ETToken(_tokenContract);
    }
}



contract ETStarPresale is PresaleContract {
    using SafeMath for uint;

    uint256 public auctionEnd;
    uint256 public itemType;

    address public highestBidder;
    uint256 public highestBid;
    bool public ended;

    event Bid(address from, uint256 amount);
    event AuctionEnded(address winner, uint256 amount);

    function ETStarPresale(address _presaleToken, uint256 _auctionEnd, uint256 _itemType)
        PresaleContract(_presaleToken)
        public
    {
        auctionEnd = _auctionEnd;
        itemType = _itemType;
    }

    function _isContract(address _user) internal view returns (bool) {
        uint size;
        assembly { size := extcodesize(_user) }
        return size > 0;
    }

    function auctionExpired() public view returns (bool) {
        return now > auctionEnd;
    }

    function() public payable {
        require(!_isContract(msg.sender));
        require(!auctionExpired());

        require(msg.value > highestBid);

        if (highestBid != 0) {
            highestBidder.transfer(highestBid);
        }

        highestBidder = msg.sender;
        highestBid = msg.value;

        emit Bid(msg.sender, msg.value);
    }

    function endAuction() public onlyOwner {
        require(auctionExpired());
        require(!ended);

        ended = true;
        emit AuctionEnded(highestBidder, highestBid);
        tokenContract.rewardTokens(highestBidder, highestBid * 200);

        owner.transfer(address(this).balance);
    }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"ended","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"auctionEnd","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"auctionExpired","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"highestBidder","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"highestBid","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"itemType","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"endAuction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_presaleToken","type":"address"},{"name":"_auctionEnd","type":"uint256"},{"name":"_itemType","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"from","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Bid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"winner","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"AuctionEnded","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000f57600080fd5b6040516060806104a483398101604052808051919060200180519190602001805160008054600160a060020a03338116600160a060020a03199283161790925560018054929097169116179094555050600255600355610430806100746000396000f30060606040526004361061008d5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166312fa6feb811461017a5780632a24f46c146101a157806355a373d6146101c65780636a3f5146146101f557806391f9015714610208578063d57bde791461021b578063f5470d7b1461022e578063fe67a54b14610241575b61009633610256565b156100a057600080fd5b6100a861025e565b156100b257600080fd5b60055434116100c057600080fd5b6005541561010157600454600554600160a060020a039091169080156108fc0290604051600060405180830381858888f19350505050151561010157600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff191633600160a060020a038116919091179091553460058190557fe684a55f31b79eca403df938249029212a5925ec6be8012e099b45bc1019e5d29190604051600160a060020a03909216825260208201526040908101905180910390a1005b341561018557600080fd5b61018d610266565b604051901515815260200160405180910390f35b34156101ac57600080fd5b6101b461026f565b60405190815260200160405180910390f35b34156101d157600080fd5b6101d9610275565b604051600160a060020a03909116815260200160405180910390f35b341561020057600080fd5b61018d61025e565b341561021357600080fd5b6101d9610284565b341561022657600080fd5b6101b4610293565b341561023957600080fd5b6101b4610299565b341561024c57600080fd5b61025461029f565b005b6000903b1190565b600254421190565b60065460ff1681565b60025481565b600154600160a060020a031681565b600454600160a060020a031681565b60055481565b60035481565b60005433600160a060020a039081169116146102ba57600080fd5b6102c261025e565b15156102cd57600080fd5b60065460ff16156102dd57600080fd5b6006805460ff191660011790556004546005547fdaec4582d5d9595688c8c98545fdd1c696d41c6aeaeb636737e84ed2f5c00eda91600160a060020a031690604051600160a060020a03909216825260208201526040908101905180910390a1600154600454600554600160a060020a03928316926381a4af1592169060c8026040517c010000000000000000000000000000000000000000000000000000000063ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b15156103b957600080fd5b5af115156103c657600080fd5b5050600054600160a060020a03908116915030163180156108fc0290604051600060405180830381858888f19350505050151561040257600080fd5b5600a165627a7a7230582070e8bff58b5c0b612102fbe438acbab7bb6a4b55078fe0244cb257cd2b7c25ec00290000000000000000000000008fe19c447821b4cdcdd5012bca1b5469ca96d80d000000000000000000000000000000000000000000000000000000005abce3500000000000000000000000000000000000000000000000000000000000000001

   Swarm Source:
bzzr://70e8bff58b5c0b612102fbe438acbab7bb6a4b55078fe0244cb257cd2b7c25ec

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.