Blockwell

Monetha

ERC20

This contract is an ERC20 token.

Name Monetha
Symbol MTH
Decimals 5
Total Supply 402,400,000 MTH

About link description

Monetha (MTH) is a cryptocurrency and operates on the Ethereum platform. Monetha has a current supply of 402,400,000. The last known price of Monetha is 0.01759253 USD and is down -4.91 over the last 24 hours. It is currently trading on 6 active market(s) with $133,591.01 traded over the last 24 hours. More information can be found at https://www.monetha.io/.

Stats

Public Functions 6
Event Types 3
Code Size 6,148 bytes

Events (3) keyboard_arrow_up

Approval Event

Parameters help
_owner
address help
spender
address help
value
uint help

Burned Event

Parameters help
amount
uint help

Transfer Event

Parameters help
from
address help
to
address help
value
uint help

standard Constant

string help
ERC20

name Constant

string help
Monetha

symbol Constant

string help
MTH

decimals Constant

uint8 help
5

tokensForIco Constant

uint help
20120000000000

reservedAmount Constant

uint help
20120000000000

lockedAmount Constant

uint help
15291200000000

totalSupply Variable

uint help

owner Variable

address help

ico Variable

address help

startTime Variable

uint help

lockReleaseDate Variable

uint help

balanceOf Variable

mapping(address => uint) help

burned Variable

bool help
Internal Variable

allowance Variable

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

Functions Expand All Collapse All

Parameters help

Name Type
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function transfer(address _to, uint256 _value) returns (bool success) {
  require(now >= startTime); //check if the crowdsale is already over
  if (msg.sender == owner && now < lockReleaseDate)
    require(safeSub(balanceOf[msg.sender], _value) >= lockedAmount); //prevent the owner of spending his share of tokens for company, loyalty program and future financing of the company within the first year
  balanceOf[msg.sender] = safeSub(balanceOf[msg.sender], _value); // Subtract from the sender
  balanceOf[_to] = safeAdd(balanceOf[_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
_spender
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Requirements help

One or more of the following:
Source Code
function approve(address _spender, uint256 _value) returns (bool success) {
  return _approve(_spender, _value);
}

Parameters help

Name Type
_from
address help
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
) returns (bool success) {
  if (now < startTime) require(_from == owner); //check if the crowdsale is already over
  if (_from == owner && now < lockReleaseDate)
    require(safeSub(balanceOf[_from], _value) >= lockedAmount); //prevent the owner of spending his share of tokens for company, loyalty program and future financing of the company within the first year
  var _allowance = allowance[_from][msg.sender];
  balanceOf[_from] = safeSub(balanceOf[_from], _value); // Subtract from the sender
  balanceOf[_to] = safeAdd(balanceOf[_to], _value); // Add the same to the recipient
  allowance[_from][msg.sender] = safeSub(_allowance, _value);
  Transfer(_from, _to, _value);
  return true;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function burn() {
  //if tokens have not been burned already and the ICO ended
  if (!burned && now > startTime) {
    uint256 difference = safeSub(balanceOf[owner], reservedAmount);
    balanceOf[owner] = reservedAmount;
    totalSupply = safeSub(totalSupply, difference);
    burned = true;
    Burned(difference);
  }
}

Parameters help

Name Type
_icoAddress
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setICO(address _icoAddress) {
  require(msg.sender == owner);
  ico = _icoAddress;
  assert(_approve(ico, tokensForIco));
}

Parameters help

Name Type
_newStart
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function setStart(uint256 _newStart) {
  require(msg.sender == ico && _newStart < startTime);
  startTime = _newStart;
}

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 MonethaToken._approve keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_value
uint help

Properties

Visibility help internal
Mutability help transaction

Requirements help

One or more of the following:
Source Code
function _approve(address _spender, uint256 _value)
  internal
  returns (bool success)
{
  //  https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
  require((_value == 0) || (allowance[msg.sender][_spender] == 0));
  allowance[msg.sender][_spender] = _value;
  Approval(msg.sender, _spender, _value);
  return true;
}

internal SafeMath.safeMul keyboard_arrow_up

Parameters help

Name Type
a
uint help
b
uint help

Properties

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

internal SafeMath.safeSub keyboard_arrow_up

Parameters help

Name Type
a
uint help
b
uint help

Properties

Visibility help internal
Mutability help transaction

Requirements help

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

internal SafeMath.safeAdd keyboard_arrow_up

Parameters help

Name Type
a
uint help
b
uint help

Properties

Visibility help internal
Mutability help transaction
Source Code
function safeAdd(uint256 a, uint256 b) internal returns (uint256) {
  uint256 c = a + b;
  assert(c >= a && c >= b);
  return c;
}