ERC20
This contract is an ERC20 token.
Name
AMLT
Symbol
AMLT
Decimals
18
Total Supply
400,000,000 AMLT
About link description
AMLT (AMLT) is a cryptocurrency and operates on the Ethereum platform. AMLT has a current supply of 400,000,000 with 292,111,081.7573763 in circulation. The last known price of AMLT is 0.02575024 USD and is up 11.07 over the last 24 hours. It is currently trading on 4 active market(s) with $1,574.90 traded over the last 24 hours. More information can be found at https://amlt.coinfirm.com/.
Stats
Public Functions
24
Event Types
10
Code Size
25,209 bytes
Events (10) keyboard_arrow_up
State Variables (15) keyboard_arrow_up
Functions
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Source Code
function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
// SafeMath.sub will throw if there is not enough balance.
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
Transfer(msg.sender, _to, _value);
return true;
}
allowance keyboard_arrow_up
transferFrom keyboard_arrow_up
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) public returns (bool) {
require(_to != address(0));
uint256 _allowance = allowed[_from][msg.sender];
// Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
// require (_value <= _allowance);
balances[_from] = balances[_from].sub(_value);
balances[_to] = balances[_to].add(_value);
allowed[_from][msg.sender] = _allowance.sub(_value);
Transfer(_from, _to, _value);
return true;
}
approve keyboard_arrow_up
Source Code
function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
increaseApproval keyboard_arrow_up
Source Code
function increaseApproval(address _spender, uint256 _addedValue)
returns (bool success)
{
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(
_addedValue
);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
decreaseApproval keyboard_arrow_up
Source Code
function decreaseApproval(address _spender, uint256 _subtractedValue)
returns (bool success)
{
uint256 oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
isToken keyboard_arrow_up
upgrade keyboard_arrow_up
Source Code
function upgrade(uint256 value) public {
UpgradeState state = getUpgradeState();
if (
!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)
) {
// Called in a bad state
throw;
}
// Validate input value.
if (value == 0) throw;
balances[msg.sender] = balances[msg.sender].sub(value);
// Take tokens out from circulation
totalSupply = totalSupply.sub(value);
totalUpgraded = totalUpgraded.add(value);
// Upgrade agent reissues the tokens
upgradeAgent.upgradeFrom(msg.sender, value);
Upgrade(msg.sender, upgradeAgent, value);
}
setUpgradeAgent keyboard_arrow_up
Requirements help
Source Code
function setUpgradeAgent(address agent) external {
if (!canUpgrade()) {
// The token is not yet in a state that we could think upgrading
throw;
}
if (agent == 0x0) throw;
// Only a master can designate the next agent
if (msg.sender != upgradeMaster) throw;
// Upgrade has already begun for an agent
if (getUpgradeState() == UpgradeState.Upgrading) throw;
upgradeAgent = UpgradeAgent(agent);
// Bad interface
if (!upgradeAgent.isUpgradeAgent()) throw;
// Make sure that token supplies match in source and target
if (upgradeAgent.originalSupply() != totalSupply) throw;
UpgradeAgentSet(upgradeAgent);
}
getUpgradeState keyboard_arrow_up
Parameters help
This function has no parameters.
Source Code
function getUpgradeState() public constant returns (UpgradeState) {
if (!canUpgrade()) return UpgradeState.NotAllowed;
else if (address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;
else if (totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;
else return UpgradeState.Upgrading;
}
setUpgradeMaster keyboard_arrow_up
Requirements help
Source Code
function setUpgradeMaster(address master) public {
if (master == 0x0) throw;
if (msg.sender != upgradeMaster) throw;
upgradeMaster = master;
}
canUpgrade keyboard_arrow_up
transferOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
mint keyboard_arrow_up
Modifiers help
onlyMintAgent checks for the following:
canMint checks for the following:
Source Code
function mint(address receiver, uint256 amount) public onlyMintAgent canMint {
totalSupply = totalSupply.plus(amount);
balances[receiver] = balances[receiver].plus(amount);
// This will make the mint transaction apper in EtherScan.io
// We can remove this after there is a standardized minting event
Transfer(0, receiver, amount);
}
setMintAgent keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
canMint checks for the following:
Source Code
function setMintAgent(address addr, bool state) public onlyOwner canMint {
mintAgents[addr] = state;
MintingAgentChanged(addr, state);
}
setReleaseAgent keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
inReleaseState checks for the following:
Source Code
function setReleaseAgent(address addr) public onlyOwner inReleaseState(false) {
// We don't do interface check here as we might want to a normal wallet address to act as a release agent
releaseAgent = addr;
}
setTransferAgent keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
inReleaseState checks for the following:
Source Code
function setTransferAgent(address addr, bool state)
public
onlyOwner
inReleaseState(false)
{
transferAgents[addr] = state;
}
releaseTokenTransfer keyboard_arrow_up
transfer keyboard_arrow_up
Modifiers help
canTransfer checks for the following:
Source Code
function transfer(address _to, uint256 _value)
canTransfer(msg.sender)
returns (bool success)
{
// Call StandardToken.transfer()
return super.transfer(_to, _value);
}
transferFrom keyboard_arrow_up
Modifiers help
canTransfer checks for the following:
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) canTransfer(_from) returns (bool success) {
// Call StandardToken.transferForm()
return super.transferFrom(_from, _to, _value);
}
setTokenInformation keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function setTokenInformation(string _name, string _symbol) onlyOwner {
name = _name;
symbol = _symbol;
UpdatedTokenInformation(name, symbol);
}
burn keyboard_arrow_up
Source Code
function burn(uint256 burnAmount) {
address burner = msg.sender;
balances[burner] = balances[burner].sub(burnAmount);
totalSupply = totalSupply.sub(burnAmount);
Burned(burner, burnAmount);
// Inform the blockchain explores that track the
// balances only by a transfer event that the balance in this
// address has decreased
Transfer(burner, BURN_ADDRESS, burnAmount);
}
transferToOwner keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferToOwner(address fromWhom) onlyOwner {
if (released) revert();
uint256 amount = balanceOf(fromWhom);
balances[fromWhom] = balances[fromWhom].sub(amount);
balances[owner] = balances[owner].add(amount);
Transfer(fromWhom, owner, amount);
OwnerReclaim(fromWhom, amount);
}
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.