Skip to content

Instantly share code, notes, and snippets.

@tomconte
Created December 13, 2016 09:37
Show Gist options
  • Save tomconte/1946b121e69f8662e59613e7583e3ee3 to your computer and use it in GitHub Desktop.
Save tomconte/1946b121e69f8662e59613e7583e3ee3 to your computer and use it in GitHub Desktop.
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