You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
578 B
26 lines
578 B
import '../PullPaymentCapable.sol';
|
|
import '../Stoppable.sol';
|
|
|
|
contract StoppableBid is Stoppable, PullPaymentCapable {
|
|
address public highestBidder;
|
|
uint public highestBid;
|
|
|
|
function StoppableBid(address _curator)
|
|
Stoppable(_curator)
|
|
PullPaymentCapable() {}
|
|
|
|
function bid() external stopInEmergency {
|
|
if (msg.value <= highestBid) throw;
|
|
|
|
if (highestBidder != 0) {
|
|
asyncSend(highestBidder, highestBid);
|
|
}
|
|
highestBidder = msg.sender;
|
|
highestBid = msg.value;
|
|
}
|
|
|
|
function withdraw() onlyInEmergency {
|
|
suicide(curator);
|
|
}
|
|
|
|
}
|
|
|