From a87e104c70288d9c03d12f7b1dbc9c61c1567910 Mon Sep 17 00:00:00 2001 From: Carlton N Hanna Date: Wed, 17 Apr 2024 11:16:06 -0600 Subject: [PATCH] change key name for each module --- x/marker/keeper/params.go | 4 ++-- x/marker/types/key.go | 4 ++-- x/msgfees/keeper/params.go | 4 ++-- x/msgfees/types/keys.go | 4 ++-- x/name/keeper/params.go | 4 ++-- x/name/types/keys.go | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/x/marker/keeper/params.go b/x/marker/keeper/params.go index dd88a3de2c..f622a4bba2 100644 --- a/x/marker/keeper/params.go +++ b/x/marker/keeper/params.go @@ -15,7 +15,7 @@ func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { params = types.DefaultParams() // Assuming a method that returns default parameters // Deserialize parameters if they are set - if bz := store.Get(types.ParamStoreKey); bz != nil { + if bz := store.Get(types.MarkerParamStoreKey); bz != nil { k.cdc.MustUnmarshal(bz, ¶ms) } @@ -26,7 +26,7 @@ func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(¶ms) - store.Set(types.ParamStoreKey, bz) + store.Set(types.MarkerParamStoreKey, bz) } // Deprecated: GetMaxTotalSupply is kept for backwards compatibility. diff --git a/x/marker/types/key.go b/x/marker/types/key.go index 5b20916e00..c4bac08065 100644 --- a/x/marker/types/key.go +++ b/x/marker/types/key.go @@ -39,8 +39,8 @@ var ( // NetAssetValuePrefix prefix for net asset values of markers NetAssetValuePrefix = []byte{0x04} - // ParamStoreKey key for marker module's params - ParamStoreKey = []byte{0x05} + // MarkerParamStoreKey key for marker module's params + MarkerParamStoreKey = []byte{0x05} ) // MarkerAddress returns the module account address for the given denomination diff --git a/x/msgfees/keeper/params.go b/x/msgfees/keeper/params.go index 0e1cc27496..e462ade6e0 100644 --- a/x/msgfees/keeper/params.go +++ b/x/msgfees/keeper/params.go @@ -11,7 +11,7 @@ func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { store := ctx.KVStore(k.storeKey) params = types.DefaultParams() // Initialize with defaults - bz := store.Get(types.ParamStoreKey) + bz := store.Get(types.MsgFeesParamStoreKey) if bz != nil { k.cdc.MustUnmarshal(bz, ¶ms) // Deserialize parameters } @@ -22,7 +22,7 @@ func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(¶ms) // Serialize parameters - store.Set(types.ParamStoreKey, bz) + store.Set(types.MsgFeesParamStoreKey, bz) } // GetFloorGasPrice returns the current minimum gas price in sdk.Coin used in calculations for charging additional fees diff --git a/x/msgfees/types/keys.go b/x/msgfees/types/keys.go index dc18ab7379..9c89f99451 100644 --- a/x/msgfees/types/keys.go +++ b/x/msgfees/types/keys.go @@ -32,8 +32,8 @@ func GetMsgFeeKey(msgType string) []byte { var ( //MsgFeeKeyPrefix prefix for msgfee entry MsgFeeKeyPrefix = []byte{0x00} - // ParamStoreKey key for msgfees module's params - ParamStoreKey = []byte{0x01} + // MsgFeesParamStoreKey key for msgfees module's params + MsgFeesParamStoreKey = []byte{0x01} ) func GetCompositeKey(msgType string, recipient string) string { diff --git a/x/name/keeper/params.go b/x/name/keeper/params.go index 1c3b9d3e20..920da35ec8 100644 --- a/x/name/keeper/params.go +++ b/x/name/keeper/params.go @@ -10,7 +10,7 @@ func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { store := ctx.KVStore(k.storeKey) params = types.DefaultParams() // Assuming DefaultParams initializes all defaults - bz := store.Get(types.ParamStoreKey) // General key for all parameters + bz := store.Get(types.NameParamStoreKey) // General key for all parameters if bz != nil { k.cdc.MustUnmarshal(bz, ¶ms) // Deserialize parameters from bytes } @@ -21,7 +21,7 @@ func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { store := ctx.KVStore(k.storeKey) bz := k.cdc.MustMarshal(¶ms) // Serialize parameters to bytes - store.Set(types.ParamStoreKey, bz) + store.Set(types.NameParamStoreKey, bz) } // GetMaxNameLevels returns the current maximum number of name segments allowed. diff --git a/x/name/types/keys.go b/x/name/types/keys.go index 05bad5fd34..cec1913959 100644 --- a/x/name/types/keys.go +++ b/x/name/types/keys.go @@ -25,8 +25,8 @@ var ( NameKeyPrefix = []byte{0x03} // AddressKeyPrefix is a prefix added to keys for indexing name records by address. AddressKeyPrefix = []byte{0x05} - // ParamsStoreKey key for marker module's params - ParamStoreKey = []byte{0x06} + // NameParamStoreKey key for marker module's params + NameParamStoreKey = []byte{0x06} ) // GetNameKeyPrefix converts a name into key format.