Skip to content

Instantly share code, notes, and snippets.

@julianduque
Last active October 27, 2017 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save julianduque/eb6ed4a52c6d1f57614482565a1073ac to your computer and use it in GitHub Desktop.
Save julianduque/eb6ed4a52c6d1f57614482565a1073ac to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.11;
contract HelloWorld {
uint public balance;
address public owner;
function HelloWorld() public {
owner = msg.sender;
balance = 0;
}
function update() public payable isOwner() {
balance = msg.value;
}
modifier isOwner() {
require(msg.sender == owner);
_;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment