Blockwell

FUD.finance

ERC20

This contract is an ERC20 token.

Name FUD.finance
Symbol FUD
Decimals 18
Total Supply 23,621 FUD

About link

FUD.finance (FUD) is a cryptocurrency and operates on the Ethereum platform. FUD.finance has a current supply of 23,620.585 with 23,619.71 in circulation. The last known price of FUD.finance is 6.05695336 USD and is up 0.38 over the last 24 hours. It is currently trading on 1 active market(s) with $0.00 traded over the last 24 hours. More information can be found at https://fud.finance/.

Stats

Public Functions 26
Event Types 12
Code Size 22,815 bytes

Events (12) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

Burn Event

Parameters help
burner
address help
value
uint256 help

Freezed Event

Parameters help
to
address help
release
uint64 help
amount
uint help

Initialized Event

Parameters help

Mint Event

Parameters help
to
address help
amount
uint256 help

MintFinished Event

Parameters help

OwnershipRenounced Event

Parameters help
previousOwner
address help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Pause Event

Parameters help

Released Event

Parameters help
owner
address help
amount
uint help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

Unpause Event

Parameters help

TOKEN_DECIMALS Constant

uint help
18

TOKEN_DECIMALS_UINT8 Constant

uint8 help
18

TOKEN_DECIMAL_MULTIPLIER Constant

uint help
UNKNOWN VALUE

TOKEN_NAME Constant

string help
FUD.finance

TOKEN_SYMBOL Constant

string help
FUD

PAUSED Constant

bool help
false

TARGET_USER Constant

address help

CONTINUE_MINTING Constant

bool help
false

initialized Variable

bool help

mintingFinished Variable

bool help

owner Variable

address help

paused Variable

bool help

chains Variable

mapping(bytes32 => uint64) help
Internal Variable

freezings Variable

mapping(bytes32 => uint) help
Internal Variable

freezingBalance Variable

mapping(address => uint) help
Internal Variable

allowed Variable

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

balances Variable

mapping(address => uint256) help
Internal Variable

totalSupply_ Variable

uint256 help
Internal Variable

Functions Expand All Collapse All

renounceOwnership keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function renounceOwnership() public onlyOwner {
  emit OwnershipRenounced(owner);
  owner = address(0);
}

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 {
  _transferOwnership(_newOwner);
}

pause keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function pause() public onlyOwner whenNotPaused {
  paused = true;
  emit Pause();
}

unpause keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function unpause() public onlyOwner whenPaused {
  paused = false;
  emit Unpause();
}

Parameters help

This function has no parameters.

Properties

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

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help view
Source Code
function balanceOf(address _owner) public view returns (uint256 balance) {
  return super.balanceOf(_owner) + freezingBalance[_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) public returns (bool _success) {
  require(!paused);
  return super.transfer(_to, _value);
}

burn keyboard_arrow_up

Parameters help

Name Type
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function burn(uint256 _value) public {
  _burn(msg.sender, _value);
}

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

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

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
) public returns (bool _success) {
  require(!paused);
  return super.transferFrom(_from, _to, _value);
}

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) public returns (bool) {
  allowed[msg.sender][_spender] = _value;
  emit Approval(msg.sender, _spender, _value);
  return true;
}

increaseApproval keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_addedValue
uint help

Properties

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

decreaseApproval keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_subtractedValue
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function decreaseApproval(address _spender, uint256 _subtractedValue)
  public
  returns (bool)
{
  uint256 oldValue = allowed[msg.sender][_spender];
  if (_subtractedValue > oldValue) {
    allowed[msg.sender][_spender] = 0;
  } else {
    allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
  }
  emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
  return true;
}

mint keyboard_arrow_up

Parameters help

Name Type
_to
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function mint(address _to, uint256 _amount)
  public
  hasMintPermission
  canMint
  returns (bool)
{
  totalSupply_ = totalSupply_.add(_amount);
  balances[_to] = balances[_to].add(_amount);
  emit Mint(_to, _amount);
  emit Transfer(address(0), _to, _amount);
  return true;
}

finishMinting keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function finishMinting() public onlyOwner canMint returns (bool) {
  mintingFinished = true;
  emit MintFinished();
  return true;
}

actualBalanceOf keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help view
Source Code
function actualBalanceOf(address _owner) public view returns (uint256 balance) {
  return super.balanceOf(_owner);
}

freezingBalanceOf keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help view
Source Code
function freezingBalanceOf(address _owner)
  public
  view
  returns (uint256 balance)
{
  return freezingBalance[_owner];
}

freezingCount keyboard_arrow_up

Parameters help

Name Type
_addr
address help

Properties

Visibility help public
Mutability help view
Source Code
function freezingCount(address _addr) public view returns (uint256 count) {
  uint64 release = chains[toKey(_addr, 0)];
  while (release != 0) {
    count++;
    release = chains[toKey(_addr, release)];
  }
}

getFreezing keyboard_arrow_up

Parameters help

Name Type
_addr
address help
_index
uint help

Properties

Visibility help public
Mutability help view
Source Code
function getFreezing(address _addr, uint256 _index)
  public
  view
  returns (uint64 _release, uint256 _balance)
{
  for (uint256 i = 0; i < _index + 1; i++) {
    _release = chains[toKey(_addr, _release)];
    if (_release == 0) {
      return;
    }
  }
  _balance = freezings[toKey(_addr, _release)];
}

freezeTo keyboard_arrow_up

Parameters help

Name Type
_to
address help
_amount
uint help
_until
uint64 help

Properties

Visibility help public
Mutability help transaction
Source Code
function freezeTo(
  address _to,
  uint256 _amount,
  uint64 _until
) public {
  require(_to != address(0));
  require(_amount <= balances[msg.sender]);

  balances[msg.sender] = balances[msg.sender].sub(_amount);

  bytes32 currentKey = toKey(_to, _until);
  freezings[currentKey] = freezings[currentKey].add(_amount);
  freezingBalance[_to] = freezingBalance[_to].add(_amount);

  freeze(_to, _until);
  emit Transfer(msg.sender, _to, _amount);
  emit Freezed(_to, _until, _amount);
}

releaseOnce keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function releaseOnce() public {
  bytes32 headKey = toKey(msg.sender, 0);
  uint64 head = chains[headKey];
  require(head != 0);
  require(uint64(block.timestamp) > head);
  bytes32 currentKey = toKey(msg.sender, head);

  uint64 next = chains[currentKey];

  uint256 amount = freezings[currentKey];
  delete freezings[currentKey];

  balances[msg.sender] = balances[msg.sender].add(amount);
  freezingBalance[msg.sender] = freezingBalance[msg.sender].sub(amount);

  if (next == 0) {
    delete chains[headKey];
  } else {
    chains[headKey] = next;
    delete chains[currentKey];
  }
  emit Released(msg.sender, amount);
}

releaseAll keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function releaseAll() public returns (uint256 tokens) {
  uint256 release;
  uint256 balance;
  (release, balance) = getFreezing(msg.sender, 0);
  while (release != 0 && block.timestamp > release) {
    releaseOnce();
    tokens += balance;
    (release, balance) = getFreezing(msg.sender, 0);
  }
}

mintAndFreeze keyboard_arrow_up

Parameters help

Name Type
_to
address help
_amount
uint help
_until
uint64 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function mintAndFreeze(
  address _to,
  uint256 _amount,
  uint64 _until
) public onlyOwner canMint returns (bool) {
  totalSupply_ = totalSupply_.add(_amount);

  bytes32 currentKey = toKey(_to, _until);
  freezings[currentKey] = freezings[currentKey].add(_amount);
  freezingBalance[_to] = freezingBalance[_to].add(_amount);

  freeze(_to, _until);
  emit Mint(_to, _amount);
  emit Freezed(_to, _until, _amount);
  emit Transfer(msg.sender, _to, _amount);
  return true;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help pure
Source Code
function name() public pure returns (string _name) {
  return TOKEN_NAME;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help pure
Source Code
function symbol() public pure returns (string _symbol) {
  return TOKEN_SYMBOL;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help pure
Source Code
function decimals() public pure returns (uint8 _decimals) {
  return TOKEN_DECIMALS_UINT8;
}

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 MainToken.init keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help private
Mutability help transaction

Requirements help

Source Code
function init() private {
  require(!initialized);
  initialized = true;

  if (PAUSED) {
    pause();
  }

  address[5] memory addresses = [
    address(0x7b9f1d5ee738a10f4d0543012291ae0b1927cb97),
    address(0xc1b7a270ff97a6b8cefbdbc105e70f64f38a09db),
    address(0x92599d6a0a9154c1a3745a82eb1f91250a4b45c3),
    address(0x171ab540b9cb730626db91f648e2b09eb5363484),
    address(0x630dd921efff3c1dff21e6fe1019d11147ab6e46)
  ];
  uint256[5] memory amounts = [
    uint256(1500000000000000000000),
    uint256(500000000000000000000),
    uint256(500000000000000000000),
    uint256(500000000000000000000),
    uint256(21000000000000000000000)
  ];
  uint64[5] memory freezes = [
    uint64(0),
    uint64(0),
    uint64(0),
    uint64(0),
    uint64(0)
  ];

  for (uint256 i = 0; i < addresses.length; i++) {
    if (freezes[i] == 0) {
      mint(addresses[i], amounts[i]);
    } else {
      mintAndFreeze(addresses[i], amounts[i], freezes[i]);
    }
  }

  if (!CONTINUE_MINTING) {
    finishMinting();
  }

  emit Initialized();
}

internal FreezableToken.toKey keyboard_arrow_up

Parameters help

Name Type
_addr
address help
_release
uint help

Properties

Visibility help internal
Mutability help pure
Source Code
function toKey(address _addr, uint256 _release)
  internal
  pure
  returns (bytes32 result)
{
  // WISH masc to increase entropy
  result = 0x5749534800000000000000000000000000000000000000000000000000000000;
  assembly {
    result := or(result, mul(_addr, 0x10000000000000000))
    result := or(result, _release)
  }
}

internal FreezableToken.freeze keyboard_arrow_up

Parameters help

Name Type
_to
address help
_until
uint64 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function freeze(address _to, uint64 _until) internal {
  require(_until > block.timestamp);
  bytes32 key = toKey(_to, _until);
  bytes32 parentKey = toKey(_to, uint64(0));
  uint64 next = chains[parentKey];

  if (next == 0) {
    chains[parentKey] = _until;
    return;
  }

  bytes32 nextKey = toKey(_to, next);
  uint256 parent;

  while (next != 0 && _until > next) {
    parent = next;
    parentKey = nextKey;

    next = chains[nextKey];
    nextKey = toKey(_to, next);
  }

  if (_until == next) {
    return;
  }

  if (next != 0) {
    chains[key] = next;
  }

  chains[parentKey] = _until;
}

internal Ownable._transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _transferOwnership(address _newOwner) internal {
  require(_newOwner != address(0));
  emit OwnershipTransferred(owner, _newOwner);
  owner = _newOwner;
}

internal BurnableToken._burn keyboard_arrow_up

Parameters help

Name Type
_who
address help
_value
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _burn(address _who, uint256 _value) internal {
  require(_value <= balances[_who]);
  // no need to require value <= totalSupply, since that would imply the
  // sender's balance is greater than the totalSupply, which *should* be an assertion failure

  balances[_who] = balances[_who].sub(_value);
  totalSupply_ = totalSupply_.sub(_value);
  emit Burn(_who, _value);
  emit Transfer(_who, address(0), _value);
}

internal Ownable._transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _transferOwnership(address _newOwner) internal {
  require(_newOwner != address(0));
  emit OwnershipTransferred(owner, _newOwner);
  owner = _newOwner;
}