app

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: Apache-2.0 Imports: 99 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bech32MainPrefix     = "ixo"
	Bech32PrefixAccAddr  = Bech32MainPrefix
	Bech32PrefixAccPub   = Bech32MainPrefix + sdk.PrefixPublic
	Bech32PrefixValAddr  = Bech32MainPrefix + sdk.PrefixValidator + sdk.PrefixOperator
	Bech32PrefixValPub   = Bech32MainPrefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic
	Bech32PrefixConsAddr = Bech32MainPrefix + sdk.PrefixValidator + sdk.PrefixConsensus
	Bech32PrefixConsPub  = Bech32MainPrefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic
)

Variables

View Source
var (
	// DefaultNodeHome default home directories for the application daemon
	DefaultNodeHome = os.ExpandEnv("$HOME/.ixod")

	// ModuleBasics defines the module BasicManager which 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(
			paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.ProposalHandler, upgradeclient.CancelProposalHandler,
		),
		sdkparams.AppModuleBasic{},
		crisis.AppModuleBasic{},
		slashing.AppModuleBasic{},
		ibc.AppModuleBasic{},
		upgrade.AppModuleBasic{},
		evidence.AppModuleBasic{},
		transfer.AppModuleBasic{},
		vesting.AppModuleBasic{},

		did.AppModuleBasic{},
		bonds.AppModuleBasic{},
		payments.AppModuleBasic{},
		project.AppModuleBasic{},
	)
)

Functions

func GetMaccPerms added in v0.14.0

func GetMaccPerms() map[string][]string

GetMaccPerms returns a copy of the module account permissions

func MakeCodecs added in v0.15.0

func MakeCodecs() (codec.Marshaler, *codec.LegacyAmino)

MakeCodecs constructs the *std.Codec and *codec.LegacyAmino instances used by ixoapp. It is useful for tests and clients who do not want to construct the full ixoapp.

func MakeTestEncodingConfig added in v0.15.0

func MakeTestEncodingConfig() params.EncodingConfig

MakeTestEncodingConfig creates an EncodingConfig for testing

func NewIxoAnteHandler

func NewIxoAnteHandler(app *IxoApp, encodingConfig params.EncodingConfig) sdk.AnteHandler

func RegisterSwaggerAPI added in v0.15.0

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

RegisterSwaggerAPI registers swagger route with API Server

Types

type GenesisState added in v0.14.0

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 added in v0.14.0

func NewDefaultGenesisState(cdc codec.JSONMarshaler) GenesisState

NewDefaultGenesisState generates the default state for the application.

type IxoApp added in v0.15.0

type IxoApp struct {
	*baseapp.BaseApp `json:"_bam_base_app,omitempty"`

	// keepers
	AccountKeeper    authkeeper.AccountKeeper `json:"account_keeper"`
	BankKeeper       bankkeeper.Keeper        `json:"bank_keeper,omitempty"`
	CapabilityKeeper *capabilitykeeper.Keeper `json:"capability_keeper,omitempty"`
	StakingKeeper    stakingkeeper.Keeper     `json:"staking_keeper"`
	SlashingKeeper   slashingkeeper.Keeper    `json:"slashing_keeper"`
	MintKeeper       mintkeeper.Keeper        `json:"mint_keeper"`
	DistrKeeper      distrkeeper.Keeper       `json:"distr_keeper"`
	GovKeeper        govkeeper.Keeper         `json:"gov_keeper"`
	CrisisKeeper     crisiskeeper.Keeper      `json:"crisis_keeper"`
	UpgradeKeeper    upgradekeeper.Keeper     `json:"upgrade_keeper"`
	ParamsKeeper     paramskeeper.Keeper      `json:"params_keeper"`
	IBCKeeper        *ibckeeper.Keeper        `json:"ibc_keeper,omitempty"` // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
	EvidenceKeeper   evidencekeeper.Keeper    `json:"evidence_keeper"`
	TransferKeeper   ibctransferkeeper.Keeper `json:"transfer_keeper"`

	// make scoped keepers public for test purposes
	ScopedIBCKeeper      capabilitykeeper.ScopedKeeper `json:"scoped_ibc_keeper"`
	ScopedTransferKeeper capabilitykeeper.ScopedKeeper `json:"scoped_transfer_keeper"`

	// Custom ixo keepers
	DidKeeper      didkeeper.Keeper      `json:"did_keeper"`
	BondsKeeper    bondskeeper.Keeper    `json:"bonds_keeper"`
	PaymentsKeeper paymentskeeper.Keeper `json:"payments_keeper,omitempty"`
	ProjectKeeper  projectkeeper.Keeper  `json:"project_keeper"`
	// contains filtered or unexported fields
}

Extended ABCI application

func NewIxoApp

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

NewIxoApp returns a reference to an initialized IxoApp.

func (*IxoApp) AppCodec added in v0.15.0

func (app *IxoApp) AppCodec() codec.Marshaler

AppCodec returns IxoApp'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 (*IxoApp) BeginBlocker added in v0.15.0

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

BeginBlocker application updates every begin block

func (*IxoApp) BlockedAddrs added in v0.15.0

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

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

func (*IxoApp) EndBlocker added in v0.15.0

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

EndBlocker application updates every end block

func (*IxoApp) ExportAppStateAndValidators added in v0.15.0

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

ExportAppStateAndValidators exports the state of ixo for a genesis file.

func (*IxoApp) GetKey added in v0.15.0

func (app *IxoApp) 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 (*IxoApp) GetMemKey added in v0.15.0

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

GetMemKey returns the MemStoreKey for the provided mem key.

NOTE: This is solely used for testing purposes.

func (*IxoApp) GetSubspace added in v0.15.0

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

func (app *IxoApp) 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 (*IxoApp) InitChainer added in v0.15.0

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

InitChainer application update at chain initialization

func (*IxoApp) InterfaceRegistry added in v0.15.0

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

InterfaceRegistry returns IxoApp's InterfaceRegistry

func (*IxoApp) LegacyAmino added in v0.15.0

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

LegacyAmino returns IxoApp'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 (*IxoApp) LoadHeight added in v0.15.0

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

LoadHeight loads a particular height

func (*IxoApp) ModuleAccountAddrs added in v0.15.0

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

ModuleAccountAddrs returns all the app's module account addresses.

func (*IxoApp) Name added in v0.15.0

func (app *IxoApp) Name() string

Name returns the name of the App

func (*IxoApp) RegisterAPIRoutes added in v0.15.0

func (app *IxoApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig srvconfig.APIConfig)

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

func (*IxoApp) RegisterTendermintService added in v0.15.0

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

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*IxoApp) RegisterTxService added in v0.15.0

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

RegisterTxService implements the Application.RegisterTxService method.

func (*IxoApp) SimulationManager added in v0.15.0

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