Documentation ¶
Overview ¶
Mostly copied from https://github.com/cosmos/gaia/tree/master/app
Mostly copied from https://github.com/cosmos/gaia/tree/master/app
Index ¶
- Constants
- Variables
- func GetMaccPerms() map[string][]string
- func MakeCodecs() (codec.Marshaler, *codec.LegacyAmino)
- func MakeEncodingConfig() params.EncodingConfig
- func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router)
- type GenesisState
- type RegenApp
- func (app *RegenApp) AppCodec() codec.Marshaler
- 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) *sdk.KVStoreKey
- func (app *RegenApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey
- func (app *RegenApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *RegenApp) GetTKey(storeKey string) *sdk.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" )
Variables ¶
var ( // DefaultNodeHome default home directories for regen DefaultNodeHome = os.ExpandEnv("$HOME/.regen") // The ModuleBasicManager is in charge of setting up basic, // non-dependant module elements, such as codec registration // and genesis verification. ModuleBasics = module.NewBasicManager( append([]module.AppModuleBasic{ 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{}, transfer.AppModuleBasic{}, vesting.AppModuleBasic{}, }, setCustomModuleBasics()...)..., ) )
Functions ¶
func GetMaccPerms ¶ added in v0.6.0
GetMaccPerms returns a copy of the module account permissions
func MakeCodecs ¶ added in v0.6.0
func MakeCodecs() (codec.Marshaler, *codec.LegacyAmino)
MakeCodecs constructs the *std.Codec and *codec.LegacyAmino instances used by Regenapp. It is useful for tests and clients who do not want to construct the full Regenapp
func MakeEncodingConfig ¶ added in v0.6.0
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates an EncodingConfig
Types ¶
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.JSONMarshaler) GenesisState
NewDefaultGenesisState generates the default state for the application.
type RegenApp ¶ added in v0.6.0
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 EvidenceKeeper evidencekeeper.Keeper TransferKeeper ibctransferkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper ScopedIBCMockKeeper capabilitykeeper.ScopedKeeper // contains filtered or unexported fields }
Extended ABCI application
func NewRegenApp ¶ added in v0.6.0
func NewRegenApp(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig simappparams.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp)) *RegenApp
NewRegenApp returns a reference to an initialized RegenApp.
func (*RegenApp) AppCodec ¶ added in v0.6.0
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 ¶ added in v0.6.0
func (app *RegenApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*RegenApp) EndBlocker ¶ added in v0.6.0
func (app *RegenApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block
func (*RegenApp) ExportAppStateAndValidators ¶ added in v0.6.0
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 ¶ added in v0.6.0
func (app *RegenApp) 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 (*RegenApp) GetMemKey ¶ added in v0.6.0
func (app *RegenApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*RegenApp) GetSubspace ¶ added in v0.6.0
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 ¶ added in v0.6.0
func (app *RegenApp) 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 (*RegenApp) InitChainer ¶ added in v0.6.0
func (app *RegenApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application update at chain initialization
func (*RegenApp) InterfaceRegistry ¶ added in v0.6.0
func (app *RegenApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns RegenApp's InterfaceRegistry
func (*RegenApp) LegacyAmino ¶ added in v0.6.0
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 ¶ added in v0.6.0
LoadHeight loads a particular height
func (*RegenApp) ModuleAccountAddrs ¶ added in v0.6.0
ModuleAccountAddrs returns all the app's module account addresses.
func (*RegenApp) RegisterAPIRoutes ¶ added in v0.6.0
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*RegenApp) RegisterTendermintService ¶ added in v0.6.0
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*RegenApp) RegisterTxService ¶ added in v0.6.0
RegisterTxService implements the Application.RegisterTxService method.
func (*RegenApp) SimulationManager ¶ added in v0.6.0
func (app *RegenApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface