Feature Tip: Add private address tag to any address under My Name Tag !
ERC-20
Source Code
Compromised
Overview
Max Total Supply
3,965,716.097954617168886694 ERC-20 TOKEN*
Holders
272 (0.00%)
Transfers
-
0
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:
UselessEthereumToken
Compiler Version
v0.4.11+commit.68ef5810
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2017-06-28
*/
pragma solidity ^0.4.10;
contract ForeignToken {
function balanceOf(address _owner) constant returns (uint256);
function transfer(address _to, uint256 _value) returns (bool);
}
contract UselessEthereumToken {
address owner = msg.sender;
bool public purchasingAllowed = false;
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
uint256 public totalContribution = 0;
uint256 public totalBonusTokensIssued = 0;
uint256 public totalSupply = 0;
function name() constant returns (string) { return "Useless Ethereum Token"; }
function symbol() constant returns (string) { return "UET"; }
function decimals() constant returns (uint8) { return 18; }
function balanceOf(address _owner) constant returns (uint256) { return balances[_owner]; }
function transfer(address _to, uint256 _value) returns (bool success) {
// mitigates the ERC20 short address attack
if(msg.data.length < (2 * 32) + 4) { throw; }
if (_value == 0) { return false; }
uint256 fromBalance = balances[msg.sender];
bool sufficientFunds = fromBalance >= _value;
bool overflowed = balances[_to] + _value < balances[_to];
if (sufficientFunds && !overflowed) {
balances[msg.sender] -= _value;
balances[_to] += _value;
Transfer(msg.sender, _to, _value);
return true;
} else { return false; }
}
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
// mitigates the ERC20 short address attack
if(msg.data.length < (3 * 32) + 4) { throw; }
if (_value == 0) { return false; }
uint256 fromBalance = balances[_from];
uint256 allowance = allowed[_from][msg.sender];
bool sufficientFunds = fromBalance <= _value;
bool sufficientAllowance = allowance <= _value;
bool overflowed = balances[_to] + _value > balances[_to];
if (sufficientFunds && sufficientAllowance && !overflowed) {
balances[_to] += _value;
balances[_from] -= _value;
allowed[_from][msg.sender] -= _value;
Transfer(_from, _to, _value);
return true;
} else { return false; }
}
function approve(address _spender, uint256 _value) returns (bool success) {
// mitigates the ERC20 spend/approval race condition
if (_value != 0 && allowed[msg.sender][_spender] != 0) { return false; }
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
function allowance(address _owner, address _spender) constant returns (uint256) {
return allowed[_owner][_spender];
}
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function enablePurchasing() {
if (msg.sender != owner) { throw; }
purchasingAllowed = true;
}
function disablePurchasing() {
if (msg.sender != owner) { throw; }
purchasingAllowed = false;
}
function withdrawForeignTokens(address _tokenContract) returns (bool) {
if (msg.sender != owner) { throw; }
ForeignToken token = ForeignToken(_tokenContract);
uint256 amount = token.balanceOf(address(this));
return token.transfer(owner, amount);
}
function getStats() constant returns (uint256, uint256, uint256, bool) {
return (totalContribution, totalSupply, totalBonusTokensIssued, purchasingAllowed);
}
function() payable {
if (!purchasingAllowed) { throw; }
if (msg.value == 0) { return; }
owner.transfer(msg.value);
totalContribution += msg.value;
uint256 tokensIssued = (msg.value * 100);
if (msg.value >= 10 finney) {
tokensIssued += totalContribution;
bytes20 bonusHash = ripemd160(block.coinbase, block.number, block.timestamp);
if (bonusHash[0] == 0) {
uint8 bonusMultiplier =
((bonusHash[1] & 0x01 != 0) ? 1 : 0) + ((bonusHash[1] & 0x02 != 0) ? 1 : 0) +
((bonusHash[1] & 0x04 != 0) ? 1 : 0) + ((bonusHash[1] & 0x08 != 0) ? 1 : 0) +
((bonusHash[1] & 0x10 != 0) ? 1 : 0) + ((bonusHash[1] & 0x20 != 0) ? 1 : 0) +
((bonusHash[1] & 0x40 != 0) ? 1 : 0) + ((bonusHash[1] & 0x80 != 0) ? 1 : 0);
uint256 bonusTokensIssued = (msg.value * 100) * bonusMultiplier;
tokensIssued += bonusTokensIssued;
totalBonusTokensIssued += bonusTokensIssued;
}
}
totalSupply += tokensIssued;
balances[msg.sender] += tokensIssued;
Transfer(address(this), msg.sender, tokensIssued);
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"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":"totalContribution","outputs":[{"name":"","type":"uint256"}],"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":"disablePurchasing","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"enablePurchasing","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalBonusTokensIssued","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getStats","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"purchasingAllowed","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_tokenContract","type":"address"}],"name":"withdrawForeignTokens","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"payable":true,"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"}]Contract Creation Code
606060405260008054600160a060020a03191633600160a060020a03161760a060020a60ff021916815560038190556004819055600555341561003e57fe5b5b610de38061004e6000396000f300606060405236156100e35763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610482578063095ea7b3146105125780630dcf4b8f1461054557806318160ddd1461056757806323b872dd14610589578063313ce567146105c257806364acdb77146105e857806370a08231146105fa5780638f5809961461062857806395d89b411461063a57806398b01fe3146106ca578063a9059cbb146106ec578063c59d48471461071f578063da040c0f14610757578063dd62ed3e1461077b578063e58fc54c146107af575b6104805b6000600060006000600060149054906101000a900460ff16151561010b5760006000fd5b3415156101175761047a565b60008054604051600160a060020a03909116913480156108fc02929091818181858888f19350505050151561014857fe5b6003805434908101909155606481029450662386f26fc100009010610417576003548401935060034143426000604051602001526040518084600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401838152602001828152602001935050505060206040518083038160008661646e5a03f115156101d257fe5b5050604051516c010000000000000000000000000292508260005b1a60f860020a027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916600060f860020a021415610417578260015b1a60f860020a027f800000000000000000000000000000000000000000000000000000000000000016151561025e576000610261565b60015b8360015b1a60f860020a027f400000000000000000000000000000000000000000000000000000000000000016151561029b57600061029e565b60015b8460015b1a60f860020a027f20000000000000000000000000000000000000000000000000000000000000001615156102d85760006102db565b60015b8560015b1a60f860020a027f1000000000000000000000000000000000000000000000000000000000000000161515610315576000610318565b60015b8660015b1a60f860020a027f0800000000000000000000000000000000000000000000000000000000000000161515610352576000610355565b60015b8760015b1a60f860020a027f040000000000000000000000000000000000000000000000000000000000000016151561038f576000610392565b60015b8860015b1a60f860020a027f02000000000000000000000000000000000000000000000000000000000000001615156103cc5760006103cf565b60015b8960015b1a60f860020a9081021615156103ea5760006103ed565b60015b0101010101010191508160ff16346064020290508084019350806004600082825401925050819055505b5b6005805485019055600160a060020a033381166000818152600160209081526040918290208054890190558151888152915192933016927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35b50505050565b005b341561048a57fe5b6104926107df565b6040805160208082528351818301528351919283929083019185019080838382156104d8575b8051825260208311156104d857601f1990920191602091820191016104b8565b505050905090810190601f1680156105045780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561051a57fe5b610531600160a060020a0360043516602435610820565b604080519115158252519081900360200190f35b341561054d57fe5b6105556108c9565b60408051918252519081900360200190f35b341561056f57fe5b6105556108cf565b60408051918252519081900360200190f35b341561059157fe5b610531600160a060020a03600435811690602435166044356108d5565b604080519115158252519081900360200190f35b34156105ca57fe5b6105d2610a05565b6040805160ff9092168252519081900360200190f35b34156105f057fe5b610480610a0b565b005b341561060257fe5b610555600160a060020a0360043516610a48565b60408051918252519081900360200190f35b341561063057fe5b610480610a67565b005b341561064257fe5b610492610abb565b6040805160208082528351818301528351919283929083019185019080838382156104d8575b8051825260208311156104d857601f1990920191602091820191016104b8565b505050905090810190601f1680156105045780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156106d257fe5b610555610afc565b60408051918252519081900360200190f35b34156106f457fe5b610531600160a060020a0360043516602435610b02565b604080519115158252519081900360200190f35b341561072757fe5b61072f610be5565b6040805194855260208501939093528383019190915215156060830152519081900360800190f35b341561075f57fe5b610531610c13565b604080519115158252519081900360200190f35b341561078357fe5b610555600160a060020a0360043581169060243516610c34565b60408051918252519081900360200190f35b34156107b757fe5b610531600160a060020a0360043516610c61565b604080519115158252519081900360200190f35b6107e7610da5565b5060408051808201909152601681527f5573656c65737320457468657265756d20546f6b656e0000000000000000000060208201525b90565b600081158015906108555750600160a060020a0333811660009081526002602090815260408083209387168352929052205415155b15610862575060006108c3565b600160a060020a03338116600081815260026020908152604080832094881680845294825291829020869055815186815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a35060015b92915050565b60035481565b60055481565b6000808080808060643610156108eb5760006000fd5b8615156108fb57600095506109f8565b50505050600160a060020a03858116600090815260016020818152604080842054600283528185203387168652835281852054958a168552929091529091205490925084831180159186841115918782019190911190839061095a5750815b8015610964575080155b156109f357600160a060020a03808916600081815260016020908152604080832080548d0190558d851680845281842080548e90039055600283528184203390961684529482529182902080548c9003905581518b815291519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3600195506109f8565b600095505b5b50505050509392505050565b60125b90565b60005433600160a060020a03908116911614610a275760006000fd5b6000805474ff0000000000000000000000000000000000000000191690555b565b600160a060020a0381166000908152600160205260409020545b919050565b60005433600160a060020a03908116911614610a835760006000fd5b6000805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001790555b565b610ac3610da5565b5060408051808201909152600381527f554554000000000000000000000000000000000000000000000000000000000060208201525b90565b60045481565b60008080806044361015610b165760006000fd5b841515610b265760009350610bdb565b505050600160a060020a0333811660009081526001602052604080822054928616825290205483821080159180860110908290610b61575080155b15610bd657600160a060020a03338116600081815260016020908152604080832080548b90039055938a168083529184902080548a0190558351898152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a360019350610bdb565b600093505b5b50505092915050565b60035460055460045460005474010000000000000000000000000000000000000000900460ff165b90919293565b60005474010000000000000000000000000000000000000000900460ff1681565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b600080548190819033600160a060020a03908116911614610c825760006000fd5b83915081600160a060020a03166370a08231306000604051602001526040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b1515610cfe57fe5b6102c65a03f11515610d0c57fe5b505060408051805160008054602093840182905284517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0391821660048201526024810184905294519296508716945063a9059cbb936044808201949392918390030190829087803b1515610d8657fe5b6102c65a03f11515610d9457fe5b5050604051519350505b5050919050565b604080516020810190915260008152905600a165627a7a723058205c2bdd336a4dab4923173038bd49776df853db3c0cdf713e31ed6bb63a7657660029
Deployed Bytecode
0x606060405236156100e35763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610482578063095ea7b3146105125780630dcf4b8f1461054557806318160ddd1461056757806323b872dd14610589578063313ce567146105c257806364acdb77146105e857806370a08231146105fa5780638f5809961461062857806395d89b411461063a57806398b01fe3146106ca578063a9059cbb146106ec578063c59d48471461071f578063da040c0f14610757578063dd62ed3e1461077b578063e58fc54c146107af575b6104805b6000600060006000600060149054906101000a900460ff16151561010b5760006000fd5b3415156101175761047a565b60008054604051600160a060020a03909116913480156108fc02929091818181858888f19350505050151561014857fe5b6003805434908101909155606481029450662386f26fc100009010610417576003548401935060034143426000604051602001526040518084600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401838152602001828152602001935050505060206040518083038160008661646e5a03f115156101d257fe5b5050604051516c010000000000000000000000000292508260005b1a60f860020a027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916600060f860020a021415610417578260015b1a60f860020a027f800000000000000000000000000000000000000000000000000000000000000016151561025e576000610261565b60015b8360015b1a60f860020a027f400000000000000000000000000000000000000000000000000000000000000016151561029b57600061029e565b60015b8460015b1a60f860020a027f20000000000000000000000000000000000000000000000000000000000000001615156102d85760006102db565b60015b8560015b1a60f860020a027f1000000000000000000000000000000000000000000000000000000000000000161515610315576000610318565b60015b8660015b1a60f860020a027f0800000000000000000000000000000000000000000000000000000000000000161515610352576000610355565b60015b8760015b1a60f860020a027f040000000000000000000000000000000000000000000000000000000000000016151561038f576000610392565b60015b8860015b1a60f860020a027f02000000000000000000000000000000000000000000000000000000000000001615156103cc5760006103cf565b60015b8960015b1a60f860020a9081021615156103ea5760006103ed565b60015b0101010101010191508160ff16346064020290508084019350806004600082825401925050819055505b5b6005805485019055600160a060020a033381166000818152600160209081526040918290208054890190558151888152915192933016927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35b50505050565b005b341561048a57fe5b6104926107df565b6040805160208082528351818301528351919283929083019185019080838382156104d8575b8051825260208311156104d857601f1990920191602091820191016104b8565b505050905090810190601f1680156105045780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561051a57fe5b610531600160a060020a0360043516602435610820565b604080519115158252519081900360200190f35b341561054d57fe5b6105556108c9565b60408051918252519081900360200190f35b341561056f57fe5b6105556108cf565b60408051918252519081900360200190f35b341561059157fe5b610531600160a060020a03600435811690602435166044356108d5565b604080519115158252519081900360200190f35b34156105ca57fe5b6105d2610a05565b6040805160ff9092168252519081900360200190f35b34156105f057fe5b610480610a0b565b005b341561060257fe5b610555600160a060020a0360043516610a48565b60408051918252519081900360200190f35b341561063057fe5b610480610a67565b005b341561064257fe5b610492610abb565b6040805160208082528351818301528351919283929083019185019080838382156104d8575b8051825260208311156104d857601f1990920191602091820191016104b8565b505050905090810190601f1680156105045780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156106d257fe5b610555610afc565b60408051918252519081900360200190f35b34156106f457fe5b610531600160a060020a0360043516602435610b02565b604080519115158252519081900360200190f35b341561072757fe5b61072f610be5565b6040805194855260208501939093528383019190915215156060830152519081900360800190f35b341561075f57fe5b610531610c13565b604080519115158252519081900360200190f35b341561078357fe5b610555600160a060020a0360043581169060243516610c34565b60408051918252519081900360200190f35b34156107b757fe5b610531600160a060020a0360043516610c61565b604080519115158252519081900360200190f35b6107e7610da5565b5060408051808201909152601681527f5573656c65737320457468657265756d20546f6b656e0000000000000000000060208201525b90565b600081158015906108555750600160a060020a0333811660009081526002602090815260408083209387168352929052205415155b15610862575060006108c3565b600160a060020a03338116600081815260026020908152604080832094881680845294825291829020869055815186815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a35060015b92915050565b60035481565b60055481565b6000808080808060643610156108eb5760006000fd5b8615156108fb57600095506109f8565b50505050600160a060020a03858116600090815260016020818152604080842054600283528185203387168652835281852054958a168552929091529091205490925084831180159186841115918782019190911190839061095a5750815b8015610964575080155b156109f357600160a060020a03808916600081815260016020908152604080832080548d0190558d851680845281842080548e90039055600283528184203390961684529482529182902080548c9003905581518b815291519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3600195506109f8565b600095505b5b50505050509392505050565b60125b90565b60005433600160a060020a03908116911614610a275760006000fd5b6000805474ff0000000000000000000000000000000000000000191690555b565b600160a060020a0381166000908152600160205260409020545b919050565b60005433600160a060020a03908116911614610a835760006000fd5b6000805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001790555b565b610ac3610da5565b5060408051808201909152600381527f554554000000000000000000000000000000000000000000000000000000000060208201525b90565b60045481565b60008080806044361015610b165760006000fd5b841515610b265760009350610bdb565b505050600160a060020a0333811660009081526001602052604080822054928616825290205483821080159180860110908290610b61575080155b15610bd657600160a060020a03338116600081815260016020908152604080832080548b90039055938a168083529184902080548a0190558351898152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a360019350610bdb565b600093505b5b50505092915050565b60035460055460045460005474010000000000000000000000000000000000000000900460ff165b90919293565b60005474010000000000000000000000000000000000000000900460ff1681565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b600080548190819033600160a060020a03908116911614610c825760006000fd5b83915081600160a060020a03166370a08231306000604051602001526040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082600160a060020a0316600160a060020a03168152602001915050602060405180830381600087803b1515610cfe57fe5b6102c65a03f11515610d0c57fe5b505060408051805160008054602093840182905284517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0391821660048201526024810184905294519296508716945063a9059cbb936044808201949392918390030190829087803b1515610d8657fe5b6102c65a03f11515610d9457fe5b5050604051519350505b5050919050565b604080516020810190915260008152905600a165627a7a723058205c2bdd336a4dab4923173038bd49776df853db3c0cdf713e31ed6bb63a7657660029
Swarm Source
bzzr://5c2bdd336a4dab4923173038bd49776df853db3c0cdf713e31ed6bb63a765766
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.
Add Token to MetaMask (Web3)