Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into yaroslav/integratio…
Browse files Browse the repository at this point in the history
…n-tests-for-pkg
  • Loading branch information
ysv committed Nov 10, 2023
2 parents 6c30386 + 0746778 commit d6fbcd0
Show file tree
Hide file tree
Showing 17 changed files with 315 additions and 412 deletions.
4 changes: 4 additions & 0 deletions app/amino_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"testing"
_ "unsafe"

wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
sdktestdatatypes "github.com/cosmos/cosmos-sdk/testutil/testdata"
sdk "github.com/cosmos/cosmos-sdk/types"
sdktxtypes "github.com/cosmos/cosmos-sdk/types/tx"
Expand Down Expand Up @@ -85,6 +86,9 @@ func TestLegacyAmino_ExpectedMessages(t *testing.T) {
// internal cosmos
sdk.MsgTypeURL(&sdktestdatatypes.MsgCreateDog{}): {},
sdk.MsgTypeURL(&sdktxtypes.Tx{}): {},

// wasm
sdk.MsgTypeURL(&wasmtypes.MsgUpdateContractLabel{}): {},
}

for protoType := range revProtoTypes {
Expand Down
18 changes: 6 additions & 12 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ import (
ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint"
ibclocalhost "github.com/cosmos/ibc-go/v7/modules/light-clients/09-localhost"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/spf13/cast"

"github.com/CoreumFoundation/coreum/v3/app/openapi"
Expand Down Expand Up @@ -608,18 +609,15 @@ func New(
)),
}

// FIXME (wasmd-1575): This is commented out temporarily because it causes panics in telemetry server due to buggy
// initialization of wasm vm in version v0.41 of wasmd.
// Bug has been already fixed here: https://github.com/CosmWasm/wasmd/pull/1575
// and will be released in v0.42.
// if cast.ToBool(appOpts.Get("telemetry.enabled")) {
// wasmOpts = append(wasmOpts, wasmkeeper.WithVMCacheMetrics(prometheus.DefaultRegisterer))
// }
if cast.ToBool(appOpts.Get("telemetry.enabled")) {
wasmOpts = append(wasmOpts, wasmkeeper.WithVMCacheMetrics(prometheus.DefaultRegisterer))
}

// The last arguments can contain custom message handlers, and custom query handlers,
// if we want to allow any custom callbacks
// See https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md
availableCapabilities := "iterator,staking,stargate,cosmwasm_1_1,cosmwasm_1_2,cosmwasm_1_3"
availableCapabilities := "iterator,staking,stargate,cosmwasm_1_1,cosmwasm_1_2,cosmwasm_1_3,cosmwasm_1_4"

app.WasmKeeper = wasmkeeper.NewKeeper(
appCodec,
keys[wasmtypes.StoreKey],
Expand All @@ -641,10 +639,6 @@ func New(
wasmOpts...,
)

// enable all wasm proposals
// FIXME(v47-legacy): remove once we finish with full migration
govRouter.AddRoute(wasmtypes.RouterKey, wasmkeeper.NewWasmProposalHandler(app.WasmKeeper, wasmtypes.EnableAllProposals)) //nolint:staticcheck // we need to keep backward compatibility

// FIXME(v4): drop once we drop gov v1beta1 compatibility.
// Set legacy router for backwards compatibility with gov v1beta1
app.GovKeeper.SetLegacyRouter(govRouter)
Expand Down
Loading

0 comments on commit d6fbcd0

Please sign in to comment.