utils

package
v0.18.15 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTxFee

func CheckTxFee(gasPrice *big.Int, gas uint64, cap float64) error

checkTxFee is an internal function used to check whether the fee of the given transaction is _reasonable_(under the cap).

func EthToOLSignedTx

func EthToOLSignedTx(tx *ethtypes.Transaction) (*action.SignedTx, error)

func GetPendingTx

func GetPendingTx(mem mempool.Mempool, hash common.Hash, chainID *big.Int) (*rpctypes.Transaction, error)

GetPendingTx search for tx in pool

func GetPendingTxCountByAddress

func GetPendingTxCountByAddress(mem mempool.Mempool, address common.Address) (total uint64)

GetPendingTxCountByAddress is used to get pending tx count (nonce) for user address NOTE: Working right now only with legacy tx

func GetPendingTxs

func GetPendingTxs(mem mempool.Mempool, chainID *big.Int) ([]*rpctypes.Transaction, error)

GetPendingTransactions search for txs in pool

func GetPendingTxsWithCallback

func GetPendingTxsWithCallback(mem mempool.Mempool, chainID *big.Int, callback func(tx *rpctypes.Transaction) bool) error

GetPendingTxsWithCallback search for txs in pool and return in callback form

Types

This section is empty.

Jump to

Keyboard shortcuts

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