2019-12-17 10:28:52 -08:00
|
|
|
package simapp
|
|
|
|
|
|
|
|
import (
|
|
|
|
abci "github.com/tendermint/tendermint/abci/types"
|
|
|
|
|
|
|
|
"github.com/cosmos/cosmos-sdk/codec"
|
2020-09-03 03:11:46 -07:00
|
|
|
"github.com/cosmos/cosmos-sdk/server/types"
|
2019-12-17 10:28:52 -08:00
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
|
|
"github.com/cosmos/cosmos-sdk/types/module"
|
|
|
|
)
|
|
|
|
|
|
|
|
// App implements the common methods for a Cosmos SDK-based application
|
|
|
|
// specific blockchain.
|
|
|
|
type App interface {
|
|
|
|
// The assigned name of the app.
|
|
|
|
Name() string
|
|
|
|
|
|
|
|
// The application types codec.
|
|
|
|
// NOTE: This shoult be sealed before being returned.
|
2020-08-10 12:41:21 -07:00
|
|
|
LegacyAmino() *codec.LegacyAmino
|
2019-12-17 10:28:52 -08:00
|
|
|
|
|
|
|
// Application updates every begin block.
|
|
|
|
BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
|
|
|
|
|
|
|
|
// Application updates every end block.
|
|
|
|
EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
|
|
|
|
|
|
|
|
// Application update at chain (i.e app) initialization.
|
|
|
|
InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
|
|
|
|
|
|
|
|
// Loads the app at a given height.
|
|
|
|
LoadHeight(height int64) error
|
|
|
|
|
|
|
|
// Exports the state of the application for a genesis file.
|
|
|
|
ExportAppStateAndValidators(
|
2020-08-25 08:55:19 -07:00
|
|
|
forZeroHeight bool, jailAllowedAddrs []string,
|
2020-09-03 03:11:46 -07:00
|
|
|
) (types.ExportedApp, error)
|
2019-12-17 10:28:52 -08:00
|
|
|
|
|
|
|
// All the registered module account addreses.
|
|
|
|
ModuleAccountAddrs() map[string]bool
|
|
|
|
|
|
|
|
// Helper for the simulation framework.
|
|
|
|
SimulationManager() *module.SimulationManager
|
|
|
|
}
|