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 = "application"

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

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_application"
)
View Source
const (
	// ApplicationKeyPrefix is the prefix to retrieve all Application
	ApplicationKeyPrefix = "Application/address/"
)

Variables

View Source
var (
	ErrAppInvalidSigner               = sdkerrors.Register(ModuleName, 1100, "expected gov account as only signer for proposal message")
	ErrAppInvalidStake                = sdkerrors.Register(ModuleName, 1101, "invalid application stake")
	ErrAppInvalidAddress              = sdkerrors.Register(ModuleName, 1102, "invalid application address")
	ErrAppUnauthorized                = sdkerrors.Register(ModuleName, 1103, "unauthorized application signer")
	ErrAppNotFound                    = sdkerrors.Register(ModuleName, 1104, "application not found")
	ErrAppInvalidServiceConfigs       = sdkerrors.Register(ModuleName, 1106, "invalid service configs")
	ErrAppGatewayNotFound             = sdkerrors.Register(ModuleName, 1107, "gateway not found")
	ErrAppInvalidGatewayAddress       = sdkerrors.Register(ModuleName, 1108, "invalid gateway address")
	ErrAppAlreadyDelegated            = sdkerrors.Register(ModuleName, 1109, "application already delegated to gateway")
	ErrAppMaxDelegatedGateways        = sdkerrors.Register(ModuleName, 1110, "maximum number of delegated gateways reached")
	ErrAppInvalidMaxDelegatedGateways = sdkerrors.Register(ModuleName, 1111, "invalid MaxDelegatedGateways parameter")
	ErrAppNotDelegated                = sdkerrors.Register(ModuleName, 1112, "application not delegated to gateway")
)

x/application module sentinel errors

View Source
var (
	KeyMaxDelegatedGateways = []byte("MaxDelegatedGateways")
	// TODO: Determine the default value
	DefaultMaxDelegatedGateways uint64 = 7
)
View Source
var ParamsKey = []byte("p_application")

Functions

func ApplicationKey

func ApplicationKey(appAddr string) []byte

ApplicationKey returns the store key to retrieve a Application 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(context.Context, sdk.AccAddress) sdk.AccountI // only used for simulation

}

AccountKeeper defines the expected interface for the Account module.

type BankKeeper

type BankKeeper interface {
	// We use the bankkeeper SendXXX instead of DelegateXX methods
	// because their purpose is to "escrow" funds on behalf of an account rather
	// than "delegate" funds from one account to another which is more closely
	// linked to staking.
	SendCoinsFromAccountToModule(ctx context.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
}

BankKeeper defines the expected interface for the Bank module.

type GatewayKeeper

type GatewayKeeper interface {
	GetGateway(ctx context.Context, addr string) (gatewaytypes.Gateway, bool)
}

GatewayKeeper defines the expected interface needed to retrieve gateway information.

Jump to

Keyboard shortcuts

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