ETH Price: $3,272.18 (+0.85%)

Token

TPC Token (TPC)
 

Overview

Max Total Supply

10,000,000,000 TPC

Holders

918

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
39,375 TPC

Value
$0.00
0xe3fe8397af4fc99e64bd1f3c731094508baed5ad
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
TPCToken

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-06-21
*/

pragma solidity ^0.4.24;

/*********************************************************************************
 *********************************************************************************
 *
 * Token Name: TPC Token
 * Contract Name: Third Payment Circulation
 * Author: kolidat#gmail.com
 * Developed for: TPC LLC.
 * TPC is an ERC20 Token
 *
 *********************************************************************************
 ********************************************************************************/
 
contract ERC20 {
    function totalSupply() public view returns (uint supply);
    function balanceOf(address who) public view returns (uint value);
    function allowance(address owner, address spender ) public view returns (uint _allowance);

    function transfer(address to, uint value) public returns (bool ok);
    function transferFrom(address from, address to, uint value) public returns (bool ok);
    function approve(address spender, uint value ) public returns (bool ok);

    event Transfer( address indexed from, address indexed to, uint value);
    event Approval( address indexed owner, address indexed spender, uint value);
}

contract Lockable {
    bool public tokenTransfer;
    address public owner;
    mapping( address => bool ) public unlockaddress;
    mapping( address => bool ) public lockaddress;

    event Locked(address lockaddress, bool status);
    event Unlocked(address unlockedaddress, bool status);

    // if Token transfer
    modifier isTokenTransfer {
        // if token transfer is not allow
        if(!tokenTransfer) {
            require(unlockaddress[msg.sender]);
        }
        _;
    }

    // This modifier check whether the contract should be in a locked
    // or unlocked state, then acts and updates accordingly if
    // necessary
    modifier checkLock {
        if (lockaddress[msg.sender]) {
            revert();
        }
        _;
    }

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

    constructor () public {
        tokenTransfer = false;
        owner = msg.sender;
    }

    // Lock Address
    function lockAddress(address target, bool status)
    external
    isOwner
    {
        require(owner != target);
        lockaddress[target] = status;
        emit Locked(target, status);
    }

    // UnLock Address
    function unlockAddress(address target, bool status)
    external
    isOwner
    {
        unlockaddress[target] = status;
        emit Unlocked(target, status);
    }
}

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

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

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

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

    function max64(uint64 a, uint64 b) internal pure returns (uint64) {
        return a >= b ? a : b;
    }

    function min64(uint64 a, uint64 b) internal pure returns (uint64) {
        return a < b ? a : b;
    }

    function max256(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    function min256(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }
}

contract TPCToken is ERC20, Lockable {
    using SafeMath for uint;

    mapping( address => uint ) _balances;
    mapping( address => mapping( address => uint ) ) _approvals;
    uint _supply;
    string public constant name = "TPC Token";
    string public constant symbol = "TPC";
    uint8 public constant decimals = 18;  // 18 decimal places, the same as ETH.

    event TokenBurned(address burnAddress, uint amountOfTokens);
    event TokenTransfer();

    constructor () public {
        uint initial_balance = 2 * 10 ** 28; // Total supply is 20 billions TPC Tokens
        _balances[msg.sender] = initial_balance;
        _supply = initial_balance;
    }

    function totalSupply() view public returns (uint supply) {
        return _supply;
    }

    function balanceOf(address who) view public returns (uint value) {
        return _balances[who];
    }

    function allowance(address owner, address spender) view public returns (uint _allowance) {
        return _approvals[owner][spender];
    }

    function transfer(address to, uint value) public 
    isTokenTransfer
    checkLock
    returns (bool success) {
        require(_balances[msg.sender] >= value);
        _balances[msg.sender] = _balances[msg.sender].sub(value);
        _balances[to] = _balances[to].add(value);
        emit Transfer(msg.sender, to, value);
        return true;
    }

    function transferFrom(address from, address to, uint value) public 
    isTokenTransfer
    checkLock
    returns (bool success) {
        // if you don't have enough balance, throw
        require(_balances[from] >= value);
        // if you don't have approval, throw
        require(_approvals[from][msg.sender] >= value);
        // transfer and return true
        _approvals[from][msg.sender] = _approvals[from][msg.sender].sub(value);
        _balances[from] = _balances[from].sub(value);
        _balances[to] = _balances[to].add(value);
        emit Transfer(from, to, value);
        return true;
    }

    function approve(address spender, uint value) public 
    isTokenTransfer
    checkLock
    returns (bool success) {
        _approvals[msg.sender][spender] = value;
        emit Approval(msg.sender, spender, value);
        return true;
    }

    // burnToken burn tokensAmount for sender balance
    function burnTokens(uint tokensAmount)
    isTokenTransfer
    external
    {
        require(_balances[msg.sender] >= tokensAmount);
        _balances[msg.sender] = _balances[msg.sender].sub(tokensAmount);
        _supply = _supply.sub(tokensAmount);
        emit TokenBurned(msg.sender, tokensAmount);
    }

    function enableTokenTransfer()
    external
    isOwner {
        tokenTransfer = true;
        emit TokenTransfer();
    }

    function disableTokenTransfer()
    external
    isOwner {
        tokenTransfer = false;
        emit TokenTransfer();
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"supply","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"enableTokenTransfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"target","type":"address"},{"name":"status","type":"bool"}],"name":"unlockAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tokenTransfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tokensAmount","type":"uint256"}],"name":"burnTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"balanceOf","outputs":[{"name":"value","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"lockaddress","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"_allowance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"disableTokenTransfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"unlockaddress","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"target","type":"address"},{"name":"status","type":"bool"}],"name":"lockAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"burnAddress","type":"address"},{"indexed":false,"name":"amountOfTokens","type":"uint256"}],"name":"TokenBurned","type":"event"},{"anonymous":false,"inputs":[],"name":"TokenTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"lockaddress","type":"address"},{"indexed":false,"name":"status","type":"bool"}],"name":"Locked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"unlockedaddress","type":"address"},{"indexed":false,"name":"status","type":"bool"}],"name":"Unlocked","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"},{"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"}]

608060405234801561001057600080fd5b5060008054336101008102600160a860020a031990921691909117825581526003602052604090206b409f9cbc7c4a04c22000000090819055600555610b278061005b6000396000f3006080604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610100578063095ea7b31461018a57806318160ddd146101c257806323b872dd146101e9578063313ce567146102135780633a7644621461023e57806360805e5a146102555780636c4eca271461027b5780636d1b229d1461029057806370a08231146102a85780638da5cb5b146102c957806395d89b41146102fa578063a9059cbb1461030f578063cb7bba3914610333578063dd62ed3e14610354578063e2a9ca4c1461037b578063ec4a79cf14610390578063f2260031146103b1575b600080fd5b34801561010c57600080fd5b506101156103d7565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014f578181015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019657600080fd5b506101ae600160a060020a036004351660243561040e565b604080519115158252519081900360200190f35b3480156101ce57600080fd5b506101d76104bd565b60408051918252519081900360200190f35b3480156101f557600080fd5b506101ae600160a060020a03600435811690602435166044356104c3565b34801561021f57600080fd5b5061022861066b565b6040805160ff9092168252519081900360200190f35b34801561024a57600080fd5b50610253610670565b005b34801561026157600080fd5b50610253600160a060020a036004351660243515156106c2565b34801561028757600080fd5b506101ae610742565b34801561029c57600080fd5b5061025360043561074b565b3480156102b457600080fd5b506101d7600160a060020a0360043516610815565b3480156102d557600080fd5b506102de610830565b60408051600160a060020a039092168252519081900360200190f35b34801561030657600080fd5b50610115610844565b34801561031b57600080fd5b506101ae600160a060020a036004351660243561087b565b34801561033f57600080fd5b506101ae600160a060020a036004351661098f565b34801561036057600080fd5b506101d7600160a060020a03600435811690602435166109a4565b34801561038757600080fd5b506102536109cf565b34801561039c57600080fd5b506101ae600160a060020a0360043516610a1e565b3480156103bd57600080fd5b50610253600160a060020a03600435166024351515610a33565b60408051808201909152600981527f54504320546f6b656e0000000000000000000000000000000000000000000000602082015281565b6000805460ff161515610439573360009081526001602052604090205460ff16151561043957600080fd5b3360009081526002602052604090205460ff161561045657600080fd5b336000818152600460209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60055490565b6000805460ff1615156104ee573360009081526001602052604090205460ff1615156104ee57600080fd5b3360009081526002602052604090205460ff161561050b57600080fd5b600160a060020a03841660009081526003602052604090205482111561053057600080fd5b600160a060020a038416600090815260046020908152604080832033845290915290205482111561056057600080fd5b600160a060020a0384166000908152600460209081526040808320338452909152902054610594908363ffffffff610ad316565b600160a060020a0385166000818152600460209081526040808320338452825280832094909455918152600390915220546105d5908363ffffffff610ad316565b600160a060020a03808616600090815260036020526040808220939093559085168152205461060a908363ffffffff610ae516565b600160a060020a0380851660008181526003602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b601281565b6000546101009004600160a060020a0316331461068c57600080fd5b6000805460ff191660011781556040517feb2cf4fc9168a2d848de8c48d73f2b6e32ef3b25eb1e730b673209b002bca01d9190a1565b6000546101009004600160a060020a031633146106de57600080fd5b600160a060020a038216600081815260016020908152604091829020805460ff191685151590811790915582519384529083015280517f5c42a6eb70f030b267ab6ddbc362cfe8dbe7cc3b42c590692fa695c58aeaca2b9281900390910190a15050565b60005460ff1681565b60005460ff161515610775573360009081526001602052604090205460ff16151561077557600080fd5b3360009081526003602052604090205481111561079157600080fd5b336000908152600360205260409020546107b1908263ffffffff610ad316565b336000908152600360205260409020556005546107d4908263ffffffff610ad316565b600555604080513381526020810183905281517f1af5163f80e79b5e554f61e1d052084d3a3fe1166e42a265798c4e2ddce8ffa2929181900390910190a150565b600160a060020a031660009081526003602052604090205490565b6000546101009004600160a060020a031681565b60408051808201909152600381527f5450430000000000000000000000000000000000000000000000000000000000602082015281565b6000805460ff1615156108a6573360009081526001602052604090205460ff1615156108a657600080fd5b3360009081526002602052604090205460ff16156108c357600080fd5b336000908152600360205260409020548211156108df57600080fd5b336000908152600360205260409020546108ff908363ffffffff610ad316565b3360009081526003602052604080822092909255600160a060020a03851681522054610931908363ffffffff610ae516565b600160a060020a0384166000818152600360209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60026020526000908152604090205460ff1681565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205490565b6000546101009004600160a060020a031633146109eb57600080fd5b6000805460ff191681556040517feb2cf4fc9168a2d848de8c48d73f2b6e32ef3b25eb1e730b673209b002bca01d9190a1565b60016020526000908152604090205460ff1681565b6000546101009004600160a060020a03163314610a4f57600080fd5b600054600160a060020a03838116610100909204161415610a6f57600080fd5b600160a060020a038216600081815260026020908152604091829020805460ff191685151590811790915582519384529083015280517fcaf46096bdd957e9271a7e46a00ff61870b80644805049e7ea814162a2b606bc9281900390910190a15050565b600082821115610adf57fe5b50900390565b600082820183811015610af457fe5b93925050505600a165627a7a72305820988020f73b1eec31689e6db53ea47d81d9a4ea033bce37a491d67de3a6e139770029

Deployed Bytecode

0x6080604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610100578063095ea7b31461018a57806318160ddd146101c257806323b872dd146101e9578063313ce567146102135780633a7644621461023e57806360805e5a146102555780636c4eca271461027b5780636d1b229d1461029057806370a08231146102a85780638da5cb5b146102c957806395d89b41146102fa578063a9059cbb1461030f578063cb7bba3914610333578063dd62ed3e14610354578063e2a9ca4c1461037b578063ec4a79cf14610390578063f2260031146103b1575b600080fd5b34801561010c57600080fd5b506101156103d7565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014f578181015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019657600080fd5b506101ae600160a060020a036004351660243561040e565b604080519115158252519081900360200190f35b3480156101ce57600080fd5b506101d76104bd565b60408051918252519081900360200190f35b3480156101f557600080fd5b506101ae600160a060020a03600435811690602435166044356104c3565b34801561021f57600080fd5b5061022861066b565b6040805160ff9092168252519081900360200190f35b34801561024a57600080fd5b50610253610670565b005b34801561026157600080fd5b50610253600160a060020a036004351660243515156106c2565b34801561028757600080fd5b506101ae610742565b34801561029c57600080fd5b5061025360043561074b565b3480156102b457600080fd5b506101d7600160a060020a0360043516610815565b3480156102d557600080fd5b506102de610830565b60408051600160a060020a039092168252519081900360200190f35b34801561030657600080fd5b50610115610844565b34801561031b57600080fd5b506101ae600160a060020a036004351660243561087b565b34801561033f57600080fd5b506101ae600160a060020a036004351661098f565b34801561036057600080fd5b506101d7600160a060020a03600435811690602435166109a4565b34801561038757600080fd5b506102536109cf565b34801561039c57600080fd5b506101ae600160a060020a0360043516610a1e565b3480156103bd57600080fd5b50610253600160a060020a03600435166024351515610a33565b60408051808201909152600981527f54504320546f6b656e0000000000000000000000000000000000000000000000602082015281565b6000805460ff161515610439573360009081526001602052604090205460ff16151561043957600080fd5b3360009081526002602052604090205460ff161561045657600080fd5b336000818152600460209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60055490565b6000805460ff1615156104ee573360009081526001602052604090205460ff1615156104ee57600080fd5b3360009081526002602052604090205460ff161561050b57600080fd5b600160a060020a03841660009081526003602052604090205482111561053057600080fd5b600160a060020a038416600090815260046020908152604080832033845290915290205482111561056057600080fd5b600160a060020a0384166000908152600460209081526040808320338452909152902054610594908363ffffffff610ad316565b600160a060020a0385166000818152600460209081526040808320338452825280832094909455918152600390915220546105d5908363ffffffff610ad316565b600160a060020a03808616600090815260036020526040808220939093559085168152205461060a908363ffffffff610ae516565b600160a060020a0380851660008181526003602090815260409182902094909455805186815290519193928816927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b601281565b6000546101009004600160a060020a0316331461068c57600080fd5b6000805460ff191660011781556040517feb2cf4fc9168a2d848de8c48d73f2b6e32ef3b25eb1e730b673209b002bca01d9190a1565b6000546101009004600160a060020a031633146106de57600080fd5b600160a060020a038216600081815260016020908152604091829020805460ff191685151590811790915582519384529083015280517f5c42a6eb70f030b267ab6ddbc362cfe8dbe7cc3b42c590692fa695c58aeaca2b9281900390910190a15050565b60005460ff1681565b60005460ff161515610775573360009081526001602052604090205460ff16151561077557600080fd5b3360009081526003602052604090205481111561079157600080fd5b336000908152600360205260409020546107b1908263ffffffff610ad316565b336000908152600360205260409020556005546107d4908263ffffffff610ad316565b600555604080513381526020810183905281517f1af5163f80e79b5e554f61e1d052084d3a3fe1166e42a265798c4e2ddce8ffa2929181900390910190a150565b600160a060020a031660009081526003602052604090205490565b6000546101009004600160a060020a031681565b60408051808201909152600381527f5450430000000000000000000000000000000000000000000000000000000000602082015281565b6000805460ff1615156108a6573360009081526001602052604090205460ff1615156108a657600080fd5b3360009081526002602052604090205460ff16156108c357600080fd5b336000908152600360205260409020548211156108df57600080fd5b336000908152600360205260409020546108ff908363ffffffff610ad316565b3360009081526003602052604080822092909255600160a060020a03851681522054610931908363ffffffff610ae516565b600160a060020a0384166000818152600360209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60026020526000908152604090205460ff1681565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205490565b6000546101009004600160a060020a031633146109eb57600080fd5b6000805460ff191681556040517feb2cf4fc9168a2d848de8c48d73f2b6e32ef3b25eb1e730b673209b002bca01d9190a1565b60016020526000908152604090205460ff1681565b6000546101009004600160a060020a03163314610a4f57600080fd5b600054600160a060020a03838116610100909204161415610a6f57600080fd5b600160a060020a038216600081815260026020908152604091829020805460ff191685151590811790915582519384529083015280517fcaf46096bdd957e9271a7e46a00ff61870b80644805049e7ea814162a2b606bc9281900390910190a15050565b600082821115610adf57fe5b50900390565b600082820183811015610af457fe5b93925050505600a165627a7a72305820988020f73b1eec31689e6db53ea47d81d9a4ea033bce37a491d67de3a6e139770029

Swarm Source

bzzr://988020f73b1eec31689e6db53ea47d81d9a4ea033bce37a491d67de3a6e13977
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.