Poker Chips
ERC20
This contract is an ERC20 token.
Name
Poker Chips
Symbol
CHP
Decimals
18
Total Supply
354,786,435 CHP
About link description
CoinPoker (CHP) is a cryptocurrency and operates on the Ethereum platform. CoinPoker has a current supply of 278,237,314.35457474 with 274,720,611.9545747 in circulation. The last known price of CoinPoker is 0.01950101 USD and is up 7.64 over the last 24 hours. It is currently trading on 2 active market(s) with $7,198.19 traded over the last 24 hours. More information can be found at https://coinpoker.com/.
Stats
Public Functions
8
Event Types
3
Code Size
7,288 bytes
Library Use
Uses SafeMath for uint.
Constants (8) keyboard_arrow_up
State Variables (9) keyboard_arrow_up
Functions
balanceOf keyboard_arrow_up
allowance keyboard_arrow_up
totalSupply keyboard_arrow_up
transfer keyboard_arrow_up
Source Code
function transfer(address _to, uint256 _value) returns (bool) {
if (now < startTime)
// Check if the crowdsale is already over
require(_to == cashierAddr); // allow only to transfer CHP (make a deposit) to game/cashier wallet
balances[msg.sender] = balances[msg.sender].sub(_value); // Subtract from the sender
balances[_to] = balances[_to].add(_value); // Add the same to the recipient
Transfer(msg.sender, _to, _value); // Notify anyone listening that this transfer took place
return true;
}
transferFrom keyboard_arrow_up
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) returns (bool) {
if (now < startTime)
// Check if the crowdsale is already over
require(_from == ownerAddr || _to == cashierAddr);
var _allowed = allowed[_from][msg.sender];
balances[_from] = balances[_from].sub(_value); // Subtract from the sender
balances[_to] = balances[_to].add(_value); // Add the same to the recipient
allowed[_from][msg.sender] = _allowed.sub(_value);
Transfer(_from, _to, _value);
return true;
}
approve keyboard_arrow_up
Requirements help
One or more of the following:
Source Code
function approve(address _spender, uint256 _value) returns (bool) {
//https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
require((_value == 0) || (allowed[msg.sender][_spender] == 0));
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
percent keyboard_arrow_up
Source Code
function percent(
uint256 numerator,
uint256 denominator,
uint256 precision
) public constant returns (uint256 quotient) {
uint256 _numerator = numerator.mul(10**(precision.add(1)));
uint256 _quotient = _numerator.div(denominator).add(5).div(10);
return (_quotient);
}
burn keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function burn() {
// If tokens have not been burned already and the crowdsale ended
if (!burned && now > startTime) {
// Calculate tournament release amount (tournament_reserve * proportion_how_many_sold)
uint256 total_sold = _totalSupply.sub(balances[ownerAddr]);
total_sold = total_sold.add(tokensPreICO);
uint256 total_ico_amount = tokensPreICO.add(tokensICO);
uint256 percentage = percent(total_sold, total_ico_amount, 8);
uint256 tournamentsAmount = tournamentsReserve.mul(percentage).div(
100000000
);
// Calculate what's left
uint256 totalReserve = teamReserve.add(tokensPreICO);
totalReserve = totalReserve.add(tournamentsAmount);
uint256 difference = balances[ownerAddr].sub(totalReserve);
// Distribute tokens
balances[preIcoAddr] = balances[preIcoAddr].add(tokensPreICO);
balances[tournamentsAddr] = balances[tournamentsAddr].add(
tournamentsAmount
);
balances[ownerAddr] = teamReserve;
// Burn what's left
_totalSupply = _totalSupply.sub(difference);
burned = true;
Burned(difference);
}
}
Internal Functions
Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.