Documentation ¶
Overview ¶
Mostly copied from https://github.com/cosmos/gaia/tree/main/app
Mostly copied from https://github.com/cosmos/gaia/tree/main/app
Index ¶
- Constants
- Variables
- func GetMaccPerms() map[string][]string
- func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- func SimulationOperations(app *RegenApp, cdc codec.Codec, config simulation.Config) []simulation.WeightedOperation
- type EncodingConfig
- type GenesisState
- type RegenApp
- func (app *RegenApp) AppCodec() codec.Codec
- func (app *RegenApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *RegenApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *RegenApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *RegenApp) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *RegenApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *RegenApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *RegenApp) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *RegenApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *RegenApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *RegenApp) LegacyAmino() *codec.LegacyAmino
- func (app *RegenApp) LoadHeight(height int64) error
- func (app *RegenApp) ModuleAccountAddrs() map[string]bool
- func (app *RegenApp) Name() string
- func (app *RegenApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *RegenApp) RegisterTendermintService(clientCtx client.Context)
- func (app *RegenApp) RegisterTxService(clientCtx client.Context)
- func (app *RegenApp) SimulationManager() *module.SimulationManager
Constants ¶
const ( // Bech32PrefixAccAddr defines the Bech32 prefix of an account's address Bech32PrefixAccAddr = "regen" // Bech32PrefixAccPub defines the Bech32 prefix of an account's public key Bech32PrefixAccPub = "regenpub" // Bech32PrefixValAddr defines the Bech32 prefix of a validator's operator address Bech32PrefixValAddr = "regenvaloper" // Bech32PrefixValPub defines the Bech32 prefix of a validator's operator public key Bech32PrefixValPub = "regenvaloperpub" // Bech32PrefixConsAddr defines the Bech32 prefix of a consensus node address Bech32PrefixConsAddr = "regenvalcons" // Bech32PrefixConsPub defines the Bech32 prefix of a consensus node public key Bech32PrefixConsPub = "regenvalconspub" )
const ( AppName = "regen" // EnvPrefix environment variable prefix used to map environment // variables to command flags EnvPrefix = "REGEN" )
Variables ¶
var ( // DefaultNodeHome default home directories for regen DefaultNodeHome = os.ExpandEnv("$HOME/.regen") // ModuleBasics 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{}, params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, ibc.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, ibctransfer.AppModuleBasic{}, vesting.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, authzmodule.AppModuleBasic{}, groupmodule.AppModuleBasic{}, ecocreditmodule.Module{}, datamodule.Module{}, gov.NewAppModuleBasic( []govclient.ProposalHandler{ paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler, }, ), ica.AppModuleBasic{}, ibcfee.AppModuleBasic{}, intertxmodule.AppModule{}, ) )
Functions ¶
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
func RegisterSwaggerAPI ¶
RegisterSwaggerAPI registers swagger route with API Server
func SimulationOperations ¶
func SimulationOperations(app *RegenApp, cdc codec.Codec, config simulation.Config) []simulation.WeightedOperation
SimulationOperations retrieves the simulation params from the provided file path and returns all the modules weighted operations
Types ¶
type EncodingConfig ¶
type EncodingConfig struct { InterfaceRegistry types.InterfaceRegistry Codec codec.Codec TxConfig client.TxConfig Amino *codec.LegacyAmino }
EncodingConfig specifies the concrete encoding types to use for the app. This is provided for compatibility between protobuf and amino implementations.
func MakeEncodingConfig ¶
func MakeEncodingConfig() EncodingConfig
MakeEncodingConfig creates an EncodingConfig
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.
type RegenApp ¶
type RegenApp struct { *baseapp.BaseApp // 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 IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly ICAHostKeeper icahostkeeper.Keeper IBCFeeKeeper ibcfeekeeper.Keeper ICAControllerKeeper icacontrollerkeeper.Keeper InterTxKeeper intertxkeeper.Keeper EvidenceKeeper evidencekeeper.Keeper IBCTransferKeeper ibctransferkeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper AuthzKeeper authzkeeper.Keeper GroupKeeper groupkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedIBCTransferKeeper capabilitykeeper.ScopedKeeper ScopedICAHostKeeper capabilitykeeper.ScopedKeeper ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper ScopedInterTxKeeper capabilitykeeper.ScopedKeeper // the module manager ModuleManager *module.Manager // contains filtered or unexported fields }
RegenApp extends an ABCI application.
func NewRegenApp ¶
func NewRegenApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp)) *RegenApp
NewRegenApp returns a reference to an initialized RegenApp.
func (*RegenApp) AppCodec ¶
AppCodec returns RegenApp'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 (*RegenApp) BeginBlocker ¶
func (app *RegenApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*RegenApp) EndBlocker ¶
func (app *RegenApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block
func (*RegenApp) ExportAppStateAndValidators ¶
func (app *RegenApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*RegenApp) GetKey ¶
func (app *RegenApp) 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 (*RegenApp) GetMemKey ¶
func (app *RegenApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*RegenApp) GetSubspace ¶
func (app *RegenApp) 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 (*RegenApp) GetTKey ¶
func (app *RegenApp) GetTKey(storeKey string) *storetypes.TransientStoreKey
GetTKey returns the TransientStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*RegenApp) InitChainer ¶
func (app *RegenApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application update at chain initialization
func (*RegenApp) InterfaceRegistry ¶
func (app *RegenApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns RegenApp's InterfaceRegistry
func (*RegenApp) LegacyAmino ¶
func (app *RegenApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns RegenApp'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 (*RegenApp) LoadHeight ¶
LoadHeight loads a particular height
func (*RegenApp) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*RegenApp) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*RegenApp) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*RegenApp) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (*RegenApp) SimulationManager ¶
func (app *RegenApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface