ERC-20
Overview
Max Total Supply
578,362.44 DESP
Holders
11
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
103,500 DESPValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
DESP
Compiler Version
v0.4.17+commit.bdeb9e52
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2017-10-10 */ pragma solidity ^0.4.16; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal constant returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal constant returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) constant returns (uint256); function transfer(address to, uint256 value) returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) returns (bool) { balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant returns (uint256); function transferFrom(address from, address to, uint256 value) returns (bool); function approve(address spender, uint256 value) returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amout of tokens to be transfered */ function transferFrom(address _from, address _to, uint256 _value) returns (bool) { var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_to] = balances[_to].add(_value); balances[_from] = balances[_from].sub(_value); allowed[_from][msg.sender] = _allowance.sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) returns (bool) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 require((_value == 0) || (allowed[msg.sender][_spender] == 0)); allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifing the amount of tokens still avaible for the spender. */ function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } } contract DESP is StandardToken { // Constants // ========= string public constant name = "Decentralized Escrow Private Token"; string public constant symbol = "DESP"; uint public constant decimals = 18; address public constant wallet = 0x51559EfC1AcC15bcAfc7E0C2fB440848C136A46B; // State variables // =============== uint public ethCollected; bool public hasFinished; function price(uint _v) public constant returns (uint) { return // poor man's binary search _v < 7 ether ? _v < 3 ether ? _v < 1 ether ? 1000 : _v < 2 ether ? 1005 : 1010 : _v < 4 ether ? 1015 : _v < 5 ether ? 1020 : 1030 : _v < 14 ether ? _v < 10 ether ? _v < 9 ether ? 1040 : 1050 : 1080 : _v < 100 ether ? _v < 20 ether ? 1110 : 1150 : 1200; } // Public functions // ========================= function() public payable { require(!hasFinished); ethCollected += msg.value; uint _tokenValue = msg.value * price(msg.value); balances[msg.sender] += _tokenValue; totalSupply += _tokenValue; Transfer(0x0, msg.sender, _tokenValue); } // Owner can withdraw all the money at any time function withdraw() public { wallet.transfer(this.balance); } function finish() public { require(msg.sender == wallet); hasFinished = true; } }
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":"","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":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_v","type":"uint256"}],"name":"price","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"wallet","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","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":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ethCollected","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"finish","outputs":[],"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":"hasFinished","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"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":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"}]
Contract Creation Code
6060604052341561000f57600080fd5b6108fe8061001e6000396000f300606060405236156100d85763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610165578063095ea7b3146101ef57806318160ddd1461022557806323b872dd1461024a57806326a49e3714610272578063313ce567146102885780633ccfd60b1461029b578063521eb273146102b057806370a08231146102df57806395d89b41146102fe578063a9059cbb14610311578063bee2e13414610333578063d56b288914610346578063dd62ed3e14610359578063fe5815a61461037e575b60045460009060ff16156100eb57600080fd5b60038054349081019091556100ff90610391565b600160a060020a03331660008181526001602052604080822080543495909502948501905581548401825592935090917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a350005b341561017057600080fd5b6101786104a2565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101b457808201518382015260200161019c565b50505050905090810190601f1680156101e15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101fa57600080fd5b610211600160a060020a0360043516602435610502565b604051901515815260200160405180910390f35b341561023057600080fd5b6102386105a8565b60405190815260200160405180910390f35b341561025557600080fd5b610211600160a060020a03600435811690602435166044356105ae565b341561027d57600080fd5b610238600435610391565b341561029357600080fd5b6102386106c1565b34156102a657600080fd5b6102ae6106c6565b005b34156102bb57600080fd5b6102c361070f565b604051600160a060020a03909116815260200160405180910390f35b34156102ea57600080fd5b610238600160a060020a0360043516610727565b341561030957600080fd5b610178610742565b341561031c57600080fd5b610211600160a060020a0360043516602435610779565b341561033e57600080fd5b610238610838565b341561035157600080fd5b6102ae61083e565b341561036457600080fd5b610238600160a060020a0360043581169060243516610876565b341561038957600080fd5b6102116108a1565b6000676124fee993bc000082106104215767c249fdd32778000082106103ea5768056bc75e2d6310000082106103c9576104b06103e5565b6801158e460913d0000082106103e15761047e6103e5565b6104565b61041c565b678ac7230489e8000082106104015761043861041c565b677ce66c50e284000082106104185761041a61041c565b6104105b610498565b6729a2241af62c0000821061046657673782dace9d900000821061045e57674563918244f400008210610456576104066103e5565b6103fc61041c565b6103f7610498565b670de0b6b3a7640000821061049457671bc16d674ec80000821061048c576103f261041c565b6103ed610498565b6103e85b61ffff1692915050565b606060405190810160405280602281526020017f446563656e7472616c697a656420457363726f77205072697661746520546f6b81526020017f656e00000000000000000000000000000000000000000000000000000000000081525081565b60008115806105345750600160a060020a03338116600090815260026020908152604080832093871683529290522054155b151561053f57600080fd5b600160a060020a03338116600081815260026020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b600160a060020a0380841660009081526002602090815260408083203385168452825280832054938616835260019091528120549091906105f5908463ffffffff6108aa16565b600160a060020a03808616600090815260016020526040808220939093559087168152205461062a908463ffffffff6108c016565b600160a060020a038616600090815260016020526040902055610653818463ffffffff6108c016565b600160a060020a03808716600081815260026020908152604080832033861684529091529081902093909355908616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3506001949350505050565b601281565b7351559efc1acc15bcafc7e0c2fb440848c136a46b30600160a060020a03163180156108fc0290604051600060405180830381858888f19350505050151561070d57600080fd5b565b7351559efc1acc15bcafc7e0c2fb440848c136a46b81565b600160a060020a031660009081526001602052604090205490565b60408051908101604052600481527f4445535000000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a0333166000908152600160205260408120546107a2908363ffffffff6108c016565b600160a060020a0333811660009081526001602052604080822093909355908516815220546107d7908363ffffffff6108aa16565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b60035481565b33600160a060020a03167351559efc1acc15bcafc7e0c2fb440848c136a46b1461086757600080fd5b6004805460ff19166001179055565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60045460ff1681565b6000828201838110156108b957fe5b9392505050565b6000828211156108cc57fe5b509003905600a165627a7a723058202bf7c5a15dac17dedca80c6a5a41dee3782bf084eaa34a66e35191d92cc5536c0029
Deployed Bytecode
0x606060405236156100d85763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610165578063095ea7b3146101ef57806318160ddd1461022557806323b872dd1461024a57806326a49e3714610272578063313ce567146102885780633ccfd60b1461029b578063521eb273146102b057806370a08231146102df57806395d89b41146102fe578063a9059cbb14610311578063bee2e13414610333578063d56b288914610346578063dd62ed3e14610359578063fe5815a61461037e575b60045460009060ff16156100eb57600080fd5b60038054349081019091556100ff90610391565b600160a060020a03331660008181526001602052604080822080543495909502948501905581548401825592935090917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a350005b341561017057600080fd5b6101786104a2565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101b457808201518382015260200161019c565b50505050905090810190601f1680156101e15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101fa57600080fd5b610211600160a060020a0360043516602435610502565b604051901515815260200160405180910390f35b341561023057600080fd5b6102386105a8565b60405190815260200160405180910390f35b341561025557600080fd5b610211600160a060020a03600435811690602435166044356105ae565b341561027d57600080fd5b610238600435610391565b341561029357600080fd5b6102386106c1565b34156102a657600080fd5b6102ae6106c6565b005b34156102bb57600080fd5b6102c361070f565b604051600160a060020a03909116815260200160405180910390f35b34156102ea57600080fd5b610238600160a060020a0360043516610727565b341561030957600080fd5b610178610742565b341561031c57600080fd5b610211600160a060020a0360043516602435610779565b341561033e57600080fd5b610238610838565b341561035157600080fd5b6102ae61083e565b341561036457600080fd5b610238600160a060020a0360043581169060243516610876565b341561038957600080fd5b6102116108a1565b6000676124fee993bc000082106104215767c249fdd32778000082106103ea5768056bc75e2d6310000082106103c9576104b06103e5565b6801158e460913d0000082106103e15761047e6103e5565b6104565b61041c565b678ac7230489e8000082106104015761043861041c565b677ce66c50e284000082106104185761041a61041c565b6104105b610498565b6729a2241af62c0000821061046657673782dace9d900000821061045e57674563918244f400008210610456576104066103e5565b6103fc61041c565b6103f7610498565b670de0b6b3a7640000821061049457671bc16d674ec80000821061048c576103f261041c565b6103ed610498565b6103e85b61ffff1692915050565b606060405190810160405280602281526020017f446563656e7472616c697a656420457363726f77205072697661746520546f6b81526020017f656e00000000000000000000000000000000000000000000000000000000000081525081565b60008115806105345750600160a060020a03338116600090815260026020908152604080832093871683529290522054155b151561053f57600080fd5b600160a060020a03338116600081815260026020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b600160a060020a0380841660009081526002602090815260408083203385168452825280832054938616835260019091528120549091906105f5908463ffffffff6108aa16565b600160a060020a03808616600090815260016020526040808220939093559087168152205461062a908463ffffffff6108c016565b600160a060020a038616600090815260016020526040902055610653818463ffffffff6108c016565b600160a060020a03808716600081815260026020908152604080832033861684529091529081902093909355908616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3506001949350505050565b601281565b7351559efc1acc15bcafc7e0c2fb440848c136a46b30600160a060020a03163180156108fc0290604051600060405180830381858888f19350505050151561070d57600080fd5b565b7351559efc1acc15bcafc7e0c2fb440848c136a46b81565b600160a060020a031660009081526001602052604090205490565b60408051908101604052600481527f4445535000000000000000000000000000000000000000000000000000000000602082015281565b600160a060020a0333166000908152600160205260408120546107a2908363ffffffff6108c016565b600160a060020a0333811660009081526001602052604080822093909355908516815220546107d7908363ffffffff6108aa16565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b60035481565b33600160a060020a03167351559efc1acc15bcafc7e0c2fb440848c136a46b1461086757600080fd5b6004805460ff19166001179055565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60045460ff1681565b6000828201838110156108b957fe5b9392505050565b6000828211156108cc57fe5b509003905600a165627a7a723058202bf7c5a15dac17dedca80c6a5a41dee3782bf084eaa34a66e35191d92cc5536c0029
Swarm Source
bzzr://2bf7c5a15dac17dedca80c6a5a41dee3782bf084eaa34a66e35191d92cc5536c
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.