function bid(bytes32 _blindedBid)
        // If the bid is not higher, send the money back
        // (the failing require will revert all changes in this function execution including it having received the money).
        require(msg.value >= minBid, "Your bid is lower then minimum bidding amount. Try bidding higher!");
            blindedBid: _blindedBid,
            deposit: msg.value

1 Answer 1


You can, for instance, have a mapping of addresses having already placed a bid and a require based on it

mapping(address=>bool) alreadyBid;

then require(!alreadyBid[msg.sender], "max bid reachded");

  • I make a contract in which i am making a multiple auction using singal contract and bidders can bid. But i want to add functionality when bidder place a bid he can selet auction from multiple auctions. IS there any solution?
    – Salman
    Nov 11, 2021 at 7:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.