github.com/okex/exchain@v1.8.0/libs/ibc-go/testing/simapp/types.go (about)

     1  package simapp
     2  
     3  import (
     4  	"encoding/json"
     5  	abci "github.com/okex/exchain/libs/tendermint/abci/types"
     6  	tmtypes "github.com/okex/exchain/libs/tendermint/types"
     7  
     8  	//"github.com/okex/exchain/libs/cosmos-sdk/server/types"
     9  	sdk "github.com/okex/exchain/libs/cosmos-sdk/types"
    10  	"github.com/okex/exchain/libs/cosmos-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 abci.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, jailWhiteList []string,
    38  	) (json.RawMessage, []tmtypes.GenesisValidator, 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  }