ERC-20
Overview
Max Total Supply
100,000,000 ERC-20 TOKEN*
Holders
6,023
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 8 Decimals)
Balance
9,030 ERC-20 TOKEN*Value
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
DimonCoin
Compiler Version
v0.4.16+commit.d7661dd9
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2017-10-20 */ pragma solidity ^0.4.16; contract ForeignToken { function balanceOf(address _owner) public constant returns (uint256); function transfer(address _to, uint256 _value) public returns (bool); } contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public constant returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract DimonCoin is ERC20 { address owner = msg.sender; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; uint256 public totalSupply = 100000000 * 10**8; function name() public constant returns (string) { return "DimonCoin"; } function symbol() public constant returns (string) { return "FUDD"; } function decimals() public constant returns (uint8) { return 8; } event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event DistrFinished(); bool public distributionFinished = false; modifier canDistr() { require(!distributionFinished); _; } function DimonCoin() public { owner = msg.sender; balances[msg.sender] = totalSupply; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address newOwner) onlyOwner public { owner = newOwner; } function getEthBalance(address _addr) constant public returns(uint) { return _addr.balance; } function distributeFUDD(address[] addresses, uint256 _value, uint256 _ethbal) onlyOwner canDistr public { for (uint i = 0; i < addresses.length; i++) { if (getEthBalance(addresses[i]) < _ethbal) { continue; } balances[owner] -= _value; balances[addresses[i]] += _value; Transfer(owner, addresses[i], _value); } } function balanceOf(address _owner) constant public returns (uint256) { return balances[_owner]; } // mitigates the ERC20 short address attack modifier onlyPayloadSize(uint size) { assert(msg.data.length >= size + 4); _; } function transfer(address _to, uint256 _amount) onlyPayloadSize(2 * 32) public returns (bool success) { if (balances[msg.sender] >= _amount && _amount > 0 && balances[_to] + _amount > balances[_to]) { balances[msg.sender] -= _amount; balances[_to] += _amount; Transfer(msg.sender, _to, _amount); return true; } else { return false; } } function transferFrom(address _from, address _to, uint256 _amount) onlyPayloadSize(3 * 32) public returns (bool success) { if (balances[_from] >= _amount && allowed[_from][msg.sender] >= _amount && _amount > 0 && balances[_to] + _amount > balances[_to]) { balances[_from] -= _amount; allowed[_from][msg.sender] -= _amount; balances[_to] += _amount; Transfer(_from, _to, _amount); return true; } else { return false; } } function approve(address _spender, uint256 _value) public 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 public returns (uint256) { return allowed[_owner][_spender]; } function finishDistribution() onlyOwner public returns (bool) { distributionFinished = true; DistrFinished(); return true; } function withdrawForeignTokens(address _tokenContract) public returns (bool) { require(msg.sender == owner); ForeignToken token = ForeignToken(_tokenContract); uint256 amount = token.balanceOf(address(this)); return token.transfer(owner, amount); } }
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":false,"inputs":[{"name":"addresses","type":"address[]"},{"name":"_value","type":"uint256"},{"name":"_ethbal","type":"uint256"}],"name":"distributeFUDD","outputs":[],"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":"_amount","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":"_addr","type":"address"}],"name":"getEthBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","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":"finishDistribution","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"distributionFinished","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenContract","type":"address"}],"name":"withdrawForeignTokens","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"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":[],"name":"DistrFinished","type":"event"}]
Contract Creation Code
606060405260018054600160a060020a03191633600160a060020a0316179055662386f26fc100006004556005805460ff19169055341561003f57600080fd5b5b60018054600160a060020a03191633600160a060020a0316908117909155600454600091825260026020526040909120555b5b610b42806100826000396000f300606060405236156100bf5763ffffffff60e060020a60003504166306fdde0381146100c4578063095ea7b31461014f578063173a48a41461018557806318160ddd146101dd57806323b872dd14610202578063313ce5671461023e5780634d2301cc1461026757806370a082311461029857806395d89b41146102c95780639b1cbccc14610354578063a9059cbb1461037b578063c108d542146103b1578063dd62ed3e146103d8578063e58fc54c1461040f578063f2fde38b14610442575b600080fd5b34156100cf57600080fd5b6100d7610463565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101145780820151818401525b6020016100fb565b50505050905090810190601f1680156101415780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015a57600080fd5b610171600160a060020a03600435166024356104a5565b604051901515815260200160405180910390f35b341561019057600080fd5b6101db60046024813581810190830135806020818102016040519081016040528093929190818152602001838360200280828437509496505084359460200135935061055192505050565b005b34156101e857600080fd5b6101f061067c565b60405190815260200160405180910390f35b341561020d57600080fd5b610171600160a060020a0360043581169060243516604435610682565b604051901515815260200160405180910390f35b341561024957600080fd5b6102516107b1565b60405160ff909116815260200160405180910390f35b341561027257600080fd5b6101f0600160a060020a03600435166107b7565b60405190815260200160405180910390f35b34156102a357600080fd5b6101f0600160a060020a03600435166107c8565b60405190815260200160405180910390f35b34156102d457600080fd5b6100d76107e7565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101145780820151818401525b6020016100fb565b50505050905090810190601f1680156101415780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561035f57600080fd5b610171610829565b604051901515815260200160405180910390f35b341561038657600080fd5b610171600160a060020a0360043516602435610888565b604051901515815260200160405180910390f35b34156103bc57600080fd5b610171610966565b604051901515815260200160405180910390f35b34156103e357600080fd5b6101f0600160a060020a036004358116906024351661096f565b60405190815260200160405180910390f35b341561041a57600080fd5b610171600160a060020a036004351661099c565b604051901515815260200160405180910390f35b341561044d57600080fd5b6101db600160a060020a0360043516610abc565b005b61046b610b04565b60408051908101604052600981527f44696d6f6e436f696e0000000000000000000000000000000000000000000000602082015290505b90565b600081158015906104da5750600160a060020a0333811660009081526003602090815260408083209387168352929052205415155b156104e75750600061054b565b600160a060020a03338116600081815260036020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b60015460009033600160a060020a0390811691161461056f57600080fd5b60055460ff161561057f57600080fd5b5060005b835181101561067357816105ab85838151811061059c57fe5b906020019060200201516107b7565b10156105b65761066b565b600154600160a060020a0316600090815260026020819052604082208054869003905584918684815181106105e757fe5b90602001906020020151600160a060020a0316815260208101919091526040016000208054909101905583818151811061061d57fe5b90602001906020020151600154600160a060020a0391821691167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405190815260200160405180910390a35b600101610583565b5b5b5b50505050565b60045481565b60006060606436101561069157fe5b600160a060020a0385166000908152600260205260409020548390108015906106e15750600160a060020a0380861660009081526003602090815260408083203390941683529290522054839010155b80156106ed5750600083115b80156107125750600160a060020a038416600090815260026020526040902054838101115b156107a257600160a060020a03808616600081815260026020818152604080842080548a90039055600382528084203387168552825280842080548a9003905594891680845291905290839020805487019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3600191506107a7565b600091505b5b5b509392505050565b60085b90565b600160a060020a038116315b919050565b600160a060020a0381166000908152600260205260409020545b919050565b6107ef610b04565b60408051908101604052600481527f4655444400000000000000000000000000000000000000000000000000000000602082015290505b90565b60015460009033600160a060020a0390811691161461084757600080fd5b6005805460ff191660011790557f7f95d919e78bdebe8a285e6e33357c2fcb65ccf66e72d7573f9f8f6caad0c4cc60405160405180910390a15060015b5b90565b60006040604436101561089757fe5b600160a060020a0333166000908152600260205260409020548390108015906108c05750600083115b80156108e55750600160a060020a038416600090815260026020526040902054838101115b1561095857600160a060020a033381166000818152600260205260408082208054889003905592871680825290839020805487019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a36001915061095d565b600091505b5b5b5092915050565b60055460ff1681565b600160a060020a038083166000908152600360209081526040808320938516835292905220545b92915050565b6001546000908190819033600160a060020a039081169116146109be57600080fd5b83915081600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610a1857600080fd5b6102c65a03f11515610a2957600080fd5b5050506040518051600154909250600160a060020a03808516925063a9059cbb91168360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610a9857600080fd5b6102c65a03f11515610aa957600080fd5b50505060405180519350505b5050919050565b60015433600160a060020a03908116911614610ad757600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b602060405190810160405260008152905600a165627a7a72305820360328bfc11a529205bfd5e2cec6bcb4bb4033f972e6a00494d813e63b5bd4cf0029
Deployed Bytecode
0x606060405236156100bf5763ffffffff60e060020a60003504166306fdde0381146100c4578063095ea7b31461014f578063173a48a41461018557806318160ddd146101dd57806323b872dd14610202578063313ce5671461023e5780634d2301cc1461026757806370a082311461029857806395d89b41146102c95780639b1cbccc14610354578063a9059cbb1461037b578063c108d542146103b1578063dd62ed3e146103d8578063e58fc54c1461040f578063f2fde38b14610442575b600080fd5b34156100cf57600080fd5b6100d7610463565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101145780820151818401525b6020016100fb565b50505050905090810190601f1680156101415780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015a57600080fd5b610171600160a060020a03600435166024356104a5565b604051901515815260200160405180910390f35b341561019057600080fd5b6101db60046024813581810190830135806020818102016040519081016040528093929190818152602001838360200280828437509496505084359460200135935061055192505050565b005b34156101e857600080fd5b6101f061067c565b60405190815260200160405180910390f35b341561020d57600080fd5b610171600160a060020a0360043581169060243516604435610682565b604051901515815260200160405180910390f35b341561024957600080fd5b6102516107b1565b60405160ff909116815260200160405180910390f35b341561027257600080fd5b6101f0600160a060020a03600435166107b7565b60405190815260200160405180910390f35b34156102a357600080fd5b6101f0600160a060020a03600435166107c8565b60405190815260200160405180910390f35b34156102d457600080fd5b6100d76107e7565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101145780820151818401525b6020016100fb565b50505050905090810190601f1680156101415780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561035f57600080fd5b610171610829565b604051901515815260200160405180910390f35b341561038657600080fd5b610171600160a060020a0360043516602435610888565b604051901515815260200160405180910390f35b34156103bc57600080fd5b610171610966565b604051901515815260200160405180910390f35b34156103e357600080fd5b6101f0600160a060020a036004358116906024351661096f565b60405190815260200160405180910390f35b341561041a57600080fd5b610171600160a060020a036004351661099c565b604051901515815260200160405180910390f35b341561044d57600080fd5b6101db600160a060020a0360043516610abc565b005b61046b610b04565b60408051908101604052600981527f44696d6f6e436f696e0000000000000000000000000000000000000000000000602082015290505b90565b600081158015906104da5750600160a060020a0333811660009081526003602090815260408083209387168352929052205415155b156104e75750600061054b565b600160a060020a03338116600081815260036020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a35060015b92915050565b60015460009033600160a060020a0390811691161461056f57600080fd5b60055460ff161561057f57600080fd5b5060005b835181101561067357816105ab85838151811061059c57fe5b906020019060200201516107b7565b10156105b65761066b565b600154600160a060020a0316600090815260026020819052604082208054869003905584918684815181106105e757fe5b90602001906020020151600160a060020a0316815260208101919091526040016000208054909101905583818151811061061d57fe5b90602001906020020151600154600160a060020a0391821691167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405190815260200160405180910390a35b600101610583565b5b5b5b50505050565b60045481565b60006060606436101561069157fe5b600160a060020a0385166000908152600260205260409020548390108015906106e15750600160a060020a0380861660009081526003602090815260408083203390941683529290522054839010155b80156106ed5750600083115b80156107125750600160a060020a038416600090815260026020526040902054838101115b156107a257600160a060020a03808616600081815260026020818152604080842080548a90039055600382528084203387168552825280842080548a9003905594891680845291905290839020805487019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3600191506107a7565b600091505b5b5b509392505050565b60085b90565b600160a060020a038116315b919050565b600160a060020a0381166000908152600260205260409020545b919050565b6107ef610b04565b60408051908101604052600481527f4655444400000000000000000000000000000000000000000000000000000000602082015290505b90565b60015460009033600160a060020a0390811691161461084757600080fd5b6005805460ff191660011790557f7f95d919e78bdebe8a285e6e33357c2fcb65ccf66e72d7573f9f8f6caad0c4cc60405160405180910390a15060015b5b90565b60006040604436101561089757fe5b600160a060020a0333166000908152600260205260409020548390108015906108c05750600083115b80156108e55750600160a060020a038416600090815260026020526040902054838101115b1561095857600160a060020a033381166000818152600260205260408082208054889003905592871680825290839020805487019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a36001915061095d565b600091505b5b5b5092915050565b60055460ff1681565b600160a060020a038083166000908152600360209081526040808320938516835292905220545b92915050565b6001546000908190819033600160a060020a039081169116146109be57600080fd5b83915081600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610a1857600080fd5b6102c65a03f11515610a2957600080fd5b5050506040518051600154909250600160a060020a03808516925063a9059cbb91168360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610a9857600080fd5b6102c65a03f11515610aa957600080fd5b50505060405180519350505b5050919050565b60015433600160a060020a03908116911614610ad757600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b602060405190810160405260008152905600a165627a7a72305820360328bfc11a529205bfd5e2cec6bcb4bb4033f972e6a00494d813e63b5bd4cf0029
Swarm Source
bzzr://360328bfc11a529205bfd5e2cec6bcb4bb4033f972e6a00494d813e63b5bd4cf
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.