ERC-20
Overview
Max Total Supply
500,000,000 MMTA
Holders
194
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
MMTA
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-08-18 */ pragma solidity ^0.4.24; // Owned contract // ---------------------------------------------------------------------------- contract Owned { /// 'owner' is the only address that can call a function with /// this modifier address public owner; address internal newOwner; ///@notice The constructor assigns the message sender to be 'owner' constructor() public { owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner); _; } event updateOwner(address _oldOwner, address _newOwner); ///change the owner function changeOwner(address _newOwner) public onlyOwner returns(bool) { require(owner != _newOwner); newOwner = _newOwner; return true; } /// accept the ownership function acceptNewOwner() public returns(bool) { require(msg.sender == newOwner); emit updateOwner(owner, newOwner); owner = newOwner; return true; } } // Safe maths, borrowed from OpenZeppelin // ---------------------------------------------------------------------------- library SafeMath { function mul(uint a, uint b) internal pure returns (uint) { uint c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint a, uint b) internal pure returns (uint) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint a, uint b) internal pure returns (uint) { assert(b <= a); return a - b; } function add(uint a, uint b) internal pure returns (uint) { uint c = a + b; assert(c >= a); return c; } } contract tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; } contract ERC20Token { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public getter functions are not currently recognised as an implementation of the matching abstract function by the compiler. */ /// total amount of tokens uint256 public totalSupply; /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant public returns (uint256 balance); /// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _value) public returns (bool success); /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); /// @notice `msg.sender` approves `_spender` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of tokens to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) public returns (bool success); /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) constant public returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract standardToken is ERC20Token { mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowances; function balanceOf(address _owner) constant public returns (uint256) { return balances[_owner]; } /* Transfers tokens from your address to other */ function transfer(address _to, uint256 _value) public returns (bool success) { require (balances[msg.sender] >= _value); // Throw if sender has insufficient balance require (balances[_to] + _value >= balances[_to]); // Throw if owerflow detected balances[msg.sender] -= _value; // Deduct senders balance balances[_to] += _value; // Add recivers blaance emit Transfer(msg.sender, _to, _value); // Raise Transfer event return true; } /* Approve other address to spend tokens on your account */ function approve(address _spender, uint256 _value) public returns (bool success) { require(balances[msg.sender] >= _value); allowances[msg.sender][_spender] = _value; // Set allowance emit Approval(msg.sender, _spender, _value); // Raise Approval event return true; } /* Approve and then communicate the approved contract in a single tx */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); // Cast spender to tokenRecipient contract approve(_spender, _value); // Set approval to contract for _value spender.receiveApproval(msg.sender, _value, this, _extraData); // Raise method on _spender contract return true; } /* A contract attempts to get the coins */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require (balances[_from] >= _value); // Throw if sender does not have enough balance require (balances[_to] + _value >= balances[_to]); // Throw if overflow detected require (_value <= allowances[_from][msg.sender]); // Throw if you do not have allowance balances[_from] -= _value; // Deduct senders balance balances[_to] += _value; // Add recipient blaance allowances[_from][msg.sender] -= _value; // Deduct allowance for this address emit Transfer(_from, _to, _value); // Raise Transfer event return true; } /* Get the amount of allowed tokens to spend */ function allowance(address _owner, address _spender) constant public returns (uint256 remaining) { return allowances[_owner][_spender]; } } contract MMTA is standardToken, Owned { using SafeMath for uint; string public name="Medicine chain"; string public symbol="MMTA"; uint256 public decimals=18; uint256 public totalSupply = 0; uint256 public topTotalSupply = 5*10**8*10**decimals; /// @dev Fallback to calling deposit when ether is sent directly to contract. function() public payable { revert(); } /// @dev initial function constructor(address _tokenAlloc) public { owner=msg.sender; balances[_tokenAlloc] = topTotalSupply; totalSupply = topTotalSupply; emit Transfer(0x0, _tokenAlloc, topTotalSupply); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"topTotalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"changeOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"approveAndCall","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"acceptNewOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_tokenAlloc","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_oldOwner","type":"address"},{"indexed":false,"name":"_newOwner","type":"address"}],"name":"updateOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Approval","type":"event"}]
Contract Creation Code
60c0604052600e60808190527f4d65646963696e6520636861696e00000000000000000000000000000000000060a090815261003e9160059190610138565b506040805180820190915260048082527f4d4d544100000000000000000000000000000000000000000000000000000000602090920191825261008391600691610138565b50601260075560006008556b019d971e4fe8401e740000006009553480156100aa57600080fd5b50604051602080610b0f83398101604081815291516003805433600160a060020a03199182168117909116179055600954600160a060020a038216600081815260016020908152868220849055600884905592855294519294909390927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3506101d3565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061017957805160ff19168380011785556101a6565b828001600101855582156101a6579182015b828111156101a657825182559160200191906001019061018b565b506101b29291506101b6565b5090565b6101d091905b808211156101b257600081556001016101bc565b90565b61092d806101e26000396000f3006080604052600436106100cf5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100d4578063095ea7b31461015e57806318160ddd1461019657806323b872dd146101bd578063313ce567146101e757806370a08231146101fc57806385c09f261461021d5780638da5cb5b1461023257806395d89b4114610263578063a6f9dae114610278578063a9059cbb14610299578063cae9ca51146102bd578063dd62ed3e14610326578063f05a781d1461034d575b600080fd5b3480156100e057600080fd5b506100e9610362565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012357818101518382015260200161010b565b50505050905090810190601f1680156101505780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016a57600080fd5b50610182600160a060020a03600435166024356103f0565b604080519115158252519081900360200190f35b3480156101a257600080fd5b506101ab610473565b60408051918252519081900360200190f35b3480156101c957600080fd5b50610182600160a060020a0360043581169060243516604435610479565b3480156101f357600080fd5b506101ab61057f565b34801561020857600080fd5b506101ab600160a060020a0360043516610585565b34801561022957600080fd5b506101ab6105a0565b34801561023e57600080fd5b506102476105a6565b60408051600160a060020a039092168252519081900360200190f35b34801561026f57600080fd5b506100e96105b5565b34801561028457600080fd5b50610182600160a060020a0360043516610610565b3480156102a557600080fd5b50610182600160a060020a0360043516602435610677565b3480156102c957600080fd5b50604080516020600460443581810135601f8101849004840285018401909552848452610182948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506107289650505050505050565b34801561033257600080fd5b506101ab600160a060020a036004358116906024351661083b565b34801561035957600080fd5b50610182610866565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103e85780601f106103bd576101008083540402835291602001916103e8565b820191906000526020600020905b8154815290600101906020018083116103cb57829003601f168201915b505050505081565b3360009081526001602052604081205482111561040c57600080fd5b336000818152600260209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60085481565b600160a060020a03831660009081526001602052604081205482111561049e57600080fd5b600160a060020a03831660009081526001602052604090205482810110156104c557600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156104f557600080fd5b600160a060020a0380851660008181526001602090815260408083208054889003905593871680835284832080548801905583835260028252848320338452825291849020805487900390558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b60075481565b600160a060020a031660009081526001602052604090205490565b60095481565b600354600160a060020a031681565b6006805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103e85780601f106103bd576101008083540402835291602001916103e8565b600354600090600160a060020a0316331461062a57600080fd5b600354600160a060020a038381169116141561064557600080fd5b5060048054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b3360009081526001602052604081205482111561069357600080fd5b600160a060020a03831660009081526001602052604090205482810110156106ba57600080fd5b33600081815260016020908152604080832080548790039055600160a060020a03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b60008361073581856103f0565b506040517f8f4ffcb10000000000000000000000000000000000000000000000000000000081523360048201818152602483018790523060448401819052608060648501908152875160848601528751600160a060020a03871695638f4ffcb195948b94938b939192909160a490910190602085019080838360005b838110156107c95781810151838201526020016107b1565b50505050905090810190601f1680156107f65780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561081857600080fd5b505af115801561082c573d6000803e3d6000fd5b50600198975050505050505050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600454600090600160a060020a0316331461088057600080fd5b60035460045460408051600160a060020a03938416815292909116602083015280517fa6348c80a3dfb1c2603f5c35480c5bd8afc0656ad83dc6b520b648cb286d54179281900390910190a1506004546003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790556001905600a165627a7a723058201d5508278e8530c35e463693a72e1e71a0ec5360ea4b400e920d3db2d23644d00029000000000000000000000000249f970391ffc4311e5853a898d72ff85b00df7e
Deployed Bytecode
0x6080604052600436106100cf5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100d4578063095ea7b31461015e57806318160ddd1461019657806323b872dd146101bd578063313ce567146101e757806370a08231146101fc57806385c09f261461021d5780638da5cb5b1461023257806395d89b4114610263578063a6f9dae114610278578063a9059cbb14610299578063cae9ca51146102bd578063dd62ed3e14610326578063f05a781d1461034d575b600080fd5b3480156100e057600080fd5b506100e9610362565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561012357818101518382015260200161010b565b50505050905090810190601f1680156101505780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016a57600080fd5b50610182600160a060020a03600435166024356103f0565b604080519115158252519081900360200190f35b3480156101a257600080fd5b506101ab610473565b60408051918252519081900360200190f35b3480156101c957600080fd5b50610182600160a060020a0360043581169060243516604435610479565b3480156101f357600080fd5b506101ab61057f565b34801561020857600080fd5b506101ab600160a060020a0360043516610585565b34801561022957600080fd5b506101ab6105a0565b34801561023e57600080fd5b506102476105a6565b60408051600160a060020a039092168252519081900360200190f35b34801561026f57600080fd5b506100e96105b5565b34801561028457600080fd5b50610182600160a060020a0360043516610610565b3480156102a557600080fd5b50610182600160a060020a0360043516602435610677565b3480156102c957600080fd5b50604080516020600460443581810135601f8101849004840285018401909552848452610182948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506107289650505050505050565b34801561033257600080fd5b506101ab600160a060020a036004358116906024351661083b565b34801561035957600080fd5b50610182610866565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103e85780601f106103bd576101008083540402835291602001916103e8565b820191906000526020600020905b8154815290600101906020018083116103cb57829003601f168201915b505050505081565b3360009081526001602052604081205482111561040c57600080fd5b336000818152600260209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60085481565b600160a060020a03831660009081526001602052604081205482111561049e57600080fd5b600160a060020a03831660009081526001602052604090205482810110156104c557600080fd5b600160a060020a03841660009081526002602090815260408083203384529091529020548211156104f557600080fd5b600160a060020a0380851660008181526001602090815260408083208054889003905593871680835284832080548801905583835260028252848320338452825291849020805487900390558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35060019392505050565b60075481565b600160a060020a031660009081526001602052604090205490565b60095481565b600354600160a060020a031681565b6006805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103e85780601f106103bd576101008083540402835291602001916103e8565b600354600090600160a060020a0316331461062a57600080fd5b600354600160a060020a038381169116141561064557600080fd5b5060048054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b3360009081526001602052604081205482111561069357600080fd5b600160a060020a03831660009081526001602052604090205482810110156106ba57600080fd5b33600081815260016020908152604080832080548790039055600160a060020a03871680845292819020805487019055805186815290519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a350600192915050565b60008361073581856103f0565b506040517f8f4ffcb10000000000000000000000000000000000000000000000000000000081523360048201818152602483018790523060448401819052608060648501908152875160848601528751600160a060020a03871695638f4ffcb195948b94938b939192909160a490910190602085019080838360005b838110156107c95781810151838201526020016107b1565b50505050905090810190601f1680156107f65780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561081857600080fd5b505af115801561082c573d6000803e3d6000fd5b50600198975050505050505050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600454600090600160a060020a0316331461088057600080fd5b60035460045460408051600160a060020a03938416815292909116602083015280517fa6348c80a3dfb1c2603f5c35480c5bd8afc0656ad83dc6b520b648cb286d54179281900390910190a1506004546003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790556001905600a165627a7a723058201d5508278e8530c35e463693a72e1e71a0ec5360ea4b400e920d3db2d23644d00029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000249f970391ffc4311e5853a898d72ff85b00df7e
-----Decoded View---------------
Arg [0] : _tokenAlloc (address): 0x249F970391ffC4311E5853A898d72fF85b00dF7e
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000249f970391ffc4311e5853a898d72ff85b00df7e
Swarm Source
bzzr://1d5508278e8530c35e463693a72e1e71a0ec5360ea4b400e920d3db2d23644d0
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.