Blockwell

Friendz Coin

ERC20

This contract is an ERC20 token.

Name Friendz Coin
Symbol FDZ
Decimals 18
Total Supply 1,131,842,156 FDZ

About link description

Friendz (FDZ) is a cryptocurrency token and operates on the Ethereum platform. Friendz has a current supply of 1,131,842,156.381 with 522,908,181.938 in circulation. The last known price of Friendz is $0.000722 USD and is up 8.18% over the last 24 hours. It is currently trading on 8 active market(s) with $82,656.94 traded over the last 24 hours. More information can be found at https://friendz.io/.

Stats

Public Functions 17
Event Types 7
Code Size 10,574 bytes

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

Burn Event

Parameters help
burner
address help
amount
uint256 help

CoOwnerSet Event

Parameters help
owner
address help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

ReleaseDateChanged Event

Parameters help
from
address help
date
uint256 help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

UpdatedBlockingState Event

Parameters help
to
address help
purchase
uint256 help
end_date
uint256 help
value
uint256 help

Functions Expand All Collapse All

transferOwnership keyboard_arrow_up

Parameters help

Name Type
newOwner
address help

Properties

Visibility help public
Mutability help transaction
Source Code
  function transferOwnership(address newOwner) onlyOwner public {
    require(newOwner != address(0));
    require(newOwner != owner);

    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

balanceOf keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

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

transfer keyboard_arrow_up

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) {
    require(_to != address(0));
    require(_value > 0);

    // SafeMath.sub will throw if there is not enough balance.
    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    Transfer(msg.sender, _to, _value);
    return true;
  }

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 {
		balances[msg.sender] = balances[msg.sender].sub(_value);
		totalSupply = totalSupply.sub(_value);

		Burn(msg.sender, _value);
	}

canTransferBefore keyboard_arrow_up

Parameters help

Name Type
_sender
address help

Properties

Visibility help public
Mutability help view
Source Code
	function canTransferBefore(address _sender) public view returns(bool) {
		return (
			_sender == owner ||
			_sender == presale_holder ||
			_sender == ico_holder ||
			_sender == reserved_holder ||
			_sender == wallet_holder
		);
	}

canTransferIfLocked keyboard_arrow_up

Parameters help

Name Type
_sender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
	function canTransferIfLocked(address _sender, uint256 _value) public view returns(bool) {
		uint256 after_math = balances[_sender].sub(_value);
		return (
			now >= RELEASE_DATE &&
		    after_math >= getMinimumAmount(_sender)
        );
	}

setCoOwner keyboard_arrow_up

Parameters help

Name Type
_addr
address help

Properties

Visibility help public
Mutability help transaction
Source Code
	function setCoOwner(address _addr) onlyOwner public {
		require(_addr != co_owner);

		co_owner = _addr;

		CoOwnerSet(_addr);
	}

setReleaseDate keyboard_arrow_up

Parameters help

Name Type
_date
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
	function setReleaseDate(uint256 _date) onlyOwner public {
		require(_date > 0);
		require(_date != RELEASE_DATE);

		RELEASE_DATE = _date;

		ReleaseDateChanged(msg.sender, _date);
	}

getMinimumAmount keyboard_arrow_up

Parameters help

Name Type
_addr
address help

Properties

Visibility help public
Mutability help constant
Source Code
	function getMinimumAmount(address _addr) constant public returns (uint256) {
		// if the address ha no limitations just return 0
		if(blocked_amounts[_addr] == 0x0)
			return 0x0;

		// if the purchase date is in the future block all the tokens
		if(purchase_dates[_addr] > now){
			return blocked_amounts[_addr];
		}

		uint256 alpha = uint256(now).sub(purchase_dates[_addr]); // absolute purchase date
		uint256 beta = release_dates[_addr].sub(purchase_dates[_addr]); // absolute token release date
		uint256 tokens = blocked_amounts[_addr].sub(alpha.mul(blocked_amounts[_addr]).div(beta)); // T - (α * T) / β

		return tokens;
	}

setBlockingState keyboard_arrow_up

Parameters help

Name Type
_addr
address help
_end
uint256 help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
	function setBlockingState(address _addr, uint256 _end, uint256 _value) isBlockingTransfer public {
		// only the onwer and the co-owner can call this function
		require(
			msg.sender == owner ||
			msg.sender == co_owner
		);
		require(_addr != address(0));

		uint256 final_value = _value;

		if(release_dates[_addr] != 0x0){
			// if it's not the first time this function is beign called for this address
			// update its information instead of setting them (add value to previous value)
			final_value = blocked_amounts[_addr].add(_value);
		}

		release_dates[_addr] = _end;
		purchase_dates[_addr] = RELEASE_DATE;
		blocked_amounts[_addr] = final_value;

		UpdatedBlockingState(_addr, _end, RELEASE_DATE, final_value);
	}

freeToken keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
	function freeToken() public onlyOwner {
		free_transfer = true;
	}

transfer keyboard_arrow_up

Parameters help

Name Type
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
	function transfer(address _to, uint _value) canTransfer(msg.sender, _value) public returns (bool success) {
		return super.transfer(_to, _value);
	}

transferFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
	function transferFrom(address _from, address _to, uint _value) canTransfer(_from, _value) public returns (bool success) {
		require(_from != address(0));
		require(_to != address(0));

	    // SafeMath.sub will throw if there is not enough balance.
	    balances[_from] = balances[_from].sub(_value);
	    balances[_to] = balances[_to].add(_value);
		allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); // this will throw if we don't have enough allowance

	    // this event comes from BasicToken.sol
	    Transfer(_from, _to, _value);

	    return true;
	}

approve keyboard_arrow_up

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) {
	 	require(_value == 0 || allowed[msg.sender][_spender] == 0);

	 	allowed[msg.sender][_spender] = _value;
	 	Approval(msg.sender, _spender, _value);

	 	return true;
  	}

allowance keyboard_arrow_up

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) public constant returns (uint256 remaining) {
    	return allowed[_owner][_spender];
  	}

increaseApproval keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_addedValue
uint256 help

Properties

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

decreaseApproval keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_subtractedValue
uint256 help

Properties

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