Skip to content

Commit

Permalink
add change log, update tests, update cli command
Browse files Browse the repository at this point in the history
  • Loading branch information
nullpointer0x00 committed May 21, 2024
1 parent 4a06642 commit a4afd7b
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 12 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ Ref: https://keepachangelog.com/en/1.0.0/
* Add the auto-cli commands and a few others newly added by the SDK [#1971](https://github.com/provenance-io/provenance/pull/1971).
* Fix unit tests for ibcratelimit [#1977](https://github.com/provenance-io/provenance/pull/1977).
* Fix unit tests for ibchooks [#1980](https://github.com/provenance-io/provenance/pull/1980).
* Add `UpdateParams` and `Params` query rpc endpoints to modules.
* `ibcratelimit` add `UpdateParams` endpoint and deprecate `GovUpdateParams` [#1984](https://github.com/provenance-io/provenance/pull/1984).

### Client Breaking

Expand Down
2 changes: 0 additions & 2 deletions proto/provenance/metadata/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ service Msg {

// AddNetAssetValues set the net asset value for a scope
rpc AddNetAssetValues(MsgAddNetAssetValuesRequest) returns (MsgAddNetAssetValuesResponse);

// TODO: add update params
}

// MsgWriteScopeRequest is the request type for the Msg/WriteScope RPC method.
Expand Down
2 changes: 0 additions & 2 deletions proto/provenance/msgfees/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ service Msg {
// UpdateConversionFeeDenomProposal defines a governance proposal to update the msg fee conversion denom
rpc UpdateConversionFeeDenomProposal(MsgUpdateConversionFeeDenomProposalRequest)
returns (MsgUpdateConversionFeeDenomProposalResponse);

// TODO: add update params
}

// MsgAssessCustomMsgFeeRequest defines an sdk.Msg type
Expand Down
2 changes: 0 additions & 2 deletions proto/provenance/name/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ service Msg {

// CreateRootName defines a governance method for creating a root name.
rpc CreateRootName(MsgCreateRootNameRequest) returns (MsgCreateRootNameResponse);

// TODO: add update params
}

// MsgBindNameRequest defines an sdk.Msg type that is used to add an address/name binding under an optional parent name.
Expand Down
2 changes: 1 addition & 1 deletion x/ibcratelimit/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func GetCmdParamsUpdate() *cobra.Command {

flagSet := cmd.Flags()
authority := provcli.GetAuthority(flagSet)
msg := ibcratelimit.NewUpdateParamsRequest(authority, args[0])
msg := ibcratelimit.NewMsgUpdateParamsRequest(authority, args[0])
return provcli.GenerateOrBroadcastTxCLIAsGovProp(clientCtx, flagSet, msg)
},
}
Expand Down
4 changes: 2 additions & 2 deletions x/ibcratelimit/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ func (m MsgGovUpdateParamsRequest) ValidateBasic() error {
return errors.New("deprecated and unusable")
}

// NewUpdateParamsRequest creates a new GovUpdateParams message.
func NewUpdateParamsRequest(authority, ratelimiter string) *MsgUpdateParamsRequest {
// NewMsgUpdateParamsRequest creates a new GovUpdateParams message.
func NewMsgUpdateParamsRequest(authority, ratelimiter string) *MsgUpdateParamsRequest {
return &MsgUpdateParamsRequest{
Authority: authority,
Params: NewParams(ratelimiter),
Expand Down
4 changes: 2 additions & 2 deletions x/ibcratelimit/msgs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestNewMsgGovUpdateParamsRequest(t *testing.T) {
Authority: "authority",
Params: NewParams("contract"),
}
event := NewUpdateParamsRequest(expected.Authority, expected.Params.ContractAddress)
event := NewMsgUpdateParamsRequest(expected.Authority, expected.Params.ContractAddress)
assert.Equal(t, expected, event, "should create the correct with correct content")
}

Expand Down Expand Up @@ -63,7 +63,7 @@ func TestNewMsgUpdateParamsValidateBasic(t *testing.T) {

for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
msg := NewUpdateParamsRequest(tc.authority, tc.contract)
msg := NewMsgUpdateParamsRequest(tc.authority, tc.contract)
err := msg.ValidateBasic()

if len(tc.err) > 0 {
Expand Down
2 changes: 1 addition & 1 deletion x/ibcratelimit/simulation/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func SimulateMsgUpdateParams(simState module.SimulationState, _ keeper.Keeper, a
from := raccs[0]
to := raccs[1]

msg := ibcratelimit.NewUpdateParamsRequest(from.Address.String(), to.Address.String())
msg := ibcratelimit.NewMsgUpdateParamsRequest(from.Address.String(), to.Address.String())

// TODO[1760]: Refactor this to submit it as a gov prop and return futures for votes.
return Dispatch(r, app, ctx, simState, from, chainID, msg, ak, bk, nil)
Expand Down

0 comments on commit a4afd7b

Please sign in to comment.