common

package
v0.0.0-...-a934766 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultTimeout                  = 15 * time.Second
	ErrMaxPriorityFeePerGasNotFound = errors.New(
		"Method eth_maxPriorityFeePerGas not found",
	)
	FallbackGasTipCap = big.NewInt(1500000000)
)
View Source
var (
	ErrCannotGetPrivateKey = errors.New("invalid combination of private key or mnemonic + hdpath")
)

Functions

func DerivePrivateKey

func DerivePrivateKey(mnemonic, hdPath, password string) (*ecdsa.PrivateKey, error)

func GetConfiguredPrivateKey

func GetConfiguredPrivateKey(mnemonic, hdPath, privKeyStr, password string) (*ecdsa.PrivateKey, error)

func NewHSMTransactOpts

func NewHSMTransactOpts(ctx context.Context, hsmAPIName string, hsmAddress string, chainID *big.Int, hsmCreden string) (*bind.TransactOpts, error)

func ParseAddress

func ParseAddress(address string) (common.Address, error)

func ParsePrivateKeyStr

func ParsePrivateKeyStr(privKeyStr string) (*ecdsa.PrivateKey, error)

func ParseWalletPrivKeyAndContractAddr

func ParseWalletPrivKeyAndContractAddr(name string, mnemonic string, hdPath string, privKeyStr string, contractAddrStr string, password string) (*ecdsa.PrivateKey, common.Address, error)

func PrivateKeySignerFn

func PrivateKeySignerFn(key *ecdsa.PrivateKey, chainID *big.Int) bind.SignerFn

func WeiToEth64

func WeiToEth64(wei *big.Int) float64

Types

This section is empty.

Jump to

Keyboard shortcuts

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