all files / contracts/Entity/ Token.sol

100% Statements 6/6
100% Branches 0/0
100% Functions 1/1
100% Lines 0/0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54                                                                                                           
/*
 
 * @name        Token Contract
 * @package     BlockBitsIO
 * @author      Micky Socaci <micky@nowlive.ro>
 
 Zeppelin ERC20 Standard Token
 
*/
 
pragma solidity ^0.4.17;
 
import "../zeppelin/token/StandardToken.sol";
 
contract Token is StandardToken {
    string public  symbol;
    string public  name;
    uint8 public   decimals;
    uint256 public totalSupply;
    string public  version = 'v1';
 
    event TransferAndCall(address indexed from, address indexed to, uint256 value, bytes data);
 
    function Token(
        uint256 _initialAmount,
        string _tokenName,
        uint8 _decimalUnits,
        string _tokenSymbol,
        string _version
    )
    public
    {
        decimals = _decimalUnits;                               // Amount of decimals for display purposes
        totalSupply = _initialAmount;                           // Update total supply
        balances[msg.sender] = totalSupply;                     // Give the creator all initial tokens
        name = _tokenName;                                      // Set the name for display purposes
        symbol = _tokenSymbol;                                  // Set the symbol for display purposes
        version = _version;                                     // Set token version string
    }
 
    /*
    function transferAndCall(address receiver, uint256 amount) public returns (bool success) {
        if(transfer(receiver, amount)) {
            if(receiver.call(bytes4(bytes32(keccak256("tokenCallback(address,uint256)"))), msg.sender, amount)) {
                return true;
            } else {
                revert();
            }
        } else {
            revert();
        }
    }
    */
}