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.Codec, *codec.LegacyAmino)
- func MakeEncodingConfig() params.EncodingConfig
- func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router)
- func SimulationOperations(app *RegenApp, cdc codec.Codec, config simulation.Config) []simulation.WeightedOperation
- type BlockTimerExecutor
- type Execute
- type GenesisState
- type RegenApp
- func (app *RegenApp) AddPatch(height int64, patch Execute)
- 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) *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{}, feegrantmodule.AppModuleBasic{}, authzmodule.AppModuleBasic{}, ecocreditmodule.Module{}, }, setCustomModuleBasics()...)..., ) )
Functions ¶
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
func MakeCodecs ¶
func MakeCodecs() (codec.Codec, *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 ¶
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates an EncodingConfig
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 BlockTimerExecutor ¶
type BlockTimerExecutor struct {
// contains filtered or unexported fields
}
BlockTimerExecutor is responsible for checking the permission to execute patches
func NewBlockTimerExecutor ¶
func NewBlockTimerExecutor() *BlockTimerExecutor
func (*BlockTimerExecutor) Start ¶
func (bte *BlockTimerExecutor) Start(ctx sdk.Context)
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 EvidenceKeeper evidencekeeper.Keeper TransferKeeper ibctransferkeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper AuthzKeeper authzkeeper.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 ¶
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 ¶
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) *sdk.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) *sdk.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) *sdk.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