Function: withdrawTo(address token, address to, uint256 amount)

This function withdraws the caller’s available (unlocked) funds of token to the specified to address after settling lockups.

Inputs

  • token

    • Control: Fully controlled by the caller.

    • Constraints: N/A.

    • Impact: Asset to withdraw from the caller’s account.

  • to

    • Control: Fully controlled by the caller.

    • Constraints: Must be nonzero.

    • Impact: Recipient of withdrawal.

  • amount

    • Control: Fully controlled by the caller.

    • Constraints: Must be less than or equal to the unlocked balance after settlement.

    • Impact: Amount to withdraw to the to address.

Branches and code coverage

Intended branches

  • Success — withdraw to to (native/ERC-20).

  • Revert — to == address(0).

  • Revert — amount > unlocked after settlement.

Zellic © 2025Back to top ↑