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
State Variables (16) keyboard_arrow_up
Functions
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Requirements help
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;
}
allowance keyboard_arrow_up
transferFrom keyboard_arrow_up
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;
}
approve keyboard_arrow_up
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
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
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
Requirements help
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
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
Requirements help
null
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.
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
Requirements help
Source Code
function setUpgradeMaster(address master) public {
require(master != 0x0);
require(msg.sender == upgradeMaster);
upgradeMaster = master;
}
canUpgrade keyboard_arrow_up
transferOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address _newOwner) public onlyOwner {
newOwner = _newOwner;
}
acceptOwnership keyboard_arrow_up
mint keyboard_arrow_up
Modifiers help
onlyMintAgent checks for the following:
canMint checks for the following:
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
Modifiers help
onlyOwner checks for the following:
canMint checks for the following:
Source Code
function setMintAgent(address addr, bool state) public onlyOwner canMint {
mintAgents[addr] = state;
MintingAgentChanged(addr, state);
}
setReleaseAgent keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
inReleaseState checks for the following:
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
Modifiers help
onlyOwner checks for the following:
inReleaseState checks for the following:
Source Code
function setTransferAgent(address addr, bool state)
public
onlyOwner
inReleaseState(false)
{
transferAgents[addr] = state;
}
releaseTokenTransfer keyboard_arrow_up
transfer keyboard_arrow_up
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);
}
transferFrom keyboard_arrow_up
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
Modifiers help
onlyOwner checks for the following:
Source Code
function setTokenInformation(string _name, string _symbol) public onlyOwner {
name = _name;
symbol = _symbol;
UpdatedTokenInformation(name, symbol);
}
Internal Functions
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
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
internal SafeMathLib.safeAdd keyboard_arrow_up
internal SafeMathLib.safeDiv keyboard_arrow_up
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
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
internal SafeMathLib.safeAdd keyboard_arrow_up
internal SafeMathLib.safeDiv keyboard_arrow_up
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
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
internal SafeMathLib.safeAdd keyboard_arrow_up
internal SafeMathLib.safeDiv keyboard_arrow_up
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;
}