Blockwell

TrueFlip

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

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

Issuance Event

Parameters help
to
address help
value
uint256 help

NewOwner Event

Parameters help
old
address help
current
address help

NewPotentialOwner Event

Parameters help
old
address help
potential
address help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

name Constant

string help
TrueFlip

symbol Constant

string help
TFL

decimals Constant

uint8 help
8

maxSupply Constant

uint help
21000000 * UNKNOWN VALUE

mintedTokens Constant

address help

mintAddress Variable

address help

mintingAllowed Variable

bool help

totalSupply Variable

uint256 help

owner Variable

address help

potentialOwner Variable

address help

balances Variable

mapping(address => uint256) help
Internal Variable

allowed Variable

mapping(address => mapping(address => uint256)) help
Internal Variable

Functions Expand All Collapse All

setOwner keyboard_arrow_up

Parameters help

Name Type
_new
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setOwner(address _new) onlyOwner {
  NewPotentialOwner(owner, _new);
  potentialOwner = _new;
  // owner = _new;
}

confirmOwnership keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function confirmOwnership() onlyPotentialOwner {
  NewOwner(owner, potentialOwner);
  owner = potentialOwner;
  potentialOwner = 0;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function totalSupply() constant returns (uint256) {}

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help constant
Source Code
function balanceOf(address _owner) constant returns (uint256 balance) {
  return balances[_owner];
}

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
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;
  }
}

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
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;
  }
}

Parameters help

Name Type
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function approve(address _spender, uint256 _value) returns (bool success) {
  allowed[msg.sender][_spender] = _value;
  Approval(msg.sender, _spender, _value);
  return true;
}

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

Visibility help public
Mutability help constant
Source Code
function allowance(address _owner, address _spender)
  constant
  returns (uint256 remaining)
{
  return allowed[_owner][_spender];
}

setMintAddress keyboard_arrow_up

Parameters help

Name Type
newAddress
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setMintAddress(address newAddress) public onlyOwner returns (bool) {
  if (mintAddress == 0x0) mintAddress = newAddress;
}

mint keyboard_arrow_up

Parameters help

Name Type
beneficiary
address help
amount
uint help
transfer
bool help

Properties

Visibility help public
Mutability help transaction
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

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function finalize() public onlyMint returns (bool success) {
  mintingAllowed = false;
  return true;
}

requestWithdrawal keyboard_arrow_up

Parameters help

Name Type
beneficiary
address help
amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function requestWithdrawal(address beneficiary, uint256 amount)
  public
  onlyOwner
{
  allowed[mintedTokens][beneficiary] = amount;
}

withdrawTokens keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function withdrawTokens() public {
  transferFrom(mintedTokens, msg.sender, allowance(mintedTokens, msg.sender));
}

Internal Functions Expand All Collapse All

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

Parameters help

Name Type
a
uint help
b
uint help

Properties

Visibility help internal
Mutability help transaction
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

Parameters help

Name Type
a
uint help
b
uint help

Properties

Visibility help internal
Mutability help transaction
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;
}

internal SafeMath.sub keyboard_arrow_up

Parameters help

Name Type
a
uint help
b
uint help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function sub(uint256 a, uint256 b) internal returns (uint256) {
  assert(b <= a);
  return a - b;
}

internal SafeMath.add keyboard_arrow_up

Parameters help

Name Type
a
uint help
b
uint help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function add(uint256 a, uint256 b) internal returns (uint256) {
  uint256 c = a + b;
  assert(c >= a);
  return c;
}