Documentation ¶
Index ¶
- Constants
- Variables
- func BlockedAddresses() map[string]bool
- func GetMaccPerms() map[string][]string
- func MakeEncodingConfig() params.EncodingConfig
- type App
- func (app *App) AppCodec() codec.Codec
- func (app *App) AutoCliOpts() autocli.AppOptions
- func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *App) GetEVMKeeper() *evmkeeper.Keeper
- func (app *App) GetIBCeKeeper() *ibckeeper.Keeper
- func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *App) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *App) GetTransientKey(storeKey string) *storetypes.TransientStoreKey
- func (app *App) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- func (app *App) InterfaceRegistry() codectypes.InterfaceRegistry
- func (app *App) LegacyAmino() *codec.LegacyAmino
- func (app *App) Name() string
- func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *App) SimulationManager() *module.SimulationManager
- func (app *App) TxConfig() client.TxConfig
- type GenesisState
Constants ¶
const ( AccountAddressPrefix = "gala" Name = "galactica" )
Variables ¶
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string // 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{}, authzmodule.AppModuleBasic{}, genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator), bank.AppModuleBasic{}, capability.AppModuleBasic{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic(getGovProposalHandlers()), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, groupmodule.AppModuleBasic{}, ibc.AppModuleBasic{}, ibctm.AppModuleBasic{}, solomachine.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, ibctransfer.AppModuleBasic{}, ica.AppModuleBasic{}, vesting.AppModuleBasic{}, consensus.AppModuleBasic{}, evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, reputationmodule.AppModuleBasic{}, inflationmodule.AppModuleBasic{}, epochsmodule.AppModuleBasic{}, ) )
var ( PreBlockers = []string{ upgradetypes.ModuleName, } // AppConfig application configuration (used by depinject) AppConfig = appconfig.Compose(&appv1alpha1.Config{ Modules: []*appv1alpha1.ModuleConfig{ { Name: "runtime", Config: appconfig.WrapAny(&runtimev1alpha1.Module{ AppName: Name, BeginBlockers: beginBlockers, EndBlockers: endBlockers, PreBlockers: PreBlockers, OverrideStoreKeys: []*runtimev1alpha1.StoreKeyConfig{ { ModuleName: authtypes.ModuleName, KvStoreKey: "acc", }, }, InitGenesis: genesisModuleOrder, }), }, { Name: authtypes.ModuleName, Config: appconfig.WrapAny(&authmodulev1.Module{ Bech32Prefix: "gala", ModuleAccountPermissions: moduleAccPerms, }), }, { Name: vestingtypes.ModuleName, Config: appconfig.WrapAny(&vestingmodulev1.Module{}), }, { Name: banktypes.ModuleName, Config: appconfig.WrapAny(&bankmodulev1.Module{ BlockedModuleAccountsOverride: blockAccAddrs, }), }, { Name: stakingtypes.ModuleName, Config: appconfig.WrapAny(&stakingmodulev1.Module{ Bech32PrefixValidator: "galavaloper", Bech32PrefixConsensus: "galavalcons", }), }, { Name: slashingtypes.ModuleName, Config: appconfig.WrapAny(&slashingmodulev1.Module{}), }, { Name: paramstypes.ModuleName, Config: appconfig.WrapAny(¶msmodulev1.Module{}), }, { Name: "tx", Config: appconfig.WrapAny(&txconfigv1.Config{}), }, { Name: genutiltypes.ModuleName, Config: appconfig.WrapAny(&genutilmodulev1.Module{}), }, { Name: authz.ModuleName, Config: appconfig.WrapAny(&authzmodulev1.Module{}), }, { Name: upgradetypes.ModuleName, Config: appconfig.WrapAny(&upgrademodulev1.Module{}), }, { Name: distrtypes.ModuleName, Config: appconfig.WrapAny(&distrmodulev1.Module{}), }, { Name: evidencetypes.ModuleName, Config: appconfig.WrapAny(&evidencemodulev1.Module{}), }, { Name: minttypes.ModuleName, Config: appconfig.WrapAny(&mintmodulev1.Module{}), }, { Name: group.ModuleName, Config: appconfig.WrapAny(&groupmodulev1.Module{ MaxExecutionPeriod: durationpb.New(time.Second * 1209600), MaxMetadataLen: 255, }), }, { Name: feegrant.ModuleName, Config: appconfig.WrapAny(&feegrantmodulev1.Module{}), }, { Name: govtypes.ModuleName, Config: appconfig.WrapAny(&govmodulev1.Module{}), }, { Name: crisistypes.ModuleName, Config: appconfig.WrapAny(&crisismodulev1.Module{}), }, { Name: consensustypes.ModuleName, Config: appconfig.WrapAny(&consensusmodulev1.Module{}), }, { Name: reputationmoduletypes.ModuleName, Config: appconfig.WrapAny(&reputationmodulev1.Module{}), }, { Name: inflationmoduletypes.ModuleName, Config: appconfig.WrapAny(&inflationmodulev1.Module{}), }, { Name: epochsmoduletypes.ModuleName, Config: appconfig.WrapAny(&epochsmodulev1.Module{}), }, }, }) )
Functions ¶
func BlockedAddresses ¶
BlockedAddresses returns all the app's blocked account addresses.
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
NOTE: This is solely to be used for testing purposes.
func MakeEncodingConfig ¶
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing
Types ¶
type App ¶
type App struct { *runtime.App // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper *stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper MintKeeper mintkeeper.Keeper DistrKeeper distrkeeper.Keeper GovKeeper *govkeeper.Keeper CrisisKeeper *crisiskeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper AuthzKeeper authzkeeper.Keeper EvidenceKeeper evidencekeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper GroupKeeper groupkeeper.Keeper ConsensusParamsKeeper consensuskeeper.Keeper // IBC IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly IBCFeeKeeper ibcfeekeeper.Keeper ICAControllerKeeper icacontrollerkeeper.Keeper ICAHostKeeper icahostkeeper.Keeper TransferKeeper ibctransferkeeper.Keeper // Scoped IBC ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedIBCTransferKeeper capabilitykeeper.ScopedKeeper ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper ScopedICAHostKeeper capabilitykeeper.ScopedKeeper // Ethermint keepers EvmKeeper *evmkeeper.Keeper FeeMarketKeeper *feemarketkeeper.Keeper ReputationKeeper reputationmodulekeeper.Keeper InflationKeeper inflationmodulekeeper.Keeper EpochsKeeper *epochsmodulekeeper.Keeper // contains filtered or unexported fields }
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 cosmosdb.DB, traceStore io.Writer, loadLatest bool, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *App
New returns a reference to an initialized App.
func (*App) AppCodec ¶
AppCodec returns App'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 (*App) AutoCliOpts ¶ added in v0.2.0
func (app *App) AutoCliOpts() autocli.AppOptions
AutoCliOpts returns the autocli options for the app.
func (*App) ExportAppStateAndValidators ¶
func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*App) GetEVMKeeper ¶
func (*App) GetIBCeKeeper ¶
GetIBCeKeeper returns the IBC keeper
func (*App) GetKey ¶
func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey
GetKey returns the KVStoreKey for the provided store key.
func (*App) GetSubspace ¶
func (app *App) GetSubspace(moduleName string) paramstypes.Subspace
GetSubspace returns a param subspace for a given module name.
func (*App) GetTransientKey ¶
func (app *App) GetTransientKey(storeKey string) *storetypes.TransientStoreKey
GetTransientKey returns the TransientStoreKey for the provided store key.
func (*App) InitChainer ¶
func (app *App) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
InitChainer application update at chain initialization
func (*App) InterfaceRegistry ¶
func (app *App) InterfaceRegistry() codectypes.InterfaceRegistry
InterfaceRegistry returns App's InterfaceRegistry
func (*App) LegacyAmino ¶
func (app *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) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*App) SimulationManager ¶
func (app *App) 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 ¶
func NewDefaultGenesisState(cdc codec.JSONCodec) GenesisState
NewDefaultGenesisState generates the default state for the application.