PullPaymentBid.sol 365 B

12345678910111213141516
  1. import '../PullPaymentCapable.sol';
  2. contract PullPaymentBid is PullPaymentCapable {
  3. address public highestBidder;
  4. uint public highestBid;
  5. function bid() external {
  6. if (msg.value <= highestBid) throw;
  7. if (highestBidder != 0) {
  8. asyncSend(highestBidder, highestBid);
  9. }
  10. highestBidder = msg.sender;
  11. highestBid = msg.value;
  12. }
  13. }