Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch L-11 #58

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ require (
github.com/cosmos/rosetta v0.0.0-20231205133638-3bc76705a1c6
github.com/ethereum/go-ethereum v1.10.26
github.com/evmos/ethermint v0.22.0
github.com/gogo/protobuf v1.3.2
github.com/golang/protobuf v1.5.4
github.com/gorilla/mux v1.8.1
github.com/grpc-ecosystem/grpc-gateway v1.16.0
Expand Down Expand Up @@ -88,6 +87,7 @@ require (
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/google/go-cmp v0.6.0 // indirect
Expand Down
13 changes: 0 additions & 13 deletions scripts/proto-tools-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,6 @@ f_install_buf() {
f_print_done
}

f_install_protoc_gen_gocosmos() {
f_print_installing_with_padding protoc-gen-gocosmos

if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then
echo -e "\tPlease run this command from somewhere inside the canto folder."
return 1
fi

go get github.com/regen-network/cosmos-proto/protoc-gen-gocosmos 2>/dev/null
f_print_done
}

f_install_protoc_gen_grpc_gateway() {
f_print_installing_with_padding protoc-gen-grpc-gateway
f_needs_install "${DESTDIR}/${PREFIX}/bin/protoc-gen-grpc-gateway" || return 0
Expand Down Expand Up @@ -149,7 +137,6 @@ f_ensure_tools
f_ensure_dirs
f_install_protoc
f_install_buf
f_install_protoc_gen_gocosmos
f_install_protoc_gen_grpc_gateway
f_install_protoc_gen_swagger
f_install_clang_format
6 changes: 3 additions & 3 deletions x/coinswap/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strconv"

gogotypes "github.com/gogo/protobuf/types"
gogoprototypes "github.com/cosmos/gogoproto/types"

"cosmossdk.io/core/store"
errorsmod "cosmossdk.io/errors"
Expand Down Expand Up @@ -352,7 +352,7 @@ func (k Keeper) SetParams(ctx sdk.Context, params types.Params) {
// SetStandardDenom sets the standard denom for the coinswap module.
func (k Keeper) SetStandardDenom(ctx sdk.Context, denom string) error {
store := k.storeService.OpenKVStore(ctx)
denomWrap := gogotypes.StringValue{Value: denom}
denomWrap := gogoprototypes.StringValue{Value: denom}
bz := k.cdc.MustMarshal(&denomWrap)
err := store.Set(types.KeyStandardDenom, bz)
if err != nil {
Expand All @@ -369,7 +369,7 @@ func (k Keeper) GetStandardDenom(ctx sdk.Context) (string, error) {
return "", err
}

var denomWrap = gogotypes.StringValue{}
var denomWrap = gogoprototypes.StringValue{}
k.cdc.MustUnmarshal(bz, &denomWrap)
return denomWrap.Value, nil
}
6 changes: 3 additions & 3 deletions x/coinswap/keeper/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package keeper
import (
"fmt"

gogotypes "github.com/gogo/protobuf/types"
gogoprototypes "github.com/cosmos/gogoproto/types"

errorsmod "cosmossdk.io/errors"
storetypes "cosmossdk.io/store/types"
Expand Down Expand Up @@ -64,7 +64,7 @@ func (k Keeper) GetPoolByLptDenom(ctx sdk.Context, lptDenom string) (types.Pool,
return types.Pool{}, false
}

poolId := &gogotypes.StringValue{}
poolId := &gogoprototypes.StringValue{}
k.cdc.MustUnmarshal(bz, poolId)
return k.GetPool(ctx, poolId.Value)
}
Expand Down Expand Up @@ -138,7 +138,7 @@ func (k Keeper) setPool(ctx sdk.Context, pool *types.Pool) {
store.Set(types.GetPoolKey(pool.Id), bz)

// save by lpt denom
poolId := &gogotypes.StringValue{Value: pool.Id}
poolId := &gogoprototypes.StringValue{Value: pool.Id}
poolIdBz := k.cdc.MustMarshal(poolId)
store.Set(types.GetLptDenomKey(pool.LptDenom), poolIdBz)
}
Expand Down
Loading