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
State Variables (7) keyboard_arrow_up
Functions
approve keyboard_arrow_up
Requirements help
Source Code
function approve(
address _spender,
uint256 _value,
bytes _data
) public returns (bool) {
super.approve(_spender, _value);
require(_spender.call(_data));
return true;
}
transfer keyboard_arrow_up
Requirements help
Source Code
function transfer(
address _to,
uint256 _value,
bytes _data
) public returns (bool) {
super.transfer(_to, _value);
require(_to.call(_data));
return true;
}
transferFrom keyboard_arrow_up
Requirements help
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;
}
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
allowance keyboard_arrow_up
transfer keyboard_arrow_up
Requirements help
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;
}
approve keyboard_arrow_up
Requirements help
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;
}
transferFrom keyboard_arrow_up
Requirements help
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
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
allocateTokens keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
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
Modifiers help
onlyOwner checks for the following:
Requirements help
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
Requirements help
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
constructor keyboard_arrow_up
vestedBalanceOf keyboard_arrow_up
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
Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.