local_blockchain

package
v0.0.110 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: GPL-3.0 Imports: 30 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,
	amount *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
	// contains filtered or unexported fields
}

func NewEthNode

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

func (*EthNode) FundAccount added in v0.0.54

func (n *EthNode) FundAccount(ctx context.Context, to Account, amount *big.Int) error

type MockedClient added in v0.0.54

type MockedClient struct {
	ethclient.Client
	// contains filtered or unexported fields
}

func (*MockedClient) SendTransaction added in v0.0.54

func (m *MockedClient) SendTransaction(ctx context.Context, tx *types.Transaction) error

Jump to

Keyboard shortcuts

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