Last active
November 9, 2016 10:52
-
-
Save noeleon930/6fbe3effffba92241f7b4957e4ac3f66 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.0; | |
| contract NccuBank { | |
| address public minter; | |
| mapping (address => uint) public balances; | |
| event Sent(address from, address to, uint amount); | |
| function NccuBank() { | |
| minter = msg.sender; | |
| } | |
| function mint(address receiver, uint amount) returns (bool) { | |
| if (msg.sender != minter) return false; | |
| balances[receiver] += amount; | |
| return true; | |
| } | |
| function _send(address receiver, uint amount) returns (bool) { | |
| if (balances[msg.sender] < amount) return false; | |
| balances[msg.sender] -= amount; | |
| balances[receiver] += amount; | |
| Sent(msg.sender, receiver, amount); | |
| return true; | |
| } | |
| function check() constant returns (uint) { | |
| return balances[msg.sender]; | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
0xca35b7d915458ef540ade6068dfe2f44e8fa733c
0x14723a09acff6d2a60dcdf7aa4aff308fddc160c
0x4b0897b0513fdc7c541b6d9d7e929c4e5364d2db
0x583031d1113ad414f02576bd6afabfb302140225
0xdd870fa1b7c4700f2bd7f44238821c26f7392148