Function: lock(address token, uint256 amount)

This function locks a token.

Inputs

  • token

    • Control: Fully controlled by the caller.

    • Constraints: Must be registered into this contract and under the active epoch.

    • Impact: Specifies the token to be locked.

  • amount

    • Control: Fully controlled by the caller.

    • Constraints: None.

    • Impact: Specifies the amount of tokens to be locked.

Branches and code coverage

Intended branches

  • Increase the locked amount of the user.

  • Transfer the tokens from the user.

Negative behavior

  • Contract is not paused.

  • The given token is registered to support.

  • The given token has an active epoch.

Zellic © 2025Back to top ↑