ERC20
This contract is an ERC20 token.
Name
Hubiits
Symbol
HBT
Decimals
15
Total Supply
31,801,784 HBT
About link description
Hubii Network (HBT) is a cryptocurrency and operates on the Ethereum platform. Hubii Network has a current supply of 31,801,783.65982096 with 0 in circulation. The last known price of Hubii Network is 1.6323106 USD and is up 24.33 over the last 24 hours. It is currently trading on 1 active market(s) with $3,829.09 traded over the last 24 hours. More information can be found at https://www.hubii.com/.
Stats
Public Functions
20
Event Types
7
Code Size
20,531 bytes
Events (7) keyboard_arrow_up
State Variables (15) keyboard_arrow_up
Functions
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
allowance keyboard_arrow_up
transferFrom keyboard_arrow_up
Modifiers help
canTransfer checks for the following:
One or more of the following:
-released must be true
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);
}
approve keyboard_arrow_up
Requirements help
One or more of the following:
-
allowed for the sender's address for _spender
must be equal to
0
- OR
_value
must be equal to
0
Source Code
function approve(address _spender, uint256 _value)
public
returns (bool success)
{
// To change the approve amount you first have to reduce the addresses'
// allowance to zero by calling `approve(_spender, 0)` if it is not
// already 0 to mitigate the race condition described here:
// https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
require(_value == 0 || allowed[msg.sender][_spender] == 0);
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
isToken keyboard_arrow_up
addApproval keyboard_arrow_up
Source Code
function addApproval(address _spender, uint256 _addedValue)
public
returns (bool success)
{
uint256 oldValue = allowed[msg.sender][_spender];
allowed[msg.sender][_spender] = oldValue.add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
subApproval keyboard_arrow_up
Source Code
function subApproval(address _spender, uint256 _subtractedValue)
public
returns (bool success)
{
uint256 oldVal = allowed[msg.sender][_spender];
if (_subtractedValue > oldVal) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldVal.sub(_subtractedValue);
}
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
upgrade keyboard_arrow_up
Requirements help
One or more of the following:
-
state
must be equal to
UpgradeState.Upgrading
- OR
state
must be equal to
UpgradeState.ReadyToUpgrade
Source Code
function upgrade(uint256 value) public {
UpgradeState state = getUpgradeState();
// Ensure it's not called in a bad state
require(
state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading
);
// Validate input value.
require(value != 0);
balances[msg.sender] = balances[msg.sender].sub(value);
// Take tokens out from circulation
totalSupply = totalSupply.sub(value);
totalUpgraded = totalUpgraded.add(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 {
// Check whether the token is in a state that we could think of upgrading
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;
}
changeUpgradeMaster keyboard_arrow_up
Requirements help
Source Code
function changeUpgradeMaster(address new_master) public {
require(msg.sender == upgradeMaster);
setUpgradeMaster(new_master);
}
canUpgrade keyboard_arrow_up
transferOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address newOwner) onlyOwner {
require(newOwner != address(0));
owner = newOwner;
}
mint keyboard_arrow_up
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 have 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
setTokenInformation keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function setTokenInformation(string _name, string _symbol) 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 MintableToken.MintableToken keyboard_arrow_up
Requirements help
Source Code
function MintableToken(
uint256 _initialSupply,
address _multisig,
bool _mintable
) internal {
require(_multisig != address(0));
// Cannot create a token without supply and no minting
require(_mintable || _initialSupply != 0);
// Create initially all balance on the team multisig
if (_initialSupply > 0) mintInternal(_multisig, _initialSupply);
// No more new supply allowed after the token creation
mintingFinished = !_mintable;
}
internal MintableToken.mintInternal keyboard_arrow_up
Modifiers help
canMint checks for the following:
Source Code
function mintInternal(address receiver, uint256 amount) private canMint {
totalSupply = totalSupply.add(amount);
balances[receiver] = balances[receiver].add(amount);
// Removed because this may be confused with anonymous transfers in the upcoming fork.
// This will make the mint transaction appear in EtherScan.io
// We can remove this after there is a standardized minting event
// Transfer(0, receiver, amount);
Minted(receiver, amount);
}