helpers

package
v0.5.0-beta4 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequireProcessorUpdated

func RequireProcessorUpdated(t *testing.T, processor Processorer, targetBlock uint64)

Types

type ClientRenamed

type ClientRenamed simulated.Client

type EthTxManagerMock

type EthTxManagerMock struct {
	mock.Mock
}

EthTxManagerMock is an autogenerated mock type for the EthTxManager type

func NewEthTxManMock

func NewEthTxManMock(
	t *testing.T,
	client *simulated.Backend,
	auth *bind.TransactOpts,
) *EthTxManagerMock

func NewEthTxManagerMock

func NewEthTxManagerMock(t interface {
	mock.TestingT
	Cleanup(func())
}) *EthTxManagerMock

NewEthTxManagerMock creates a new instance of EthTxManagerMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*EthTxManagerMock) Add

func (_m *EthTxManagerMock) Add(ctx context.Context, to *common.Address, value *big.Int, data []byte, gasOffset uint64, sidecar *types.BlobTxSidecar) (common.Hash, error)

Add provides a mock function with given fields: ctx, to, value, data, gasOffset, sidecar

func (*EthTxManagerMock) Remove

func (_m *EthTxManagerMock) Remove(ctx context.Context, id common.Hash) error

Remove provides a mock function with given fields: ctx, id

func (*EthTxManagerMock) Result

Result provides a mock function with given fields: ctx, id

func (*EthTxManagerMock) ResultsByStatus

ResultsByStatus provides a mock function with given fields: ctx, statuses

type Processorer

type Processorer interface {
	GetLastProcessedBlock(ctx context.Context) (uint64, error)
}

type SimulatedBackendSetup added in v0.3.0

type SimulatedBackendSetup struct {
	UserAuth                   *bind.TransactOpts
	DeployerAuth               *bind.TransactOpts
	EBZkevmBridgeAddr          common.Address
	EBZkevmBridgeContract      *polygonzkevmbridgev2.Polygonzkevmbridgev2
	EBZkevmBridgeProxyAddr     common.Address
	EBZkevmBridgeProxyContract *polygonzkevmbridgev2.Polygonzkevmbridgev2
}

SimulatedBackendSetup defines the setup for a simulated backend.

func SimulatedBackend added in v0.3.0

func SimulatedBackend(
	t *testing.T,
	balances map[common.Address]types.Account,
	ebZkevmBridgeNetwork uint32,
) (*simulated.Backend, *SimulatedBackendSetup)

SimulatedBackend creates a simulated backend with two accounts: user and deployer.

type TestClient

type TestClient struct {
	ClientRenamed
}

func (TestClient) Client

func (tc TestClient) Client() *rpc.Client

Jump to

Keyboard shortcuts

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