Function: claimBid(uint256 bidIndex)

This function is used to claim the tokens for a winning bid. If the bid is successful, the reserve tokens are transferred to the bidder.

Inputs

  • bidIndex

    • Control: Arbitrary.

    • Constraints: Bidder must be the caller, and the bid must not have been claimed.

    • Impact: Index of the bid to claim.

Branches and code coverage

Intended branches

  • Update the bid's claimed status to true.

  • Transfer the sellCouponAmount of reserve tokens to the bidder.

Negative behavior

  • Revert if the auction is ongoing.

  • Revert if the auction has not succeeded.

  • Revert if the bidder is not the caller.

  • Revert if the bid has already been claimed.

Zellic © 2025Back to top ↑