PullPaymentBid.sol 378 B

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