app

package
v0.0.0-...-c736a29 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: AGPL-3.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountAddressPrefix = "cosmos"
)

Variables

View Source
var (
	// DefaultCLIHome sets the default home directories for the application CLI
	DefaultCLIHome = os.ExpandEnv("$HOME/.wire/dxnscli")

	// DefaultNodeHome sets the folder where the application data and configuration will be stored
	DefaultNodeHome = os.ExpandEnv("$HOME/.wire/dxnsd")

	// 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{},
		supply.AppModuleBasic{},
		genutil.AppModuleBasic{},
		bank.AppModuleBasic{},
		staking.AppModuleBasic{},
		mint.AppModuleBasic{},
		distr.AppModuleBasic{},
		gov.NewAppModuleBasic(
			paramsclient.ProposalHandler, distr.ProposalHandler, upgradeclient.ProposalHandler,
		),
		params.AppModuleBasic{},
		crisis.AppModuleBasic{},
		slashing.AppModuleBasic{},
		evidence.AppModuleBasic{},
		upgrade.AppModuleBasic{},

		bond.AppModule{},
		auction.AppModule{},
		ns.AppModule{},
	)
)
View Source
var (
	AccountPubKeyPrefix    = AccountAddressPrefix + "pub"
	ValidatorAddressPrefix = AccountAddressPrefix + "valoper"
	ValidatorPubKeyPrefix  = AccountAddressPrefix + "valoperpub"
	ConsNodeAddressPrefix  = AccountAddressPrefix + "valcons"
	ConsNodePubKeyPrefix   = AccountAddressPrefix + "valconspub"
)

Functions

func GetMaccPerms

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

func MakeCodec

func MakeCodec() *codec.Codec

MakeCodec registers the necessary types and interfaces for an sdk.App. This codec is provided to all the modules the application depends on.

NOTE: This codec will be deprecated in favor of AppCodec once all modules are migrated to protobuf.

func MakeCodecLite

func MakeCodecLite() *codec.Codec

MakeCodecLite is the codec used by the lite node.

func SetConfig

func SetConfig()

Types

type NewApp

type NewApp struct {
	*bam.BaseApp

	MintKeeper  mint.Keeper
	DistrKeeper distr.Keeper
	// contains filtered or unexported fields
}

NewApp implements an extended ABCI application.

func NewAppInit

func NewAppInit(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	skipUpgradeHeights map[int64]bool,
	invCheckPeriod uint,
	baseAppOptions ...func(*bam.BaseApp),
) *NewApp

NewApp returns a reference to a new initialized Chain application.

func (*NewApp) BeginBlocker

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

BeginBlocker updates every begin block

func (*NewApp) BlacklistedAccAddrs

func (app *NewApp) BlacklistedAccAddrs() map[string]bool

BlacklistedAccAddrs returns all the app's module account addresses black listed for receiving tokens.

func (*NewApp) Codec

func (app *NewApp) Codec() *codec.Codec

Codec returns Chain's 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 (*NewApp) EndBlocker

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

EndBlocker updates every end block

func (*NewApp) ExportAppStateAndValidators

func (app *NewApp) ExportAppStateAndValidators(
	forZeroHeight bool, jailWhiteList []string,
) (appState json.RawMessage, validators []tmtypes.GenesisValidator, err error)

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

func (*NewApp) GetKey

func (app *NewApp) 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 (*NewApp) InitChainer

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

InitChainer updates at chain initialization

func (*NewApp) LoadHeight

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

LoadHeight loads state at a particular height

func (*NewApp) ModuleAccountAddrs

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

ModuleAccountAddrs returns all the app's module account addresses.

func (*NewApp) Name

func (app *NewApp) Name() string

Name returns the name of the App

func (*NewApp) SimulationManager

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

SimulationManager implements the SimulationApp interface

Jump to

Keyboard shortcuts

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