github.com/Finschia/finschia-sdk@v0.48.1/simapp/types.go (about)

     1  package simapp
     2  
     3  import (
     4  	ocabci "github.com/Finschia/ostracon/abci/types"
     5  	abci "github.com/tendermint/tendermint/abci/types"
     6  
     7  	"github.com/Finschia/finschia-sdk/codec"
     8  	"github.com/Finschia/finschia-sdk/server/types"
     9  	sdk "github.com/Finschia/finschia-sdk/types"
    10  	"github.com/Finschia/finschia-sdk/types/module"
    11  )
    12  
    13  // App implements the common methods for a Cosmos SDK-based application
    14  // specific blockchain.
    15  type App interface {
    16  	// The assigned name of the app.
    17  	Name() string
    18  
    19  	// The application types codec.
    20  	// NOTE: This shoult be sealed before being returned.
    21  	LegacyAmino() *codec.LegacyAmino
    22  
    23  	// Application updates every begin block.
    24  	BeginBlocker(ctx sdk.Context, req ocabci.RequestBeginBlock) abci.ResponseBeginBlock
    25  
    26  	// Application updates every end block.
    27  	EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
    28  
    29  	// Application update at chain (i.e app) initialization.
    30  	InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
    31  
    32  	// Loads the app at a given height.
    33  	LoadHeight(height int64) error
    34  
    35  	// Exports the state of the application for a genesis file.
    36  	ExportAppStateAndValidators(
    37  		forZeroHeight bool, jailAllowedAddrs []string,
    38  	) (types.ExportedApp, error)
    39  
    40  	// All the registered module account addreses.
    41  	ModuleAccountAddrs() map[string]bool
    42  
    43  	// Helper for the simulation framework.
    44  	SimulationManager() *module.SimulationManager
    45  }