Documentation ¶
Overview ¶
Package mocks mocks address, clients, etc for evm chains TODO: rename this package, as it's ignored by codecov. alternatively, rename all the mockery packages
Index ¶
- func GetMockLogs(tb testing.TB, eventCount int) (logs []types.Log)
- func GetMockTxes(ctx context.Context, t *testing.T, count int, txType uint8) (txes []*types.Transaction)
- func MockAccount(tb testing.TB) *keystore.Key
- func MockAddress() common.Address
- func MockBlocksOnBackend(ctx context.Context, t *testing.T, ...) (blocks []*types.Block)
- func MockTx(ctx context.Context, t *testing.T, ...) *types.Transaction
- func NewMockHash(tb testing.TB) common.Hash
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMockLogs ¶ added in v0.0.5
GetMockLogs gets eventCount mock events.
func GetMockTxes ¶
func GetMockTxes(ctx context.Context, t *testing.T, count int, txType uint8) (txes []*types.Transaction)
GetMockTxes gets count txes from a new mock account. These are real txes ona simulated chain useful for testing db interactions/adding noise to listeners.
func MockAddress ¶
MockAddress generates a random ethereum address for testing.
func MockBlocksOnBackend ¶
func MockBlocksOnBackend(ctx context.Context, t *testing.T, simulatedBackend backends.SimulatedTestBackend, count int) (blocks []*types.Block)
MockBlocksOnBackend mocks count blocks on a backend.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.