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
State Variables (11) keyboard_arrow_up
Functions
transferOwnership keyboard_arrow_up
setAdmin keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
One or more of the following:
-
allowed for the sender's address for oldAdmin
must be equal to
0
- OR
0
must be equal to
0
One or more of the following:
-
allowed for the sender's address for oldAdmin
must be equal to
0
- OR
0
must be equal to
0
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
enableTransfer keyboard_arrow_up
getMinLockedAmount keyboard_arrow_up
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
Modifiers help
onlyOwnerOrAdmin checks for the following:
Requirements 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);
}
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Modifiers help
onlyValidDestination checks for the following:
canTransfer checks for the following:
One or more of the following:
Requirements help
Source Code
function transfer(address _to, uint256 _value)
public
onlyValidDestination(_to)
canTransfer(msg.sender, _value)
returns (bool success)
{
return super.transfer(_to, _value);
}
allowance keyboard_arrow_up
transferFrom keyboard_arrow_up
Modifiers help
onlyValidDestination checks for the following:
canTransfer checks for the following:
One or more of the following:
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;
}
approve keyboard_arrow_up
Requirements help
One or more of the following:
-
allowed for the sender's address for oldAdmin
must be equal to
0
- OR
0
must be equal to
0
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
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
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
Modifiers help
onlyOwner checks for the following:
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
Source Code
function canTransferIfLocked(address _sender, uint256 _value)
public
view
returns (bool)
{
uint256 after_math = balances[_sender].sub(_value);
return after_math >= getMinLockedAmount(_sender);
}
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.