Latest 25 txns From a total of 812 Transactions

TxHash Age From To Value [TxFee]
0x4184631d8218e700e0c0dd16dd3ffbb956b633ce7a124e41fd82fe3c6bb6cc2382 days 42 mins ago0x2efde4863c1920d34dc12dbc06b7f6fb8c77d86f  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe0 Ether0.00015007
0x26a943c39b700f133fb59b684484458583446f700ec3a70818ceb962ed945a9d156 days 16 hrs ago0xe7f63f6a03d78650fd7244ef965b6b35a08c0ef3  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe0.96315 Ether0.0000662253
0x7fb9876178cbeb74cdced2e3cff3823991f94c64162afb84a9115f3e32367803177 days 4 hrs ago0xe1943ebf24b9e633681dad32f685425d265e7b4d  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe0.3356 Ether0.000064089
0xca0b6fd54d10dfc892ce4a0cfc0dca9c631dc5d38c0da3eb405d0ca0d386e3af177 days 4 hrs ago0xe1943ebf24b9e633681dad32f685425d265e7b4d  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe0.3356 Ether0.000064089
0x6c176802d8404e796e44339e53b423e0a5bd1d7bc7ab6aac7e618ae0667473c1177 days 4 hrs ago0xe1943ebf24b9e633681dad32f685425d265e7b4d  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe0.3356 Ether0.000064089
0x9cb23f6560e41e48b37bf82cc78682e62d78ce57e5033f497752dcdf664fddd6177 days 4 hrs ago0xe1943ebf24b9e633681dad32f685425d265e7b4d  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe0.3354 Ether0.000042726
0xac2ef9314eb65e3bf637c96cf547443091e706a8e634c354d90728d93c158e3b186 days 6 hrs ago0xeded4486a65165b5424ce1f253a3fbfa64cc1576  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe1.688 Ether0.000106815
0xee778a3b1e5e7d6582ab8b97c0f9b1314ba194dbb85e899079b001911427247f200 days 13 hrs ago0x5f0cd9985c242f792ba42a87b198b49b6d274dcd  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe0.31835 Ether0.000021363
0x74a85f7a739727d057c2bd892407208c85c43b4a83a213f8feadbcb68268798e201 days 12 hrs ago0xd90386cc94e0167737684860844d0d4eec843091  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe0.30955 Ether0.000021363
0x722781741bf8560cb4fc31691fd09aa4f85b1f225008840e7e7c0a90133f9da9202 days 17 mins ago0x0156e49ad3e989a174d031c593f8f99587728a24  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe1.70475 Ether0.00002584923
0xc73168557b43f90da4237a91dc524380c0321d2b76168bbc6a033513fccaf7cf202 days 21 mins ago0x0156e49ad3e989a174d031c593f8f99587728a24  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe1.70475 Ether0.00002584923
0x1ac7f8609a5686c769eb9aaf636164d160e89f12a527ee6f5cd2b04cdfdf335e202 days 48 mins ago0xa83db3c38122ac9bfcc140a2bc10a916bb396476  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe1.02285 Ether0.000128178
0x1d567fb6a197a53533da58a7cdc18e864149e8990fdd6014cae4a6db4ac9f88b202 days 51 mins ago0xa83db3c38122ac9bfcc140a2bc10a916bb396476  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe1.02285 Ether0.00106815
0x78bf10d9bb8e924213e60af9a9e368786de8b9cd8070304a6c3087fe05da6ff4202 days 1 hr ago0xa83db3c38122ac9bfcc140a2bc10a916bb396476  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe1.02285 Ether0.00042726
0x84279d8a793033af7f0667712646f10c534655e930217c98e37b3aa0860ac8fa202 days 1 hr ago0x71a1416836d1838db113bb715ecd357e46d4d1f0  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe1.70475 Ether0.000085452
0xe43ea848f6bbca2dd09fa40cc516735e6935d318234d59e61c5ab649c95aca30202 days 1 hr ago0x2efde4863c1920d34dc12dbc06b7f6fb8c77d86f  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe0 Ether0.000081561
0xf80aeb378a3adc0a13320bc10ed1c89e9277774a84a27fac5e153a7824027691202 days 1 hr ago0xc0cbd56b3d42cd9117f8f1524ab202b6356c3588  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe1.70125 Ether0.000422084
0x30d983322302766b5a1eabefec2c724827831c22ab1419452d66ea084e703921202 days 2 hrs ago0x7c86fa2d3daea4042c3eec0e92a0f341fa54aa01  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe1.7025 Ether0.000490836
0xe28c74c16e4751709d3e51551d308fc99cebc0700a0f5c84e724373da1446bca202 days 2 hrs ago0x91242abd745e7390c3b12af09f40f559089cdbb1  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe0.6771 Ether0.00185928
0x7b5375c1efeb324c913166e6404582edabfb0c30ab71f66bc7bef580f8c58033202 days 2 hrs ago0x91242abd745e7390c3b12af09f40f559089cdbb1  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe0.6771 Ether0.0092964
0x538742b66e8480a650a33c6beda45b3996637e0900650f849267195509dd0904202 days 2 hrs ago0x91242abd745e7390c3b12af09f40f559089cdbb1  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe0.6771 Ether0.00092964
0x31e23e34cf37b86f9bc28bba6fa18742aa3275ac4cf298904f545f2b448430fb202 days 2 hrs ago0x91242abd745e7390c3b12af09f40f559089cdbb1  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe0.6771 Ether0.00092964
0x2e198865d74f77db5a35e9bc024bfe4ebca81cd2d7af3e8bb516f38fa05470cd202 days 2 hrs ago0x91242abd745e7390c3b12af09f40f559089cdbb1  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe0.6771 Ether0.000107914
0x9cd79fadc2ccadfc539d1218c1cb78f2bc951e1dc3041a5aff64d54fe1d98ccf202 days 2 hrs ago0x7c86fa2d3daea4042c3eec0e92a0f341fa54aa01  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe1.69875 Ether0.0002946438
0x8c495152cab0657bc9ccb471cd8ca2fc9e45cc1453b2033a016cc62649a6054f202 days 2 hrs ago0xc0cbd56b3d42cd9117f8f1524ab202b6356c3588  IN   0x86fb872ff061f7d47d7c8154e6030731695ed1fe1.69875 Ether0.000550836
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click Here To View More View All
ParentTxHash Block Age From To Value
0x4184631d8218e700e0c0dd16dd3ffbb956b633ce7a124e41fd82fe3c6bb6cc23603954782 days 42 mins ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x2efde4863c1920d34dc12dbc06b7f6fb8c77d86f417.77345 Ether
0xf80aeb378a3adc0a13320bc10ed1c89e9277774a84a27fac5e153a78240276915343115202 days 1 hr ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0xc0cbd56b3d42cd9117f8f1524ab202b6356c35880.33925 Ether
0x30d983322302766b5a1eabefec2c724827831c22ab1419452d66ea084e7039215342917202 days 2 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x7c86fa2d3daea4042c3eec0e92a0f341fa54aa010.00125 Ether
0xe28c74c16e4751709d3e51551d308fc99cebc0700a0f5c84e724373da1446bca5342807202 days 2 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x91242abd745e7390c3b12af09f40f559089cdbb10.3369 Ether
0x7b5375c1efeb324c913166e6404582edabfb0c30ab71f66bc7bef580f8c580335342807202 days 2 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x91242abd745e7390c3b12af09f40f559089cdbb10.33695 Ether
0x538742b66e8480a650a33c6beda45b3996637e0900650f849267195509dd09045342807202 days 2 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x91242abd745e7390c3b12af09f40f559089cdbb10.337 Ether
0x31e23e34cf37b86f9bc28bba6fa18742aa3275ac4cf298904f545f2b448430fb5342807202 days 2 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x91242abd745e7390c3b12af09f40f559089cdbb10.33705 Ether
0x2e198865d74f77db5a35e9bc024bfe4ebca81cd2d7af3e8bb516f38fa05470cd5342806202 days 2 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x91242abd745e7390c3b12af09f40f559089cdbb10.3371 Ether
0x8c495152cab0657bc9ccb471cd8ca2fc9e45cc1453b2033a016cc62649a6054f5342736202 days 2 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0xc0cbd56b3d42cd9117f8f1524ab202b6356c35880.00125 Ether
0xf8db0805aba3fa2265fb55f1cf3f054ff911ad0d3b4a1aa07458fd38e702bb0c5342612202 days 3 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x9ecf59234351a4557e62178b07ef83f98d6e86520.00075 Ether
0x003488d9cfdd8ce3d4180ede31ad9811d8fa8bf288034505d0a5c973796ed5625342475202 days 3 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0xbf6bbc7326f9555d8c56a449160cb9f18a3a4d870.0005 Ether
0x5a8e9cce96889c716b31d084c1a95f2503c03265c618b492d4fb2e88d3bb38f55342337202 days 4 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x34df9ce7995776ea457d3cce536be492d6589cb00.00025 Ether
0x9e1655bed3af10b042e688ef62889e2eab4e7e215c3e9cdd12ce60822811d71e5342201202 days 5 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0xeded4486a65165b5424ce1f253a3fbfa64cc15760.332 Ether
0x91bc0646568042812768e8d1b997180c59c4acf1e6043b7b4d321d77c0d4a3815341906202 days 6 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0xcd0c45cea9956b424daee38f33ae1e6cfdb552230.00075 Ether
0xbed2e328f92e02fc60c6e60ceb157a2fbcf7bc3cfeb09e3f61859d9719fe83615341594202 days 7 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x91242abd745e7390c3b12af09f40f559089cdbb10.3383 Ether
0x78e0abf24f2877f818eeba96082c6405260ce5fe0b1452801c4884d61d2ed5955341594202 days 7 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x91242abd745e7390c3b12af09f40f559089cdbb10.33825 Ether
0xc26ec10fa6df2ac089218774b334dc6d58782a0b43a28608717f22f761106c6e5341593202 days 7 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x91242abd745e7390c3b12af09f40f559089cdbb10.3383 Ether
0xc73ddd1220a6fb42d26a26680eaca0f3bec0ed3ff0d4a8a472132b3ad4eae9925341593202 days 7 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x91242abd745e7390c3b12af09f40f559089cdbb10.33835 Ether
0x9d85564c02bdf6f4f93eb9ab8e2414576d80a0fb8ff5dc6947dc2196e9f439575341593202 days 7 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x91242abd745e7390c3b12af09f40f559089cdbb10.3384 Ether
0x27ed574acab378ad0edbc34afe38e3cafdbceb5f047528f7acbbbe479d060fca5341593202 days 7 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x91242abd745e7390c3b12af09f40f559089cdbb10.33845 Ether
0x079de4acadc1c26c29b85eb9a637df8dadc2ac0dfdbc64ed3c8ffd1f42463a615341592202 days 7 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x91242abd745e7390c3b12af09f40f559089cdbb10.3383 Ether
0x57cdadab8f75e7f104aa8853041cf9e2ff2a774c48af043ea0f85e1bd20250e45341591202 days 7 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x91242abd745e7390c3b12af09f40f559089cdbb10.33835 Ether
0xbbe627d68f11e891d5d4c7c4f78aafd7e9356db6bdab8d217f428c2ceeca7d945341391202 days 8 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0xceb664b6080d29ac48400780de384f5189f82c920.00075 Ether
0x735a3d23e6ad084a7f05871dc4a7d185ff0b49e146c8c3a887b8aa27a240edac5340600202 days 11 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0xe1943ebf24b9e633681dad32f685425d265e7b4d0.00025 Ether
0x205c8adacb5ddc5e75efdff89e8e23db9a2f033d528fec91c49c9bce4d88aade5340533202 days 12 hrs ago0x86fb872ff061f7d47d7c8154e6030731695ed1fe0x6f9f85c4e21b54592a8c746e2d20afbc4a40c0a70.0005 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 (Exact Match)
Contract Name: ETCharPresale
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 ETCharPresale is PresaleContract {
    using SafeMath for uint;

    bool public enabled = true;
    uint32 public maxCharId = 300;
    uint32 public currentCharId = 1;

    uint256 public currentPrice = 0.1 ether;

    mapping (uint32 => address) public owners;
    mapping (address => uint32[]) public characters;

    event Purchase(address from, uint32 charId, uint256 amount);

    function ETCharPresale(address _presaleToken)
        PresaleContract(_presaleToken)
        public
    {
    }

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

    function _provideChars(address _address, uint32 _number) internal {

        for (uint32 i = 0; i < _number; i++) {
            owners[currentCharId + i] = _address;
            characters[_address].push(currentCharId + i);
            emit Purchase(_address, currentCharId + i, currentPrice);
        }

        currentCharId += _number;
        currentPrice += priceIncrease() * _number;
    }

    function priceIncrease() public view returns (uint256) {
        uint256 _currentPrice = currentPrice;

        if (_currentPrice > 0.3 ether) {
            return 0.05 finney;
        } else if (_currentPrice > 0.25 ether) {
            return 0.1 finney;
        } else if (_currentPrice > 0.2 ether) {
            return 0.2 finney;
        } else if (_currentPrice > 0.15 ether) {
            return 0.4 finney;
        } else {
            return 0.8 finney;
        }
    }

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

        require(msg.value >= currentPrice);

        uint32 chars = uint32(msg.value.div(currentPrice));

        require(chars <= 50);

        if (chars > 5) {
            chars = 5;
        }

        require(currentCharId + chars - 1 <= maxCharId);

        uint256 purchaseValue = currentPrice.mul(chars);
        uint256 change = msg.value.sub(purchaseValue);

        _provideChars(msg.sender, chars);

        tokenContract.rewardTokens(msg.sender, purchaseValue * 200);

        if (currentCharId > maxCharId) {
            enabled = false;
        }

        if (change > 0) {
            msg.sender.transfer(change);
        }
    }

    function setEnabled(bool _enabled) public onlyOwner {
        enabled = _enabled;
    }

    function setMaxCharId(uint32 _maxCharId) public onlyOwner {
        maxCharId = _maxCharId;
    }

    function setCurrentPrice(uint256 _currentPrice) public onlyOwner {
        currentPrice = _currentPrice;
    }

    function withdraw() public onlyOwner {
        owner.transfer(address(this).balance);
    }

    function charactersOf(address _user) public view returns (uint32[]) {
        return characters[_user];
    }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"maxCharId","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint32"}],"name":"owners","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_currentPrice","type":"uint256"}],"name":"setCurrentPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"enabled","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_enabled","type":"bool"}],"name":"setEnabled","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_maxCharId","type":"uint32"}],"name":"setMaxCharId","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tokenContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"currentPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_user","type":"address"}],"name":"charactersOf","outputs":[{"name":"","type":"uint32[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"uint256"}],"name":"characters","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"currentCharId","outputs":[{"name":"","type":"uint32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"priceIncrease","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_presaleToken","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"from","type":"address"},{"indexed":false,"name":"charId","type":"uint32"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Purchase","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052600180547901000000000000000000000000000000000000000000000000007401000000000000000000000000000000000000000060a060020a60ff02199092169190911760a860020a63ffffffff02191676012c0000000000000000000000000000000000000000001760c860020a63ffffffff02191617905567016345785d8a0000600255341561009657600080fd5b604051602080610b6b8339810160405280805160008054600160a060020a03338116600160a060020a031992831617909255600180549290931691161790555050610a85806100e66000396000f3006060604052600436106100c45763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630558171d81146102cb578063180dc318146102f757806318b200711461032f578063238dafe014610347578063328d8f721461036e5780633c7097a3146103865780633ccfd60b146103a257806355a373d6146103b55780639d1b464a146103c8578063a0a76eb0146103ed578063b1c8ffd11461045f578063dced2f1a14610481578063f8c3405014610494575b6000806000600160149054906101000a900460ff1615156100e457600080fd5b6100ed336104a7565b156100f757600080fd5b60025434101561010657600080fd5b60025461011a90349063ffffffff6104af16565b9250603263ffffffff8416111561013057600080fd5b60058363ffffffff16111561014457600592505b6001547501000000000000000000000000000000000000000000810463ffffffff90811660c860020a909204811685016000190116111561018457600080fd5b60025461019a9063ffffffff808616906104cb16565b91506101ac348363ffffffff6104fd16565b90506101b8338461050f565b600154600160a060020a03166381a4af153360c885026040517c010000000000000000000000000000000000000000000000000000000063ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561022a57600080fd5b5af1151561023757600080fd5b505060015463ffffffff75010000000000000000000000000000000000000000008204811660c860020a909204161115905061028c576001805474ff0000000000000000000000000000000000000000191690555b60008111156102c657600160a060020a03331681156108fc0282604051600060405180830381858888f1935050505015156102c657600080fd5b505050005b34156102d657600080fd5b6102de6106ad565b60405163ffffffff909116815260200160405180910390f35b341561030257600080fd5b61031363ffffffff600435166106d2565b604051600160a060020a03909116815260200160405180910390f35b341561033a57600080fd5b6103456004356106ed565b005b341561035257600080fd5b61035a61070d565b604051901515815260200160405180910390f35b341561037957600080fd5b610345600435151561072e565b341561039157600080fd5b61034563ffffffff60043516610789565b34156103ad57600080fd5b6103456107ee565b34156103c057600080fd5b610313610844565b34156103d357600080fd5b6103db610853565b60405190815260200160405180910390f35b34156103f857600080fd5b61040c600160a060020a0360043516610859565b60405160208082528190810183818151815260200191508051906020019060200280838360005b8381101561044b578082015183820152602001610433565b505050509050019250505060405180910390f35b341561046a57600080fd5b6102de600160a060020a0360043516602435610908565b341561048c57600080fd5b6102de610950565b341561049f57600080fd5b6103db610963565b6000903b1190565b60008082848115156104bd57fe5b0490508091505b5092915050565b6000808315156104de57600091506104c4565b508282028284828115156104ee57fe5b04146104f657fe5b9392505050565b60008282111561050957fe5b50900390565b60005b8163ffffffff168163ffffffff161015610650576001805460c860020a900463ffffffff9081168301166000908152600360209081526040808320805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03891690811790915583526004909152902080549091810161058f83826109f1565b916000526020600020906008918282040191900660040283600160199054906101000a900463ffffffff1601909190916101000a81548163ffffffff021916908363ffffffff160217905550507f4c029ee41a1d640ba5061f322b09a545f4926fa4337e418b63eca082ee3b5e318382600160199054906101000a900463ffffffff1601600254604051600160a060020a03909316835263ffffffff90911660208301526040808301919091526060909101905180910390a1600101610512565b6001805463ffffffff60c860020a808304821686018216027fffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffffff90921691909117909155821661069d610963565b6002805491909202019055505050565b6001547501000000000000000000000000000000000000000000900463ffffffff1681565b600360205260009081526040902054600160a060020a031681565b60005433600160a060020a0390811691161461070857600080fd5b600255565b60015474010000000000000000000000000000000000000000900460ff1681565b60005433600160a060020a0390811691161461074957600080fd5b60018054911515740100000000000000000000000000000000000000000274ff000000000000000000000000000000000000000019909216919091179055565b60005433600160a060020a039081169116146107a457600080fd5b6001805463ffffffff90921675010000000000000000000000000000000000000000000278ffffffff00000000000000000000000000000000000000000019909216919091179055565b60005433600160a060020a0390811691161461080957600080fd5b600054600160a060020a039081169030163180156108fc0290604051600060405180830381858888f19350505050151561084257600080fd5b565b600154600160a060020a031681565b60025481565b610861610a2a565b6004600083600160a060020a0316600160a060020a031681526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156108fc57602002820191906000526020600020906000905b82829054906101000a900463ffffffff1663ffffffff16815260200190600401906020826003010492830192600103820291508084116108bf5790505b50505050509050919050565b60046020528160005260406000208181548110151561092357fe5b9060005260206000209060089182820401919006600402915091509054906101000a900463ffffffff1681565b60015460c860020a900463ffffffff1681565b600254600090670429d069189e000081111561098757652d79883d200091506109ed565b6703782dace9d900008111156109a557655af3107a400091506109ed565b6702c68af0bb1400008111156109c35765b5e620f4800091506109ed565b670214e8348c4f00008111156109e25766016bcc41e9000091506109ed565b6602d79883d2000091505b5090565b815481835581811511610a25576007016008900481600701600890048360005260206000209182019101610a259190610a3c565b505050565b60206040519081016040526000815290565b610a5691905b808211156109ed5760008155600101610a42565b905600a165627a7a723058205ed450c53f7bc3fa014412d47e43a4a2cce52aef97411ee29780b3341403958c00290000000000000000000000008fe19c447821b4cdcdd5012bca1b5469ca96d80d

    Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008fe19c447821b4cdcdd5012bca1b5469ca96d80d

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000008fe19c447821b4cdcdd5012bca1b5469ca96d80d


   Swarm Source:
bzzr://5ed450c53f7bc3fa014412d47e43a4a2cce52aef97411ee29780b3341403958c

 

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.