Skip to content

Instantly share code, notes, and snippets.

@tomconte
Created December 13, 2016 09:37
Super simple Ethereum smart contract for testing.
pragma solidity ^0.4.0;
contract Token {
mapping (address => uint) public balances;
function Token() {
balances[msg.sender] = 1000000;
}
function transfer(address _to, uint _amount) {
if (balances[msg.sender] < _amount) {
throw;
}
balances[msg.sender] -= _amount;
balances[_to] += _amount;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment