Skip to content

Commit

Permalink
updated wasmd/wasmvm and cosmos dependencies
Browse files Browse the repository at this point in the history
addd iterator feature to supported by wasmvm
  • Loading branch information
leobragaz committed Oct 29, 2021
1 parent 2da0994 commit 2ab1be1
Show file tree
Hide file tree
Showing 7 changed files with 406 additions and 56 deletions.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ func NewDesmosApp(
Custom: parser.ParseCustom,
}

supportedFeatures := "staking,stargate"
supportedFeatures := "iterator,staking,stargate"
wasmOpts = append(wasmOpts, wasmkeeper.WithQueryPlugins(queryPlugins))
wasmOpts = append(wasmOpts, wasmkeeper.WithMessageEncoders(customMsgEncoders))

Expand Down
4 changes: 1 addition & 3 deletions app/desmos/cmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import (
"os"
"path/filepath"

"github.com/desmos-labs/desmos/app"

cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
"github.com/spf13/cobra"
tmconfig "github.com/tendermint/tendermint/config"
Expand Down Expand Up @@ -184,7 +182,7 @@ func InitTestnet(
return err
}

addr, secret, err := server.GenerateSaveCoinKeyFromPath(kb, nodeDirName, true, algo, app.FullFundraiserPath)
addr, secret, err := server.GenerateSaveCoinKey(kb, nodeDirName, true, algo)
if err != nil {
_ = os.RemoveAll(outputDir)
return err
Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/CosmWasm/wasmd v0.20.0
github.com/CosmWasm/wasmvm v1.0.0-beta
github.com/armon/go-metrics v0.3.8
github.com/cosmos/cosmos-sdk v0.42.5
github.com/cosmos/cosmos-sdk v0.42.10
github.com/cosmos/go-bip39 v1.0.0
github.com/desmos-labs/Go-Emoji-Utils v1.1.1
github.com/ghodss/yaml v1.0.0
Expand All @@ -18,19 +18,19 @@ require (
github.com/mr-tron/base58 v1.2.0
github.com/rakyll/statik v0.1.7
github.com/regen-network/cosmos-proto v0.3.1
github.com/spf13/cast v1.3.1
github.com/spf13/cast v1.4.1
github.com/spf13/cobra v1.1.3
github.com/stretchr/testify v1.7.0
github.com/tendermint/tendermint v0.34.11
github.com/tendermint/tendermint v0.34.13
github.com/tendermint/tm-db v0.6.4
google.golang.org/genproto v0.0.0-20210510173355-fb37daa5cd7a
google.golang.org/grpc v1.37.0
google.golang.org/protobuf v1.26.0
google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71
google.golang.org/grpc v1.40.0
google.golang.org/protobuf v1.27.1
)

replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

replace github.com/cosmos/cosmos-sdk => github.com/desmos-labs/cosmos-sdk v0.42.5-0.20210826081936-864fc99bab62
// replace github.com/cosmos/cosmos-sdk => github.com/desmos-labs/cosmos-sdk v0.42.5-0.20210826081936-864fc99bab62

replace google.golang.org/grpc => google.golang.org/grpc v1.33.2

Expand Down
432 changes: 392 additions & 40 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion x/profiles/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func (k Keeper) ApplicationLinkByClientID(ctx context.Context, request *types.Qu

link, err := k.GetApplicationLinkByClientID(sdkCtx, request.ClientId)
if err != nil {
if sdkerrors.ErrNotFound.Is(err) {
if sdkerrors.ErrInvalidRequest.Is(err) {
return nil, status.Errorf(codes.NotFound, "link for client id %s not found", request.ClientId)
}

Expand Down
4 changes: 2 additions & 2 deletions x/profiles/keeper/keeper_app_links.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (k Keeper) GetApplicationLinkByClientID(ctx sdk.Context, clientID string) (
clientIDKey := types.ApplicationLinkClientIDKey(clientID)
if !store.Has(clientIDKey) {
return types.ApplicationLink{},
sdkerrors.Wrapf(sdkerrors.ErrNotFound, "link for client id %s not found", clientID)
sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "link for client id %s not found", clientID)
}

// Get the link key
Expand All @@ -94,7 +94,7 @@ func (k Keeper) DeleteApplicationLink(ctx sdk.Context, user string, application,
}

if !found {
return sdkerrors.Wrap(sdkerrors.ErrNotFound, "application link not found")
return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, "application link not found")
}

if link.User != user {
Expand Down
4 changes: 2 additions & 2 deletions x/subspaces/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (k Keeper) Subspace(ctx context.Context, request *types.QuerySubspaceReques
sdkCtx := sdk.UnwrapSDKContext(ctx)
subspace, found := k.GetSubspace(sdkCtx, request.SubspaceId)
if !found {
return nil, sdkerrors.Wrapf(sdkerrors.ErrNotFound, "subspace with id %s not found", request.SubspaceId)
return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "subspace with id %s not found", request.SubspaceId)
}

return &types.QuerySubspaceResponse{Subspace: subspace}, nil
Expand Down Expand Up @@ -133,7 +133,7 @@ func (k Keeper) Tokenomics(goCtx context.Context, request *types.QueryTokenomics
ctx := sdk.UnwrapSDKContext(goCtx)
tokenomics, found := k.GetTokenomics(ctx, request.SubspaceId)
if !found {
return nil, sdkerrors.Wrapf(sdkerrors.ErrNotFound, "tokenomics associated with id %s not found",
return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "tokenomics associated with id %s not found",
request.SubspaceId)
}

Expand Down

0 comments on commit 2ab1be1

Please sign in to comment.