diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/prices/query.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/prices/query.ts index 2730923e0f0..525f64b6b0a 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/prices/query.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/prices/query.ts @@ -157,16 +157,28 @@ export interface QueryNextMarketIdRequest {} /** QueryNextMarketIdRequest is request type for the Query/Params `NextMarketId` */ export interface QueryNextMarketIdRequestSDKType {} -/** QueryNextMarketIdResponse is response type for the Query/Params `NextMarketId` */ +/** + * QueryNextMarketIdResponse is response type for the Query/Params + * `NextMarketId` + */ export interface QueryNextMarketIdResponse { - /** QueryNextMarketIdResponse is response type for the Query/Params `NextMarketId` */ + /** + * QueryNextMarketIdResponse is response type for the Query/Params + * `NextMarketId` + */ nextMarketId: number; } -/** QueryNextMarketIdResponse is response type for the Query/Params `NextMarketId` */ +/** + * QueryNextMarketIdResponse is response type for the Query/Params + * `NextMarketId` + */ export interface QueryNextMarketIdResponseSDKType { - /** QueryNextMarketIdResponse is response type for the Query/Params `NextMarketId` */ + /** + * QueryNextMarketIdResponse is response type for the Query/Params + * `NextMarketId` + */ next_market_id: number; } diff --git a/proto/dydxprotocol/perpetuals/query.proto b/proto/dydxprotocol/perpetuals/query.proto index b849a707fd5..b69c4420504 100644 --- a/proto/dydxprotocol/perpetuals/query.proto +++ b/proto/dydxprotocol/perpetuals/query.proto @@ -46,7 +46,8 @@ service Query { } // Queries the next perpetual id. - rpc NextPerpetualId(QueryNextPerpetualIdRequest) returns (QueryNextPerpetualIdResponse) { + rpc NextPerpetualId(QueryNextPerpetualIdRequest) + returns (QueryNextPerpetualIdResponse) { option (google.api.http).get = "/dydxprotocol/perpetuals/next_perpetual_id"; } } diff --git a/proto/dydxprotocol/prices/query.proto b/proto/dydxprotocol/prices/query.proto index 1fc4ef1f07f..fc55b304e85 100644 --- a/proto/dydxprotocol/prices/query.proto +++ b/proto/dydxprotocol/prices/query.proto @@ -34,7 +34,8 @@ service Query { } // Queries the next market id. - rpc NextMarketId(QueryNextMarketIdRequest) returns (QueryNextMarketIdResponse) { + rpc NextMarketId(QueryNextMarketIdRequest) + returns (QueryNextMarketIdResponse) { option (google.api.http).get = "/dydxprotocol/prices/next_market_id"; } } @@ -88,5 +89,6 @@ message QueryAllMarketParamsResponse { // QueryNextMarketIdRequest is request type for the Query/Params `NextMarketId` message QueryNextMarketIdRequest {} -// QueryNextMarketIdResponse is response type for the Query/Params `NextMarketId` +// QueryNextMarketIdResponse is response type for the Query/Params +// `NextMarketId` message QueryNextMarketIdResponse { uint32 next_market_id = 1; } diff --git a/protocol/mocks/AssetsKeeper.go b/protocol/mocks/AssetsKeeper.go index b117d6596b6..6942c91773e 100644 --- a/protocol/mocks/AssetsKeeper.go +++ b/protocol/mocks/AssetsKeeper.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.44.1. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package mocks diff --git a/protocol/mocks/ClobKeeper.go b/protocol/mocks/ClobKeeper.go index 2a7b5cfd9ce..4b786d6b814 100644 --- a/protocol/mocks/ClobKeeper.go +++ b/protocol/mocks/ClobKeeper.go @@ -1134,6 +1134,11 @@ func (_m *ClobKeeper) SetLongTermOrderPlacement(ctx types.Context, order clobtyp _m.Called(ctx, order, blockHeight) } +// SetNextClobPairID provides a mock function with given fields: ctx, nextID +func (_m *ClobKeeper) SetNextClobPairID(ctx types.Context, nextID uint32) { + _m.Called(ctx, nextID) +} + // UnsafeMigrateOrderExpirationState provides a mock function with given fields: ctx func (_m *ClobKeeper) UnsafeMigrateOrderExpirationState(ctx types.Context) { _m.Called(ctx) diff --git a/protocol/mocks/DelayMsgKeeper.go b/protocol/mocks/DelayMsgKeeper.go index 04d6e65d68b..e69de29bb2d 100644 --- a/protocol/mocks/DelayMsgKeeper.go +++ b/protocol/mocks/DelayMsgKeeper.go @@ -1,239 +0,0 @@ - -// Code generated by mockery v2.44.1. DO NOT EDIT. - -package mocks - -import ( - lib "github.com/dydxprotocol/v4-chain/protocol/lib" - delaymsgtypes "github.com/dydxprotocol/v4-chain/protocol/x/delaymsg/types" - - log "cosmossdk.io/log" - - mock "github.com/stretchr/testify/mock" - - proto "github.com/cosmos/gogoproto/proto" - - types "github.com/cosmos/cosmos-sdk/types" -) - -// DelayMsgKeeper is an autogenerated mock type for the DelayMsgKeeper type -type DelayMsgKeeper struct { - mock.Mock -} - -// DelayMessageByBlocks provides a mock function with given fields: ctx, msg, blockDelay -func (_m *DelayMsgKeeper) DelayMessageByBlocks(ctx types.Context, msg proto.Message, blockDelay uint32) (uint32, error) { - ret := _m.Called(ctx, msg, blockDelay) - - if len(ret) == 0 { - panic("no return value specified for DelayMessageByBlocks") - } - - var r0 uint32 - var r1 error - if rf, ok := ret.Get(0).(func(types.Context, proto.Message, uint32) (uint32, error)); ok { - return rf(ctx, msg, blockDelay) - } - if rf, ok := ret.Get(0).(func(types.Context, proto.Message, uint32) uint32); ok { - r0 = rf(ctx, msg, blockDelay) - } else { - r0 = ret.Get(0).(uint32) - } - - if rf, ok := ret.Get(1).(func(types.Context, proto.Message, uint32) error); ok { - r1 = rf(ctx, msg, blockDelay) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// DeleteMessage provides a mock function with given fields: ctx, id -func (_m *DelayMsgKeeper) DeleteMessage(ctx types.Context, id uint32) error { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for DeleteMessage") - } - - var r0 error - if rf, ok := ret.Get(0).(func(types.Context, uint32) error); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// GetAllDelayedMessages provides a mock function with given fields: ctx -func (_m *DelayMsgKeeper) GetAllDelayedMessages(ctx types.Context) []*delaymsgtypes.DelayedMessage { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for GetAllDelayedMessages") - } - - var r0 []*delaymsgtypes.DelayedMessage - if rf, ok := ret.Get(0).(func(types.Context) []*delaymsgtypes.DelayedMessage); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]*delaymsgtypes.DelayedMessage) - } - } - - return r0 -} - -// GetBlockMessageIds provides a mock function with given fields: ctx, blockHeight -func (_m *DelayMsgKeeper) GetBlockMessageIds(ctx types.Context, blockHeight uint32) (delaymsgtypes.BlockMessageIds, bool) { - ret := _m.Called(ctx, blockHeight) - - if len(ret) == 0 { - panic("no return value specified for GetBlockMessageIds") - } - - var r0 delaymsgtypes.BlockMessageIds - var r1 bool - if rf, ok := ret.Get(0).(func(types.Context, uint32) (delaymsgtypes.BlockMessageIds, bool)); ok { - return rf(ctx, blockHeight) - } - if rf, ok := ret.Get(0).(func(types.Context, uint32) delaymsgtypes.BlockMessageIds); ok { - r0 = rf(ctx, blockHeight) - } else { - r0 = ret.Get(0).(delaymsgtypes.BlockMessageIds) - } - - if rf, ok := ret.Get(1).(func(types.Context, uint32) bool); ok { - r1 = rf(ctx, blockHeight) - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// GetMessage provides a mock function with given fields: ctx, id -func (_m *DelayMsgKeeper) GetMessage(ctx types.Context, id uint32) (delaymsgtypes.DelayedMessage, bool) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetMessage") - } - - var r0 delaymsgtypes.DelayedMessage - var r1 bool - if rf, ok := ret.Get(0).(func(types.Context, uint32) (delaymsgtypes.DelayedMessage, bool)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(types.Context, uint32) delaymsgtypes.DelayedMessage); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Get(0).(delaymsgtypes.DelayedMessage) - } - - if rf, ok := ret.Get(1).(func(types.Context, uint32) bool); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Get(1).(bool) - } - - return r0, r1 -} - -// HasAuthority provides a mock function with given fields: authority -func (_m *DelayMsgKeeper) HasAuthority(authority string) bool { - ret := _m.Called(authority) - - if len(ret) == 0 { - panic("no return value specified for HasAuthority") - } - - var r0 bool - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(authority) - } else { - r0 = ret.Get(0).(bool) - } - - return r0 -} - -// Logger provides a mock function with given fields: ctx -func (_m *DelayMsgKeeper) Logger(ctx types.Context) log.Logger { - ret := _m.Called(ctx) - - if len(ret) == 0 { - panic("no return value specified for Logger") - } - - var r0 log.Logger - if rf, ok := ret.Get(0).(func(types.Context) log.Logger); ok { - r0 = rf(ctx) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(log.Logger) - } - } - - return r0 -} - -// Router provides a mock function with given fields: -func (_m *DelayMsgKeeper) Router() lib.MsgRouter { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for Router") - } - - var r0 lib.MsgRouter - if rf, ok := ret.Get(0).(func() lib.MsgRouter); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(lib.MsgRouter) - } - } - - return r0 -} - -// SetDelayedMessage provides a mock function with given fields: ctx, msg -func (_m *DelayMsgKeeper) SetDelayedMessage(ctx types.Context, msg *delaymsgtypes.DelayedMessage) error { - ret := _m.Called(ctx, msg) - - if len(ret) == 0 { - panic("no return value specified for SetDelayedMessage") - } - - var r0 error - if rf, ok := ret.Get(0).(func(types.Context, *delaymsgtypes.DelayedMessage) error); ok { - r0 = rf(ctx, msg) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// SetNextDelayedMessageId provides a mock function with given fields: ctx, nextDelayedMessageId -func (_m *DelayMsgKeeper) SetNextDelayedMessageId(ctx types.Context, nextDelayedMessageId uint32) { - _m.Called(ctx, nextDelayedMessageId) -} - -// NewDelayMsgKeeper creates a new instance of DelayMsgKeeper. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewDelayMsgKeeper(t interface { - mock.TestingT - Cleanup(func()) -}) *DelayMsgKeeper { - mock := &DelayMsgKeeper{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} diff --git a/protocol/mocks/MsgRouter.go b/protocol/mocks/MsgRouter.go index 4c81bc9494d..e69de29bb2d 100644 --- a/protocol/mocks/MsgRouter.go +++ b/protocol/mocks/MsgRouter.go @@ -1,49 +0,0 @@ -// Code generated by mockery v2.44.1. DO NOT EDIT. - -package mocks - -import ( - proto "github.com/cosmos/gogoproto/proto" - mock "github.com/stretchr/testify/mock" - - types "github.com/cosmos/cosmos-sdk/types" -) - -// MsgRouter is an autogenerated mock type for the MsgRouter type -type MsgRouter struct { - mock.Mock -} - -// Handler provides a mock function with given fields: msg -func (_m *MsgRouter) Handler(msg proto.Message) func(types.Context, proto.Message) (*types.Result, error) { - ret := _m.Called(msg) - - if len(ret) == 0 { - panic("no return value specified for Handler") - } - - var r0 func(types.Context, proto.Message) (*types.Result, error) - if rf, ok := ret.Get(0).(func(proto.Message) func(types.Context, proto.Message) (*types.Result, error)); ok { - r0 = rf(msg) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(func(types.Context, proto.Message) (*types.Result, error)) - } - } - - return r0 -} - -// NewMsgRouter creates a new instance of MsgRouter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewMsgRouter(t interface { - mock.TestingT - Cleanup(func()) -}) *MsgRouter { - mock := &MsgRouter{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} \ No newline at end of file diff --git a/protocol/mocks/PerpetualsKeeper.go b/protocol/mocks/PerpetualsKeeper.go index 38721a5f1e9..1fb70624c46 100644 --- a/protocol/mocks/PerpetualsKeeper.go +++ b/protocol/mocks/PerpetualsKeeper.go @@ -1,4 +1,4 @@ -// Code generated by mockery v2.44.1. DO NOT EDIT. +// Code generated by mockery v2.46.0. DO NOT EDIT. package mocks @@ -122,34 +122,6 @@ func (_m *PerpetualsKeeper) GetAllPerpetuals(ctx types.Context) []perpetualstype return r0 } -// GetLiquidityTier provides a mock function with given fields: ctx, id -func (_m *PerpetualsKeeper) GetLiquidityTier(ctx types.Context, id uint32) (perpetualstypes.LiquidityTier, error) { - ret := _m.Called(ctx, id) - - if len(ret) == 0 { - panic("no return value specified for GetLiquidityTier") - } - - var r0 perpetualstypes.LiquidityTier - var r1 error - if rf, ok := ret.Get(0).(func(types.Context, uint32) (perpetualstypes.LiquidityTier, error)); ok { - return rf(ctx, id) - } - if rf, ok := ret.Get(0).(func(types.Context, uint32) perpetualstypes.LiquidityTier); ok { - r0 = rf(ctx, id) - } else { - r0 = ret.Get(0).(perpetualstypes.LiquidityTier) - } - - if rf, ok := ret.Get(1).(func(types.Context, uint32) error); ok { - r1 = rf(ctx, id) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - // GetNetCollateral provides a mock function with given fields: ctx, id, bigQuantums func (_m *PerpetualsKeeper) GetNetCollateral(ctx types.Context, id uint32, bigQuantums *big.Int) (*big.Int, error) { ret := _m.Called(ctx, id, bigQuantums) @@ -360,11 +332,6 @@ func (_m *PerpetualsKeeper) PerformStatefulPremiumVotesValidation(ctx types.Cont return r0 } -// SendOIUpdatesToIndexer provides a mock function with given fields: ctx -func (_m *PerpetualsKeeper) SendOIUpdatesToIndexer(ctx types.Context) { - _m.Called(ctx) -} - // SetLiquidityTier provides a mock function with given fields: ctx, id, name, initialMarginPpm, maintenanceFractionPpm, impactNotional, openInterestLowerCap, openInterestUpperCap func (_m *PerpetualsKeeper) SetLiquidityTier(ctx types.Context, id uint32, name string, initialMarginPpm uint32, maintenanceFractionPpm uint32, impactNotional uint64, openInterestLowerCap uint64, openInterestUpperCap uint64) (perpetualstypes.LiquidityTier, error) { ret := _m.Called(ctx, id, name, initialMarginPpm, maintenanceFractionPpm, impactNotional, openInterestLowerCap, openInterestUpperCap) @@ -393,6 +360,11 @@ func (_m *PerpetualsKeeper) SetLiquidityTier(ctx types.Context, id uint32, name return r0, r1 } +// SetNextPerpetualID provides a mock function with given fields: ctx, nextID +func (_m *PerpetualsKeeper) SetNextPerpetualID(ctx types.Context, nextID uint32) { + _m.Called(ctx, nextID) +} + // SetParams provides a mock function with given fields: ctx, params func (_m *PerpetualsKeeper) SetParams(ctx types.Context, params perpetualstypes.Params) error { ret := _m.Called(ctx, params) @@ -469,4 +441,4 @@ func NewPerpetualsKeeper(t interface { t.Cleanup(func() { mock.AssertExpectations(t) }) return mock -} \ No newline at end of file +} diff --git a/protocol/mocks/PricesKeeper.go b/protocol/mocks/PricesKeeper.go index 4776407623a..6f7a5121191 100644 --- a/protocol/mocks/PricesKeeper.go +++ b/protocol/mocks/PricesKeeper.go @@ -418,6 +418,11 @@ func (_m *PricesKeeper) PerformStatefulPriceUpdateValidation(ctx types.Context, return r0 } +// SetNextMarketID provides a mock function with given fields: ctx, nextID +func (_m *PricesKeeper) SetNextMarketID(ctx types.Context, nextID uint32) { + _m.Called(ctx, nextID) +} + // UpdateMarketPrices provides a mock function with given fields: ctx, updates func (_m *PricesKeeper) UpdateMarketPrices(ctx types.Context, updates []*pricestypes.MsgUpdateMarketPrices_MarketPrice) error { ret := _m.Called(ctx, updates) diff --git a/protocol/mocks/QueryClient.go b/protocol/mocks/QueryClient.go index e8c611ebb3e..862029d0bda 100644 --- a/protocol/mocks/QueryClient.go +++ b/protocol/mocks/QueryClient.go @@ -696,6 +696,117 @@ func (_m *QueryClient) MevNodeToNodeCalculation(ctx context.Context, in *clobtyp return r0, r1 } +// NextClobPairId provides a mock function with given fields: ctx, in, opts +func (_m *QueryClient) NextClobPairId(ctx context.Context, in *clobtypes.QueryNextClobPairIdRequest, opts ...grpc.CallOption) (*clobtypes.QueryNextClobPairIdResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for NextClobPairId") + } + + var r0 *clobtypes.QueryNextClobPairIdResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *clobtypes.QueryNextClobPairIdRequest, ...grpc.CallOption) (*clobtypes.QueryNextClobPairIdResponse, error)); ok { + return rf(ctx, in, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *clobtypes.QueryNextClobPairIdRequest, ...grpc.CallOption) *clobtypes.QueryNextClobPairIdResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*clobtypes.QueryNextClobPairIdResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *clobtypes.QueryNextClobPairIdRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// NextMarketId provides a mock function with given fields: ctx, in, opts +func (_m *QueryClient) NextMarketId(ctx context.Context, in *pricestypes.QueryNextMarketIdRequest, opts ...grpc.CallOption) (*pricestypes.QueryNextMarketIdResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for NextMarketId") + } + + var r0 *pricestypes.QueryNextMarketIdResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *pricestypes.QueryNextMarketIdRequest, ...grpc.CallOption) (*pricestypes.QueryNextMarketIdResponse, error)); ok { + return rf(ctx, in, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *pricestypes.QueryNextMarketIdRequest, ...grpc.CallOption) *pricestypes.QueryNextMarketIdResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*pricestypes.QueryNextMarketIdResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *pricestypes.QueryNextMarketIdRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// NextPerpetualId provides a mock function with given fields: ctx, in, opts +func (_m *QueryClient) NextPerpetualId(ctx context.Context, in *perpetualstypes.QueryNextPerpetualIdRequest, opts ...grpc.CallOption) (*perpetualstypes.QueryNextPerpetualIdResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + if len(ret) == 0 { + panic("no return value specified for NextPerpetualId") + } + + var r0 *perpetualstypes.QueryNextPerpetualIdResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *perpetualstypes.QueryNextPerpetualIdRequest, ...grpc.CallOption) (*perpetualstypes.QueryNextPerpetualIdResponse, error)); ok { + return rf(ctx, in, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *perpetualstypes.QueryNextPerpetualIdRequest, ...grpc.CallOption) *perpetualstypes.QueryNextPerpetualIdResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*perpetualstypes.QueryNextPerpetualIdResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *perpetualstypes.QueryNextPerpetualIdRequest, ...grpc.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // Params provides a mock function with given fields: ctx, in, opts func (_m *QueryClient) Params(ctx context.Context, in *perpetualstypes.QueryParamsRequest, opts ...grpc.CallOption) (*perpetualstypes.QueryParamsResponse, error) { _va := make([]interface{}, len(opts)) diff --git a/protocol/mocks/QueryServer.go b/protocol/mocks/QueryServer.go index 4a7770a9204..2e1187a66b5 100644 --- a/protocol/mocks/QueryServer.go +++ b/protocol/mocks/QueryServer.go @@ -135,6 +135,36 @@ func (_m *QueryServer) MarketPrice(_a0 context.Context, _a1 *types.QueryMarketPr return r0, r1 } +// NextMarketId provides a mock function with given fields: _a0, _a1 +func (_m *QueryServer) NextMarketId(_a0 context.Context, _a1 *types.QueryNextMarketIdRequest) (*types.QueryNextMarketIdResponse, error) { + ret := _m.Called(_a0, _a1) + + if len(ret) == 0 { + panic("no return value specified for NextMarketId") + } + + var r0 *types.QueryNextMarketIdResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryNextMarketIdRequest) (*types.QueryNextMarketIdResponse, error)); ok { + return rf(_a0, _a1) + } + if rf, ok := ret.Get(0).(func(context.Context, *types.QueryNextMarketIdRequest) *types.QueryNextMarketIdResponse); ok { + r0 = rf(_a0, _a1) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.QueryNextMarketIdResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *types.QueryNextMarketIdRequest) error); ok { + r1 = rf(_a0, _a1) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + // NewQueryServer creates a new instance of QueryServer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. // The first argument is typically a *testing.T value. func NewQueryServer(t interface { diff --git a/protocol/mocks/SubaccountsKeeper.go b/protocol/mocks/SubaccountsKeeper.go index 13460f3180c..58340ac8e7b 100644 --- a/protocol/mocks/SubaccountsKeeper.go +++ b/protocol/mocks/SubaccountsKeeper.go @@ -250,11 +250,6 @@ func (_m *SubaccountsKeeper) LegacyGetNegativeTncSubaccountSeenAtBlock(ctx types return r0, r1 } -// SendFinalizedSubaccountUpdates provides a mock function with given fields: ctx, subaccountUpdates -func (_m *SubaccountsKeeper) SendFinalizedSubaccountUpdates(ctx types.Context, subaccountUpdates []subaccountstypes.StreamSubaccountUpdate) { - _m.Called(ctx, subaccountUpdates) -} - // SetNegativeTncSubaccountSeenAtBlock provides a mock function with given fields: ctx, perpetualId, blockHeight func (_m *SubaccountsKeeper) SetNegativeTncSubaccountSeenAtBlock(ctx types.Context, perpetualId uint32, blockHeight uint32) error { ret := _m.Called(ctx, perpetualId, blockHeight) diff --git a/protocol/mocks/TxBuilder.go b/protocol/mocks/TxBuilder.go index a67246abc75..e69de29bb2d 100644 --- a/protocol/mocks/TxBuilder.go +++ b/protocol/mocks/TxBuilder.go @@ -1,151 +0,0 @@ -// Code generated by mockery v2.44.1. DO NOT EDIT. - -package mocks - -import ( - proto "github.com/cosmos/gogoproto/proto" - mock "github.com/stretchr/testify/mock" - - signing "github.com/cosmos/cosmos-sdk/x/auth/signing" - - tx "github.com/cosmos/cosmos-sdk/types/tx" - - txsigning "github.com/cosmos/cosmos-sdk/types/tx/signing" - - types "github.com/cosmos/cosmos-sdk/types" -) - -// TxBuilder is an autogenerated mock type for the TxBuilder type -type TxBuilder struct { - mock.Mock -} - -// AddAuxSignerData provides a mock function with given fields: _a0 -func (_m *TxBuilder) AddAuxSignerData(_a0 tx.AuxSignerData) error { - ret := _m.Called(_a0) - - if len(ret) == 0 { - panic("no return value specified for AddAuxSignerData") - } - - var r0 error - if rf, ok := ret.Get(0).(func(tx.AuxSignerData) error); ok { - r0 = rf(_a0) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// GetTx provides a mock function with given fields: -func (_m *TxBuilder) GetTx() signing.Tx { - ret := _m.Called() - - if len(ret) == 0 { - panic("no return value specified for GetTx") - } - - var r0 signing.Tx - if rf, ok := ret.Get(0).(func() signing.Tx); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(signing.Tx) - } - } - - return r0 -} - -// SetFeeAmount provides a mock function with given fields: amount -func (_m *TxBuilder) SetFeeAmount(amount types.Coins) { - _m.Called(amount) -} - -// SetFeeGranter provides a mock function with given fields: feeGranter -func (_m *TxBuilder) SetFeeGranter(feeGranter types.AccAddress) { - _m.Called(feeGranter) -} - -// SetFeePayer provides a mock function with given fields: feePayer -func (_m *TxBuilder) SetFeePayer(feePayer types.AccAddress) { - _m.Called(feePayer) -} - -// SetGasLimit provides a mock function with given fields: limit -func (_m *TxBuilder) SetGasLimit(limit uint64) { - _m.Called(limit) -} - -// SetMemo provides a mock function with given fields: memo -func (_m *TxBuilder) SetMemo(memo string) { - _m.Called(memo) -} - -// SetMsgs provides a mock function with given fields: msgs -func (_m *TxBuilder) SetMsgs(msgs ...proto.Message) error { - _va := make([]interface{}, len(msgs)) - for _i := range msgs { - _va[_i] = msgs[_i] - } - var _ca []interface{} - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for SetMsgs") - } - - var r0 error - if rf, ok := ret.Get(0).(func(...proto.Message) error); ok { - r0 = rf(msgs...) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// SetSignatures provides a mock function with given fields: signatures -func (_m *TxBuilder) SetSignatures(signatures ...txsigning.SignatureV2) error { - _va := make([]interface{}, len(signatures)) - for _i := range signatures { - _va[_i] = signatures[_i] - } - var _ca []interface{} - _ca = append(_ca, _va...) - ret := _m.Called(_ca...) - - if len(ret) == 0 { - panic("no return value specified for SetSignatures") - } - - var r0 error - if rf, ok := ret.Get(0).(func(...txsigning.SignatureV2) error); ok { - r0 = rf(signatures...) - } else { - r0 = ret.Error(0) - } - - return r0 -} - -// SetTimeoutHeight provides a mock function with given fields: height -func (_m *TxBuilder) SetTimeoutHeight(height uint64) { - _m.Called(height) -} - -// NewTxBuilder creates a new instance of TxBuilder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func NewTxBuilder(t interface { - mock.TestingT - Cleanup(func()) -}) *TxBuilder { - mock := &TxBuilder{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} \ No newline at end of file diff --git a/protocol/x/prices/types/query.pb.go b/protocol/x/prices/types/query.pb.go index 9a5129fd11f..dabafa61970 100644 --- a/protocol/x/prices/types/query.pb.go +++ b/protocol/x/prices/types/query.pb.go @@ -451,7 +451,8 @@ func (m *QueryNextMarketIdRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryNextMarketIdRequest proto.InternalMessageInfo -// QueryNextMarketIdResponse is response type for the Query/Params `NextMarketId` +// QueryNextMarketIdResponse is response type for the Query/Params +// `NextMarketId` type QueryNextMarketIdResponse struct { NextMarketId uint32 `protobuf:"varint,1,opt,name=next_market_id,json=nextMarketId,proto3" json:"next_market_id,omitempty"` }