Skip to content

Commit

Permalink
Remove Wasmer references
Browse files Browse the repository at this point in the history
  • Loading branch information
pinosu committed Sep 4, 2023
1 parent 0371b65 commit ffcfa8d
Show file tree
Hide file tree
Showing 19 changed files with 100 additions and 99 deletions.
12 changes: 6 additions & 6 deletions x/wasm/ibc_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestOnChanOpenInitVersion(t *testing.T) {
var (
chainAOpts = []wasmkeeper.Option{
wasmkeeper.WithWasmEngine(
wasmtesting.NewIBCContractMockWasmer(myContract)),
wasmtesting.NewIBCContractMockWasmEngine(myContract)),
}
coordinator = wasmibctesting.NewCoordinator(t, 2, chainAOpts)
chainA = coordinator.GetChain(wasmibctesting.GetChainID(1))
Expand Down Expand Up @@ -100,7 +100,7 @@ func TestOnChanOpenTryVersion(t *testing.T) {
var (
chainAOpts = []wasmkeeper.Option{
wasmkeeper.WithWasmEngine(
wasmtesting.NewIBCContractMockWasmer(myContract)),
wasmtesting.NewIBCContractMockWasmEngine(myContract)),
}
coordinator = wasmibctesting.NewCoordinator(t, 2, chainAOpts)
chainA = coordinator.GetChain(wasmibctesting.GetChainID(1))
Expand Down Expand Up @@ -225,12 +225,12 @@ func TestOnIBCPacketReceive(t *testing.T) {

// mock to submit an ibc data package from given chain and capture the ack
type captureAckTestContractEngine struct {
*wasmtesting.MockWasmer
*wasmtesting.MockWasmEngine
}

// NewCaptureAckTestContractEngine constructor
func NewCaptureAckTestContractEngine() *captureAckTestContractEngine {
m := wasmtesting.NewIBCContractMockWasmer(&wasmtesting.MockIBCContractCallbacks{
m := wasmtesting.NewIBCContractMockWasmEngine(&wasmtesting.MockIBCContractCallbacks{
IBCChannelOpenFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBC3ChannelOpenResponse, uint64, error) {
return &wasmvmtypes.IBC3ChannelOpenResponse{}, 0, nil
},
Expand All @@ -245,7 +245,7 @@ func NewCaptureAckTestContractEngine() *captureAckTestContractEngine {
func (x *captureAckTestContractEngine) SubmitIBCPacket(t *testing.T, path *wasmibctesting.Path, chainA *wasmibctesting.TestChain, senderContractAddr sdk.AccAddress, packetData []byte) *[]byte {
t.Helper()
// prepare a bridge to send an ibc packet by an ordinary wasm execute message
x.MockWasmer.ExecuteFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) {
x.MockWasmEngine.ExecuteFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) {
return &wasmvmtypes.Response{
Messages: []wasmvmtypes.SubMsg{{ID: 1, ReplyOn: wasmvmtypes.ReplyNever, Msg: wasmvmtypes.CosmosMsg{IBC: &wasmvmtypes.IBCMsg{SendPacket: &wasmvmtypes.SendPacketMsg{
ChannelID: path.EndpointA.ChannelID, Data: executeMsg, Timeout: wasmvmtypes.IBCTimeout{Block: &wasmvmtypes.IBCTimeoutBlock{Revision: 1, Height: 10000000}},
Expand All @@ -254,7 +254,7 @@ func (x *captureAckTestContractEngine) SubmitIBCPacket(t *testing.T, path *wasmi
}
// capture acknowledgement
var gotAck []byte
x.MockWasmer.IBCPacketAckFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketAckMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) {
x.MockWasmEngine.IBCPacketAckFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketAckMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) {
gotAck = msg.Acknowledgement.Data
return &wasmvmtypes.IBCBasicResponse{}, 0, nil
}
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/ibctesting/wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var wasmIdent = []byte("\x00\x61\x73\x6D")

// SeedNewContractInstance stores some wasm code and instantiates a new contract on this chain.
// This method can be called to prepare the store with some valid CodeInfo and ContractInfo. The returned
// Address is the contract address for this instance. Test should make use of this data and/or use NewIBCContractMockWasmer
// Address is the contract address for this instance. Test should make use of this data and/or use NewIBCContractMockWasmEngine
// for using a contract mock in Go.
func (chain *TestChain) SeedNewContractInstance() sdk.AccAddress {
pInstResp := chain.StoreCode(append(wasmIdent, rand.Bytes(10)...))
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/keeper/contract_keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func TestInstantiate2(t *testing.T) {

example := StoreHackatomExampleContract(t, parentCtx, keepers)
otherExample := StoreReflectContract(t, parentCtx, keepers)
mock := &wasmtesting.MockWasmer{}
mock := &wasmtesting.MockWasmEngine{}
wasmtesting.MakeInstantiable(mock)
keepers.WasmKeeper.wasmVM = mock // set mock to not fail on contract init message

Expand Down
2 changes: 1 addition & 1 deletion x/wasm/keeper/handler_plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ func TestBurnCoinMessageHandlerIntegration(t *testing.T) {
for name, spec := range specs {
t.Run(name, func(t *testing.T) {
ctx, _ = parentCtx.CacheContext()
k.wasmVM = &wasmtesting.MockWasmer{ExecuteFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) {
k.wasmVM = &wasmtesting.MockWasmEngine{ExecuteFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) {
return &wasmvmtypes.Response{
Messages: []wasmvmtypes.SubMsg{
{Msg: wasmvmtypes.CosmosMsg{Bank: &wasmvmtypes.BankMsg{Burn: &spec.msg}}, ReplyOn: wasmvmtypes.ReplyNever},
Expand Down
6 changes: 3 additions & 3 deletions x/wasm/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ var defaultAcceptedAccountTypes = map[reflect.Type]struct{}{
reflect.TypeOf(&authtypes.BaseAccount{}): {},
}

// Keeper will have a reference to Wasmer with it's own data directory.
// Keeper will have a reference to Wasm Engine with it's own data directory.
type Keeper struct {
storeKey storetypes.StoreKey
cdc codec.Codec
accountKeeper types.AccountKeeper
bank CoinTransferrer
portKeeper types.PortKeeper
capabilityKeeper types.CapabilityKeeper
wasmVM types.WasmerEngine
wasmVM types.WasmEngine
wasmVMQueryHandler WasmVMQueryHandler
wasmVMResponseHandler WasmVMResponseHandler
messenger Messenger
Expand Down Expand Up @@ -1026,7 +1026,7 @@ func (k Keeper) consumeRuntimeGas(ctx sdk.Context, gas uint64) {
ctx.GasMeter().ConsumeGas(consumed, "wasm contract")
// throw OutOfGas error if we ran out (got exactly to zero due to better limit enforcing)
if ctx.GasMeter().IsOutOfGas() {
panic(sdk.ErrorOutOfGas{Descriptor: "Wasmer function execution"})
panic(sdk.ErrorOutOfGas{Descriptor: "Wasm engine function execution"})
}
}

Expand Down
22 changes: 11 additions & 11 deletions x/wasm/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -711,15 +711,15 @@ func TestInstantiateWithNonExistingCodeID(t *testing.T) {
func TestInstantiateWithContractDataResponse(t *testing.T) {
ctx, keepers := CreateTestInput(t, false, AvailableCapabilities)

wasmerMock := &wasmtesting.MockWasmer{
wasmEngineMock := &wasmtesting.MockWasmEngine{
InstantiateFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) {
return &wasmvmtypes.Response{Data: []byte("my-response-data")}, 0, nil
},
AnalyzeCodeFn: wasmtesting.WithoutIBCAnalyzeFn,
StoreCodeFn: wasmtesting.NoOpStoreCodeFn,
}

example := StoreRandomContract(t, ctx, keepers, wasmerMock)
example := StoreRandomContract(t, ctx, keepers, wasmEngineMock)
_, data, err := keepers.ContractKeeper.Instantiate(ctx, example.CodeID, example.CreatorAddr, nil, nil, "test", nil)
require.NoError(t, err)
assert.Equal(t, []byte("my-response-data"), data)
Expand All @@ -738,7 +738,7 @@ func TestInstantiateWithContractFactoryChildQueriesParent(t *testing.T) {

var instantiationCount int
callbacks := make([]func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error), 2)
wasmerMock := &wasmtesting.MockWasmer{
wasmEngineMock := &wasmtesting.MockWasmEngine{
// dispatch instantiation calls to callbacks
InstantiateFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) {
require.Greater(t, len(callbacks), instantiationCount, "unexpected call to instantiation")
Expand All @@ -758,7 +758,7 @@ func TestInstantiateWithContractFactoryChildQueriesParent(t *testing.T) {
// overwrite wasmvm in response handler
keeper.wasmVMResponseHandler = NewDefaultWasmVMContractResponseHandler(NewMessageDispatcher(keeper.messenger, keeper))

example := StoreRandomContract(t, ctx, keepers, wasmerMock)
example := StoreRandomContract(t, ctx, keepers, wasmEngineMock)
// factory contract
callbacks[0] = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) {
t.Log("called factory")
Expand Down Expand Up @@ -1467,7 +1467,7 @@ func TestIterateContractsByCode(t *testing.T) {

func TestIterateContractsByCodeWithMigration(t *testing.T) {
// mock migration so that it does not fail when migrate example1 to example2.codeID
mockWasmVM := wasmtesting.MockWasmer{MigrateFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, migrateMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) {
mockWasmVM := wasmtesting.MockWasmEngine{MigrateFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, migrateMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) {
return &wasmvmtypes.Response{}, 1, nil
}}
wasmtesting.MakeInstantiable(&mockWasmVM)
Expand Down Expand Up @@ -1733,7 +1733,7 @@ func TestPinCode(t *testing.T) {
k := keepers.WasmKeeper

var capturedChecksums []wasmvm.Checksum
mock := wasmtesting.MockWasmer{PinFn: func(checksum wasmvm.Checksum) error {
mock := wasmtesting.MockWasmEngine{PinFn: func(checksum wasmvm.Checksum) error {
capturedChecksums = append(capturedChecksums, checksum)
return nil
}}
Expand All @@ -1760,7 +1760,7 @@ func TestUnpinCode(t *testing.T) {
k := keepers.WasmKeeper

var capturedChecksums []wasmvm.Checksum
mock := wasmtesting.MockWasmer{
mock := wasmtesting.MockWasmEngine{
PinFn: func(checksum wasmvm.Checksum) error {
return nil
},
Expand Down Expand Up @@ -1794,7 +1794,7 @@ func TestInitializePinnedCodes(t *testing.T) {
k := keepers.WasmKeeper

var capturedChecksums []wasmvm.Checksum
mock := wasmtesting.MockWasmer{PinFn: func(checksum wasmvm.Checksum) error {
mock := wasmtesting.MockWasmEngine{PinFn: func(checksum wasmvm.Checksum) error {
capturedChecksums = append(capturedChecksums, checksum)
return nil
}}
Expand Down Expand Up @@ -1822,7 +1822,7 @@ func TestInitializePinnedCodes(t *testing.T) {

func TestPinnedContractLoops(t *testing.T) {
var capturedChecksums []wasmvm.Checksum
mock := wasmtesting.MockWasmer{PinFn: func(checksum wasmvm.Checksum) error {
mock := wasmtesting.MockWasmEngine{PinFn: func(checksum wasmvm.Checksum) error {
capturedChecksums = append(capturedChecksums, checksum)
return nil
}}
Expand Down Expand Up @@ -1948,7 +1948,7 @@ func TestNewDefaultWasmVMContractResponseHandler(t *testing.T) {
func TestReply(t *testing.T) {
ctx, keepers := CreateTestInput(t, false, AvailableCapabilities)
k := keepers.WasmKeeper
var mock wasmtesting.MockWasmer
var mock wasmtesting.MockWasmEngine
wasmtesting.MakeInstantiable(&mock)
example := SeedNewContractInstance(t, ctx, keepers, &mock)

Expand Down Expand Up @@ -2017,7 +2017,7 @@ func TestReply(t *testing.T) {
func TestQueryIsolation(t *testing.T) {
ctx, keepers := CreateTestInput(t, false, AvailableCapabilities)
k := keepers.WasmKeeper
var mock wasmtesting.MockWasmer
var mock wasmtesting.MockWasmEngine
wasmtesting.MakeInstantiable(&mock)
example := SeedNewContractInstance(t, ctx, keepers, &mock)
WithQueryHandlerDecorator(func(other WasmVMQueryHandler) WasmVMQueryHandler {
Expand Down
4 changes: 2 additions & 2 deletions x/wasm/keeper/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ func (f postOptsFn) apply(keeper *Keeper) {

// WithWasmEngine is an optional constructor parameter to replace the default wasmVM engine with the
// given one.
func WithWasmEngine(x types.WasmerEngine) Option {
func WithWasmEngine(x types.WasmEngine) Option {
return optsFn(func(k *Keeper) {
k.wasmVM = x
})
}

// WithWasmEngineDecorator is an optional constructor parameter to decorate the default wasmVM engine.
func WithWasmEngineDecorator(d func(old types.WasmerEngine) types.WasmerEngine) Option {
func WithWasmEngineDecorator(d func(old types.WasmEngine) types.WasmEngine) Option {
return postOptsFn(func(k *Keeper) {
k.wasmVM = d(k.wasmVM)
})
Expand Down
13 changes: 7 additions & 6 deletions x/wasm/keeper/options_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package keeper

import (
"github.com/prometheus/client_golang/prometheus"
"reflect"
"testing"

"github.com/prometheus/client_golang/prometheus"

wasmvm "github.com/CosmWasm/wasmvm"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand All @@ -26,10 +27,10 @@ func TestConstructorOptions(t *testing.T) {
isPostOpt bool
}{
"wasm engine": {
srcOpt: WithWasmEngine(&wasmtesting.MockWasmer{}),
srcOpt: WithWasmEngine(&wasmtesting.MockWasmEngine{}),
verify: func(t *testing.T, k Keeper) {
t.Helper()
assert.IsType(t, &wasmtesting.MockWasmer{}, k.wasmVM)
assert.IsType(t, &wasmtesting.MockWasmEngine{}, k.wasmVM)
},
},
"vm cache metrics": {
Expand All @@ -42,13 +43,13 @@ func TestConstructorOptions(t *testing.T) {
isPostOpt: true,
},
"decorate wasmvm": {
srcOpt: WithWasmEngineDecorator(func(old types.WasmerEngine) types.WasmerEngine {
srcOpt: WithWasmEngineDecorator(func(old types.WasmEngine) types.WasmEngine {
require.IsType(t, &wasmvm.VM{}, old)
return &wasmtesting.MockWasmer{}
return &wasmtesting.MockWasmEngine{}
}),
verify: func(t *testing.T, k Keeper) {
t.Helper()
assert.IsType(t, &wasmtesting.MockWasmer{}, k.wasmVM)
assert.IsType(t, &wasmtesting.MockWasmEngine{}, k.wasmVM)
},
isPostOpt: true,
},
Expand Down
6 changes: 3 additions & 3 deletions x/wasm/keeper/proposal_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ func TestPinCodesProposal(t *testing.T) {
ctx, keepers := CreateTestInput(t, false, "staking")
wasmKeeper := keepers.WasmKeeper

mock := wasmtesting.MockWasmer{
mock := wasmtesting.MockWasmEngine{
StoreCodeFn: wasmtesting.NoOpStoreCodeFn,
AnalyzeCodeFn: wasmtesting.WithoutIBCAnalyzeFn,
}
Expand Down Expand Up @@ -745,7 +745,7 @@ func TestUnpinCodesProposal(t *testing.T) {
ctx, keepers := CreateTestInput(t, false, "staking")
wasmKeeper := keepers.WasmKeeper

mock := wasmtesting.MockWasmer{
mock := wasmtesting.MockWasmEngine{
StoreCodeFn: wasmtesting.NoOpStoreCodeFn,
AnalyzeCodeFn: wasmtesting.WithoutIBCAnalyzeFn,
}
Expand Down Expand Up @@ -835,7 +835,7 @@ func TestUpdateInstantiateConfigProposal(t *testing.T) {
ctx, keepers := CreateTestInput(t, false, "staking")
wasmKeeper := keepers.WasmKeeper

mock := wasmtesting.MockWasmer{
mock := wasmtesting.MockWasmEngine{
StoreCodeFn: wasmtesting.NoOpStoreCodeFn,
AnalyzeCodeFn: wasmtesting.WithoutIBCAnalyzeFn,
}
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/keeper/querier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func TestQuerySmartContractPanics(t *testing.T) {
}
for msg, spec := range specs {
t.Run(msg, func(t *testing.T) {
keepers.WasmKeeper.wasmVM = &wasmtesting.MockWasmer{QueryFn: func(checksum wasmvm.Checksum, env wasmvmtypes.Env, queryMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) ([]byte, uint64, error) {
keepers.WasmKeeper.wasmVM = &wasmtesting.MockWasmEngine{QueryFn: func(checksum wasmvm.Checksum, env wasmvmtypes.Env, queryMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) ([]byte, uint64, error) {
spec.doInContract()
return nil, 0, nil
}}
Expand Down
4 changes: 2 additions & 2 deletions x/wasm/keeper/recurse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func initRecurseContract(t *testing.T) (contract sdk.AccAddress, ctx sdk.Context
func TestGasCostOnQuery(t *testing.T) {
const (
GasNoWork uint64 = 63_950
// Note: about 100 SDK gas (10k wasmer gas) for each round of sha256
// Note: about 100 SDK gas (10k CosmWasm gas) for each round of sha256
GasWork50 uint64 = 64_218 // this is a little shy of 50k gas - to keep an eye on the limit

GasReturnUnhashed uint64 = 29
Expand Down Expand Up @@ -208,7 +208,7 @@ func TestLimitRecursiveQueryGas(t *testing.T) {
// eventually hitting an OutOfGas panic.

const (
// Note: about 100 SDK gas (10k wasmer gas) for each round of sha256
// Note: about 100 SDK gas (10k CosmWasm gas) for each round of sha256
GasWork2k uint64 = 77_161 // = NewContractInstanceCosts + x // we have 6x gas used in cpu than in the instance
// This is overhead for calling into a sub-contract
GasReturnHashed uint64 = 25
Expand Down
12 changes: 6 additions & 6 deletions x/wasm/keeper/relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

func TestOnOpenChannel(t *testing.T) {
var m wasmtesting.MockWasmer
var m wasmtesting.MockWasmEngine
wasmtesting.MakeIBCInstantiable(&m)
messenger := &wasmtesting.MockMessageHandler{}
parentCtx, keepers := CreateTestInput(t, false, AvailableCapabilities, WithMessageHandler(messenger))
Expand Down Expand Up @@ -88,7 +88,7 @@ func TestOnOpenChannel(t *testing.T) {
}

func TestOnConnectChannel(t *testing.T) {
var m wasmtesting.MockWasmer
var m wasmtesting.MockWasmEngine
wasmtesting.MakeIBCInstantiable(&m)
messenger := &wasmtesting.MockMessageHandler{}
parentCtx, keepers := CreateTestInput(t, false, AvailableCapabilities, WithMessageHandler(messenger))
Expand Down Expand Up @@ -200,7 +200,7 @@ func TestOnConnectChannel(t *testing.T) {
}

func TestOnCloseChannel(t *testing.T) {
var m wasmtesting.MockWasmer
var m wasmtesting.MockWasmEngine
wasmtesting.MakeIBCInstantiable(&m)
messenger := &wasmtesting.MockMessageHandler{}
parentCtx, keepers := CreateTestInput(t, false, AvailableCapabilities, WithMessageHandler(messenger))
Expand Down Expand Up @@ -310,7 +310,7 @@ func TestOnCloseChannel(t *testing.T) {
}

func TestOnRecvPacket(t *testing.T) {
var m wasmtesting.MockWasmer
var m wasmtesting.MockWasmEngine
wasmtesting.MakeIBCInstantiable(&m)
messenger := &wasmtesting.MockMessageHandler{}
parentCtx, keepers := CreateTestInput(t, false, AvailableCapabilities, WithMessageHandler(messenger))
Expand Down Expand Up @@ -500,7 +500,7 @@ func TestOnRecvPacket(t *testing.T) {
}

func TestOnAckPacket(t *testing.T) {
var m wasmtesting.MockWasmer
var m wasmtesting.MockWasmEngine
wasmtesting.MakeIBCInstantiable(&m)
messenger := &wasmtesting.MockMessageHandler{}
parentCtx, keepers := CreateTestInput(t, false, AvailableCapabilities, WithMessageHandler(messenger))
Expand Down Expand Up @@ -605,7 +605,7 @@ func TestOnAckPacket(t *testing.T) {
}

func TestOnTimeoutPacket(t *testing.T) {
var m wasmtesting.MockWasmer
var m wasmtesting.MockWasmEngine
wasmtesting.MakeIBCInstantiable(&m)
messenger := &wasmtesting.MockMessageHandler{}
parentCtx, keepers := CreateTestInput(t, false, AvailableCapabilities, WithMessageHandler(messenger))
Expand Down
Loading

0 comments on commit ffcfa8d

Please sign in to comment.