Skip to content

Instantly share code, notes, and snippets.

@gkucmierz
Created October 13, 2017 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gkucmierz/b6a8e255e8bed53c0e7077313abd75d3 to your computer and use it in GitHub Desktop.
Save gkucmierz/b6a8e255e8bed53c0e7077313abd75d3 to your computer and use it in GitHub Desktop.
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