ETH Price: $2,393.42 (-2.18%)

Token

Cai Token (CAI)
 

Overview

Max Total Supply

21,000,000,000 CAI

Holders

24,059 (0.00%)

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
1 CAI

Value
$0.00
0x6c0C95d8ddf0784f99F8919329a669F5061Adb47
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Decentralized betting platform based on Wisdom Contract Management

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
CaiToken

Compiler Version
v0.4.23+commit.124ca40d

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-05-12
*/

pragma solidity ^0.4.17;

pragma solidity ^0.4.16;

pragma solidity ^0.4.17;



interface TokenRecipient {
    function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external;
}


contract ERC20 {

    // Public variables of the token
    uint256 public totalSupply;
    string public name;
    string public symbol;
    uint8  public decimals;    // 18 decimals is the strongly suggested default, avoid changing it


    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);


    function balanceOf(address who) public view returns (uint256);
    function transfer(address to, uint256 value) public returns (bool);

    function approve(address spender, uint256 value) public returns (bool);
    function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns(bool);
    function allowance(address owner, address spender) public view returns (uint256);
    function transferFrom(address from, address to, uint256 value) public returns (bool);

}


contract TokenERC20 is ERC20 {

    // Balances
    mapping (address => uint256) balances;
    // Allowances
    mapping (address => mapping (address => uint256)) allowances;


    // ----- Events -----
    event Burn(address indexed from, uint256 value);


    /**
     * Constructor function
     */
    constructor(uint256 _initialSupply, string _tokenName, string _tokenSymbol, uint8 _decimals) public {
        name = _tokenName;                                   // Set the name for display purposes
        symbol = _tokenSymbol;                               // Set the symbol for display purposes
        decimals = _decimals;

        totalSupply = _initialSupply * 10 ** uint256(decimals);  // Update total supply with the decimal amount
        balances[msg.sender] = totalSupply;                // Give the creator all initial tokens
    }

    function balanceOf(address _owner) public view returns(uint256) {
        return balances[_owner];
    }

    function allowance(address _owner, address _spender) public view returns (uint256) {
        return allowances[_owner][_spender];
    }

    /**
     * Internal transfer, only can be called by this contract
     */
    function _transfer(address _from, address _to, uint _value) internal returns(bool) {
        // Prevent transfer to 0x0 address. Use burn() instead
        require(_to != 0x0);
        // Check if the sender has enough
        require(balances[_from] >= _value);
        // Check for overflows
        require(balances[_to] + _value > balances[_to]);
        // Save this for an assertion in the future
        uint previousBalances = balances[_from] + balances[_to];
        // Subtract from the sender
        balances[_from] -= _value;
        // Add the same to the recipient
        balances[_to] += _value;
        emit Transfer(_from, _to, _value);
        // Asserts are used to use static analysis to find bugs in your code. They should never fail
        assert(balances[_from] + balances[_to] == previousBalances);

        return true;
    }

    /**
     * Transfer tokens
     *
     * Send `_value` tokens to `_to` from your account
     *
     * @param _to The address of the recipient
     * @param _value the amount to send
     */
    function transfer(address _to, uint256 _value) public returns(bool) {
        return _transfer(msg.sender, _to, _value);
    }

    /**
     * Transfer tokens from other address
     *
     * Send `_value` tokens to `_to` in behalf of `_from`
     *
     * @param _from The address of the sender
     * @param _to The address of the recipient
     * @param _value the amount to send
     */
    function transferFrom(address _from, address _to, uint256 _value) public returns(bool) {
        require(_value <= allowances[_from][msg.sender]);     // Check allowance
        allowances[_from][msg.sender] -= _value;
        return _transfer(_from, _to, _value);
    }

    /**
     * Set allowance for other address
     *
     * Allows `_spender` to spend no more than `_value` tokens in your behalf
     *
     * @param _spender The address authorized to spend
     * @param _value the max amount they can spend
     */
    function approve(address _spender, uint256 _value) public returns(bool) {
        allowances[msg.sender][_spender] = _value;
        emit Approval(msg.sender, _spender, _value);
        return true;
    }

    /**
     * Set allowance for other address and notify
     *
     * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
     *
     * @param _spender The address authorized to spend
     * @param _value the max amount they can spend
     * @param _extraData some extra information to send to the approved contract
     */
    function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns(bool) {
        if (approve(_spender, _value)) {
            TokenRecipient spender = TokenRecipient(_spender);
            spender.receiveApproval(msg.sender, _value, this, _extraData);
            return true;
        }
        return false;
    }

    /**
     * Destroy tokens
     *
     * Remove `_value` tokens from the system irreversibly
     *
     * @param _value the amount of money to burn
     */
    function burn(uint256 _value) public returns(bool) {
        require(balances[msg.sender] >= _value);   // Check if the sender has enough
        balances[msg.sender] -= _value;            // Subtract from the sender
        totalSupply -= _value;                      // Updates totalSupply
        emit Burn(msg.sender, _value);
        return true;
    }

    /**
     * Destroy tokens from other account
     *
     * Remove `_value` tokens from the system irreversibly on behalf of `_from`.
     *
     * @param _from the address of the sender
     * @param _value the amount of money to burn
     */
    function burnFrom(address _from, uint256 _value) public returns(bool) {
        require(balances[_from] >= _value);                // Check if the targeted balance is enough
        require(_value <= allowances[_from][msg.sender]);    // Check allowance
        balances[_from] -= _value;                         // Subtract from the targeted balance
        allowances[_from][msg.sender] -= _value;             // Subtract from the sender's allowance
        totalSupply -= _value;                              // Update totalSupply
        emit Burn(_from, _value);
        return true;
    }

    /**
     * approve should be called when allowances[_spender] == 0. To increment
     * allowances value is better to use this function to avoid 2 calls (and wait until
     * the first transaction is mined)
     * From MonolithDAO Token.sol
     */
    function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
        // Check for overflows
        require(allowances[msg.sender][_spender] + _addedValue > allowances[msg.sender][_spender]);

        allowances[msg.sender][_spender] += _addedValue;
        emit Approval(msg.sender, _spender, allowances[msg.sender][_spender]);
        return true;
    }

    function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
        uint oldValue = allowances[msg.sender][_spender];
        if (_subtractedValue > oldValue) {
            allowances[msg.sender][_spender] = 0;
        } else {
            allowances[msg.sender][_spender] = oldValue - _subtractedValue;
        }
        emit Approval(msg.sender, _spender, allowances[msg.sender][_spender]);
        return true;
    }


}


contract CaiToken is TokenERC20(21000000000, "Cai Token", "CAI", 18) {

    constructor() public {

    }
}

Contract Security Audit

Contract ABI

[{"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":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"burn","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_value","type":"uint256"}],"name":"burnFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","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":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_addedValue","type":"uint256"}],"name":"increaseApproval","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":"","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":false,"name":"value","type":"uint256"}],"name":"Burn","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"},{"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"}]

608060405234801561001057600080fd5b50604080518082018252600981527f43616920546f6b656e000000000000000000000000000000000000000000000060208083019182528351808501909452600384527f43414900000000000000000000000000000000000000000000000000000000009084015281516404e3b292009391601291610091916001916100e3565b5081516100a59060029060208501906100e3565b506003805460ff191660ff928316179081905516600a0a92909202600081815533600160a060020a03168152600460205260409020555061017e9050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061012457805160ff1916838001178555610151565b82800160010185558215610151579182015b82811115610151578251825591602001919060010190610136565b5061015d929150610161565b5090565b61017b91905b8082111561015d5760008155600101610167565b90565b610b188061018d6000396000f3006080604052600436106100cf5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100d4578063095ea7b31461015e57806318160ddd1461019657806323b872dd146101bd578063313ce567146101e757806342966c6814610212578063661884631461022a57806370a082311461024e57806379cc67901461026f57806395d89b4114610293578063a9059cbb146102a8578063cae9ca51146102cc578063d73dd62314610335578063dd62ed3e14610359575b600080fd5b3480156100e057600080fd5b506100e9610380565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012357818101518382015260200161010b565b50505050905090810190601f1680156101505780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016a57600080fd5b50610182600160a060020a036004351660243561040d565b604080519115158252519081900360200190f35b3480156101a257600080fd5b506101ab610477565b60408051918252519081900360200190f35b3480156101c957600080fd5b50610182600160a060020a036004358116906024351660443561047d565b3480156101f357600080fd5b506101fc6104f2565b6040805160ff9092168252519081900360200190f35b34801561021e57600080fd5b506101826004356104fb565b34801561023657600080fd5b50610182600160a060020a0360043516602435610583565b34801561025a57600080fd5b506101ab600160a060020a0360043516610670565b34801561027b57600080fd5b50610182600160a060020a036004351660243561068b565b34801561029f57600080fd5b506100e9610765565b3480156102b457600080fd5b50610182600160a060020a03600435166024356107bd565b3480156102d857600080fd5b50604080516020600460443581810135601f8101849004840285018401909552848452610182948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506107d19650505050505050565b34801561034157600080fd5b50610182600160a060020a0360043516602435610914565b34801561036557600080fd5b506101ab600160a060020a03600435811690602435166109b4565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104055780601f106103da57610100808354040283529160200191610405565b820191906000526020600020905b8154815290600101906020018083116103e857829003601f168201915b505050505081565b600160a060020a03338116600081815260056020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60005481565b600160a060020a038084166000908152600560209081526040808320339094168352929052908120548211156104b257600080fd5b600160a060020a03808516600090815260056020908152604080832033909416835292905220805483900390556104ea8484846109df565b949350505050565b60035460ff1681565b600160a060020a03331660009081526004602052604081205482111561052057600080fd5b600160a060020a0333166000818152600460209081526040808320805487900390558254869003909255815185815291517fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59281900390910190a2506001919050565b600160a060020a033381166000908152600560209081526040808320938616835292905290812054808311156105e057600160a060020a03338116600090815260056020908152604080832093881683529290529081205561060b565b600160a060020a03338116600090815260056020908152604080832093881683529290522083820390555b600160a060020a0333811660008181526005602090815260408083209489168084529482529182902054825190815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a35060019392505050565b600160a060020a031660009081526004602052604090205490565b600160a060020a0382166000908152600460205260408120548211156106b057600080fd5b600160a060020a03808416600090815260056020908152604080832033909416835292905220548211156106e357600080fd5b600160a060020a03808416600081815260046020908152604080832080548890039055600582528083203390951683529381528382208054879003905581548690039091558251858152925191927fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5929081900390910190a250600192915050565b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156104055780601f106103da57610100808354040283529160200191610405565b60006107ca3384846109df565b9392505050565b6000806107de858561040d565b156109075784905080600160a060020a0316638f4ffcb1338630876040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561089757818101518382015260200161087f565b50505050905090810190601f1680156108c45780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156108e657600080fd5b505af11580156108fa573d6000803e3d6000fd5b505050506001915061090c565b600091505b509392505050565b600160a060020a0333811660009081526005602090815260408083209386168352929052908120548281011161094957600080fd5b600160a060020a033381166000818152600560209081526040808320948816808452948252918290208054870190819055825190815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a350600192915050565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205490565b600080600160a060020a03841615156109f757600080fd5b600160a060020a038516600090815260046020526040902054831115610a1c57600080fd5b600160a060020a03841660009081526004602052604090205483810111610a4257600080fd5b50600160a060020a0380841660008181526004602090815260408083208054958a1680855282852080548a81039091559486905281548901909155815188815291519390950194927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3600160a060020a03808516600090815260046020526040808220549288168252902054018114610ae157fe5b5060019493505050505600a165627a7a7230582006c049203a5bec2be7459159079c4d9e6308a315a576b17fa2f795ffea57d5a00029

Deployed Bytecode

0x6080604052600436106100cf5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100d4578063095ea7b31461015e57806318160ddd1461019657806323b872dd146101bd578063313ce567146101e757806342966c6814610212578063661884631461022a57806370a082311461024e57806379cc67901461026f57806395d89b4114610293578063a9059cbb146102a8578063cae9ca51146102cc578063d73dd62314610335578063dd62ed3e14610359575b600080fd5b3480156100e057600080fd5b506100e9610380565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012357818101518382015260200161010b565b50505050905090810190601f1680156101505780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016a57600080fd5b50610182600160a060020a036004351660243561040d565b604080519115158252519081900360200190f35b3480156101a257600080fd5b506101ab610477565b60408051918252519081900360200190f35b3480156101c957600080fd5b50610182600160a060020a036004358116906024351660443561047d565b3480156101f357600080fd5b506101fc6104f2565b6040805160ff9092168252519081900360200190f35b34801561021e57600080fd5b506101826004356104fb565b34801561023657600080fd5b50610182600160a060020a0360043516602435610583565b34801561025a57600080fd5b506101ab600160a060020a0360043516610670565b34801561027b57600080fd5b50610182600160a060020a036004351660243561068b565b34801561029f57600080fd5b506100e9610765565b3480156102b457600080fd5b50610182600160a060020a03600435166024356107bd565b3480156102d857600080fd5b50604080516020600460443581810135601f8101849004840285018401909552848452610182948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506107d19650505050505050565b34801561034157600080fd5b50610182600160a060020a0360043516602435610914565b34801561036557600080fd5b506101ab600160a060020a03600435811690602435166109b4565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104055780601f106103da57610100808354040283529160200191610405565b820191906000526020600020905b8154815290600101906020018083116103e857829003601f168201915b505050505081565b600160a060020a03338116600081815260056020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60005481565b600160a060020a038084166000908152600560209081526040808320339094168352929052908120548211156104b257600080fd5b600160a060020a03808516600090815260056020908152604080832033909416835292905220805483900390556104ea8484846109df565b949350505050565b60035460ff1681565b600160a060020a03331660009081526004602052604081205482111561052057600080fd5b600160a060020a0333166000818152600460209081526040808320805487900390558254869003909255815185815291517fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59281900390910190a2506001919050565b600160a060020a033381166000908152600560209081526040808320938616835292905290812054808311156105e057600160a060020a03338116600090815260056020908152604080832093881683529290529081205561060b565b600160a060020a03338116600090815260056020908152604080832093881683529290522083820390555b600160a060020a0333811660008181526005602090815260408083209489168084529482529182902054825190815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a35060019392505050565b600160a060020a031660009081526004602052604090205490565b600160a060020a0382166000908152600460205260408120548211156106b057600080fd5b600160a060020a03808416600090815260056020908152604080832033909416835292905220548211156106e357600080fd5b600160a060020a03808416600081815260046020908152604080832080548890039055600582528083203390951683529381528382208054879003905581548690039091558251858152925191927fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5929081900390910190a250600192915050565b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156104055780601f106103da57610100808354040283529160200191610405565b60006107ca3384846109df565b9392505050565b6000806107de858561040d565b156109075784905080600160a060020a0316638f4ffcb1338630876040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561089757818101518382015260200161087f565b50505050905090810190601f1680156108c45780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156108e657600080fd5b505af11580156108fa573d6000803e3d6000fd5b505050506001915061090c565b600091505b509392505050565b600160a060020a0333811660009081526005602090815260408083209386168352929052908120548281011161094957600080fd5b600160a060020a033381166000818152600560209081526040808320948816808452948252918290208054870190819055825190815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a350600192915050565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205490565b600080600160a060020a03841615156109f757600080fd5b600160a060020a038516600090815260046020526040902054831115610a1c57600080fd5b600160a060020a03841660009081526004602052604090205483810111610a4257600080fd5b50600160a060020a0380841660008181526004602090815260408083208054958a1680855282852080548a81039091559486905281548901909155815188815291519390950194927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3600160a060020a03808516600090815260046020526040808220549288168252902054018114610ae157fe5b5060019493505050505600a165627a7a7230582006c049203a5bec2be7459159079c4d9e6308a315a576b17fa2f795ffea57d5a00029

Swarm Source

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