cosmos-sdk/runtime/types.go
Aleksandr Bezobchuk 6cee22df52
feat!: Comet v0.38 Integration (#15519)
Co-authored-by: marbar3778 <marbar3778@yahoo.com>
Co-authored-by: cool-developer <51834436+cool-develope@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
2023-05-24 16:09:19 +00:00

42 lines
1.2 KiB
Go

package runtime
import (
abci "github.com/cometbft/cometbft/abci/types"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/server/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
)
const ModuleName = "runtime"
// App implements the common methods for a Cosmos SDK-based application
// specific blockchain.
type AppI interface {
// The assigned name of the app.
Name() string
// The application types codec.
// NOTE: This shoult be sealed before being returned.
LegacyAmino() *codec.LegacyAmino
// Application updates every begin block.
BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
// Application updates every end block.
EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)
// Application update at chain (i.e app) initialization.
InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
// Loads the app at a given height.
LoadHeight(height int64) error
// Exports the state of the application for a genesis file.
ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (types.ExportedApp, error)
// Helper for the simulation framework.
SimulationManager() *module.SimulationManager
}