ERC20
This contract is an ERC20 token.
Name
Metronome
Symbol
MET
Decimals
18
Total Supply
12,229,817 MET
About link
Metronome (MET) is a cryptocurrency and operates on the Ethereum platform. Metronome has a current supply of 13,217,480.46589085 with 11,931,106.46589085 in circulation. The last known price of Metronome is 2.63157285 USD and is down -1.07 over the last 24 hours. It is currently trading on 11 active market(s) with $78,786.25 traded over the last 24 hours. More information can be found at https://www.metronome.io/.
Identical Contracts
The following contracts have identical source code.
Stats
Public Functions
29
Event Types
7
Code Size
82,825 bytes
Events (7) keyboard_arrow_up
State Variables (11) keyboard_arrow_up
Functions
changeOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function changeOwnership(address _newOwner) public onlyOwner returns (bool) {
require(_newOwner != owner);
newOwner = _newOwner;
return true;
}
acceptOwnership keyboard_arrow_up
initMintable keyboard_arrow_up
Parameters help
Modifiers help
onlyOwner checks for the following:
Requirements help
Source Code
function initMintable(
address _autonomousConverter,
address _minter,
uint256 _initialSupply,
uint256 _decmult
) public onlyOwner {
require(autonomousConverter == 0x0 && _autonomousConverter != 0x0);
require(minter == 0x0 && _minter != 0x0);
autonomousConverter = _autonomousConverter;
minter = _minter;
_totalSupply = _initialSupply.mul(_decmult);
_balanceOf[_autonomousConverter] = _totalSupply;
}
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
setTokenPorter keyboard_arrow_up
mint keyboard_arrow_up
Requirements help
One or more of the following:
-
the sender's address
must be equal to
UNKNOWN VALUE
- OR
minter
must be equal to
the sender's address
Source Code
function mint(address _to, uint256 _value) public returns (bool) {
require(msg.sender == minter || msg.sender == address(tokenPorter));
_balanceOf[_to] = _balanceOf[_to].add(_value);
_totalSupply = _totalSupply.add(_value);
emit Mint(_to, _value);
emit Transfer(0x0, _to, _value);
return true;
}
destroy keyboard_arrow_up
Requirements help
One or more of the following:
-
the sender's address
must be equal to
UNKNOWN VALUE
- OR
autonomousConverter
must be equal to
the sender's address
Source Code
function destroy(address _from, uint256 _value) public returns (bool) {
require(
msg.sender == autonomousConverter || msg.sender == address(tokenPorter)
);
_balanceOf[_from] = _balanceOf[_from].sub(_value);
_totalSupply = _totalSupply.sub(_value);
emit Destroy(_from, _value);
emit Transfer(_from, 0x0, _value);
return true;
}
initToken keyboard_arrow_up
allowance keyboard_arrow_up
transfer keyboard_arrow_up
Modifiers help
transferable checks for the following:
transferAllowed must be true
Requirements help
Source Code
function transfer(address _to, uint256 _value)
public
transferable
returns (bool)
{
return super.transfer(_to, _value);
}
transferFrom keyboard_arrow_up
Modifiers help
transferable checks for the following:
transferAllowed must be true
Requirements help
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) public transferable returns (bool) {
return super.transferFrom(_from, _to, _value);
}
approve keyboard_arrow_up
Source Code
function approve(address _spender, uint256 _value) public returns (bool) {
require(_spender != address(this));
_allowance[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
multiTransfer keyboard_arrow_up
Modifiers help
transferable checks for the following:
transferAllowed must be true
Source Code
function multiTransfer(uint256[] bits) public transferable returns (bool) {
return super.multiTransfer(bits);
}
approveMore keyboard_arrow_up
Source Code
function approveMore(address _spender, uint256 _value) public returns (bool) {
uint256 previous = _allowance[msg.sender][_spender];
uint256 newAllowance = previous.add(_value);
_allowance[msg.sender][_spender] = newAllowance;
emit Approval(msg.sender, _spender, newAllowance);
return true;
}
approveLess keyboard_arrow_up
Source Code
function approveLess(address _spender, uint256 _value) public returns (bool) {
uint256 previous = _allowance[msg.sender][_spender];
uint256 newAllowance = previous.sub(_value);
_allowance[msg.sender][_spender] = newAllowance;
emit Approval(msg.sender, _spender, newAllowance);
return true;
}
initMETToken keyboard_arrow_up
enableMETTransfers keyboard_arrow_up
setRoot keyboard_arrow_up
getRoot keyboard_arrow_up
rootsMatch keyboard_arrow_up
importMET keyboard_arrow_up
Parameters help
Requirements help
UNKNOWN VALUE
must not be equal to
0x0
Source Code
function importMET(
bytes8 _originChain,
bytes8 _destinationChain,
address[] _addresses,
bytes _extraData,
bytes32[] _burnHashes,
uint256[] _supplyOnAllChains,
uint256[] _importData,
bytes _proof
) public returns (bool) {
require(address(tokenPorter) != 0x0);
return
tokenPorter.importMET(
_originChain,
_destinationChain,
_addresses,
_extraData,
_burnHashes,
_supplyOnAllChains,
_importData,
_proof
);
}
export keyboard_arrow_up
Parameters help
Requirements help
UNKNOWN VALUE
must not be equal to
0x0
Source Code
function export(
bytes8 _destChain,
address _destMetronomeAddr,
address _destRecipAddr,
uint256 _amount,
uint256 _fee,
bytes _extraData
) public returns (bool) {
require(address(tokenPorter) != 0x0);
return
tokenPorter.export(
msg.sender,
_destChain,
_destMetronomeAddr,
_destRecipAddr,
_amount,
_fee,
_extraData
);
}
subscribe keyboard_arrow_up
Requirements help
Source Code
function subscribe(
uint256 _startTime,
uint256 _payPerWeek,
address _recipient
) public returns (bool) {
require(_startTime >= block.timestamp);
require(_payPerWeek != 0);
require(_recipient != 0);
subs[msg.sender][_recipient] = Sub(_startTime, _payPerWeek, _startTime);
emit LogSubscription(msg.sender, _recipient);
return true;
}
cancelSubscription keyboard_arrow_up
Requirements help
Source Code
function cancelSubscription(address _recipient) public returns (bool) {
require(subs[msg.sender][_recipient].startTime != 0);
require(subs[msg.sender][_recipient].payPerWeek != 0);
subs[msg.sender][_recipient].startTime = 0;
subs[msg.sender][_recipient].payPerWeek = 0;
subs[msg.sender][_recipient].lastWithdrawTime = 0;
emit LogCancelSubscription(msg.sender, _recipient);
return true;
}
getSubscription keyboard_arrow_up
Source Code
function getSubscription(address _owner, address _recipient)
public
constant
returns (
uint256 startTime,
uint256 payPerWeek,
uint256 lastWithdrawTime
)
{
Sub storage sub = subs[_owner][_recipient];
return (sub.startTime, sub.payPerWeek, sub.lastWithdrawTime);
}
subWithdraw keyboard_arrow_up
Modifiers help
transferable checks for the following:
transferAllowed must be true
Requirements help
null
Source Code
function subWithdraw(address _owner) public transferable returns (bool) {
require(subWithdrawFor(_owner, msg.sender));
return true;
}
multiSubWithdraw keyboard_arrow_up
Source Code
function multiSubWithdraw(address[] _owners) public returns (uint256) {
uint256 n = 0;
for (uint256 i = 0; i < _owners.length; i++) {
if (subWithdrawFor(_owners[i], msg.sender)) {
n++;
}
}
return n;
}
multiSubWithdrawFor keyboard_arrow_up
Requirements help
Source Code
function multiSubWithdrawFor(address[] _owners, address[] _recipients)
public
returns (uint256)
{
// owners and recipients need 1-to-1 mapping, must be same length
require(_owners.length == _recipients.length);
uint256 n = 0;
for (uint256 i = 0; i < _owners.length; i++) {
if (subWithdrawFor(_owners[i], _recipients[i])) {
n++;
}
}
return n;
}
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 METToken.subWithdrawFor keyboard_arrow_up
Source Code
function subWithdrawFor(address _from, address _to) internal returns (bool) {
Sub storage sub = subs[_from][_to];
if (
sub.startTime > 0 && sub.startTime < block.timestamp && sub.payPerWeek > 0
) {
uint256 weekElapsed = (now.sub(sub.lastWithdrawTime)).div(7 days);
uint256 amount = weekElapsed.mul(sub.payPerWeek);
if (weekElapsed > 0 && _balanceOf[_from] >= amount) {
subs[_from][_to].lastWithdrawTime = block.timestamp;
_balanceOf[_from] = _balanceOf[_from].sub(amount);
_balanceOf[_to] = _balanceOf[_to].add(amount);
emit Transfer(_from, _to, amount);
return true;
}
}
return false;
}