Skip to content

eth carried with the deposit erc20 token #465

@liaoyinglong

Description

@liaoyinglong

First of all, this is an awesome library!

I have a question about when I call Erc20Bridger.deposit I can control the amount of ETH to send?
if not, how can I know I will send the ETH amount in L1 and will receive the ETH amount in L2 before do deposit action?

the code like:

const bridger = new Erc20Bridger(l2Network)
// I want to know how much is  will send ETH amount in L1 and will receive the ETH amount in L2

const ethDepositTxResponse = await bridger.deposit({
  amount: utils.parseEther('10'),
  l1Signer: l1Signer /** <-- connected ethers-js Wallet */,
  l2Provider: l2Provider /** <--- ethers-js Provider */,
})

Thank of all!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions