diff --git a/testutil/keeper/machine.go b/testutil/keeper/machine.go index 88683d2..46d2550 100644 --- a/testutil/keeper/machine.go +++ b/testutil/keeper/machine.go @@ -14,6 +14,8 @@ import ( "github.com/cosmos/cosmos-sdk/store" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" typesparams "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/stretchr/testify/require" ) @@ -58,6 +60,7 @@ func MachineKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) { addressStoreKey, memStoreKey, paramsSubspace, + authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) ctx := sdk.NewContext(stateStore, tmproto.Header{}, false, log.NewNopLogger()) diff --git a/x/machine/client/cli/tx_update_params.go b/x/machine/client/cli/tx_update_params.go index 377bbe8..b6138e6 100644 --- a/x/machine/client/cli/tx_update_params.go +++ b/x/machine/client/cli/tx_update_params.go @@ -4,6 +4,7 @@ import ( "strconv" "encoding/json" + "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" @@ -32,7 +33,7 @@ func CmdUpdateParams() *cobra.Command { msg := types.NewMsgUpdateParams( clientCtx.GetFromAddress().String(), - argParams, + *argParams, ) if err := msg.ValidateBasic(); err != nil { return err diff --git a/x/machine/keeper/keeper.go b/x/machine/keeper/keeper.go index 499b9d4..8606de2 100644 --- a/x/machine/keeper/keeper.go +++ b/x/machine/keeper/keeper.go @@ -52,6 +52,7 @@ func NewKeeper( addressIndexStoreKey: addressIndexStoreKey, memKey: memKey, paramstore: ps, + authority: authority, } } diff --git a/x/machine/types/message_update_params.go b/x/machine/types/message_update_params.go index 26174ca..9a4e800 100644 --- a/x/machine/types/message_update_params.go +++ b/x/machine/types/message_update_params.go @@ -9,7 +9,7 @@ const TypeMsgUpdateParams = "update_params" var _ sdk.Msg = &MsgUpdateParams{} -func NewMsgUpdateParams(authority string, params *Params) *MsgUpdateParams { +func NewMsgUpdateParams(authority string, params Params) *MsgUpdateParams { return &MsgUpdateParams{ Authority: authority, Params: params,