Versions in this module Expand all Collapse all v1 v1.20.0 Jul 20, 2024 Changes in this version + const AddressLength + const HashLength + var Big0 = big.NewInt(0) + var Big1 = big.NewInt(1) + var Big2 = big.NewInt(2) + var Big256 = big.NewInt(256) + var Big257 = big.NewInt(257) + var Big3 = big.NewInt(3) + var Big32 = big.NewInt(32) + var MaxAddress = HexToAddress("0xffffffffffffffffffffffffffffffffffffffff") + var MaxHash = HexToHash("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff") + var U2560 = uint256.NewInt(0) + func AbsolutePath(datadir string, filename string) string + func Bytes2Hex(d []byte) string + func CopyBytes(b []byte) (copiedBytes []byte) + func FileExist(filePath string) bool + func FromHex(s string) []byte + func Hex2Bytes(str string) []byte + func Hex2BytesFixed(str string, flen int) []byte + func IsHexAddress(s string) bool + func LeftPadBytes(slice []byte, l int) []byte + func LoadJSON(file string, val interface{}) error + func MaxInt[T Ordered](value, floor T) T + func MinInt[T Ordered](value, ceiling T) T + func ParseHexOrString(str string) ([]byte, error) + func PrintDeprecationWarning(str string) + func Report(extra ...interface{}) + func RightPadBytes(slice []byte, l int) []byte + func SaturatingUAdd[T Unsigned](a, b T) T + func TrimLeftZeroes(s []byte) []byte + func TrimRightZeroes(s []byte) []byte + type Address [AddressLength]byte + func BigToAddress(b *big.Int) Address + func BytesToAddress(b []byte) Address + func HexToAddress(s string) Address + func (a *Address) Scan(src interface{}) error + func (a *Address) SetBytes(b []byte) + func (a *Address) UnmarshalGraphQL(input interface{}) error + func (a *Address) UnmarshalJSON(input []byte) error + func (a *Address) UnmarshalText(input []byte) error + func (a Address) Big() *big.Int + func (a Address) Bytes() []byte + func (a Address) Cmp(other Address) int + func (a Address) Format(s fmt.State, c rune) + func (a Address) Hex() string + func (a Address) ImplementsGraphQLType(name string) bool + func (a Address) MarshalText() ([]byte, error) + func (a Address) String() string + func (a Address) Value() (driver.Value, error) + type AddressEIP55 Address + func (addr AddressEIP55) MarshalJSON() ([]byte, error) + func (addr AddressEIP55) String() string + type Decimal uint64 + func (d *Decimal) UnmarshalJSON(input []byte) error + type Float interface + type Hash [HashLength]byte + func BigToHash(b *big.Int) Hash + func BytesToHash(b []byte) Hash + func HexToHash(s string) Hash + func (Hash) ImplementsGraphQLType(name string) bool + func (h *Hash) Scan(src interface{}) error + func (h *Hash) SetBytes(b []byte) + func (h *Hash) UnmarshalGraphQL(input interface{}) error + func (h *Hash) UnmarshalJSON(input []byte) error + func (h *Hash) UnmarshalText(input []byte) error + func (h Hash) Big() *big.Int + func (h Hash) Bytes() []byte + func (h Hash) Cmp(other Hash) int + func (h Hash) Format(s fmt.State, c rune) + func (h Hash) Generate(rand *rand.Rand, size int) reflect.Value + func (h Hash) Hex() string + func (h Hash) MarshalText() ([]byte, error) + func (h Hash) String() string + func (h Hash) TerminalString() string + func (h Hash) Value() (driver.Value, error) + type Integer interface + type MixedcaseAddress struct + func NewMixedcaseAddress(addr Address) MixedcaseAddress + func NewMixedcaseAddressFromString(hexaddr string) (*MixedcaseAddress, error) + func (ma *MixedcaseAddress) Address() Address + func (ma *MixedcaseAddress) Original() string + func (ma *MixedcaseAddress) String() string + func (ma *MixedcaseAddress) UnmarshalJSON(input []byte) error + func (ma *MixedcaseAddress) ValidChecksum() bool + func (ma MixedcaseAddress) MarshalJSON() ([]byte, error) + type Ordered interface + type PrettyAge time.Time + func (t PrettyAge) String() string + type PrettyDuration time.Duration + func (d PrettyDuration) String() string + type Signed interface + type StorageSize float64 + func (s StorageSize) String() string + func (s StorageSize) TerminalString() string + type UnprefixedAddress Address + func (a *UnprefixedAddress) UnmarshalText(input []byte) error + func (a UnprefixedAddress) MarshalText() ([]byte, error) + type UnprefixedHash Hash + func (h *UnprefixedHash) UnmarshalText(input []byte) error + func (h UnprefixedHash) MarshalText() ([]byte, error) + type Unsigned interface