Documentation
¶
Index ¶
- Constants
- Variables
- type EmptyAppOptions
- type ExampleApp
- func (app *ExampleApp) AppCodec() codec.Codec
- func (app *ExampleApp) AutoCliOpts() autocli.AppOptions
- func (app *ExampleApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
- func (app *ExampleApp) BlockedModuleAccountAddrs(modAccAddrs map[string]bool) map[string]bool
- func (app *ExampleApp) DefaultGenesis() map[string]json.RawMessage
- func (app *ExampleApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)
- func (app *ExampleApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *ExampleApp) GetBaseApp() *baseapp.BaseApp
- func (app *ExampleApp) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *ExampleApp) GetStoreKeys() []storetypes.StoreKey
- func (app *ExampleApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *ExampleApp) GetTxConfig() client.TxConfig
- func (app *ExampleApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- func (app *ExampleApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *ExampleApp) LegacyAmino() *codec.LegacyAmino
- func (app *ExampleApp) LoadHeight(height int64) error
- func (app *ExampleApp) ModuleAccountAddrs() map[string]bool
- func (app *ExampleApp) Name() string
- func (app *ExampleApp) OnTxFailed(_ sdk.Context, _, _ string, _, _ []byte)
- func (app *ExampleApp) OnTxSucceeded(_ sdk.Context, _, _ string, _, _ []byte)
- func (app *ExampleApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *ExampleApp) RegisterNodeService(clientCtx client.Context, cfg config.Config)
- func (app *ExampleApp) RegisterTendermintService(clientCtx client.Context)
- func (app *ExampleApp) RegisterTxService(clientCtx client.Context)
- func (app *ExampleApp) SimulationManager() *module.SimulationManager
- type GenesisState
Constants ¶
const ( Bech32Prefix = "cosmos" AppName = "tutorial" DefaultDenom = "uatom" Bech32PrefixAccAddr = Bech32Prefix Bech32PrefixAccPub = Bech32Prefix + "pub" Bech32PrefixValAddr = Bech32Prefix + "valoper" Bech32PrefixValPub = Bech32Prefix + "valoperpub" Bech32PrefixConsAddr = Bech32Prefix + "valcons" Bech32PrefixConsPub = Bech32Prefix + "valconspub" )
Variables ¶
var (
DefaultNodeHome string
)
Functions ¶
This section is empty.
Types ¶
type EmptyAppOptions ¶
type EmptyAppOptions struct{}
func (EmptyAppOptions) Get ¶
func (ao EmptyAppOptions) Get(_ string) interface{}
type ExampleApp ¶
type ExampleApp struct { *baseapp.BaseApp // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper StakingKeeper *stakingkeeper.Keeper DistrKeeper distrkeeper.Keeper GovKeeper govkeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper ConsensusParamsKeeper consensusparamkeeper.Keeper BasicManager module.BasicManager // contains filtered or unexported fields }
func NewExampleApp ¶
func NewExampleApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, valKeyName string, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *ExampleApp
func (*ExampleApp) AppCodec ¶
func (app *ExampleApp) AppCodec() codec.Codec
func (*ExampleApp) AutoCliOpts ¶
func (app *ExampleApp) AutoCliOpts() autocli.AppOptions
AutoCliOpts returns the autocli options for the app.
func (*ExampleApp) BeginBlocker ¶
func (app *ExampleApp) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
BeginBlocker application updates every begin block
func (*ExampleApp) BlockedModuleAccountAddrs ¶
func (app *ExampleApp) BlockedModuleAccountAddrs(modAccAddrs map[string]bool) map[string]bool
func (*ExampleApp) DefaultGenesis ¶
func (app *ExampleApp) DefaultGenesis() map[string]json.RawMessage
DefaultGenesis returns a default genesis from the registered AppModuleBasic's.
func (*ExampleApp) EndBlocker ¶
EndBlocker application updates every end block
func (*ExampleApp) ExportAppStateAndValidators ¶
func (app *ExampleApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*ExampleApp) GetBaseApp ¶
func (app *ExampleApp) GetBaseApp() *baseapp.BaseApp
func (*ExampleApp) GetKey ¶
func (app *ExampleApp) GetKey(storeKey string) *storetypes.KVStoreKey
GetKey returns the KVStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*ExampleApp) GetStoreKeys ¶
func (app *ExampleApp) GetStoreKeys() []storetypes.StoreKey
GetStoreKeys returns all the stored store keys.
func (*ExampleApp) GetSubspace ¶
func (app *ExampleApp) 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 (*ExampleApp) GetTxConfig ¶
func (app *ExampleApp) GetTxConfig() client.TxConfig
func (*ExampleApp) InitChainer ¶
func (app *ExampleApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
InitChainer application update at chain initialization
func (*ExampleApp) InterfaceRegistry ¶
func (app *ExampleApp) InterfaceRegistry() types.InterfaceRegistry
func (*ExampleApp) LegacyAmino ¶
func (app *ExampleApp) LegacyAmino() *codec.LegacyAmino
func (*ExampleApp) LoadHeight ¶
func (app *ExampleApp) LoadHeight(height int64) error
func (*ExampleApp) ModuleAccountAddrs ¶
func (app *ExampleApp) ModuleAccountAddrs() map[string]bool
func (*ExampleApp) Name ¶
func (app *ExampleApp) Name() string
func (*ExampleApp) OnTxFailed ¶
func (app *ExampleApp) OnTxFailed(_ sdk.Context, _, _ string, _, _ []byte)
func (*ExampleApp) OnTxSucceeded ¶
func (app *ExampleApp) OnTxSucceeded(_ sdk.Context, _, _ string, _, _ []byte)
func (*ExampleApp) RegisterAPIRoutes ¶
func (app *ExampleApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
func (*ExampleApp) RegisterNodeService ¶
func (app *ExampleApp) RegisterNodeService(clientCtx client.Context, cfg config.Config)
func (*ExampleApp) RegisterTendermintService ¶
func (app *ExampleApp) RegisterTendermintService(clientCtx client.Context)
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*ExampleApp) RegisterTxService ¶
func (app *ExampleApp) RegisterTxService(clientCtx client.Context)
func (*ExampleApp) SimulationManager ¶
func (app *ExampleApp) 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.