ETH Price: $2,073.97 (+3.24%)

Contract

0xeEAb9b54CBF17ce0Bb5b618F3BD3A20ca3cf5331
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Approve48105942017-12-28 4:58:443014 days ago1514437124IN
0xeEAb9b54...ca3cf5331
0 ETH0.000046521

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
YourMomToken

Compiler Version
v0.4.18+commit.9cf6e910

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2017-12-28
*/

pragma solidity ^0.4.16; //YourMomToken

contract owned {	//Defines contract Owner
	address public owner;

	//Events
	event TransferOwnership (address indexed _owner, address indexed _newOwner);	//Notifies about the ownership transfer

	//Constrctor function
	function owned() public {
		owner = msg.sender;
	}

	function transferOwnership(address newOwner) onlyOwner() public {
		TransferOwnership (owner, newOwner);
		owner = newOwner;
	}
	
	//Modifiers
	modifier onlyOwner {
		require(msg.sender == owner);
		_;
	}

	modifier onlyPayloadSize(uint size) {		//Mitigates ERC20 Short Address Attack
		assert(msg.data.length >= size + 4);
		_;
	}
}


contract YourMomToken is owned {
	mapping (address => uint256) public balanceOf;		//This creates an array with all balances
	mapping (address => mapping (address => uint256)) public allowance;	//This creates an array of arrays with adress->adress=value
	uint256 public totalSupply;
	string public name;
	string public symbol;
	uint8 public decimals;

	//Events
	event Transfer(address indexed from, address indexed to, uint256 value);		//Declaring the event function to help clients like the Ethereum Wallet keep track of activities happening in the contract
	event Approval(address indexed _owner, address indexed _spender, uint _value);	//Notifies clients about the Approval
	event Burn(address indexed from, uint256 value);								//This notifies clients about the amount burnt

	//Constructor function
	function YourMomToken(string tokenName, string tokenSymbol, uint256 initialSupplyInEther) public {
		name = tokenName;								//Set the name for display purposes
		symbol = tokenSymbol;							//Set the symbol for display purposes
		decimals = 18;									//Amount of decimals for display purposes
		totalSupply = initialSupplyInEther * 10**18;	//Defines the initial supply as the total supply (in wei)
		balanceOf[msg.sender] = totalSupply;			//Give the creator all initial tokens
	}

	//Call functions
	function name() public constant returns (string) { return name; }
	function symbol() public constant returns (string) { return symbol; }
	function decimals() public constant returns (uint8) { return decimals; }
	function totalSupply() public constant returns (uint256) { return totalSupply; }
	function balanceOf(address _owner) public constant returns (uint256 balance) { return balanceOf[_owner]; }
	function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { return allowance[_owner][_spender]; }

	function transfer(address _to, uint256 _value) onlyPayloadSize (2 * 32) public returns (bool success) {	//Transfer _value tokens from msg.sender to '_to'
		_transfer(msg.sender, _to, _value);		//Call the _transfer function (internal). Calling it it's cleaner than write two identical functions for 'transfer' and 'transferFrom'
		return true;
	}

	function transferFrom(address _from, address _to, uint256 _value) onlyPayloadSize (3 * 32) public returns (bool success) {	//Transfer tokens from other address
		require(_value <= allowance[_from][msg.sender]);	//Check allowance array, if '_from' has authorized 'msg.sender' spend <= _value
		_transfer(_from, _to, _value);						//Send '_value' tokens to '_to' in behalf of '_from'
		allowance[_from][msg.sender] -= _value;				//Reduce msg.sender's allowance to spend '_from's tokens in '_value'
		return true;
	}
	
	function _transfer(address _from, address _to, uint _value) internal returns (bool success) {
		require(_to != 0x0);									//Prevent transfer to 0x0 address. Use burn() instead
		require(balanceOf[_from] >= _value);					//Check if the sender has enough
		require(balanceOf[_to] + _value >= balanceOf[_to]);		//Check for overflows
		require(_value != 0);									//Prevents a transaction of '0' to be executed
		require(_from != _to);									//Prevents sending a transaction to yourself
		balanceOf[_from] -= _value;								//Subtract from the sender
		balanceOf[_to] += _value;								//Add the same to the recipient
		Transfer(_from, _to, _value);							//Notify anyone listening that this transfer took place
		return true;
	}

	function approve(address _spender, uint256 _value) public returns (bool success) {	//Set allowance for other address
		require((_value == 0) || (allowance[msg.sender][_spender] == 0));		//Mitigates the approve/transfer attack (race condition)
		require(_value != allowance[msg.sender][_spender]);	//Prevents setting allowance for the already setted value
		allowance[msg.sender][_spender] = _value;			//Set allowance array
		Approval(msg.sender, _spender, _value);				//Call the Approval event
		return true;
	}

	function burn(uint256 _value) public returns (bool success) {	//Function to destroy tokens
		require(balanceOf[msg.sender] >= _value);			//Check if the targeted balance has enough
		require(_value != 0);								//Prevents a transaction of '0' to be executed
		balanceOf[msg.sender] -= _value;					//Subtract from the targeted balance
		totalSupply -= _value;								//Update totalSupply
		Burn(msg.sender, _value);							//Call the Event to notice about the burn
		return true;
	}
}

Contract Security Audit

Contract ABI

API
[{"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":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"burn","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","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":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","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":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"tokenName","type":"string"},{"name":"tokenSymbol","type":"string"},{"name":"initialSupplyInEther","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"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"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_newOwner","type":"address"}],"name":"TransferOwnership","type":"event"}]

6060604052341561000f57600080fd5b60405161098e38038061098e8339810160405280805182019190602001805182019190602001805160008054600160a060020a03191633600160a060020a03161790559150600490508380516100699291602001906100bb565b50600582805161007d9291602001906100bb565b506006805460ff19166012179055670de0b6b3a7640000026003819055600160a060020a033316600090815260016020526040902055506101569050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100fc57805160ff1916838001178555610129565b82800160010185558215610129579182015b8281111561012957825182559160200191906001019061010e565b50610135929150610139565b5090565b61015391905b80821115610135576000815560010161013f565b90565b610829806101656000396000f3006060604052600436106100b95763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100be578063095ea7b31461014857806318160ddd1461017e57806323b872dd146101a3578063313ce567146101cb57806342966c68146101f457806370a082311461020a5780638da5cb5b1461022957806395d89b4114610258578063a9059cbb1461026b578063dd62ed3e1461028d578063f2fde38b146102b2575b600080fd5b34156100c957600080fd5b6100d16102d3565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561010d5780820151838201526020016100f5565b50505050905090810190601f16801561013a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015357600080fd5b61016a600160a060020a036004351660243561037b565b604051901515815260200160405180910390f35b341561018957600080fd5b610191610453565b60405190815260200160405180910390f35b34156101ae57600080fd5b61016a600160a060020a0360043581169060243516604435610459565b34156101d657600080fd5b6101de6104e0565b60405160ff909116815260200160405180910390f35b34156101ff57600080fd5b61016a6004356104e9565b341561021557600080fd5b610191600160a060020a0360043516610580565b341561023457600080fd5b61023c61059b565b604051600160a060020a03909116815260200160405180910390f35b341561026357600080fd5b6100d16105aa565b341561027657600080fd5b61016a600160a060020a036004351660243561061d565b341561029857600080fd5b610191600160a060020a0360043581169060243516610642565b34156102bd57600080fd5b6102d1600160a060020a036004351661066d565b005b6102db6107eb565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103715780601f1061034657610100808354040283529160200191610371565b820191906000526020600020905b81548152906001019060200180831161035457829003601f168201915b5050505050905090565b60008115806103ad5750600160a060020a03338116600090815260026020908152604080832093871683529290522054155b15156103b857600080fd5b600160a060020a033381166000908152600260209081526040808320938716835292905220548214156103ea57600080fd5b600160a060020a03338116600081815260026020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60035490565b60006060606436101561046857fe5b600160a060020a038086166000908152600260209081526040808320339094168352929052205483111561049b57600080fd5b6104a68585856106f3565b50600160a060020a038086166000908152600260209081526040808320339094168352929052208054849003905560019150509392505050565b60065460ff1690565b600160a060020a0333166000908152600160205260408120548290101561050f57600080fd5b81151561051b57600080fd5b600160a060020a03331660008181526001602052604090819020805485900390556003805485900390557fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59084905190815260200160405180910390a2506001919050565b600160a060020a031660009081526001602052604090205490565b600054600160a060020a031681565b6105b26107eb565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103715780601f1061034657610100808354040283529160200191610371565b60006040604436101561062c57fe5b6106373385856106f3565b506001949350505050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60005433600160a060020a0390811691161461068857600080fd5b600054600160a060020a0380831691167f5c486528ec3e3f0ea91181cff8116f02bfa350e03b8b6f12e00765adbb5af85c60405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a038316151561070a57600080fd5b600160a060020a0384166000908152600160205260409020548290101561073057600080fd5b600160a060020a038316600090815260016020526040902054828101101561075757600080fd5b81151561076357600080fd5b600160a060020a03848116908416141561077c57600080fd5b600160a060020a038085166000818152600160205260408082208054879003905592861680825290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b602060405190810160405260008152905600a165627a7a72305820ac8a52f5508b15e27d5f9656035c8bd5d30e59dbbe12dd9d49de432d5746a7510029000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000000000c596f75724d6f6d546f6b656e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003594d540000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6060604052600436106100b95763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100be578063095ea7b31461014857806318160ddd1461017e57806323b872dd146101a3578063313ce567146101cb57806342966c68146101f457806370a082311461020a5780638da5cb5b1461022957806395d89b4114610258578063a9059cbb1461026b578063dd62ed3e1461028d578063f2fde38b146102b2575b600080fd5b34156100c957600080fd5b6100d16102d3565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561010d5780820151838201526020016100f5565b50505050905090810190601f16801561013a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015357600080fd5b61016a600160a060020a036004351660243561037b565b604051901515815260200160405180910390f35b341561018957600080fd5b610191610453565b60405190815260200160405180910390f35b34156101ae57600080fd5b61016a600160a060020a0360043581169060243516604435610459565b34156101d657600080fd5b6101de6104e0565b60405160ff909116815260200160405180910390f35b34156101ff57600080fd5b61016a6004356104e9565b341561021557600080fd5b610191600160a060020a0360043516610580565b341561023457600080fd5b61023c61059b565b604051600160a060020a03909116815260200160405180910390f35b341561026357600080fd5b6100d16105aa565b341561027657600080fd5b61016a600160a060020a036004351660243561061d565b341561029857600080fd5b610191600160a060020a0360043581169060243516610642565b34156102bd57600080fd5b6102d1600160a060020a036004351661066d565b005b6102db6107eb565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103715780601f1061034657610100808354040283529160200191610371565b820191906000526020600020905b81548152906001019060200180831161035457829003601f168201915b5050505050905090565b60008115806103ad5750600160a060020a03338116600090815260026020908152604080832093871683529290522054155b15156103b857600080fd5b600160a060020a033381166000908152600260209081526040808320938716835292905220548214156103ea57600080fd5b600160a060020a03338116600081815260026020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60035490565b60006060606436101561046857fe5b600160a060020a038086166000908152600260209081526040808320339094168352929052205483111561049b57600080fd5b6104a68585856106f3565b50600160a060020a038086166000908152600260209081526040808320339094168352929052208054849003905560019150509392505050565b60065460ff1690565b600160a060020a0333166000908152600160205260408120548290101561050f57600080fd5b81151561051b57600080fd5b600160a060020a03331660008181526001602052604090819020805485900390556003805485900390557fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca59084905190815260200160405180910390a2506001919050565b600160a060020a031660009081526001602052604090205490565b600054600160a060020a031681565b6105b26107eb565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103715780601f1061034657610100808354040283529160200191610371565b60006040604436101561062c57fe5b6106373385856106f3565b506001949350505050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60005433600160a060020a0390811691161461068857600080fd5b600054600160a060020a0380831691167f5c486528ec3e3f0ea91181cff8116f02bfa350e03b8b6f12e00765adbb5af85c60405160405180910390a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a038316151561070a57600080fd5b600160a060020a0384166000908152600160205260409020548290101561073057600080fd5b600160a060020a038316600090815260016020526040902054828101101561075757600080fd5b81151561076357600080fd5b600160a060020a03848116908416141561077c57600080fd5b600160a060020a038085166000818152600160205260408082208054879003905592861680825290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b602060405190810160405260008152905600a165627a7a72305820ac8a52f5508b15e27d5f9656035c8bd5d30e59dbbe12dd9d49de432d5746a7510029

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000000000c596f75724d6f6d546f6b656e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003594d540000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : tokenName (string): YourMomToken
Arg [1] : tokenSymbol (string): YMT
Arg [2] : initialSupplyInEther (uint256): 1000000

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000f4240
Arg [3] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [4] : 596f75724d6f6d546f6b656e0000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [6] : 594d540000000000000000000000000000000000000000000000000000000000


Swarm Source

bzzr://ac8a52f5508b15e27d5f9656035c8bd5d30e59dbbe12dd9d49de432d5746a751

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.