Assessment reports>Mantle>Threat Models>depositERC20

Function: depositERC20(address _l1Token, address _l2Token, uint256 _amount, uint32 _l2Gas, byte[] _data)

Initiates deposit.

Inputs

  • _l1Token

    • Control: User.

    • Constraints: Discarded.

    • Impact: Address of the L1 ERC-20 being deposited.

  • _l2Token

    • Control: User.

    • Constraints: Discarded.

    • Impact: Address of the L1 respective L2 ERC-20.

  • _amount

    • Control: User.

    • Constraints: Discarded.

    • Impact: Amount of the ERC-20 to deposit.

  • _l2Gas

    • Control: User.

    • Constraints: Discarded.

    • Impact: Gas limit required to complete the deposit on L2.

  • _data

    • Control: User.

    • Constraints: Discarded.

    • Impact: Optional data to forward to L2.

Branches and code coverage (including function calls)

Intended branches

  • Successfully deposits ETH if all the conditions are met.

Negative behavior

  • Reverts if the caller does not have enough _amount.

Zellic © 2024Back to top ↑