Blockwell

Internet Node Token

ERC20

This contract is an ERC20 token.

Name Internet Node Token
Symbol INT
Decimals 6
Total Supply 37,318,506 INT

About

Stats

Public Functions 12
Event Types 3
Code Size 8,508 bytes

Burn Event

Parameters help
from
address help
value
uint256 help

FrozenFunds Event

Parameters help
target
address help
frozen
bool help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

Functions Expand All Collapse All

transfer keyboard_arrow_up

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) {
      _transfer(msg.sender, _to, _value);
  }

transferFrom keyboard_arrow_up

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) {
      require (_value < allowance[_from][msg.sender]);     // Check allowance
      allowance[_from][msg.sender] -= _value;
      _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)
      returns (bool success) {
      allowance[msg.sender][_spender] = _value;
      return true;
  }

approveAndCall keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_value
uint256 help
_extraData
bytes help

Properties

Visibility help public
Mutability help transaction
Source Code
  function approveAndCall(address _spender, uint256 _value, bytes _extraData)
      returns (bool success) {
      tokenRecipient spender = tokenRecipient(_spender);
      if (approve(_spender, _value)) {
          spender.receiveApproval(msg.sender, _value, this, _extraData);
          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) returns (bool success) {
      require (balanceOf[msg.sender] > _value);            // Check if the sender has enough
      balanceOf[msg.sender] -= _value;                      // Subtract from the sender
      totalSupply -= _value;                                // Updates totalSupply
      Burn(msg.sender, _value);
      return true;
  }

burnFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
  function burnFrom(address _from, uint256 _value) returns (bool success) {
      require(balanceOf[_from] >= _value);                // Check if the targeted balance is enough
      require(_value <= allowance[_from][msg.sender]);    // Check allowance
      balanceOf[_from] -= _value;                         // Subtract from the targeted balance
      allowance[_from][msg.sender] -= _value;             // Subtract from the sender's allowance
      totalSupply -= _value;                              // Update totalSupply
      Burn(_from, _value);
      return true;
  }

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;
  }

mintToken keyboard_arrow_up

Parameters help

Name Type
target
address help
mintedAmount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
  function mintToken(address target, uint256 mintedAmount) onlyOwner {
      balanceOf[target] += mintedAmount;
      totalSupply += mintedAmount;
      Transfer(0, this, mintedAmount);
      Transfer(this, target, mintedAmount);
  }

freezeAccount keyboard_arrow_up

Parameters help

Name Type
target
address help
freeze
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
  function freezeAccount(address target, bool freeze) onlyOwner {
      frozenAccount[target] = freeze;
      FrozenFunds(target, freeze);
  }

setPrices keyboard_arrow_up

Parameters help

Name Type
newSellPrice
uint256 help
newBuyPrice
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
  function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner {
      sellPrice = newSellPrice;
      buyPrice = newBuyPrice;
  }

buy keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable

Requirements help

Source Code
  function buy() payable {
      uint amount = msg.value / buyPrice;               // calculates the amount
      _transfer(this, msg.sender, amount);              // makes the transfers
  }

sell keyboard_arrow_up

Parameters help

Name Type
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
  function sell(uint256 amount) {
      require(this.balance >= amount * sellPrice);      // checks if the contract has enough ether to buy
      _transfer(msg.sender, this, amount);              // makes the transfers
      msg.sender.transfer(amount * sellPrice);          // sends ether to the seller. It's important to do this last to avoid recursion attacks
  }