GasCostEstimator class
Estimates the gas cost of Contract calls
Signature:
export declare class GasCostEstimator<TContract extends BaseContract>
Constructors
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(contractWrapper) | Constructs a new instance of the GasCostEstimator class |
Methods
| Method | Modifiers | Description |
|---|---|---|
| currentGasPriceInGwei() | Returns the current gas price in gwei | |
| gasCostOf(fn, args) | Estimates the cost of gas in native token of the current chain Pass in the same parameters as the contract's function. | |
| gasLimitOf(fn, args) | Estimates the gas limit of a transaction Pass in the same parameters as the contract's function. |