app

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: AGPL-3.0 Imports: 111 Imported by: 0

Documentation

Overview

Package app contains configuration of the network.

Index

Constants

View Source
const (
	// AccountAddressPrefix is cosmos-sdk accounts prefixes.
	AccountAddressPrefix = "onomy"
	// Name is the name of the onomy chain.
	Name = "onomy"
)

Variables

View Source
var (
	// DefaultNodeHome default home directories for the application daemon.
	DefaultNodeHome string // nolint:gochecknoglobals // cosmos-sdk application style

	// 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(
		auth.AppModuleBasic{},
		genutil.AppModuleBasic{},
		bank.AppModuleBasic{},
		capability.AppModuleBasic{},
		staking.AppModuleBasic{},
		mint.AppModuleBasic{},
		distr.AppModuleBasic{},
		gov.NewAppModuleBasic(getGovProposalHandlers()...),
		params.AppModuleBasic{},
		crisis.AppModuleBasic{},
		slashing.AppModuleBasic{},
		feegrantmodule.AppModuleBasic{},
		authzmodule.AppModuleBasic{},
		ibc.AppModuleBasic{},
		upgrade.AppModuleBasic{},
		evidence.AppModuleBasic{},
		transfer.AppModuleBasic{},
		vesting.AppModuleBasic{},
		dao.AppModuleBasic{},
		ibcprovider.AppModuleBasic{},
	)
)

Functions

func New added in v0.0.4

func New(
	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

New returns a reference to an initialized blockchain app.

Types

type GenesisState

type GenesisState map[string]json.RawMessage

GenesisState 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 OnomyApp added in v0.0.4

type OnomyApp struct {
	*baseapp.BaseApp

	// keepers
	AccountKeeper    authkeeper.AccountKeeper
	BankKeeper       bankkeeper.BaseKeeper
	CapabilityKeeper *capabilitykeeper.Keeper
	StakingKeeper    stakingkeeper.Keeper
	SlashingKeeper   slashingkeeper.Keeper
	MintKeeper       mintkeeper.Keeper
	DistrKeeper      distrkeeper.Keeper
	GovKeeper        govkeeper.Keeper
	CrisisKeeper     crisiskeeper.Keeper
	UpgradeKeeper    upgradekeeper.Keeper
	ParamsKeeper     paramskeeper.Keeper
	IBCKeeper        *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
	EvidenceKeeper   evidencekeeper.Keeper
	TransferKeeper   ibctransferkeeper.Keeper
	FeeGrantKeeper   feegrantkeeper.Keeper
	AuthzKeeper      authzkeeper.Keeper
	ProviderKeeper   ibcproviderkeeper.Keeper

	// make scoped keepers public for test purposes
	ScopedIBCKeeper         capabilitykeeper.ScopedKeeper
	ScopedTransferKeeper    capabilitykeeper.ScopedKeeper
	ScopedIBCProviderKeeper capabilitykeeper.ScopedKeeper

	DaoKeeper daokeeper.Keeper
	// contains filtered or unexported fields
}

OnomyApp 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 (*OnomyApp) AppCodec added in v0.0.4

func (app *OnomyApp) 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 (*OnomyApp) BeginBlocker added in v0.0.4

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

BeginBlocker application updates every begin block.

func (*OnomyApp) BlockedAddrs added in v0.0.5

func (app *OnomyApp) BlockedAddrs() map[string]bool

BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.

func (*OnomyApp) EndBlocker added in v0.0.4

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

EndBlocker application updates every end block.

func (*OnomyApp) ExportAppStateAndValidators added in v0.0.4

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

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

func (OnomyApp) GetBaseApp added in v0.0.5

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

GetBaseApp returns the base app of the application.

func (*OnomyApp) GetKey added in v0.0.4

func (app *OnomyApp) GetKey(storeKey string) *sdk.KVStoreKey

GetKey returns the KVStoreKey for the provided store key.

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

func (*OnomyApp) GetMemKey added in v0.0.4

func (app *OnomyApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey

GetMemKey returns the MemStoreKey for the provided mem key.

NOTE: This is solely used for testing purposes.

func (*OnomyApp) GetSubspace added in v0.0.4

func (app *OnomyApp) 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 (*OnomyApp) GetTKey added in v0.0.4

func (app *OnomyApp) GetTKey(storeKey string) *sdk.TransientStoreKey

GetTKey returns the TransientStoreKey for the provided store key.

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

func (*OnomyApp) InitChainer added in v0.0.4

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

InitChainer application update at chain initialization.

func (*OnomyApp) InterfaceRegistry added in v0.0.4

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

InterfaceRegistry returns an InterfaceRegistry.

func (*OnomyApp) LegacyAmino added in v0.0.4

func (app *OnomyApp) 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 (*OnomyApp) LoadHeight added in v0.0.4

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

LoadHeight loads a particular height.

func (*OnomyApp) ModuleAccountAddrs added in v0.0.4

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

ModuleAccountAddrs returns all the app's module account addresses.

func (*OnomyApp) Name added in v0.0.4

func (app *OnomyApp) Name() string

Name returns the name of the OnomyApp.

func (*OnomyApp) RegisterAPIRoutes added in v0.0.4

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

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

func (*OnomyApp) RegisterTendermintService added in v0.0.4

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

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*OnomyApp) RegisterTxService added in v0.0.4

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

RegisterTxService implements the Application.RegisterTxService method.

func (*OnomyApp) SetOrderEndBlockers added in v0.0.6

func (app *OnomyApp) SetOrderEndBlockers(moduleNames ...string)

SetOrderEndBlockers sets the order of set end-blocker calls.

func (*OnomyApp) SimulationManager added in v0.0.5

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

SimulationManager implements the SimulationApp interface.

Directories

Path Synopsis
upgrades
v1.0.1
Package v1_0_1 is contains chain upgrade of the corresponding version.
Package v1_0_1 is contains chain upgrade of the corresponding version.
v1.0.3
Package v1_0_3 is contains chain upgrade of the corresponding version.
Package v1_0_3 is contains chain upgrade of the corresponding version.
v1.0.3.4
Package v1_0_3_4 is contains chain upgrade of the corresponding version.
Package v1_0_3_4 is contains chain upgrade of the corresponding version.
v1.0.3.5
Package v1_0_3_5 is contains chain upgrade of the corresponding version.
Package v1_0_3_5 is contains chain upgrade of the corresponding version.
v1.1.1
Package v1_1_1 is contains chain upgrade of the corresponding version.
Package v1_1_1 is contains chain upgrade of the corresponding version.
v1.1.2
Package v1_1_2 is contains chain upgrade of the corresponding version.
Package v1_1_2 is contains chain upgrade of the corresponding version.
v1.1.4
Package v1_1_4 is contains chain upgrade of the corresponding version.
Package v1_1_4 is contains chain upgrade of the corresponding version.

Jump to

Keyboard shortcuts

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