Assessment reports>Mantle>Threat Models>withdrawTo

Function: withdrawTo(address _l2Token, address _to, uint256 _amount, uint32 _l1Gas, byte[] _data)

Initiates a withdrawal of _amount of _l2Token tokens to address _to.

Inputs

  • _l2Token

    • Control: User.

    • Constraints: Discarded.

    • Impact: Determines the token that the user wants to withdraw from L2 to L1.

  • _to

    • Control: User.

    • Constraints: Discarded.

    • Impact: Destination address.

  • _amount

    • Control: User.

    • Constraints: Discarded.

    • Impact: Amount of tokens to withdraw.

  • _l1Gas

    • Control: User.

    • Constraints: Discarded.

    • Impact: Amount of gas for execution of the message.

  • _data

    • Control: User.

    • Constraints: Discarded.

    • Impact: Optional data.

Branches and code coverage (including function calls)

Intended branches

  • Successfully withdraws if all conditions are met.

Zellic © 2024Back to top ↑