GasEstimator is a class that provides gas estimation functionality.

Hierarchy

  • GasEstimator

Constructors

Methods

  • Estimates the gas price for a bridge transaction.

    Static

    Method

    estimateGasPrice

    Returns

    • A Promise that resolves to the estimated gas price as a GasEstimate object, or undefined if estimation fails.

    Parameters

    • sdk: GlitterBridgeSDK

      The GlitterBridgeSDK instance.

    • from: string

      The source address for the bridge transaction.

    • to: string

      The destination address for the bridge transaction.

    • type: BridgeType

      The type of bridge transaction.

    Returns Promise<undefined | GasEstimate>

  • Retrieves the Circle token amount for a given network estimate.

    Static

    Method

    getCircleFromEstimate

    Returns

    • A Promise that resolves to the Circle token amount as a BigNumber, or undefined if retrieval fails.

    Parameters

    Returns Promise<undefined | BigNumber>

  • Retrieves the Circle token amount for a given destination network estimate.

    Static

    Method

    getCircleToEstimate

    Returns

    • A Promise that resolves to the Circle token amount as a BigNumber, or undefined if retrieval fails.

    Parameters

    Returns Promise<undefined | BigNumber>

  • Retrieves the TokenV2 token amount for a given network estimate.

    Static

    Method

    getTokenV2FromEstimate

    Returns

    • A Promise that resolves to the TokenV2 token amount as a BigNumber, or undefined if retrieval fails.

    Parameters

    Returns Promise<undefined | BigNumber>

  • Retrieves the TokenV2 token amount for a given network estimate.

    Static

    Method

    getTokenV2FromEstimate

    Returns

    • A Promise that resolves to the TokenV2 token amount as a BigNumber, or undefined if retrieval fails.

    Parameters

    Returns Promise<undefined | BigNumber>

Generated using TypeDoc