Function: setCap(uint256 newCap)

This function is used to set the new deposit cap. It is only callable by the owner.

Inputs

  • newCap

    • Control: Arbitrary uint256.

    • Constraints: Must be greater than zero and greater than the current total deposited amount.

    • Impact: New deposit cap.

Branches and code coverage

Intended branches

  • Emit the CapUpdated event.

  • Update the cap.

Negative behavior

  • Revert if the caller is not the owner.

  • Revert if the new cap is zero.

  • Revert if the new cap is less than the current total deposited amount.

Zellic © 2025Back to top ↑