Documentation
¶
Index ¶
- func CreateMultiStore(keys map[string]*storetypes.KVStoreKey, logger log.Logger) storetypes.CommitMultiStore
- type IntegationApp
- func (app *IntegationApp) AddBlock()
- func (app *IntegationApp) AddTime(seconds int64)
- func (app *IntegationApp) Context() sdk.Context
- func (app *IntegationApp) QueryHelper() *baseapp.QueryServiceTestHelper
- func (app *IntegationApp) RunMsg(msg sdk.Msg, option ...integration.Option) (*codectypes.Any, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMultiStore ¶
func CreateMultiStore(keys map[string]*storetypes.KVStoreKey, logger log.Logger) storetypes.CommitMultiStore
CreateMultiStore is a helper for setting up multiple stores for provided modules.
Types ¶
type IntegationApp ¶
IntegationApp is a test application that can be used to test the integration of modules.
func NewIntegrationApp ¶
func NewIntegrationApp( sdkCtx sdk.Context, logger log.Logger, keys map[string]*storetypes.KVStoreKey, appCodec codec.Codec, modules map[string]appmodule.AppModule, ) *IntegationApp
NewIntegrationApp creates an application for testing purposes. This application is able to route messages to their respective handlers.
func (*IntegationApp) AddBlock ¶
func (app *IntegationApp) AddBlock()
AddBlock increments the block number of the application context.
func (*IntegationApp) AddTime ¶
func (app *IntegationApp) AddTime(seconds int64)
AddTime adds time to the application context.
func (*IntegationApp) Context ¶
func (app *IntegationApp) Context() sdk.Context
Context returns the application context. It can be unwrapped to a sdk.Context, with the sdk.UnwrapSDKContext function.
func (*IntegationApp) QueryHelper ¶
func (app *IntegationApp) QueryHelper() *baseapp.QueryServiceTestHelper
QueryHelper returns the application query helper. It can be used when registering query services.
func (*IntegationApp) RunMsg ¶
func (app *IntegationApp) RunMsg(msg sdk.Msg, option ...integration.Option) (*codectypes.Any, error)
RunMsg provides the ability to run a message and return the response. In order to run a message, the application must have a handler for it. These handlers are registered on the application message service router. The result of the message execution is returned as an Any type. That any type can be unmarshaled to the expected response type. If the message execution fails, an error is returned.