Contract 0x087f0e53cbb012ed782abff64f8eee75b96405cb

 

Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
Warning: The compiled contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) Solidity Compiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: DiamondProjectToken
Compiler Version: v0.4.21+commit.dfe3193c
Optimization Enabled: Yes
Runs (Optimizer):  200


Contract Source Code
pragma solidity ^ 0.4.18;
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) {
        uint256 c = a / b;
        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;
    }
}
contract DiamondProjectToken {
    using SafeMath
    for uint256;
    mapping(address => mapping(address => uint256)) allowed;
    mapping(address => uint256) balances;
    uint256 public totalSupply;
    uint256 public decimals;
    address public owner;
    bytes32 public symbol;
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed _owner, address indexed spender, uint256 value);

    function DiamondProjectToken() {
        totalSupply = 50000000;
        symbol = 'DMP';
        owner = 0x7Fd988ab4959E0cb4428613DA7B252A3500f1178;
        balances[owner] = totalSupply;
        decimals = 0;
    }

    function balanceOf(address _owner) constant returns(uint256 balance) {
        return balances[_owner];
    }

    function allowance(address _owner, address _spender) constant returns(uint256 remaining) {
        return allowed[_owner][_spender];
    }

    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;
    }

    function transferFrom(address _from, address _to, uint256 _value) returns(bool) {
        var _allowance = allowed[_from][msg.sender];
        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;
    }

    function approve(address _spender, uint256 _value) returns(bool) {
        require((_value == 0) || (allowed[msg.sender][_spender] == 0));
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

    function() {
        revert();
    }
}

Contract ABI
[{"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":"decimals","outputs":[{"name":"","type":"uint256"}],"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":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"bytes32"}],"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":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","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"}]

Contract Creation Code
6060604052341561000f57600080fd5b6302faf08060028190557f444d50000000000000000000000000000000000000000000000000000000000060055560048054600160a060020a031916737fd988ab4959e0cb4428613da7b252a3500f11781790819055600160a060020a031660009081526001602052604081209190915560035561050f806100926000396000f3006060604052600436106100985763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663095ea7b381146100a857806318160ddd146100de57806323b872dd14610103578063313ce5671461012b57806370a082311461013e5780638da5cb5b1461015d57806395d89b411461018c578063a9059cbb1461019f578063dd62ed3e146101c1575b34156100a357600080fd5b600080fd5b34156100b357600080fd5b6100ca600160a060020a03600435166024356101e6565b604051901515815260200160405180910390f35b34156100e957600080fd5b6100f1610288565b60405190815260200160405180910390f35b341561010e57600080fd5b6100ca600160a060020a036004358116906024351660443561028e565b341561013657600080fd5b6100f161039d565b341561014957600080fd5b6100f1600160a060020a03600435166103a3565b341561016857600080fd5b6101706103be565b604051600160a060020a03909116815260200160405180910390f35b341561019757600080fd5b6100f16103cd565b34156101aa57600080fd5b6100ca600160a060020a03600435166024356103d3565b34156101cc57600080fd5b6100f1600160a060020a0360043581169060243516610492565b60008115806102165750600160a060020a0333811660009081526020818152604080832093871683529290522054155b151561022157600080fd5b600160a060020a0333811660008181526020818152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60025481565b600160a060020a038084166000908152602081815260408083203385168452825280832054938616835260019091528120549091906102d3908463ffffffff6104bb16565b600160a060020a038086166000908152600160205260408082209390935590871681522054610308908463ffffffff6104d116565b600160a060020a038616600090815260016020526040902055610331818463ffffffff6104d116565b600160a060020a0380871660008181526020818152604080832033861684529091529081902093909355908616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3506001949350505050565b60035481565b600160a060020a031660009081526001602052604090205490565b600454600160a060020a031681565b60055481565b600160a060020a0333166000908152600160205260408120546103fc908363ffffffff6104d116565b600160a060020a033381166000908152600160205260408082209390935590851681522054610431908363ffffffff6104bb16565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a0391821660009081526020818152604080832093909416825291909152205490565b6000828201838110156104ca57fe5b9392505050565b6000828211156104dd57fe5b509003905600a165627a7a7230582035f22d83362ef1775bac9c862683182deed6bce597f7d328e89b493dd352a2a80029


   Swarm Source:
bzzr://35f22d83362ef1775bac9c862683182deed6bce597f7d328e89b493dd352a2a8
Block Age transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.