GasFeeController Actions
11 actions registered.
GasFeeController:disableNonRPCGasFeeApis
Package: @metamask/gas-fee-controller
Handler signature:
() => void
GasFeeController:disconnectPoller
Package: @metamask/gas-fee-controller
Remove the poll token, and stop polling if the set of poll tokens is empty.
Parameters:
| Name | Description |
|---|---|
pollToken | The poll token to disconnect. |
Handler signature:
(pollToken: string) => void
GasFeeController:enableNonRPCGasFeeApis
Package: @metamask/gas-fee-controller
Handler signature:
() => void
GasFeeController:fetchGasFeeEstimates
Package: @metamask/gas-fee-controller
Fetches gas fee estimates.
Parameters:
| Name | Description |
|---|---|
options | The gas fee estimate options. |
Returns: The gas fee estimates.
Handler signature:
(options?: FetchGasFeeEstimateOptions) => Promise<GasFeeState>
GasFeeController:getGasFeeEstimatesAndStartPolling
Package: @metamask/gas-fee-controller
Gets gas fee estimates and starts polling for updates.
Parameters:
| Name | Description |
|---|---|
pollToken | An existing poll token to reuse, or undefined to generate a new one. |
Returns: The poll token that can be used to stop polling.
Handler signature:
(pollToken: string | undefined) => Promise<string>
GasFeeController:getState
Package: @metamask/gas-fee-controller
Handler signature:
() => GasFeeState
GasFeeController:getTimeEstimate
Package: @metamask/gas-fee-controller
Gets the estimated time for a transaction based on the given gas parameters.
Parameters:
| Name | Description |
|---|---|
maxPriorityFeePerGas | The maximum priority fee per gas in GWEI. |
maxFeePerGas | The maximum fee per gas in GWEI. |
Returns: The estimated time bounds, or an empty object if fee market estimates are not available.
Handler signature:
(maxPriorityFeePerGas: string, maxFeePerGas: string) => EstimatedGasFeeTimeBounds | Record<string, never>
GasFeeController:resetPolling
Package: @metamask/gas-fee-controller
Resets the polling interval by stopping and restarting polling with the existing poll tokens.
Handler signature:
() => Promise<void>
GasFeeController:startPolling
Package: @metamask/gas-fee-controller
Handler signature:
GasFeeController['startPolling']
GasFeeController:stopPolling
Package: @metamask/gas-fee-controller
Stops polling for gas fee estimates and clears all poll tokens.
Handler signature:
() => void
GasFeeController:stopPollingByPollingToken
Package: @metamask/gas-fee-controller
Handler signature:
GasFeeController['stopPollingByPollingToken']