Deposit
We can move funds from L1 to L2 through a deposit action. For ERC20 tokens, the transfer must be approved first. It would require a certain amount of confirmations to be accepted in the L2 network. Once committed to the L2 network, funds are readily usable by the recipient. To wait for the commitment, use awaitReceipt
.
Parameter
Description
.depositTo
Account address of the receiver
.token
Token to be transferred
.amount
Amount of token to be transferred
.ethTxOptions
Options of the deposit Ethereum transaction
.approveDepositAmountForERC20
Ask the user to approve the ERC20 token spending when set
Last updated