Blockwell

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

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint help

KycVerified Event

Parameters help
participant
address help

OwnershipTransferred Event

Parameters help
_from
address help
_to
address help

PrecommitmentAdded Event

Parameters help
participant
address help
balance
uint help

TokensBought Event

Parameters help
buyer
address help
ethers
uint help
newEtherBalance
uint help
tokens
uint help
newTotalSupply
uint help
tokensPerKEther
uint help

TokensPerKEtherUpdated Event

Parameters help
tokensPerKEther
uint help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint help

WalletUpdated Event

Parameters help
newWallet
address help

SYMBOL Constant

string help
OAX

NAME Constant

string help
openANX Token

DECIMALS Constant

uint8 help
18

DECIMALSFACTOR Constant

uint help
UNKNOWN VALUE

TOKENS_SOFT_CAP Constant

uint help

TOKENS_HARD_CAP Constant

uint help

TOKENS_TOTAL Constant

uint help

START_DATE Constant

uint help
1498136400

END_DATE Constant

uint help
1500728400

LOCKED_1Y_DATE Constant

uint help

LOCKED_2Y_DATE Constant

uint help

finalised Variable

bool help

tokensPerKEther Variable

uint help

lockedTokens Variable

address help

wallet Variable

address help

symbol Variable

string help

name Variable

string help

decimals Variable

uint8 help

totalSupply Variable

uint help

owner Variable

address help

newOwner Variable

address help

CONTRIBUTIONS_MIN Variable

uint help

CONTRIBUTIONS_MAX Variable

uint help

kycRequired Variable

mapping(address => bool) help

balances Variable

mapping(address => uint) help
Internal Variable

allowed Variable

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

Functions Expand All Collapse All

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferOwnership(address _newOwner) onlyOwner {
  newOwner = _newOwner;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function acceptOwnership() {
  require(msg.sender == newOwner);
  OwnershipTransferred(owner, newOwner);
  owner = newOwner;
}

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
_amount
uint help

Properties

Visibility help public
Mutability help transaction
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);
}

Parameters help

Name Type
_from
address help
_to
address help
_amount
uint help

Properties

Visibility help public
Mutability help transaction
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);
}

Parameters help

Name Type
_spender
address help
_amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function approve(address _spender, uint256 _amount) returns (bool success) {
  allowed[msg.sender][_spender] = _amount;
  Approval(msg.sender, _spender, _amount);
  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
_wallet
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setWallet(address _wallet) onlyOwner {
  wallet = _wallet;
  WalletUpdated(wallet);
}

Parameters help

Name Type
_tokensPerKEther
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function setTokensPerKEther(uint256 _tokensPerKEther) onlyOwner {
  require(now < START_DATE);
  require(_tokensPerKEther > 0);
  tokensPerKEther = _tokensPerKEther;
  TokensPerKEtherUpdated(tokensPerKEther);
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable

Requirements help

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

Parameters help

Name Type
participant
address help

Properties

Visibility help public
Mutability help payable

Requirements help

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

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
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;
}

Parameters help

Name Type
participant
address help
balance
uint help

Properties

Visibility help public
Mutability help transaction
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);
}

Parameters help

Name Type
participant
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function kycVerify(address participant) onlyOwner {
  kycRequired[participant] = false;
  KycVerified(participant);
}

Parameters help

Name Type
_from
address help
_amount
uint help

Properties

Visibility help public
Mutability help transaction
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;
  }
}

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help constant
Source Code
function balanceOfLocked1Y(address account) constant returns (uint256 balance) {
  return lockedTokens.balanceOfLocked1Y(account);
}

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help constant
Source Code
function balanceOfLocked2Y(address account) constant returns (uint256 balance) {
  return lockedTokens.balanceOfLocked2Y(account);
}

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help constant
Source Code
function balanceOfLocked(address account) constant returns (uint256 balance) {
  return lockedTokens.balanceOfLocked(account);
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function totalSupplyLocked1Y() constant returns (uint256) {
  if (finalised) {
    return lockedTokens.totalSupplyLocked1Y();
  } else {
    return 0;
  }
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function totalSupplyLocked2Y() constant returns (uint256) {
  if (finalised) {
    return lockedTokens.totalSupplyLocked2Y();
  } else {
    return 0;
  }
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function totalSupplyLocked() constant returns (uint256) {
  if (finalised) {
    return lockedTokens.totalSupplyLocked();
  } else {
    return 0;
  }
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function totalSupplyUnlocked() constant returns (uint256) {
  if (finalised && totalSupply >= lockedTokens.totalSupplyLocked()) {
    return totalSupply.sub(lockedTokens.totalSupplyLocked());
  } else {
    return 0;
  }
}

Parameters help

Name Type
tokenAddress
address help
amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferAnyERC20Token(address tokenAddress, uint256 amount)
  onlyOwner
  returns (bool success)
{
  return ERC20Interface(tokenAddress).transfer(owner, amount);
}

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.