Skip to content

Instantly share code, notes, and snippets.

contract MetaCoin {
mapping (address => uint) balances;
event Transfer(address _from,address _to, uint _amount);
function MetaCoin() {
balances[tx.origin] = 10000;
}
function sendCoin(address receiver, uint amount) returns(bool sufficient) {
if (balances[msg.sender] < amount) return false;