2016-04-05 19:37:12 +02:00
|
|
|
contract sexpool
|
|
|
|
{
|
|
|
|
address public Fredrik;
|
|
|
|
address public Daniel;
|
|
|
|
|
|
|
|
modifier onlyMembers
|
|
|
|
{
|
2016-04-06 11:25:23 +02:00
|
|
|
if (msg.sender != Fredrik && msg.sender != Daniel) throw;
|
2016-04-05 19:37:12 +02:00
|
|
|
_
|
|
|
|
}
|
|
|
|
|
|
|
|
function sexpool(address initFredrik, address initDaniel)
|
|
|
|
{
|
|
|
|
Fredrik = initFredrik;
|
|
|
|
Daniel = initDaniel;
|
|
|
|
}
|
|
|
|
|
|
|
|
function payout() onlyMembers {
|
|
|
|
uint256 payout = this.balance/2;
|
|
|
|
Fredrik.send(payout);
|
|
|
|
Daniel.send(payout);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function changeAdress(address newAdress) onlyMembers {
|
|
|
|
if (msg.sender == Fredrik) {
|
|
|
|
Fredrik = newAdress;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
Daniel = newAdress;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|