ETH Price: $3,894.98 (+0.27%)

Token

ERC-20: Chi (CHI)
 

Overview

Max Total Supply

10,000,000,000 CHI

Holders

813

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 0 Decimals)

Balance
100 CHI

Value
$0.00
0xa39f0b28d9f3ce8cd9ad75339e05cf76717e5bc8
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:
ChiToken

Compiler Version
v0.4.19+commit.c4cbbb05

Optimization Enabled:
Yes with 200 runs

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

pragma solidity ^0.4.19;

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

    function allowance(address owner, address spender) public view 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);
    event Transfer(address indexed from, address indexed to, uint256 value);
}

/**
 * Aethia CHI Token
 *
 * Chi is the in-game currency used throughout Aethia. This contract governs
 * the ownership and transfer of all Chi within the game.
 */
contract ChiToken is ERC20 {

    /**
     * The currency is named Chi.
     * 
     * The currency's symbol is 'CHI'. The different uses for the two are as 
     * follows:
     *  - "That Jelly Pill will cost you 5 CHI."
     *  - "Did you know Aethia uses Chi as currency?"
     */
    string public name = 'Chi';
    string public symbol = 'CHI';
    
    /**
     * There is ten-billion Chi in circulation.
     */
    uint256 _totalSupply = 10000000000;
    
    /**
     * Chi is an atomic currency.
     * 
     * It is not possible to have a fraction of a Chi. You are only able to have
     * integer values of Chi tokens.
     */
    uint256 public decimals = 0;

    /**
     * The amount of CHI owned per address.
     */
    mapping (address => uint256) balances;
    
    /**
     * The amount of CHI an owner has allowed a certain spender.
     */
    mapping (address => mapping (address => uint256)) allowances;

    /**
     * Chi token transfer event.
     * 
     * For audit and logging purposes, as well as to adhere to the ERC-20
     * standard, all chi token transfers are logged by benefactor and 
     * beneficiary.
     */
    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    
    /**
     * Chi token allowance approval event.
     * 
     * For audit and logging purposes, as well as to adhere to the ERC-20
     * standard, all chi token allowance approvals are logged by owner and 
     * approved spender.
     */
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);

    /**
     * Contract constructor.
     * 
     * This creates all ten-billion Chi tokens and sets them to the creating
     * address. From this address, the tokens will be distributed to the proper
     * locations.
     */
    function ChiToken() public {
        balances[msg.sender] = _totalSupply;
    }
    
    /**
     * The total supply of Chi tokens. 
     * 
     * Returns
     * -------
     * uint256
     *     The total number of Chi tokens in circulation.
     */
    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

    /**
     * Get Chi balance of an address.
     * 
     * Parameters 
     * ----------
     * address : _owner
     *     The address to return the Chi balance of.
     * 
     * Returns
     * -------
     * uint256
     *     The amount of Chi owned by given address.
     */
    function balanceOf(address _owner) public view returns (uint256) {
        return balances[_owner];
    }

    /**
     * Transfer an amount of Chi to an address.
     * 
     * Parameters
     * ----------
     * address : _to
     *     The beneficiary address to transfer the Chi tokens to.
     * uint256 : _value
     *     The number of Chi tokens to transfer.
     * 
     * Returns
     * -------
     * bool
     *     True if the transfer succeeds.
     */
    function transfer(address _to, uint256 _value) public returns (bool) {
        require(balances[msg.sender] >= _value);

        balances[msg.sender] -= _value;
        balances[_to] += _value;

        Transfer(msg.sender, _to, _value);

        return true;
    }

    /**
     * Transfer Chi tokens from one address to another.
     * 
     * This requires an allowance to be set for the requester.
     * 
     * Parameters
     * ----------
     * address : _from
     *     The benefactor address from which the Chi tokens are to be sent.
     * address : _to
     *     The beneficiary address to transfer the Chi tokens to.
     * uint256 : _value
     *      The number of Chi tokens to transfer.
     * 
     * Returns
     * -------
     * bool
     *     True if the transfer succeeds.
     */
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
        require(balances[_from] >= _value);
        require(allowances[_from][msg.sender] >= _value);

        balances[_to] += _value;
        balances[_from] -= _value;

        allowances[_from][msg.sender] -= _value;

        Transfer(_from, _to, _value);

        return true;
    }

    /**
     * Approve given address to spend a number of Chi tokens.
     * 
     * This gives an approval to `_spender` to spend `_value` tokens on behalf
     * of `msg.sender`.
     * 
     * Parameters
     * ----------
     * address : _spender
     *     The address that is to be allowed to spend the given number of Chi
     *     tokens.
     * uint256 : _value
     *     The number of Chi tokens that `_spender` is allowed to spend.
     * 
     * Returns
     * -------
     * bool
     *     True if the approval succeeds.
     */
    function approve(address _spender, uint256 _value) public returns (bool) {
        allowances[msg.sender][_spender] = _value;

        Approval(msg.sender, _spender, _value);

        return true;
    }
    
    /**
     * Get the number of tokens `_spender` is allowed to spend by `_owner`.
     * 
     * Parameters
     * ----------
     * address : _owner
     *     The address that gave out the allowance.
     * address : _spender
     *     The address that is given the allowance to spend.
     * 
     * Returns
     * -------
     * uint256
     *     The number of tokens `_spender` is allowed to spend by `_owner`.
     */
    function allowance(address _owner, address _spender) public view returns (uint256) {
        return allowances[_owner][_spender];
    }
}

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":"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":"_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":"","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":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Approval","type":"event"}]

606060405260408051908101604052600381527f43686900000000000000000000000000000000000000000000000000000000006020820152600090805161004b9291602001906100ce565b5060408051908101604052600381527f4348490000000000000000000000000000000000000000000000000000000000602082015260019080516100939291602001906100ce565b506402540be400600255600060035534156100ad57600080fd5b600254600160a060020a033316600090815260046020526040902055610169565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010f57805160ff191683800117855561013c565b8280016001018555821561013c579182015b8281111561013c578251825591602001919060010190610121565b5061014892915061014c565b5090565b61016691905b808211156101485760008155600101610152565b90565b6105a5806101786000396000f3006060604052600436106100985763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461009d578063095ea7b31461012757806318160ddd1461015d57806323b872dd14610182578063313ce567146101aa57806370a08231146101bd57806395d89b41146101dc578063a9059cbb146101ef578063dd62ed3e14610211575b600080fd5b34156100a857600080fd5b6100b0610236565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100ec5780820151838201526020016100d4565b50505050905090810190601f1680156101195780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561013257600080fd5b610149600160a060020a03600435166024356102d4565b604051901515815260200160405180910390f35b341561016857600080fd5b610170610340565b60405190815260200160405180910390f35b341561018d57600080fd5b610149600160a060020a0360043581169060243516604435610346565b34156101b557600080fd5b61017061042e565b34156101c857600080fd5b610170600160a060020a0360043516610434565b34156101e757600080fd5b6100b061044f565b34156101fa57600080fd5b610149600160a060020a03600435166024356104ba565b341561021c57600080fd5b610170600160a060020a036004358116906024351661054e565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102cc5780601f106102a1576101008083540402835291602001916102cc565b820191906000526020600020905b8154815290600101906020018083116102af57829003601f168201915b505050505081565b600160a060020a03338116600081815260056020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60025490565b600160a060020a0383166000908152600460205260408120548290101561036c57600080fd5b600160a060020a0380851660009081526005602090815260408083203390941683529290522054829010156103a057600080fd5b600160a060020a03808416600081815260046020908152604080832080548801905588851680845281842080548990039055600583528184203390961684529490915290819020805486900390559091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b60035481565b600160a060020a031660009081526004602052604090205490565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102cc5780601f106102a1576101008083540402835291602001916102cc565b600160a060020a033316600090815260046020526040812054829010156104e057600080fd5b600160a060020a033381166000818152600460205260408082208054879003905592861680825290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a039182166000908152600560209081526040808320939094168252919091522054905600a165627a7a72305820839ff1dfb026eb39731b2c1a362e2b21872b709945dc9fae0d0db53c2dc21aec0029

Deployed Bytecode

0x6060604052600436106100985763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461009d578063095ea7b31461012757806318160ddd1461015d57806323b872dd14610182578063313ce567146101aa57806370a08231146101bd57806395d89b41146101dc578063a9059cbb146101ef578063dd62ed3e14610211575b600080fd5b34156100a857600080fd5b6100b0610236565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100ec5780820151838201526020016100d4565b50505050905090810190601f1680156101195780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561013257600080fd5b610149600160a060020a03600435166024356102d4565b604051901515815260200160405180910390f35b341561016857600080fd5b610170610340565b60405190815260200160405180910390f35b341561018d57600080fd5b610149600160a060020a0360043581169060243516604435610346565b34156101b557600080fd5b61017061042e565b34156101c857600080fd5b610170600160a060020a0360043516610434565b34156101e757600080fd5b6100b061044f565b34156101fa57600080fd5b610149600160a060020a03600435166024356104ba565b341561021c57600080fd5b610170600160a060020a036004358116906024351661054e565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102cc5780601f106102a1576101008083540402835291602001916102cc565b820191906000526020600020905b8154815290600101906020018083116102af57829003601f168201915b505050505081565b600160a060020a03338116600081815260056020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60025490565b600160a060020a0383166000908152600460205260408120548290101561036c57600080fd5b600160a060020a0380851660009081526005602090815260408083203390941683529290522054829010156103a057600080fd5b600160a060020a03808416600081815260046020908152604080832080548801905588851680845281842080548990039055600583528184203390961684529490915290819020805486900390559091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b60035481565b600160a060020a031660009081526004602052604090205490565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102cc5780601f106102a1576101008083540402835291602001916102cc565b600160a060020a033316600090815260046020526040812054829010156104e057600080fd5b600160a060020a033381166000818152600460205260408082208054879003905592861680825290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a039182166000908152600560209081526040808320939094168252919091522054905600a165627a7a72305820839ff1dfb026eb39731b2c1a362e2b21872b709945dc9fae0d0db53c2dc21aec0029

Swarm Source

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