ERC-20
Overview
Max Total Supply
100,000,000,000 TIX
Holders
5,825
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 8 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
TixToken
Compiler Version
v0.4.15+commit.bbb8e64f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-10-20 */ pragma solidity ^0.4.8; /** * Math operations with safety checks */ contract SafeMath { function safeMul(uint256 a, uint256 b) internal returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function safeDiv(uint256 a, uint256 b) internal returns (uint256) { assert(b > 0); uint256 c = a / b; assert(a == b * c + a % b); return c; } function safeSub(uint256 a, uint256 b) internal returns (uint256) { assert(b <= a); return a - b; } function safeAdd(uint256 a, uint256 b) internal returns (uint256) { uint256 c = a + b; assert(c>=a && c>=b); return c; } function assert(bool assertion) internal { if (!assertion) { revert(); } } } contract TixToken is SafeMath { string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; mapping (address => uint256) public freezeOf; mapping (address => mapping (address => uint256)) public allowance; /* This generates a public event on the blockchain that will notify clients */ event Transfer(address indexed from, address indexed to, uint256 value); /* This notifies clients about the amount burnt */ event Burn(address indexed from, uint256 value); /* This notifies clients about the amount frozen */ event Freeze(address indexed from, uint256 value); /* This notifies clients about the amount unfrozen */ event Unfreeze(address indexed from, uint256 value); /* Initializes contract with initial supply tokens to the creator of the contract */ function TixToken() { balanceOf[msg.sender] = 10000000000000000000; // Give the creator all initial tokens totalSupply = 10000000000000000000; // Update total supply name = 'Lottery Tickets'; // Set the name for display purposes symbol = 'TIX'; // Set the symbol for display purposes decimals = 8; // Amount of decimals for display purposes } /* Send tokens */ function transfer(address _to, uint256 _value) { if (_to == 0x0) revert(); // Prevent transfer to 0x0 address. Use burn() instead if (_value <= 0) revert(); if (balanceOf[msg.sender] < _value) revert(); // Check if the sender has enough if (balanceOf[_to] + _value < balanceOf[_to]) revert(); // Check for overflows balanceOf[msg.sender] = SafeMath.safeSub(balanceOf[msg.sender], _value); // Subtract from the sender balanceOf[_to] = SafeMath.safeAdd(balanceOf[_to], _value); // Add the same to the recipient Transfer(msg.sender, _to, _value); // Notify anyone listening that this transfer took place } /* Allow another contract to spend some tokens in your behalf */ function approve(address _spender, uint256 _value) returns (bool success) { if (_value <= 0) revert(); allowance[msg.sender][_spender] = _value; return true; } /* Transfer tokens */ function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { if (_to == 0x0) revert(); // Prevent transfer to 0x0 address. Use burn() instead if (_value <= 0) revert(); if (balanceOf[_from] < _value) revert(); // Check if the sender has enough if (balanceOf[_to] + _value < balanceOf[_to]) revert(); // Check for overflows if (_value > allowance[_from][msg.sender]) revert(); // Check allowance balanceOf[_from] = SafeMath.safeSub(balanceOf[_from], _value); // Subtract from the sender balanceOf[_to] = SafeMath.safeAdd(balanceOf[_to], _value); // Add the same to the recipient allowance[_from][msg.sender] = SafeMath.safeSub(allowance[_from][msg.sender], _value); Transfer(_from, _to, _value); return true; } /* Destruction of the token */ function burn(uint256 _value) returns (bool success) { if (balanceOf[msg.sender] < _value) revert(); // Check if the sender has enough if (_value <= 0) revert(); balanceOf[msg.sender] = SafeMath.safeSub(balanceOf[msg.sender], _value); // Subtract from the sender totalSupply = SafeMath.safeSub(totalSupply,_value); // Updates totalSupply Burn(msg.sender, _value); return true; } function freeze(uint256 _value) returns (bool success) { if (balanceOf[msg.sender] < _value) revert(); // Check if the sender has enough if (_value <= 0) revert(); balanceOf[msg.sender] = SafeMath.safeSub(balanceOf[msg.sender], _value); // Subtract from the sender freezeOf[msg.sender] = SafeMath.safeAdd(freezeOf[msg.sender], _value); // Updates frozen tokens Freeze(msg.sender, _value); return true; } function unfreeze(uint256 _value) returns (bool success) { if (freezeOf[msg.sender] < _value) revert(); // Check if the sender has enough if (_value <= 0) revert(); freezeOf[msg.sender] = SafeMath.safeSub(freezeOf[msg.sender], _value); // Updates frozen tokens balanceOf[msg.sender] = SafeMath.safeAdd(balanceOf[msg.sender], _value); // Add to the sender Unfreeze(msg.sender, _value); return true; } /* Prevents accidental sending of Ether */ function () { revert(); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":"success","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":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"burn","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"unfreeze","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"freezeOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"freeze","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"payable":false,"type":"fallback"},{"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":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Freeze","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Unfreeze","type":"event"}]
Contract Creation Code
6060604052341561000f57600080fd5b5b600160a060020a03331660009081526004602052604090819020678ac7230489e80000908190556003558051908101604052600f81527f4c6f7474657279205469636b65747300000000000000000000000000000000006020820152600090805161007f9291602001906100db565b5060408051908101604052600381527f5449580000000000000000000000000000000000000000000000000000000000602082015260019080516100c79291602001906100db565b506002805460ff191660081790555b61017b565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061011c57805160ff1916838001178555610149565b82800160010185558215610149579182015b8281111561014957825182559160200191906001019061012e565b5b5061015692915061015a565b5090565b61017891905b808211156101565760008155600101610160565b5090565b90565b610b788061018a6000396000f300606060405236156100c25763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100d5578063095ea7b31461016057806318160ddd1461019657806323b872dd146101bb578063313ce567146101f757806342966c68146102205780636623fc461461024a57806370a082311461027457806395d89b41146102a5578063a9059cbb14610330578063cd4217c114610354578063d7a78db814610385578063dd62ed3e146103af575b34156100cd57600080fd5b5b600080fd5b005b34156100e057600080fd5b6100e86103e6565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101255780820151818401525b60200161010c565b50505050905090810190601f1680156101525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561016b57600080fd5b610182600160a060020a0360043516602435610484565b604051901515815260200160405180910390f35b34156101a157600080fd5b6101a96104c4565b60405190815260200160405180910390f35b34156101c657600080fd5b610182600160a060020a03600435811690602435166044356104ca565b604051901515815260200160405180910390f35b341561020257600080fd5b61020a610670565b60405160ff909116815260200160405180910390f35b341561022b57600080fd5b610182600435610679565b604051901515815260200160405180910390f35b341561025557600080fd5b61018260043561073e565b604051901515815260200160405180910390f35b341561027f57600080fd5b6101a9600160a060020a036004351661081e565b60405190815260200160405180910390f35b34156102b057600080fd5b6100e8610830565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101255780820151818401525b60200161010c565b50505050905090810190601f1680156101525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561033b57600080fd5b6100d3600160a060020a03600435166024356108ce565b005b341561035f57600080fd5b6101a9600160a060020a03600435166109ec565b60405190815260200160405180910390f35b341561039057600080fd5b6101826004356109fe565b604051901515815260200160405180910390f35b34156103ba57600080fd5b6101a9600160a060020a0360043581169060243516610ade565b60405190815260200160405180910390f35b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561047c5780601f106104515761010080835404028352916020019161047c565b820191906000526020600020905b81548152906001019060200180831161045f57829003601f168201915b505050505081565b600080821161049257600080fd5b50600160a060020a03338116600090815260066020908152604080832093861683529290522081905560015b92915050565b60035481565b6000600160a060020a03831615156104e157600080fd5b600082116104ee57600080fd5b600160a060020a0384166000908152600460205260409020548290101561051457600080fd5b600160a060020a038316600090815260046020526040902054828101101561053b57600080fd5b600160a060020a038085166000908152600660209081526040808320339094168352929052205482111561056e57600080fd5b600160a060020a0384166000908152600460205260409020546105919083610afb565b600160a060020a0380861660009081526004602052604080822093909355908516815220546105c09083610b14565b600160a060020a038085166000908152600460209081526040808320949094558783168252600681528382203390931682529190915220546106029083610afb565b600160a060020a03808616600081815260066020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060015b9392505050565b60025460ff1681565b600160a060020a0333166000908152600460205260408120548290101561069f57600080fd5b600082116106ac57600080fd5b600160a060020a0333166000908152600460205260409020546106cf9083610afb565b600160a060020a0333166000908152600460205260409020556003546106f59083610afb565b600355600160a060020a0333167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58360405190815260200160405180910390a25060015b919050565b600160a060020a0333166000908152600560205260408120548290101561076457600080fd5b6000821161077157600080fd5b600160a060020a0333166000908152600560205260409020546107949083610afb565b600160a060020a0333166000908152600560209081526040808320939093556004905220546107c39083610b14565b600160a060020a0333166000818152600460205260409081902092909255907f2cfce4af01bcb9d6cf6c84ee1b7c491100b8695368264146a94d71e10a63083f9084905190815260200160405180910390a25060015b919050565b60046020526000908152604090205481565b60018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561047c5780601f106104515761010080835404028352916020019161047c565b820191906000526020600020905b81548152906001019060200180831161045f57829003601f168201915b505050505081565b600160a060020a03821615156108e357600080fd5b600081116108f057600080fd5b600160a060020a0333166000908152600460205260409020548190101561091657600080fd5b600160a060020a038216600090815260046020526040902054818101101561093d57600080fd5b600160a060020a0333166000908152600460205260409020546109609082610afb565b600160a060020a03338116600090815260046020526040808220939093559084168152205461098f9082610b14565b600160a060020a0380841660008181526004602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a35b5050565b60056020526000908152604090205481565b600160a060020a03331660009081526004602052604081205482901015610a2457600080fd5b60008211610a3157600080fd5b600160a060020a033316600090815260046020526040902054610a549083610afb565b600160a060020a033316600090815260046020908152604080832093909355600590522054610a839083610b14565b600160a060020a0333166000818152600560205260409081902092909255907ff97a274face0b5517365ad396b1fdba6f68bd3135ef603e44272adba3af5a1e09084905190815260200160405180910390a25060015b919050565b600660209081526000928352604080842090915290825290205481565b6000610b0983831115610b3c565b508082035b92915050565b6000828201610b31848210801590610b2c5750838210155b610b3c565b8091505b5092915050565b801515610b4857600080fd5b5b505600a165627a7a72305820db420834369188ced8cef942c8cf4283d2e2e38ad9ff1b18bc856f9b2c507e0c0029
Deployed Bytecode
0x606060405236156100c25763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100d5578063095ea7b31461016057806318160ddd1461019657806323b872dd146101bb578063313ce567146101f757806342966c68146102205780636623fc461461024a57806370a082311461027457806395d89b41146102a5578063a9059cbb14610330578063cd4217c114610354578063d7a78db814610385578063dd62ed3e146103af575b34156100cd57600080fd5b5b600080fd5b005b34156100e057600080fd5b6100e86103e6565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101255780820151818401525b60200161010c565b50505050905090810190601f1680156101525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561016b57600080fd5b610182600160a060020a0360043516602435610484565b604051901515815260200160405180910390f35b34156101a157600080fd5b6101a96104c4565b60405190815260200160405180910390f35b34156101c657600080fd5b610182600160a060020a03600435811690602435166044356104ca565b604051901515815260200160405180910390f35b341561020257600080fd5b61020a610670565b60405160ff909116815260200160405180910390f35b341561022b57600080fd5b610182600435610679565b604051901515815260200160405180910390f35b341561025557600080fd5b61018260043561073e565b604051901515815260200160405180910390f35b341561027f57600080fd5b6101a9600160a060020a036004351661081e565b60405190815260200160405180910390f35b34156102b057600080fd5b6100e8610830565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101255780820151818401525b60200161010c565b50505050905090810190601f1680156101525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561033b57600080fd5b6100d3600160a060020a03600435166024356108ce565b005b341561035f57600080fd5b6101a9600160a060020a03600435166109ec565b60405190815260200160405180910390f35b341561039057600080fd5b6101826004356109fe565b604051901515815260200160405180910390f35b34156103ba57600080fd5b6101a9600160a060020a0360043581169060243516610ade565b60405190815260200160405180910390f35b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561047c5780601f106104515761010080835404028352916020019161047c565b820191906000526020600020905b81548152906001019060200180831161045f57829003601f168201915b505050505081565b600080821161049257600080fd5b50600160a060020a03338116600090815260066020908152604080832093861683529290522081905560015b92915050565b60035481565b6000600160a060020a03831615156104e157600080fd5b600082116104ee57600080fd5b600160a060020a0384166000908152600460205260409020548290101561051457600080fd5b600160a060020a038316600090815260046020526040902054828101101561053b57600080fd5b600160a060020a038085166000908152600660209081526040808320339094168352929052205482111561056e57600080fd5b600160a060020a0384166000908152600460205260409020546105919083610afb565b600160a060020a0380861660009081526004602052604080822093909355908516815220546105c09083610b14565b600160a060020a038085166000908152600460209081526040808320949094558783168252600681528382203390931682529190915220546106029083610afb565b600160a060020a03808616600081815260066020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060015b9392505050565b60025460ff1681565b600160a060020a0333166000908152600460205260408120548290101561069f57600080fd5b600082116106ac57600080fd5b600160a060020a0333166000908152600460205260409020546106cf9083610afb565b600160a060020a0333166000908152600460205260409020556003546106f59083610afb565b600355600160a060020a0333167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58360405190815260200160405180910390a25060015b919050565b600160a060020a0333166000908152600560205260408120548290101561076457600080fd5b6000821161077157600080fd5b600160a060020a0333166000908152600560205260409020546107949083610afb565b600160a060020a0333166000908152600560209081526040808320939093556004905220546107c39083610b14565b600160a060020a0333166000818152600460205260409081902092909255907f2cfce4af01bcb9d6cf6c84ee1b7c491100b8695368264146a94d71e10a63083f9084905190815260200160405180910390a25060015b919050565b60046020526000908152604090205481565b60018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561047c5780601f106104515761010080835404028352916020019161047c565b820191906000526020600020905b81548152906001019060200180831161045f57829003601f168201915b505050505081565b600160a060020a03821615156108e357600080fd5b600081116108f057600080fd5b600160a060020a0333166000908152600460205260409020548190101561091657600080fd5b600160a060020a038216600090815260046020526040902054818101101561093d57600080fd5b600160a060020a0333166000908152600460205260409020546109609082610afb565b600160a060020a03338116600090815260046020526040808220939093559084168152205461098f9082610b14565b600160a060020a0380841660008181526004602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a35b5050565b60056020526000908152604090205481565b600160a060020a03331660009081526004602052604081205482901015610a2457600080fd5b60008211610a3157600080fd5b600160a060020a033316600090815260046020526040902054610a549083610afb565b600160a060020a033316600090815260046020908152604080832093909355600590522054610a839083610b14565b600160a060020a0333166000818152600560205260409081902092909255907ff97a274face0b5517365ad396b1fdba6f68bd3135ef603e44272adba3af5a1e09084905190815260200160405180910390a25060015b919050565b600660209081526000928352604080842090915290825290205481565b6000610b0983831115610b3c565b508082035b92915050565b6000828201610b31848210801590610b2c5750838210155b610b3c565b8091505b5092915050565b801515610b4857600080fd5b5b505600a165627a7a72305820db420834369188ced8cef942c8cf4283d2e2e38ad9ff1b18bc856f9b2c507e0c0029
Swarm Source
bzzr://db420834369188ced8cef942c8cf4283d2e2e38ad9ff1b18bc856f9b2c507e0c
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.