tests

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTestKeyByIndex

func GetTestKeyByIndex(t *testing.T, index int) *ecdsa.PrivateKey

GetTestKeyByIndex returns the ganache test key allocated to a package by index

func MineTransaction

func MineTransaction(t *testing.T, ec bind.DeployBackend, tx *types.Transaction) *types.Receipt

MineTransaction blocks until the transaction is included in a block and returns the receipt. Errors are checked including the status.

func NewEthClient

func NewEthClient(t *testing.T) (*ethclient.Client, *big.Int)

NewEthClient returns a connection to the local ganache instance. The connection is automatically closed when the test completes.

func NewTXOpts

func NewTXOpts(t *testing.T, ec *ethclient.Client, privkey *ecdsa.PrivateKey) *bind.TransactOpts

NewTXOpts creates a new *bind.TransactOpts for tests

Types

This section is empty.

Jump to

Keyboard shortcuts

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