RE: Hi, this is a test post, its main purpose will be posts in comments.

You are viewing a single comment's thread from:

Hi, this is a test post, its main purpose will be posts in comments.

in developers •  2 years ago 

pragma solidity ^0.4.24;

contract MyToken {
address public owner;
string public name;
uint256 public decimals;
uint256 public totalSupply;

mapping(address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;

constructor (uint256 _initialSupply, string _name, uint256 _decimals) public {
require(_initialSupply > 0);
require(_decimals == 0);

owner = msg.sender;
totalSupply = _initialSupply;
name = _name;
decimals = _decimals;

balances[owner] = _initialSupply;

}

function transfer (address _to, uint256 _value) public returns (bool success) {

require(balances[msg.sender] >= _value);
require(_to != address(0));

balances[msg.sender] -= _value;
balances[_to] += _value;
emit Transfer(msg.sender, _to, _value);
return true;

}

event Transfer (address indexed _from, address indexed _to, uint256 _value);
}

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!