diff --git a/tests/e2e/reflect_helper.go b/tests/e2e/reflect_helper.go index 0650211e..f857c8da 100644 --- a/tests/e2e/reflect_helper.go +++ b/tests/e2e/reflect_helper.go @@ -18,10 +18,10 @@ import ( "github.com/CosmWasm/wasmd/x/wasm/types" ) -// InstantiateStargateReflectContract stores and instantiates a pre 2.0 reflect contract instance. +// InstantiateStargateReflectContract stores and instantiates the reflect contract shipped with CosmWasm 1.5.3. // This instance still expects the old CosmosMsg.Stargate variant instead of the new CosmosMsg.Any. func InstantiateStargateReflectContract(t *testing.T, chain *ibctesting.TestChain) sdk.AccAddress { - codeID := chain.StoreCodeFile("../../x/wasm/keeper/testdata/stargate_reflect.wasm").CodeID + codeID := chain.StoreCodeFile("../../x/wasm/keeper/testdata/reflect_1_5.wasm").CodeID contractAddr := chain.InstantiateContract(codeID, []byte(`{}`)) require.NotEmpty(t, contractAddr) return contractAddr diff --git a/x/wasm/ibc_integration_test.go b/x/wasm/ibc_integration_test.go index ea0a5f17..d268a8c7 100644 --- a/x/wasm/ibc_integration_test.go +++ b/x/wasm/ibc_integration_test.go @@ -194,7 +194,7 @@ func TestOnIBCPacketReceive(t *testing.T) { myMockContractAddr := chainA.SeedNewContractInstance() // setups env but uses mock contract // setup chain B contracts - reflectID := chainB.StoreCodeFile("./keeper/testdata/stargate_reflect.wasm").CodeID + reflectID := chainB.StoreCodeFile("./keeper/testdata/reflect_1_5.wasm").CodeID initMsg, err := json.Marshal(wasmkeeper.IBCReflectInitMsg{ReflectCodeID: reflectID}) require.NoError(t, err) codeID := chainB.StoreCodeFile("./keeper/testdata/ibc_reflect.wasm").CodeID diff --git a/x/wasm/ibc_reflect_test.go b/x/wasm/ibc_reflect_test.go index 4d4670e4..c73155da 100644 --- a/x/wasm/ibc_reflect_test.go +++ b/x/wasm/ibc_reflect_test.go @@ -16,7 +16,7 @@ import ( func TestIBCReflectContract(t *testing.T) { // scenario: // chain A: ibc_reflect_send.wasm - // chain B: stargate_reflect.wasm + ibc_reflect.wasm + // chain B: reflect_1_5.wasm + ibc_reflect.wasm // // Chain A "ibc_reflect_send" sends a IBC packet "on channel connect" event to chain B "ibc_reflect" // "ibc_reflect" sends a submessage to "reflect" which is returned as submessage. @@ -32,7 +32,7 @@ func TestIBCReflectContract(t *testing.T) { codeID := chainA.StoreCodeFile("./keeper/testdata/ibc_reflect_send.wasm").CodeID sendContractAddr := chainA.InstantiateContract(codeID, initMsg) - reflectID := chainB.StoreCodeFile("./keeper/testdata/stargate_reflect.wasm").CodeID + reflectID := chainB.StoreCodeFile("./keeper/testdata/reflect_1_5.wasm").CodeID initMsg = wasmkeeper.IBCReflectInitMsg{ ReflectCodeID: reflectID, }.GetBytes(t) diff --git a/x/wasm/keeper/msg_server_integration_test.go b/x/wasm/keeper/msg_server_integration_test.go index 614e0d39..fad2b112 100644 --- a/x/wasm/keeper/msg_server_integration_test.go +++ b/x/wasm/keeper/msg_server_integration_test.go @@ -20,7 +20,7 @@ import ( "github.com/CosmWasm/wasmd/x/wasm/types" ) -//go:embed testdata/stargate_reflect.wasm +//go:embed testdata/reflect_1_5.wasm var wasmContract []byte //go:embed testdata/hackatom.wasm diff --git a/x/wasm/keeper/snapshotter_integration_test.go b/x/wasm/keeper/snapshotter_integration_test.go index aff85919..ed9af49f 100644 --- a/x/wasm/keeper/snapshotter_integration_test.go +++ b/x/wasm/keeper/snapshotter_integration_test.go @@ -30,13 +30,13 @@ func TestSnapshotter(t *testing.T) { wasmFiles []string }{ "single contract": { - wasmFiles: []string{"./testdata/stargate_reflect.wasm"}, + wasmFiles: []string{"./testdata/reflect_1_5.wasm"}, }, "multiple contract": { - wasmFiles: []string{"./testdata/stargate_reflect.wasm", "./testdata/burner.wasm", "./testdata/stargate_reflect.wasm"}, + wasmFiles: []string{"./testdata/reflect_1_5.wasm", "./testdata/burner.wasm", "./testdata/reflect_1_5.wasm"}, }, "duplicate contracts": { - wasmFiles: []string{"./testdata/stargate_reflect.wasm", "./testdata/stargate_reflect.wasm"}, + wasmFiles: []string{"./testdata/reflect_1_5.wasm", "./testdata/reflect_1_5.wasm"}, }, } for name, spec := range specs { diff --git a/x/wasm/keeper/testdata/reflect_1_5.wasm b/x/wasm/keeper/testdata/reflect_1_5.wasm new file mode 100644 index 00000000..073a4f40 Binary files /dev/null and b/x/wasm/keeper/testdata/reflect_1_5.wasm differ diff --git a/x/wasm/keeper/testdata/stargate_reflect.wasm b/x/wasm/keeper/testdata/stargate_reflect.wasm deleted file mode 100644 index 28a64acb..00000000 Binary files a/x/wasm/keeper/testdata/stargate_reflect.wasm and /dev/null differ