testutils

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: GPL-3.0, LGPL-3.0, LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuth

func NewAuth(t *testing.T, key *ecdsa.PrivateKey, chainID *big.Int) *bind.TransactOpts

NewAuth creates a new transactor with the given private key and chain ID.

func NewBackendWithPrecompile

func NewBackendWithPrecompile(
	t *testing.T,
	precompileCfg precompileconfig.Config,
	fundedAddrs []common.Address,
	opts ...func(*node.Config, *ethconfig.Config),
) *sim.Backend

NewBackendWithPrecompile creates a simulated backend with the given precompile enabled at genesis and funds the specified addresses with 1 ETH each. Additional options can be passed to configure the backend.

func WaitReceipt

func WaitReceipt(t *testing.T, b *sim.Backend, tx *types.Transaction) *types.Receipt

WaitReceipt commits the simulated backend and waits for the transaction receipt.

func WaitReceiptSuccessful

func WaitReceiptSuccessful(t *testing.T, b *sim.Backend, tx *types.Transaction) *types.Receipt

WaitReceiptSuccessful commits the backend, waits for the receipt, and asserts success.

Types

This section is empty.

Jump to

Keyboard shortcuts

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