Skip to content

Instantly share code, notes, and snippets.

@SorenPeterson
Created March 20, 2016 06:30
Show Gist options
  • Save SorenPeterson/2e402df34100e26845b7 to your computer and use it in GitHub Desktop.
Save SorenPeterson/2e402df34100e26845b7 to your computer and use it in GitHub Desktop.
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