Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 1 txn
Token Tracker: TRILLION CLOUD GOLD (TCGC)
Misc:
Address Watch: Add To Watch List
Contract Creator: 0x343123254576560466c3dadd5d855367f8826e68at txn 0xf7211295379fd48b6651a98fc923a9cbf8e8067a44c7120fe22d9064452db68f
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Contract Name: TCGC
Compiler Text: v0.4.11+commit.68ef5810
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.11;

library SafeMath {
  function mul(uint256 a, uint256 b) internal constant returns (uint256) {
    uint256 c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal constant 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 constant returns (uint256) {
    assert(b <= a);
    return a - b;
  }

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

contract ERC20Basic {
  uint256 public totalSupply;
  function balanceOf(address who) constant returns (uint256);
  function transfer(address to, uint256 value) returns (bool);
//   event Transfer(address indexed _from, address indexed _to, uint _value);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

contract BasicToken is ERC20Basic {
  using SafeMath for uint256;

  mapping(address => uint256) balances;

  /**
  * @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) returns (bool) {
    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    Transfer(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) constant returns (uint256 balance) {
    return balances[_owner];
  }

}

contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) constant returns (uint256);
  function transferFrom(address from, address to, uint256 value) returns (bool);
  function approve(address spender, uint256 value) returns (bool);
  
  // KYBER-NOTE! code changed to comply with ERC20 standard
  event Approval(address indexed _owner, address indexed _spender, uint _value);
  //event Approval(address indexed owner, address indexed spender, uint256 value);
}

contract StandardToken is ERC20, BasicToken {

  mapping (address => mapping (address => uint256)) 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 amout of tokens to be transfered
   */
  function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
    var _allowance = allowed[_from][msg.sender];

    // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
    // require (_value <= _allowance);

    // KYBER-NOTE! code changed to comply with ERC20 standard
    balances[_from] = balances[_from].sub(_value);
    balances[_to] = balances[_to].add(_value);
    //balances[_from] = balances[_from].sub(_value); // this was removed
    allowed[_from][msg.sender] = _allowance.sub(_value);
    Transfer(_from, _to, _value);
    return true;
  }

  /**
   * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender.
   * @param _spender The address which will spend the funds.
   * @param _value The amount of tokens to be spent.
   */
  function approve(address _spender, uint256 _value) returns (bool) {

    // To change the approve amount you first have to reduce the addresses`
    //  allowance to zero by calling `approve(_spender, 0)` if it is not
    //  already 0 to mitigate the race condition described here:
    //  https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
    require((_value == 0) || (allowed[msg.sender][_spender] == 0));

    allowed[msg.sender][_spender] = _value;
    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 specifing the amount of tokens still avaible for the spender.
   */
  function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
    return allowed[_owner][_spender];
  }

}

contract TCGC is StandardToken {
    string public constant name = "TRILLION CLOUD GOLD";
    string public constant symbol = "TCGC";
    uint public constant decimals = 18;
    uint public freezeTime = now + 1 years;
    address public owner;
    mapping(address=>bool) public freezeList;
    
    uint public freezeSupply;
    uint public distributeSupply;
    uint public distributed;
    
    uint public exchangeSupply;
    uint public exchanged;
    
    uint public price ;
    uint public mintTimes;
    
    event DoMint(uint256 n,uint256 number);
    event Burn(address from, uint256 value);
    
    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }
    
    function TCGC(address _owner){
        owner = _owner;
        price =700; 
        totalSupply=17*(10**7)*10**decimals; 
        freezeSupply = totalSupply/2;
        distributeSupply = totalSupply*2/5;
        exchangeSupply = totalSupply/10;
        balances[owner] = totalSupply; 
        Transfer(address(0x0), owner, totalSupply);
    }
    
    modifier validUser(address addr){
        require(!freezeList[addr]);
        _;
    }
    
    function addFreeze(address addr) onlyOwner returns(bool){
        require(!freezeList[addr]);
        freezeList[addr] =true;
        return true;
    }
    
    function unFreeze(address addr) onlyOwner returns(bool){
        require(freezeList[addr]);
        delete freezeList[addr];
        return true;
    }
    
    //setPrice
    function setPrice(uint _price) onlyOwner{
        require( _price > 0);
        price= _price;
    }
    
    function transfer(address _to, uint _value) validUser(msg.sender) returns (bool){
        if(msg.sender == owner && now < freezeTime){
            require(balances[owner] >_value && balances[owner] - _value >= freezeSupply);
            require (distributed + _value <= distributeSupply);
            distributed = distributed.add(_value);
            super.transfer(_to,_value);
        }else{
            super.transfer(_to,_value);
        }
    }
    
    //add num tokens which means that totalSupply will be added by num*decimals
    function mint(uint256 num) onlyOwner{
        balances[owner] = balances[owner].add(num);
        totalSupply = totalSupply.add(num);
        //add distributeSupply
        distributeSupply = distributeSupply.add(num);
        Transfer( address(0x0),msg.sender, num);
        DoMint(mintTimes++,num);
    }
    
    //burn tokens at will
    function burn(uint256 _value) public returns (bool success) {
        require(balances[msg.sender] >= _value); 
        balances[msg.sender] = balances[msg.sender].sub(_value);
        totalSupply = totalSupply.sub(_value);
        Transfer(msg.sender, address(0x0), _value);
        Burn(msg.sender, _value);
        return true;
    }

    //send eth to get tokens
    function() payable {
        uint tokens = price.mul(msg.value);
        require(tokens  <= balances[owner] && exchanged+tokens <= exchangeSupply);
        balances[owner] = balances[owner].sub(tokens);
        balances[msg.sender] = balances[msg.sender].add(tokens);
        exchanged =  exchanged.add(tokens);
        owner.transfer(msg.value);
        Transfer(owner, msg.sender, tokens);
    }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"addFreeze","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"burn","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"distributeSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"exchanged","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"mintTimes","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"freezeSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"unFreeze","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_price","type":"uint256"}],"name":"setPrice","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"exchangeSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"price","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"num","type":"uint256"}],"name":"mint","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"freezeList","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"distributed","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"freezeTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[{"name":"_owner","type":"address"}],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"n","type":"uint256"},{"indexed":false,"name":"number","type":"uint256"}],"name":"DoMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052426301e1338001600355341561001657fe5b60405160208061102583398101604052515b60048054600160a060020a031916600160a060020a0383161790556102bc600b556a8c9ee6775415ccea00000060008190556002905b046006556000546005906002025b04600755600054600a905b046009556000805460048054600160a060020a0390811684526001602090815260408086208590559254835194855292519290911693927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35b505b610f3a806100eb6000396000f3006060604052361561013b5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610290578063095ea7b3146103205780630e25b6201461035357806318160ddd1461038357806323b872dd146103a5578063313ce567146103de57806342966c68146104005780635486dfb31461042757806370a08231146104495780637182774d14610477578063755cc41e146104995780637ec2402f146104bb57806383cfab42146104dd5780638da5cb5b1461050d57806391b7f5ed1461053957806391c8e3361461054e57806395d89b4114610570578063a035b1fe14610600578063a0712d6814610622578063a9059cbb14610637578063c657852c1461066a578063dd62ed3e1461069a578063f84b903e146106ce578063fd7e1bee146106f0575b61028e5b600b54600090610155903463ffffffff61071216565b600454600160a060020a03166000908152600160205260409020549091508111801590610188575060095481600a540111155b15156101945760006000fd5b600454600160a060020a03166000908152600160205260409020546101bf908263ffffffff61074116565b600454600160a060020a039081166000908152600160205260408082209390935533909116815220546101f8908263ffffffff61075816565b600160a060020a033316600090815260016020526040902055600a54610224908263ffffffff61075816565b600a55600454604051600160a060020a03909116903480156108fc02916000818181858888f19350505050151561025757fe5b600454604080518381529051600160a060020a03338116931691600080516020610eef833981519152919081900360200190a35b50565b005b341561029857fe5b6102a0610772565b6040805160208082528351818301528351919283929083019185019080838382156102e6575b8051825260208311156102e657601f1990920191602091820191016102c6565b505050905090810190601f1680156103125780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561032857fe5b61033f600160a060020a03600435166024356107a9565b604080519115158252519081900360200190f35b341561035b57fe5b61033f600160a060020a036004351661084e565b604080519115158252519081900360200190f35b341561038b57fe5b6103936108c2565b60408051918252519081900360200190f35b34156103ad57fe5b61033f600160a060020a03600435811690602435166044356108c8565b604080519115158252519081900360200190f35b34156103e657fe5b6103936109c8565b60408051918252519081900360200190f35b341561040857fe5b61033f6004356109cd565b604080519115158252519081900360200190f35b341561042f57fe5b610393610ac9565b60408051918252519081900360200190f35b341561045157fe5b610393600160a060020a0360043516610acf565b60408051918252519081900360200190f35b341561047f57fe5b610393610aee565b60408051918252519081900360200190f35b34156104a157fe5b610393610af4565b60408051918252519081900360200190f35b34156104c357fe5b610393610afa565b60408051918252519081900360200190f35b34156104e557fe5b61033f600160a060020a0360043516610b00565b604080519115158252519081900360200190f35b341561051557fe5b61051d610b71565b60408051600160a060020a039092168252519081900360200190f35b341561054157fe5b61028e600435610b80565b005b341561055657fe5b610393610bb4565b60408051918252519081900360200190f35b341561057857fe5b6102a0610bba565b6040805160208082528351818301528351919283929083019185019080838382156102e6575b8051825260208311156102e657601f1990920191602091820191016102c6565b505050905090810190601f1680156103125780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561060857fe5b610393610bf1565b60408051918252519081900360200190f35b341561062a57fe5b61028e600435610bf7565b005b341561063f57fe5b61033f600160a060020a0360043516602435610cff565b604080519115158252519081900360200190f35b341561067257fe5b61033f600160a060020a0360043516610df2565b604080519115158252519081900360200190f35b34156106a257fe5b610393600160a060020a0360043581169060243516610e07565b60408051918252519081900360200190f35b34156106d657fe5b610393610e34565b60408051918252519081900360200190f35b34156106f857fe5b610393610e3a565b60408051918252519081900360200190f35b600082820283158061072e575082848281151561072b57fe5b04145b151561073657fe5b8091505b5092915050565b60008282111561074d57fe5b508082035b92915050565b60008282018381101561073657fe5b8091505b5092915050565b60408051808201909152601381527f5452494c4c494f4e20434c4f554420474f4c4400000000000000000000000000602082015281565b60008115806107db5750600160a060020a03338116600090815260026020908152604080832093871683529290522054155b15156107e75760006000fd5b600160a060020a03338116600081815260026020908152604080832094881680845294825291829020869055815186815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a35060015b92915050565b60045460009033600160a060020a0390811691161461086d5760006000fd5b600160a060020a03821660009081526005602052604090205460ff16156108945760006000fd5b50600160a060020a0381166000908152600560205260409020805460ff191660019081179091555b5b919050565b60005481565b600160a060020a03808416600081815260026020908152604080832033909516835293815283822054928252600190529182205461090c908463ffffffff61074116565b600160a060020a038087166000908152600160205260408082209390935590861681522054610941908463ffffffff61075816565b600160a060020a03851660009081526001602052604090205561096a818463ffffffff61074116565b600160a060020a03808716600081815260026020908152604080832033861684528252918290209490945580518781529051928816939192600080516020610eef833981519152929181900390910190a3600191505b509392505050565b601281565b600160a060020a033316600090815260016020526040812054829010156109f45760006000fd5b600160a060020a033316600090815260016020526040902054610a1d908363ffffffff61074116565b600160a060020a03331660009081526001602052604081209190915554610a4a908363ffffffff61074116565b600090815560408051848152905133600160a060020a031691600080516020610eef833981519152919081900360200190a360408051600160a060020a03331681526020810184905281517fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5929181900390910190a15060015b919050565b60075481565b600160a060020a0381166000908152600160205260409020545b919050565b600a5481565b600c5481565b60065481565b60045460009033600160a060020a03908116911614610b1f5760006000fd5b600160a060020a03821660009081526005602052604090205460ff161515610b475760006000fd5b50600160a060020a0381166000908152600560205260409020805460ff1916905560015b5b919050565b600454600160a060020a031681565b60045433600160a060020a03908116911614610b9c5760006000fd5b60008111610baa5760006000fd5b600b8190555b5b50565b60095481565b60408051808201909152600481527f5443474300000000000000000000000000000000000000000000000000000000602082015281565b600b5481565b60045433600160a060020a03908116911614610c135760006000fd5b600454600160a060020a0316600090815260016020526040902054610c3e908263ffffffff61075816565b600454600160a060020a031660009081526001602052604081209190915554610c6d908263ffffffff61075816565b600055600754610c83908263ffffffff61075816565b600755604080518281529051600160a060020a03331691600091600080516020610eef8339815191529181900360200190a3600c805460018101909155604080519182526020820183905280517fdc35338cdc82e89ab46418c25f4af7b8e649ae6264a635ee185f5d55f588da3c9281900390910190a15b5b50565b33600160a060020a03811660009081526005602052604081205490919060ff1615610d2a5760006000fd5b60045433600160a060020a039081169116148015610d49575060035442105b15610ddd57600454600160a060020a03166000908152600160205260409020548390118015610d975750600654600454600160a060020a031660009081526001602052604090205484900310155b1515610da35760006000fd5b60075460085484011115610db75760006000fd5b600854610dca908463ffffffff61075816565b600855610dd78484610e40565b5061073a565b610de78484610e40565b505b5b5b5092915050565b60056020526000908152604090205460ff1681565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b60085481565b60035481565b600160a060020a033316600090815260016020526040812054610e69908363ffffffff61074116565b600160a060020a033381166000908152600160205260408082209390935590851681522054610e9e908363ffffffff61075816565b600160a060020a03808516600081815260016020908152604091829020949094558051868152905191933390931692600080516020610eef83398151915292918290030190a35060015b929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058208a294198a445f77681163cf7467a300395046ef99994d235c2a638161b87339f00290000000000000000000000004da783c40a4eeaff9dd0540301f4604d8435b02a

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

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000004da783c40a4eeaff9dd0540301f4604d8435b02a


   Swarm Source:
bzzr://8a294198a445f77681163cf7467a300395046ef99994d235c2a638161b87339f

 

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.