ERC-20
Supply Chain
Overview
Max Total Supply
1,000,000,000 HLC
Holders
1,910 (0.00%)
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 9 Decimals)
Balance
0.00000997 HLCValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
HLCToken
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-07-31 */ /** * ERC20 token * * https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 { // token总量 uint public totalSupply; // 获取账户_owner拥有token的数量 function balanceOf(address _owner) constant returns (uint); //获取账户_spender可以从账户_owner中转出token的数量 function allowance(address _owner, address _spender) constant returns (uint); // 从发送者账户中往_to账户转数量为_value的token function transfer(address _to, uint _value) returns (bool ok); //从账户_from中往账户_to转数量为_value的token,与approve方法配合使用 function transferFrom(address _from, address _to, uint _value) returns (bool ok); // 消息发送账户设置账户_spender能从发送账户中转出数量为_value的token function approve(address _spender, uint _value) returns (bool ok); //发生转账时必须要触发的事件, 由transfer函数的最后一行代码触发。 event Transfer(address indexed _from, address indexed _to, uint _value); //当函数approve(address spender, uint value)成功执行时必须触发的事件 event Approval(address indexed _owner, address indexed _spender, uint _value); } /** * 带安全检查的数学运算符 */ contract SafeMath { function safeMul(uint a, uint b) internal returns (uint) { uint c = a * b; assert(a == 0 || c / a == b); return c; } function safeDiv(uint a, uint b) internal returns (uint) { assert(b > 0); uint c = a / b; assert(a == b * c + a % b); return c; } function safeSub(uint a, uint b) internal returns (uint) { assert(b <= a); return a - b; } function safeAdd(uint a, uint b) internal returns (uint) { uint c = a + b; assert(c>=a && c>=b); return c; } function max64(uint64 a, uint64 b) internal constant returns (uint64) { return a >= b ? a : b; } function min64(uint64 a, uint64 b) internal constant returns (uint64) { return a < b ? a : b; } function max256(uint256 a, uint256 b) internal constant returns (uint256) { return a >= b ? a : b; } function min256(uint256 a, uint256 b) internal constant returns (uint256) { return a < b ? a : b; } function assert(bool assertion) internal { if (!assertion) { throw; } } } /** * 修复了ERC20 short address attack问题的标准ERC20 Token. * * Based on: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, SafeMath { //创建一个状态变量,该类型将一些address映射到无符号整数uint256。 mapping(address => uint) balances; mapping (address => mapping (address => uint)) allowed; /** * * 修复ERC20 short address attack * * http://vessenes.com/the-erc20-short-address-attack-explained/ */ modifier onlyPayloadSize(uint size) { if(msg.data.length < size + 4) { throw; } _; } function transfer(address _to, uint _value) onlyPayloadSize(2 * 32) returns (bool success) { //从消息发送者账户中减去token数量_value balances[msg.sender] = safeSub(balances[msg.sender], _value); //往接收账户增加token数量_value balances[_to] = safeAdd(balances[_to], _value); //触发转币交易事件 Transfer(msg.sender, _to, _value); return true; } function transferFrom(address _from, address _to, uint _value) returns (bool success) { var _allowance = allowed[_from][msg.sender]; //接收账户增加token数量_value balances[_to] = safeAdd(balances[_to], _value); //支出账户_from减去token数量_value balances[_from] = safeSub(balances[_from], _value); //消息发送者可以从账户_from中转出的数量减少_value allowed[_from][msg.sender] = safeSub(_allowance, _value); //触发转币交易事件 Transfer(_from, _to, _value); return true; } function balanceOf(address _owner) constant returns (uint balance) { return balances[_owner]; } function approve(address _spender, uint _value) returns (bool success) { if ((_value != 0) && (allowed[msg.sender][_spender] != 0)) throw; allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant returns (uint remaining) { //允许_spender从_owner中转出的token数 return allowed[_owner][_spender]; } } /** * 允许token拥有者减少token总量 * 加Burned事件使其区别于正常的transfers */ contract BurnableToken is StandardToken { address public constant BURN_ADDRESS = 0; event Burned(address burner, uint burnedAmount); /** * 销毁Token * */ function burn(uint burnAmount) { address burner = msg.sender; balances[burner] = safeSub(balances[burner], burnAmount); totalSupply = safeSub(totalSupply, burnAmount); Burned(burner, burnAmount); Transfer(burner, BURN_ADDRESS, burnAmount); } } /** * 发行Ethereum token. * * 创建token总量并分配给owner. * owner之后可以把token分配给其他人 * owner可以销毁token * */ contract HLCToken is BurnableToken { string public name; // Token名称,例如:Halal chain token string public symbol; // Token标识,例如:HLC uint8 public decimals = 18; // 最多的小数位数 18 是建议的默认值 uint256 public totalSupply; function HLCToken(address _owner, string _name, string _symbol, uint _totalSupply, uint8 _decimals) { name = _name; symbol = _symbol; totalSupply = _totalSupply * 10 ** uint256(_decimals); decimals = _decimals; // 把创建token的总量分配给owner balances[_owner] = totalSupply; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":false,"inputs":[{"name":"burnAmount","type":"uint256"}],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","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":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BURN_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_owner","type":"address"},{"name":"_name","type":"string"},{"name":"_symbol","type":"string"},{"name":"_totalSupply","type":"uint256"},{"name":"_decimals","type":"uint8"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"burner","type":"address"},{"indexed":false,"name":"burnedAmount","type":"uint256"}],"name":"Burned","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"}]
Contract Creation Code
60806040526005805460ff1916601217905534801561001d57600080fd5b50604051610901380380610901833981016040908152815160208084015192840151606085015160808601519486018051949690959201939092610066916003918701906100bf565b50825161007a9060049060208601906100bf565b5060ff16600a81900a9190910260068190556005805460ff1916909217909155600160a060020a039093166000908152600160205260409020929092555061015a9050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010057805160ff191683800117855561012d565b8280016001018555821561012d579182015b8281111561012d578251825591602001919060010190610112565b5061013992915061013d565b5090565b61015791905b808211156101395760008155600101610143565b90565b610798806101696000396000f3006080604052600436106100ae5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100b3578063095ea7b31461013d57806318160ddd1461017557806323b872dd1461019c578063313ce567146101c657806342966c68146101f157806370a082311461020b57806395d89b411461022c578063a9059cbb14610241578063dd62ed3e14610265578063fccc28131461028c575b600080fd5b3480156100bf57600080fd5b506100c86102bd565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101025781810151838201526020016100ea565b50505050905090810190601f16801561012f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561014957600080fd5b50610161600160a060020a036004351660243561034b565b604080519115158252519081900360200190f35b34801561018157600080fd5b5061018a6103ef565b60408051918252519081900360200190f35b3480156101a857600080fd5b50610161600160a060020a03600435811690602435166044356103f5565b3480156101d257600080fd5b506101db6104f2565b6040805160ff9092168252519081900360200190f35b3480156101fd57600080fd5b506102096004356104fb565b005b34801561021757600080fd5b5061018a600160a060020a03600435166105c8565b34801561023857600080fd5b506100c86105e3565b34801561024d57600080fd5b50610161600160a060020a036004351660243561063e565b34801561027157600080fd5b5061018a600160a060020a03600435811690602435166106f5565b34801561029857600080fd5b506102a1610720565b60408051600160a060020a039092168252519081900360200190f35b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103435780601f1061031857610100808354040283529160200191610343565b820191906000526020600020905b81548152906001019060200180831161032657829003601f168201915b505050505081565b6000811580159061037e5750336000908152600260209081526040808320600160a060020a038716845290915290205415155b1561038857600080fd5b336000818152600260209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60065481565b600160a060020a038084166000908152600260209081526040808320338452825280832054938616835260019091528120549091906104349084610725565b600160a060020a0380861660009081526001602052604080822093909355908716815220546104639084610749565b600160a060020a0386166000908152600160205260409020556104868184610749565b600160a060020a03808716600081815260026020908152604080832033845282529182902094909455805187815290519288169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3506001949350505050565b60055460ff1681565b336000818152600160205260409020546105159083610749565b600160a060020a0382166000908152600160205260408120919091555461053c9083610749565b60005560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600160a060020a031660009081526001602052604090205490565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103435780601f1061031857610100808354040283529160200191610343565b60006040604436101561065057600080fd5b3360009081526001602052604090205461066a9084610749565b3360009081526001602052604080822092909255600160a060020a038616815220546106969084610725565b600160a060020a0385166000818152600160209081526040918290209390935580518681529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600081565b600082820161074284821080159061073d5750838210155b61075d565b9392505050565b60006107578383111561075d565b50900390565b80151561076957600080fd5b505600a165627a7a723058200c6b7d01008167d28f06518a4a9cb37532ac49a8d21ca6bc50b4d23b08b38617002900000000000000000000000093ae51140169a39d9564fd11902c1ddf8bc0ce2100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000000a48616c616c436861696e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003484c430000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106100ae5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100b3578063095ea7b31461013d57806318160ddd1461017557806323b872dd1461019c578063313ce567146101c657806342966c68146101f157806370a082311461020b57806395d89b411461022c578063a9059cbb14610241578063dd62ed3e14610265578063fccc28131461028c575b600080fd5b3480156100bf57600080fd5b506100c86102bd565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101025781810151838201526020016100ea565b50505050905090810190601f16801561012f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561014957600080fd5b50610161600160a060020a036004351660243561034b565b604080519115158252519081900360200190f35b34801561018157600080fd5b5061018a6103ef565b60408051918252519081900360200190f35b3480156101a857600080fd5b50610161600160a060020a03600435811690602435166044356103f5565b3480156101d257600080fd5b506101db6104f2565b6040805160ff9092168252519081900360200190f35b3480156101fd57600080fd5b506102096004356104fb565b005b34801561021757600080fd5b5061018a600160a060020a03600435166105c8565b34801561023857600080fd5b506100c86105e3565b34801561024d57600080fd5b50610161600160a060020a036004351660243561063e565b34801561027157600080fd5b5061018a600160a060020a03600435811690602435166106f5565b34801561029857600080fd5b506102a1610720565b60408051600160a060020a039092168252519081900360200190f35b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103435780601f1061031857610100808354040283529160200191610343565b820191906000526020600020905b81548152906001019060200180831161032657829003601f168201915b505050505081565b6000811580159061037e5750336000908152600260209081526040808320600160a060020a038716845290915290205415155b1561038857600080fd5b336000818152600260209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60065481565b600160a060020a038084166000908152600260209081526040808320338452825280832054938616835260019091528120549091906104349084610725565b600160a060020a0380861660009081526001602052604080822093909355908716815220546104639084610749565b600160a060020a0386166000908152600160205260409020556104868184610749565b600160a060020a03808716600081815260026020908152604080832033845282529182902094909455805187815290519288169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3506001949350505050565b60055460ff1681565b336000818152600160205260409020546105159083610749565b600160a060020a0382166000908152600160205260408120919091555461053c9083610749565b60005560408051600160a060020a03831681526020810184905281517f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df7929181900390910190a1604080518381529051600091600160a060020a038416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600160a060020a031660009081526001602052604090205490565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103435780601f1061031857610100808354040283529160200191610343565b60006040604436101561065057600080fd5b3360009081526001602052604090205461066a9084610749565b3360009081526001602052604080822092909255600160a060020a038616815220546106969084610725565b600160a060020a0385166000818152600160209081526040918290209390935580518681529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35060019392505050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600081565b600082820161074284821080159061073d5750838210155b61075d565b9392505050565b60006107578383111561075d565b50900390565b80151561076957600080fd5b505600a165627a7a723058200c6b7d01008167d28f06518a4a9cb37532ac49a8d21ca6bc50b4d23b08b386170029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000093ae51140169a39d9564fd11902c1ddf8bc0ce2100000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000003b9aca000000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000000a48616c616c436861696e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003484c430000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _owner (address): 0x93ae51140169a39D9564fd11902C1dDF8bC0ce21
Arg [1] : _name (string): HalalChain
Arg [2] : _symbol (string): HLC
Arg [3] : _totalSupply (uint256): 1000000000
Arg [4] : _decimals (uint8): 9
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000093ae51140169a39d9564fd11902c1ddf8bc0ce21
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 000000000000000000000000000000000000000000000000000000003b9aca00
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [6] : 48616c616c436861696e00000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [8] : 484c430000000000000000000000000000000000000000000000000000000000
Swarm Source
bzzr://0c6b7d01008167d28f06518a4a9cb37532ac49a8d21ca6bc50b4d23b08b38617
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.