types

package module
v0.0.0-...-10d2874 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BlackHoleAddress = Address("0x0000000000000000000000000000000000000000")

BlackHoleAddress is 0x0000000000000000000000000000000000000000

View Source
var ZeroBytes32 = Bytes32("0x0000000000000000000000000000000000000000000000000000000000000000")

ZeroBytes32 is 0x0000000000000000000000000000000000000000000000000000000000000000

Functions

func IsHexAddress

func IsHexAddress(s string) bool

func IsHexByte32

func IsHexByte32(s string) bool

Types

type Address

type Address string

func ParseAddress

func ParseAddress(address string) (Address, error)

func ParseAddressMust

func ParseAddressMust(address string) Address

func (Address) Address

func (a Address) Address() common.Address

func (Address) IsBlackHole

func (a Address) IsBlackHole() bool

func (Address) String

func (a Address) String() string

type Bytes32

type Bytes32 string

func ParseBytes32

func ParseBytes32(bytes32 string) (Bytes32, error)

func ParseBytes32Must

func ParseBytes32Must(bytes32 string) Bytes32

func (Bytes32) Bytes32

func (b Bytes32) Bytes32() [32]byte

func (Bytes32) IsZero

func (b Bytes32) IsZero() bool

func (Bytes32) String

func (b Bytes32) String() string

type Wei

type Wei big.Int

func NewWei

func NewWei(wei *big.Int) *Wei

func NewWeiFromEther

func NewWeiFromEther(ether float64) *Wei

func NewWeiFromGwei

func NewWeiFromGwei(gwei float64) *Wei

func NewWeiFromString

func NewWeiFromString(wei string) *Wei

func (Wei) Decimal

func (w Wei) Decimal() decimal.Decimal

func (Wei) String

func (w Wei) String() string

func (Wei) ToEther

func (w Wei) ToEther() float64

func (Wei) ToGwei

func (w Wei) ToGwei() float64

Jump to

Keyboard shortcuts

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