Blockwell

Mass Vehicle Ledger Token

ERC20

This contract is an ERC20 token.

Name Mass Vehicle Ledger Token
Symbol MVL
Decimals 18
Total Supply 30,000,000,000 MVL

About link description

MVL (MVL) is a cryptocurrency and operates on the Ethereum platform. MVL has a current supply of 30,000,000,000 with 12,979,354,798.755093 in circulation. The last known price of MVL is 0.01095104 USD and is down -3.86 over the last 24 hours. It is currently trading on 9 active market(s) with $12,681,142.41 traded over the last 24 hours. More information can be found at http://mvlchain.io.

Stats

Public Functions 17
Event Types 5
Code Size 10,716 bytes

Library Use

Uses SafeMath for uint256.

Events (5) keyboard_arrow_up

AddTokenLock Event

Parameters help
to
address help
time
uint256 help
amount
uint256 help

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

Burn Event

Parameters help
burner
address help
amount
uint256 help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

symbol Constant

string help
MVL

name Constant

string help
Mass Vehicle Ledger Token

decimals Constant

uint8 help
18

TOTAL_SUPPLY Constant

uint256 help
3 * UNKNOWN VALUE * UNKNOWN VALUE

owner Variable

address help

admin Variable

address help

name Variable

string help

symbol Variable

string help

decimals Variable

uint8 help

transferEnabled Variable

bool help

noTokenLocked Variable

bool help

balances Variable

mapping(address => uint256) help
Internal Variable

_totalSupply Variable

uint256 help
Internal Variable

allowed Variable

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

lockingStates Variable

mapping(address => TokenLockState) help
Internal Variable

Functions Expand All Collapse All

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 {
  require(newOwner != address(0));
  require(newOwner != owner);
  require(newOwner != admin);

  emit OwnershipTransferred(owner, newOwner);
  owner = newOwner;
}

setAdmin keyboard_arrow_up

Parameters help

Name Type
newAdmin
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function setAdmin(address newAdmin) public onlyOwner {
  address oldAdmin = admin;
  super.setAdmin(newAdmin);
  approve(oldAdmin, 0);
  approve(newAdmin, TOTAL_SUPPLY);
}

unlockAllTokens keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function unlockAllTokens() public onlyOwner {
  noTokenLocked = true;
}

enableTransfer keyboard_arrow_up

Parameters help

Name Type
_enable
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
function enableTransfer(bool _enable) public onlyOwner {
  transferEnabled = _enable;
}

getMinLockedAmount keyboard_arrow_up

Parameters help

Name Type
_addr
address help

Properties

Visibility help public
Mutability help view
Source Code
function getMinLockedAmount(address _addr)
  public
  view
  returns (uint256 locked)
{
  uint256 i;
  uint256 a;
  uint256 t;
  uint256 lockSum = 0;

  // if the address has no limitations just return 0
  TokenLockState storage lockState = lockingStates[_addr];
  if (lockState.latestReleaseTime < now) {
    return 0;
  }

  for (i = 0; i < lockState.tokenLocks.length; i++) {
    a = lockState.tokenLocks[i].amount;
    t = lockState.tokenLocks[i].time;

    if (t > now) {
      lockSum = lockSum.add(a);
    }
  }

  return lockSum;
}

addTokenLock keyboard_arrow_up

Parameters help

Name Type
_addr
address help
_value
uint256 help
_release_time
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function addTokenLock(
  address _addr,
  uint256 _value,
  uint256 _release_time
) public onlyOwnerOrAdmin {
  require(_addr != address(0));
  require(_value > 0);
  require(_release_time > now);

  TokenLockState storage lockState = lockingStates[_addr]; // assigns a pointer. change the member value will update struct itself.
  if (_release_time > lockState.latestReleaseTime) {
    lockState.latestReleaseTime = _release_time;
  }
  lockState.tokenLocks.push(TokenLockInfo(_value, _release_time));

  emit AddTokenLock(_addr, _release_time, _value);
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function totalSupply() public view returns (uint256) {
  return _totalSupply;
}

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help view
Source Code
function balanceOf(address _owner) public view 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
  onlyValidDestination(_to)
  canTransfer(msg.sender, _value)
  returns (bool success)
{
  return super.transfer(_to, _value);
}

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 remaining)
{
  return allowed[_owner][_spender];
}

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
)
  public
  onlyValidDestination(_to)
  canTransfer(_from, _value)
  returns (bool success)
{
  // SafeMath.sub will throw if there is not enough balance.
  balances[_from] = balances[_from].sub(_value);
  balances[_to] = balances[_to].add(_value);
  allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); // this will throw if we don't have enough allowance

  // this event comes from BasicToken.sol
  emit 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) {
  require(_value == 0 || allowed[msg.sender][_spender] == 0);

  allowed[msg.sender][_spender] = _value;
  emit 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 success)
{
  allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(
    _addedValue
  );
  emit 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 success)
{
  uint256 oldValue = allowed[msg.sender][_spender];
  if (_subtractedValue >= oldValue) {
    allowed[msg.sender][_spender] = 0;
  } else {
    allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
  }
  emit 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 onlyOwner {
  balances[msg.sender] = balances[msg.sender].sub(_value);
  _totalSupply = _totalSupply.sub(_value);
  emit Burn(msg.sender, _value);
  emit Transfer(msg.sender, address(0), _value);
}

canTransferIfLocked keyboard_arrow_up

Parameters help

Name Type
_sender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help view
Source Code
function canTransferIfLocked(address _sender, uint256 _value)
  public
  view
  returns (bool)
{
  uint256 after_math = balances[_sender].sub(_value);
  return after_math >= getMinLockedAmount(_sender);
}

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
function() public payable {
  // don't send eth directly to token contract
  revert();
}

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.