ERC20
This contract is an ERC20 token.
Name
Metronome
Symbol
MET
Decimals
18
Total Supply
12,229,817 MET
About
link
Metronome aims to optimize for self-governance, reliability, and portability. Founded by a number of veterans in the space (e.g. Jeff Garzik, Matthew Roszak), Metronome is founded on three key design principles:
- Self-governance with no undue influence from founders after initial launch and public access — contract governance starts at launch.
- Reliability and predictability where issuance and supply are immutable
- Portability to enable maximum decentralization, even across different blockchains. The first 'chainhop' took place in summer 2019, between Ethereum and Ethereum Classic
Additionally, Metronome reportedly offers advanced payment features as programmable money.
- Mass pay: The ability to send MET to multiple addresses in a single transaction to save on transaction fees.
- Subscriptions: The ability to authorize a set amount of MET to move between two addresses on a recurring basis.
Stats
Public Functions
29
Event Types
7
Code Size
82,825 bytes
Events (7) keyboard_arrow_up
Structs (1) 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, uint _initialSupply,
uint _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
tokenPorter
- OR
minter
must be equal to
the sender's address
Source Code
function mint(address _to, uint _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
tokenPorter
- OR
autonomousConverter
must be equal to
the sender's address
Source Code
function destroy(address _from, uint _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
Requirements help
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(uint[] bits) public transferable returns (bool) {
return super.multiTransfer(bits);
}
approveMore keyboard_arrow_up
Source Code
function approveMore(address _spender, uint256 _value) public returns (bool) {
uint previous = _allowance[msg.sender][_spender];
uint 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) {
uint previous = _allowance[msg.sender][_spender];
uint 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
Source Code
function importMET(bytes8 _originChain, bytes8 _destinationChain, address[] _addresses, bytes _extraData,
bytes32[] _burnHashes, uint[] _supplyOnAllChains, uint[] _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
Source Code
function export(bytes8 _destChain, address _destMetronomeAddr, address _destRecipAddr, uint _amount, uint _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(uint _startTime, uint _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 (uint startTime, uint payPerWeek, uint 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 (uint) {
uint n = 0;
for (uint 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 (uint) {
// owners and recipients need 1-to-1 mapping, must be same length
require(_owners.length == _recipients.length);
uint n = 0;
for (uint i = 0; i < _owners.length; i++) {
if (subWithdrawFor(_owners[i], _recipients[i])) {
n++;
}
}
return n;
}