Documentation ¶
Index ¶
- Constants
- Variables
- func SetAccountAddressPrefixes()
- type App
- func (a *App) AppCodec() codec.BinaryCodec
- func (a *App) BeginBlocker(ctx sdk.Context, req abcitypes.RequestBeginBlock) abcitypes.ResponseBeginBlock
- func (a *App) EndBlocker(ctx sdk.Context, req abcitypes.RequestEndBlock) abcitypes.ResponseEndBlock
- func (a *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (a *App) GetKey(storeKey string) *sdk.KVStoreKey
- func (a *App) GetMemKey(storeKey string) *sdk.MemoryStoreKey
- func (a *App) GetSubspace(moduleName string) paramstypes.Subspace
- func (a *App) GetTKey(storeKey string) *sdk.TransientStoreKey
- func (a *App) InitChainer(ctx sdk.Context, req abcitypes.RequestInitChain) abcitypes.ResponseInitChain
- func (a *App) InterfaceRegistry() codectypes.InterfaceRegistry
- func (a *App) LegacyAmino() *codec.LegacyAmino
- func (a *App) LoadHeight(height int64) error
- func (a *App) ModuleAccountAddrs() map[string]bool
- func (a *App) ModuleAccountsPermissions() map[string][]string
- func (a *App) Name() string
- func (a *App) RegisterAPIRoutes(server *api.Server, _ serverconfig.APIConfig)
- func (a *App) RegisterTendermintService(ctx client.Context)
- func (a *App) RegisterTxService(ctx client.Context)
- type EncodingConfig
- type GenesisState
Constants ¶
const ( AccountAddressPrefix = "comdex" Name = "comdex" )
Variables ¶
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string // use this for clarity in argument list EmptyWasmOpts []wasm.Option // 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( paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.ProposalHandler, upgradeclient.CancelProposalHandler, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, authzmodule.AppModuleBasic{}, ibc.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, ibctransfer.AppModuleBasic{}, vesting.AppModuleBasic{}, wasm.AppModuleBasic{}, ) )
var ( AccountPubKeyPrefix = AccountAddressPrefix + sdk.PrefixPublic ValidatorAddressPrefix = AccountAddressPrefix + sdk.PrefixValidator + sdk.PrefixOperator ValidatorPubKeyPrefix = ValidatorAddressPrefix + sdk.PrefixPublic ConsensusNodeAddressPrefix = AccountAddressPrefix + sdk.PrefixValidator + sdk.PrefixConsensus ConsensusNodePubKeyPrefix = ConsensusNodeAddressPrefix + sdk.PrefixPublic )
Functions ¶
func SetAccountAddressPrefixes ¶
func SetAccountAddressPrefixes()
SetAccountAddressPrefixes sets the global prefix to be used when serializing addresses to bech32 strings.
Types ¶
type App ¶
App 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 New ¶
func New( logger log.Logger, db tmdb.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encoding EncodingConfig, appOptions servertypes.AppOptions, wasmOpts []wasm.Option, baseAppOptions ...func(*baseapp.BaseApp), ) *App
New returns a reference to an initialized App.
func (*App) AppCodec ¶
func (a *App) AppCodec() codec.BinaryCodec
AppCodec returns App'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 (*App) BeginBlocker ¶
func (a *App) BeginBlocker(ctx sdk.Context, req abcitypes.RequestBeginBlock) abcitypes.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*App) EndBlocker ¶
func (a *App) EndBlocker(ctx sdk.Context, req abcitypes.RequestEndBlock) abcitypes.ResponseEndBlock
EndBlocker application updates every end block
func (*App) ExportAppStateAndValidators ¶
func (a *App) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*App) GetKey ¶
func (a *App) 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 (*App) GetMemKey ¶
func (a *App) GetMemKey(storeKey string) *sdk.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*App) GetSubspace ¶
func (a *App) 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 (*App) GetTKey ¶
func (a *App) 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 (*App) InitChainer ¶
func (a *App) InitChainer(ctx sdk.Context, req abcitypes.RequestInitChain) abcitypes.ResponseInitChain
InitChainer application update at chain initialization
func (*App) InterfaceRegistry ¶
func (a *App) InterfaceRegistry() codectypes.InterfaceRegistry
InterfaceRegistry returns Gaia's InterfaceRegistry
func (*App) LegacyAmino ¶
func (a *App) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns App'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 (*App) LoadHeight ¶
LoadHeight loads a particular height
func (*App) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*App) ModuleAccountsPermissions ¶
func (*App) RegisterAPIRoutes ¶
func (a *App) RegisterAPIRoutes(server *api.Server, _ serverconfig.APIConfig)
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*App) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*App) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
type EncodingConfig ¶
type EncodingConfig struct { Amino *codec.LegacyAmino InterfaceRegistry codectypes.InterfaceRegistry Marshaler codec.ProtoCodecMarshaler TxConfig client.TxConfig }
func MakeEncodingConfig ¶
func MakeEncodingConfig() EncodingConfig
func NewEncodingConfig ¶
func NewEncodingConfig() EncodingConfig
type GenesisState ¶
type GenesisState map[string]json.RawMessage
GenesisState 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 ¶
func NewDefaultGenesisState(cdc codec.JSONCodec) GenesisState
NewDefaultGenesisState generates the default state for the application.