Function estimateCustomBridgeDepositL2Gas

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

    Parameters

    • providerL2: Web3ZKsyncL2

      The ZKsync provider for the L2 network.

    • l1BridgeAddress: string

      The address of the custom L1 bridge.

    • l2BridgeAddress: string

      The address of the custom L2 bridge.

    • token: string

      The address of the token to be bridged.

    • amount: Numbers

      The deposit amount.

    • to: string

      The recipient address on the L2 network.

    • bridgeData: Bytes

      Additional bridge data.

    • from: string

      The sender address on the L1 network.

    • OptionalgasPerPubdataByte: Numbers

      The current gas per byte of pubdata.

    • Optionall2Value: Numbers

      The msg.value of L2 transaction.

    Returns Promise<Numbers>