Blockwell

Cofoundit

ERC20

This contract is an ERC20 token.

Name Cofoundit
Symbol CFI
Decimals 18
Total Supply 500,000,000 CFI

About

Stats

Public Functions 13
Event Types 4
Code Size 9,181 bytes

Events (4) keyboard_arrow_up

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint256 help

Mint Event

Parameters help
_to
address help
_value
uint256 help

TokenFrozen Event

Parameters help
_frozenUntilBlock
uint256 help
_reason
string help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

standard Variable

string help

name Variable

string help

symbol Variable

string help

decimals Variable

uint8 help

icoContractAddress Variable

address help

tokenFrozenUntilBlock Variable

uint256 help

owner Variable

address help

supply Variable

uint256 help
Internal Variable

balances Variable

mapping(address => uint256) help
Internal Variable

allowances Variable

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

restrictedAddresses Variable

mapping(address => bool) help
Internal Variable

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 {
  owner = newOwner;
}

Parameters help

This function has no parameters.

Properties

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

Parameters help

Name Type
_owner
address help

Properties

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

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transfer(address _to, uint256 _value) returns (bool success) {
  if (block.number < tokenFrozenUntilBlock) throw; // Throw is token is frozen in case of emergency
  if (restrictedAddresses[_to]) throw; // Prevent transfer to restricted addresses
  if (balances[msg.sender] < _value) throw; // Check if the sender has enough
  if (balances[_to] + _value < balances[_to]) throw; // Check for overflows
  balances[msg.sender] -= _value; // Subtract from the sender
  balances[_to] += _value; // Add the same to the recipient
  Transfer(msg.sender, _to, _value); // Notify anyone listening that this transfer took place
  return true;
}

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
) returns (bool success) {
  if (block.number < tokenFrozenUntilBlock) throw; // Throw is token is frozen in case of emergency
  if (restrictedAddresses[_to]) throw; // Prevent transfer to restricted addresses
  if (balances[_from] < _value) throw; // Check if the sender has enough
  if (balances[_to] + _value < balances[_to]) throw; // Check for overflows
  if (_value > allowances[_from][msg.sender]) throw; // Check allowance
  balances[_from] -= _value; // Subtract from the sender
  balances[_to] += _value; // Add the same to the recipient
  allowances[_from][msg.sender] -= _value; // Deduct allowance for this address
  Transfer(_from, _to, _value); // Notify anyone listening that this transfer took place
  return true;
}

Parameters help

Name Type
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function approve(address _spender, uint256 _value) returns (bool success) {
  if (block.number < tokenFrozenUntilBlock) throw; // Throw is token is frozen in case of emergency
  allowances[msg.sender][_spender] = _value; // Set allowance
  Approval(msg.sender, _spender, _value); // Raise Approval event
  return true;
}

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

approveAndCall keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_value
uint256 help
_extraData
bytes help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function approveAndCall(
  address _spender,
  uint256 _value,
  bytes _extraData
) returns (bool success) {
  tokenRecipient spender = tokenRecipient(_spender); // Cast spender to tokenRecipient contract
  approve(_spender, _value); // Set approval to contract for _value
  spender.receiveApproval(msg.sender, _value, this, _extraData); // Raise method on _spender contract
  return true;
}

mintTokens keyboard_arrow_up

Parameters help

Name Type
_to
address help
_amount
uint256 help
_reason
string help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function mintTokens(
  address _to,
  uint256 _amount,
  string _reason
) {
  if (msg.sender != icoContractAddress) throw; // Check if minter is ico Contract address
  if (restrictedAddresses[_to]) throw; // Prevent transfer to restricted addresses
  if (_amount == 0 || sha3(_reason) == sha3("")) throw; // Check if values are not null;
  if (balances[_to] + _amount < balances[_to]) throw; // Check for overflows
  supply += _amount; // Update total supply
  balances[_to] += _amount; // Set minted coins to target
  Mint(_to, _amount); // Create Mint event
  Transfer(0x0, _to, _amount); // Create Transfer event from 0x
}

freezeTransfersUntil keyboard_arrow_up

Parameters help

Name Type
_frozenUntilBlock
uint256 help
_reason
string help

Properties

Visibility help public
Mutability help transaction
Source Code
function freezeTransfersUntil(uint256 _frozenUntilBlock, string _reason)
  onlyOwner
{
  tokenFrozenUntilBlock = _frozenUntilBlock;
  TokenFrozen(_frozenUntilBlock, _reason);
}

editRestrictedAddress keyboard_arrow_up

Parameters help

Name Type
_newRestrictedAddress
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function editRestrictedAddress(address _newRestrictedAddress) onlyOwner {
  restrictedAddresses[_newRestrictedAddress] = !restrictedAddresses[
    _newRestrictedAddress
  ];
}

isRestrictedAddress keyboard_arrow_up

Parameters help

Name Type
_querryAddress
address help

Properties

Visibility help public
Mutability help constant
Source Code
function isRestrictedAddress(address _querryAddress)
  constant
  returns (bool answer)
{
  return restrictedAddresses[_querryAddress];
}

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function() {
  throw; // Prevents accidental sending of ether
}

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.