Function estimateDefaultBridgeDepositL2Gas

  • Returns an estimation of the L2 gas required for token bridging via the default ERC20 bridge.

    Parameters

    • providerL1: Web3<RegisteredSubscription>

      The provider for the L1 network.

    • providerL2: Web3ZKsyncL2

      The ZKsync provider for the L2 network.

    • token: string

      The address of the token to be bridged.

    • amount: Numbers

      The deposit amount.

    • to: string

      The recipient address on the L2 network.

    • Optionalfrom: string

      The sender address on the L1 network.

    • OptionalgasPerPubdataByte: Numbers

      The current gas per byte of pubdata.

    Returns Promise<Numbers>