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
Functions
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Requirements help
One or more of the following:
-
marketactive
must not be equal to
false
- OR
endBlock
must be less than
block.number
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
Requirements help
One or more of the following:
-
marketactive
must not be equal to
false
- OR
endBlock
must be less than
block.number
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
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
setRewardAddresses keyboard_arrow_up
Parameters help
Requirements help
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
testPrice keyboard_arrow_up
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
Requirements help
etherCap
must be greater than or equal to
the result of calling safeAdd with presaleEtherRaised, msg.value
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.
Requirements help
One or more of the following:
-
rewards
must be equal to
the sender's address
- OR
developer
must be equal to
the sender's address
- OR
founder
must be equal to
the sender's address
- OR
owner
must be equal to
the sender's address
One or more of the following:
-
presaleEtherRaised
must be greater than or equal to
etherCap
- OR
endBlock
must be less than
block.number
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.
Requirements help
One or more of the following:
-
developer
must be equal to
the sender's address
- OR
founder
must be equal to
the sender's address
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.
Requirements help
One or more of the following:
-
developer
must be equal to
the sender's address
- OR
founder
must be equal to
the sender's address
Source Code
function unhalt() {
if (msg.sender!=founder && msg.sender != developer) throw;
halted = false;
}