Blockwell

AirSwap Token

ERC20

This contract is an ERC20 token.

Name AirSwap Token
Symbol AST
Decimals 4
Total Supply 500,000,000 AST

About link description

AirSwap describes itself as a decentralized, peer-to-peer token trading network powered by Ethereum. AirSwap aims to make the buying and selling of tokens secure, simple, and without fees. Its mission is to empower people with global, frictionless trade. AirSwap implements the Swap protocol and currently has three products: Instant, Spaces, and DexIndex.

Stats

Public Functions 10
Event Types 6
Code Size 10,658 bytes

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint256 help

BalanceLocked Event

Parameters help
_owner
address help
_oldLockedAmount
uint256 help
_newLockedAmount
uint256 help
_expiry
uint256 help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Pause Event

Parameters help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

Unpause Event

Parameters help

BalanceLock Event

Members
amount
uint256 help
unlockDate
uint256 help

Functions Expand All Collapse All

transferOwnership keyboard_arrow_up

Parameters help

Name Type
newOwner
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
  function transferOwnership(address newOwner) onlyOwner public {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

pause keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
  function pause() onlyOwner whenNotPaused public {
    paused = true;
    Pause();
  }

unpause keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
  function unpause() onlyOwner whenPaused public {
    paused = false;
    Unpause();
  }

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

Requirements help

Source Code
    function transfer(address _to, uint256 _value)
        onlyAfter(becomesTransferable) whenNotPaused
        returns (bool success) {
        require(availableBalance(msg.sender) >= _value);
        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

Modifiers help

onlyAfterOrOwner checks for the following:

Requirements help

Source Code
    function transferFrom(address _from, address _to, uint256 _value)
        onlyAfterOrOwner(becomesTransferable, _from) whenNotPaused
        returns (bool success) {
        require(availableBalance(_from) >= _value);
        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];
    }

lockBalance keyboard_arrow_up

Parameters help

Name Type
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function lockBalance(uint256 _value) {

        // Check if the lock on previously locked tokens is still active.
        if (balanceLocks[msg.sender].unlockDate > now) {
            // Only allow confirming the lock or adding to it.
            require(_value >= balanceLocks[msg.sender].amount);
        }
        // Ensure that no more than the balance can be locked.
        require(balances[msg.sender] >= _value);

        // Lock tokens and notify.
        uint256 _expiry = now + lockingPeriod;
        BalanceLocked(msg.sender, balanceLocks[msg.sender].amount, _value, _expiry);
        balanceLocks[msg.sender] = BalanceLock(_value, _expiry);
    }

availableBalance keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help constant
Source Code
    function availableBalance(address _owner) constant returns(uint256) {
        if (balanceLocks[_owner].unlockDate < now) {
            return balances[_owner];
        } else {
            assert(balances[_owner] >= balanceLocks[_owner].amount);
            return balances[_owner] - balanceLocks[_owner].amount;
        }
    }