api

package
v1.5.0-a3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const TimeoutSafetyFactor int = 2

The fraction of the timeout period to trigger overdue transactions

Variables

This section is empty.

Functions

func IsTransactionDue added in v1.1.0

func IsTransactionDue(rp *rocketpool.RocketPool, startTime time.Time) (bool, time.Duration, error)

True if a transaction is due and needs to bypass the gas threshold

func PrintAndCheckGasInfo added in v1.0.0

func PrintAndCheckGasInfo(gasInfo rocketpool.GasInfo, checkThreshold bool, gasThresholdGwei float64, logger log.ColorLogger, maxFeeWei *big.Int, gasLimit uint64) bool

Print the gas price and cost of a TX

func PrintAndWaitForTransaction added in v1.0.0

func PrintAndWaitForTransaction(cfg *config.RocketPoolConfig, hash common.Hash, ec rocketpool.ExecutionClient, logger log.ColorLogger) error

Print a TX's details to the logger and waits for it to be mined.

func PrintErrorResponse

func PrintErrorResponse(err error)

Print an API error response

func PrintResponse

func PrintResponse(response interface{}, responseError error)

Print an API response response must be a pointer to a struct type with Error and Status string fields

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL