ERC-20
Overview
Max Total Supply
500,000,000 ZCH
Holders
1,709
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Asset
Compiler Version
v0.4.19+commit.c4cbbb05
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-02-11 */ pragma solidity 0.4.19; /** * @title TOKEN Contract * @dev ERC-20 Token Standard Compliant * @notice Website: Ze.cash * @author Fares A. Akel C. [email protected] */ /** * @title SafeMath by OpenZeppelin * @dev Math operations with safety checks that throw on error */ library SafeMath { function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * Token contract interface for external use */ contract ERC20TokenInterface { function balanceOf(address _owner) public constant returns (uint256 value); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public constant returns (uint256 remaining); } /** * @title Admin parameters * @dev Define administration parameters for this contract */ contract admined { //This token contract is administered address public admin; //Admin address is public bool public lockSupply; //Supply Lock flag /** * @dev Contract constructor * define initial administrator */ function admined() internal { admin = msg.sender; //Set initial admin to contract creator Admined(admin); } modifier onlyAdmin() { //A modifier to define admin-only functions require(msg.sender == admin); _; } modifier supplyLock() { //A modifier to lock mint and burn transactions require(lockSupply == false); _; } /** * @dev Function to set new admin address * @param _newAdmin The address to transfer administration to */ function transferAdminship(address _newAdmin) onlyAdmin public { //Admin can be transfered require(_newAdmin != address(0)); admin = _newAdmin; TransferAdminship(admin); } /** * @dev Function to set mint and burn locks * @param _set boolean flag (true | false) */ function setSupplyLock(bool _set) onlyAdmin public { //Only the admin can set a lock on supply lockSupply = _set; SetSupplyLock(_set); } //All admin actions have a log for public review event SetSupplyLock(bool _set); event TransferAdminship(address newAdminister); event Admined(address administer); } /** * @title Token definition * @dev Define token paramters including ERC20 ones */ contract ERC20Token is ERC20TokenInterface, admined { //Standard definition of a ERC20Token using SafeMath for uint256; uint256 public totalSupply; mapping (address => uint256) balances; //A mapping of all balances per address mapping (address => mapping (address => uint256)) allowed; //A mapping of all allowances /** * @dev Get the balance of an specified address. * @param _owner The address to be query. */ function balanceOf(address _owner) public constant returns (uint256 value) { return balances[_owner]; } /** * @dev transfer token to a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool success) { require(_to != address(0)); //If you dont want that people destroy token balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev transfer token from an address to another specified address using allowance * @param _from The address where token comes. * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_to != address(0)); //If you dont want that people destroy token allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(_from, _to, _value); return true; } /** * @dev Assign allowance to an specified address to use the owner balance * @param _spender The address to be allowed to spend. * @param _value The amount to be allowed. */ function approve(address _spender, uint256 _value) public returns (bool success) { require((_value == 0) || (allowed[msg.sender][_spender] == 0)); //exploit mitigation allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Get the allowance of an specified address to use another address balance. * @param _owner The address of the owner of the tokens. * @param _spender The address of the allowed spender. */ function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { return allowed[_owner][_spender]; } /** * @dev Burn token of an specified address. * @param _burnedAmount amount to burn. */ function burnToken(uint256 _burnedAmount) onlyAdmin supplyLock public { balances[msg.sender] = SafeMath.sub(balances[msg.sender], _burnedAmount); totalSupply = SafeMath.sub(totalSupply, _burnedAmount); Burned(msg.sender, _burnedAmount); } /** * @dev Log Events */ event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Burned(address indexed _target, uint256 _value); } /** * @title Asset * @dev Initial supply creation */ contract Asset is ERC20Token { string public name = 'ZECASH'; uint8 public decimals = 18; string public symbol = 'ZCH'; string public version = '1'; function Asset() public { totalSupply = 500000000 * (10**uint256(decimals)); //initial token creation balances[msg.sender] = totalSupply; Transfer(0, this, totalSupply); Transfer(this, msg.sender, balances[msg.sender]); } /** * @dev Function to handle callback calls */ function() public { revert(); } }
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":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newAdmin","type":"address"}],"name":"transferAdminship","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"value","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_burnedAmount","type":"uint256"}],"name":"burnToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"lockSupply","outputs":[{"name":"","type":"bool"}],"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":"admin","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_set","type":"bool"}],"name":"setSupplyLock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":false,"stateMutability":"nonpayable","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":"_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":"_target","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Burned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_set","type":"bool"}],"name":"SetSupplyLock","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newAdminister","type":"address"}],"name":"TransferAdminship","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"administer","type":"address"}],"name":"Admined","type":"event"}]
Contract Creation Code
606060405260408051908101604052600681527f5a454341534800000000000000000000000000000000000000000000000000006020820152600490805161004b9291602001906101f2565b506005805460ff1916601217905560408051908101604052600381527f5a43480000000000000000000000000000000000000000000000000000000000602082015260069080516100a09291602001906101f2565b5060408051908101604052600181527f3100000000000000000000000000000000000000000000000000000000000000602082015260079080516100e89291602001906101f2565b5034156100f457600080fd5b60008054600160a060020a03191633600160a060020a0390811691909117918290557fa2b0867ddc9434a6620c27aae2ee7b19d3db53f3e7f059bdbecc3f2091e24f779116604051600160a060020a03909116815260200160405180910390a160055460ff16600a0a631dcd650002600181905533600160a060020a0390811660009081526002602052604080822084905530909216929091600080516020610cc783398151915291905190815260200160405180910390a3600160a060020a0333811660008181526002602052604090819020549192301691600080516020610cc7833981519152915190815260200160405180910390a361028d565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061023357805160ff1916838001178555610260565b82800160010185558215610260579182015b82811115610260578251825591602001919060010190610245565b5061026c929150610270565b5090565b61028a91905b8082111561026c5760008155600101610276565b90565b610a2b8061029c6000396000f3006060604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100ea578063095ea7b31461017457806318160ddd146101aa57806323b872dd146101cf578063313ce567146101f757806354fd4d50146102205780635be7cc161461023357806370a08231146102545780637b47ec1a1461027357806381eaf99b1461028957806395d89b411461029c578063a9059cbb146102af578063dd62ed3e146102d1578063f851a440146102f6578063fa51a2bf14610325575b34156100e557600080fd5b600080fd5b34156100f557600080fd5b6100fd61033d565b60405160208082528190810183818151815260200191508051906020019080838360005b83811015610139578082015183820152602001610121565b50505050905090810190601f1680156101665780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561017f57600080fd5b610196600160a060020a03600435166024356103db565b604051901515815260200160405180910390f35b34156101b557600080fd5b6101bd610481565b60405190815260200160405180910390f35b34156101da57600080fd5b610196600160a060020a0360043581169060243516604435610487565b341561020257600080fd5b61020a6105b2565b60405160ff909116815260200160405180910390f35b341561022b57600080fd5b6100fd6105bb565b341561023e57600080fd5b610252600160a060020a0360043516610626565b005b341561025f57600080fd5b6101bd600160a060020a03600435166106c5565b341561027e57600080fd5b6102526004356106e0565b341561029457600080fd5b6101966107af565b34156102a757600080fd5b6100fd6107d0565b34156102ba57600080fd5b610196600160a060020a036004351660243561083b565b34156102dc57600080fd5b6101bd600160a060020a0360043581169060243516610911565b341561030157600080fd5b61030961093c565b604051600160a060020a03909116815260200160405180910390f35b341561033057600080fd5b610252600435151561094b565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103d35780601f106103a8576101008083540402835291602001916103d3565b820191906000526020600020905b8154815290600101906020018083116103b657829003601f168201915b505050505081565b600081158061040d5750600160a060020a03338116600090815260036020908152604080832093871683529290522054155b151561041857600080fd5b600160a060020a03338116600081815260036020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60015481565b6000600160a060020a038316151561049e57600080fd5b600160a060020a03808516600090815260036020908152604080832033909416835292905220546104d5908363ffffffff6109d716565b600160a060020a03808616600081815260036020908152604080832033909516835293815283822094909455908152600290925290205461051c908363ffffffff6109d716565b600160a060020a038086166000908152600260205260408082209390935590851681522054610551908363ffffffff6109e916565b600160a060020a03808516600081815260026020526040908190209390935591908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b60055460ff1681565b60078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103d35780601f106103a8576101008083540402835291602001916103d3565b60005433600160a060020a0390811691161461064157600080fd5b600160a060020a038116151561065657600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117918290557f4f2723059e5730f1d4ffa943789d401722067ca1121b828944c6965dbd303e089116604051600160a060020a03909116815260200160405180910390a150565b600160a060020a031660009081526002602052604090205490565b60005433600160a060020a039081169116146106fb57600080fd5b60005474010000000000000000000000000000000000000000900460ff161561072357600080fd5b600160a060020a03331660009081526002602052604090205461074690826109d7565b600160a060020a03331660009081526002602052604090205560015461076c90826109d7565b600155600160a060020a0333167f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df78260405190815260200160405180910390a250565b60005474010000000000000000000000000000000000000000900460ff1681565b60068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103d35780601f106103a8576101008083540402835291602001916103d3565b6000600160a060020a038316151561085257600080fd5b600160a060020a03331660009081526002602052604090205461087b908363ffffffff6109d716565b600160a060020a0333811660009081526002602052604080822093909355908516815220546108b0908363ffffffff6109e916565b600160a060020a0380851660008181526002602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b600054600160a060020a031681565b60005433600160a060020a0390811691161461096657600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000831515021790557fc66e378b596f3b01004d4ee4ade9faff42014dae2242d63966a6d66821500e6a81604051901515815260200160405180910390a150565b6000828211156109e357fe5b50900390565b6000828201838110156109f857fe5b93925050505600a165627a7a7230582061b59f48f7e07e283eb9d2e84b4bf782ce5f1ce8a0d654a1133d566a6370e32c0029ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
Deployed Bytecode
0x6060604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100ea578063095ea7b31461017457806318160ddd146101aa57806323b872dd146101cf578063313ce567146101f757806354fd4d50146102205780635be7cc161461023357806370a08231146102545780637b47ec1a1461027357806381eaf99b1461028957806395d89b411461029c578063a9059cbb146102af578063dd62ed3e146102d1578063f851a440146102f6578063fa51a2bf14610325575b34156100e557600080fd5b600080fd5b34156100f557600080fd5b6100fd61033d565b60405160208082528190810183818151815260200191508051906020019080838360005b83811015610139578082015183820152602001610121565b50505050905090810190601f1680156101665780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561017f57600080fd5b610196600160a060020a03600435166024356103db565b604051901515815260200160405180910390f35b34156101b557600080fd5b6101bd610481565b60405190815260200160405180910390f35b34156101da57600080fd5b610196600160a060020a0360043581169060243516604435610487565b341561020257600080fd5b61020a6105b2565b60405160ff909116815260200160405180910390f35b341561022b57600080fd5b6100fd6105bb565b341561023e57600080fd5b610252600160a060020a0360043516610626565b005b341561025f57600080fd5b6101bd600160a060020a03600435166106c5565b341561027e57600080fd5b6102526004356106e0565b341561029457600080fd5b6101966107af565b34156102a757600080fd5b6100fd6107d0565b34156102ba57600080fd5b610196600160a060020a036004351660243561083b565b34156102dc57600080fd5b6101bd600160a060020a0360043581169060243516610911565b341561030157600080fd5b61030961093c565b604051600160a060020a03909116815260200160405180910390f35b341561033057600080fd5b610252600435151561094b565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103d35780601f106103a8576101008083540402835291602001916103d3565b820191906000526020600020905b8154815290600101906020018083116103b657829003601f168201915b505050505081565b600081158061040d5750600160a060020a03338116600090815260036020908152604080832093871683529290522054155b151561041857600080fd5b600160a060020a03338116600081815260036020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60015481565b6000600160a060020a038316151561049e57600080fd5b600160a060020a03808516600090815260036020908152604080832033909416835292905220546104d5908363ffffffff6109d716565b600160a060020a03808616600081815260036020908152604080832033909516835293815283822094909455908152600290925290205461051c908363ffffffff6109d716565b600160a060020a038086166000908152600260205260408082209390935590851681522054610551908363ffffffff6109e916565b600160a060020a03808516600081815260026020526040908190209390935591908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b60055460ff1681565b60078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103d35780601f106103a8576101008083540402835291602001916103d3565b60005433600160a060020a0390811691161461064157600080fd5b600160a060020a038116151561065657600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117918290557f4f2723059e5730f1d4ffa943789d401722067ca1121b828944c6965dbd303e089116604051600160a060020a03909116815260200160405180910390a150565b600160a060020a031660009081526002602052604090205490565b60005433600160a060020a039081169116146106fb57600080fd5b60005474010000000000000000000000000000000000000000900460ff161561072357600080fd5b600160a060020a03331660009081526002602052604090205461074690826109d7565b600160a060020a03331660009081526002602052604090205560015461076c90826109d7565b600155600160a060020a0333167f696de425f79f4a40bc6d2122ca50507f0efbeabbff86a84871b7196ab8ea8df78260405190815260200160405180910390a250565b60005474010000000000000000000000000000000000000000900460ff1681565b60068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103d35780601f106103a8576101008083540402835291602001916103d3565b6000600160a060020a038316151561085257600080fd5b600160a060020a03331660009081526002602052604090205461087b908363ffffffff6109d716565b600160a060020a0333811660009081526002602052604080822093909355908516815220546108b0908363ffffffff6109e916565b600160a060020a0380851660008181526002602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b600054600160a060020a031681565b60005433600160a060020a0390811691161461096657600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000831515021790557fc66e378b596f3b01004d4ee4ade9faff42014dae2242d63966a6d66821500e6a81604051901515815260200160405180910390a150565b6000828211156109e357fe5b50900390565b6000828201838110156109f857fe5b93925050505600a165627a7a7230582061b59f48f7e07e283eb9d2e84b4bf782ce5f1ce8a0d654a1133d566a6370e32c0029
Swarm Source
bzzr://61b59f48f7e07e283eb9d2e84b4bf782ce5f1ce8a0d654a1133d566a6370e32c
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.