app

package
v28.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 138 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "juno"
)

Variables

View Source
var (
	NodeDir = ".juno"
	// DefaultNodeHome default home directories for Juno
	DefaultNodeHome = os.ExpandEnv("$HOME/") + NodeDir
	// If EnabledSpecificProposals is "", and this is "true", then enable all x/wasm proposals.
	// If EnabledSpecificProposals is "", and this is not "true", then disable all x/wasm proposals.
	ProposalsEnabled = "true"
	// If set to non-empty string it must be comma-separated list of values that are all a subset
	// of "EnableAllProposals" (takes precedence over ProposalsEnabled)
	// https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34
	EnableSpecificProposals = ""

	Upgrades = []upgrades.Upgrade{
		v28.Upgrade,
	}
)

AppModuleBasics returns AppModuleBasics for the module BasicManager. used only for pre-init stuff like DefaultGenesis generation.

Functions

func GetDefaultBypassFeeMessages

func GetDefaultBypassFeeMessages() []string

func NewAnteHandler

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

NewAnteHandler returns an AnteHandler that checks and increments sequence numbers, checks signatures & account numbers, and deducts fees from the first signer.

Types

type App

type App struct {
	*baseapp.BaseApp

	// keepers
	AppKeepers keepers.AppKeepers

	// modules
	ModuleManager      *module.Manager
	BasicModuleManager module.BasicManager
	// contains filtered or unexported fields
}

App 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 New

func New(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	homePath string,
	appOpts servertypes.AppOptions,
	wasmOpts []wasmkeeper.Option,
	baseAppOptions ...func(*baseapp.BaseApp),
) *App

New returns a reference to an initialized Juno.

func (*App) AppCodec

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

AppCodec returns Juno's 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 (*App) AutoCLIOpts

func (app *App) AutoCLIOpts(initClientCtx client.Context) autocli.AppOptions

AutoCLIOpts returns options based upon the modules used on Juno.

func (*App) BeginBlocker

func (app *App) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)

BeginBlocker application updates every begin block

func (*App) DefaultGenesis

func (app *App) DefaultGenesis() map[string]json.RawMessage

DefaultGenesis returns a default genesis from the registered AppModuleBasic's.

func (*App) EndBlocker

func (app *App) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)

EndBlocker application updates every end block

func (*App) ExportAppStateAndValidators

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

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

func (*App) GetChainBondDenom

func (app *App) GetChainBondDenom() string

func (*App) GetSubspace

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

GetSubspace returns a param subspace for a given module name.

NOTE: Still used in ibc-go, wait for them to remove params usage before removing this.

func (*App) InitChainer

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

InitChainer application update at chain initialization

func (*App) InterfaceRegistry

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

InterfaceRegistry returns Juno's InterfaceRegistry

func (*App) LegacyAmino

func (app *App) 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 (*App) LoadHeight

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

LoadHeight loads a particular height

func (*App) ModuleAccountAddrs

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

ModuleAccountAddrs returns all the app's module account addresses.

func (*App) Name

func (app *App) Name() string

Name returns the name of the App

func (*App) PreBlocker

func (app *App) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)

PreBlocker application updates every pre block

func (*App) RegisterAPIRoutes

func (app *App) RegisterAPIRoutes(apiSvr *api.Server, _ config.APIConfig)

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

func (*App) RegisterNodeService

func (app *App) RegisterNodeService(clientCtx client.Context, cfg config.Config)

func (*App) RegisterSwaggerUI

func (app *App) RegisterSwaggerUI(apiSvr *api.Server) error

func (*App) RegisterTendermintService

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

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*App) RegisterTxService

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

RegisterTxService implements the Application.RegisterTxService method.

func (*App) SimulationManager

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

SimulationManager implements the SimulationApp interface

func (*App) TxConfig

func (app *App) TxConfig() client.TxConfig

InterfaceRegistry returns Juno's TxConfig

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
	Cdc       codec.BinaryCodec
	TxEncoder sdk.TxEncoder

	// cosmos sdk
	GovKeeper     govkeeper.Keeper
	StakingKeeper stakingkeeper.Keeper
	BondDenom     string
	BankKeeper    bankkeeper.Keeper

	// ibc
	IBCKeeper *ibckeeper.Keeper

	// wasm
	TXCounterStoreService corestoretypes.KVStoreService
	NodeConfig            *wasmtypes.NodeConfig
	WasmKeeper            *wasmkeeper.Keeper

	// fee modules
	FeePayKeeper         feepaykeeper.Keeper
	FeeShareKeeper       feesharekeeper.Keeper
	GlobalFeeKeeper      globalfeekeeper.Keeper
	BypassMinFeeMsgTypes []string
}

HandlerOptions extends the SDK's AnteHandler options by requiring the IBC channel keeper and a BankKeeper with an added method for fee sharing.

Directories

Path Synopsis
v28

Jump to

Keyboard shortcuts

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