Documentation ¶
Index ¶
- Constants
- Variables
- func GetMaccPerms() map[string][]string
- func GetSimulationLog(storeName string, sdr sdk.StoreDecoderRegistry, kvAs, kvBs []kv.Pair) (log string)
- func MakeCodecs() (codec.Marshaler, *codec.LegacyAmino)
- func MakeTestEncodingConfig() params.EncodingConfig
- func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router)
- func SetupConfig(config *sdk.Config)
- type DesmosApp
- func (app *DesmosApp) AppCodec() codec.Marshaler
- func (app *DesmosApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *DesmosApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *DesmosApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *DesmosApp) GetKey(storeKey string) *sdk.KVStoreKey
- func (app *DesmosApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey
- func (app *DesmosApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *DesmosApp) GetTKey(storeKey string) *sdk.TransientStoreKey
- func (app *DesmosApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *DesmosApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *DesmosApp) LegacyAmino() *codec.LegacyAmino
- func (app *DesmosApp) LoadHeight(height int64) error
- func (app *DesmosApp) ModuleAccountAddrs() map[string]bool
- func (app *DesmosApp) Name() string
- func (app *DesmosApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *DesmosApp) RegisterTendermintService(clientCtx client.Context)
- func (app *DesmosApp) RegisterTxService(clientCtx client.Context)
- func (app *DesmosApp) SimulationManager() *module.SimulationManager
- type GenesisState
Constants ¶
const (
Bech32MainPrefix = "desmos"
)
Variables ¶
var ( // DefaultNodeHome sets the folder where the application data and configuration will be stored DefaultNodeHome string // ModuleBasics is in charge of setting up basic module elements ModuleBasics = module.NewBasicManager( genutil.AppModuleBasic{}, auth.AppModuleBasic{}, vesting.AppModuleBasic{}, bank.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.ProposalHandler, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, capability.AppModuleBasic{}, ibc.AppModuleBasic{}, ibctransfer.AppModuleBasic{}, profiles.AppModuleBasic{}, ) )
Functions ¶
func GetMaccPerms ¶ added in v0.15.0
GetMaccPerms returns a copy of the module account permissions
func GetSimulationLog ¶ added in v0.15.0
func GetSimulationLog(storeName string, sdr sdk.StoreDecoderRegistry, kvAs, kvBs []kv.Pair) (log string)
GetSimulationLog unmarshals the KVPair's Value to the corresponding type based on the each's module store key and the prefix bytes of the KVPair's key.
func MakeCodecs ¶ added in v0.15.0
func MakeCodecs() (codec.Marshaler, *codec.LegacyAmino)
MakeCodecs constructs the *std.Codec and *codec.LegacyAmino instances used by DesmosApp. It is useful for tests and clients who do not want to construct the full DesmosApp
func MakeTestEncodingConfig ¶ added in v0.15.0
func MakeTestEncodingConfig() params.EncodingConfig
MakeTestEncodingConfig creates an EncodingConfig for testing
func RegisterSwaggerAPI ¶ added in v0.15.0
RegisterSwaggerAPI registers swagger route with API Server
func SetupConfig ¶ added in v0.3.0
SetupConfig sets up the given config as it should be for Desmos
Types ¶
type DesmosApp ¶
type DesmosApp struct { *baseapp.BaseApp // Keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper StakingKeeper stakingkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly IBCTransferKeeper ibctransferkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedIBCTransferKeeper capabilitykeeper.ScopedKeeper ScopedProfilesKeeper capabilitykeeper.ScopedKeeper // Custom modules FeesKeeper feeskeeper.Keeper ProfileKeeper profileskeeper.Keeper SubspaceKeeper subspaceskeeper.Keeper // contains filtered or unexported fields }
DesmosApp 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 NewDesmosApp ¶
func NewDesmosApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig simappparams.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *DesmosApp
NewDesmosApp is a constructor function for DesmosApp
func (*DesmosApp) AppCodec ¶ added in v0.15.0
AppCodec returns SimApp'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 (*DesmosApp) BeginBlocker ¶
func (app *DesmosApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*DesmosApp) EndBlocker ¶
func (app *DesmosApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block
func (*DesmosApp) ExportAppStateAndValidators ¶
func (app *DesmosApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*DesmosApp) GetKey ¶ added in v0.15.0
func (app *DesmosApp) 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 (*DesmosApp) GetMemKey ¶ added in v0.16.0
func (app *DesmosApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*DesmosApp) GetSubspace ¶ added in v0.15.0
func (app *DesmosApp) 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 (*DesmosApp) GetTKey ¶ added in v0.15.0
func (app *DesmosApp) 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 (*DesmosApp) InitChainer ¶
func (app *DesmosApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application update.md at chain initialization
func (*DesmosApp) InterfaceRegistry ¶ added in v0.15.0
func (app *DesmosApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns SimApp's InterfaceRegistry
func (*DesmosApp) LegacyAmino ¶ added in v0.15.0
func (app *DesmosApp) 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 (*DesmosApp) LoadHeight ¶
LoadHeight loads a particular height
func (*DesmosApp) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*DesmosApp) RegisterAPIRoutes ¶ added in v0.15.0
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*DesmosApp) RegisterTendermintService ¶ added in v0.15.0
func (*DesmosApp) RegisterTxService ¶ added in v0.15.0
RegisterTxService implements the Application.RegisterTxService method.
func (*DesmosApp) SimulationManager ¶ added in v0.3.0
func (app *DesmosApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
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 ¶ added in v0.3.0
func NewDefaultGenesisState() GenesisState
NewDefaultGenesisState generates the default state for the application.