Files
openzeppelin-contracts/contracts/PullPaymentBid.sol
Manuel Araoz 4ad2e0fb2d remove tabs
2016-08-10 15:36:10 -03:00

17 lines
364 B
Solidity

import './PullPaymentCapable.sol';
contract PullPaymentBid is PullPaymentCapable {
address public highestBidder;
uint public highestBid;
function bid() external {
if (msg.value <= highestBid) throw;
if (highestBidder != 0) {
asyncSend(highestBidder, highestBid);
}
highestBidder = msg.sender;
highestBid = msg.value;
}
}