Documentation ¶
Index ¶
- Constants
- Variables
- func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
- type EncodingConfig
- type GenesisState
- type HandlerOptions
- type MarsApp
- func (app *MarsApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *MarsApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *MarsApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *MarsApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *MarsApp) LegacyAmino() *codec.LegacyAmino
- func (app *MarsApp) LoadHeight(height int64) error
- func (app *MarsApp) ModuleAccountAddrs() map[string]bool
- func (app *MarsApp) Name() string
- func (app *MarsApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *MarsApp) RegisterTendermintService(clientCtx client.Context)
- func (app *MarsApp) RegisterTxService(clientCtx client.Context)
- func (app *MarsApp) SimulationManager() *module.SimulationManager
Constants ¶
const ( AccountAddressPrefix = "mars" Name = "mars" // BondDenom is the staking token's denomination BondDenom = "umars" // If EnabledSpecificProposals is "", and this is "true", then enable all // x/wasm proposals. // If EnabledSpecificProposals is "", and this is not "true", then disable // all x/wasm proposals. ProposalsEnabled = "true" // If set to non-empty string it must be comma-separated list of values that // are all a subset of "EnableAllProposals" (takes precedence over // ProposalsEnabled) // https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34 EnableSpecificProposals = "" )
Variables ¶
var ( // DefaultNodeHome the default home directory for the app daemon DefaultNodeHome string // ModuleBasics defines the module `BasicManager`, which is in charge of // setting up basic, non- dependent module elements, such as codec // registration and genesis verification ModuleBasics = module.NewBasicManager( auth.AppModuleBasic{}, authzmodule.AppModuleBasic{}, bank.AppModuleBasic{}, capability.AppModuleBasic{}, crisis.AppModuleBasic{}, distr.AppModuleBasic{}, evidence.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, genutil.AppModuleBasic{}, gov.NewAppModuleBasic(govProposalHandlers), params.AppModuleBasic{}, slashing.AppModuleBasic{}, staking.AppModuleBasic{}, upgrade.AppModuleBasic{}, ibc.AppModuleBasic{}, ibctransfer.AppModuleBasic{}, wasm.AppModuleBasic{}, incentives.AppModuleBasic{}, safety.AppModuleBasic{}, ) )
Functions ¶
func NewAnteHandler ¶
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
NewAnteHandler returns an AnteHandler that checks and increments sequence numbers, checks signatures & account numbers, and deducts fees from the first signer.
Types ¶
type EncodingConfig ¶
type EncodingConfig struct { InterfaceRegistry codectypes.InterfaceRegistry Codec codec.Codec TxConfig client.TxConfig Amino *codec.LegacyAmino }
EncodingConfig specifies the concrete encoding types to use for a given app. This is provided for compatibility between protobuf and amino implementations.
func MakeEncodingConfig ¶
func MakeEncodingConfig() EncodingConfig
MakeEncodingConfig creates an EncodingConfig instance; registers types with codec and interface registry.
func NewEncodingConfig ¶
func NewEncodingConfig() EncodingConfig
MakeEncodingConfig creates an EncodingConfig instance
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 an 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 retieved from the `ModuleBasicManager` which populates JSON from each `BasicModule` object provided to it during init.
func DefaultGenesisState ¶
func DefaultGenesisState(cdc codec.JSONCodec) GenesisState
DefaultGenesisState generates the default state for the application.
type HandlerOptions ¶
type HandlerOptions struct { ante.HandlerOptions IBCKeeper *ibckeeper.Keeper WasmConfig wasmtypes.WasmConfig TxCounterStoreKey storetypes.StoreKey }
HandlerOptions extends the SDK's `AnteHandler` options by requiring additional keepers.
type MarsApp ¶
type MarsApp struct { // baseapp *baseapp.BaseApp Codec codec.Codec // make codec public for testing purposes // keepers AccountKeeper authkeeper.AccountKeeper AuthzKeeper authzkeeper.Keeper BankKeeper bankkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper CrisisKeeper crisiskeeper.Keeper DistrKeeper distrkeeper.Keeper EvidenceKeeper evidencekeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper GovKeeper customgovkeeper.Keeper // replaces the vanilla gov keeper with our custom one ParamsKeeper paramskeeper.Keeper SlashingKeeper slashingkeeper.Keeper StakingKeeper stakingkeeper.Keeper UpgradeKeeper upgradekeeper.Keeper IBCKeeper *ibckeeper.Keeper // must be a pointer, so we can `SetRouter` on it correctly IBCTransferKeeper ibctransferkeeper.Keeper WasmKeeper wasm.Keeper IncentivesKeeper incentiveskeeper.Keeper SafetyKeeper safetykeeper.Keeper // make scoped keepers public for testing purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedIBCTransferKeeper capabilitykeeper.ScopedKeeper ScopedWasmKeeper capabilitykeeper.ScopedKeeper // contains filtered or unexported fields }
MarsApp 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 NewMarsApp ¶
func NewMarsApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig EncodingConfig, appOpts servertypes.AppOptions, wasmOpts []wasm.Option, baseAppOptions ...func(*baseapp.BaseApp), ) *MarsApp
NewMarsApp creates and initializes a new `MarsApp` instance
func (*MarsApp) BeginBlocker ¶
func (app *MarsApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*MarsApp) EndBlocker ¶
func (app *MarsApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates on every end block
func (*MarsApp) ExportAppStateAndValidators ¶
func (app *MarsApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*MarsApp) InitChainer ¶
func (app *MarsApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application updates at chain initialization
func (*MarsApp) LegacyAmino ¶
func (app *MarsApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns the app's legacy amino codec
func (*MarsApp) LoadHeight ¶
LoadHeight loads a particular height
func (*MarsApp) ModuleAccountAddrs ¶
ModuleAccountAddrs return the app's module account addresses
func (*MarsApp) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*MarsApp) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*MarsApp) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (*MarsApp) SimulationManager ¶
func (app *MarsApp) SimulationManager() *module.SimulationManager
NOTE: we don't actually use simulation manager anywhere in this project, so we simply return nil.