castx

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DivByDecimal

func DivByDecimal(v, d any) (*decimal.Decimal, error)

DivByDecimal return x / 10^d

func EtherToGwei

func EtherToGwei(amount any) (*decimal.Decimal, error)

func EtherToWei

func EtherToWei(amount any) (*decimal.Decimal, error)

func GasFee

func GasFee(gasLimit, gasPrice any) (*decimal.Decimal, error)

GasFee in wei

func GasFeeInEth

func GasFeeInEth(gasLimit, gasPrice any) (*decimal.Decimal, error)

func GasFeeInGwei

func GasFeeInGwei(gasLimit, gasPrice any) (*decimal.Decimal, error)

func GasFeeInWei

func GasFeeInWei(gasLimit, gasPrice any) (*decimal.Decimal, error)

func GweiToEther

func GweiToEther(amount any) (*decimal.Decimal, error)

func GweiToWei

func GweiToWei(amount any) (*decimal.Decimal, error)

func MulByDecimal

func MulByDecimal(v, d any) (*decimal.Decimal, error)

MulByDecimal return x * 10^d

func MustEtherToGwei

func MustEtherToGwei(amount any) *decimal.Decimal

func MustEtherToWei

func MustEtherToWei(amount any) *decimal.Decimal

func MustGweiToEther

func MustGweiToEther(amount any) *decimal.Decimal

func MustGweiToWei

func MustGweiToWei(amount any) *decimal.Decimal

func MustToAddress

func MustToAddress(iaddress any) *common.Address

func MustWeiToEther

func MustWeiToEther(amount any) *decimal.Decimal

func MustWeiToGwei

func MustWeiToGwei(amount any) *decimal.Decimal

func PrettyGasInfo

func PrettyGasInfo(gasLimit, gasPrice any) (*types.GasInfo, error)

func ToAddress

func ToAddress(iaddress any) (*common.Address, error)

func ToDecimal

func ToDecimal(x any) (*decimal.Decimal, error)

func WeiToEther

func WeiToEther(amount any) (*decimal.Decimal, error)

func WeiToGwei

func WeiToGwei(amount any) (*decimal.Decimal, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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