ganache

package
v0.0.0-...-6d19cb1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	PrivateKey *ecdsa.PrivateKey
	Amount     *big.Int
}

func (*Account) Address

func (a *Account) Address() common.Address

type Ganache

type Ganache struct {
	Accounts []Account
	Cmd      *exec.Cmd
}

func StartGanacheWithPrefundedAccounts

func StartGanacheWithPrefundedAccounts(cfg GanacheConfig) (ganache *Ganache, err error)

func (*Ganache) Shutdown

func (g *Ganache) Shutdown() error

type GanacheConfig

type GanacheConfig struct {
	Cmd           string
	Host          string
	Port          uint
	BlockTime     time.Duration
	Funding       []KeyWithBalance
	StartupTime   time.Duration
	ChainID       *big.Int
	PrintToStdOut bool
}

func (GanacheConfig) NodeURL

func (cfg GanacheConfig) NodeURL() string

type KeyWithBalance

type KeyWithBalance struct {
	PrivateKey string
	BalanceEth uint
}

Jump to

Keyboard shortcuts

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