Created
March 20, 2016 06:30
-
-
Save SorenPeterson/2e402df34100e26845b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract Company { | |
address public ceo; | |
mapping (address => Employee) | |
struct Employee | |
{ | |
uint dailySalary; | |
} | |
function Company() | |
{ | |
ceo = msg.sender; | |
} | |
function withdraw(uint amount) | |
{ | |
if(amount / 1000 > this.balance) throw; | |
if(msg.sender == ceo) ceo.send(amount / 1000); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment