Created
June 13, 2017 14:03
-
-
Save montyanderson/07ada889ffcdc2c93cb9ef729acb9775 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.10; | |
contract JesseCoin { | |
address jesse; | |
mapping(address => uint) balance; | |
function JesseCoin() { | |
jesse = msg.sender; | |
} | |
function mint(uint amount) { | |
if(msg.sender == jesse) { | |
balance[jesse] += amount; | |
} | |
} | |
function send(address to, uint amount) { | |
if(balance[msg.sender] >= amount) { | |
balance[msg.sender] -= amount; | |
balance[to] += amount; | |
} | |
} | |
function balanceOf(address addr) constant returns (uint) { | |
return balance[addr]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MY NAME JHEFF