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: 0

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