Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- contract P {
- mapping(address => uint) public balanceOf;
- uint public totalSupply;
- modifier check {
- _;
- assert(this.balance >= totalSupply);
- }
- function dee(uint amount) payable check {
- balanceOf[msg.sender] += amount;
- totalSupply += amount;
- }
- function ex(address to, uint value) payable check {
- if (balanceOf[msg.sender] >= value) {
- balanceOf[to] += value;
- balanceOf[msg.sender] -= value;
- }
- }
- function eff() payable check {
- uint balance = balanceOf[msg.sender];
- if (msg.sender.call.value(balance)()) {
- totalSupply -= balance;
- balanceOf[msg.sender] = 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement