Skip to content

Commit

Permalink
remove deposit amount from pml message (#2158)
Browse files Browse the repository at this point in the history
Signed-off-by: Shrenuj Bansal <[email protected]>
  • Loading branch information
shrenujb authored Aug 26, 2024
1 parent 3b57212 commit 3e8ead2
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 113 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ export interface MsgCreateMarketPermissionless {
/** The subaccount to deposit from. */

subaccountId?: SubaccountId;
/** Number of quote quantums to deposit. */

quoteQuantums: Uint8Array;
}
/**
* MsgCreateMarketPermissionless is a message used to create new markets without
Expand All @@ -56,9 +53,6 @@ export interface MsgCreateMarketPermissionlessSDKType {
/** The subaccount to deposit from. */

subaccount_id?: SubaccountIdSDKType;
/** Number of quote quantums to deposit. */

quote_quantums: Uint8Array;
}
/**
* MsgCreateMarketPermissionlessResponse defines the
Expand Down Expand Up @@ -199,8 +193,7 @@ export const MsgSetMarketsHardCapResponse = {
function createBaseMsgCreateMarketPermissionless(): MsgCreateMarketPermissionless {
return {
ticker: "",
subaccountId: undefined,
quoteQuantums: new Uint8Array()
subaccountId: undefined
};
}

Expand All @@ -214,10 +207,6 @@ export const MsgCreateMarketPermissionless = {
SubaccountId.encode(message.subaccountId, writer.uint32(18).fork()).ldelim();
}

if (message.quoteQuantums.length !== 0) {
writer.uint32(26).bytes(message.quoteQuantums);
}

return writer;
},

Expand All @@ -238,10 +227,6 @@ export const MsgCreateMarketPermissionless = {
message.subaccountId = SubaccountId.decode(reader, reader.uint32());
break;

case 3:
message.quoteQuantums = reader.bytes();
break;

default:
reader.skipType(tag & 7);
break;
Expand All @@ -255,7 +240,6 @@ export const MsgCreateMarketPermissionless = {
const message = createBaseMsgCreateMarketPermissionless();
message.ticker = object.ticker ?? "";
message.subaccountId = object.subaccountId !== undefined && object.subaccountId !== null ? SubaccountId.fromPartial(object.subaccountId) : undefined;
message.quoteQuantums = object.quoteQuantums ?? new Uint8Array();
return message;
}

Expand Down
7 changes: 0 additions & 7 deletions proto/dydxprotocol/listing/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ message MsgCreateMarketPermissionless {

// The subaccount to deposit from.
dydxprotocol.subaccounts.SubaccountId subaccount_id = 2;

// Number of quote quantums to deposit.
bytes quote_quantums = 3 [
(gogoproto.customtype) =
"github.com/dydxprotocol/v4-chain/protocol/dtypes.SerializableInt",
(gogoproto.nullable) = false
];
}

// MsgCreateMarketPermissionlessResponse defines the
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package keeper_test

import (
"github.com/dydxprotocol/v4-chain/protocol/dtypes"
testapp "github.com/dydxprotocol/v4-chain/protocol/testutil/app"
"github.com/dydxprotocol/v4-chain/protocol/testutil/constants"
"github.com/dydxprotocol/v4-chain/protocol/x/listing/keeper"
Expand Down Expand Up @@ -91,7 +90,6 @@ func TestMsgCreateMarketPermissionless(t *testing.T) {
Owner: constants.AliceAccAddress.String(),
Number: 0,
},
QuoteQuantums: dtypes.SerializableInt{},
}

_, err = ms.CreateMarketPermissionless(ctx, &msg)
Expand Down
122 changes: 35 additions & 87 deletions protocol/x/listing/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 3e8ead2

Please sign in to comment.