app

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: Apache-2.0 Imports: 99 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountAddressPrefix = "nova"
	Name                 = "nova"
)
View Source
const (
	// DefaultNovaInstanceCost is initially set the same as in wasmd
	DefaultNovaInstanceCost uint64 = 60_000
	// DefaultNovaCompileCost set to a large number for testing
	DefaultNovaCompileCost uint64 = 100
)

Variables

View Source
var (
	// WasmProposalsEnabled enables all x/wasm proposals when it's value is "true"
	// and EnableSpecificWasmProposals is empty. Otherwise, all x/wasm proposals
	// are disabled.
	WasmProposalsEnabled = "true"

	EnableSpecificWasmProposals = ""
)
View Source
var (
	// DefaultNodeHome default home directories for the application daemon
	DefaultNodeHome string

	// ModuleBasics defines the module BasicManager is in charge of setting up basic,
	// non-dependant module elements, such as codec registration
	// and genesis verification.
	ModuleBasics = module.NewBasicManager(
		keepers.AppModuleBasic...,
	)
)

Functions

func FundAccount

func FundAccount(bankKeeper bankkeeper.Keeper, ctx sdk.Context, addr sdk.AccAddress, amounts sdk.Coins) error

func GetEncodingConfig

func GetEncodingConfig() cosmoscmd.EncodingConfig

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

func GetOrderBeginBlocker

func GetOrderBeginBlocker() []string

func GetOrderEndBlocker

func GetOrderEndBlocker() []string

func GetOrderInitGenesis

func GetOrderInitGenesis() []string

func GetWasmEnabledProposals

func GetWasmEnabledProposals() []wasm.ProposalType

func NewAnteHandler

func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)

func NewNovaApp

func NewNovaApp(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	skipUpgradeHeights map[int64]bool,
	homePath string,
	invCheckPeriod uint,
	encodingConfig cosmoscmd.EncodingConfig,
	appOpts servertypes.AppOptions,
	baseAppOptions ...func(*baseapp.BaseApp),
) cosmoscmd.App

NewNovaApp returns a reference to an initialized blockchain app

func NewNovaWasmGasRegister

func NewNovaWasmGasRegister() wasmkeeper.WasmGasRegister

func NovaGasRegisterConfig

func NovaGasRegisterConfig() wasmkeeper.WasmGasRegisterConfig

NovaGasRegisterConfig is defaults plus a custom compile amount

func RegisterSwaggerAPI

func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router)

RegisterSwaggerAPI registers swagger route with API Server.

func SignAndDeliver

func SignAndDeliver(
	t *testing.T, txCfg client.TxConfig, app *baseapp.BaseApp, header tmproto.Header, msgs []sdk.Msg,
	chainID string, accNums, accSeqs []uint64, expSimPass, expPass bool, priv ...cryptotypes.PrivKey,
) (sdk.GasInfo, *sdk.Result, error)

Types

type GenesisState

type GenesisState map[string]json.RawMessage

The genesis state of the blockchain is represented here as a map of raw json messages key'd by a identifier string. The identifier is used to determine which module genesis information belongs to so it may be appropriately routed during init chain. Within this application default genesis information is retrieved from the ModuleBasicManager which populates json from each BasicModule object provided to it during init.

func NewDefaultGenesisState

func NewDefaultGenesisState(cdc codec.JSONCodec) GenesisState

NewDefaultGenesisState generates the default state for the application.

type HandlerOptions

type HandlerOptions struct {
	ante.HandlerOptions

	IBCChannelkeeper  *channelkeeper.Keeper
	TxCounterStoreKey sdk.StoreKey
	WasmConfig        wasmTypes.WasmConfig
	Cdc               codec.BinaryCodec
}

HandlerOptions extends the SDK's AnteHandler options by requiring the IBC channel keeper.

type MinCommissionDecorator

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

func (MinCommissionDecorator) AnteHandle

func (min MinCommissionDecorator) AnteHandle(
	ctx sdk.Context, tx sdk.Tx,
	simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error)

type NovaApp

type NovaApp struct {
	*baseapp.BaseApp
	keepers.AppKeepers
	// contains filtered or unexported fields
}

NovaApp extends an ABCI application, but with most of its parameters exported. They are exported for convenience in creating helper functions, as object capabilities aren't needed for testing.

func Setup

func Setup(isCheckTx bool) *NovaApp

func SetupWithGenesisValSet

func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, chainID string, balances ...banktypes.Balance) *NovaApp

func SetupWithGenesisValSetAndOption

func SetupWithGenesisValSetAndOption(t *testing.T, delegationAmount sdk.Coin, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, chainID string, balances ...banktypes.Balance) *NovaApp

func (*NovaApp) AppCodec

func (app *NovaApp) AppCodec() codec.Codec

AppCodec returns an app codec.

NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.

func (*NovaApp) BeginBlocker

func (app *NovaApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock

BeginBlocker application updates every begin block

func (*NovaApp) EndBlocker

func (app *NovaApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock

EndBlocker application updates every end block

func (*NovaApp) ExportAppStateAndValidators

func (app *NovaApp) ExportAppStateAndValidators(
	forZeroHeight bool, jailAllowedAddrs []string,
) (servertypes.ExportedApp, error)

ExportAppStateAndValidators exports the state of the application for a genesis file.

func (NovaApp) GetBaseApp

func (app NovaApp) GetBaseApp() *baseapp.BaseApp

GetBaseApp returns the base app of the application

func (*NovaApp) GetModuleManager

func (app *NovaApp) GetModuleManager(
	encodingConfig cosmoscmd.EncodingConfig,
	skipGenesisInvariants bool,
	transferModule module.AppModule,
) []module.AppModule

func (*NovaApp) GetSubspace

func (app *NovaApp) GetSubspace(moduleName string) paramstypes.Subspace

GetSubspace returns a param subspace for a given module name.

NOTE: This is solely to be used for testing purposes.

func (*NovaApp) InitChainer

func (app *NovaApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain

InitChainer application update at chain initialization

func (*NovaApp) InterfaceRegistry

func (app *NovaApp) InterfaceRegistry() types.InterfaceRegistry

InterfaceRegistry returns an InterfaceRegistry

func (*NovaApp) LegacyAmino

func (app *NovaApp) LegacyAmino() *codec.LegacyAmino

LegacyAmino returns SimApp's amino codec.

NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.

func (*NovaApp) LoadHeight

func (app *NovaApp) LoadHeight(height int64) error

LoadHeight loads a particular height

func (*NovaApp) ModuleAccountAddrs

func (app *NovaApp) ModuleAccountAddrs() map[string]bool

ModuleAccountAddrs returns all the app's module account addresses.

func (*NovaApp) Name

func (app *NovaApp) Name() string

Name returns the name of the NovaApp

func (*NovaApp) RegisterAPIRoutes

func (app *NovaApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)

RegisterAPIRoutes registers all application module routes with the provided API server.

func (*NovaApp) RegisterTendermintService

func (app *NovaApp) RegisterTendermintService(clientCtx client.Context)

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*NovaApp) RegisterTxService

func (app *NovaApp) RegisterTxService(clientCtx client.Context)

RegisterTxService implements the Application.RegisterTxService method.

func (*NovaApp) SimulationManager

func (app *NovaApp) SimulationManager() *module.SimulationManager

SimulationManager implements the SimulationApp interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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