Blockwell

Arcade Token

ERC20

This contract is an ERC20 token.

Name Arcade Token
Symbol ARC
Decimals 18
Total Supply 9,525,398 ARC

About

Stats

Public Functions 14
Event Types 3
Code Size 12,135 bytes

Events (3) keyboard_arrow_up

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint256 help

Buy Event

Parameters help
sender
address help
eth
uint help
fbt
uint help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

name Variable

string help

symbol Variable

string help

decimals Variable

uint help

startBlock Variable

uint help

endBlock Variable

uint help

multisig Variable

address help

founder Variable

address help

developer Variable

address help

rewards Variable

address help

rewardAddressesSet Variable

bool help

owner Variable

address help

marketactive Variable

bool help

etherCap Variable

uint help

rewardsAllocation Variable

uint help

developerAllocation Variable

uint help

founderAllocation Variable

uint help

allocated Variable

bool help

presaleTokenSupply Variable

uint help

presaleEtherRaised Variable

uint help

halted Variable

bool help

totalSupply Variable

uint256 help

balances Variable

mapping(address => uint256) help
Internal Variable

allowed Variable

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

Functions Expand All Collapse All

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function totalSupply() constant returns (uint256 supply) {}

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help constant
Source Code
function balanceOf(address _owner) constant returns (uint256 balance) {
  return balances[_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) returns (bool success) {
  if (block.number <= endBlock && marketactive == false) throw;
  return super.transfer(_to, _value);
}

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
) returns (bool success) {
  if (block.number <= endBlock && marketactive == false) throw;
  return super.transferFrom(_from, _to, _value);
}

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) 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)
  constant
  returns (uint256 remaining)
{
  return allowed[_owner][_spender];
}

Parameters help

Name Type
founderInput
address help
developerInput
address help
rewardsInput
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setRewardAddresses(
  address founderInput,
  address developerInput,
  address rewardsInput
) {
  if (msg.sender != owner) throw;
  if (rewardAddressesSet) throw;
  founder = founderInput;
  developer = developerInput;
  rewards = rewardsInput;
  rewardAddressesSet = true;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function price() constant returns (uint256) {
  return testPrice(block.number);
}

Parameters help

Name Type
blockNumber
uint help

Properties

Visibility help public
Mutability help constant
Source Code
function testPrice(uint256 blockNumber) constant returns (uint256) {
  if (blockNumber >= startBlock && blockNumber < startBlock + 250) return 125; //power hour
  if (blockNumber < startBlock || blockNumber > endBlock) return 75; //default price
  return
    75 +
    (((4 * (endBlock - blockNumber)) / (endBlock - startBlock + 1)) * 34) /
    4; //crowdsale price
}

Parameters help

Name Type
recipient
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function buyRecipient(address recipient) {
  if (
    block.number < startBlock ||
    block.number > endBlock ||
    safeAdd(presaleEtherRaised, msg.value) > etherCap ||
    halted
  ) throw;
  uint256 tokens = safeMul(msg.value, price());
  balances[recipient] = safeAdd(balances[recipient], tokens);
  totalSupply = safeAdd(totalSupply, tokens);
  presaleEtherRaised = safeAdd(presaleEtherRaised, msg.value);

  if (!multisig.send(msg.value)) throw; //immediately send Ether to multisig address

  // if etherCap is reached - activate the market
  if (presaleEtherRaised == etherCap && !marketactive) {
    marketactive = true;
  }

  Buy(recipient, msg.value, tokens);
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function allocateTokens() {
  // make sure founder/developer/rewards addresses are configured
  if (founder == 0x0 || developer == 0x0 || rewards == 0x0) throw;
  // owner/founder/developer/rewards addresses can call this function
  if (
    msg.sender != owner &&
    msg.sender != founder &&
    msg.sender != developer &&
    msg.sender != rewards
  ) throw;
  // it should only continue if endBlock has passed OR presaleEtherRaised has reached the cap
  if (block.number <= endBlock && presaleEtherRaised < etherCap) throw;
  if (allocated) throw;
  presaleTokenSupply = totalSupply;
  // total token allocations add up to 16% of total coins, so formula is reward=allocation_in_percent/84 .
  balances[founder] = safeAdd(
    balances[founder],
    (presaleTokenSupply * founderAllocation) / 84
  );
  totalSupply = safeAdd(
    totalSupply,
    (presaleTokenSupply * founderAllocation) / 84
  );

  balances[developer] = safeAdd(
    balances[developer],
    (presaleTokenSupply * developerAllocation) / 84
  );
  totalSupply = safeAdd(
    totalSupply,
    (presaleTokenSupply * developerAllocation) / 84
  );

  balances[rewards] = safeAdd(
    balances[rewards],
    (presaleTokenSupply * rewardsAllocation) / 84
  );
  totalSupply = safeAdd(
    totalSupply,
    (presaleTokenSupply * rewardsAllocation) / 84
  );

  allocated = true;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function halt() {
  if (msg.sender != founder && msg.sender != developer) throw;
  halted = true;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function unhalt() {
  if (msg.sender != founder && msg.sender != developer) throw;
  halted = false;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable

Requirements help

Source Code
function() payable {
  buyRecipient(msg.sender);
}

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 SafeMath.safeMul keyboard_arrow_up

Parameters help

Name Type
a
uint help
b
uint help

Properties

Visibility help internal
Mutability help transaction
Source Code
function safeMul(uint256 a, uint256 b) internal returns (uint256) {
  uint256 c = a * b;
  assert(a == 0 || c / a == b);
  return c;
}

internal SafeMath.safeSub keyboard_arrow_up

Parameters help

Name Type
a
uint help
b
uint help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function safeSub(uint256 a, uint256 b) internal returns (uint256) {
  assert(b <= a);
  return a - b;
}

internal SafeMath.safeAdd keyboard_arrow_up

Parameters help

Name Type
a
uint help
b
uint help

Properties

Visibility help internal
Mutability help transaction
Source Code
function safeAdd(uint256 a, uint256 b) internal returns (uint256) {
  uint256 c = a + b;
  assert(c >= a && c >= b);
  return c;
}

internal SafeMath.assert keyboard_arrow_up

Parameters help

Name Type
assertion
bool help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function assert(bool assertion) internal {
  if (!assertion) throw;
}