testing

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomBytes

func RandomBytes(t testing.TB, size int) []byte

func RandomCID

func RandomCID(t testing.TB) cid.Cid

Types

type FakeChainClient

type FakeChainClient struct {
	// contains filtered or unexported fields
}

func NewFakeChainClient

func NewFakeChainClient(t testing.TB) *FakeChainClient

func (*FakeChainClient) AdvanceByHeight

func (c *FakeChainClient) AdvanceByHeight(epochs int64) abi.ChainEpoch

AdvanceHeight advances the chain by the specified number of epochs

func (*FakeChainClient) AdvanceChain

func (c *FakeChainClient) AdvanceChain() abi.ChainEpoch

func (*FakeChainClient) ChainHead

func (c *FakeChainClient) ChainHead(ctx context.Context) (*types.TipSet, error)

func (*FakeChainClient) ChainNotify

func (c *FakeChainClient) ChainNotify(ctx context.Context) (<-chan []*api.HeadChange, error)

func (*FakeChainClient) CurrentHeight

func (c *FakeChainClient) CurrentHeight() abi.ChainEpoch

func (*FakeChainClient) StateGetRandomnessDigestFromBeacon

func (c *FakeChainClient) StateGetRandomnessDigestFromBeacon(ctx context.Context, randEpoch abi.ChainEpoch, tsk types.TipSetKey) (abi.Randomness, error)

type MockContractBackendWrapper

type MockContractBackendWrapper struct {
	*mocks.MockContractBackend
}

MockContractBackendWrapper wraps MockContractBackend but excludes the conflicting method

type MockEthClient

MockEthClient combines all mock interfaces for EthClient

func NewMockEthClient

func NewMockEthClient(ctrl *gomock.Controller) *MockEthClient

NewMockEthClient creates a new mock instance that implements all required interfaces

func (*MockEthClient) SuggestGasTipCap

func (m *MockEthClient) SuggestGasTipCap(ctx context.Context) (*big.Int, error)

SuggestGasTipCap delegates to MockSenderETHClient's implementation This overrides the method from MockContractBackend to avoid the conflict

Jump to

Keyboard shortcuts

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