diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a4264663..28aca993a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -70,6 +70,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#1752](https://github.com/NibiruChain/nibiru/pull/1752) - feat(oracle): MsgEditOracleParams sudo tx msg as part of #1642 * [#1755](https://github.com/NibiruChain/nibiru/pull/1755) - feat(oracle): Add more events on validator's performance * [#1749](https://github.com/NibiruChain/nibiru/pull/1749) - feat(perp): move close market from Wasm Binding to MsgCloseMarket +* [#1761](https://github.com/NibiruChain/nibiru/pull/1761) - feat(perp): move create market from Wasm Binding to MsgCreateMarket ### Non-breaking/Compatible Improvements diff --git a/app/app.go b/app/app.go index 943ecc4d8..21b0da5e3 100644 --- a/app/app.go +++ b/app/app.go @@ -119,7 +119,6 @@ func GetWasmOpts(nibiru NibiruApp, appOpts servertypes.AppOptions) []wasmkeeper. wasmOpts = append(wasmOpts, wasmbinding.NibiruWasmOptions( nibiru.GRPCQueryRouter(), nibiru.appCodec, - nibiru.PerpKeeperV2, nibiru.SudoKeeper, nibiru.OracleKeeper, )...) diff --git a/proto/nibiru/perp/v2/tx.proto b/proto/nibiru/perp/v2/tx.proto index 4a8e22893..196b98e0e 100644 --- a/proto/nibiru/perp/v2/tx.proto +++ b/proto/nibiru/perp/v2/tx.proto @@ -55,6 +55,8 @@ service Msg { rpc WithdrawFromPerpFund(MsgWithdrawFromPerpFund) returns (MsgWithdrawFromPerpFundResponse) {} + rpc CreateMarket(MsgCreateMarket) returns (MsgCreateMarketResponse) {} + // CloseMarket: gRPC tx msg for closing a market. // [Admin] Only callable by sudoers. rpc CloseMarket(MsgCloseMarket) returns (MsgCloseMarketResponse) {} @@ -457,6 +459,38 @@ message MsgWithdrawFromPerpFund { message MsgWithdrawFromPerpFundResponse {} +// -------------------------- CreateMarket -------------------------- + +// CreateMarket: gRPC tx msg for creating a new market. +// Admin-only. +message MsgCreateMarket { + string sender = 1; + string pair = 2 [ + (gogoproto.customtype) = + "github.com/NibiruChain/nibiru/x/common/asset.Pair", + (gogoproto.moretags) = "yaml:\"pair\"", + (gogoproto.nullable) = false + ]; + + string price_multiplier = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.moretags) = "yaml:\"price_multiplier\"", + (gogoproto.nullable) = false + ]; + + string sqrt_depth = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.moretags) = "yaml:\"sqrt_depth\"", + (gogoproto.nullable) = false + ]; + + Market market = 5 [ + (gogoproto.nullable) = true + ]; +} + +message MsgCreateMarketResponse {} + // -------------------------- CloseMarket -------------------------- // CloseMarket: gRPC tx msg for closing a market. diff --git a/wasmbinding/exec_perp.go b/wasmbinding/exec_perp.go deleted file mode 100644 index da485fda1..000000000 --- a/wasmbinding/exec_perp.go +++ /dev/null @@ -1,14 +0,0 @@ -package wasmbinding - -import ( - perpv2keeper "github.com/NibiruChain/nibiru/x/perp/v2/keeper" - perpv2types "github.com/NibiruChain/nibiru/x/perp/v2/types" -) - -type ExecutorPerp struct { - PerpV2 perpv2keeper.Keeper -} - -func (exec *ExecutorPerp) MsgServer() perpv2types.MsgServer { - return perpv2keeper.NewMsgServerImpl(exec.PerpV2) -} diff --git a/wasmbinding/exec_perp_test.go b/wasmbinding/exec_perp_test.go index 5848cde59..60f60c2a1 100644 --- a/wasmbinding/exec_perp_test.go +++ b/wasmbinding/exec_perp_test.go @@ -10,7 +10,6 @@ import ( "github.com/stretchr/testify/suite" "github.com/NibiruChain/nibiru/app" - "github.com/NibiruChain/nibiru/wasmbinding" "github.com/NibiruChain/nibiru/wasmbinding/wasmbin" "github.com/NibiruChain/nibiru/x/common/asset" "github.com/NibiruChain/nibiru/x/common/denoms" @@ -31,7 +30,6 @@ type TestSuitePerpExecutor struct { nibiru *app.NibiruApp ctx sdk.Context contractDeployer sdk.AccAddress - exec *wasmbinding.ExecutorPerp contractPerp sdk.AccAddress ratesMap map[asset.Pair]sdk.Dec @@ -115,10 +113,6 @@ func (s *TestSuitePerpExecutor) SetupSuite() { s.ctx = ctx s.contractPerp = ContractMap[wasmbin.WasmKeyPerpBinding] - s.NoError(testapp.FundAccount(nibiru.BankKeeper, ctx, s.contractPerp, coins)) - s.exec = &wasmbinding.ExecutorPerp{ - PerpV2: nibiru.PerpKeeperV2, - } s.nibiru.PerpKeeperV2.Collateral.Set(s.ctx, perpv2types.TestingCollateralDenomNUSD) s.NoError(testapp.FundAccount(nibiru.BankKeeper, ctx, s.contractPerp, coins)) diff --git a/wasmbinding/message_plugin.go b/wasmbinding/message_plugin.go index 05e9c1162..7a9d607c0 100644 --- a/wasmbinding/message_plugin.go +++ b/wasmbinding/message_plugin.go @@ -12,7 +12,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" oraclekeeper "github.com/NibiruChain/nibiru/x/oracle/keeper" - perpv2keeper "github.com/NibiruChain/nibiru/x/perp/v2/keeper" ) var _ wasmkeeper.Messenger = (*CustomMessenger)(nil) @@ -21,7 +20,6 @@ var _ wasmkeeper.Messenger = (*CustomMessenger)(nil) // own custom `DispatchMsg` for CosmWasm execute calls on Nibiru. type CustomMessenger struct { Wasm wasmkeeper.Messenger - Perp ExecutorPerp Sudo keeper.Keeper Oracle ExecutorOracle } @@ -85,14 +83,12 @@ func (messenger *CustomMessenger) DispatchMsg( } func CustomMessageDecorator( - perpv2 perpv2keeper.Keeper, sudoKeeper keeper.Keeper, oracleKeeper oraclekeeper.Keeper, ) func(wasmkeeper.Messenger) wasmkeeper.Messenger { return func(originalWasmMessenger wasmkeeper.Messenger) wasmkeeper.Messenger { return &CustomMessenger{ Wasm: originalWasmMessenger, - Perp: ExecutorPerp{PerpV2: perpv2}, Sudo: sudoKeeper, Oracle: ExecutorOracle{Oracle: oracleKeeper}, } diff --git a/wasmbinding/wasm.go b/wasmbinding/wasm.go index 972e5067f..3a120e2a2 100644 --- a/wasmbinding/wasm.go +++ b/wasmbinding/wasm.go @@ -8,7 +8,6 @@ import ( "github.com/NibiruChain/nibiru/x/sudo/keeper" oraclekeeper "github.com/NibiruChain/nibiru/x/oracle/keeper" - perpv2keeper "github.com/NibiruChain/nibiru/x/perp/v2/keeper" ) // NibiruWasmOptions: Wasm Options are extension points to instantiate the Wasm @@ -16,7 +15,6 @@ import ( func NibiruWasmOptions( grpcQueryRouter *baseapp.GRPCQueryRouter, appCodec codec.Codec, - perpv2 perpv2keeper.Keeper, sudoKeeper keeper.Keeper, oracleKeeper oraclekeeper.Keeper, ) []wasmkeeper.Option { @@ -29,7 +27,7 @@ func NibiruWasmOptions( }) wasmExecuteOption := wasmkeeper.WithMessageHandlerDecorator( - CustomMessageDecorator(perpv2, sudoKeeper, oracleKeeper), + CustomMessageDecorator(sudoKeeper, oracleKeeper), ) return []wasmkeeper.Option{wasmQueryOption, wasmExecuteOption} diff --git a/x/perp/v2/integration/action/market.go b/x/perp/v2/integration/action/market.go index 73b966a17..3b092a24e 100644 --- a/x/perp/v2/integration/action/market.go +++ b/x/perp/v2/integration/action/market.go @@ -163,6 +163,8 @@ type createPool struct { pair asset.Pair market types.Market amm types.AMM + + adminAccount sdk.AccAddress } func (c createPool) Do(app *app.NibiruApp, ctx sdk.Context) (sdk.Context, error) { @@ -171,15 +173,16 @@ func (c createPool) Do(app *app.NibiruApp, ctx sdk.Context) (sdk.Context, error) PriceMultiplier: c.amm.PriceMultiplier, SqrtDepth: c.amm.SqrtDepth, Market: &c.market, - }) + }, c.adminAccount) return ctx, err } -func CreateMarket(pair asset.Pair, market types.Market, amm types.AMM) action.Action { +func CreateMarket(pair asset.Pair, market types.Market, amm types.AMM, adminAccount sdk.AccAddress) action.Action { return createPool{ - pair: pair, - market: market, - amm: amm, + pair: pair, + market: market, + amm: amm, + adminAccount: adminAccount, } } diff --git a/x/perp/v2/keeper/amm_test.go b/x/perp/v2/keeper/amm_test.go index 0136778f9..ad7711c22 100644 --- a/x/perp/v2/keeper/amm_test.go +++ b/x/perp/v2/keeper/amm_test.go @@ -160,14 +160,17 @@ func TestShiftPegMultiplier_Fail(t *testing.T) { account := testutil.AccAddress() - err := app.PerpKeeperV2.Sudo().CreateMarket( + adminUser, err := sdk.AccAddressFromBech32(testutil.ADDR_SUDO_ROOT) + require.NoError(t, err) + + err = app.PerpKeeperV2.Sudo().CreateMarket( ctx, keeper.ArgsCreateMarket{ Pair: pair, PriceMultiplier: sdk.NewDec(2), SqrtDepth: sdk.NewDec(1_000_000), - EnableMarket: true, }, + adminUser, ) app.PerpKeeperV2.ReserveSnapshots.Insert( ctx, @@ -230,14 +233,17 @@ func TestShiftSwapInvariant_Fail(t *testing.T) { app, ctx := testapp.NewNibiruTestAppAndContext() account := testutil.AccAddress() - err := app.PerpKeeperV2.Sudo().CreateMarket( + adminUser, err := sdk.AccAddressFromBech32(testutil.ADDR_SUDO_ROOT) + require.NoError(t, err) + + err = app.PerpKeeperV2.Sudo().CreateMarket( ctx, keeper.ArgsCreateMarket{ Pair: pair, PriceMultiplier: sdk.NewDec(2), SqrtDepth: sdk.NewDec(1_000), - EnableMarket: true, }, + adminUser, ) app.PerpKeeperV2.ReserveSnapshots.Insert( ctx, @@ -437,14 +443,17 @@ func TestKeeper_GetMarketByPairAndVersion(t *testing.T) { pair := asset.Registry.Pair(denoms.BTC, denoms.NUSD) - err := app.PerpKeeperV2.Sudo().CreateMarket( + adminUser, err := sdk.AccAddressFromBech32(testutil.ADDR_SUDO_ROOT) + require.NoError(t, err) + + err = app.PerpKeeperV2.Sudo().CreateMarket( ctx, keeper.ArgsCreateMarket{ Pair: pair, PriceMultiplier: sdk.NewDec(2), SqrtDepth: sdk.NewDec(1_000_000), - EnableMarket: true, }, + adminUser, ) require.NoError(t, err) @@ -462,14 +471,17 @@ func TestKeeper_GetAMMByPairAndVersion(t *testing.T) { pair := asset.Registry.Pair(denoms.BTC, denoms.NUSD) - err := app.PerpKeeperV2.Sudo().CreateMarket( + adminUser, err := sdk.AccAddressFromBech32(testutil.ADDR_SUDO_ROOT) + require.NoError(t, err) + + err = app.PerpKeeperV2.Sudo().CreateMarket( ctx, keeper.ArgsCreateMarket{ Pair: pair, PriceMultiplier: sdk.NewDec(2), SqrtDepth: sdk.NewDec(1_000_000), - EnableMarket: true, }, + adminUser, ) require.NoError(t, err) diff --git a/x/perp/v2/keeper/msg_server.go b/x/perp/v2/keeper/msg_server.go index 38586f68b..5bd48ff19 100644 --- a/x/perp/v2/keeper/msg_server.go +++ b/x/perp/v2/keeper/msg_server.go @@ -210,8 +210,7 @@ func (m msgServer) ShiftPegMultiplier( // ShiftSwapInvariant: gRPC tx msg for changing a market's swap invariant. // [SUDO] Only callable by sudoers. func (m msgServer) ShiftSwapInvariant( - goCtx context.Context, msg *types.MsgShiftSwapInvariant, -) (*types.MsgShiftSwapInvariantResponse, error) { + goCtx context.Context, msg *types.MsgShiftSwapInvariant) (*types.MsgShiftSwapInvariantResponse, error) { // Sender is checked in `msg.ValidateBasic` before reaching this fn call. sender, _ := sdk.AccAddressFromBech32(msg.Sender) ctx := sdk.UnwrapSDKContext(goCtx) @@ -221,9 +220,7 @@ func (m msgServer) ShiftSwapInvariant( // WithdrawFromPerpFund: gRPC tx msg for changing a market's swap invariant. // [SUDO] Only callable by sudoers. -func (m msgServer) WithdrawFromPerpFund( - goCtx context.Context, msg *types.MsgWithdrawFromPerpFund, -) (resp *types.MsgWithdrawFromPerpFundResponse, err error) { +func (m msgServer) WithdrawFromPerpFund(goCtx context.Context, msg *types.MsgWithdrawFromPerpFund) (resp *types.MsgWithdrawFromPerpFundResponse, err error) { // Sender is checked in `msg.ValidateBasic` before reaching this fn call. sender, _ := sdk.AccAddressFromBech32(msg.Sender) toAddr, _ := sdk.AccAddressFromBech32(msg.ToAddr) @@ -239,3 +236,27 @@ func (m msgServer) CloseMarket(ctx context.Context, msg *types.MsgCloseMarket) ( err := m.k.Sudo().CloseMarket(sdk.UnwrapSDKContext(ctx), msg.Pair, sender) return &types.MsgCloseMarketResponse{}, err } + +// CreateMarket gRPC tx msg for creating a new market. +// [Admin] Only callable by sudoers. +func (m msgServer) CreateMarket( + goCtx context.Context, msg *types.MsgCreateMarket, +) (*types.MsgCreateMarketResponse, error) { + sender, _ := sdk.AccAddressFromBech32(msg.Sender) + ctx := sdk.UnwrapSDKContext(goCtx) + + args := ArgsCreateMarket{ + Pair: msg.Pair, + PriceMultiplier: msg.PriceMultiplier, + SqrtDepth: msg.SqrtDepth, + + Market: msg.Market, + } + + err := m.k.Sudo().CreateMarket(ctx, args, sender) + if err != nil { + return nil, err + } + + return &types.MsgCreateMarketResponse{}, nil +} diff --git a/x/perp/v2/keeper/sudo.go b/x/perp/v2/keeper/sudo.go index bd3636fcf..cf1691c6f 100644 --- a/x/perp/v2/keeper/sudo.go +++ b/x/perp/v2/keeper/sudo.go @@ -70,16 +70,18 @@ type ArgsCreateMarket struct { PriceMultiplier sdk.Dec SqrtDepth sdk.Dec Market *types.Market // pointer makes it optional - // EnableMarket: Optionally enable the default market without explicitly passing - // in each field as an argument. If 'Market' is present, this field is ignored. - EnableMarket bool } // CreateMarket creates a pool for a specific pair. func (k sudoExtension) CreateMarket( ctx sdk.Context, args ArgsCreateMarket, + adminAccount sdk.AccAddress, ) error { + if err := k.SudoKeeper.CheckPermissions(adminAccount, ctx); err != nil { + return err + } + pair := args.Pair market, err := k.GetMarket(ctx, pair) if err == nil && market.Enabled { @@ -92,10 +94,11 @@ func (k sudoExtension) CreateMarket( baseReserve := sqrtDepth if args.Market == nil { market = types.DefaultMarket(pair) - market.Enabled = args.EnableMarket } else { market = *args.Market } + market.Enabled = true + if err := market.Validate(); err != nil { return err } diff --git a/x/perp/v2/keeper/sudo_test.go b/x/perp/v2/keeper/sudo_test.go index 6752e016c..5524bd0cc 100644 --- a/x/perp/v2/keeper/sudo_test.go +++ b/x/perp/v2/keeper/sudo_test.go @@ -103,7 +103,7 @@ func TestCreateMarket(t *testing.T) { PriceMultiplier: amm.PriceMultiplier, SqrtDepth: amm.SqrtDepth, Market: &market, // Invalid maintenance ratio - }) + }, adminUser) require.ErrorContains(t, err, "maintenance margin ratio ratio must be 0 <= ratio <= 1") // Error because of invalid oracle pair @@ -113,7 +113,7 @@ func TestCreateMarket(t *testing.T) { PriceMultiplier: amm.PriceMultiplier, SqrtDepth: amm.SqrtDepth, Market: &market, // Invalid oracle pair - }) + }, adminUser) require.ErrorContains(t, err, "err when validating oracle pair random: invalid token pair") // Error because of invalid amm @@ -121,7 +121,7 @@ func TestCreateMarket(t *testing.T) { Pair: pair, PriceMultiplier: sdk.NewDec(-1), SqrtDepth: amm.SqrtDepth, - }) + }, adminUser) require.ErrorContains(t, err, types.ErrAmmNonPositivePegMult.Error()) // Set it correctly @@ -129,8 +129,7 @@ func TestCreateMarket(t *testing.T) { Pair: pair, PriceMultiplier: amm.PriceMultiplier, SqrtDepth: amm.SqrtDepth, - EnableMarket: true, - }) + }, adminUser) require.NoError(t, err) lastVersion, err := app.PerpKeeperV2.MarketLastVersion.Get(ctx, pair) @@ -151,7 +150,7 @@ func TestCreateMarket(t *testing.T) { Pair: pair, PriceMultiplier: amm.PriceMultiplier, SqrtDepth: amm.SqrtDepth, - }) + }, adminUser) require.ErrorContains(t, err, "already exists") // Close the market to test that we can create it again but with an increased version @@ -162,7 +161,7 @@ func TestCreateMarket(t *testing.T) { Pair: pair, PriceMultiplier: amm.PriceMultiplier, SqrtDepth: amm.SqrtDepth, - }) + }, adminUser) require.NoError(t, err) lastVersion, err = app.PerpKeeperV2.MarketLastVersion.Get(ctx, pair) @@ -177,6 +176,14 @@ func TestCreateMarket(t *testing.T) { market, err = app.PerpKeeperV2.GetMarket(ctx, pair) require.NoError(t, err) require.Equal(t, uint64(2), market.Version) + + // Fail if the creator is not a sudoer + err = admin.CreateMarket(ctx, keeper.ArgsCreateMarket{ + Pair: pair, + PriceMultiplier: amm.PriceMultiplier, + SqrtDepth: amm.SqrtDepth, + }, testutil.AccAddress()) + require.ErrorContains(t, err, "insufficient permissions on smart contract") } func TestCloseMarket(t *testing.T) { diff --git a/x/perp/v2/module/abci_test.go b/x/perp/v2/module/abci_test.go index 164262f80..bc2bd1852 100644 --- a/x/perp/v2/module/abci_test.go +++ b/x/perp/v2/module/abci_test.go @@ -25,6 +25,9 @@ func TestSnapshotUpdates(t *testing.T) { initialMarket := *mock.TestMarket() initialAmm := *mock.TestAMMDefault() + adminUser, err := sdk.AccAddressFromBech32(testutilevents.ADDR_SUDO_ROOT) + require.NoError(t, err) + runBlock := func(duration time.Duration) { perp.EndBlocker(ctx, app.PerpKeeperV2) ctx = ctx. @@ -41,6 +44,7 @@ func TestSnapshotUpdates(t *testing.T) { SqrtDepth: initialAmm.SqrtDepth, Market: &initialMarket, }, + adminUser, )) expectedSnapshot := types.ReserveSnapshot{ @@ -108,6 +112,9 @@ func TestEndBlocker(t *testing.T) { initialMarket := *mock.TestMarket() initialAmm := *mock.TestAMMDefault() + adminUser, err := sdk.AccAddressFromBech32(testutilevents.ADDR_SUDO_ROOT) + require.NoError(t, err) + runBlock := func(duration time.Duration) { perp.EndBlocker(ctx, app.PerpKeeperV2) ctx = ctx. @@ -126,6 +133,7 @@ func TestEndBlocker(t *testing.T) { SqrtDepth: initialAmm.SqrtDepth, Market: &initialMarket, }, + adminUser, )) t.Log("run one block of 5 seconds") diff --git a/x/perp/v2/types/msgs.go b/x/perp/v2/types/msgs.go index c58d88218..776daa01e 100644 --- a/x/perp/v2/types/msgs.go +++ b/x/perp/v2/types/msgs.go @@ -462,3 +462,27 @@ func (m MsgWithdrawFromPerpFund) GetSigners() []sdk.AccAddress { func (m MsgWithdrawFromPerpFund) GetSignBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m)) } + +// ------------------------ MsgCreateMarket ------------------------ + +func (m MsgCreateMarket) ValidateBasic() error { + if err := m.Pair.Validate(); err != nil { + return err + } + if !m.SqrtDepth.IsPositive() { + return fmt.Errorf("sqrt depth must be positive, not: %v", m.SqrtDepth.String()) + } + if !m.PriceMultiplier.IsPositive() { + return fmt.Errorf("price multiplier must be positive, not: %v", m.PriceMultiplier.String()) + } + return nil +} + +func (m MsgCreateMarket) GetSigners() []sdk.AccAddress { + signer, err := sdk.AccAddressFromBech32(m.Sender) + if err != nil { + panic(err) + } + + return []sdk.AccAddress{signer} +} diff --git a/x/perp/v2/types/tx.pb.go b/x/perp/v2/types/tx.pb.go index 1a57294d4..6a6b571cb 100644 --- a/x/perp/v2/types/tx.pb.go +++ b/x/perp/v2/types/tx.pb.go @@ -1467,6 +1467,99 @@ func (m *MsgWithdrawFromPerpFundResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgWithdrawFromPerpFundResponse proto.InternalMessageInfo +// CreateMarket: gRPC tx msg for creating a new market. +// Admin-only. +type MsgCreateMarket struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Pair github_com_NibiruChain_nibiru_x_common_asset.Pair `protobuf:"bytes,2,opt,name=pair,proto3,customtype=github.com/NibiruChain/nibiru/x/common/asset.Pair" json:"pair" yaml:"pair"` + PriceMultiplier github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=price_multiplier,json=priceMultiplier,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"price_multiplier" yaml:"price_multiplier"` + SqrtDepth github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=sqrt_depth,json=sqrtDepth,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"sqrt_depth" yaml:"sqrt_depth"` + Market *Market `protobuf:"bytes,5,opt,name=market,proto3" json:"market,omitempty"` +} + +func (m *MsgCreateMarket) Reset() { *m = MsgCreateMarket{} } +func (m *MsgCreateMarket) String() string { return proto.CompactTextString(m) } +func (*MsgCreateMarket) ProtoMessage() {} +func (*MsgCreateMarket) Descriptor() ([]byte, []int) { + return fileDescriptor_b95cda40bf0a0f91, []int{27} +} +func (m *MsgCreateMarket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateMarket.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateMarket) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateMarket.Merge(m, src) +} +func (m *MsgCreateMarket) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateMarket) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateMarket.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateMarket proto.InternalMessageInfo + +func (m *MsgCreateMarket) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgCreateMarket) GetMarket() *Market { + if m != nil { + return m.Market + } + return nil +} + +type MsgCreateMarketResponse struct { +} + +func (m *MsgCreateMarketResponse) Reset() { *m = MsgCreateMarketResponse{} } +func (m *MsgCreateMarketResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateMarketResponse) ProtoMessage() {} +func (*MsgCreateMarketResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b95cda40bf0a0f91, []int{28} +} +func (m *MsgCreateMarketResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateMarketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateMarketResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateMarketResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateMarketResponse.Merge(m, src) +} +func (m *MsgCreateMarketResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateMarketResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateMarketResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateMarketResponse proto.InternalMessageInfo + // CloseMarket: gRPC tx msg for closing a market. // Admin-only. type MsgCloseMarket struct { @@ -1478,7 +1571,7 @@ func (m *MsgCloseMarket) Reset() { *m = MsgCloseMarket{} } func (m *MsgCloseMarket) String() string { return proto.CompactTextString(m) } func (*MsgCloseMarket) ProtoMessage() {} func (*MsgCloseMarket) Descriptor() ([]byte, []int) { - return fileDescriptor_b95cda40bf0a0f91, []int{27} + return fileDescriptor_b95cda40bf0a0f91, []int{29} } func (m *MsgCloseMarket) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1521,7 +1614,7 @@ func (m *MsgCloseMarketResponse) Reset() { *m = MsgCloseMarketResponse{} func (m *MsgCloseMarketResponse) String() string { return proto.CompactTextString(m) } func (*MsgCloseMarketResponse) ProtoMessage() {} func (*MsgCloseMarketResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b95cda40bf0a0f91, []int{28} + return fileDescriptor_b95cda40bf0a0f91, []int{30} } func (m *MsgCloseMarketResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1580,6 +1673,8 @@ func init() { proto.RegisterType((*MsgShiftSwapInvariantResponse)(nil), "nibiru.perp.v2.MsgShiftSwapInvariantResponse") proto.RegisterType((*MsgWithdrawFromPerpFund)(nil), "nibiru.perp.v2.MsgWithdrawFromPerpFund") proto.RegisterType((*MsgWithdrawFromPerpFundResponse)(nil), "nibiru.perp.v2.MsgWithdrawFromPerpFundResponse") + proto.RegisterType((*MsgCreateMarket)(nil), "nibiru.perp.v2.MsgCreateMarket") + proto.RegisterType((*MsgCreateMarketResponse)(nil), "nibiru.perp.v2.MsgCreateMarketResponse") proto.RegisterType((*MsgCloseMarket)(nil), "nibiru.perp.v2.MsgCloseMarket") proto.RegisterType((*MsgCloseMarketResponse)(nil), "nibiru.perp.v2.MsgCloseMarketResponse") } @@ -1587,113 +1682,121 @@ func init() { func init() { proto.RegisterFile("nibiru/perp/v2/tx.proto", fileDescriptor_b95cda40bf0a0f91) } var fileDescriptor_b95cda40bf0a0f91 = []byte{ - // 1686 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4b, 0x6f, 0x1b, 0x47, - 0x12, 0xe6, 0x88, 0x14, 0x25, 0x95, 0x64, 0x3d, 0xc6, 0xb2, 0x44, 0x73, 0xbd, 0x94, 0x3c, 0xd8, - 0xf5, 0x6a, 0x0f, 0x22, 0x6d, 0xed, 0x02, 0x8b, 0x5d, 0x60, 0x77, 0xa1, 0x87, 0x15, 0x38, 0x30, - 0x6d, 0x7a, 0x64, 0xd8, 0x81, 0xe3, 0x60, 0xdc, 0xe2, 0xb4, 0x46, 0x03, 0x0f, 0xbb, 0xe9, 0x99, - 0x26, 0x29, 0x39, 0xb7, 0x1c, 0x73, 0xca, 0x21, 0x87, 0x00, 0x01, 0x72, 0x0b, 0x10, 0xe4, 0x10, - 0x20, 0x87, 0x24, 0x97, 0xfc, 0x00, 0x1f, 0x7d, 0x0c, 0x82, 0xc0, 0x09, 0xac, 0x4b, 0xae, 0x31, - 0xf2, 0x03, 0x82, 0xee, 0x79, 0x70, 0x86, 0x6e, 0x52, 0x14, 0x23, 0x13, 0x48, 0x90, 0x93, 0xd4, - 0xd3, 0xd5, 0x5f, 0xd5, 0x57, 0x55, 0xdd, 0x55, 0xdd, 0x84, 0x45, 0x62, 0xef, 0xda, 0x6e, 0xa3, - 0x54, 0xc7, 0x6e, 0xbd, 0xd4, 0x5c, 0x2b, 0xb1, 0x83, 0x62, 0xdd, 0xa5, 0x8c, 0xaa, 0xd3, 0xfe, - 0x44, 0x91, 0x4f, 0x14, 0x9b, 0x6b, 0xf9, 0x0b, 0x16, 0xa5, 0x96, 0x83, 0x4b, 0xa8, 0x6e, 0x97, - 0x10, 0x21, 0x94, 0x21, 0x66, 0x53, 0xe2, 0xf9, 0xd2, 0xf9, 0x42, 0x95, 0x7a, 0x35, 0xea, 0x95, - 0x76, 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1, 0xc6, 0xf8, 0x2e, 0xc6, 0x79, 0xa7, 0x85, 0xea, 0xd7, 0x48, 0x13, - 0xb9, 0x36, 0x22, 0x6c, 0x58, 0x9c, 0xef, 0x83, 0xca, 0x39, 0x7b, 0x2d, 0x54, 0x37, 0xec, 0x50, - 0xf9, 0x00, 0xcc, 0xc5, 0x8d, 0x8e, 0xe0, 0x56, 0x82, 0x44, 0x9c, 0x7f, 0x62, 0x22, 0xe2, 0xff, - 0x89, 0x92, 0xc8, 0xee, 0x6d, 0x97, 0xd6, 0x2a, 0xd8, 0xad, 0xf7, 0x3c, 0x35, 0xb7, 0x21, 0x1b, - 0x5c, 0x3c, 0x47, 0x06, 0x32, 0x33, 0x58, 0xad, 0xce, 0xc3, 0xa8, 0x7f, 0xa2, 0xa5, 0xfd, 0xb7, - 0x07, 0x31, 0x50, 0x17, 0x61, 0x8c, 0x51, 0x03, 0x99, 0xa6, 0xeb, 0x17, 0x1c, 0x3d, 0xcb, 0xe8, - 0xba, 0x69, 0xba, 0xda, 0xc5, 0xc4, 0xde, 0x89, 0x5b, 0x1a, 0xb1, 0x69, 0x89, 0x6b, 0xbc, 0x28, - 0xf8, 0xfe, 0x8d, 0x70, 0x58, 0x5d, 0x72, 0x4e, 0xdc, 0x42, 0x63, 0x8a, 0x43, 0x93, 0xd6, 0xde, - 0x9d, 0x82, 0x74, 0xd9, 0xb3, 0xd4, 0x7b, 0x30, 0x95, 0x78, 0x06, 0x5e, 0x92, 0xbc, 0xfb, 0xc4, - 0x05, 0xf2, 0x7f, 0x3b, 0x46, 0x20, 0x22, 0x9d, 0x52, 0x6f, 0xc1, 0x44, 0xfb, 0x0d, 0xf3, 0x82, - 0x64, 0x5d, 0x34, 0x9b, 0xff, 0x4b, 0xaf, 0xd9, 0x18, 0xe4, 0x03, 0x98, 0xee, 0x78, 0xbd, 0xbb, - 0x78, 0xec, 0x43, 0x55, 0xfe, 0xef, 0x7d, 0xbf, 0x65, 0x69, 0x29, 0xf5, 0x2e,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2, 0xf4, 0x79, 0x41, 0xf9, 0xe1, 0x79, 0x41, 0x79, 0xef, 0xa8, 0x90, 0x7a, - 0x7a, 0x54, 0x48, 0x7d, 0x73, 0x54, 0x48, 0xdd, 0x5b, 0x3d, 0xae, 0xf2, 0x44, 0x3f, 0xb9, 0xf2, - 0x32, 0xba, 0x9b, 0x15, 0x3f, 0x7b, 0xfe, 0xe3, 0x97, 0x00, 0x00, 0x00, 0xff, 0xff, 0x86, 0x40, - 0x26, 0x57, 0x91, 0x1d, 0x00, 0x00, + // 1816 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x5f, 0x6f, 0x1b, 0x4b, + 0x15, 0xf7, 0xc6, 0x69, 0x9a, 0x9c, 0xa4, 0xf9, 0xb3, 0x37, 0x4d, 0x5c, 0x73, 0xb1, 0x73, 0x57, + 0x50, 0xc2, 0x43, 0xec, 0xdb, 0x70, 0x25, 0x04, 0x12, 0xa0, 0x34, 0x69, 0xa0, 0xa8, 0x6e, 0xdd, + 0x6d, 0xd5, 0xa2, 0x52, 0xb4, 0x77, 0xe2, 0x9d, 0x6c, 0x56, 0x5d, 0xcf, 0x6c, 0x77, 0xc6, 0x76, + 0x53, 0xde, 0xf8, 0x04, 0x3c, 0x20, 0x81, 0x84, 0xc4, 0x1b, 0x12, 0xe2, 0x01, 0x89, 0x07, 0xe0, + 0x85, 0x0f, 0x70, 0x1f, 0xfb, 0x88, 0x10, 0x0a, 0xa8, 0x95, 0x10, 0xaf, 0x54, 0x7c, 0x00, 0x34, + 0xb3, 0xb3, 0xeb, 0x5d, 0x77, 0xec, 0x38, 0x26, 0x8d, 0x04, 0xe2, 0x29, 0x99, 0x9d, 0x33, 0xbf, + 0xf3, 0x7f, 0xce, 0x39, 0x63, 0x58, 0x27, 0xfe, 0x81, 0x1f, 0x75, 0xea, 0x21, 0x8e, 0xc2, 0x7a, + 0x77, 0xbb, 0x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x78, 0xf5, 0xba, 0x62, 0xfc, 0xed, 0x75, 0xc5, 0xf8, 0xf1, 0x9b, 0x4a, + 0xe1, 0xd5, 0x9b, 0x4a, 0xe1, 0x4f, 0x6f, 0x2a, 0x85, 0x27, 0x5b, 0xa7, 0x55, 0xb5, 0xf4, 0x37, + 0x78, 0x51, 0xb9, 0x0f, 0x66, 0xe4, 0xef, 0xe0, 0x5f, 0xf9, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xd1, 0x68, 0x6e, 0xa6, 0xa2, 0x1f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1730,6 +1833,7 @@ type MsgClient interface { // WithdrawFromPerpFund: gRPC tx msg to withdraw from the perp fund module // account. [SUDO] Only callable by sudoers. WithdrawFromPerpFund(ctx context.Context, in *MsgWithdrawFromPerpFund, opts ...grpc.CallOption) (*MsgWithdrawFromPerpFundResponse, error) + CreateMarket(ctx context.Context, in *MsgCreateMarket, opts ...grpc.CallOption) (*MsgCreateMarketResponse, error) // CloseMarket: gRPC tx msg for closing a market. // [Admin] Only callable by sudoers. CloseMarket(ctx context.Context, in *MsgCloseMarket, opts ...grpc.CallOption) (*MsgCloseMarketResponse, error) @@ -1869,6 +1973,15 @@ func (c *msgClient) WithdrawFromPerpFund(ctx context.Context, in *MsgWithdrawFro return out, nil } +func (c *msgClient) CreateMarket(ctx context.Context, in *MsgCreateMarket, opts ...grpc.CallOption) (*MsgCreateMarketResponse, error) { + out := new(MsgCreateMarketResponse) + err := c.cc.Invoke(ctx, "/nibiru.perp.v2.Msg/CreateMarket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) CloseMarket(ctx context.Context, in *MsgCloseMarket, opts ...grpc.CallOption) (*MsgCloseMarketResponse, error) { out := new(MsgCloseMarketResponse) err := c.cc.Invoke(ctx, "/nibiru.perp.v2.Msg/CloseMarket", in, out, opts...) @@ -1902,6 +2015,7 @@ type MsgServer interface { // WithdrawFromPerpFund: gRPC tx msg to withdraw from the perp fund module // account. [SUDO] Only callable by sudoers. WithdrawFromPerpFund(context.Context, *MsgWithdrawFromPerpFund) (*MsgWithdrawFromPerpFundResponse, error) + CreateMarket(context.Context, *MsgCreateMarket) (*MsgCreateMarketResponse, error) // CloseMarket: gRPC tx msg for closing a market. // [Admin] Only callable by sudoers. CloseMarket(context.Context, *MsgCloseMarket) (*MsgCloseMarketResponse, error) @@ -1953,6 +2067,9 @@ func (*UnimplementedMsgServer) ShiftSwapInvariant(ctx context.Context, req *MsgS func (*UnimplementedMsgServer) WithdrawFromPerpFund(ctx context.Context, req *MsgWithdrawFromPerpFund) (*MsgWithdrawFromPerpFundResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method WithdrawFromPerpFund not implemented") } +func (*UnimplementedMsgServer) CreateMarket(ctx context.Context, req *MsgCreateMarket) (*MsgCreateMarketResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateMarket not implemented") +} func (*UnimplementedMsgServer) CloseMarket(ctx context.Context, req *MsgCloseMarket) (*MsgCloseMarketResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CloseMarket not implemented") } @@ -2213,6 +2330,24 @@ func _Msg_WithdrawFromPerpFund_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _Msg_CreateMarket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateMarket) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateMarket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/nibiru.perp.v2.Msg/CreateMarket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateMarket(ctx, req.(*MsgCreateMarket)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_CloseMarket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgCloseMarket) if err := dec(in); err != nil { @@ -2291,6 +2426,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "WithdrawFromPerpFund", Handler: _Msg_WithdrawFromPerpFund_Handler, }, + { + MethodName: "CreateMarket", + Handler: _Msg_CreateMarket_Handler, + }, { MethodName: "CloseMarket", Handler: _Msg_CloseMarket_Handler, @@ -3675,6 +3814,101 @@ func (m *MsgWithdrawFromPerpFundResponse) MarshalToSizedBuffer(dAtA []byte) (int return len(dAtA) - i, nil } +func (m *MsgCreateMarket) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Market != nil { + { + size, err := m.Market.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + { + size := m.SqrtDepth.Size() + i -= size + if _, err := m.SqrtDepth.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.PriceMultiplier.Size() + i -= size + if _, err := m.PriceMultiplier.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.Pair.Size() + i -= size + if _, err := m.Pair.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateMarketResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateMarketResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateMarketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgCloseMarket) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -4236,6 +4470,38 @@ func (m *MsgWithdrawFromPerpFundResponse) Size() (n int) { return n } +func (m *MsgCreateMarket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Pair.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.PriceMultiplier.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.SqrtDepth.Size() + n += 1 + l + sovTx(uint64(l)) + if m.Market != nil { + l = m.Market.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCreateMarketResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgCloseMarket) Size() (n int) { if m == nil { return 0 @@ -8196,6 +8462,276 @@ func (m *MsgWithdrawFromPerpFundResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgCreateMarket) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateMarket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateMarket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pair", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Pair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PriceMultiplier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PriceMultiplier.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SqrtDepth", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SqrtDepth.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Market", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Market == nil { + m.Market = &Market{} + } + if err := m.Market.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateMarketResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateMarketResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateMarketResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *MsgCloseMarket) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/sudo/cli/cli_test.go b/x/sudo/cli/cli_test.go index c6c45a3bc..309eccb7e 100644 --- a/x/sudo/cli/cli_test.go +++ b/x/sudo/cli/cli_test.go @@ -159,7 +159,7 @@ func (s *IntegrationSuite) TestCmdEditSudoers() { contracts = append(contracts, addr.String()) } - var sender sdk.AccAddress = s.root.addr + var sender = s.root.addr pbMsg := types.MsgEditSudoers{ Action: "add_contracts",