Function: finalizeDepositERC20(address _l1Token, address _l2Token, address _from, address _to, uint256 _amount, byte[] _data)
Finalizes the deposit of ERC-20 tokens from L1 to L2.
Inputs
_l1Token
Control: Fully controlled by the caller.
Constraints: Ensured that it is supported.
Impact: The l1Token that has been deposited.
_l2Token
Control: Fully controlled by the caller.
Constraints: Ensured that it is supported.
Impact: The l2Token to be minted.
_from
Control: Fully controlled by the caller.
Constraints: None.
Impact: The depositor of the tokens.
_to
Control: Fully controlled by the caller.
Constraints: None.
Impact: The recipient of the tokens.
_amount
Control: Fully controlled by the caller.
Constraints: None.
Impact: The amount of tokens to be minted.
_data
Control: Fully controlled by the caller.
Constraints: None.
Impact: Data to be passed to the callback.
Branches and code coverage (including function calls)
Intended branches
Perform the callback on
to
withdata
.Mint the correct amount of tokens to
to
.Ensure that
l1Token
is supported.Ensure that
l2Token
is supported.Ensure that
depositsEnabled
is true.
Negative behavior
Should not be callable by anyone other than the counterpart.
msg.value
should not be positive.