Blockwell

Game.com Token

ERC20

This contract is an ERC20 token.

Name Game.com Token
Symbol GTC
Decimals 18
Total Supply 2,000,000,000 GTC

About link description

Game.com (GTC) is a cryptocurrency and operates on the Ethereum platform. Game.com has a current supply of 2,000,000,000 with 761,444,189.761888 in circulation. The last known price of Game.com is 0.00506395 USD and is down -1.76 over the last 24 hours. It is currently trading on 5 active market(s) with $139,589.92 traded over the last 24 hours. More information can be found at http://game.com/.

Stats

Public Functions 25
Event Types 7
Code Size 14,869 bytes

Events (7) keyboard_arrow_up

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint256 help

CreateGameIco Event

Parameters help
_to
address help
_value
uint256 help

OwnerAddition Event

Parameters help
owner
address help

OwnerRemoval Event

Parameters help
owner
address help

PreICOTokenPushed Event

Parameters help
_buyer
address help
_amount
uint256 help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

UnlockBalance Event

Parameters help
_owner
address help
_amount
uint256 help

name Constant

string help
Game.com Token

symbol Constant

string help
GTC

decimals Constant

uint256 help
18

version Variable

string help

etherProceedsAccount Variable

address help

multiWallet Variable

address help

isFinalized Variable

bool help

window0TotalSupply Variable

uint256 help

window1TotalSupply Variable

uint256 help

window2TotalSupply Variable

uint256 help

window3TotalSupply Variable

uint256 help

window0StartTime Variable

uint256 help

window0EndTime Variable

uint256 help

window1StartTime Variable

uint256 help

window1EndTime Variable

uint256 help

window2StartTime Variable

uint256 help

window2EndTime Variable

uint256 help

window3StartTime Variable

uint256 help

window3EndTime Variable

uint256 help

preservedTokens Variable

uint256 help

window0TokenCreationCap Variable

uint256 help

window1TokenCreationCap Variable

uint256 help

window2TokenCreationCap Variable

uint256 help

window3TokenCreationCap Variable

uint256 help

window0TokenExchangeRate Variable

uint256 help

window1TokenExchangeRate Variable

uint256 help

window2TokenExchangeRate Variable

uint256 help

window3TokenExchangeRate Variable

uint256 help

preICOLimit Variable

uint256 help

instantTransfer Variable

bool help

totalSupply Variable

uint256 help

isOwner Variable

mapping(address => bool) help

owners Variable

address[] help
Internal Variable

balances Variable

mapping(address => uint256) help
Internal Variable

lockedBalances Variable

mapping(address => uint256) help
Internal Variable

initLockedBalances Variable

mapping(address => uint256) help
Internal Variable

allowed Variable

mapping(address => mapping(address => uint256)) help
Internal Variable

allowTransfer Variable

bool help
Internal Variable

Functions Expand All Collapse All

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help constant
Source Code
function balanceOf(address _owner) public constant returns (uint256 balance) {
  return balances[_owner] + lockedBalances[_owner];
}

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function transfer(address _to, uint256 _value) public returns (bool success) {
  if (balances[msg.sender] >= _value && _value > 0 && allowTransfer) {
    balances[msg.sender] -= _value;
    balances[_to] += _value;
    Transfer(msg.sender, _to, _value);
    return true;
  } else {
    return false;
  }
}

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
) public returns (bool success) {
  if (
    balances[_from] >= _value &&
    allowed[_from][msg.sender] >= _value &&
    _value > 0 &&
    allowTransfer
  ) {
    balances[_to] += _value;
    balances[_from] -= _value;
    allowed[_from][msg.sender] -= _value;
    Transfer(_from, _to, _value);
    return true;
  } else {
    return false;
  }
}

Parameters help

Name Type
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function approve(address _spender, uint256 _value)
  public
  returns (bool success)
{
  allowed[msg.sender][_spender] = _value;
  Approval(msg.sender, _spender, _value);
  return true;
}

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

Visibility help public
Mutability help constant
Source Code
function allowance(address _owner, address _spender)
  public
  constant
  returns (uint256 remaining)
{
  return allowed[_owner][_spender];
}

availableBalanceOf keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help constant
Source Code
function availableBalanceOf(address _owner)
  public
  constant
  returns (uint256 balance)
{
  return balances[_owner];
}

adjustTime keyboard_arrow_up

Parameters help

Name Type
_window0StartTime
uint256 help
_window0EndTime
uint256 help
_window1StartTime
uint256 help
_window1EndTime
uint256 help
_window2StartTime
uint256 help
_window2EndTime
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function adjustTime(
  uint256 _window0StartTime,
  uint256 _window0EndTime,
  uint256 _window1StartTime,
  uint256 _window1EndTime,
  uint256 _window2StartTime,
  uint256 _window2EndTime
) public {
  require(msg.sender == etherProceedsAccount);
  window0StartTime = _window0StartTime;
  window0EndTime = _window0EndTime;
  window1StartTime = _window1StartTime;
  window1EndTime = _window1EndTime;
  window2StartTime = _window2StartTime;
  window2EndTime = _window2EndTime;
}

adjustSupply keyboard_arrow_up

Parameters help

Name Type
_window0TotalSupply
uint256 help
_window1TotalSupply
uint256 help
_window2TotalSupply
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function adjustSupply(
  uint256 _window0TotalSupply,
  uint256 _window1TotalSupply,
  uint256 _window2TotalSupply
) public {
  require(msg.sender == etherProceedsAccount);
  window0TotalSupply = _window0TotalSupply * 10**decimals;
  window1TotalSupply = _window1TotalSupply * 10**decimals;
  window2TotalSupply = _window2TotalSupply * 10**decimals;
}

adjustCap keyboard_arrow_up

Parameters help

Name Type
_preservedTokens
uint256 help
_window0TokenCreationCap
uint256 help
_window1TokenCreationCap
uint256 help
_window2TokenCreationCap
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function adjustCap(
  uint256 _preservedTokens,
  uint256 _window0TokenCreationCap,
  uint256 _window1TokenCreationCap,
  uint256 _window2TokenCreationCap
) public {
  require(msg.sender == etherProceedsAccount);
  preservedTokens = _preservedTokens * 10**decimals;
  window0TokenCreationCap = _window0TokenCreationCap * 10**decimals;
  window1TokenCreationCap = _window1TokenCreationCap * 10**decimals;
  window2TokenCreationCap = _window2TokenCreationCap * 10**decimals;
}

adjustRate keyboard_arrow_up

Parameters help

Name Type
_window0TokenExchangeRate
uint256 help
_window1TokenExchangeRate
uint256 help
_window2TokenExchangeRate
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function adjustRate(
  uint256 _window0TokenExchangeRate,
  uint256 _window1TokenExchangeRate,
  uint256 _window2TokenExchangeRate
) public {
  require(msg.sender == etherProceedsAccount);
  window0TokenExchangeRate = _window0TokenExchangeRate;
  window1TokenExchangeRate = _window1TokenExchangeRate;
  window2TokenExchangeRate = _window2TokenExchangeRate;
}

setProceedsAccount keyboard_arrow_up

Parameters help

Name Type
_newEtherProceedsAccount
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setProceedsAccount(address _newEtherProceedsAccount) public {
  require(msg.sender == etherProceedsAccount);
  etherProceedsAccount = _newEtherProceedsAccount;
}

setMultiWallet keyboard_arrow_up

Parameters help

Name Type
_newWallet
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setMultiWallet(address _newWallet) public {
  require(msg.sender == etherProceedsAccount);
  multiWallet = _newWallet;
}

setPreICOLimit keyboard_arrow_up

Parameters help

Name Type
_preICOLimit
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function setPreICOLimit(uint256 _preICOLimit) public {
  require(msg.sender == etherProceedsAccount);
  preICOLimit = _preICOLimit;
}

setInstantTransfer keyboard_arrow_up

Parameters help

Name Type
_instantTransfer
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
function setInstantTransfer(bool _instantTransfer) public {
  require(msg.sender == etherProceedsAccount);
  instantTransfer = _instantTransfer;
}

setAllowTransfer keyboard_arrow_up

Parameters help

Name Type
_allowTransfer
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
function setAllowTransfer(bool _allowTransfer) public {
  require(msg.sender == etherProceedsAccount);
  allowTransfer = _allowTransfer;
}

addOwner keyboard_arrow_up

Parameters help

Name Type
owner
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function addOwner(address owner) public {
  require(msg.sender == etherProceedsAccount);
  isOwner[owner] = true;
  owners.push(owner);
  OwnerAddition(owner);
}

removeOwner keyboard_arrow_up

Parameters help

Name Type
owner
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function removeOwner(address owner) public {
  require(msg.sender == etherProceedsAccount);
  isOwner[owner] = false;
  OwnerRemoval(owner);
}

preICOPush keyboard_arrow_up

Parameters help

Name Type
buyer
address help
amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function preICOPush(address buyer, uint256 amount) public {
  require(msg.sender == etherProceedsAccount);

  uint256 tokens = 0;
  uint256 checkedSupply = 0;
  checkedSupply = safeAdd(window0TotalSupply, amount);
  require(window0TokenCreationCap >= checkedSupply);
  assignLockedBalance(buyer, amount);
  window0TotalSupply = checkedSupply;
  PreICOTokenPushed(buyer, amount);
}

lockedBalanceOf keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help constant
Source Code
function lockedBalanceOf(address _owner)
  public
  constant
  returns (uint256 balance)
{
  return lockedBalances[_owner];
}

initLockedBalanceOf keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help constant
Source Code
function initLockedBalanceOf(address _owner)
  public
  constant
  returns (uint256 balance)
{
  return initLockedBalances[_owner];
}

unlockBalance keyboard_arrow_up

Parameters help

Name Type
_owner
address help
prob
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

ownerExists checks for the following:
Source Code
function unlockBalance(address _owner, uint256 prob)
  public
  ownerExists(msg.sender)
  returns (bool)
{
  uint256 shouldUnlockedBalance = 0;
  shouldUnlockedBalance = (initLockedBalances[_owner] * prob) / 100;
  if (shouldUnlockedBalance > lockedBalances[_owner]) {
    shouldUnlockedBalance = lockedBalances[_owner];
  }
  balances[_owner] += shouldUnlockedBalance;
  lockedBalances[_owner] -= shouldUnlockedBalance;
  UnlockBalance(_owner, shouldUnlockedBalance);
  return true;
}

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable

Requirements help

Source Code
function() public payable {
  create();
}

withDraw keyboard_arrow_up

Parameters help

Name Type
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function withDraw(uint256 _value) public {
  require(msg.sender == etherProceedsAccount);
  if (multiWallet != 0x0) {
    multiWallet.transfer(_value);
  } else {
    etherProceedsAccount.transfer(_value);
  }
}

finalize keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function finalize() public {
  require(!isFinalized);
  require(msg.sender == etherProceedsAccount);
  isFinalized = true;
  if (multiWallet != 0x0) {
    assignLockedBalance(
      multiWallet,
      totalSupply - window0TotalSupply - window1TotalSupply - window2TotalSupply
    );
    if (this.balance > 0) multiWallet.transfer(this.balance);
  } else {
    assignLockedBalance(
      etherProceedsAccount,
      totalSupply - window0TotalSupply - window1TotalSupply - window2TotalSupply
    );
    if (this.balance > 0) etherProceedsAccount.transfer(this.balance);
  }
}

supply keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function supply() public constant returns (uint256) {
  return window0TotalSupply + window1TotalSupply + window2TotalSupply;
}

Internal Functions Expand All Collapse All

Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.

internal GameICO.create keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function create() internal {
  require(!isFinalized);
  require(msg.value >= 0.01 ether);
  uint256 tokens = 0;
  uint256 checkedSupply = 0;

  if (
    window0StartTime != 0 &&
    window0EndTime != 0 &&
    time() >= window0StartTime &&
    time() <= window0EndTime
  ) {
    if (preICOLimit > 0) {
      require(msg.value >= preICOLimit);
    }
    tokens = safeMult(msg.value, window0TokenExchangeRate);
    checkedSupply = safeAdd(window0TotalSupply, tokens);
    require(window0TokenCreationCap >= checkedSupply);
    assignLockedBalance(msg.sender, tokens);
    window0TotalSupply = checkedSupply;
    if (multiWallet != 0x0 && instantTransfer) multiWallet.transfer(msg.value);
    CreateGameIco(msg.sender, tokens);
  } else if (
    window1StartTime != 0 &&
    window1EndTime != 0 &&
    time() >= window1StartTime &&
    time() <= window1EndTime
  ) {
    tokens = safeMult(msg.value, window1TokenExchangeRate);
    checkedSupply = safeAdd(window1TotalSupply, tokens);
    require(window1TokenCreationCap >= checkedSupply);
    balances[msg.sender] += tokens;
    window1TotalSupply = checkedSupply;
    if (multiWallet != 0x0 && instantTransfer) multiWallet.transfer(msg.value);
    CreateGameIco(msg.sender, tokens);
  } else if (
    window2StartTime != 0 &&
    window2EndTime != 0 &&
    time() >= window2StartTime &&
    time() <= window2EndTime
  ) {
    tokens = safeMult(msg.value, window2TokenExchangeRate);
    checkedSupply = safeAdd(window2TotalSupply, tokens);
    require(window2TokenCreationCap >= checkedSupply);
    balances[msg.sender] += tokens;
    window2TotalSupply = checkedSupply;
    if (multiWallet != 0x0 && instantTransfer) multiWallet.transfer(msg.value);
    CreateGameIco(msg.sender, tokens);
  } else {
    require(false);
  }
}

internal GameICO.time keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction
Source Code
function time() internal returns (uint256) {
  return block.timestamp;
}

internal GameICO.today keyboard_arrow_up

Parameters help

Name Type
startTime
uint help

Properties

Visibility help internal
Mutability help transaction
Source Code
function today(uint256 startTime) internal returns (uint256) {
  return dayFor(time(), startTime);
}

internal GameICO.dayFor keyboard_arrow_up

Parameters help

Name Type
timestamp
uint help
startTime
uint help

Properties

Visibility help internal
Mutability help transaction
Source Code
function dayFor(uint256 timestamp, uint256 startTime)
  internal
  returns (uint256)
{
  return
    timestamp < startTime
      ? 0
      : safeSubtract(timestamp, startTime) / 24 hours + 1;
}

internal GameICO.assignLockedBalance keyboard_arrow_up

Parameters help

Name Type
_owner
address help
val
uint256 help

Properties

Visibility help private
Mutability help transaction
Source Code
function assignLockedBalance(address _owner, uint256 val) private {
  initLockedBalances[_owner] += val;
  lockedBalances[_owner] += val;
}

internal SafeMath.safeAdd keyboard_arrow_up

Parameters help

Name Type
x
uint256 help
y
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function safeAdd(uint256 x, uint256 y) internal returns (uint256) {
  uint256 z = x + y;
  require((z >= x) && (z >= y));
  return z;
}

internal SafeMath.safeSubtract keyboard_arrow_up

Parameters help

Name Type
x
uint256 help
y
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function safeSubtract(uint256 x, uint256 y) internal returns (uint256) {
  require(x >= y);
  uint256 z = x - y;
  return z;
}

internal SafeMath.safeMult keyboard_arrow_up

Parameters help

Name Type
x
uint256 help
y
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

One or more of the following:
Source Code
function safeMult(uint256 x, uint256 y) internal returns (uint256) {
  uint256 z = x * y;
  require((x == 0) || (z / x == y));
  return z;
}