types

package
v0.0.0-...-b8c38bb Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName defines the module name
	ModuleName = "session"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_session"
)
View Source
const (
	// BlockHashKeyPrefix is the prefix to retrieve all BlockHash
	BlockHashKeyPrefix = "BlockHash/height/"
)

Variables

View Source
var (
	ErrSessionInvalidSigner          = sdkerrors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message")
	ErrSessionHydration              = sdkerrors.Register(ModuleName, 1101, "error during session hydration")
	ErrSessionAppNotFound            = sdkerrors.Register(ModuleName, 1102, "application for session not found not found ")
	ErrSessionAppNotStakedForService = sdkerrors.Register(ModuleName, 1103, "application in session not staked for requested service")
	ErrSessionSuppliersNotFound      = sdkerrors.Register(ModuleName, 1104, "no suppliers not found for session")
	ErrSessionInvalidAppAddress      = sdkerrors.Register(ModuleName, 1105, "invalid application address for session")
	ErrSessionInvalidService         = sdkerrors.Register(ModuleName, 1106, "invalid service in session")
	ErrSessionInvalidBlockHeight     = sdkerrors.Register(ModuleName, 1107, "invalid block height for session")
	ErrSessionInvalidSessionId       = sdkerrors.Register(ModuleName, 1108, "invalid sessionId")
)

x/session module sentinel errors

View Source
var ParamsKey = []byte("p_session")

Functions

func BlockHashKey

func BlockHashKey(blockHeight int64) []byte

BlockHashKey returns the store key to retrieve a BlockHash from the index fields

func KeyPrefix

func KeyPrefix(p string) []byte

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable the param key table for launch module

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx context.Context, addr sdk.AccAddress) sdk.AccountI // only used for simulation
}

AccountKeeper defines the expected account keeper used for simulations (noalias)

type ApplicationKeeper

type ApplicationKeeper interface {
	GetApplication(ctx context.Context, address string) (app apptypes.Application, found bool)
}

ApplicationKeeper defines the expected application keeper to retrieve applications

type BankKeeper

type BankKeeper interface {
	SpendableCoins(context.Context, sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected interface needed to retrieve account balances.

type SupplierKeeper

type SupplierKeeper interface {
	GetAllSuppliers(ctx context.Context) (suppliers []sharedtypes.Supplier)
}

Jump to

Keyboard shortcuts

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