diff --git a/util/store/store.go b/util/store/store.go index 06e37f590c..cce55ae9cd 100644 --- a/util/store/store.go +++ b/util/store/store.go @@ -74,7 +74,7 @@ func SetBinValue[T BinMarshalable](store sdk.KVStore, key []byte, value T, errFi // instead of GetValue. // Returns a boolean indicating whether any data was found. If the return is false, the object // is not changed by this function. -func GetValueCdc(store sdk.KVStore, cdc codec.Codec, key []byte, object codec.ProtoMarshaler, errField string) bool { +func GetValueCdc(store sdk.KVStore, cdc codec.BinaryCodec, key []byte, object codec.ProtoMarshaler, errField string) bool { if bz := store.Get(key); len(bz) > 0 { err := cdc.Unmarshal(bz, object) if err != nil { @@ -88,7 +88,7 @@ func GetValueCdc(store sdk.KVStore, cdc codec.Codec, key []byte, object codec.Pr // SetValueCdc is similar to the SetValue, but uses codec for marshaling. For Protobuf objects the // result is the same, unless codec.Any is used. In the latter case this function MUST be used, // instead of SetValue. -func SetValueCdc(store sdk.KVStore, cdc codec.Codec, key []byte, object codec.ProtoMarshaler, errField string) error { +func SetValueCdc(store sdk.KVStore, cdc codec.BinaryCodec, key []byte, object codec.ProtoMarshaler, errField string) error { bz, err := cdc.Marshal(object) if err != nil { return fmt.Errorf("failed to encode %s, %s", errField, err.Error()) diff --git a/x/incentive/keeper/keeper.go b/x/incentive/keeper/keeper.go index c3c2a65e49..8c69998bfe 100644 --- a/x/incentive/keeper/keeper.go +++ b/x/incentive/keeper/keeper.go @@ -13,14 +13,14 @@ import ( ) type Keeper struct { - cdc codec.Codec + cdc codec.BinaryCodec storeKey storetypes.StoreKey bankKeeper incentive.BankKeeper leverageKeeper incentive.LeverageKeeper } func NewKeeper( - cdc codec.Codec, + cdc codec.BinaryCodec, storeKey storetypes.StoreKey, bk incentive.BankKeeper, lk incentive.LeverageKeeper, diff --git a/x/leverage/keeper/keeper.go b/x/leverage/keeper/keeper.go index fe7e0feceb..cc4e865d65 100644 --- a/x/leverage/keeper/keeper.go +++ b/x/leverage/keeper/keeper.go @@ -15,7 +15,7 @@ import ( ) type Keeper struct { - cdc codec.Codec + cdc codec.BinaryCodec storeKey storetypes.StoreKey bankKeeper types.BankKeeper oracleKeeper types.OracleKeeper @@ -28,7 +28,7 @@ type Keeper struct { } func NewKeeper( - cdc codec.Codec, + cdc codec.BinaryCodec, storeKey storetypes.StoreKey, b types.BankKeeper, o types.OracleKeeper, diff --git a/x/metoken/keeper/keeper.go b/x/metoken/keeper/keeper.go index a3a271020e..58b7e53f4e 100644 --- a/x/metoken/keeper/keeper.go +++ b/x/metoken/keeper/keeper.go @@ -12,7 +12,7 @@ import ( // Builder constructs Keeper by preparing all related dependencies (notably the store). type Builder struct { - cdc codec.Codec + cdc codec.BinaryCodec storeKey storetypes.StoreKey bankKeeper metoken.BankKeeper leverageKeeper metoken.LeverageKeeper @@ -22,7 +22,7 @@ type Builder struct { // NewBuilder returns Builder object. func NewBuilder( - cdc codec.Codec, + cdc codec.BinaryCodec, storeKey storetypes.StoreKey, bankKeeper metoken.BankKeeper, leverageKeeper metoken.LeverageKeeper, @@ -40,7 +40,7 @@ func NewBuilder( } type Keeper struct { - cdc codec.Codec + cdc codec.BinaryCodec store sdk.KVStore bankKeeper metoken.BankKeeper leverageKeeper metoken.LeverageKeeper