function bid() external payable { require(started, "not started"); require(block.timestamp < endAt, "ended"); require(msg.value > highestBid, "value < highest"); if (highestBidder != address(0)) { bids[highestBidder] += highestBid; } highestBidder = msg.sender; highestBid = msg.value; emit Bid(msg.sender, msg.value); }
0.7.1