local_blockchain

package
v0.0.53 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBundler

func NewBundler(ctx context.Context, t *testing.T, node *EthNode, entryPoint common.Address) *url.URL

func SendNative added in v0.0.40

func SendNative(ctx context.Context, node *EthNode, from, to Account, fundAmount *big.Int) error

func WaitMined added in v0.0.40

func WaitMined(ctx context.Context, node *EthNode, tx *types.Transaction) (*types.Receipt, error)

Types

type Account

type Account struct {
	PrivateKey   *ecdsa.PrivateKey
	Address      common.Address
	TransactOpts *bind.TransactOpts
}

func NewAccount

func NewAccount(ctx context.Context, node *EthNode) (Account, error)

func NewAccountWithBalance

func NewAccountWithBalance(
	ctx context.Context,
	balance *big.Int,
	node *EthNode,
) (Account, error)

type BundlerNode

type BundlerNode struct {
	Container    testcontainers.Container
	ContainerURL *url.URL
}

type Contracts

type Contracts struct {
	EntryPoint          common.Address
	ECDSAValidator      common.Address
	SessionKeyValidator common.Address
	Logic               common.Address
	Factory             common.Address
	Paymaster           common.Address
}

func SetupContracts

func SetupContracts(ctx context.Context, t *testing.T, node *EthNode) Contracts

type EthNode

type EthNode struct {
	Container    testcontainers.Container
	Client       *ethclient.Client
	LocalURL     url.URL
	ContainerURL url.URL
}

func NewEthNode

func NewEthNode(ctx context.Context, t *testing.T) *EthNode

Jump to

Keyboard shortcuts

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