Class Estimator

Class used for estimating the TX cost on the target chain It uses the relayer to estimate the cost of the TX which is part of the risk/reward computation

Hierarchy

  • Estimator

Constructors

Properties

Methods

Constructors

Properties

Methods

  • Estimates the cost of the side effect on the target chain. We first build the rtx object we would use to execute the TX on target. The cost estimator class then uses the relayer to estimate the cost of the TX. We then convert the cost to USD using the price engine.

    Parameters

    • sideEffect: SideEffect

      object of SFX we want to estimate the cost for

    Returns Promise<BehaviorSubject<number>>

    the cost of the SFX in USD as a subject

Generated using TypeDoc