testutils

package
v6.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeeperTestData

type KeeperTestData struct {
	storetesting.BaseKeeperTestData

	StoreService corestoretypes.KVStoreService

	PoolsKeeper     *poolskeeper.Keeper
	OperatorsKeeper *operatorskeeper.Keeper
	ServicesKeeper  *serviceskeeper.Keeper
	MarketMapKeeper *marketmapkeeper.Keeper
	OracleKeeper    *oraclekeeper.Keeper
	AssetsKeeper    *assetskeeper.Keeper
	Keeper          *keeper.Keeper
}

func NewKeeperTestData

func NewKeeperTestData(t *testing.T) KeeperTestData

type MockHooks

type MockHooks struct {
	CalledMap map[string]bool
}

MockHooks is a mock implementation of the RestakingHooks interface

func NewMockHooks

func NewMockHooks() *MockHooks

NewMockHooks returns a new MockHooks

func (MockHooks) AfterOperatorDelegationModified

func (m MockHooks) AfterOperatorDelegationModified(context.Context, uint32, string) error

AfterOperatorDelegationModified implements restakingtypes.Hooks

func (MockHooks) AfterPoolDelegationModified

func (m MockHooks) AfterPoolDelegationModified(context.Context, uint32, string) error

AfterPoolDelegationModified implements restakingtypes.Hooks

func (MockHooks) AfterServiceDelegationModified

func (m MockHooks) AfterServiceDelegationModified(context.Context, uint32, string) error

AfterServiceDelegationModified implements restakingtypes.Hooks

func (MockHooks) AfterUnbondingInitiated

func (m MockHooks) AfterUnbondingInitiated(ctx context.Context, unbondingDelegationID uint64) error

AfterUnbondingInitiated implements restakingtypes.Hooks

func (MockHooks) AfterUserPreferencesModified

func (m MockHooks) AfterUserPreferencesModified(ctx context.Context, userAddress string, oldPreferences, newPreferences types.UserPreferences) error

AfterUserPreferencesModified implements restakingtypes.Hooks

func (MockHooks) BeforeOperatorDelegationCreated

func (m MockHooks) BeforeOperatorDelegationCreated(context.Context, uint32, string) error

BeforeOperatorDelegationCreated implements restakingtypes.Hooks

func (MockHooks) BeforeOperatorDelegationRemoved

func (m MockHooks) BeforeOperatorDelegationRemoved(ctx context.Context, operatorID uint32, delegator string) error

BeforeOperatorDelegationRemoved implements restakingtypes.Hooks

func (MockHooks) BeforeOperatorDelegationSharesModified

func (m MockHooks) BeforeOperatorDelegationSharesModified(context.Context, uint32, string) error

BeforeOperatorDelegationSharesModified implements restakingtypes.Hooks

func (MockHooks) BeforePoolDelegationCreated

func (m MockHooks) BeforePoolDelegationCreated(context.Context, uint32, string) error

BeforePoolDelegationCreated implements restakingtypes.Hooks

func (MockHooks) BeforePoolDelegationRemoved

func (m MockHooks) BeforePoolDelegationRemoved(ctx context.Context, poolID uint32, delegator string) error

BeforePoolDelegationRemoved implements restakingtypes.Hooks

func (MockHooks) BeforePoolDelegationSharesModified

func (m MockHooks) BeforePoolDelegationSharesModified(context.Context, uint32, string) error

BeforePoolDelegationSharesModified implements restakingtypes.Hooks

func (MockHooks) BeforeServiceDelegationCreated

func (m MockHooks) BeforeServiceDelegationCreated(context.Context, uint32, string) error

BeforeServiceDelegationCreated implements restakingtypes.Hooks

func (MockHooks) BeforeServiceDelegationRemoved

func (m MockHooks) BeforeServiceDelegationRemoved(ctx context.Context, serviceID uint32, delegator string) error

BeforeServiceDelegationRemoved implements restakingtypes.Hooks

func (MockHooks) BeforeServiceDelegationSharesModified

func (m MockHooks) BeforeServiceDelegationSharesModified(context.Context, uint32, string) error

BeforeServiceDelegationSharesModified implements restakingtypes.Hooks

Jump to

Keyboard shortcuts

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