metrics

package
v0.1.124 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: AGPL-3.0 Imports: 9 Imported by: 1 module, 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

View Source
var (
	UnitWei       = big.NewInt(1)                                    // | 1 | 1 | wei | Wei
	UnitBabbage   = new(big.Int).Mul(UnitWei, big.NewInt(1000))      // | 1,000 | 10^3^ | Babbage | Kilowei or femtoether
	UnitLovelace  = new(big.Int).Mul(UnitBabbage, big.NewInt(1000))  // | 1,000,000 | 10^6^ | Lovelace | Megawei or picoether
	UnitShannon   = new(big.Int).Mul(UnitLovelace, big.NewInt(1000)) // | 1,000,000,000 | 10^9^ | Shannon | Gigawei or nanoether
	UnitSzabo     = new(big.Int).Mul(UnitShannon, big.NewInt(1000))  // | 1,000,000,000,000 | 10^12^ | Szabo | Microether or micro
	UnitFinney    = new(big.Int).Mul(UnitSzabo, big.NewInt(1000))    // | 1,000,000,000,000,000 | 10^15^ | Finney | Milliether or milli
	UnitEther     = new(big.Int).Mul(UnitFinney, big.NewInt(1000))   // | 1,000,000,000,000,000,000 | 10^18^ | Ether | Ether
	UnitGrand     = new(big.Int).Mul(UnitEther, big.NewInt(1000))    // | 1,000,000,000,000,000,000,000 | 10^21^ | Grand | Kiloether
	UnitMegaether = new(big.Int).Mul(UnitGrand, big.NewInt(1000))    // | 1,000,000,000,000,000,000,000,000 | 10^24^ | | Megaether
)

Functions

func Ecrecover

func Ecrecover(block *rpctypes.PolyBlock) ([]byte, error)

func GetGasPerBlock

func GetGasPerBlock(blocks []rpctypes.PolyBlock) []float64

func GetMeanBaseFeePerBlock added in v0.1.79

func GetMeanBaseFeePerBlock(blocks []rpctypes.PolyBlock) []float64

GetMeanBaseFeePerBlock calculates the mean base fee for each block in the provided slice of PolyBlock. It returns a slice of float64 values representing the base fee for each block.

func GetMeanBlockTime

func GetMeanBlockTime(blocks []rpctypes.PolyBlock) float64

func GetMeanGasPricePerBlock

func GetMeanGasPricePerBlock(blocks []rpctypes.PolyBlock) []float64

func GetSizePerBlock

func GetSizePerBlock(blocks []rpctypes.PolyBlock) []float64

func GetTxsPerBlock

func GetTxsPerBlock(blocks []rpctypes.PolyBlock) []float64

func GetUnclesPerBlock

func GetUnclesPerBlock(blocks []rpctypes.PolyBlock) []float64

func RawDataToASCII

func RawDataToASCII(data []byte) string

func TruncateHexString

func TruncateHexString(hexStr string, totalLength int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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