Blockwell

TE-FOOD

ERC20

This contract is an ERC20 token.

Name TE-FOOD
Symbol TFD
Decimals 18
Total Supply 567,917,833 TFD

About

Stats

Public Functions 16
Event Types 4
Code Size 6,997 bytes

Events (4) keyboard_arrow_up

Approval Event

Parameters help
tokenOwner
address help
spender
address help
tokens
uint help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Transfer Event

Parameters help
from
address help
to
address help
tokens
uint help

VestedTokensReleased Event

Parameters help
to
address help
amount
uint help

name Constant

string help
TE-FOOD

symbol Constant

string help
TFD

decimals Constant

uint8 help
18

_totalSupply Constant

uint help
1000000000 * 1 ether

transferrableTime Variable

uint help

owner Variable

address help

_vestedSupply Variable

uint help
Internal Variable

_circulatingSupply Variable

uint help
Internal Variable

balances Variable

mapping(address => uint) help
Internal Variable

allowed Variable

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

vestingMap Variable

mapping(uint => vestedBalance[]) help
Internal Variable

Functions Expand All Collapse All

Parameters help

Name Type
_spender
address help
_value
uint256 help
_data
bytes help

Properties

Visibility help public
Mutability help transaction
Source Code
function approve(
  address _spender,
  uint256 _value,
  bytes _data
) public returns (bool) {
  super.approve(_spender, _value);
  require(_spender.call(_data));
  return true;
}

Parameters help

Name Type
_to
address help
_value
uint256 help
_data
bytes help

Properties

Visibility help public
Mutability help transaction
Source Code
function transfer(
  address _to,
  uint256 _value,
  bytes _data
) public returns (bool) {
  super.transfer(_to, _value);
  require(_to.call(_data));
  return true;
}

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help
_data
bytes help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value,
  bytes _data
) public returns (bool) {
  super.transferFrom(_from, _to, _value);
  require(_to.call(_data));
  return true;
}

Parameters help

This function has no parameters.

Properties

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

Parameters help

Name Type
tokenOwner
address help

Properties

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

Parameters help

Name Type
tokenOwner
address help
spender
address help

Properties

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

Parameters help

Name Type
to
address help
tokens
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function transfer(address to, uint256 tokens) public returns (bool success) {
  require(now >= transferrableTime);
  require(to != address(this));
  require(balances[msg.sender] >= tokens);
  balances[msg.sender] = balances[msg.sender].sub(tokens);
  balances[to] = balances[to].add(tokens);
  Transfer(msg.sender, to, tokens);
  return true;
}

Parameters help

Name Type
spender
address help
tokens
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function approve(address spender, uint256 tokens)
  public
  returns (bool success)
{
  require(now >= transferrableTime);
  require(spender != address(this));
  allowed[msg.sender][spender] = tokens;
  Approval(msg.sender, spender, tokens);
  return true;
}

Parameters help

Name Type
from
address help
to
address help
tokens
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferFrom(
  address from,
  address to,
  uint256 tokens
) public returns (bool success) {
  require(now >= transferrableTime);
  require(to != address(this));
  require(allowed[from][msg.sender] >= tokens);
  balances[from] = balances[from].sub(tokens);
  allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);
  balances[to] = balances[to].add(tokens);
  Transfer(from, to, tokens);
  return true;
}

transferOwnership keyboard_arrow_up

Parameters help

Name Type
newOwner
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferOwnership(address newOwner) public onlyOwner {
  require(newOwner != address(0));
  OwnershipTransferred(owner, newOwner);
  owner = newOwner;
}

allocateTokens keyboard_arrow_up

Parameters help

Name Type
addr
address help
amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function allocateTokens(address addr, uint256 amount)
  public
  onlyOwner
  returns (bool)
{
  require(addr != 0x00);
  require(amount > 0);
  balances[0x00] = balances[0x00].sub(amount);
  balances[addr] = balances[addr].add(amount);
  _circulatingSupply = _circulatingSupply.add(amount);
  assert(
    _vestedSupply.add(_circulatingSupply).add(balances[0x00]) == _totalSupply
  );
  Transfer(0x00, addr, amount);
  return true;
}

allocateVestedTokens keyboard_arrow_up

Parameters help

Name Type
addr
address help
amount
uint help
vestingPeriod
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function allocateVestedTokens(
  address addr,
  uint256 amount,
  uint256 vestingPeriod
) public onlyOwner returns (bool) {
  require(addr != 0x00);
  require(amount > 0);
  require(vestingPeriod > 0);
  balances[0x00] = balances[0x00].sub(amount);
  vestingMap[vestingPeriod].push(vestedBalance(addr, amount));
  _vestedSupply = _vestedSupply.add(amount);
  assert(
    _vestedSupply.add(_circulatingSupply).add(balances[0x00]) == _totalSupply
  );
  return true;
}

releaseVestedTokens keyboard_arrow_up

Parameters help

Name Type
vestingPeriod
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function releaseVestedTokens(uint256 vestingPeriod) public {
  require(now >= transferrableTime.add(vestingPeriod));
  require(vestingMap[vestingPeriod].length > 0);
  require(vestingMap[vestingPeriod][0].balance > 0);
  var v = vestingMap[vestingPeriod];
  for (uint8 i = 0; i < v.length; i++) {
    balances[v[i].addr] = balances[v[i].addr].add(v[i].balance);
    _circulatingSupply = _circulatingSupply.add(v[i].balance);
    _vestedSupply = _vestedSupply.sub(v[i].balance);
    VestedTokensReleased(v[i].addr, v[i].balance);
    Transfer(0x00, v[i].addr, v[i].balance);
    v[i].balance = 0;
  }
}

enableTransfers keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function enableTransfers() public onlyOwner returns (bool) {
  transferrableTime = now.add(86400);
  owner = 0x00;
  return true;
}

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
function() public payable {
  revert();
}

vestedBalanceOf keyboard_arrow_up

Parameters help

Name Type
tokenOwner
address help
vestingPeriod
uint help

Properties

Visibility help public
Mutability help constant
Source Code
function vestedBalanceOf(address tokenOwner, uint256 vestingPeriod)
  public
  constant
  returns (uint256 balance)
{
  var v = vestingMap[vestingPeriod];
  for (uint8 i = 0; i < v.length; i++) {
    if (v[i].addr == tokenOwner) return v[i].balance;
  }
  return 0;
}

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.