mocks

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeTestEncodingConfig

func MakeTestEncodingConfig(prefix string, modules ...module.AppModuleBasic) moduletestutil.TestEncodingConfig

MakeTestEncodingConfig is a modified testutil.MakeTestEncodingConfig that sets a custom Bech32 prefix in the interface registry.

func NewVaultKeeper

func NewVaultKeeper(
	t testing.TB,
) (sdk.Context, *keeper.Keeper)

NewVaultKeeper returns an instance of the Keeper with all dependencies mocked.

Types

type MockAuthKeeper

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

func NewMockAuthKeeper

func NewMockAuthKeeper() *MockAuthKeeper

func (*MockAuthKeeper) GetAccount

func (m *MockAuthKeeper) GetAccount(_ context.Context, addr sdk.AccAddress) sdk.AccountI

func (*MockAuthKeeper) GetAllAccounts

func (m *MockAuthKeeper) GetAllAccounts(_ context.Context) []sdk.AccountI

func (*MockAuthKeeper) GetModuleAddress

func (m *MockAuthKeeper) GetModuleAddress(moduleName string) sdk.AccAddress

func (*MockAuthKeeper) HasAccount

func (m *MockAuthKeeper) HasAccount(_ context.Context, addr sdk.AccAddress) bool

func (*MockAuthKeeper) NewAccount

func (m *MockAuthKeeper) NewAccount(_ context.Context, acc sdk.AccountI) sdk.AccountI

NewAccount assigns an account number if needed and returns the (possibly updated) account.

func (*MockAuthKeeper) NewAccountWithAddress

func (m *MockAuthKeeper) NewAccountWithAddress(_ context.Context, addr sdk.AccAddress) sdk.AccountI

func (*MockAuthKeeper) SetAccount

func (m *MockAuthKeeper) SetAccount(_ context.Context, acc sdk.AccountI)

type MockMetadataKeeper added in v1.2.3

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

MockMetadataKeeper is an in-memory stand-in for the metadata keeper, holding the scopes that a value-owner NAV denom (nft/<scope-id>) may resolve to. An empty mock reports every scope as missing, which is what the NAV denom check expects for an unknown scope.

func NewMockMetadataKeeper added in v1.2.3

func NewMockMetadataKeeper() *MockMetadataKeeper

NewMockMetadataKeeper returns a MockMetadataKeeper holding no scopes.

func (*MockMetadataKeeper) GetScope added in v1.2.3

func (*MockMetadataKeeper) SetScope added in v1.2.3

func (m *MockMetadataKeeper) SetScope(scope metadatatypes.Scope)

SetScope records a scope so lookups for its id, and for the value-owner denom derived from it, resolve as existing.

Jump to

Keyboard shortcuts

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