PureLifeCoin
ERC20
This contract is an ERC20 token.
Name
PureLifeCoin
Symbol
LIFE
Decimals
18
Total Supply
100,000,000,000 LIFE
About
Identical Contracts
The following contracts have identical source code.
Stats
Public Functions
7
Event Types
2
Code Size
2,600 bytes
Constants (1) keyboard_arrow_up
State Variables (7) keyboard_arrow_up
Functions
SetupToken keyboard_arrow_up
Source Code
function SetupToken(
string tokenName,
string tokenSymbol,
uint256 tokenSupply
) {
if (msg.sender == owner && setupDone == false) {
symbol = tokenSymbol;
name = tokenName;
_totalSupply = tokenSupply * 1000000000000000000;
balances[owner] = _totalSupply;
setupDone = true;
}
}
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Source Code
function transfer(address _to, uint256 _amount) returns (bool success) {
if (
balances[msg.sender] >= _amount &&
_amount > 0 &&
balances[_to] + _amount > balances[_to]
) {
balances[msg.sender] -= _amount;
balances[_to] += _amount;
Transfer(msg.sender, _to, _amount);
return true;
} else {
return false;
}
}
transferFrom keyboard_arrow_up
Source Code
function transferFrom(
address _from,
address _to,
uint256 _amount
) returns (bool success) {
if (
balances[_from] >= _amount &&
allowed[_from][msg.sender] >= _amount &&
_amount > 0 &&
balances[_to] + _amount > balances[_to]
) {
balances[_from] -= _amount;
allowed[_from][msg.sender] -= _amount;
balances[_to] += _amount;
Transfer(_from, _to, _amount);
return true;
} else {
return false;
}
}
approve keyboard_arrow_up
Source Code
function approve(address _spender, uint256 _amount) returns (bool success) {
allowed[msg.sender][_spender] = _amount;
Approval(msg.sender, _spender, _amount);
return true;
}
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.