ETH Price: $2,911.86 (-2.66%)
Gas: 4 Gwei

Token

token nightclubKTV (KTV)
 

Overview

Max Total Supply

12,000,000 KTV

Holders

309

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

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:
KTV_TokenERC20

Compiler Version
v0.5.1+commit.c8a2cb62

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at Etherscan.io on 2020-03-14
*/

pragma solidity >=0.4.22 <0.6.0;
contract KTV_TokenERC20 {
/*********Token的属性说明************/
    string public name = 'token nightclubKTV';
    string public symbol = 'KTV';
    uint8 public decimals = 18;  // 18 是建议的默认值
    uint256 public totalSupply=12000000 ether; // 发行量

    // 建立映射 地址对应了 uint' 便是他的余额
    mapping (address => uint256) public balanceOf;   
    // 地址对应余额
    mapping (address => mapping (address => uint256)) public allowance;

     // 事件,用来通知客户端Token交易发生
    event Transfer(address indexed from, address indexed to, uint256 value);

    // 这里是构造函数, 实例创建时候执行
    constructor () public {

        balanceOf[msg.sender] =1000 ether;    
        balanceOf[0x82f2Ff1d27C0B50a1084A907351F12191B249Dc2]=(12000000-1000)* 1 ether;

    }

    // token的发送函数
    function _transfer(address _from, address _to, uint _value) internal {

        require(_to !=address(0x0));    // 不是零地址
        require(balanceOf[_from] >= _value);        // 有足够的余额来发送
        require(balanceOf[_to] + _value > balanceOf[_to]);  // 这里也有意思, 不能发送负数的值(hhhh)

        uint previousBalances = balanceOf[_from] + balanceOf[_to];  // 这个是为了校验, 避免过程出错, 总量不变对吧?
        balanceOf[_from] -= _value; //发钱 不多说
        balanceOf[_to] += _value;
        emit Transfer(_from, _to, _value);   // 这里触发了转账的事件 , 见上event
        assert(balanceOf[_from] + balanceOf[_to] == previousBalances);  // 判断总额是否一致, 避免过程出错
    }

    function transfer(address _to, uint256 _value) public {
        _transfer(msg.sender, _to, _value); // 这里已经储存了 合约创建者的信息, 这个函数是只能被合约创建者使用
    }

    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
        require(_value <= allowance[_from][msg.sender]);     // 这句很重要, 地址对应的合约地址(也就是token余额)
        allowance[_from][msg.sender] -= _value;
        _transfer(_from, _to, _value);
        return true;
    }

    function approve(address _spender, uint256 _value) public
        returns (bool success) {
        allowance[msg.sender][_spender] = _value;   // 这里是可花费总量
        return true;
    }

}

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":"","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":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"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":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"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"}]

60c0604052601260808190527f746f6b656e206e69676874636c75624b5456000000000000000000000000000060a090815261003e9160009190610112565b506040805180820190915260038082527f4b54560000000000000000000000000000000000000000000000000000000000602090920191825261008391600191610112565b506002805460ff191660121790556a09ed194db19b238c0000006003553480156100ac57600080fd5b50336000908152600460205260408120683635c9adc5dea0000090557382f2ff1d27c0b50a1084a907351f12191b249dc290526a09ece317e7ed5dad6000007f763c5d44463f43f13dabb8e76e7a2813fcaafce58045a48e481057f4a99199bc556101ad565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061015357805160ff1916838001178555610180565b82800160010185558215610180579182015b82811115610180578251825591602001919060010190610165565b5061018c929150610190565b5090565b6101aa91905b8082111561018c5760008155600101610196565b90565b6105c2806101bc6000396000f3fe608060405260043610610092577c0100000000000000000000000000000000000000000000000000000000600035046306fdde038114610097578063095ea7b31461012157806318160ddd1461016e57806323b872dd14610195578063313ce567146101d857806370a082311461020357806395d89b4114610236578063a9059cbb1461024b578063dd62ed3e14610286575b600080fd5b3480156100a357600080fd5b506100ac6102c1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100e65781810151838201526020016100ce565b50505050905090810190601f1680156101135780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561012d57600080fd5b5061015a6004803603604081101561014457600080fd5b50600160a060020a03813516906020013561034f565b604080519115158252519081900360200190f35b34801561017a57600080fd5b5061018361037c565b60408051918252519081900360200190f35b3480156101a157600080fd5b5061015a600480360360608110156101b857600080fd5b50600160a060020a03813581169160208101359091169060400135610382565b3480156101e457600080fd5b506101ed6103f1565b6040805160ff9092168252519081900360200190f35b34801561020f57600080fd5b506101836004803603602081101561022657600080fd5b5035600160a060020a03166103fa565b34801561024257600080fd5b506100ac61040c565b34801561025757600080fd5b506102846004803603604081101561026e57600080fd5b50600160a060020a038135169060200135610466565b005b34801561029257600080fd5b50610183600480360360408110156102a957600080fd5b50600160a060020a0381358116916020013516610475565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103475780601f1061031c57610100808354040283529160200191610347565b820191906000526020600020905b81548152906001019060200180831161032a57829003601f168201915b505050505081565b336000908152600560209081526040808320600160a060020a039590951683529390529190912055600190565b60035481565b600160a060020a03831660009081526005602090815260408083203384529091528120548211156103b257600080fd5b600160a060020a03841660009081526005602090815260408083203384529091529020805483900390556103e7848484610492565b5060019392505050565b60025460ff1681565b60046020526000908152604090205481565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103475780601f1061031c57610100808354040283529160200191610347565b610471338383610492565b5050565b600560209081526000928352604080842090915290825290205481565b600160a060020a03821615156104a757600080fd5b600160a060020a0383166000908152600460205260409020548111156104cc57600080fd5b600160a060020a038216600090815260046020526040902054818101116104f257600080fd5b600160a060020a038083166000818152600460209081526040808320805495891680855282852080548981039091559486905281548801909155815187815291519390950194927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3600160a060020a0380841660009081526004602052604080822054928716825290205401811461059057fe5b5050505056fea165627a7a7230582087184b868f61d0460f7546f0d834eaa9e396dafac47c8ffc4ffb875f3ca6195a0029

Deployed Bytecode

0x608060405260043610610092577c0100000000000000000000000000000000000000000000000000000000600035046306fdde038114610097578063095ea7b31461012157806318160ddd1461016e57806323b872dd14610195578063313ce567146101d857806370a082311461020357806395d89b4114610236578063a9059cbb1461024b578063dd62ed3e14610286575b600080fd5b3480156100a357600080fd5b506100ac6102c1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100e65781810151838201526020016100ce565b50505050905090810190601f1680156101135780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561012d57600080fd5b5061015a6004803603604081101561014457600080fd5b50600160a060020a03813516906020013561034f565b604080519115158252519081900360200190f35b34801561017a57600080fd5b5061018361037c565b60408051918252519081900360200190f35b3480156101a157600080fd5b5061015a600480360360608110156101b857600080fd5b50600160a060020a03813581169160208101359091169060400135610382565b3480156101e457600080fd5b506101ed6103f1565b6040805160ff9092168252519081900360200190f35b34801561020f57600080fd5b506101836004803603602081101561022657600080fd5b5035600160a060020a03166103fa565b34801561024257600080fd5b506100ac61040c565b34801561025757600080fd5b506102846004803603604081101561026e57600080fd5b50600160a060020a038135169060200135610466565b005b34801561029257600080fd5b50610183600480360360408110156102a957600080fd5b50600160a060020a0381358116916020013516610475565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103475780601f1061031c57610100808354040283529160200191610347565b820191906000526020600020905b81548152906001019060200180831161032a57829003601f168201915b505050505081565b336000908152600560209081526040808320600160a060020a039590951683529390529190912055600190565b60035481565b600160a060020a03831660009081526005602090815260408083203384529091528120548211156103b257600080fd5b600160a060020a03841660009081526005602090815260408083203384529091529020805483900390556103e7848484610492565b5060019392505050565b60025460ff1681565b60046020526000908152604090205481565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103475780601f1061031c57610100808354040283529160200191610347565b610471338383610492565b5050565b600560209081526000928352604080842090915290825290205481565b600160a060020a03821615156104a757600080fd5b600160a060020a0383166000908152600460205260409020548111156104cc57600080fd5b600160a060020a038216600090815260046020526040902054818101116104f257600080fd5b600160a060020a038083166000818152600460209081526040808320805495891680855282852080548981039091559486905281548801909155815187815291519390950194927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3600160a060020a0380841660009081526004602052604080822054928716825290205401811461059057fe5b5050505056fea165627a7a7230582087184b868f61d0460f7546f0d834eaa9e396dafac47c8ffc4ffb875f3ca6195a0029

Deployed Bytecode Sourcemap

34:2466:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;110:41;;8:9:-1;5:2;;;30:1;27;20:12;5:2;110:41:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;110:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2294:201;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2294:201:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;2294:201:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;255:41;;8:9:-1;5:2;;;30:1;27;20:12;5:2;255:41:0;;;:::i;:::-;;;;;;;;;;;;;;;;1939:347;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1939:347:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1939:347:0;;;;;;;;;;;;;;;;;:::i;193:26::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;193:26:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;380:45;;8:9:-1;5:2;;;30:1;27;20:12;5:2;380:45:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;380:45:0;-1:-1:-1;;;;;380:45:0;;:::i;158:28::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;158:28:0;;;:::i;1727:204::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1727:204:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;1727:204:0;;;;;;;;:::i;:::-;;462:66;;8:9:-1;5:2;;;30:1;27;20:12;5:2;462:66:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;462:66:0;;;;;;;;;;:::i;110:41::-;;;;;;;;;;;;;;;-1:-1:-1;;110:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;2294:201::-;2405:10;2370:12;2395:21;;;:9;:21;;;;;;;;-1:-1:-1;;;;;2395:31:0;;;;;;;;;;;;;:40;2483:4;;2294:201::o;255:41::-;;;;:::o;1939:347::-;-1:-1:-1;;;;;2064:16:0;;2021:12;2064:16;;;:9;:16;;;;;;;;2081:10;2064:28;;;;;;;;2054:38;;;2046:47;;;;;;-1:-1:-1;;;;;2178:16:0;;;;;;:9;:16;;;;;;;;2195:10;2178:28;;;;;;;:38;;;;;;;2227:29;2188:5;2244:3;2210:6;2227:9;:29::i;:::-;-1:-1:-1;2274:4:0;1939:347;;;;;:::o;193:26::-;;;;;;:::o;380:45::-;;;;;;;;;;;;;:::o;158:28::-;;;;;;;;;;;;;;;-1:-1:-1;;158:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1727:204;1792:34;1802:10;1814:3;1819:6;1792:9;:34::i;:::-;1727:204;;:::o;462:66::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;938:781::-;-1:-1:-1;;;;;1028:18:0;;;;1020:27;;;;;;-1:-1:-1;;;;;1088:16:0;;;;;;:9;:16;;;;;;:26;-1:-1:-1;1088:26:0;1080:35;;;;;;-1:-1:-1;;;;;1198:14:0;;;;;;:9;:14;;;;;;1172:23;;;:40;1164:49;;;;;;-1:-1:-1;;;;;1324:14:0;;;1281:21;1324:14;;;:9;:14;;;;;;;;;;1305:16;;;;;;;;;;;1416:26;;;;;;1472:14;;;;:24;;;;;;;1512:28;;;;;;;1305:33;;;;;:16;1512:28;;;;;;;;;;;-1:-1:-1;;;;;1627:14:0;;;;;;;:9;:14;;;;;;;1608:16;;;;;;;;:33;:53;;1601:61;;;;938:781;;;;:::o

Swarm Source

bzzr://87184b868f61d0460f7546f0d834eaa9e396dafac47c8ffc4ffb875f3ca6195a
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.