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

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

Functions Expand All Collapse All

totalSupply keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

balanceOf keyboard_arrow_up

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];
    }

transfer keyboard_arrow_up

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);
    }

transferFrom keyboard_arrow_up

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);
    }

approve keyboard_arrow_up

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;
    }

allowance keyboard_arrow_up

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];
    }

setRewardAddresses keyboard_arrow_up

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;
    }

price keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

testPrice keyboard_arrow_up

Parameters help

Name Type
blockNumber
uint help

Properties

Visibility help public
Mutability help constant
Source Code
    function testPrice(uint blockNumber) constant returns(uint) {
        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
    }

buyRecipient keyboard_arrow_up

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;
        uint 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);

    }

allocateTokens keyboard_arrow_up

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;

    }

halt keyboard_arrow_up

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;
    }

unhalt keyboard_arrow_up

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;
    }

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable

Requirements help

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