Contract 0xcbdaba5f8b1afd7b62d58a11df2803f61ce4b9e8

Contract Overview

Balance:
0 Ether
TxHash Block Age From To Value [TxFee]
0x0f695208ea8dbb64a62af00fb073e41628dd13dc6cf6110f045a28be8ae753ec367629067 days 19 hrs ago0x264d94e654999df8a67df4a2c43f1ca0c706aefd IN  0xcbdaba5f8b1afd7b62d58a11df2803f61ce4b9e80 Ether0.000055136
0xf343450f22b04e20897efd9d594aa314c5d29ad930891af57ef310f3ea27b67e367628967 days 19 hrs ago0x264d94e654999df8a67df4a2c43f1ca0c706aefd IN  0xcbdaba5f8b1afd7b62d58a11df2803f61ce4b9e80 Ether0.000055136
0xa4645925d25ec562e9c2520e175cf8aa1cee8fa539addd47bb7a7c7adf8e48b1367628767 days 19 hrs ago0x264d94e654999df8a67df4a2c43f1ca0c706aefd IN  0xcbdaba5f8b1afd7b62d58a11df2803f61ce4b9e80 Ether0.000051544
0x2f0dc2a898ed55be55e358143edde81afc4e3a83c8e06c7c86b3ead0fcafc727367628467 days 19 hrs ago0x264d94e654999df8a67df4a2c43f1ca0c706aefd IN  Contract Creation0 Ether0.002951439
[ Download CSV Export 

Latest 1 internal transaction Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
0xa4645925d25ec562e9c2520e175cf8aa1cee8fa539addd47bb7a7c7adf8e48b1367628767 days 19 hrs ago0xcbdaba5f8b1afd7b62d58a11df2803f61ce4b9e80x264d94e654999df8a67df4a2c43f1ca0c706aefd0 Ether
[ Download CSV Export 

Contract Source Code Verified (Exact Match)

Contract Name:
WenShireCoin

Compiler Version
v0.4.18+commit.9cf6e910

Optimization Enabled:
No

Runs (Optimizer):
200

Contract Source Code

pragma solidity ^0.4.18;

contract WenShireCoin {
    /* This creates an array with all balances */
    mapping (address => uint256) public balanceOf;

    string public name = "WenShireCoin";
    string public symbol = "WSC";
    uint256 public max_supply = 10000000000000;
    uint256 public unspent_supply = 0;
    uint256 public spendable_supply = 0;
    uint256 public circulating_supply = 0;
    uint256 public decimals = 6;
    uint256 public reward = 50000000;
    uint256 public timeOfLastHalving = now;
    uint public timeOfLastIncrease = now;

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Mint(address indexed from, uint256 value);

    /* Initializes contract with initial supply tokens to the creator of the contract */
    function WenShireCoin() public {
      timeOfLastHalving = now;
    }

    function updateSupply() internal returns (uint256) {

      if (now - timeOfLastHalving >= 2100000 minutes) {
        reward /= 2;
        timeOfLastHalving = now;
      }

      if (now - timeOfLastIncrease >= 150 seconds) {
        uint256 increaseAmount = ((now - timeOfLastIncrease) / 150 seconds) * reward;
        spendable_supply += increaseAmount;
        unspent_supply += increaseAmount;
        timeOfLastIncrease = now;
      }

      circulating_supply = spendable_supply - unspent_supply;

      return circulating_supply;
    }

    /* Send coins */
    function transfer(address _to, uint256 _value) public {
        require(balanceOf[msg.sender] >= _value);           // Check if the sender has enough
        require(balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows
        balanceOf[msg.sender] -= _value;                    // Subtract from the sender
        balanceOf[_to] += _value;                           // Add the same to the recipient

        updateSupply();

        /* Notify anyone listening that the transfer took place */
        Transfer(msg.sender, _to, _value);

    }
    /* Mint new coins by sending ether */
    function mint() public payable {
        require(balanceOf[msg.sender] + _value >= balanceOf[msg.sender]); // Check for overflows
        uint256 _value = msg.value / 100000000;

        updateSupply();

        require(unspent_supply - _value <= unspent_supply);
        unspent_supply -= _value; // Remove from unspent supply
        balanceOf[msg.sender] += _value; // Add the same to the recipient

        updateSupply();

        /* Notify anyone listening that the minting took place */
        Mint(msg.sender, _value);

    }

    function withdraw(uint256 amountToWithdraw) public returns (bool) {

        // Balance given in HOW

        require(balanceOf[msg.sender] >= amountToWithdraw);
        require(balanceOf[msg.sender] - amountToWithdraw <= balanceOf[msg.sender]);

        // Balance checked in HOW, then converted into Wei
        balanceOf[msg.sender] -= amountToWithdraw;

        // Added back to supply in HOW
        unspent_supply += amountToWithdraw;
        // Converted into Wei
        amountToWithdraw *= 100000000;

        // Transfered in Wei
        msg.sender.transfer(amountToWithdraw);

        updateSupply();

        return true;
    }
}

Contract ABI

[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"mint","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"unspent_supply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"reward","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amountToWithdraw","type":"uint256"}],"name":"withdraw","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":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"max_supply","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":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"timeOfLastHalving","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"spendable_supply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"timeOfLastIncrease","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"circulating_supply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","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":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Mint","type":"event"}]

Contract Creation Code

60606040526040805190810160405280600c81526020017f57656e5368697265436f696e00000000000000000000000000000000000000008152506001908051906020019061004f9291906100e1565b506040805190810160405280600381526020017f57534300000000000000000000000000000000000000000000000000000000008152506002908051906020019061009b9291906100e1565b506509184e72a00060035560006004556000600555600060065560066007556302faf0806008554260095542600a5534156100d557600080fd5b42600981905550610186565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061012257805160ff1916838001178555610150565b82800160010185558215610150579182015b8281111561014f578251825591602001919060010190610134565b5b50905061015d9190610161565b5090565b61018391905b8082111561017f576000816000905550600101610167565b5090565b90565b610b42806101956000396000f3006060604052600436106100d0576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100d55780631249c58b146101635780631796b2ca1461016d578063228cb733146101965780632e1a7d4d146101bf578063313ce567146101fa57806370a08231146102235780638a333b501461027057806395d89b4114610299578063a9059cbb14610327578063c11bd45514610369578063c1fd258014610392578063dfbb70c9146103bb578063e038c75a146103e4575b600080fd5b34156100e057600080fd5b6100e861040d565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561012857808201518184015260208101905061010d565b50505050905090810190601f1680156101555780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61016b6104ab565b005b341561017857600080fd5b610180610620565b6040518082815260200191505060405180910390f35b34156101a157600080fd5b6101a9610626565b6040518082815260200191505060405180910390f35b34156101ca57600080fd5b6101e0600480803590602001909190505061062c565b604051808215151515815260200191505060405180910390f35b341561020557600080fd5b61020d6107bf565b6040518082815260200191505060405180910390f35b341561022e57600080fd5b61025a600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506107c5565b6040518082815260200191505060405180910390f35b341561027b57600080fd5b6102836107dd565b6040518082815260200191505060405180910390f35b34156102a457600080fd5b6102ac6107e3565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102ec5780820151818401526020810190506102d1565b50505050905090810190601f1680156103195780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561033257600080fd5b610367600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610881565b005b341561037457600080fd5b61037c610a65565b6040518082815260200191505060405180910390f35b341561039d57600080fd5b6103a5610a6b565b6040518082815260200191505060405180910390f35b34156103c657600080fd5b6103ce610a71565b6040518082815260200191505060405180910390f35b34156103ef57600080fd5b6103f7610a77565b6040518082815260200191505060405180910390f35b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104a35780601f10610478576101008083540402835291602001916104a3565b820191906000526020600020905b81548152906001019060200180831161048657829003601f168201915b505050505081565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054011015151561053a57600080fd5b6305f5e1003481151561054957fe5b049050610554610a7d565b5060045481600454031115151561056a57600080fd5b80600460008282540392505081905550806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506105ce610a7d565b503373ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885826040518082815260200191505060405180910390a250565b60045481565b60085481565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561067b57600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054031115151561070857600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816004600082825401925050819055506305f5e100820291503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505015156107ad57600080fd5b6107b5610a7d565b5060019050919050565b60075481565b60006020528060005260406000206000915090505481565b60035481565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108795780601f1061084e57610100808354040283529160200191610879565b820191906000526020600020905b81548152906001019060200180831161085c57829003601f168201915b505050505081565b806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156108ce57600080fd5b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054011015151561095b57600080fd5b806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506109fb610a7d565b508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60095481565b60055481565b600a5481565b60065481565b6000806307829b806009544203101515610ab357600260086000828254811515610aa357fe5b0492505081905550426009819055505b6096600a544203101515610b00576008546096600a544203811515610ad457fe5b04029050806005600082825401925050819055508060046000828254019250508190555042600a819055505b60045460055403600681905550600654915050905600a165627a7a7230582055eec8218976c026a33c98f70ba17b3b00f412a7ac0dbd4f7c1deb2d8424d09c0029

Swarm Source

bzzr://55eec8218976c026a33c98f70ba17b3b00f412a7ac0dbd4f7c1deb2d8424d09c
Block Age Transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward