Last active
September 6, 2017 23:03
-
-
Save alaingoldman/f50f30eaabed223a0b0d11aa5e139130 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.12; | |
| contract PassToken { | |
| uint x = 123; | |
| mapping(address => uint) balance; | |
| function whats_x() constant returns(uint){ | |
| return x; | |
| } | |
| event print_warning(address, string, uint); | |
| function change_x(uint newx){ | |
| x = newx; | |
| } | |
| function print_tokens(uint amount){ | |
| balance[msg.sender] += amount; | |
| print_warning(msg.sender, "Is printing", amount); | |
| } | |
| function coin_balance() constant returns(uint){ | |
| return balance[msg.sender]; | |
| } | |
| function give_me_money() payable{} | |
| function eth_balance() returns(uint){ | |
| return this.balance; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment