Upgrade to Stargate RC2

This commit is contained in:
Alex Peters
2020-11-03 18:20:26 +01:00
parent 1846f62f80
commit bf83c4476c
24 changed files with 569 additions and 511 deletions

53
app/test_helpers.go Normal file
View File

@@ -0,0 +1,53 @@
package app
import (
"testing"
"github.com/CosmWasm/wasmd/x/wasm"
"github.com/cosmos/cosmos-sdk/codec"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
ibctransferkeeper "github.com/cosmos/cosmos-sdk/x/ibc/applications/transfer/keeper"
ibckeeper "github.com/cosmos/cosmos-sdk/x/ibc/core/keeper"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
)
type TestSupport struct {
t *testing.T
app *WasmApp
}
func NewTestSupport(t *testing.T, app *WasmApp) *TestSupport {
return &TestSupport{t: t, app: app}
}
func (s TestSupport) IBCKeeper() ibckeeper.Keeper {
return *s.app.ibcKeeper
}
func (s TestSupport) WasmKeeper() wasm.Keeper {
return s.app.wasmKeeper
}
func (s TestSupport) AppCodec() codec.Marshaler {
return s.app.appCodec
}
func (s TestSupport) StakingKeeper() stakingkeeper.Keeper {
return s.app.stakingKeeper
}
func (s TestSupport) BankKeeper() bankkeeper.Keeper {
return s.app.bankKeeper
}
func (s TestSupport) TransferKeeper() ibctransferkeeper.Keeper {
return s.app.transferKeeper
}
// EmptyAppOptions is a stub implementing AppOptions
type EmptyAppOptions struct{}
// Get implements AppOptions
func (ao EmptyAppOptions) Get(o string) interface{} {
return nil
}