openANX Token
ERC20
This contract is an ERC20 token.
Name
openANX Token
Symbol
OAX
Decimals
18
Total Supply
100,000,000 OAX
About link description
OAX (OAX) is a cryptocurrency and operates on the Ethereum platform. OAX has a current supply of 100,000,000 with 76,215,393.57684319 in circulation. The last known price of OAX is 0.1076445 USD and is up 0.39 over the last 24 hours. It is currently trading on 8 active market(s) with $179,143.64 traded over the last 24 hours. More information can be found at https://oax.org/.
Stats
Public Functions
23
Event Types
8
Code Size
37,452 bytes
Events (8) keyboard_arrow_up
Constants (11) keyboard_arrow_up
State Variables (15) keyboard_arrow_up
Functions
transferOwnership keyboard_arrow_up
acceptOwnership keyboard_arrow_up
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Source Code
function transfer(address _to, uint256 _amount) returns (bool success) {
// Cannot transfer before crowdsale ends
require(finalised);
// Cannot transfer if KYC verification is required
require(!kycRequired[msg.sender]);
// Standard transfer
return super.transfer(_to, _amount);
}
transferFrom keyboard_arrow_up
Source Code
function transferFrom(
address _from,
address _to,
uint256 _amount
) returns (bool success) {
// Cannot transfer before crowdsale ends
require(finalised);
// Cannot transfer if KYC verification is required
require(!kycRequired[_from]);
// Standard transferFrom
return super.transferFrom(_from, _to, _amount);
}
approve keyboard_arrow_up
Source Code
function approve(address _spender, uint256 _amount) returns (bool success) {
allowed[msg.sender][_spender] = _amount;
Approval(msg.sender, _spender, _amount);
return true;
}
allowance keyboard_arrow_up
setWallet keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function setWallet(address _wallet) onlyOwner {
wallet = _wallet;
WalletUpdated(wallet);
}
setTokensPerKEther keyboard_arrow_up
constructor keyboard_arrow_up
Parameters help
This function has no parameters.
Requirements help
One or more of the following:
-
CONTRIBUTIONS_MAX
must be greater than
msg.value
- OR
CONTRIBUTIONS_MAX
must be equal to
0
Source Code
function() payable {
proxyPayment(msg.sender);
}
proxyPayment keyboard_arrow_up
Requirements help
One or more of the following:
-
CONTRIBUTIONS_MAX
must be greater than
msg.value
- OR
CONTRIBUTIONS_MAX
must be equal to
0
Source Code
function proxyPayment(address participant) payable {
// No contributions after the crowdsale is finalised
require(!finalised);
// No contributions before the start of the crowdsale
require(now >= START_DATE);
// No contributions after the end of the crowdsale
require(now <= END_DATE);
// No contributions below the minimum (can be 0 ETH)
require(msg.value >= CONTRIBUTIONS_MIN);
// No contributions above a maximum (if maximum is set to non-0)
require(CONTRIBUTIONS_MAX == 0 || msg.value < CONTRIBUTIONS_MAX);
// Calculate number of tokens for contributed ETH
// `18` is the ETH decimals
// `- decimals` is the token decimals
// `+ 3` for the tokens per 1,000 ETH factor
uint256 tokens = (msg.value * tokensPerKEther) /
10**uint256(18 - decimals + 3);
// Check if the hard cap will be exceeded
require(totalSupply + tokens <= TOKENS_HARD_CAP);
// Add tokens purchased to account's balance and total supply
balances[participant] = balances[participant].add(tokens);
totalSupply = totalSupply.add(tokens);
// Log the tokens purchased
Transfer(0x0, participant, tokens);
TokensBought(
participant,
msg.value,
this.balance,
tokens,
totalSupply,
tokensPerKEther
);
// KYC verification required before participant can transfer the tokens
kycRequired[participant] = true;
// Transfer the contributed ethers to the crowdsale wallet
if (!wallet.send(msg.value)) throw;
}
finalise keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
onlyOwner checks for the following:
Requirements help
One or more of the following:
-
now
must be greater than
END_DATE
- OR
totalSupply
must be greater than or equal to
TOKENS_SOFT_CAP
Source Code
function finalise() onlyOwner {
// Can only finalise if raised > soft cap or after the end date
require(totalSupply >= TOKENS_SOFT_CAP || now > END_DATE);
// Can only finalise once
require(!finalised);
// Calculate and add remaining tokens to locked balances
lockedTokens.addRemainingTokens();
// Allocate locked and premined tokens
balances[address(lockedTokens)] = balances[address(lockedTokens)].add(
lockedTokens.totalSupplyLocked()
);
totalSupply = totalSupply.add(lockedTokens.totalSupplyLocked());
// Can only finalise once
finalised = true;
}
addPrecommitment keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
Source Code
function addPrecommitment(address participant, uint256 balance) onlyOwner {
require(now < START_DATE);
require(balance > 0);
balances[participant] = balances[participant].add(balance);
totalSupply = totalSupply.add(balance);
Transfer(0x0, participant, balance);
}
kycVerify keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function kycVerify(address participant) onlyOwner {
kycRequired[participant] = false;
KycVerified(participant);
}
burnFrom keyboard_arrow_up
Source Code
function burnFrom(address _from, uint256 _amount) returns (bool success) {
if (
balances[_from] >= _amount && // From a/c has balance
allowed[_from][0x0] >= _amount && // Transfer approved
_amount > 0 && // Non-zero transfer
balances[0x0] + _amount > balances[0x0] // Overflow check
) {
balances[_from] = balances[_from].sub(_amount);
allowed[_from][0x0] = allowed[_from][0x0].sub(_amount);
balances[0x0] = balances[0x0].add(_amount);
totalSupply = totalSupply.sub(_amount);
Transfer(_from, 0x0, _amount);
return true;
} else {
return false;
}
}
balanceOfLocked1Y keyboard_arrow_up
balanceOfLocked2Y keyboard_arrow_up
balanceOfLocked keyboard_arrow_up
totalSupplyLocked1Y keyboard_arrow_up
totalSupplyLocked2Y keyboard_arrow_up
totalSupplyLocked keyboard_arrow_up
totalSupplyUnlocked keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function totalSupplyUnlocked() constant returns (uint256) {
if (finalised && totalSupply >= lockedTokens.totalSupplyLocked()) {
return totalSupply.sub(lockedTokens.totalSupplyLocked());
} else {
return 0;
}
}
transferAnyERC20Token keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferAnyERC20Token(address tokenAddress, uint256 amount)
onlyOwner
returns (bool success)
{
return ERC20Interface(tokenAddress).transfer(owner, amount);
}
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.