Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Shrenuj Bansal <[email protected]>
  • Loading branch information
shrenujb committed Jun 20, 2024
1 parent 61e9a27 commit 7ca1235
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { MsgSetMarketMapperRevenueShare, MsgSetMarketMapperRevenueShareResponse

export interface Msg {
/**
* SetMarketMapperRevenueShare creates a new revenue share for a market
* SetMarketMapperRevenueShare sets the revenue share for a market
* mapper.
*/
setMarketMapperRevenueShare(request: MsgSetMarketMapperRevenueShare): Promise<MsgSetMarketMapperRevenueShareResponse>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { MarketMapperRevenueShareParams, MarketMapperRevenueShareParamsSDKType } from "./params";
import * as _m0 from "protobufjs/minimal";
import { DeepPartial } from "../../helpers";
/** Message to create a blanket market mapper revenue share */
/** Message to set the market mapper revenue share */

export interface MsgSetMarketMapperRevenueShare {
authority: string;
/** Parameters for the revenue share */

params?: MarketMapperRevenueShareParams;
}
/** Message to create a blanket market mapper revenue share */
/** Message to set the market mapper revenue share */

export interface MsgSetMarketMapperRevenueShareSDKType {
authority: string;
Expand Down
4 changes: 2 additions & 2 deletions proto/dydxprotocol/revshare/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ option go_package = "github.com/dydxprotocol/v4-chain/protocol/x/revshare/types"

// Msg defines the Msg service.
service Msg {
// SetMarketMapperRevenueShare creates a new revenue share for a market
// SetMarketMapperRevenueShare sets the revenue share for a market
// mapper.
rpc SetMarketMapperRevenueShare(MsgSetMarketMapperRevenueShare)
returns (MsgSetMarketMapperRevenueShareResponse);
}

// Message to create a blanket market mapper revenue share
// Message to set the market mapper revenue share
message MsgSetMarketMapperRevenueShare {
// The address that controls the module (the gov module account).
option (cosmos.msg.v1.signer) = "authority";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ func TestSetMarketMapperRevenueShareParams(t *testing.T) {
},
expectedErr: "invalid authority",
},
"Failure - Empty Authority": {
msg: &types.MsgSetMarketMapperRevenueShare{
Params: types.MarketMapperRevenueShareParams{
Address: constants.AliceAccAddress.String(),
RevenueSharePpm: 100_000,
ValidDays: 240,
},
},
expectedErr: "invalid authority",
},
"Failure - Invalid revenue share address": {
msg: &types.MsgSetMarketMapperRevenueShare{
Authority: lib.GovModuleAddress.String(),
Expand Down
1 change: 0 additions & 1 deletion protocol/x/revshare/types/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
// DefaultParams returns a default set of `x/revshare` market mapper parameters.
func DefaultParams() MarketMapperRevenueShareParams {
return MarketMapperRevenueShareParams{
// TODO: is there a diff address this can be set to?
Address: authtypes.NewModuleAddress(authtypes.FeeCollectorName).String(),
RevenueSharePpm: 0,
ValidDays: 0,
Expand Down
6 changes: 3 additions & 3 deletions protocol/x/revshare/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7ca1235

Please sign in to comment.