ETH Price: $2,289.75 (-5.37%)

Token

WanCoin (WAN)
 

Overview

Max Total Supply

210,000,000 WAN

Holders

7,552

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Filtered by Token Holder
greekdx.eth
Balance
0.4 WAN

Value
$0.00
0x31e99699bccde902afc7c4b6b23bb322b8459d22
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
WanToken

Compiler Version
v0.4.13+commit.fb4cb1a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2017-10-02
*/

pragma solidity ^0.4.11;


/**
 * Math operations with safety checks
 */
library SafeMath {
  function mul(uint a, uint b) internal returns (uint) {
    uint c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function div(uint a, uint b) internal returns (uint) {
    assert(b > 0);
    uint c = a / b;
    assert(a == b * c + a % b);
    return c;
  }

  function sub(uint a, uint b) internal returns (uint) {
    assert(b <= a);
    return a - b;
  }

  function add(uint a, uint b) internal returns (uint) {
    uint c = a + b;
    assert(c >= a);
    return c;
  }

  function max64(uint64 a, uint64 b) internal constant returns (uint64) {
    return a >= b ? a : b;
  }

  function min64(uint64 a, uint64 b) internal constant returns (uint64) {
    return a < b ? a : b;
  }

  function max256(uint256 a, uint256 b) internal constant returns (uint256) {
    return a >= b ? a : b;
  }

  function min256(uint256 a, uint256 b) internal constant returns (uint256) {
    return a < b ? a : b;
  }
}


contract ERC20Protocol {
    /* This is a slight change to the ERC20 base standard.
    function totalSupply() constant returns (uint supply);
    is replaced with:
    uint public totalSupply;
    This automatically creates a getter function for the totalSupply.
    This is moved to the base contract since public getter functions are not
    currently recognised as an implementation of the matching abstract
    function by the compiler.
    */
    /// total amount of tokens
    uint public totalSupply;

    /// @param _owner The address from which the balance will be retrieved
    /// @return The balance
    function balanceOf(address _owner) constant returns (uint balance);

    /// @notice send `_value` token to `_to` from `msg.sender`
    /// @param _to The address of the recipient
    /// @param _value The amount of token to be transferred
    /// @return Whether the transfer was successful or not
    function transfer(address _to, uint _value) returns (bool success);

    /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
    /// @param _from The address of the sender
    /// @param _to The address of the recipient
    /// @param _value The amount of token to be transferred
    /// @return Whether the transfer was successful or not
    function transferFrom(address _from, address _to, uint _value) returns (bool success);

    /// @notice `msg.sender` approves `_spender` to spend `_value` tokens
    /// @param _spender The address of the account able to transfer the tokens
    /// @param _value The amount of tokens to be approved for transfer
    /// @return Whether the approval was successful or not
    function approve(address _spender, uint _value) returns (bool success);

    /// @param _owner The address of the account owning tokens
    /// @param _spender The address of the account able to transfer the tokens
    /// @return Amount of remaining tokens allowed to spent
    function allowance(address _owner, address _spender) constant returns (uint remaining);

    event Transfer(address indexed _from, address indexed _to, uint _value);
    event Approval(address indexed _owner, address indexed _spender, uint _value);
}


contract StandardToken is ERC20Protocol {
    using SafeMath for uint;

    /**
    * @dev Fix for the ERC20 short address attack.
    */
    modifier onlyPayloadSize(uint size) {
        require(msg.data.length >= size + 4);
        _;
    }

    function transfer(address _to, uint _value) onlyPayloadSize(2 * 32) returns (bool success) {
        //Default assumes totalSupply can't be over max (2^256 - 1).
        //If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check if it doesn't wrap.
        //Replace the if with this one instead.
        //if (balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
        if (balances[msg.sender] >= _value) {
            balances[msg.sender] -= _value;
            balances[_to] += _value;
            Transfer(msg.sender, _to, _value);
            return true;
        } else { return false; }
    }

    function transferFrom(address _from, address _to, uint _value) onlyPayloadSize(3 * 32) returns (bool success) {
        //same as above. Replace this line with the following if you want to protect against wrapping uints.
        //if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
        if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value) {
            balances[_to] += _value;
            balances[_from] -= _value;
            allowed[_from][msg.sender] -= _value;
            Transfer(_from, _to, _value);
            return true;
        } else { return false; }
    }

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

    function approve(address _spender, uint _value) onlyPayloadSize(2 * 32) returns (bool success) {
        // 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
        assert((_value == 0) || (allowed[msg.sender][_spender] == 0));

        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

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

    mapping (address => uint) balances;
    mapping (address => mapping (address => uint)) allowed;
}

/// @title Wanchain Token Contract
/// For more information about this token sale, please visit https://wanchain.org
/// @author Cathy - <[email protected]>
contract WanToken is StandardToken {
    using SafeMath for uint;

    /// Constant token specific fields
    string public constant name = "WanCoin";
    string public constant symbol = "WAN";
    uint public constant decimals = 18;

    /// Wanchain total tokens supply
    uint public constant MAX_TOTAL_TOKEN_AMOUNT = 210000000 ether;

    /// Fields that are only changed in constructor
    /// Wanchain contribution contract
    address public minter; 
    /// ICO start time
    uint public startTime;
    /// ICO end time
    uint public endTime;

    /// Fields that can be changed by functions
    mapping (address => uint) public lockedBalances;
    /*
     * MODIFIERS
     */

    modifier onlyMinter {
        assert(msg.sender == minter);
        _;
    }

    modifier isLaterThan (uint x){
        assert(now > x);
        _;
    }

    modifier maxWanTokenAmountNotReached (uint amount){
        assert(totalSupply.add(amount) <= MAX_TOTAL_TOKEN_AMOUNT);
        _;
    }

    /**
     * CONSTRUCTOR 
     * 
     * @dev Initialize the Wanchain Token
     * @param _minter The Wanchain Contribution Contract     
     * @param _startTime ICO start time
     * @param _endTime ICO End Time
     */
    function WanToken(address _minter, uint _startTime, uint _endTime){
        minter = _minter;
        startTime = _startTime;
        endTime = _endTime;
    }

    /**
     * EXTERNAL FUNCTION 
     * 
     * @dev Contribution contract instance mint token
     * @param receipent The destination account owned mint tokens    
     * @param amount The amount of mint token
     * be sent to this address.
     */    
    function mintToken(address receipent, uint amount)
        external
        onlyMinter
        maxWanTokenAmountNotReached(amount)
        returns (bool)
    {
        require(now <= endTime);
        lockedBalances[receipent] = lockedBalances[receipent].add(amount);
        totalSupply = totalSupply.add(amount);
        return true;
    }

    /*
     * PUBLIC FUNCTIONS
     */

    /// @dev Locking period has passed - Locked tokens have turned into tradeable
    ///      All tokens owned by receipent will be tradeable
    function claimTokens(address receipent)
        public
        onlyMinter
    {
        balances[receipent] = balances[receipent].add(lockedBalances[receipent]);
        lockedBalances[receipent] = 0;
    }

    /*
     * CONSTANT METHODS
     */
    function lockedBalanceOf(address _owner) constant returns (uint balance) {
        return lockedBalances[_owner];
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"lockedBalances","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"minter","outputs":[{"name":"","type":"address"}],"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":"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":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"endTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"lockedBalanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"startTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"receipent","type":"address"},{"name":"amount","type":"uint256"}],"name":"mintToken","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"MAX_TOTAL_TOKEN_AMOUNT","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":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"receipent","type":"address"}],"name":"claimTokens","outputs":[],"payable":false,"type":"function"},{"inputs":[{"name":"_minter","type":"address"},{"name":"_startTime","type":"uint256"},{"name":"_endTime","type":"uint256"}],"payable":false,"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"}]

6060604052341561000f57600080fd5b604051606080610a2c8339810160405280805191906020018051919060200180519150505b60038054600160a060020a031916600160a060020a038516179055600482905560058190555b5050505b6109bf8061006d6000396000f300606060405236156100ee5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630483a7f681146100f357806306fdde031461012457806307546172146101af578063095ea7b3146101de57806318160ddd1461021457806323b872dd14610239578063313ce567146102755780633197cbb61461029a57806359355736146102bf57806370a08231146102f057806378e979251461032157806379c650681461034657806395d89b411461037c578063a89c5be014610407578063a9059cbb1461042c578063dd62ed3e14610462578063df8de3e714610499575b600080fd5b34156100fe57600080fd5b610112600160a060020a03600435166104ba565b60405190815260200160405180910390f35b341561012f57600080fd5b6101376104cc565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101745780820151818401525b60200161015b565b50505050905090810190601f1680156101a15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101ba57600080fd5b6101c2610503565b604051600160a060020a03909116815260200160405180910390f35b34156101e957600080fd5b610200600160a060020a0360043516602435610512565b604051901515815260200160405180910390f35b341561021f57600080fd5b6101126105c9565b60405190815260200160405180910390f35b341561024457600080fd5b610200600160a060020a03600435811690602435166044356105cf565b604051901515815260200160405180910390f35b341561028057600080fd5b6101126106d2565b60405190815260200160405180910390f35b34156102a557600080fd5b6101126106d7565b60405190815260200160405180910390f35b34156102ca57600080fd5b610112600160a060020a03600435166106dd565b60405190815260200160405180910390f35b34156102fb57600080fd5b610112600160a060020a03600435166106fc565b60405190815260200160405180910390f35b341561032c57600080fd5b61011261071b565b60405190815260200160405180910390f35b341561035157600080fd5b610200600160a060020a0360043516602435610721565b604051901515815260200160405180910390f35b341561038757600080fd5b6101376107dc565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101745780820151818401525b60200161015b565b50505050905090810190601f1680156101a15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561041257600080fd5b610112610813565b60405190815260200160405180910390f35b341561043757600080fd5b610200600160a060020a0360043516602435610822565b604051901515815260200160405180910390f35b341561046d57600080fd5b610112600160a060020a03600435811690602435166108d4565b60405190815260200160405180910390f35b34156104a457600080fd5b6104b8600160a060020a0360043516610901565b005b60066020526000908152604090205481565b60408051908101604052600781527f57616e436f696e00000000000000000000000000000000000000000000000000602082015281565b600354600160a060020a031681565b60006040604436101561052457600080fd5b8215806105545750600160a060020a03338116600090815260026020908152604080832093881683529290522054155b151561055c57fe5b600160a060020a03338116600081815260026020908152604080832094891680845294909152908190208690557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259086905190815260200160405180910390a3600191505b5b5092915050565b60005481565b6000606060643610156105e157600080fd5b600160a060020a0385166000908152600160205260409020548390108015906106315750600160a060020a0380861660009081526002602090815260408083203390941683529290522054839010155b156106c357600160a060020a03808516600081815260016020908152604080832080548901905589851680845281842080548a90039055600283528184203390961684529490915290819020805487900390559091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3600191506106c8565b600091505b5b5b509392505050565b601281565b60055481565b600160a060020a0381166000908152600660205260409020545b919050565b600160a060020a0381166000908152600160205260409020545b919050565b60045481565b60035460009033600160a060020a0390811691161461073c57fe5b816aadb53acfa41aee1200000061075e8260005461097990919063ffffffff16565b111561076657fe5b60055442111561077557600080fd5b600160a060020a03841660009081526006602052604090205461079e908463ffffffff61097916565b600160a060020a038516600090815260066020526040812091909155546107cb908463ffffffff61097916565b600055600191505b5b505b92915050565b60408051908101604052600381527f57414e0000000000000000000000000000000000000000000000000000000000602082015281565b6aadb53acfa41aee1200000081565b60006040604436101561083457600080fd5b600160a060020a0333166000908152600160205260409020548390106108c257600160a060020a033381166000818152600160205260408082208054889003905592871680825290839020805487019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3600191506105c1565b600091506105c1565b5b5b5092915050565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b60035433600160a060020a0390811691161461091957fe5b600160a060020a03811660009081526006602090815260408083205460019092529091205461094d9163ffffffff61097916565b600160a060020a03821660009081526001602090815260408083209390935560069052908120555b5b50565b60008282018381101561098857fe5b8091505b50929150505600a165627a7a72305820cf354415565dbcba55ca7d803241ed623e9875b86e7d49619e734c70d0b4d0bf0029000000000000000000000000aac3090257be280087d8bdc530265203d105b1200000000000000000000000000000000000000000000000000000000059d505800000000000000000000000000000000000000000000000000000000059f0b500

Deployed Bytecode

0x606060405236156100ee5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630483a7f681146100f357806306fdde031461012457806307546172146101af578063095ea7b3146101de57806318160ddd1461021457806323b872dd14610239578063313ce567146102755780633197cbb61461029a57806359355736146102bf57806370a08231146102f057806378e979251461032157806379c650681461034657806395d89b411461037c578063a89c5be014610407578063a9059cbb1461042c578063dd62ed3e14610462578063df8de3e714610499575b600080fd5b34156100fe57600080fd5b610112600160a060020a03600435166104ba565b60405190815260200160405180910390f35b341561012f57600080fd5b6101376104cc565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101745780820151818401525b60200161015b565b50505050905090810190601f1680156101a15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101ba57600080fd5b6101c2610503565b604051600160a060020a03909116815260200160405180910390f35b34156101e957600080fd5b610200600160a060020a0360043516602435610512565b604051901515815260200160405180910390f35b341561021f57600080fd5b6101126105c9565b60405190815260200160405180910390f35b341561024457600080fd5b610200600160a060020a03600435811690602435166044356105cf565b604051901515815260200160405180910390f35b341561028057600080fd5b6101126106d2565b60405190815260200160405180910390f35b34156102a557600080fd5b6101126106d7565b60405190815260200160405180910390f35b34156102ca57600080fd5b610112600160a060020a03600435166106dd565b60405190815260200160405180910390f35b34156102fb57600080fd5b610112600160a060020a03600435166106fc565b60405190815260200160405180910390f35b341561032c57600080fd5b61011261071b565b60405190815260200160405180910390f35b341561035157600080fd5b610200600160a060020a0360043516602435610721565b604051901515815260200160405180910390f35b341561038757600080fd5b6101376107dc565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101745780820151818401525b60200161015b565b50505050905090810190601f1680156101a15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561041257600080fd5b610112610813565b60405190815260200160405180910390f35b341561043757600080fd5b610200600160a060020a0360043516602435610822565b604051901515815260200160405180910390f35b341561046d57600080fd5b610112600160a060020a03600435811690602435166108d4565b60405190815260200160405180910390f35b34156104a457600080fd5b6104b8600160a060020a0360043516610901565b005b60066020526000908152604090205481565b60408051908101604052600781527f57616e436f696e00000000000000000000000000000000000000000000000000602082015281565b600354600160a060020a031681565b60006040604436101561052457600080fd5b8215806105545750600160a060020a03338116600090815260026020908152604080832093881683529290522054155b151561055c57fe5b600160a060020a03338116600081815260026020908152604080832094891680845294909152908190208690557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259086905190815260200160405180910390a3600191505b5b5092915050565b60005481565b6000606060643610156105e157600080fd5b600160a060020a0385166000908152600160205260409020548390108015906106315750600160a060020a0380861660009081526002602090815260408083203390941683529290522054839010155b156106c357600160a060020a03808516600081815260016020908152604080832080548901905589851680845281842080548a90039055600283528184203390961684529490915290819020805487900390559091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3600191506106c8565b600091505b5b5b509392505050565b601281565b60055481565b600160a060020a0381166000908152600660205260409020545b919050565b600160a060020a0381166000908152600160205260409020545b919050565b60045481565b60035460009033600160a060020a0390811691161461073c57fe5b816aadb53acfa41aee1200000061075e8260005461097990919063ffffffff16565b111561076657fe5b60055442111561077557600080fd5b600160a060020a03841660009081526006602052604090205461079e908463ffffffff61097916565b600160a060020a038516600090815260066020526040812091909155546107cb908463ffffffff61097916565b600055600191505b5b505b92915050565b60408051908101604052600381527f57414e0000000000000000000000000000000000000000000000000000000000602082015281565b6aadb53acfa41aee1200000081565b60006040604436101561083457600080fd5b600160a060020a0333166000908152600160205260409020548390106108c257600160a060020a033381166000818152600160205260408082208054889003905592871680825290839020805487019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3600191506105c1565b600091506105c1565b5b5b5092915050565b600160a060020a038083166000908152600260209081526040808320938516835292905220545b92915050565b60035433600160a060020a0390811691161461091957fe5b600160a060020a03811660009081526006602090815260408083205460019092529091205461094d9163ffffffff61097916565b600160a060020a03821660009081526001602090815260408083209390935560069052908120555b5b50565b60008282018381101561098857fe5b8091505b50929150505600a165627a7a72305820cf354415565dbcba55ca7d803241ed623e9875b86e7d49619e734c70d0b4d0bf0029

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000aac3090257be280087d8bdc530265203d105b1200000000000000000000000000000000000000000000000000000000059d505800000000000000000000000000000000000000000000000000000000059f0b500

-----Decoded View---------------
Arg [0] : _minter (address): 0xaac3090257be280087D8bdc530265203d105b120
Arg [1] : _startTime (uint256): 1507132800
Arg [2] : _endTime (uint256): 1508947200

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000aac3090257be280087d8bdc530265203d105b120
Arg [1] : 0000000000000000000000000000000000000000000000000000000059d50580
Arg [2] : 0000000000000000000000000000000000000000000000000000000059f0b500


Swarm Source

bzzr://cf354415565dbcba55ca7d803241ed623e9875b86e7d49619e734c70d0b4d0bf
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.