SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pragma solidity 0.4.6;
  2.  
  3. contract Coin {
  4.     address minter;
  5.     mapping (address => uint) balances;
  6.     function Coin() {
  7.         minter = msg.sender;
  8.     }
  9.     function mint(address owner, uint amount) {
  10.         if (msg.sender != minter) return;
  11.         balances[owner] += amount;
  12.     }
  13.     function send(address receiver, uint amount) {
  14.         if (balances[msg.sender] < amount) return;
  15.         balances[msg.sender] -= amount;
  16.         balances[receiver] += amount;
  17.     }
  18.     function queryBalance(address addr) constant returns (uint balance) {
  19.         return balances[addr];
  20.     }
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top