Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (22 sloc) 799 Bytes
pragma solidity ^0.4.22;
contract Coin {
// This is placeholder code.
// The PlayChip ICO smart contracts will be available to the public
// for review and audit prior to the PlayChip ICO launch.
address public minter;
mapping (address => uint) public balances;
event Sent(address from, address to, uint amount);
function Coin() public {
minter = msg.sender;
}
function mint(address receiver, uint amount) public {
if (msg.sender != minter) return;
balances[receiver] += amount;
}
function send(address receiver, uint amount) public {
if (balances[msg.sender] < amount) return;
balances[msg.sender] -= amount;
balances[receiver] += amount;
emit Sent(msg.sender, receiver, amount);
}
}