Blockwell

I HOUSE TOKEN

ERC20

This contract is an ERC20 token.

Name I HOUSE TOKEN
Symbol IHT
Decimals 18
Total Supply 996,491,162 IHT

About link description

IHT Real Estate Protocol (IHT) is a cryptocurrency and operates on the Ethereum platform. IHT Real Estate Protocol has a current supply of 996,491,162 with 989,061,135.6575 in circulation. The last known price of IHT Real Estate Protocol is 0.00068983 USD and is down -0.51 over the last 24 hours. It is currently trading on 5 active market(s) with $35,011.19 traded over the last 24 hours. More information can be found at https://ihtcoin.com/.

Stats

Public Functions 23
Event Types 10
Code Size 55,356 bytes

Events (10) 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

Mint Event

Parameters help
to
address help
amount
uint256 help

Minted Event

Parameters help
receiver
address help
amount
uint256 help

MintingAgentChanged Event

Parameters help
addr
address help
state
bool help

OwnershipTransferred Event

Parameters help
_from
address help
_to
address help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

UpdatedTokenInformation Event

Parameters help
newName
string help
newSymbol
string help

Upgrade Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

UpgradeAgentSet Event

Parameters help
agent
address help

name Variable

string help

symbol Variable

string help

decimals Variable

uint8 help

releaseAgent Variable

address help

released Variable

bool help

totalSupply Variable

uint256 help

owner Variable

address help

newOwner Variable

address help

mintingFinished Variable

bool help

upgradeMaster Variable

address help

upgradeAgent Variable

address help

totalUpgraded Variable

uint256 help

transferAgents Variable

mapping(address => bool) help

mintAgents Variable

mapping(address => bool) help

balances Variable

mapping(address => uint) help
Internal Variable

allowed Variable

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

Functions Expand All Collapse All

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

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 <= balances[msg.sender]);

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

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) {
  uint256 _allowance = allowed[_from][msg.sender];
  require(_to != address(0));
  require(_value <= balances[_from]);
  require(_value <= _allowance);
  require(balances[_to] + _value > balances[_to]);

  balances[_to] = safeAdd(balances[_to], _value);
  balances[_from] = safeSub(balances[_from], _value);
  allowed[_from][msg.sender] = safeSub(_allowance, _value);
  Transfer(_from, _to, _value);
  return true;
}

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;
  Approval(msg.sender, _spender, _value);
  return true;
}

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)
{
  allowed[msg.sender][_spender] = safeAdd(
    allowed[msg.sender][_spender],
    _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)
{
  uint256 oldValue = allowed[msg.sender][_spender];
  if (_subtractedValue > oldValue) {
    allowed[msg.sender][_spender] = 0;
  } else {
    allowed[msg.sender][_spender] = safeSub(oldValue, _subtractedValue);
  }
  Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
  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 {
  require(_value <= balances[msg.sender]);
  // 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

  address burner = msg.sender;
  balances[burner] = safeSub(balances[burner], _value);
  totalSupply = safeSub(totalSupply, _value);
  Burn(burner, _value);
}

upgrade keyboard_arrow_up

Parameters help

Name Type
value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function upgrade(uint256 value) public {
  UpgradeState state = getUpgradeState();
  require(
    (state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)
  );

  // Validate input value.
  require(value != 0);

  balances[msg.sender] = safeSub(balances[msg.sender], value);

  // Take tokens out from circulation
  totalSupply = safeSub(totalSupply, value);
  totalUpgraded = safeAdd(totalUpgraded, value);

  // Upgrade agent reissues the tokens
  upgradeAgent.upgradeFrom(msg.sender, value);
  Upgrade(msg.sender, upgradeAgent, value);
}

setUpgradeAgent keyboard_arrow_up

Parameters help

Name Type
agent
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setUpgradeAgent(address agent) external {
  require(canUpgrade());

  require(agent != 0x0);
  // Only a master can designate the next agent
  require(msg.sender == upgradeMaster);
  // Upgrade has already begun for an agent
  require(getUpgradeState() != UpgradeState.Upgrading);

  upgradeAgent = UpgradeAgent(agent);

  // Bad interface
  require(upgradeAgent.isUpgradeAgent());
  // Make sure that token supplies match in source and target
  require(upgradeAgent.originalSupply() == totalSupply);

  UpgradeAgentSet(upgradeAgent);
}

getUpgradeState keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function getUpgradeState() public constant returns (UpgradeState) {
  if (!canUpgrade()) return UpgradeState.NotAllowed;
  else if (address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;
  else if (totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;
  else return UpgradeState.Upgrading;
}

setUpgradeMaster keyboard_arrow_up

Parameters help

Name Type
master
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setUpgradeMaster(address master) public {
  require(master != 0x0);
  require(msg.sender == upgradeMaster);
  upgradeMaster = master;
}

canUpgrade keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function canUpgrade() public view returns (bool) {
  return released && super.canUpgrade();
}

transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferOwnership(address _newOwner) public onlyOwner {
  newOwner = _newOwner;
}

acceptOwnership keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function acceptOwnership() public {
  require(msg.sender == newOwner);
  OwnershipTransferred(owner, newOwner);
  owner = newOwner;
}

mint keyboard_arrow_up

Parameters help

Name Type
receiver
address help
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function mint(address receiver, uint256 amount)
  public
  onlyMintAgent
  canMint
  returns (bool)
{
  totalSupply = safeAdd(totalSupply, amount);
  balances[receiver] = safeAdd(balances[receiver], amount);

  // This will make the mint transaction apper in EtherScan.io
  // We can remove this after there is a standardized minting event
  Mint(receiver, amount);
  Transfer(0, receiver, amount);
  return true;
}

setMintAgent keyboard_arrow_up

Parameters help

Name Type
addr
address help
state
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
function setMintAgent(address addr, bool state) public onlyOwner canMint {
  mintAgents[addr] = state;
  MintingAgentChanged(addr, state);
}

setReleaseAgent keyboard_arrow_up

Parameters help

Name Type
addr
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setReleaseAgent(address addr) public onlyOwner inReleaseState(false) {
  // We don't do interface check here as we might want to a normal wallet address to act as a release agent
  releaseAgent = addr;
}

setTransferAgent keyboard_arrow_up

Parameters help

Name Type
addr
address help
state
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
function setTransferAgent(address addr, bool state)
  public
  onlyOwner
  inReleaseState(false)
{
  transferAgents[addr] = state;
}

releaseTokenTransfer keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function releaseTokenTransfer() public onlyReleaseAgent {
  mintingFinished = true;
  super.releaseTokenTransfer();
}

Parameters help

Name Type
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

canTransfer checks for the following:
Source Code
function transfer(address _to, uint256 _value)
  public
  canTransfer(msg.sender)
  returns (bool success)
{
  // Call StandardToken.transfer()
  return super.transfer(_to, _value);
}

Parameters help

Name Type
_from
address help
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

canTransfer checks for the following:
Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
) public canTransfer(_from) returns (bool success) {
  // Call StandardToken.transferForm()
  return super.transferFrom(_from, _to, _value);
}

setTokenInformation keyboard_arrow_up

Parameters help

Name Type
_name
string help
_symbol
string help

Properties

Visibility help public
Mutability help transaction
Source Code
function setTokenInformation(string _name, string _symbol) public onlyOwner {
  name = _name;
  symbol = _symbol;
  UpdatedTokenInformation(name, symbol);
}

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 SafeMathLib.safeMul keyboard_arrow_up

Parameters help

Name Type
a
uint256 help
b
uint256 help

Properties

Visibility help internal
Mutability help pure
Source Code
function safeMul(uint256 a, uint256 b) internal pure returns (uint256) {
  if (a == 0) {
    return 0;
  }
  uint256 c = a * b;
  assert(c / a == b);
  return c;
}

internal SafeMathLib.safeSub keyboard_arrow_up

Parameters help

Name Type
a
uint256 help
b
uint256 help

Properties

Visibility help internal
Mutability help pure

Requirements help

Source Code
function safeSub(uint256 a, uint256 b) internal pure returns (uint256) {
  assert(b <= a);
  return a - b;
}

internal SafeMathLib.safeAdd keyboard_arrow_up

Parameters help

Name Type
a
uint256 help
b
uint256 help

Properties

Visibility help internal
Mutability help pure

Requirements help

Source Code
function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) {
  uint256 c = a + b;
  assert(c >= a);
  return c;
}

internal SafeMathLib.safeDiv keyboard_arrow_up

Parameters help

Name Type
a
uint256 help
b
uint256 help

Properties

Visibility help internal
Mutability help pure
Source Code
function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) {
  // assert(b > 0); // Solidity automatically throws when dividing by 0
  uint256 c = a / b;
  // assert(a == b * c + a % b); // There is no case in which this doesn't hold
  return c;
}

internal SafeMathLib.safeMul keyboard_arrow_up

Parameters help

Name Type
a
uint256 help
b
uint256 help

Properties

Visibility help internal
Mutability help pure
Source Code
function safeMul(uint256 a, uint256 b) internal pure returns (uint256) {
  if (a == 0) {
    return 0;
  }
  uint256 c = a * b;
  assert(c / a == b);
  return c;
}

internal SafeMathLib.safeSub keyboard_arrow_up

Parameters help

Name Type
a
uint256 help
b
uint256 help

Properties

Visibility help internal
Mutability help pure

Requirements help

Source Code
function safeSub(uint256 a, uint256 b) internal pure returns (uint256) {
  assert(b <= a);
  return a - b;
}

internal SafeMathLib.safeAdd keyboard_arrow_up

Parameters help

Name Type
a
uint256 help
b
uint256 help

Properties

Visibility help internal
Mutability help pure

Requirements help

Source Code
function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) {
  uint256 c = a + b;
  assert(c >= a);
  return c;
}

internal SafeMathLib.safeDiv keyboard_arrow_up

Parameters help

Name Type
a
uint256 help
b
uint256 help

Properties

Visibility help internal
Mutability help pure
Source Code
function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) {
  // assert(b > 0); // Solidity automatically throws when dividing by 0
  uint256 c = a / b;
  // assert(a == b * c + a % b); // There is no case in which this doesn't hold
  return c;
}

internal SafeMathLib.safeMul keyboard_arrow_up

Parameters help

Name Type
a
uint256 help
b
uint256 help

Properties

Visibility help internal
Mutability help pure
Source Code
function safeMul(uint256 a, uint256 b) internal pure returns (uint256) {
  if (a == 0) {
    return 0;
  }
  uint256 c = a * b;
  assert(c / a == b);
  return c;
}

internal SafeMathLib.safeSub keyboard_arrow_up

Parameters help

Name Type
a
uint256 help
b
uint256 help

Properties

Visibility help internal
Mutability help pure

Requirements help

Source Code
function safeSub(uint256 a, uint256 b) internal pure returns (uint256) {
  assert(b <= a);
  return a - b;
}

internal SafeMathLib.safeAdd keyboard_arrow_up

Parameters help

Name Type
a
uint256 help
b
uint256 help

Properties

Visibility help internal
Mutability help pure

Requirements help

Source Code
function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) {
  uint256 c = a + b;
  assert(c >= a);
  return c;
}

internal SafeMathLib.safeDiv keyboard_arrow_up

Parameters help

Name Type
a
uint256 help
b
uint256 help

Properties

Visibility help internal
Mutability help pure
Source Code
function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) {
  // assert(b > 0); // Solidity automatically throws when dividing by 0
  uint256 c = a / b;
  // assert(a == b * c + a % b); // There is no case in which this doesn't hold
  return c;
}