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
Events (6) keyboard_arrow_up
Functions
transferOwnership keyboard_arrow_up
pause keyboard_arrow_up
unpause keyboard_arrow_up
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Modifiers help
onlyAfter checks for the following:
whenNotPaused checks for the following:
Requirements help
_value
must be less than or equal to
the result of calling availableBalance with the sender's address
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
Modifiers help
onlyAfterOrOwner checks for the following:
whenNotPaused 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
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
lockBalance keyboard_arrow_up
Requirements help
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
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;
}
}