eth

package
v0.0.0-...-5c7cbbe Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSmartContract

func IsSmartContract(address string, client *ethclient.Client) (bool, error)

func IsSmartContractCtx

func IsSmartContractCtx(ctx context.Context, address string, client *ethclient.Client) (bool, error)

func IsValidAddress

func IsValidAddress(address string) bool

Types

type Eth

type Eth struct {
	*types.CoinValue[ethDefinition]
}

func NewEth

func NewEth(ether decimal.Decimal) *Eth

func NewEthFromGWeil

func NewEthFromGWeil(gwei decimal.Decimal) *Eth

func NewEthFromKWei

func NewEthFromKWei(kwei decimal.Decimal) *Eth

func NewEthFromMWei

func NewEthFromMWei(mwei decimal.Decimal) *Eth

func NewEthFromWei

func NewEthFromWei(wei *big.Int) *Eth

func (Eth) Eth

func (e Eth) Eth() decimal.Decimal

Eth returns the value of the Eth type in Ether

func (Eth) GWei

func (e Eth) GWei() decimal.Decimal

GWei returns the value of the Eth type in GWei.

func (Eth) KWei

func (e Eth) KWei() decimal.Decimal

KWei returns the value of the Eth type in KWei.

func (Eth) MWei

func (e Eth) MWei() decimal.Decimal

MWei returns the value of the Eth type in MWei.

func (Eth) Wei

func (e Eth) Wei() *big.Int

Wei returns the value of the Eth type in Wei.

Jump to

Keyboard shortcuts

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