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 token and operates on the Ethereum platform. OAX has a current supply of 100,000,000 with 75,071,493.577 in circulation. The last known price of OAX is $0.210776 USD and is up 12.97% over the last 24 hours. It is currently trading on 9 active market(s) with $2,255,569.19 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

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

Functions Expand All Collapse All

transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

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

acceptOwnership keyboard_arrow_up

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

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 (uint balance) {
        return balances[_owner];
    }

transfer keyboard_arrow_up

Parameters help

Name Type
_to
address help
_amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
    function transfer(address _to, uint _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

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, uint _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

Parameters help

Name Type
_spender
address help
_amount
uint help

Properties

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

setWallet keyboard_arrow_up

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

setTokensPerKEther keyboard_arrow_up

Parameters help

Name Type
_tokensPerKEther
uint help

Properties

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

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable

Requirements help

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

proxyPayment keyboard_arrow_up

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
        uint tokens = msg.value * tokensPerKEther / 10**uint(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.

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

addPrecommitment keyboard_arrow_up

Parameters help

Name Type
participant
address help
balance
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
    function addPrecommitment(address participant, uint 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

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

burnFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
    function burnFrom(
        address _from,
        uint _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

Parameters help

Name Type
account
address help

Properties

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

balanceOfLocked2Y keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

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

balanceOfLocked keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

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

totalSupplyLocked1Y keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

totalSupplyLocked2Y keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

totalSupplyLocked keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

totalSupplyUnlocked keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

transferAnyERC20Token keyboard_arrow_up

Parameters help

Name Type
tokenAddress
address help
amount
uint help

Properties

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