Created
October 13, 2017 12:47
-
-
Save gkucmierz/b6a8e255e8bed53c0e7077313abd75d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.8; | |
// kovan: 0x9af4ad4bad67f640a1416ef448640f906209ba0e | |
contract Token { | |
string public name; | |
uint8 public decimals; | |
string public symbol; | |
uint256 public totalSupply; | |
mapping (address => uint256) public balanceOf; | |
function Token() public { | |
name = 'Token'; | |
decimals = 18; | |
symbol = 'TKN'; | |
totalSupply = 1e6; | |
balanceOf[msg.sender] = totalSupply; | |
} | |
function transfer(address _to, uint256 _value) public returns (bool success) { | |
require(balanceOf[msg.sender] >= _value); | |
balanceOf[msg.sender] -= _value; | |
balanceOf[_to] += _value; | |
Transfer(msg.sender, _to, _value); | |
return true; | |
} | |
event Transfer(address indexed _from, address indexed _to, uint256 _value); | |
event Approval(address indexed _owner, address indexed _spender, uint256 _value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment