test

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TestKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
)

Functions

func NewAuth

func NewAuth(ctx context.Context) (*bind.TransactOpts, error)

func NewTestChain

func NewTestChain(t testing.TB, auth *bind.TransactOpts) *ethclient.Client

Types

type SimulatedBackend

type SimulatedBackend struct {
	*backends.SimulatedBackend
}

GETH's simulated backend is missing a few methods from the ethclient that we use. This backend augments the simulated backend with those methods to simplify testing.

func NewSimulatedBackend

func NewSimulatedBackend(t testing.TB, auth *bind.TransactOpts) *SimulatedBackend

func (*SimulatedBackend) BlockNumber

func (b *SimulatedBackend) BlockNumber(ctx context.Context) (uint64, error)

func (*SimulatedBackend) NetworkID

func (b *SimulatedBackend) NetworkID(ctx context.Context) (*big.Int, error)

Jump to

Keyboard shortcuts

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