common

package
v0.15.45 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: GPL-3.0, LGPL-3.0 Imports: 3 Imported by: 260

Documentation

Overview

Package common provides formatting utilities

Package common provides wrapper types for go-ethereum's common types

Index

Constants

View Source
const (
	HashLength    = common.HashLength
	AddressLength = common.AddressLength
)

Re-export constants

Variables

View Source
var (
	Big0   = common.Big0
	Big1   = common.Big1
	Big2   = common.Big2
	Big3   = common.Big3
	Big32  = common.Big32
	Big256 = common.Big256
	Big257 = common.Big257
)

Re-export common big integers

View Source
var (
	BytesToHash         = common.BytesToHash
	BigToHash           = common.BigToHash
	HexToHash           = common.HexToHash
	BytesToAddress      = common.BytesToAddress
	BigToAddress        = common.BigToAddress
	HexToAddress        = common.HexToAddress
	IsHexAddress        = common.IsHexAddress
	Hex2Bytes           = common.Hex2Bytes
	FromHex             = common.FromHex
	CopyBytes           = common.CopyBytes
	LeftPadBytes        = common.LeftPadBytes
	RightPadBytes       = common.RightPadBytes
	TrimLeftZeroes      = common.TrimLeftZeroes
	TrimRightZeroes     = common.TrimRightZeroes
	Bytes2Hex           = common.Bytes2Hex
	NewMixedcaseAddress = common.NewMixedcaseAddress
)

Re-export functions

Functions

func BigMax added in v0.15.4

func BigMax(x, y *big.Int) *big.Int

BigMax returns the larger of x or y.

func BigMin added in v0.15.4

func BigMin(x, y *big.Int) *big.Int

BigMin returns the smaller of x or y.

func IsHex added in v0.15.5

func IsHex(str string) bool

IsHex validates whether each byte is valid hexadecimal string.

Types

type Address

type Address = common.Address

Re-export types

type AddressEIP55

type AddressEIP55 = common.Address // EIP-55 checksum address alias

Re-export types

type Hash

type Hash = common.Hash

Re-export types

type MixedcaseAddress

type MixedcaseAddress = common.MixedcaseAddress

Re-export types

type PrettyAge

type PrettyAge = common.PrettyAge

PrettyAge is a wrapper for time.Time for pretty printing

type PrettyBytes

type PrettyBytes = common.PrettyBytes

PrettyBytes is a wrapper for byte sizes for pretty printing

type PrettyDuration

type PrettyDuration = common.PrettyDuration

PrettyDuration is a wrapper for time.Duration for pretty printing

type StorageSize

type StorageSize = common.StorageSize

Re-export types

type U2560

type U2560 = uint256.Int

U2560 represents a 256-bit unsigned integer

type UnprefixedAddress

type UnprefixedAddress = common.UnprefixedAddress

Re-export types

type UnprefixedHash

type UnprefixedHash = common.UnprefixedHash

Re-export types

Directories

Path Synopsis
Package bitutil provides wrapper types for go-ethereum's bitutil implementation
Package bitutil provides wrapper types for go-ethereum's bitutil implementation
Package compiler provides compatibility layer for removed compiler functionality
Package compiler provides compatibility layer for removed compiler functionality
Package hexutil provides wrapper types for go-ethereum's hexutil implementation
Package hexutil provides wrapper types for go-ethereum's hexutil implementation
Package lru provides wrapper types for go-ethereum's lru implementation
Package lru provides wrapper types for go-ethereum's lru implementation
Package math provides wrapper types for go-ethereum's math implementation
Package math provides wrapper types for go-ethereum's math implementation
Package prque provides wrapper types for go-ethereum's prque implementation
Package prque provides wrapper types for go-ethereum's prque implementation

Jump to

Keyboard shortcuts

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