Fleta Token
ERC20
This contract is an ERC20 token.
Name
Fleta Token
Symbol
FLETA
Decimals
18
Total Supply
2,000,000,000 FLETA
About
link
description
FLETA (FLETA) is a cryptocurrency and operates on the Ethereum platform. FLETA has a current supply of 2,000,000,000 with 1,114,153,259.7097826 in circulation. The last known price of FLETA is 0.01083256 USD and is down -7.21 over the last 24 hours. It is currently trading on 8 active market(s) with $1,067,939.59 traded over the last 24 hours. More information can be found at https://fleta.io/.
Stats
Public Functions
17
Event Types
2
Code Size
13,690 bytes
Library Use
Uses SafeMath for uint.
State Variables (12) keyboard_arrow_up
Functions
setGatewayManager keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function setGatewayManager(address addr) public onlyOwner {
require(addr > address(0), "cannot setGatewayManager to 0x0");
manager = addr;
}
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
Source Code
function balanceOf(address tokenOwner) public view returns (uint256) {
if (mswap[tokenOwner]) {
return balances[tokenOwner];
}
return
ERC20Interface(v1Address).balanceOf(tokenOwner).add(balances[tokenOwner]);
}
allowance keyboard_arrow_up
Requirements help
Source Code
function allowance(address tokenOwner, address spender)
public
view
returns (uint256)
{
require(!_stopTrade, "stop trade");
return allowed[tokenOwner][spender];
}
transfer keyboard_arrow_up
Requirements help
Source Code
function transfer(address to, uint256 tokens) public returns (bool) {
require(!_stopTrade, "stop trade");
_swap(msg.sender);
require(to > address(0), "cannot transfer to 0x0");
balances[msg.sender] = balances[msg.sender].sub(tokens);
if (mgatewayAddress[to]) {
//balances[to] = balances[to].add(tokens);
//balances[to] = balances[to].sub(tokens);
_totalSupply = _totalSupply.sub(tokens);
emit Transfer(to, address(0), tokens);
} else {
balances[to] = balances[to].add(tokens);
}
emit Transfer(msg.sender, to, tokens);
return true;
}
approve keyboard_arrow_up
Requirements help
Source Code
function approve(address spender, uint256 tokens) public returns (bool) {
require(!_stopTrade, "stop trade");
_swap(msg.sender);
allowed[msg.sender][spender] = tokens;
emit 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) {
require(!_stopTrade, "stop trade");
_swap(msg.sender);
require(from > address(0), "cannot transfer from 0x0");
require(to > address(0), "cannot transfer to 0x0");
balances[from] = balances[from].sub(tokens);
if (from != to && from != msg.sender) {
allowed[from][msg.sender] = allowed[from][msg.sender].sub(tokens);
}
if (mgatewayAddress[to]) {
//balances[to] = balances[to].add(tokens);
//balances[to] = balances[to].sub(tokens);
_totalSupply = _totalSupply.sub(tokens);
emit Transfer(to, address(0), tokens);
} else {
balances[to] = balances[to].add(tokens);
}
emit Transfer(from, to, tokens);
return true;
}
stopTrade keyboard_arrow_up
startTrade keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
onlyOwner checks for the following:
Requirements help
_stopTrade must be true
Source Code
function startTrade() public onlyOwner {
require(_stopTrade, "already start trade");
_stopTrade = false;
}
approveAndCall keyboard_arrow_up
Requirements help
Source Code
function approveAndCall(
address spender,
uint256 tokens,
bytes memory data
) public returns (bool) {
require(msg.sender != spender, "msg.sender == spender");
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
ApproveAndCallFallBack(spender).receiveApproval(
msg.sender,
tokens,
address(this),
data
);
return true;
}
constructor keyboard_arrow_up
transferAnyERC20Token keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferAnyERC20Token(address tokenAddress, uint256 tokens)
public
onlyOwner
returns (bool)
{
return ERC20Interface(tokenAddress).transfer(owner, tokens);
}
swap keyboard_arrow_up
Source Code
function swap(address swapAddr) public returns (bool) {
require(!mswap[swapAddr], "already swap");
_swap(swapAddr);
return true;
}
isGatewayAddress keyboard_arrow_up
mint keyboard_arrow_up
Modifiers help
onlyManager checks for the following:
Requirements help
Source Code
function mint(address minter, uint256 _value) public onlyManager {
require(!_stopTrade, "stop trade");
_swap(minter);
balances[minter] = balances[minter].add(_value);
_totalSupply = _totalSupply.add(_value);
emit Transfer(address(0), minter, _value);
}
depositGatewayAdd keyboard_arrow_up
Modifiers help
onlyManager checks for the following:
Requirements help
Source Code
function depositGatewayAdd(address gatewayAddr) public onlyManager {
require(!_stopTrade, "stop trade");
mgatewayAddress[gatewayAddr] = true;
if (balanceOf(gatewayAddr) > 0) {
_burn(gatewayAddr, balanceOf(gatewayAddr));
}
}
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 FletaV2Token._swap keyboard_arrow_up
Source Code
function _swap(address swapAddr) private {
if (!mswap[swapAddr]) {
mswap[swapAddr] = true;
uint256 _value = ERC20Interface(v1Address).balanceOf(swapAddr);
balances[swapAddr] = balances[swapAddr].add(_value);
}
}
internal FletaV2Token._burn keyboard_arrow_up
Source Code
function _burn(address burner, uint256 _value) private {
_swap(burner);
balances[burner] = balances[burner].sub(_value);
_totalSupply = _totalSupply.sub(_value);
emit Transfer(burner, address(0), _value);
}