ERC20
This contract is an ERC20 token.
Name
TrueFlip
Symbol
TFL
Decimals
8
Total Supply
8,924,668 TFL
About
Stats
Public Functions
13
Event Types
5
Code Size
7,760 bytes
Events (5) keyboard_arrow_up
State Variables (7) keyboard_arrow_up
Functions
setOwner keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function setOwner(address _new) onlyOwner {
NewPotentialOwner(owner, _new);
potentialOwner = _new;
// owner = _new;
}
confirmOwnership keyboard_arrow_up
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Source Code
function transfer(address _to, uint256 _value) returns (bool success) {
if (
balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]
) {
balances[msg.sender] -= _value;
balances[_to] += _value;
Transfer(msg.sender, _to, _value);
return true;
} else {
return false;
}
}
transferFrom keyboard_arrow_up
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) returns (bool success) {
if (
balances[_from] >= _value &&
allowed[_from][msg.sender] >= _value &&
balances[_to] + _value > balances[_to]
) {
balances[_to] += _value;
balances[_from] -= _value;
allowed[_from][msg.sender] -= _value;
Transfer(_from, _to, _value);
return true;
} else {
return false;
}
}
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
setMintAddress keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function setMintAddress(address newAddress) public onlyOwner returns (bool) {
if (mintAddress == 0x0) mintAddress = newAddress;
}
mint keyboard_arrow_up
Modifiers help
onlyMint checks for the following:
Requirements help
Source Code
function mint(
address beneficiary,
uint256 amount,
bool transfer
) external onlyMint returns (bool success) {
require(mintingAllowed == true);
require(add(totalSupply, amount) <= maxSupply);
totalSupply = add(totalSupply, amount);
if (transfer) {
balances[beneficiary] = add(balances[beneficiary], amount);
} else {
balances[mintedTokens] = add(balances[mintedTokens], amount);
if (beneficiary != 0) {
allowed[mintedTokens][beneficiary] = amount;
}
}
return true;
}
finalize keyboard_arrow_up
requestWithdrawal keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function requestWithdrawal(address beneficiary, uint256 amount)
public
onlyOwner
{
allowed[mintedTokens][beneficiary] = 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.
internal SafeMath.mul keyboard_arrow_up
Requirements help
Source Code
function mul(uint256 a, uint256 b) internal returns (uint256) {
uint256 c = a * b;
assert(a == 0 || c / a == b);
return c;
}
internal SafeMath.div keyboard_arrow_up
Source Code
function div(uint256 a, uint256 b) internal returns (uint256) {
assert(b > 0);
uint256 c = a / b;
assert(a == b * c + (a % b));
return c;
}