ERC20
This contract is an ERC20 token.
Name
aXpire
Symbol
AXPR
Decimals
18
Total Supply
345,014,001 AXPR
About
Stats
Public Functions
17
Event Types
8
Code Size
10,886 bytes
Library Use
Uses SafeMath for uint.
Events (8) keyboard_arrow_up
State Variables (12) keyboard_arrow_up
Functions
transferOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Source Code
function transfer(address _to, uint256 _value)
public
whenNotPaused
returns (bool)
{
return super.transfer(_to, _value);
}
transferFrom keyboard_arrow_up
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) public whenNotPaused returns (bool) {
return super.transferFrom(_from, _to, _value);
}
approve keyboard_arrow_up
Requirements help
One or more of the following:
-
allowed for the sender's address for _spender
must be equal to
0
- OR
_value
must be equal to
0
Source Code
function approve(address _spender, uint256 _value)
public
whenNotPaused
returns (bool)
{
return super.approve(_spender, _value);
}
allowance keyboard_arrow_up
burn keyboard_arrow_up
Requirements help
Source Code
function burn(uint256 _amount) public {
require(_amount > 0);
require(_amount <= balances[msg.sender]);
// no need to require _amount <= totalSupply, since that would imply the
// sender's balance is greater than the totalSupply, which *should* be an assertion failure
address burner = msg.sender;
balances[burner] = SafeMath.sub(balances[burner], _amount);
totalSupply = SafeMath.sub(totalSupply, _amount);
emit Transfer(burner, address(0), _amount);
emit Burn(burner, _amount);
}
burnFrom keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
Source Code
function burnFrom(address _from, uint256 _amount) public onlyOwner {
require(_from != address(0));
require(_amount > 0);
require(_amount <= balances[_from]);
balances[_from] = SafeMath.sub(balances[_from], _amount);
totalSupply = SafeMath.sub(totalSupply, _amount);
emit Transfer(_from, address(0), _amount);
emit Burn(_from, _amount);
}
pause keyboard_arrow_up
unpause keyboard_arrow_up
createTokens keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function createTokens() external payable {
if (!tokenSaleActive) revert();
if (haltIco) revert();
if (msg.value == 0) revert();
uint256 tokens;
tokens = SafeMath.mul(msg.value, icoTokenExchangeRate); // check that we're not over totals
uint256 checkedSupply = SafeMath.add(totalSupply, tokens);
// return money if something goes wrong
if (tokenCreationCap < checkedSupply) revert(); // odd fractions won't be found
totalSupply = checkedSupply;
balances[msg.sender] += tokens; // safeAdd not needed; bad semantics to use here
emit CreateToken(msg.sender, tokens); // logs token creation
}
setIcoTokenExchangeRate keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function setIcoTokenExchangeRate(uint256 _icoTokenExchangeRate)
external
onlyOwner
{
icoTokenExchangeRate = _icoTokenExchangeRate;
}
setHaltIco keyboard_arrow_up
sendFundHome keyboard_arrow_up
sendFundHomeAmt keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function sendFundHomeAmt(uint256 _amt) external onlyOwner {
if (!ethFundDeposit.send(_amt * 10**decimals)) revert(); // send the eth to tge International
}
toggleDead keyboard_arrow_up
endIco keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
onlyOwner checks for the following:
Requirements help
Source Code
function endIco() external onlyOwner {
// end ICO
// ensure that sale is active. is set to false at the end. can only be performed once.
require(tokenSaleActive == true);
tokenSaleActive = false;
}
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.